* [S390] cio: Use device_reprobe() instead of bus_rescan_devices().
@ 2006-12-04 14:57 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-12-04 14:57 UTC (permalink / raw)
To: linux-kernel, cornelia.huck
From: Cornelia Huck <cornelia.huck@de.ibm.com>
[S390] cio: Use device_reprobe() instead of bus_rescan_devices().
In io_subchannel_register(), it is better to just reprobe the current
device if it hasn't a driver yet than to rescan the whole bus.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/device.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletion(-)
diff -urpN linux-2.6/drivers/s390/cio/device.c linux-2.6-patched/drivers/s390/cio/device.c
--- linux-2.6/drivers/s390/cio/device.c 2006-12-04 14:51:06.000000000 +0100
+++ linux-2.6-patched/drivers/s390/cio/device.c 2006-12-04 14:51:06.000000000 +0100
@@ -687,8 +687,20 @@ io_subchannel_register(void *data)
cdev = data;
sch = to_subchannel(cdev->dev.parent);
+ /*
+ * io_subchannel_register() will also be called after device
+ * recognition has been done for a boxed device (which will already
+ * be registered). We need to reprobe since we may now have sense id
+ * information.
+ */
if (klist_node_attached(&cdev->dev.knode_parent)) {
- bus_rescan_devices(&ccw_bus_type);
+ if (!cdev->drv) {
+ ret = device_reprobe(&cdev->dev);
+ if (ret)
+ /* We can't do much here. */
+ dev_info(&cdev->dev, "device_reprobe() returned"
+ " %d\n", ret);
+ }
goto out;
}
/* make it known to the system */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-04 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 14:57 [S390] cio: Use device_reprobe() instead of bus_rescan_devices() Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox