diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-02 19:56:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-02 19:56:42 -0400 |
commit | 8ee7a330fbb78344802cc6c3cc8be023b6d05aa0 (patch) | |
tree | 75a2eb90f4a9109e0175b24334fae4e4de42dcb7 | |
parent | da579dd6a180693368ade74b3ac38701d35f686e (diff) | |
parent | 5dc2808c4729bf080487e61b80ee04e0fdb12a37 (diff) |
Merge tag 'usb-3.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are some fixes for 3.15-rc8 that resolve a number of tiny USB
issues that have been reported, and there are some new device ids as
well.
All have been tested in linux-next"
* tag 'usb-3.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
xhci: delete endpoints from bandwidth list before freeing whole device
usb: pci-quirks: Prevent Sony VAIO t-series from switching usb ports
USB: cdc-wdm: properly include types.h
usb: cdc-wdm: export cdc-wdm uapi header
USB: serial: option: add support for Novatel E371 PCIe card
USB: ftdi_sio: add NovaTech OrionLXm product ID
USB: io_ti: fix firmware download on big-endian machines (part 2)
USB: Avoid runtime suspend loops for HCDs that can't handle suspend/resume
-rw-r--r-- | drivers/usb/core/driver.c | 9 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 15 | ||||
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 7 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 20 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 5 | ||||
-rw-r--r-- | drivers/usb/serial/io_ti.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/io_usbvend.h | 2 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 2 | ||||
-rw-r--r-- | include/uapi/linux/usb/Kbuild | 1 | ||||
-rw-r--r-- | include/uapi/linux/usb/cdc-wdm.h | 2 |
11 files changed, 50 insertions, 17 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 888881e5f292..4aeb10034de7 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -1822,10 +1822,13 @@ int usb_runtime_suspend(struct device *dev) | |||
1822 | if (status == -EAGAIN || status == -EBUSY) | 1822 | if (status == -EAGAIN || status == -EBUSY) |
1823 | usb_mark_last_busy(udev); | 1823 | usb_mark_last_busy(udev); |
1824 | 1824 | ||
1825 | /* The PM core reacts badly unless the return code is 0, | 1825 | /* |
1826 | * -EAGAIN, or -EBUSY, so always return -EBUSY on an error. | 1826 | * The PM core reacts badly unless the return code is 0, |
1827 | * -EAGAIN, or -EBUSY, so always return -EBUSY on an error | ||
1828 | * (except for root hubs, because they don't suspend through | ||
1829 | * an upstream port like other USB devices). | ||
1827 | */ | 1830 | */ |
1828 | if (status != 0) | 1831 | if (status != 0 && udev->parent) |
1829 | return -EBUSY; | 1832 | return -EBUSY; |
1830 | return status; | 1833 | return status; |
1831 | } | 1834 | } |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 090469ebfcff..229a73f64304 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1691,8 +1691,19 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1691 | */ | 1691 | */ |
1692 | pm_runtime_set_autosuspend_delay(&hdev->dev, 0); | 1692 | pm_runtime_set_autosuspend_delay(&hdev->dev, 0); |
1693 | 1693 | ||
1694 | /* Hubs have proper suspend/resume support. */ | 1694 | /* |
1695 | usb_enable_autosuspend(hdev); | 1695 | * Hubs have proper suspend/resume support, except for root hubs |
1696 | * where the controller driver doesn't have bus_suspend and | ||
1697 | * bus_resume methods. | ||
1698 | */ | ||
1699 | if (hdev->parent) { /* normal device */ | ||
1700 | usb_enable_autosuspend(hdev); | ||
1701 | } else { /* root hub */ | ||
1702 | const struct hc_driver *drv = bus_to_hcd(hdev->bus)->driver; | ||
1703 | |||
1704 | if (drv->bus_suspend && drv->bus_resume) | ||
1705 | usb_enable_autosuspend(hdev); | ||
1706 | } | ||
1696 | 1707 | ||
1697 | if (hdev->level == MAX_TOPO_LEVEL) { | 1708 | if (hdev->level == MAX_TOPO_LEVEL) { |
1698 | dev_err(&intf->dev, | 1709 | dev_err(&intf->dev, |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 00661d305143..4a6d3dd68572 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -847,6 +847,13 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) | |||
847 | bool ehci_found = false; | 847 | bool ehci_found = false; |
848 | struct pci_dev *companion = NULL; | 848 | struct pci_dev *companion = NULL; |
849 | 849 | ||
850 | /* Sony VAIO t-series with subsystem device ID 90a8 is not capable of | ||
851 | * switching ports from EHCI to xHCI | ||
852 | */ | ||
853 | if (xhci_pdev->subsystem_vendor == PCI_VENDOR_ID_SONY && | ||
854 | xhci_pdev->subsystem_device == 0x90a8) | ||
855 | return; | ||
856 | |||
850 | /* make sure an intel EHCI controller exists */ | 857 | /* make sure an intel EHCI controller exists */ |
851 | for_each_pci_dev(companion) { | 858 | for_each_pci_dev(companion) { |
852 | if (companion->class == PCI_CLASS_SERIAL_USB_EHCI && | 859 | if (companion->class == PCI_CLASS_SERIAL_USB_EHCI && |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index c089668308ad..b1a8a5f4bbb8 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1822,6 +1822,16 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1822 | kfree(cur_cd); | 1822 | kfree(cur_cd); |
1823 | } | 1823 | } |
1824 | 1824 | ||
1825 | num_ports = HCS_MAX_PORTS(xhci->hcs_params1); | ||
1826 | for (i = 0; i < num_ports; i++) { | ||
1827 | struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; | ||
1828 | for (j = 0; j < XHCI_MAX_INTERVAL; j++) { | ||
1829 | struct list_head *ep = &bwt->interval_bw[j].endpoints; | ||
1830 | while (!list_empty(ep)) | ||
1831 | list_del_init(ep->next); | ||
1832 | } | ||
1833 | } | ||
1834 | |||
1825 | for (i = 1; i < MAX_HC_SLOTS; ++i) | 1835 | for (i = 1; i < MAX_HC_SLOTS; ++i) |
1826 | xhci_free_virt_device(xhci, i); | 1836 | xhci_free_virt_device(xhci, i); |
1827 | 1837 | ||
@@ -1857,16 +1867,6 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1857 | if (!xhci->rh_bw) | 1867 | if (!xhci->rh_bw) |
1858 | goto no_bw; | 1868 | goto no_bw; |
1859 | 1869 | ||
1860 | num_ports = HCS_MAX_PORTS(xhci->hcs_params1); | ||
1861 | for (i = 0; i < num_ports; i++) { | ||
1862 | struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; | ||
1863 | for (j = 0; j < XHCI_MAX_INTERVAL; j++) { | ||
1864 | struct list_head *ep = &bwt->interval_bw[j].endpoints; | ||
1865 | while (!list_empty(ep)) | ||
1866 | list_del_init(ep->next); | ||
1867 | } | ||
1868 | } | ||
1869 | |||
1870 | for (i = 0; i < num_ports; i++) { | 1870 | for (i = 0; i < num_ports; i++) { |
1871 | struct xhci_tt_bw_info *tt, *n; | 1871 | struct xhci_tt_bw_info *tt, *n; |
1872 | list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) { | 1872 | list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) { |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 7c6e1dedeb06..edf3b124583c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -580,6 +580,8 @@ static const struct usb_device_id id_table_combined[] = { | |||
580 | { USB_DEVICE(FTDI_VID, FTDI_TAVIR_STK500_PID) }, | 580 | { USB_DEVICE(FTDI_VID, FTDI_TAVIR_STK500_PID) }, |
581 | { USB_DEVICE(FTDI_VID, FTDI_TIAO_UMPA_PID), | 581 | { USB_DEVICE(FTDI_VID, FTDI_TIAO_UMPA_PID), |
582 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 582 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
583 | { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), | ||
584 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
583 | /* | 585 | /* |
584 | * ELV devices: | 586 | * ELV devices: |
585 | */ | 587 | */ |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 993c93df6874..500474c48f4b 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -538,6 +538,11 @@ | |||
538 | */ | 538 | */ |
539 | #define FTDI_TIAO_UMPA_PID 0x8a98 /* TIAO/DIYGADGET USB Multi-Protocol Adapter */ | 539 | #define FTDI_TIAO_UMPA_PID 0x8a98 /* TIAO/DIYGADGET USB Multi-Protocol Adapter */ |
540 | 540 | ||
541 | /* | ||
542 | * NovaTech product ids (FTDI_VID) | ||
543 | */ | ||
544 | #define FTDI_NT_ORIONLXM_PID 0x7c90 /* OrionLXm Substation Automation Platform */ | ||
545 | |||
541 | 546 | ||
542 | /********************************/ | 547 | /********************************/ |
543 | /** third-party VID/PID combos **/ | 548 | /** third-party VID/PID combos **/ |
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index df90dae53eb9..c0a42e9e6777 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c | |||
@@ -821,7 +821,7 @@ static int build_i2c_fw_hdr(__u8 *header, struct device *dev) | |||
821 | firmware_rec = (struct ti_i2c_firmware_rec*)i2c_header->Data; | 821 | firmware_rec = (struct ti_i2c_firmware_rec*)i2c_header->Data; |
822 | 822 | ||
823 | i2c_header->Type = I2C_DESC_TYPE_FIRMWARE_BLANK; | 823 | i2c_header->Type = I2C_DESC_TYPE_FIRMWARE_BLANK; |
824 | i2c_header->Size = (__u16)buffer_size; | 824 | i2c_header->Size = cpu_to_le16(buffer_size); |
825 | i2c_header->CheckSum = cs; | 825 | i2c_header->CheckSum = cs; |
826 | firmware_rec->Ver_Major = OperationalMajorVersion; | 826 | firmware_rec->Ver_Major = OperationalMajorVersion; |
827 | firmware_rec->Ver_Minor = OperationalMinorVersion; | 827 | firmware_rec->Ver_Minor = OperationalMinorVersion; |
diff --git a/drivers/usb/serial/io_usbvend.h b/drivers/usb/serial/io_usbvend.h index 51f83fbb73bb..6f6a856bc37c 100644 --- a/drivers/usb/serial/io_usbvend.h +++ b/drivers/usb/serial/io_usbvend.h | |||
@@ -594,7 +594,7 @@ struct edge_boot_descriptor { | |||
594 | 594 | ||
595 | struct ti_i2c_desc { | 595 | struct ti_i2c_desc { |
596 | __u8 Type; // Type of descriptor | 596 | __u8 Type; // Type of descriptor |
597 | __u16 Size; // Size of data only not including header | 597 | __le16 Size; // Size of data only not including header |
598 | __u8 CheckSum; // Checksum (8 bit sum of data only) | 598 | __u8 CheckSum; // Checksum (8 bit sum of data only) |
599 | __u8 Data[0]; // Data starts here | 599 | __u8 Data[0]; // Data starts here |
600 | } __attribute__((packed)); | 600 | } __attribute__((packed)); |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index f213ee978516..948a19f0cdf7 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -161,6 +161,7 @@ static void option_instat_callback(struct urb *urb); | |||
161 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 | 161 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 |
162 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 | 162 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 |
163 | #define NOVATELWIRELESS_PRODUCT_E362 0x9010 | 163 | #define NOVATELWIRELESS_PRODUCT_E362 0x9010 |
164 | #define NOVATELWIRELESS_PRODUCT_E371 0x9011 | ||
164 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 | 165 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 |
165 | #define NOVATELWIRELESS_PRODUCT_MC551 0xB001 | 166 | #define NOVATELWIRELESS_PRODUCT_MC551 0xB001 |
166 | 167 | ||
@@ -1012,6 +1013,7 @@ static const struct usb_device_id option_ids[] = { | |||
1012 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ | 1013 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ |
1013 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, | 1014 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, |
1014 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, | 1015 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, |
1016 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E371, 0xff, 0xff, 0xff) }, | ||
1015 | 1017 | ||
1016 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, | 1018 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, |
1017 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, | 1019 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, |
diff --git a/include/uapi/linux/usb/Kbuild b/include/uapi/linux/usb/Kbuild index 6cb4ea826834..4cc4d6e7e523 100644 --- a/include/uapi/linux/usb/Kbuild +++ b/include/uapi/linux/usb/Kbuild | |||
@@ -1,6 +1,7 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += audio.h | 2 | header-y += audio.h |
3 | header-y += cdc.h | 3 | header-y += cdc.h |
4 | header-y += cdc-wdm.h | ||
4 | header-y += ch11.h | 5 | header-y += ch11.h |
5 | header-y += ch9.h | 6 | header-y += ch9.h |
6 | header-y += functionfs.h | 7 | header-y += functionfs.h |
diff --git a/include/uapi/linux/usb/cdc-wdm.h b/include/uapi/linux/usb/cdc-wdm.h index f03134feebd6..0dc132e75030 100644 --- a/include/uapi/linux/usb/cdc-wdm.h +++ b/include/uapi/linux/usb/cdc-wdm.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _UAPI__LINUX_USB_CDC_WDM_H | 9 | #ifndef _UAPI__LINUX_USB_CDC_WDM_H |
10 | #define _UAPI__LINUX_USB_CDC_WDM_H | 10 | #define _UAPI__LINUX_USB_CDC_WDM_H |
11 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
12 | /* | 14 | /* |
13 | * This IOCTL is used to retrieve the wMaxCommand for the device, | 15 | * This IOCTL is used to retrieve the wMaxCommand for the device, |
14 | * defining the message limit for both reading and writing. | 16 | * defining the message limit for both reading and writing. |