diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-26 13:23:47 -0400 |
| commit | 9fc377799bc9bfd8d5cb35d0d1ea2e2458cbdbb3 (patch) | |
| tree | fe93603b4e33dd50ff5f95ff769a0748b230cdf9 /drivers/usb/core/message.c | |
| parent | 5e23ae49960d05f578a73ecd19749c45af682c2b (diff) | |
| parent | e387ef5c47ddeaeaa3cbdc54424cdb7a28dae2c0 (diff) | |
Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman:
"Here's the big USB patch set for the 3.6-rc1 merge window.
Lots of little changes in here, primarily for gadget controllers and
drivers. There's some scsi changes that I think also went in through
the scsi tree, but they merge just fine. All of these patches have
been in the linux-next tree for a while now.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fix up trivial conflicts in include/scsi/scsi_device.h (same libata
conflict that Jeff had already encountered)
* tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits)
usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams
usb: Add quirk detection based on interface information
usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h
USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer
USB: add USB_VENDOR_AND_INTERFACE_INFO() macro
USB: notify phy when root hub port connect change
USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds
USB: option: add ZTE MF821D
USB: sierra: QMI mode MC7710 moved to qcserial
USB: qcserial: adding Sierra Wireless devices
USB: qcserial: support generic Qualcomm serial ports
USB: qcserial: make probe more flexible
USB: qcserial: centralize probe exit path
USB: qcserial: consolidate usb_set_interface calls
USB: ehci-s5p: Add support for device tree
USB: ohci-exynos: Add support for device tree
USB: ehci-omap: fix compile failure(v1)
usb: host: tegra: pass correct pointer in ehci_setup()
USB: ehci-fsl: Update ifdef check to work on 64-bit ppc
USB: serial: keyspan: Removed unrequired parentheses.
...
Diffstat (limited to 'drivers/usb/core/message.c')
| -rw-r--r-- | drivers/usb/core/message.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index bdd1c6749d88..0ab7da2283e3 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
| @@ -1174,6 +1174,8 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) | |||
| 1174 | put_device(&dev->actconfig->interface[i]->dev); | 1174 | put_device(&dev->actconfig->interface[i]->dev); |
| 1175 | dev->actconfig->interface[i] = NULL; | 1175 | dev->actconfig->interface[i] = NULL; |
| 1176 | } | 1176 | } |
| 1177 | usb_unlocked_disable_lpm(dev); | ||
| 1178 | usb_disable_ltm(dev); | ||
| 1177 | dev->actconfig = NULL; | 1179 | dev->actconfig = NULL; |
| 1178 | if (dev->state == USB_STATE_CONFIGURED) | 1180 | if (dev->state == USB_STATE_CONFIGURED) |
| 1179 | usb_set_device_state(dev, USB_STATE_ADDRESS); | 1181 | usb_set_device_state(dev, USB_STATE_ADDRESS); |
| @@ -1559,7 +1561,7 @@ static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 1559 | 1561 | ||
| 1560 | if (add_uevent_var(env, | 1562 | if (add_uevent_var(env, |
| 1561 | "MODALIAS=usb:" | 1563 | "MODALIAS=usb:" |
| 1562 | "v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X", | 1564 | "v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02Xin%02X", |
| 1563 | le16_to_cpu(usb_dev->descriptor.idVendor), | 1565 | le16_to_cpu(usb_dev->descriptor.idVendor), |
| 1564 | le16_to_cpu(usb_dev->descriptor.idProduct), | 1566 | le16_to_cpu(usb_dev->descriptor.idProduct), |
| 1565 | le16_to_cpu(usb_dev->descriptor.bcdDevice), | 1567 | le16_to_cpu(usb_dev->descriptor.bcdDevice), |
| @@ -1568,7 +1570,8 @@ static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
| 1568 | usb_dev->descriptor.bDeviceProtocol, | 1570 | usb_dev->descriptor.bDeviceProtocol, |
| 1569 | alt->desc.bInterfaceClass, | 1571 | alt->desc.bInterfaceClass, |
| 1570 | alt->desc.bInterfaceSubClass, | 1572 | alt->desc.bInterfaceSubClass, |
| 1571 | alt->desc.bInterfaceProtocol)) | 1573 | alt->desc.bInterfaceProtocol, |
| 1574 | alt->desc.bInterfaceNumber)) | ||
| 1572 | return -ENOMEM; | 1575 | return -ENOMEM; |
| 1573 | 1576 | ||
| 1574 | return 0; | 1577 | return 0; |
| @@ -1791,14 +1794,15 @@ free_interfaces: | |||
| 1791 | * installed, so that the xHCI driver can recalculate the U1/U2 | 1794 | * installed, so that the xHCI driver can recalculate the U1/U2 |
| 1792 | * timeouts. | 1795 | * timeouts. |
| 1793 | */ | 1796 | */ |
| 1794 | if (usb_disable_lpm(dev)) { | 1797 | if (dev->actconfig && usb_disable_lpm(dev)) { |
| 1795 | dev_err(&dev->dev, "%s Failed to disable LPM\n.", __func__); | 1798 | dev_err(&dev->dev, "%s Failed to disable LPM\n.", __func__); |
| 1796 | mutex_unlock(hcd->bandwidth_mutex); | 1799 | mutex_unlock(hcd->bandwidth_mutex); |
| 1797 | return -ENOMEM; | 1800 | return -ENOMEM; |
| 1798 | } | 1801 | } |
| 1799 | ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL); | 1802 | ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL); |
| 1800 | if (ret < 0) { | 1803 | if (ret < 0) { |
| 1801 | usb_enable_lpm(dev); | 1804 | if (dev->actconfig) |
| 1805 | usb_enable_lpm(dev); | ||
| 1802 | mutex_unlock(hcd->bandwidth_mutex); | 1806 | mutex_unlock(hcd->bandwidth_mutex); |
| 1803 | usb_autosuspend_device(dev); | 1807 | usb_autosuspend_device(dev); |
| 1804 | goto free_interfaces; | 1808 | goto free_interfaces; |
| @@ -1818,7 +1822,7 @@ free_interfaces: | |||
| 1818 | if (!cp) { | 1822 | if (!cp) { |
| 1819 | usb_set_device_state(dev, USB_STATE_ADDRESS); | 1823 | usb_set_device_state(dev, USB_STATE_ADDRESS); |
| 1820 | usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL); | 1824 | usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL); |
| 1821 | usb_enable_lpm(dev); | 1825 | /* Leave LPM disabled while the device is unconfigured. */ |
| 1822 | mutex_unlock(hcd->bandwidth_mutex); | 1826 | mutex_unlock(hcd->bandwidth_mutex); |
| 1823 | usb_autosuspend_device(dev); | 1827 | usb_autosuspend_device(dev); |
| 1824 | goto free_interfaces; | 1828 | goto free_interfaces; |
| @@ -1876,6 +1880,8 @@ free_interfaces: | |||
| 1876 | 1880 | ||
| 1877 | /* Now that the interfaces are installed, re-enable LPM. */ | 1881 | /* Now that the interfaces are installed, re-enable LPM. */ |
| 1878 | usb_unlocked_enable_lpm(dev); | 1882 | usb_unlocked_enable_lpm(dev); |
| 1883 | /* Enable LTM if it was turned off by usb_disable_device. */ | ||
| 1884 | usb_enable_ltm(dev); | ||
| 1879 | 1885 | ||
| 1880 | /* Now that all the interfaces are set up, register them | 1886 | /* Now that all the interfaces are set up, register them |
| 1881 | * to trigger binding of drivers to interfaces. probe() | 1887 | * to trigger binding of drivers to interfaces. probe() |
