diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:56:55 -0500 |
commit | 66b0835e2bb3d345f060a47bb8c8f883bd25ec2b (patch) | |
tree | d1fc390dfa58f131df908267d87ef99d4522a596 /drivers/usb/core | |
parent | 479b46b5599b1e610630d7332e168c1f9c4ee0b4 (diff) | |
parent | 85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff) |
Merge 2.6.38-rc5 into usb-next
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/endpoint.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 7 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 26 |
4 files changed, 34 insertions, 3 deletions
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index 9da250563027..df502a98d0df 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c | |||
@@ -192,12 +192,12 @@ int usb_create_ep_devs(struct device *parent, | |||
192 | ep_dev->dev.parent = parent; | 192 | ep_dev->dev.parent = parent; |
193 | ep_dev->dev.release = ep_device_release; | 193 | ep_dev->dev.release = ep_device_release; |
194 | dev_set_name(&ep_dev->dev, "ep_%02x", endpoint->desc.bEndpointAddress); | 194 | dev_set_name(&ep_dev->dev, "ep_%02x", endpoint->desc.bEndpointAddress); |
195 | device_enable_async_suspend(&ep_dev->dev); | ||
196 | 195 | ||
197 | retval = device_register(&ep_dev->dev); | 196 | retval = device_register(&ep_dev->dev); |
198 | if (retval) | 197 | if (retval) |
199 | goto error_register; | 198 | goto error_register; |
200 | 199 | ||
200 | device_enable_async_suspend(&ep_dev->dev); | ||
201 | endpoint->ep_dev = ep_dev; | 201 | endpoint->ep_dev = ep_dev; |
202 | return retval; | 202 | return retval; |
203 | 203 | ||
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/hcd.c b/drivers/usb/core/hcd.c index d0b782c4523a..24765fd6cf12 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1973,7 +1973,6 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) | |||
1973 | 1973 | ||
1974 | dev_dbg(&rhdev->dev, "usb %s%s\n", | 1974 | dev_dbg(&rhdev->dev, "usb %s%s\n", |
1975 | (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume"); | 1975 | (msg.event & PM_EVENT_AUTO ? "auto-" : ""), "resume"); |
1976 | clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); | ||
1977 | if (!hcd->driver->bus_resume) | 1976 | if (!hcd->driver->bus_resume) |
1978 | return -ENOENT; | 1977 | return -ENOENT; |
1979 | if (hcd->state == HC_STATE_RUNNING) | 1978 | if (hcd->state == HC_STATE_RUNNING) |
@@ -1981,6 +1980,7 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) | |||
1981 | 1980 | ||
1982 | hcd->state = HC_STATE_RESUMING; | 1981 | hcd->state = HC_STATE_RESUMING; |
1983 | status = hcd->driver->bus_resume(hcd); | 1982 | status = hcd->driver->bus_resume(hcd); |
1983 | clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); | ||
1984 | if (status == 0) { | 1984 | if (status == 0) { |
1985 | /* TRSMRCY = 10 msec */ | 1985 | /* TRSMRCY = 10 msec */ |
1986 | msleep(10); | 1986 | msleep(10); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b98efae6a1cf..d041c6826e43 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 | } |
@@ -2732,6 +2753,11 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, | |||
2732 | udev->ttport = hdev->ttport; | 2753 | udev->ttport = hdev->ttport; |
2733 | } else if (udev->speed != USB_SPEED_HIGH | 2754 | } else if (udev->speed != USB_SPEED_HIGH |
2734 | && hdev->speed == USB_SPEED_HIGH) { | 2755 | && hdev->speed == USB_SPEED_HIGH) { |
2756 | if (!hub->tt.hub) { | ||
2757 | dev_err(&udev->dev, "parent hub has no TT\n"); | ||
2758 | retval = -EINVAL; | ||
2759 | goto fail; | ||
2760 | } | ||
2735 | udev->tt = &hub->tt; | 2761 | udev->tt = &hub->tt; |
2736 | udev->ttport = port1; | 2762 | udev->ttport = port1; |
2737 | } | 2763 | } |