Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is provided under a dual BSD/GPLv2 license. When using or |
| 3 | * redistributing this file, you may do so under either license. |
| 4 | * |
| 5 | * GPL LICENSE SUMMARY |
| 6 | * |
| 7 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of version 2 of the GNU General Public License as |
| 11 | * published by the Free Software Foundation. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | * General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 21 | * The full GNU General Public License is included in this distribution |
| 22 | * in the file called LICENSE.GPL. |
| 23 | * |
| 24 | * BSD LICENSE |
| 25 | * |
| 26 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. |
| 27 | * All rights reserved. |
| 28 | * |
| 29 | * Redistribution and use in source and binary forms, with or without |
| 30 | * modification, are permitted provided that the following conditions |
| 31 | * are met: |
| 32 | * |
| 33 | * * Redistributions of source code must retain the above copyright |
| 34 | * notice, this list of conditions and the following disclaimer. |
| 35 | * * Redistributions in binary form must reproduce the above copyright |
| 36 | * notice, this list of conditions and the following disclaimer in |
| 37 | * the documentation and/or other materials provided with the |
| 38 | * distribution. |
| 39 | * * Neither the name of Intel Corporation nor the names of its |
| 40 | * contributors may be used to endorse or promote products derived |
| 41 | * from this software without specific prior written permission. |
| 42 | * |
| 43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 44 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 45 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 46 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 47 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 48 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 49 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 50 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 51 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 53 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 54 | */ |
| 55 | |
Dan Williams | e531381 | 2011-05-07 10:11:43 -0700 | [diff] [blame] | 56 | #ifndef _ISCI_PORT_H_ |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 57 | #define _ISCI_PORT_H_ |
Dan Williams | ce2b326 | 2011-05-08 15:49:15 -0700 | [diff] [blame] | 58 | |
| 59 | #include <scsi/libsas.h> |
| 60 | #include "isci.h" |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 61 | #include "sas.h" |
| 62 | #include "phy.h" |
| 63 | |
| 64 | #define SCIC_SDS_DUMMY_PORT 0xFF |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 65 | |
Marcin Tomczak | 05b080f | 2012-01-04 01:33:41 -0800 | [diff] [blame] | 66 | #define PF_NOTIFY (1 << 0) |
| 67 | #define PF_RESUME (1 << 1) |
| 68 | |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 69 | struct isci_phy; |
| 70 | struct isci_host; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 71 | |
| 72 | enum isci_status { |
| 73 | isci_freed = 0x00, |
| 74 | isci_starting = 0x01, |
| 75 | isci_ready = 0x02, |
| 76 | isci_ready_for_io = 0x03, |
| 77 | isci_stopping = 0x04, |
| 78 | isci_stopped = 0x05, |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | /** |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 82 | * struct isci_port - isci direct attached sas port object |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 83 | * @ready_exit: several states constitute 'ready'. When exiting ready we |
| 84 | * need to take extra port-teardown actions that are |
| 85 | * skipped when exiting to another 'ready' state. |
| 86 | * @logical_port_index: software port index |
| 87 | * @physical_port_index: hardware port index |
| 88 | * @active_phy_mask: identifies phy members |
Marcin Tomczak | 05b080f | 2012-01-04 01:33:41 -0800 | [diff] [blame] | 89 | * @enabled_phy_mask: phy mask for the port |
| 90 | * that are already part of the port |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 91 | * @reserved_tag: |
| 92 | * @reserved_rni: reserver for port task scheduler workaround |
| 93 | * @started_request_count: reference count for outstanding commands |
| 94 | * @not_ready_reason: set during state transitions and notified |
| 95 | * @timer: timeout start/stop operations |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 96 | */ |
| 97 | struct isci_port { |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 98 | enum isci_status status; |
| 99 | struct isci_host *isci_host; |
| 100 | struct asd_sas_port sas_port; |
| 101 | struct list_head remote_dev_list; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 102 | spinlock_t state_lock; |
| 103 | struct list_head domain_dev_list; |
| 104 | struct completion start_complete; |
| 105 | struct completion hard_reset_complete; |
| 106 | enum sci_status hard_reset_status; |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 107 | struct sci_base_state_machine sm; |
| 108 | bool ready_exit; |
| 109 | u8 logical_port_index; |
| 110 | u8 physical_port_index; |
| 111 | u8 active_phy_mask; |
Marcin Tomczak | 05b080f | 2012-01-04 01:33:41 -0800 | [diff] [blame] | 112 | u8 enabled_phy_mask; |
Jeff Skirvin | 8e35a13 | 2011-10-27 15:05:32 -0700 | [diff] [blame] | 113 | u8 last_active_phy; |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 114 | u16 reserved_rni; |
| 115 | u16 reserved_tag; |
| 116 | u32 started_request_count; |
| 117 | u32 assigned_device_count; |
| 118 | u32 not_ready_reason; |
| 119 | struct isci_phy *phy_table[SCI_MAX_PHYS]; |
Dan Williams | d9dcb4b | 2011-06-30 17:38:32 -0700 | [diff] [blame] | 120 | struct isci_host *owning_controller; |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 121 | struct sci_timer timer; |
| 122 | struct scu_port_task_scheduler_registers __iomem *port_task_scheduler_registers; |
| 123 | /* XXX rework: only one register, no need to replicate per-port */ |
| 124 | u32 __iomem *port_pe_configuration_register; |
| 125 | struct scu_viit_entry __iomem *viit_registers; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 126 | }; |
| 127 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 128 | enum sci_port_not_ready_reason_code { |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 129 | SCIC_PORT_NOT_READY_NO_ACTIVE_PHYS, |
| 130 | SCIC_PORT_NOT_READY_HARD_RESET_REQUESTED, |
| 131 | SCIC_PORT_NOT_READY_INVALID_PORT_CONFIGURATION, |
| 132 | SCIC_PORT_NOT_READY_RECONFIGURING, |
| 133 | |
| 134 | SCIC_PORT_NOT_READY_REASON_CODE_MAX |
| 135 | }; |
| 136 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 137 | struct sci_port_end_point_properties { |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 138 | struct sci_sas_address sas_address; |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 139 | struct sci_phy_proto protocols; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 140 | }; |
| 141 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 142 | struct sci_port_properties { |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 143 | u32 index; |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 144 | struct sci_port_end_point_properties local; |
| 145 | struct sci_port_end_point_properties remote; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 146 | u32 phy_mask; |
| 147 | }; |
| 148 | |
| 149 | /** |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 150 | * enum sci_port_states - This enumeration depicts all the states for the |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 151 | * common port state machine. |
| 152 | * |
| 153 | * |
| 154 | */ |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 155 | enum sci_port_states { |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 156 | /** |
| 157 | * This state indicates that the port has successfully been stopped. |
| 158 | * In this state no new IO operations are permitted. |
| 159 | * This state is entered from the STOPPING state. |
| 160 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 161 | SCI_PORT_STOPPED, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 162 | |
| 163 | /** |
| 164 | * This state indicates that the port is in the process of stopping. |
| 165 | * In this state no new IO operations are permitted, but existing IO |
| 166 | * operations are allowed to complete. |
| 167 | * This state is entered from the READY state. |
| 168 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 169 | SCI_PORT_STOPPING, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 170 | |
| 171 | /** |
| 172 | * This state indicates the port is now ready. Thus, the user is |
| 173 | * able to perform IO operations on this port. |
| 174 | * This state is entered from the STARTING state. |
| 175 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 176 | SCI_PORT_READY, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 177 | |
| 178 | /** |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 179 | * The substate where the port is started and ready but has no |
| 180 | * active phys. |
| 181 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 182 | SCI_PORT_SUB_WAITING, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 183 | |
| 184 | /** |
| 185 | * The substate where the port is started and ready and there is |
| 186 | * at least one phy operational. |
| 187 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 188 | SCI_PORT_SUB_OPERATIONAL, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 189 | |
| 190 | /** |
| 191 | * The substate where the port is started and there was an |
| 192 | * add/remove phy event. This state is only used in Automatic |
| 193 | * Port Configuration Mode (APC) |
| 194 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 195 | SCI_PORT_SUB_CONFIGURING, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 196 | |
| 197 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 198 | * This state indicates the port is in the process of performing a hard |
| 199 | * reset. Thus, the user is unable to perform IO operations on this |
| 200 | * port. |
| 201 | * This state is entered from the READY state. |
| 202 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 203 | SCI_PORT_RESETTING, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 204 | |
| 205 | /** |
| 206 | * This state indicates the port has failed a reset request. This state |
| 207 | * is entered when a port reset request times out. |
| 208 | * This state is entered from the RESETTING state. |
| 209 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 210 | SCI_PORT_FAILED, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 211 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 212 | |
| 213 | }; |
| 214 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 215 | static inline void sci_port_decrement_request_count(struct isci_port *iport) |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 216 | { |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 217 | if (WARN_ONCE(iport->started_request_count == 0, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 218 | "%s: tried to decrement started_request_count past 0!?", |
| 219 | __func__)) |
| 220 | /* pass */; |
| 221 | else |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 222 | iport->started_request_count--; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 223 | } |
| 224 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 225 | #define sci_port_active_phy(port, phy) \ |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 226 | (((port)->active_phy_mask & (1 << (phy)->phy_index)) != 0) |
| 227 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 228 | void sci_port_construct( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 229 | struct isci_port *iport, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 230 | u8 port_index, |
Dan Williams | d9dcb4b | 2011-06-30 17:38:32 -0700 | [diff] [blame] | 231 | struct isci_host *ihost); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 232 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 233 | enum sci_status sci_port_start(struct isci_port *iport); |
| 234 | enum sci_status sci_port_stop(struct isci_port *iport); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 235 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 236 | enum sci_status sci_port_add_phy( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 237 | struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 238 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 239 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 240 | enum sci_status sci_port_remove_phy( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 241 | struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 242 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 243 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 244 | void sci_port_setup_transports( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 245 | struct isci_port *iport, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 246 | u32 device_id); |
| 247 | |
Jeff Skirvin | 61aaff4 | 2011-06-21 12:16:33 -0700 | [diff] [blame] | 248 | void isci_port_bcn_enable(struct isci_host *, struct isci_port *); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 249 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 250 | void sci_port_deactivate_phy( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 251 | struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 252 | struct isci_phy *iphy, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 253 | bool do_notify_user); |
| 254 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 255 | bool sci_port_link_detected( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 256 | struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 257 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 258 | |
Bartek Nowakowski | 7e62984 | 2012-01-04 01:33:20 -0800 | [diff] [blame] | 259 | enum sci_status sci_port_get_properties( |
| 260 | struct isci_port *iport, |
| 261 | struct sci_port_properties *prop); |
| 262 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 263 | enum sci_status sci_port_link_up(struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 264 | struct isci_phy *iphy); |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 265 | enum sci_status sci_port_link_down(struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 266 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 267 | |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 268 | struct isci_request; |
Dan Williams | 78a6f06 | 2011-06-30 16:31:37 -0700 | [diff] [blame] | 269 | struct isci_remote_device; |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 270 | enum sci_status sci_port_start_io( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 271 | struct isci_port *iport, |
Dan Williams | 78a6f06 | 2011-06-30 16:31:37 -0700 | [diff] [blame] | 272 | struct isci_remote_device *idev, |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 273 | struct isci_request *ireq); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 274 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 275 | enum sci_status sci_port_complete_io( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 276 | struct isci_port *iport, |
Dan Williams | 78a6f06 | 2011-06-30 16:31:37 -0700 | [diff] [blame] | 277 | struct isci_remote_device *idev, |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 278 | struct isci_request *ireq); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 279 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 280 | enum sas_linkrate sci_port_get_max_allowed_speed( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 281 | struct isci_port *iport); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 282 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 283 | void sci_port_broadcast_change_received( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 284 | struct isci_port *iport, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame] | 285 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 286 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 287 | bool sci_port_is_valid_phy_assignment( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 288 | struct isci_port *iport, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 289 | u32 phy_index); |
| 290 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 291 | void sci_port_get_sas_address( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 292 | struct isci_port *iport, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 293 | struct sci_sas_address *sas_address); |
| 294 | |
Dan Williams | 89a7301 | 2011-06-30 19:14:33 -0700 | [diff] [blame] | 295 | void sci_port_get_attached_sas_address( |
Dan Williams | ffe191c | 2011-06-29 13:09:25 -0700 | [diff] [blame] | 296 | struct isci_port *iport, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 297 | struct sci_sas_address *sas_address); |
| 298 | |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 299 | enum isci_status isci_port_get_state( |
| 300 | struct isci_port *isci_port); |
| 301 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 302 | void isci_port_formed(struct asd_sas_phy *); |
| 303 | void isci_port_deformed(struct asd_sas_phy *); |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 304 | |
| 305 | void isci_port_init( |
| 306 | struct isci_port *port, |
| 307 | struct isci_host *host, |
| 308 | int index); |
| 309 | |
Dan Williams | 4393aa4 | 2011-03-31 13:10:44 -0700 | [diff] [blame] | 310 | int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *iport, |
| 311 | struct isci_phy *iphy); |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 312 | #endif /* !defined(_ISCI_PORT_H_) */ |