diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 11e80ac31324..b649fef2e35d 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, | |||
4468 | if (retval) | 4468 | if (retval) |
4469 | goto fail; | 4469 | goto fail; |
4470 | 4470 | ||
4471 | if (hcd->usb_phy && !hdev->parent) | ||
4472 | usb_phy_notify_connect(hcd->usb_phy, udev->speed); | ||
4473 | |||
4474 | /* | 4471 | /* |
4475 | * Some superspeed devices have finished the link training process | 4472 | * Some superspeed devices have finished the link training process |
4476 | * and attached to a superspeed hub port, but the device descriptor | 4473 | * and attached to a superspeed hub port, but the device descriptor |
@@ -4627,8 +4624,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, | |||
4627 | 4624 | ||
4628 | /* Disconnect any existing devices under this port */ | 4625 | /* Disconnect any existing devices under this port */ |
4629 | if (udev) { | 4626 | if (udev) { |
4630 | if (hcd->usb_phy && !hdev->parent && | 4627 | if (hcd->usb_phy && !hdev->parent) |
4631 | !(portstatus & USB_PORT_STAT_CONNECTION)) | ||
4632 | usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); | 4628 | usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); |
4633 | usb_disconnect(&port_dev->child); | 4629 | usb_disconnect(&port_dev->child); |
4634 | } | 4630 | } |
@@ -4783,6 +4779,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, | |||
4783 | port_dev->child = NULL; | 4779 | port_dev->child = NULL; |
4784 | spin_unlock_irq(&device_state_lock); | 4780 | spin_unlock_irq(&device_state_lock); |
4785 | mutex_unlock(&usb_port_peer_mutex); | 4781 | mutex_unlock(&usb_port_peer_mutex); |
4782 | } else { | ||
4783 | if (hcd->usb_phy && !hdev->parent) | ||
4784 | usb_phy_notify_connect(hcd->usb_phy, | ||
4785 | udev->speed); | ||
4786 | } | 4786 | } |
4787 | } | 4787 | } |
4788 | 4788 | ||