summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrimoz Fiser <primoz.fiser@norik.com>2019-10-01 10:17:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-10-02 08:58:10 +0200
commit548625a35077a9b7b5d6c468e26e2cdeb644e80d (patch)
tree68aac2241087e9689b038b05f13bd9e5e3e57870
parent3cb8f32cf5b27edf41b21f1733c8443d06826c50 (diff)
downloadbarebox-548625a35077a9b7b5d6c468e26e2cdeb644e80d.tar.gz
barebox-548625a35077a9b7b5d6c468e26e2cdeb644e80d.tar.xz
usb: usb_hub_port_connect_change(): Remove unnecessary delays
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@norik.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/usb/core/hub.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 91604e1ef5..7de6aedc45 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;