[SCSI] ses: fix hotplug with multiple devices and expanders
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 1 Aug 2009 00:39:36 +0000 (00:39 +0000)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:13 +0000 (17:52 -0500)
commit163f52b6cf3a639df6a72c7937e0eb88b20f1ef3
tree68991096e7ff15e31db28fb0d7bf2e87b1bd01c2
parent0124ca9d8ee58b3cd028a23cef2fe225fcfee3b8
[SCSI] ses: fix hotplug with multiple devices and expanders

In a situation either with expanders or with multiple enclosure
devices, hot add doesn't always work.  This is because we try to find
a single enclosure device attached to the host.  Fix this by looping
over all enclosure devices attached to the host and also by making the
find loop recognise that the enclosure devices may be expander remote
(i.e. not parented by the host).

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/misc/enclosure.c
drivers/scsi/ses.c
include/linux/enclosure.h