aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci/port.c')
-rw-r--r--drivers/scsi/isci/port.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index da0c4e1b9b30..2fb85bf75449 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -240,9 +240,32 @@ static void isci_port_link_down(struct isci_host *isci_host,
240 struct isci_phy *isci_phy, 240 struct isci_phy *isci_phy,
241 struct isci_port *isci_port) 241 struct isci_port *isci_port)
242{ 242{
243 struct isci_remote_device *isci_device;
244
243 dev_dbg(&isci_host->pdev->dev, 245 dev_dbg(&isci_host->pdev->dev,
244 "%s: isci_port = %p\n", __func__, isci_port); 246 "%s: isci_port = %p\n", __func__, isci_port);
245 247
248 if (isci_port) {
249
250 /* check to see if this is the last phy on this port. */
251 if (isci_phy->sas_phy.port &&
252 isci_phy->sas_phy.port->num_phys == 1) {
253 /* change the state for all devices on this port. The
254 * next task sent to this device will be returned as
255 * SAS_TASK_UNDELIVERED, and the scsi mid layer will
256 * remove the target
257 */
258 list_for_each_entry(isci_device,
259 &isci_port->remote_dev_list,
260 node) {
261 dev_dbg(&isci_host->pdev->dev,
262 "%s: isci_device = %p\n",
263 __func__, isci_device);
264 set_bit(IDEV_GONE, &isci_device->flags);
265 }
266 }
267 }
268
246 /* Notify libsas of the borken link, this will trigger calls to our 269 /* Notify libsas of the borken link, this will trigger calls to our
247 * isci_port_deformed and isci_dev_gone functions. 270 * isci_port_deformed and isci_dev_gone functions.
248 */ 271 */