]> git.karo-electronics.de Git - karo-tx-linux.git/commit
libsas: fix failure to revalidate domain for anything but the first expander child.
authorMark Salyzyn <mark_salyzyn@us.xyratex.com>
Thu, 1 Sep 2011 13:11:17 +0000 (06:11 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:41:10 +0000 (11:41 -0700)
commitc4c672cbd49785be16bcd46fe550b5877ae53ed0
tree6a1a6bf5258b7e58986c651b2e9e1ec3d6ccc61d
parente8cb517e6f6a5c8a1070f758c83b6a1cdd674e82
libsas: fix failure to revalidate domain for anything but the first expander child.

commit 24926dadc41cc566e974022b0e66231b82c6375f upstream.

In an enclosure model where there are chaining expanders to a large body
of storage, it was discovered that libsas, responding to a broadcast
event change, would only revalidate the domain of first child expander
in the list.

The issue is that the pointer value to the discovered source device was
used to break out of the loop, rather than the content of the pointer.

This still remains non-compliant as the revalidate domain code is
supposed to loop through all child expanders, and not stop at the first
one it finds that reports a change count. However, the design of this
routine does not allow multiple device discoveries and that would be a
more complicated set of patches reserved for another day. We are fixing
the glaring bug rather than refactoring the code.

Signed-off-by: Mark Salyzyn <msalyzyn@us.xyratex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/libsas/sas_expander.c