[SCSI] libsas: continue revalidation
Continue running revalidation until no more broadcast devices are discovered. Fixes cases where re-discovery completes too early in a domain with multiple expanders with pending re-discovery events. Servicing BCNs can get backed up behind error recovery. Cc: <stable@vger.kernel.org> 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
b2311a2875
commit
26f2f199ff
@@ -2114,9 +2114,7 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev)
|
|||||||
struct domain_device *dev = NULL;
|
struct domain_device *dev = NULL;
|
||||||
|
|
||||||
res = sas_find_bcast_dev(port_dev, &dev);
|
res = sas_find_bcast_dev(port_dev, &dev);
|
||||||
if (res)
|
while (res == 0 && dev) {
|
||||||
goto out;
|
|
||||||
if (dev) {
|
|
||||||
struct expander_device *ex = &dev->ex_dev;
|
struct expander_device *ex = &dev->ex_dev;
|
||||||
int i = 0, phy_id;
|
int i = 0, phy_id;
|
||||||
|
|
||||||
@@ -2128,8 +2126,10 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev)
|
|||||||
res = sas_rediscover(dev, phy_id);
|
res = sas_rediscover(dev, phy_id);
|
||||||
i = phy_id + 1;
|
i = phy_id + 1;
|
||||||
} while (i < ex->num_phys);
|
} while (i < ex->num_phys);
|
||||||
|
|
||||||
|
dev = NULL;
|
||||||
|
res = sas_find_bcast_dev(port_dev, &dev);
|
||||||
}
|
}
|
||||||
out:
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user