Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are some USB fixes for 3.18-rc4.

Just a bunch of little fixes resolving reported issues and new device
ids for existing drivers. Full details are in the shortlog"

* tag 'usb-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
USB: Update default usb-storage delay_use value in kernel-parameters.txt
USB: cdc-acm: add quirk for control-line state requests
phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
USB: storage: Fix timeout in usb_stor_euscsi_init() and usb_stor_huawei_e220_init()
USB: cdc-acm: only raise DTR on transitions from B0
Revert "storage: Replace magic number with define in usb_stor_euscsi_init()"
usb: core: notify disconnection when core detects disconnect
usb: core: need to call usb_phy_notify_connect after device setup
uas: Add US_FL_NO_ATA_1X quirk for 2 more Seagate models
xhci: no switching back on non-ULT Haswell
USB: quirks: enable device-qualifier quirk for yet another Elan touchscreen
USB: quirks: enable device-qualifier quirk for another Elan touchscreen
MAINTAINERS: Remove duplicate entry for usbip driver
usb: storage: fix build warnings !CONFIG_PM
usb: Remove references to non-existent PLAT_S5P symbol
uas: Add NO_ATA_1X for VIA VL711 devices
xhci: Disable streams on Asmedia 1042 xhci controllers
USB: HWA: fix a warning message
uas: Add US_FL_NO_ATA_1X quirk for 1 more Seagate model
usb-storage: handle a skipped data phase
...

+111 -40
+1 -1
Documentation/kernel-parameters.txt
··· 3621 3621 3622 3622 usb-storage.delay_use= 3623 3623 [UMS] The delay in seconds before a new device is 3624 - scanned for Logical Units (default 5). 3624 + scanned for Logical Units (default 1). 3625 3625 3626 3626 usb-storage.quirks= 3627 3627 [UMS] A list of quirks entries to supplement or
-5
MAINTAINERS
··· 9703 9703 F: Documentation/hid/hiddev.txt 9704 9704 F: drivers/hid/usbhid/ 9705 9705 9706 - USB/IP DRIVERS 9707 - L: linux-usb@vger.kernel.org 9708 - S: Orphan 9709 - F: drivers/staging/usbip/ 9710 - 9711 9706 USB ISP116X DRIVER 9712 9707 M: Olav Kongas <ok@artecdesign.ee> 9713 9708 L: linux-usb@vger.kernel.org
+4 -2
drivers/phy/phy-omap-usb2.c
··· 258 258 otg->phy = &phy->phy; 259 259 260 260 platform_set_drvdata(pdev, phy); 261 + pm_runtime_enable(phy->dev); 261 262 262 263 generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL); 263 - if (IS_ERR(generic_phy)) 264 + if (IS_ERR(generic_phy)) { 265 + pm_runtime_disable(phy->dev); 264 266 return PTR_ERR(generic_phy); 267 + } 265 268 266 269 phy_set_drvdata(generic_phy, phy); 267 270 268 - pm_runtime_enable(phy->dev); 269 271 phy_provider = devm_of_phy_provider_register(phy->dev, 270 272 of_phy_simple_xlate); 271 273 if (IS_ERR(phy_provider)) {
+21 -4
drivers/usb/class/cdc-acm.c
··· 60 60 61 61 static DEFINE_MUTEX(acm_table_lock); 62 62 63 + static void acm_tty_set_termios(struct tty_struct *tty, 64 + struct ktermios *termios_old); 65 + 63 66 /* 64 67 * acm_table accessors 65 68 */ ··· 148 145 /* devices aren't required to support these requests. 149 146 * the cdc acm descriptor tells whether they do... 150 147 */ 151 - #define acm_set_control(acm, control) \ 152 - acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, control, NULL, 0) 148 + static inline int acm_set_control(struct acm *acm, int control) 149 + { 150 + if (acm->quirks & QUIRK_CONTROL_LINE_STATE) 151 + return -EOPNOTSUPP; 152 + 153 + return acm_ctrl_msg(acm, USB_CDC_REQ_SET_CONTROL_LINE_STATE, 154 + control, NULL, 0); 155 + } 156 + 153 157 #define acm_set_line(acm, line) \ 154 158 acm_ctrl_msg(acm, USB_CDC_REQ_SET_LINE_CODING, 0, line, sizeof *(line)) 155 159 #define acm_send_break(acm, ms) \ ··· 563 553 "%s - usb_submit_urb(ctrl irq) failed\n", __func__); 564 554 goto error_submit_urb; 565 555 } 556 + 557 + acm_tty_set_termios(tty, NULL); 566 558 567 559 /* 568 560 * Unthrottle device in case the TTY was closed while throttled. ··· 992 980 /* FIXME: Needs to clear unsupported bits in the termios */ 993 981 acm->clocal = ((termios->c_cflag & CLOCAL) != 0); 994 982 995 - if (!newline.dwDTERate) { 983 + if (C_BAUD(tty) == B0) { 996 984 newline.dwDTERate = acm->line.dwDTERate; 997 985 newctrl &= ~ACM_CTRL_DTR; 998 - } else 986 + } else if (termios_old && (termios_old->c_cflag & CBAUD) == B0) { 999 987 newctrl |= ACM_CTRL_DTR; 988 + } 1000 989 1001 990 if (newctrl != acm->ctrlout) 1002 991 acm_set_control(acm, acm->ctrlout = newctrl); ··· 1327 1314 tty_port_init(&acm->port); 1328 1315 acm->port.ops = &acm_port_ops; 1329 1316 init_usb_anchor(&acm->delayed); 1317 + acm->quirks = quirks; 1330 1318 1331 1319 buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); 1332 1320 if (!buf) { ··· 1695 1681 { USB_DEVICE(0x0572, 0x1328), /* Shiro / Aztech USB MODEM UM-3100 */ 1696 1682 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ 1697 1683 }, 1684 + { USB_DEVICE(0x20df, 0x0001), /* Simtec Electronics Entropy Key */ 1685 + .driver_info = QUIRK_CONTROL_LINE_STATE, }, 1686 + { USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */ 1698 1687 { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ 1699 1688 }, 1700 1689 /* Motorola H24 HSPA module: */
+2
drivers/usb/class/cdc-acm.h
··· 121 121 unsigned int throttle_req:1; /* throttle requested */ 122 122 u8 bInterval; 123 123 struct usb_anchor delayed; /* writes queued for a device about to be woken */ 124 + unsigned long quirks; 124 125 }; 125 126 126 127 #define CDC_DATA_INTERFACE_TYPE 0x0a ··· 133 132 #define NOT_A_MODEM BIT(3) 134 133 #define NO_DATA_INTERFACE BIT(4) 135 134 #define IGNORE_DEVICE BIT(5) 135 + #define QUIRK_CONTROL_LINE_STATE BIT(6)
+2
drivers/usb/core/hcd.c
··· 2060 2060 return -EINVAL; 2061 2061 if (dev->speed != USB_SPEED_SUPER) 2062 2062 return -EINVAL; 2063 + if (dev->state < USB_STATE_CONFIGURED) 2064 + return -ENODEV; 2063 2065 2064 2066 for (i = 0; i < num_eps; i++) { 2065 2067 /* Streams only apply to bulk endpoints. */
+5 -5
drivers/usb/core/hub.c
··· 4468 4468 if (retval) 4469 4469 goto fail; 4470 4470 4471 - if (hcd->usb_phy && !hdev->parent) 4472 - usb_phy_notify_connect(hcd->usb_phy, udev->speed); 4473 - 4474 4471 /* 4475 4472 * Some superspeed devices have finished the link training process 4476 4473 * and attached to a superspeed hub port, but the device descriptor ··· 4624 4627 4625 4628 /* Disconnect any existing devices under this port */ 4626 4629 if (udev) { 4627 - if (hcd->usb_phy && !hdev->parent && 4628 - !(portstatus & USB_PORT_STAT_CONNECTION)) 4630 + if (hcd->usb_phy && !hdev->parent) 4629 4631 usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); 4630 4632 usb_disconnect(&port_dev->child); 4631 4633 } ··· 4779 4783 port_dev->child = NULL; 4780 4784 spin_unlock_irq(&device_state_lock); 4781 4785 mutex_unlock(&usb_port_peer_mutex); 4786 + } else { 4787 + if (hcd->usb_phy && !hdev->parent) 4788 + usb_phy_notify_connect(hcd->usb_phy, 4789 + udev->speed); 4782 4790 } 4783 4791 } 4784 4792
+6
drivers/usb/core/quirks.c
··· 97 97 { USB_DEVICE(0x04f3, 0x0089), .driver_info = 98 98 USB_QUIRK_DEVICE_QUALIFIER }, 99 99 100 + { USB_DEVICE(0x04f3, 0x009b), .driver_info = 101 + USB_QUIRK_DEVICE_QUALIFIER }, 102 + 103 + { USB_DEVICE(0x04f3, 0x016f), .driver_info = 104 + USB_QUIRK_DEVICE_QUALIFIER }, 105 + 100 106 /* Roland SC-8820 */ 101 107 { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, 102 108
+1 -1
drivers/usb/dwc2/gadget.c
··· 2327 2327 2328 2328 u32 usb_status = readl(hsotg->regs + GOTGCTL); 2329 2329 2330 - dev_info(hsotg->dev, "%s: USBRst\n", __func__); 2330 + dev_dbg(hsotg->dev, "%s: USBRst\n", __func__); 2331 2331 dev_dbg(hsotg->dev, "GNPTXSTS=%08x\n", 2332 2332 readl(hsotg->regs + GNPTXSTS)); 2333 2333
+2 -2
drivers/usb/host/Kconfig
··· 234 234 235 235 config USB_EHCI_EXYNOS 236 236 tristate "EHCI support for Samsung S5P/EXYNOS SoC Series" 237 - depends on PLAT_S5P || ARCH_EXYNOS 237 + depends on ARCH_S5PV210 || ARCH_EXYNOS 238 238 help 239 239 Enable support for the Samsung Exynos SOC's on-chip EHCI controller. 240 240 ··· 550 550 551 551 config USB_OHCI_EXYNOS 552 552 tristate "OHCI support for Samsung S5P/EXYNOS SoC Series" 553 - depends on PLAT_S5P || ARCH_EXYNOS 553 + depends on ARCH_S5PV210 || ARCH_EXYNOS 554 554 help 555 555 Enable support for the Samsung Exynos SOC's on-chip OHCI controller. 556 556
+1 -1
drivers/usb/host/hwa-hc.c
··· 607 607 wa->wa_descr = wa_descr = (struct usb_wa_descriptor *) hdr; 608 608 if (le16_to_cpu(wa_descr->bcdWAVersion) > 0x0100) 609 609 dev_warn(dev, "Wire Adapter v%d.%d newer than groked v1.0\n", 610 - le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00 >> 8, 610 + (le16_to_cpu(wa_descr->bcdWAVersion) & 0xff00) >> 8, 611 611 le16_to_cpu(wa_descr->bcdWAVersion) & 0x00ff); 612 612 result = 0; 613 613 error:
+4 -14
drivers/usb/host/xhci-pci.c
··· 128 128 xhci->quirks |= XHCI_AVOID_BEI; 129 129 } 130 130 if (pdev->vendor == PCI_VENDOR_ID_INTEL && 131 - (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI || 132 - pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI)) { 133 - /* Workaround for occasional spurious wakeups from S5 (or 134 - * any other sleep) on Haswell machines with LPT and LPT-LP 135 - * with the new Intel BIOS 136 - */ 137 - /* Limit the quirk to only known vendors, as this triggers 138 - * yet another BIOS bug on some other machines 139 - * https://bugzilla.kernel.org/show_bug.cgi?id=66171 140 - */ 141 - if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP) 142 - xhci->quirks |= XHCI_SPURIOUS_WAKEUP; 143 - } 144 - if (pdev->vendor == PCI_VENDOR_ID_INTEL && 145 131 pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI) { 146 132 xhci->quirks |= XHCI_SPURIOUS_REBOOT; 147 133 } ··· 146 160 /* See https://bugzilla.kernel.org/show_bug.cgi?id=79511 */ 147 161 if (pdev->vendor == PCI_VENDOR_ID_VIA && 148 162 pdev->device == 0x3432) 163 + xhci->quirks |= XHCI_BROKEN_STREAMS; 164 + 165 + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && 166 + pdev->device == 0x1042) 149 167 xhci->quirks |= XHCI_BROKEN_STREAMS; 150 168 151 169 if (xhci->quirks & XHCI_RESET_ON_RESUME)
+3 -2
drivers/usb/serial/kobil_sct.c
··· 335 335 port->interrupt_out_urb->transfer_buffer_length = length; 336 336 337 337 priv->cur_pos = priv->cur_pos + length; 338 - result = usb_submit_urb(port->interrupt_out_urb, GFP_NOIO); 338 + result = usb_submit_urb(port->interrupt_out_urb, 339 + GFP_ATOMIC); 339 340 dev_dbg(&port->dev, "%s - Send write URB returns: %i\n", __func__, result); 340 341 todo = priv->filled - priv->cur_pos; 341 342 ··· 351 350 if (priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || 352 351 priv->device_type == KOBIL_ADAPTER_K_PRODUCT_ID) { 353 352 result = usb_submit_urb(port->interrupt_in_urb, 354 - GFP_NOIO); 353 + GFP_ATOMIC); 355 354 dev_dbg(&port->dev, "%s - Send read URB returns: %i\n", __func__, result); 356 355 } 357 356 }
+1 -1
drivers/usb/serial/opticon.c
··· 215 215 216 216 /* The connected devices do not have a bulk write endpoint, 217 217 * to transmit data to de barcode device the control endpoint is used */ 218 - dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); 218 + dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC); 219 219 if (!dr) { 220 220 count = -ENOMEM; 221 221 goto error_no_dr;
+2 -2
drivers/usb/storage/initializers.c
··· 52 52 us->iobuf[0] = 0x1; 53 53 result = usb_stor_control_msg(us, us->send_ctrl_pipe, 54 54 0x0C, USB_RECIP_INTERFACE | USB_TYPE_VENDOR, 55 - 0x01, 0x0, us->iobuf, 0x1, USB_CTRL_SET_TIMEOUT); 55 + 0x01, 0x0, us->iobuf, 0x1, 5 * HZ); 56 56 usb_stor_dbg(us, "-- result is %d\n", result); 57 57 58 58 return 0; ··· 100 100 result = usb_stor_control_msg(us, us->send_ctrl_pipe, 101 101 USB_REQ_SET_FEATURE, 102 102 USB_TYPE_STANDARD | USB_RECIP_DEVICE, 103 - 0x01, 0x0, NULL, 0x0, 1000); 103 + 0x01, 0x0, NULL, 0x0, 1 * HZ); 104 104 usb_stor_dbg(us, "Huawei mode set result is %d\n", result); 105 105 return 0; 106 106 }
+2
drivers/usb/storage/realtek_cr.c
··· 626 626 return 0; 627 627 } 628 628 629 + #ifdef CONFIG_PM 629 630 static int config_autodelink_before_power_down(struct us_data *us) 630 631 { 631 632 struct rts51x_chip *chip = (struct rts51x_chip *)(us->extra); ··· 717 716 } 718 717 } 719 718 } 719 + #endif 720 720 721 721 #ifdef CONFIG_REALTEK_AUTOPM 722 722 static void fw5895_set_mmc_wp(struct us_data *us)
+26
drivers/usb/storage/transport.c
··· 1118 1118 */ 1119 1119 if (result == USB_STOR_XFER_LONG) 1120 1120 fake_sense = 1; 1121 + 1122 + /* 1123 + * Sometimes a device will mistakenly skip the data phase 1124 + * and go directly to the status phase without sending a 1125 + * zero-length packet. If we get a 13-byte response here, 1126 + * check whether it really is a CSW. 1127 + */ 1128 + if (result == USB_STOR_XFER_SHORT && 1129 + srb->sc_data_direction == DMA_FROM_DEVICE && 1130 + transfer_length - scsi_get_resid(srb) == 1131 + US_BULK_CS_WRAP_LEN) { 1132 + struct scatterlist *sg = NULL; 1133 + unsigned int offset = 0; 1134 + 1135 + if (usb_stor_access_xfer_buf((unsigned char *) bcs, 1136 + US_BULK_CS_WRAP_LEN, srb, &sg, 1137 + &offset, FROM_XFER_BUF) == 1138 + US_BULK_CS_WRAP_LEN && 1139 + bcs->Signature == 1140 + cpu_to_le32(US_BULK_CS_SIGN)) { 1141 + usb_stor_dbg(us, "Device skipped data phase\n"); 1142 + scsi_set_resid(srb, transfer_length); 1143 + goto skipped_data_phase; 1144 + } 1145 + } 1121 1146 } 1122 1147 1123 1148 /* See flow chart on pg 15 of the Bulk Only Transport spec for ··· 1178 1153 if (result != USB_STOR_XFER_GOOD) 1179 1154 return USB_STOR_TRANSPORT_ERROR; 1180 1155 1156 + skipped_data_phase: 1181 1157 /* check bulk status */ 1182 1158 residue = le32_to_cpu(bcs->Residue); 1183 1159 usb_stor_dbg(us, "Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
+28
drivers/usb/storage/unusual_uas.h
··· 54 54 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 55 55 US_FL_NO_ATA_1X), 56 56 57 + /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ 58 + UNUSUAL_DEV(0x0bc2, 0x3320, 0x0000, 0x9999, 59 + "Seagate", 60 + "Expansion Desk", 61 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 62 + US_FL_NO_ATA_1X), 63 + 64 + /* Reported-by: Bogdan Mihalcea <bogdan.mihalcea@infim.ro> */ 65 + UNUSUAL_DEV(0x0bc2, 0xa003, 0x0000, 0x9999, 66 + "Seagate", 67 + "Backup Plus", 68 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 69 + US_FL_NO_ATA_1X), 70 + 57 71 /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ 58 72 UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, 73 + "Seagate", 74 + "Backup+ BK", 75 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 76 + US_FL_NO_ATA_1X), 77 + 78 + /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ 79 + UNUSUAL_DEV(0x0bc2, 0xab21, 0x0000, 0x9999, 59 80 "Seagate", 60 81 "Backup+ BK", 61 82 USB_SC_DEVICE, USB_PR_DEVICE, NULL, ··· 96 75 "ASM1051", 97 76 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 98 77 US_FL_IGNORE_UAS), 78 + 79 + /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ 80 + UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, 81 + "VIA", 82 + "VL711", 83 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 84 + US_FL_NO_ATA_1X),