diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-07 02:14:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-07 02:14:06 -0400 |
commit | cc02f852872d2f9f3a15b3429b77998271814de0 (patch) | |
tree | 8e2d0cb58c7ead41a69a2cf582e4a4fc5eb6f993 | |
parent | 055d8d9eae35ac1edb97fcf70f357cea227bf3b2 (diff) | |
parent | 555df5820e733cded7eb8d0bf78b2a791be51d75 (diff) |
Merge tag 'usb-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
I wrote:
"USB fixes for 4.19-rc7
Here are some small USB fixes for 4.19-rc7
These include:
- the usual xhci bugfixes for reported issues
- some new serial driver device ids
- bugfix for the option serial driver for some devices
- bugfix for the cdc_acm driver that has been there for a long time.
All of these have been in linux-next for a while with no reported
issues."
* tag 'usb-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usb: xhci-mtk: resume USB3 roothub first
xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
usb: cdc_acm: Do not leak URB buffers
USB: serial: simple: add Motorola Tetra MTP6550 id
USB: serial: option: add two-endpoints device-id flag
USB: serial: option: improve Quectel EP06 detection
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mtk.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 15 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial-simple.c | 3 |
5 files changed, 25 insertions, 5 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index f9b40a9dc4d3..bc03b0a690b4 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1514,6 +1514,7 @@ static void acm_disconnect(struct usb_interface *intf) | |||
1514 | { | 1514 | { |
1515 | struct acm *acm = usb_get_intfdata(intf); | 1515 | struct acm *acm = usb_get_intfdata(intf); |
1516 | struct tty_struct *tty; | 1516 | struct tty_struct *tty; |
1517 | int i; | ||
1517 | 1518 | ||
1518 | /* sibling interface is already cleaning up */ | 1519 | /* sibling interface is already cleaning up */ |
1519 | if (!acm) | 1520 | if (!acm) |
@@ -1544,6 +1545,11 @@ static void acm_disconnect(struct usb_interface *intf) | |||
1544 | 1545 | ||
1545 | tty_unregister_device(acm_tty_driver, acm->minor); | 1546 | tty_unregister_device(acm_tty_driver, acm->minor); |
1546 | 1547 | ||
1548 | usb_free_urb(acm->ctrlurb); | ||
1549 | for (i = 0; i < ACM_NW; i++) | ||
1550 | usb_free_urb(acm->wb[i].urb); | ||
1551 | for (i = 0; i < acm->rx_buflimit; i++) | ||
1552 | usb_free_urb(acm->read_urbs[i]); | ||
1547 | acm_write_buffers_free(acm); | 1553 | acm_write_buffers_free(acm); |
1548 | usb_free_coherent(acm->dev, acm->ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); | 1554 | usb_free_coherent(acm->dev, acm->ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); |
1549 | acm_read_buffers_free(acm); | 1555 | acm_read_buffers_free(acm); |
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 7334da9e9779..71d0d33c3286 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c | |||
@@ -642,10 +642,10 @@ static int __maybe_unused xhci_mtk_resume(struct device *dev) | |||
642 | xhci_mtk_host_enable(mtk); | 642 | xhci_mtk_host_enable(mtk); |
643 | 643 | ||
644 | xhci_dbg(xhci, "%s: restart port polling\n", __func__); | 644 | xhci_dbg(xhci, "%s: restart port polling\n", __func__); |
645 | set_bit(HCD_FLAG_POLL_RH, &hcd->flags); | ||
646 | usb_hcd_poll_rh_status(hcd); | ||
647 | set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); | 645 | set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags); |
648 | usb_hcd_poll_rh_status(xhci->shared_hcd); | 646 | usb_hcd_poll_rh_status(xhci->shared_hcd); |
647 | set_bit(HCD_FLAG_POLL_RH, &hcd->flags); | ||
648 | usb_hcd_poll_rh_status(hcd); | ||
649 | return 0; | 649 | return 0; |
650 | } | 650 | } |
651 | 651 | ||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 6372edf339d9..722860eb5a91 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -185,6 +185,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
185 | } | 185 | } |
186 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | 186 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
187 | (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI || | 187 | (pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI || |
188 | pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI || | ||
189 | pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI || | ||
188 | pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI || | 190 | pdev->device == PCI_DEVICE_ID_INTEL_APL_XHCI || |
189 | pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI)) | 191 | pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI)) |
190 | xhci->quirks |= XHCI_MISSING_CAS; | 192 | xhci->quirks |= XHCI_MISSING_CAS; |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 0215b70c4efc..e72ad9f81c73 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -561,6 +561,9 @@ static void option_instat_callback(struct urb *urb); | |||
561 | /* Interface is reserved */ | 561 | /* Interface is reserved */ |
562 | #define RSVD(ifnum) ((BIT(ifnum) & 0xff) << 0) | 562 | #define RSVD(ifnum) ((BIT(ifnum) & 0xff) << 0) |
563 | 563 | ||
564 | /* Interface must have two endpoints */ | ||
565 | #define NUMEP2 BIT(16) | ||
566 | |||
564 | 567 | ||
565 | static const struct usb_device_id option_ids[] = { | 568 | static const struct usb_device_id option_ids[] = { |
566 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 569 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
@@ -1081,8 +1084,9 @@ static const struct usb_device_id option_ids[] = { | |||
1081 | .driver_info = RSVD(4) }, | 1084 | .driver_info = RSVD(4) }, |
1082 | { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), | 1085 | { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), |
1083 | .driver_info = RSVD(4) }, | 1086 | .driver_info = RSVD(4) }, |
1084 | { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06), | 1087 | { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), |
1085 | .driver_info = RSVD(4) | RSVD(5) }, | 1088 | .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, |
1089 | { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, | ||
1086 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, | 1090 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, |
1087 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, | 1091 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, |
1088 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), | 1092 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), |
@@ -1999,6 +2003,13 @@ static int option_probe(struct usb_serial *serial, | |||
1999 | if (device_flags & RSVD(iface_desc->bInterfaceNumber)) | 2003 | if (device_flags & RSVD(iface_desc->bInterfaceNumber)) |
2000 | return -ENODEV; | 2004 | return -ENODEV; |
2001 | 2005 | ||
2006 | /* | ||
2007 | * Allow matching on bNumEndpoints for devices whose interface numbers | ||
2008 | * can change (e.g. Quectel EP06). | ||
2009 | */ | ||
2010 | if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2) | ||
2011 | return -ENODEV; | ||
2012 | |||
2002 | /* Store the device flags so we can use them during attach. */ | 2013 | /* Store the device flags so we can use them during attach. */ |
2003 | usb_set_serial_data(serial, (void *)device_flags); | 2014 | usb_set_serial_data(serial, (void *)device_flags); |
2004 | 2015 | ||
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c index 40864c2bd9dc..4d0273508043 100644 --- a/drivers/usb/serial/usb-serial-simple.c +++ b/drivers/usb/serial/usb-serial-simple.c | |||
@@ -84,7 +84,8 @@ DEVICE(moto_modem, MOTO_IDS); | |||
84 | 84 | ||
85 | /* Motorola Tetra driver */ | 85 | /* Motorola Tetra driver */ |
86 | #define MOTOROLA_TETRA_IDS() \ | 86 | #define MOTOROLA_TETRA_IDS() \ |
87 | { USB_DEVICE(0x0cad, 0x9011) } /* Motorola Solutions TETRA PEI */ | 87 | { USB_DEVICE(0x0cad, 0x9011) }, /* Motorola Solutions TETRA PEI */ \ |
88 | { USB_DEVICE(0x0cad, 0x9012) } /* MTP6550 */ | ||
88 | DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS); | 89 | DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS); |
89 | 90 | ||
90 | /* Novatel Wireless GPS driver */ | 91 | /* Novatel Wireless GPS driver */ |