diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-23 18:11:18 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-23 18:14:07 -0500 |
| commit | fd96d0d8d8079b1ea7a7e8943a4da9dfc9621124 (patch) | |
| tree | 1d1314722847d56e3b703ec721f9534e93fa5580 /drivers/usb/core | |
| parent | 3c47eb06f08eb970ea9d696bcdb57a175d37b470 (diff) | |
| parent | 50d64676d132a8a72a1a1657d7b3e6efa53da1ac (diff) | |
Merge branch 'for-usb-linus' of master.kernel.org:/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
* 'for-usb-linus' of master.kernel.org:/pub/scm/linux/kernel/git/sarah/xhci:
xhci: Remove more doorbell-related reads
xHCI: fix printk_ratelimit() usage
xHCI: replace dev_dbg() with xhci_dbg()
xHCI: fix cycle bit set in giveback_first_trb()
xHCI: remove redundant parameter in giveback_first_trb()
xHCI: fix queue_trb in isoc transfer
xhci: Use GFP_NOIO during device reset.
usb: Realloc xHCI structures after a hub is verified.
xhci: Do not run xhci_cleanup_msix with irq disabled
xHCI: synchronize irq in xhci_suspend()
xhci: Resume bus on any port status change.
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 b55d46070a2..f71e8e307e0 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 b98efae6a1c..4310cc4b1cb 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 | } |
