diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-08-01 00:39:36 +0000 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 17:52:13 -0500 |
commit | 163f52b6cf3a639df6a72c7937e0eb88b20f1ef3 (patch) | |
tree | 68991096e7ff15e31db28fb0d7bf2e87b1bd01c2 /include/linux/enclosure.h | |
parent | 0124ca9d8ee58b3cd028a23cef2fe225fcfee3b8 (diff) | |
download | linux-stable-163f52b6cf3a639df6a72c7937e0eb88b20f1ef3.tar.gz linux-stable-163f52b6cf3a639df6a72c7937e0eb88b20f1ef3.tar.bz2 linux-stable-163f52b6cf3a639df6a72c7937e0eb88b20f1ef3.zip |
[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>
Diffstat (limited to 'include/linux/enclosure.h')
-rw-r--r-- | include/linux/enclosure.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h index 4332442b1b57..d77811e9ed84 100644 --- a/include/linux/enclosure.h +++ b/include/linux/enclosure.h @@ -123,7 +123,8 @@ enclosure_component_register(struct enclosure_device *, unsigned int, int enclosure_add_device(struct enclosure_device *enclosure, int component, struct device *dev); int enclosure_remove_device(struct enclosure_device *enclosure, int component); -struct enclosure_device *enclosure_find(struct device *dev); +struct enclosure_device *enclosure_find(struct device *dev, + struct enclosure_device *start); int enclosure_for_each_device(int (*fn)(struct enclosure_device *, void *), void *data); |