[PATCH 2/3] usb: usb_hub_port_connect_change(): Remove unnecessary delays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove two mdelay(200) calls from usb_hub_port_connect_change() before
and after calling hub_port_reset().

These delays don't seem to be necessary since hub_port_reset() already
incorporates delays on its own.

Without patch:

    $ time usb
    usb: USB: scanning bus for devices...
    usb: 17 USB Device(s) found
    time: 16355ms

With patch:

    $ time usb
    usb: USB: scanning bus for devices...
    usb: 17 USB Device(s) found
    time: 10344ms

Delta: ~6 seconds

Signed-off-by: Primoz Fiser <primoz.fiser@xxxxxxxxx>
---
 drivers/usb/core/hub.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 91604e1ef..7de6aedc4 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -211,8 +211,6 @@ static void usb_hub_port_connect_change(struct usb_device *dev, int port)
 	if (dev->children[port] && !(portstatus & USB_PORT_STAT_ENABLE))
 		usb_remove_device(dev->children[port]);
 
-	mdelay(200);
-
 	/* Allocate a new device struct for the port */
 	usb = usb_alloc_new_device();
 	usb->dev.parent = &dev->dev;
@@ -225,8 +223,6 @@ static void usb_hub_port_connect_change(struct usb_device *dev, int port)
 		return;
 	}
 
-	mdelay(200);
-
 	dev->children[port] = usb;
 	usb->parent = dev;
 	usb->portnr = port + 1;
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux