diff options
author | Dan Williams <dan.j.williams@intel.com> | 2012-06-22 02:36:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-09 11:27:34 -0400 |
commit | 2da74cd8a6bad64d02207396c76d0939f3c57aaa (patch) | |
tree | 2885d537876676708670bbc58268f6016239636b /drivers/scsi | |
parent | c43386c06d5d73a9b3a8604226b1e32d85a4c384 (diff) |
SCSI: libsas: continue revalidation
commit 26f2f199ff150d8876b2641c41e60d1c92d2fb81 upstream.
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.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index e68fac69504..e8ebe688326 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -1972,9 +1972,7 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev) | |||
1972 | struct domain_device *dev = NULL; | 1972 | struct domain_device *dev = NULL; |
1973 | 1973 | ||
1974 | res = sas_find_bcast_dev(port_dev, &dev); | 1974 | res = sas_find_bcast_dev(port_dev, &dev); |
1975 | if (res) | 1975 | while (res == 0 && dev) { |
1976 | goto out; | ||
1977 | if (dev) { | ||
1978 | struct expander_device *ex = &dev->ex_dev; | 1976 | struct expander_device *ex = &dev->ex_dev; |
1979 | int i = 0, phy_id; | 1977 | int i = 0, phy_id; |
1980 | 1978 | ||
@@ -1986,8 +1984,10 @@ int sas_ex_revalidate_domain(struct domain_device *port_dev) | |||
1986 | res = sas_rediscover(dev, phy_id); | 1984 | res = sas_rediscover(dev, phy_id); |
1987 | i = phy_id + 1; | 1985 | i = phy_id + 1; |
1988 | } while (i < ex->num_phys); | 1986 | } while (i < ex->num_phys); |
1987 | |||
1988 | dev = NULL; | ||
1989 | res = sas_find_bcast_dev(port_dev, &dev); | ||
1989 | } | 1990 | } |
1990 | out: | ||
1991 | return res; | 1991 | return res; |
1992 | } | 1992 | } |
1993 | 1993 | ||