diff options
| -rw-r--r-- | drivers/scsi/libsas/sas_discover.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index 62b58d38ce2e..60de66252fa2 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
| @@ -500,6 +500,7 @@ static void sas_revalidate_domain(struct work_struct *work) | |||
| 500 | struct sas_discovery_event *ev = to_sas_discovery_event(work); | 500 | struct sas_discovery_event *ev = to_sas_discovery_event(work); |
| 501 | struct asd_sas_port *port = ev->port; | 501 | struct asd_sas_port *port = ev->port; |
| 502 | struct sas_ha_struct *ha = port->ha; | 502 | struct sas_ha_struct *ha = port->ha; |
| 503 | struct domain_device *ddev = port->port_dev; | ||
| 503 | 504 | ||
| 504 | /* prevent revalidation from finding sata links in recovery */ | 505 | /* prevent revalidation from finding sata links in recovery */ |
| 505 | mutex_lock(&ha->disco_mutex); | 506 | mutex_lock(&ha->disco_mutex); |
| @@ -514,8 +515,9 @@ static void sas_revalidate_domain(struct work_struct *work) | |||
| 514 | SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id, | 515 | SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id, |
| 515 | task_pid_nr(current)); | 516 | task_pid_nr(current)); |
| 516 | 517 | ||
| 517 | if (port->port_dev) | 518 | if (ddev && (ddev->dev_type == SAS_FANOUT_EXPANDER_DEVICE || |
| 518 | res = sas_ex_revalidate_domain(port->port_dev); | 519 | ddev->dev_type == SAS_EDGE_EXPANDER_DEVICE)) |
| 520 | res = sas_ex_revalidate_domain(ddev); | ||
| 519 | 521 | ||
| 520 | SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n", | 522 | SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n", |
| 521 | port->id, task_pid_nr(current), res); | 523 | port->id, task_pid_nr(current), res); |
