Skip to content

Commit

Permalink
[S390] cio: Use device_reprobe() instead of bus_rescan_devices().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Dec 4, 2006
1 parent d23861f commit 47af551
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 47af551

Please sign in to comment.