summaryrefslogtreecommitdiffstats
path: root/include/linux/enclosure.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2009-08-01 00:39:36 +0000
committerJames Bottomley <James.Bottomley@suse.de>2009-08-22 17:52:13 -0500
commit163f52b6cf3a639df6a72c7937e0eb88b20f1ef3 (patch)
tree68991096e7ff15e31db28fb0d7bf2e87b1bd01c2 /include/linux/enclosure.h
parent0124ca9d8ee58b3cd028a23cef2fe225fcfee3b8 (diff)
downloadop-kernel-dev-163f52b6cf3a639df6a72c7937e0eb88b20f1ef3.zip
op-kernel-dev-163f52b6cf3a639df6a72c7937e0eb88b20f1ef3.tar.gz
[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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h
index 4332442..d77811e 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);
OpenPOWER on IntegriCloud