diff options
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 7 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 21 |
2 files changed, 27 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index b55d46070a25..f71e8e307e0f 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -405,7 +405,12 @@ static int suspend_common(struct device *dev, bool do_wakeup) | |||
405 | return retval; | 405 | return retval; |
406 | } | 406 | } |
407 | 407 | ||
408 | synchronize_irq(pci_dev->irq); | 408 | /* If MSI-X is enabled, the driver will have synchronized all vectors |
409 | * in pci_suspend(). If MSI or legacy PCI is enabled, that will be | ||
410 | * synchronized here. | ||
411 | */ | ||
412 | if (!hcd->msix_enabled) | ||
413 | synchronize_irq(pci_dev->irq); | ||
409 | 414 | ||
410 | /* Downstream ports from this root hub should already be quiesced, so | 415 | /* Downstream ports from this root hub should already be quiesced, so |
411 | * there will be no DMA activity. Now we can shut down the upstream | 416 | * there will be no DMA activity. Now we can shut down the upstream |
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 | } |