Commit 47af5518 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky

[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: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent d23861ff
...@@ -687,8 +687,20 @@ io_subchannel_register(void *data) ...@@ -687,8 +687,20 @@ io_subchannel_register(void *data)
cdev = data; cdev = data;
sch = to_subchannel(cdev->dev.parent); 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)) { 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; goto out;
} }
/* make it known to the system */ /* make it known to the system */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment