Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Dan Williams and committed by
James Bottomley
26f2f199 b2311a28

+4 -4
+4 -4
drivers/scsi/libsas/sas_expander.c
··· 2114 2114 struct domain_device *dev = NULL; 2115 2115 2116 2116 res = sas_find_bcast_dev(port_dev, &dev); 2117 - if (res) 2118 - goto out; 2119 - if (dev) { 2117 + while (res == 0 && dev) { 2120 2118 struct expander_device *ex = &dev->ex_dev; 2121 2119 int i = 0, phy_id; 2122 2120 ··· 2126 2128 res = sas_rediscover(dev, phy_id); 2127 2129 i = phy_id + 1; 2128 2130 } while (i < ex->num_phys); 2131 + 2132 + dev = NULL; 2133 + res = sas_find_bcast_dev(port_dev, &dev); 2129 2134 } 2130 - out: 2131 2135 return res; 2132 2136 } 2133 2137