Discussion:
[PATCH 1/1] usb: core: need to call usb_phy_notify_connect after device setup
Peter Chen
2014-10-17 11:35:57 UTC
Permalink
From: Tony Zheng <Tony.Zheng-***@public.gmane.org>

Since we notify disconnecting based on the usb device is existed
(port_dev->child, the child device at roothub is not NULL), we
need to notify connect after device has been registered.

This fixes a bug that do fast plug in/out test, and the notify_disconnect
is not called due to roothub child is NULL and the enumeration has failed.

Cc: v3.17: stable-***@public.gmane.org
Signed-off-by: Tony Zheng <Tony.Zheng-***@public.gmane.org>
Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
---
drivers/usb/core/hub.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 11e80ac..b063688 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4468,9 +4468,6 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
if (retval)
goto fail;

- if (hcd->usb_phy && !hdev->parent)
- usb_phy_notify_connect(hcd->usb_phy, udev->speed);

Loading...