[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>
This commit is contained in:

committed by
James Bottomley

parent
50824d6c56
commit
36a3994739
@@ -125,7 +125,11 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
|
||||
task->task_status.stat == SAS_DATA_OVERRUN) {
|
||||
res = -EMSGSIZE;
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
if (task->task_status.resp == SAS_TASK_UNDELIVERED &&
|
||||
task->task_status.stat == SAS_DEVICE_UNKNOWN)
|
||||
break;
|
||||
else {
|
||||
SAS_DPRINTK("%s: task to dev %016llx response: 0x%x "
|
||||
"status 0x%x\n", __func__,
|
||||
SAS_ADDR(dev->sas_addr),
|
||||
@@ -1648,8 +1652,8 @@ static int sas_get_phy_change_count(struct domain_device *dev,
|
||||
return res;
|
||||
}
|
||||
|
||||
static int sas_get_phy_attached_sas_addr(struct domain_device *dev,
|
||||
int phy_id, u8 *attached_sas_addr)
|
||||
int sas_get_phy_attached_sas_addr(struct domain_device *dev, int phy_id,
|
||||
u8 *attached_sas_addr)
|
||||
{
|
||||
int res;
|
||||
struct smp_resp *disc_resp;
|
||||
|
Reference in New Issue
Block a user