diff options
| -rw-r--r-- | drivers/usb/core/hub.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b98efae6a1cf..4310cc4b1cb5 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -676,6 +676,8 @@ static void hub_init_func3(struct work_struct *ws); | |||
| 676 | static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | 676 | static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) |
| 677 | { | 677 | { |
| 678 | struct usb_device *hdev = hub->hdev; | 678 | struct usb_device *hdev = hub->hdev; |
| 679 | struct usb_hcd *hcd; | ||
| 680 | int ret; | ||
| 679 | int port1; | 681 | int port1; |
| 680 | int status; | 682 | int status; |
| 681 | bool need_debounce_delay = false; | 683 | bool need_debounce_delay = false; |
| @@ -714,6 +716,25 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
| 714 | usb_autopm_get_interface_no_resume( | 716 | usb_autopm_get_interface_no_resume( |
| 715 | to_usb_interface(hub->intfdev)); | 717 | to_usb_interface(hub->intfdev)); |
| 716 | return; /* Continues at init2: below */ | 718 | return; /* Continues at init2: below */ |
| 719 | } else if (type == HUB_RESET_RESUME) { | ||
| 720 | /* The internal host controller state for the hub device | ||
| 721 | * may be gone after a host power loss on system resume. | ||
| 722 | * Update the device's info so the HW knows it's a hub. | ||
| 723 | */ | ||
| 724 | hcd = bus_to_hcd(hdev->bus); | ||
| 725 | if (hcd->driver->update_hub_device) { | ||
| 726 | ret = hcd->driver->update_hub_device(hcd, hdev, | ||
| 727 | &hub->tt, GFP_NOIO); | ||
| 728 | if (ret < 0) { | ||
| 729 | dev_err(hub->intfdev, "Host not " | ||
| 730 | "accepting hub info " | ||
| 731 | "update.\n"); | ||
| 732 | dev_err(hub->intfdev, "LS/FS devices " | ||
| 733 | "and hubs may not work " | ||
| 734 | "under this hub\n."); | ||
| 735 | } | ||
| 736 | } | ||
| 737 | hub_power_on(hub, true); | ||
| 717 | } else { | 738 | } else { |
| 718 | hub_power_on(hub, true); | 739 | hub_power_on(hub, true); |
| 719 | } | 740 | } |
