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 | |
| 66 | struct isci_phy; |
| 67 | struct isci_host; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 68 | |
| 69 | enum isci_status { |
| 70 | isci_freed = 0x00, |
| 71 | isci_starting = 0x01, |
| 72 | isci_ready = 0x02, |
| 73 | isci_ready_for_io = 0x03, |
| 74 | isci_stopping = 0x04, |
| 75 | isci_stopped = 0x05, |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 76 | }; |
| 77 | |
| 78 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 79 | * struct scic_sds_port |
| 80 | * |
| 81 | * The core port object provides the the abstraction for an SCU port. |
| 82 | */ |
| 83 | struct scic_sds_port { |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 84 | /** |
| 85 | * This field contains the information for the base port state machine. |
| 86 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 87 | struct sci_base_state_machine sm; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 88 | |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 89 | bool ready_exit; |
| 90 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 91 | /** |
| 92 | * This field is the port index that is reported to the SCI USER. |
| 93 | * This allows the actual hardware physical port to change without |
| 94 | * the SCI USER getting a different answer for the get port index. |
| 95 | */ |
| 96 | u8 logical_port_index; |
| 97 | |
| 98 | /** |
| 99 | * This field is the port index used to program the SCU hardware. |
| 100 | */ |
| 101 | u8 physical_port_index; |
| 102 | |
| 103 | /** |
| 104 | * This field contains the active phy mask for the port. |
| 105 | * This mask is used in conjunction with the phy state to determine |
| 106 | * which phy to select for some port operations. |
| 107 | */ |
| 108 | u8 active_phy_mask; |
| 109 | |
| 110 | u16 reserved_rni; |
Dan Williams | 312e0c2 | 2011-06-28 13:47:09 -0700 | [diff] [blame] | 111 | u16 reserved_tag; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 112 | |
| 113 | /** |
| 114 | * This field contains the count of the io requests started on this port |
| 115 | * object. It is used to control controller shutdown. |
| 116 | */ |
| 117 | u32 started_request_count; |
| 118 | |
| 119 | /** |
| 120 | * This field contains the number of devices assigned to this port. |
| 121 | * It is used to control port start requests. |
| 122 | */ |
| 123 | u32 assigned_device_count; |
| 124 | |
| 125 | /** |
| 126 | * This field contains the reason for the port not going ready. It is |
| 127 | * assigned in the state handlers and used in the state transition. |
| 128 | */ |
| 129 | u32 not_ready_reason; |
| 130 | |
| 131 | /** |
| 132 | * This field is the table of phys assigned to the port. |
| 133 | */ |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 134 | struct isci_phy *phy_table[SCI_MAX_PHYS]; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 135 | |
| 136 | /** |
| 137 | * This field is a pointer back to the controller that owns this |
| 138 | * port object. |
| 139 | */ |
| 140 | struct scic_sds_controller *owning_controller; |
| 141 | |
Edmund Nadolski | 5553ba2 | 2011-05-19 11:59:10 +0000 | [diff] [blame] | 142 | /* timer used for port start/stop operations */ |
| 143 | struct sci_timer timer; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 144 | |
| 145 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 146 | * This field is the pointer to the port task scheduler registers |
| 147 | * for the SCU hardware. |
| 148 | */ |
| 149 | struct scu_port_task_scheduler_registers __iomem |
| 150 | *port_task_scheduler_registers; |
| 151 | |
| 152 | /** |
| 153 | * This field is identical for all port objects and points to the port |
| 154 | * task scheduler group PE configuration registers. |
| 155 | * It is used to assign PEs to a port. |
| 156 | */ |
| 157 | u32 __iomem *port_pe_configuration_register; |
| 158 | |
| 159 | /** |
| 160 | * This field is the VIIT register space for ths port object. |
| 161 | */ |
| 162 | struct scu_viit_entry __iomem *viit_registers; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 163 | }; |
| 164 | |
| 165 | |
| 166 | |
| 167 | /** |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 168 | * struct isci_port - This class represents the port object used to internally |
| 169 | * represent libsas port objects. It also keeps a list of remote device |
| 170 | * objects. |
| 171 | * |
| 172 | * |
| 173 | */ |
| 174 | struct isci_port { |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 175 | enum isci_status status; |
Jeff Skirvin | 61aaff4 | 2011-06-21 12:16:33 -0700 | [diff] [blame] | 176 | #define IPORT_BCN_BLOCKED 0 |
| 177 | #define IPORT_BCN_PENDING 1 |
| 178 | unsigned long flags; |
| 179 | atomic_t event; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 180 | struct isci_host *isci_host; |
| 181 | struct asd_sas_port sas_port; |
| 182 | struct list_head remote_dev_list; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 183 | spinlock_t state_lock; |
| 184 | struct list_head domain_dev_list; |
| 185 | struct completion start_complete; |
| 186 | struct completion hard_reset_complete; |
| 187 | enum sci_status hard_reset_status; |
Dan Williams | e531381 | 2011-05-07 10:11:43 -0700 | [diff] [blame] | 188 | struct scic_sds_port sci; |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 189 | }; |
| 190 | |
Dan Williams | e531381 | 2011-05-07 10:11:43 -0700 | [diff] [blame] | 191 | static inline struct isci_port *sci_port_to_iport(struct scic_sds_port *sci_port) |
| 192 | { |
| 193 | struct isci_port *iport = container_of(sci_port, typeof(*iport), sci); |
| 194 | |
| 195 | return iport; |
| 196 | } |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 197 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 198 | enum scic_port_not_ready_reason_code { |
| 199 | SCIC_PORT_NOT_READY_NO_ACTIVE_PHYS, |
| 200 | SCIC_PORT_NOT_READY_HARD_RESET_REQUESTED, |
| 201 | SCIC_PORT_NOT_READY_INVALID_PORT_CONFIGURATION, |
| 202 | SCIC_PORT_NOT_READY_RECONFIGURING, |
| 203 | |
| 204 | SCIC_PORT_NOT_READY_REASON_CODE_MAX |
| 205 | }; |
| 206 | |
| 207 | struct scic_port_end_point_properties { |
| 208 | struct sci_sas_address sas_address; |
| 209 | struct scic_phy_proto protocols; |
| 210 | }; |
| 211 | |
| 212 | struct scic_port_properties { |
| 213 | u32 index; |
| 214 | struct scic_port_end_point_properties local; |
| 215 | struct scic_port_end_point_properties remote; |
| 216 | u32 phy_mask; |
| 217 | }; |
| 218 | |
| 219 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 220 | * enum scic_sds_port_states - This enumeration depicts all the states for the |
| 221 | * common port state machine. |
| 222 | * |
| 223 | * |
| 224 | */ |
| 225 | enum scic_sds_port_states { |
| 226 | /** |
| 227 | * This state indicates that the port has successfully been stopped. |
| 228 | * In this state no new IO operations are permitted. |
| 229 | * This state is entered from the STOPPING state. |
| 230 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 231 | SCI_PORT_STOPPED, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 232 | |
| 233 | /** |
| 234 | * This state indicates that the port is in the process of stopping. |
| 235 | * In this state no new IO operations are permitted, but existing IO |
| 236 | * operations are allowed to complete. |
| 237 | * This state is entered from the READY state. |
| 238 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 239 | SCI_PORT_STOPPING, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 240 | |
| 241 | /** |
| 242 | * This state indicates the port is now ready. Thus, the user is |
| 243 | * able to perform IO operations on this port. |
| 244 | * This state is entered from the STARTING state. |
| 245 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 246 | SCI_PORT_READY, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 247 | |
| 248 | /** |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 249 | * The substate where the port is started and ready but has no |
| 250 | * active phys. |
| 251 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 252 | SCI_PORT_SUB_WAITING, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 253 | |
| 254 | /** |
| 255 | * The substate where the port is started and ready and there is |
| 256 | * at least one phy operational. |
| 257 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 258 | SCI_PORT_SUB_OPERATIONAL, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 259 | |
| 260 | /** |
| 261 | * The substate where the port is started and there was an |
| 262 | * add/remove phy event. This state is only used in Automatic |
| 263 | * Port Configuration Mode (APC) |
| 264 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 265 | SCI_PORT_SUB_CONFIGURING, |
Piotr Sawicki | e91f41e | 2011-05-11 23:52:21 +0000 | [diff] [blame] | 266 | |
| 267 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 268 | * This state indicates the port is in the process of performing a hard |
| 269 | * reset. Thus, the user is unable to perform IO operations on this |
| 270 | * port. |
| 271 | * This state is entered from the READY state. |
| 272 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 273 | SCI_PORT_RESETTING, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 274 | |
| 275 | /** |
| 276 | * This state indicates the port has failed a reset request. This state |
| 277 | * is entered when a port reset request times out. |
| 278 | * This state is entered from the RESETTING state. |
| 279 | */ |
Edmund Nadolski | e301370 | 2011-06-02 00:10:43 +0000 | [diff] [blame] | 280 | SCI_PORT_FAILED, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 281 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 282 | |
| 283 | }; |
| 284 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 285 | /** |
| 286 | * scic_sds_port_get_controller() - |
| 287 | * |
| 288 | * Helper macro to get the owning controller of this port |
| 289 | */ |
| 290 | #define scic_sds_port_get_controller(this_port) \ |
| 291 | ((this_port)->owning_controller) |
| 292 | |
| 293 | /** |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 294 | * scic_sds_port_get_index() - |
| 295 | * |
| 296 | * This macro returns the physical port index for this port object |
| 297 | */ |
| 298 | #define scic_sds_port_get_index(this_port) \ |
| 299 | ((this_port)->physical_port_index) |
| 300 | |
| 301 | |
| 302 | static inline void scic_sds_port_decrement_request_count(struct scic_sds_port *sci_port) |
| 303 | { |
| 304 | if (WARN_ONCE(sci_port->started_request_count == 0, |
| 305 | "%s: tried to decrement started_request_count past 0!?", |
| 306 | __func__)) |
| 307 | /* pass */; |
| 308 | else |
| 309 | sci_port->started_request_count--; |
| 310 | } |
| 311 | |
| 312 | #define scic_sds_port_active_phy(port, phy) \ |
| 313 | (((port)->active_phy_mask & (1 << (phy)->phy_index)) != 0) |
| 314 | |
| 315 | void scic_sds_port_construct( |
| 316 | struct scic_sds_port *sci_port, |
| 317 | u8 port_index, |
| 318 | struct scic_sds_controller *scic); |
| 319 | |
| 320 | enum sci_status scic_sds_port_initialize( |
| 321 | struct scic_sds_port *sci_port, |
| 322 | void __iomem *port_task_scheduler_registers, |
| 323 | void __iomem *port_configuration_regsiter, |
| 324 | void __iomem *viit_registers); |
| 325 | |
Piotr Sawicki | d76f71d | 2011-05-11 23:52:26 +0000 | [diff] [blame] | 326 | enum sci_status scic_sds_port_start(struct scic_sds_port *sci_port); |
Piotr Sawicki | 8bc80d3 | 2011-05-11 23:52:31 +0000 | [diff] [blame] | 327 | enum sci_status scic_sds_port_stop(struct scic_sds_port *sci_port); |
Piotr Sawicki | d76f71d | 2011-05-11 23:52:26 +0000 | [diff] [blame] | 328 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 329 | enum sci_status scic_sds_port_add_phy( |
| 330 | struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 331 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 332 | |
| 333 | enum sci_status scic_sds_port_remove_phy( |
| 334 | struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 335 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 336 | |
| 337 | void scic_sds_port_setup_transports( |
| 338 | struct scic_sds_port *sci_port, |
| 339 | u32 device_id); |
| 340 | |
Jeff Skirvin | 61aaff4 | 2011-06-21 12:16:33 -0700 | [diff] [blame] | 341 | void isci_port_bcn_enable(struct isci_host *, struct isci_port *); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 342 | |
| 343 | void scic_sds_port_deactivate_phy( |
| 344 | struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 345 | struct isci_phy *iphy, |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 346 | bool do_notify_user); |
| 347 | |
| 348 | bool scic_sds_port_link_detected( |
| 349 | struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 350 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 351 | |
Piotr Sawicki | 051266c | 2011-05-12 19:10:14 +0000 | [diff] [blame] | 352 | enum sci_status scic_sds_port_link_up(struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 353 | struct isci_phy *iphy); |
Piotr Sawicki | 051266c | 2011-05-12 19:10:14 +0000 | [diff] [blame] | 354 | enum sci_status scic_sds_port_link_down(struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 355 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 356 | |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 357 | struct isci_request; |
Dan Williams | 6813820 | 2011-05-12 07:16:06 -0700 | [diff] [blame] | 358 | struct scic_sds_remote_device; |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 359 | enum sci_status scic_sds_port_start_io( |
| 360 | struct scic_sds_port *sci_port, |
| 361 | struct scic_sds_remote_device *sci_dev, |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 362 | struct isci_request *ireq); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 363 | |
| 364 | enum sci_status scic_sds_port_complete_io( |
| 365 | struct scic_sds_port *sci_port, |
| 366 | struct scic_sds_remote_device *sci_dev, |
Dan Williams | 5076a1a | 2011-06-27 14:57:03 -0700 | [diff] [blame] | 367 | struct isci_request *ireq); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 368 | |
| 369 | enum sas_linkrate scic_sds_port_get_max_allowed_speed( |
| 370 | struct scic_sds_port *sci_port); |
| 371 | |
| 372 | void scic_sds_port_broadcast_change_received( |
| 373 | struct scic_sds_port *sci_port, |
Dan Williams | 8528095 | 2011-06-28 15:05:53 -0700 | [diff] [blame^] | 374 | struct isci_phy *iphy); |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 375 | |
| 376 | bool scic_sds_port_is_valid_phy_assignment( |
| 377 | struct scic_sds_port *sci_port, |
| 378 | u32 phy_index); |
| 379 | |
| 380 | void scic_sds_port_get_sas_address( |
| 381 | struct scic_sds_port *sci_port, |
| 382 | struct sci_sas_address *sas_address); |
| 383 | |
| 384 | void scic_sds_port_get_attached_sas_address( |
| 385 | struct scic_sds_port *sci_port, |
| 386 | struct sci_sas_address *sas_address); |
| 387 | |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 388 | enum isci_status isci_port_get_state( |
| 389 | struct isci_port *isci_port); |
| 390 | |
Dan Williams | e2f8db5 | 2011-05-10 02:28:46 -0700 | [diff] [blame] | 391 | void isci_port_formed(struct asd_sas_phy *); |
| 392 | void isci_port_deformed(struct asd_sas_phy *); |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 393 | |
| 394 | void isci_port_init( |
| 395 | struct isci_port *port, |
| 396 | struct isci_host *host, |
| 397 | int index); |
| 398 | |
Dan Williams | 4393aa4 | 2011-03-31 13:10:44 -0700 | [diff] [blame] | 399 | int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *iport, |
| 400 | struct isci_phy *iphy); |
Dan Williams | 6f231dd | 2011-07-02 22:56:22 -0700 | [diff] [blame] | 401 | #endif /* !defined(_ISCI_PORT_H_) */ |