diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-07-31 20:39:36 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:52:13 -0400 |
commit | 163f52b6cf3a639df6a72c7937e0eb88b20f1ef3 (patch) | |
tree | 68991096e7ff15e31db28fb0d7bf2e87b1bd01c2 /include/linux/enclosure.h | |
parent | 0124ca9d8ee58b3cd028a23cef2fe225fcfee3b8 (diff) |
[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, | |||
123 | int enclosure_add_device(struct enclosure_device *enclosure, int component, | 123 | int enclosure_add_device(struct enclosure_device *enclosure, int component, |
124 | struct device *dev); | 124 | struct device *dev); |
125 | int enclosure_remove_device(struct enclosure_device *enclosure, int component); | 125 | int enclosure_remove_device(struct enclosure_device *enclosure, int component); |
126 | struct enclosure_device *enclosure_find(struct device *dev); | 126 | struct enclosure_device *enclosure_find(struct device *dev, |
127 | struct enclosure_device *start); | ||
127 | int enclosure_for_each_device(int (*fn)(struct enclosure_device *, void *), | 128 | int enclosure_for_each_device(int (*fn)(struct enclosure_device *, void *), |
128 | void *data); | 129 | void *data); |
129 | 130 | ||