Commit 47af5518526d435d0d56a329a578f240e86eb678

Authored by Cornelia Huck
Committed by Martin Schwidefsky
1 parent d23861ff1a

[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>

Showing 1 changed file with 13 additions and 1 deletions Side-by-side Diff

drivers/s390/cio/device.c
... ... @@ -687,8 +687,20 @@
687 687 cdev = data;
688 688 sch = to_subchannel(cdev->dev.parent);
689 689  
  690 + /*
  691 + * io_subchannel_register() will also be called after device
  692 + * recognition has been done for a boxed device (which will already
  693 + * be registered). We need to reprobe since we may now have sense id
  694 + * information.
  695 + */
690 696 if (klist_node_attached(&cdev->dev.knode_parent)) {
691   - bus_rescan_devices(&ccw_bus_type);
  697 + if (!cdev->drv) {
  698 + ret = device_reprobe(&cdev->dev);
  699 + if (ret)
  700 + /* We can't do much here. */
  701 + dev_info(&cdev->dev, "device_reprobe() returned"
  702 + " %d\n", ret);
  703 + }
692 704 goto out;
693 705 }
694 706 /* make it known to the system */