diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-11-17 20:59:54 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 13:49:36 -0500 |
commit | 36a399473902a57218dc493c5a814708a56b73ab (patch) | |
tree | e64a9f136bbacaded9fdd3d3d39c342953d9be34 /drivers/scsi/libsas/sas_expander.c | |
parent | 50824d6c5657ce340e3911171865a8d99fdd8eba (diff) |
[SCSI] libsas: poll for ata device readiness after reset
Use ata_wait_after_reset() to poll for link recovery after a reset.
This combined with sas_ha->eh_mutex prevents expander rediscovery from
probing phys in an intermediate state. Local discovery does not have a
mechanism to filter link status changes during this timeout, so it
remains the responsibility of lldds to prevent premature port teardown.
Although once all lldd's support ->lldd_ata_check_ready() that could be
used as a gate to local port teardown.
The signature fis is re-transmitted when the link comes back so we
should be revalidating the ata device class, but that is left to a future
patch.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_expander.c')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 7c59f97c0287..32e417e6c2f7 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -125,7 +125,11 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size, | |||
125 | task->task_status.stat == SAS_DATA_OVERRUN) { | 125 | task->task_status.stat == SAS_DATA_OVERRUN) { |
126 | res = -EMSGSIZE; | 126 | res = -EMSGSIZE; |
127 | break; | 127 | break; |
128 | } else { | 128 | } |
129 | if (task->task_status.resp == SAS_TASK_UNDELIVERED && | ||
130 | task->task_status.stat == SAS_DEVICE_UNKNOWN) | ||
131 | break; | ||
132 | else { | ||
129 | SAS_DPRINTK("%s: task to dev %016llx response: 0x%x " | 133 | SAS_DPRINTK("%s: task to dev %016llx response: 0x%x " |
130 | "status 0x%x\n", __func__, | 134 | "status 0x%x\n", __func__, |
131 | SAS_ADDR(dev->sas_addr), | 135 | SAS_ADDR(dev->sas_addr), |
@@ -1648,8 +1652,8 @@ static int sas_get_phy_change_count(struct domain_device *dev, | |||
1648 | return res; | 1652 | return res; |
1649 | } | 1653 | } |
1650 | 1654 | ||
1651 | static int sas_get_phy_attached_sas_addr(struct domain_device *dev, | 1655 | int sas_get_phy_attached_sas_addr(struct domain_device *dev, int phy_id, |
1652 | int phy_id, u8 *attached_sas_addr) | 1656 | u8 *attached_sas_addr) |
1653 | { | 1657 | { |
1654 | int res; | 1658 | int res; |
1655 | struct smp_resp *disc_resp; | 1659 | struct smp_resp *disc_resp; |