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.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are some small USB fixes for 3.11-rc6 that have accumulated.

Nothing huge, a EHCI fix that solves a much-reported audio USB
problem, some usb-serial driver endian fixes and other minor fixes, a
wireless USB oops fix, and two new quirks"

* tag 'usb-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: keyspan: fix null-deref at disconnect and release
USB: mos7720: fix broken control requests
usb: add two quirky touchscreen
USB: ti_usb_3410_5052: fix big-endian firmware handling
USB: adutux: fix big-endian device-type reporting
USB: usbtmc: fix big-endian probe of Rigol devices
USB: mos7840: fix big-endian probe
USB-Serial: Fix error handling of usb_wwan
wusbcore: fix kernel panic when disconnecting a wireless USB->serial device
USB: EHCI: accept very late isochronous URBs

+55 -37
+4 -4
drivers/usb/class/usbtmc.c
··· 1119 1119 /* Determine if it is a Rigol or not */ 1120 1120 data->rigol_quirk = 0; 1121 1121 dev_dbg(&intf->dev, "Trying to find if device Vendor 0x%04X Product 0x%04X has the RIGOL quirk\n", 1122 - data->usb_dev->descriptor.idVendor, 1123 - data->usb_dev->descriptor.idProduct); 1122 + le16_to_cpu(data->usb_dev->descriptor.idVendor), 1123 + le16_to_cpu(data->usb_dev->descriptor.idProduct)); 1124 1124 for(n = 0; usbtmc_id_quirk[n].idVendor > 0; n++) { 1125 - if ((usbtmc_id_quirk[n].idVendor == data->usb_dev->descriptor.idVendor) && 1126 - (usbtmc_id_quirk[n].idProduct == data->usb_dev->descriptor.idProduct)) { 1125 + if ((usbtmc_id_quirk[n].idVendor == le16_to_cpu(data->usb_dev->descriptor.idVendor)) && 1126 + (usbtmc_id_quirk[n].idProduct == le16_to_cpu(data->usb_dev->descriptor.idProduct))) { 1127 1127 dev_dbg(&intf->dev, "Setting this device as having the RIGOL quirk\n"); 1128 1128 data->rigol_quirk = 1; 1129 1129 break;
+6
drivers/usb/core/quirks.c
··· 78 78 { USB_DEVICE(0x04d8, 0x000c), .driver_info = 79 79 USB_QUIRK_CONFIG_INTF_STRINGS }, 80 80 81 + /* CarrolTouch 4000U */ 82 + { USB_DEVICE(0x04e7, 0x0009), .driver_info = USB_QUIRK_RESET_RESUME }, 83 + 84 + /* CarrolTouch 4500U */ 85 + { USB_DEVICE(0x04e7, 0x0030), .driver_info = USB_QUIRK_RESET_RESUME }, 86 + 81 87 /* Samsung Android phone modem - ID conflict with SPH-I500 */ 82 88 { USB_DEVICE(0x04e8, 0x6601), .driver_info = 83 89 USB_QUIRK_CONFIG_INTF_STRINGS },
+6 -7
drivers/usb/host/ehci-sched.c
··· 1391 1391 1392 1392 /* Behind the scheduling threshold? */ 1393 1393 if (unlikely(start < next)) { 1394 + unsigned now2 = (now - base) & (mod - 1); 1394 1395 1395 1396 /* USB_ISO_ASAP: Round up to the first available slot */ 1396 1397 if (urb->transfer_flags & URB_ISO_ASAP) 1397 1398 start += (next - start + period - 1) & -period; 1398 1399 1399 1400 /* 1400 - * Not ASAP: Use the next slot in the stream. If 1401 - * the entire URB falls before the threshold, fail. 1401 + * Not ASAP: Use the next slot in the stream, 1402 + * no matter what. 1402 1403 */ 1403 - else if (start + span - period < next) { 1404 - ehci_dbg(ehci, "iso urb late %p (%u+%u < %u)\n", 1404 + else if (start + span - period < now2) { 1405 + ehci_dbg(ehci, "iso underrun %p (%u+%u < %u)\n", 1405 1406 urb, start + base, 1406 - span - period, next + base); 1407 - status = -EXDEV; 1408 - goto fail; 1407 + span - period, now2 + base); 1409 1408 } 1410 1409 } 1411 1410
+1 -1
drivers/usb/misc/adutux.c
··· 830 830 831 831 /* let the user know what node this device is now attached to */ 832 832 dev_info(&interface->dev, "ADU%d %s now attached to /dev/usb/adutux%d\n", 833 - udev->descriptor.idProduct, dev->serial_number, 833 + le16_to_cpu(udev->descriptor.idProduct), dev->serial_number, 834 834 (dev->minor - ADU_MINOR_BASE)); 835 835 exit: 836 836 dbg(2, " %s : leave, return value %p (dev)", __func__, dev);
+1 -1
drivers/usb/serial/keyspan.c
··· 2303 2303 if (d_details == NULL) { 2304 2304 dev_err(&serial->dev->dev, "%s - unknown product id %x\n", 2305 2305 __func__, le16_to_cpu(serial->dev->descriptor.idProduct)); 2306 - return 1; 2306 + return -ENODEV; 2307 2307 } 2308 2308 2309 2309 /* Setup private data for serial driver */
+14 -7
drivers/usb/serial/mos7720.c
··· 90 90 struct list_head urblist_entry; 91 91 struct kref ref_count; 92 92 struct urb *urb; 93 + struct usb_ctrlrequest *setup; 93 94 }; 94 95 95 96 enum mos7715_pp_modes { ··· 272 271 struct mos7715_parport *mos_parport = urbtrack->mos_parport; 273 272 274 273 usb_free_urb(urbtrack->urb); 274 + kfree(urbtrack->setup); 275 275 kfree(urbtrack); 276 276 kref_put(&mos_parport->ref_count, destroy_mos_parport); 277 277 } ··· 357 355 struct urbtracker *urbtrack; 358 356 int ret_val; 359 357 unsigned long flags; 360 - struct usb_ctrlrequest setup; 361 358 struct usb_serial *serial = mos_parport->serial; 362 359 struct usb_device *usbdev = serial->dev; 363 360 ··· 374 373 kfree(urbtrack); 375 374 return -ENOMEM; 376 375 } 377 - setup.bRequestType = (__u8)0x40; 378 - setup.bRequest = (__u8)0x0e; 379 - setup.wValue = get_reg_value(reg, dummy); 380 - setup.wIndex = get_reg_index(reg); 381 - setup.wLength = 0; 376 + urbtrack->setup = kmalloc(sizeof(*urbtrack->setup), GFP_KERNEL); 377 + if (!urbtrack->setup) { 378 + usb_free_urb(urbtrack->urb); 379 + kfree(urbtrack); 380 + return -ENOMEM; 381 + } 382 + urbtrack->setup->bRequestType = (__u8)0x40; 383 + urbtrack->setup->bRequest = (__u8)0x0e; 384 + urbtrack->setup->wValue = get_reg_value(reg, dummy); 385 + urbtrack->setup->wIndex = get_reg_index(reg); 386 + urbtrack->setup->wLength = 0; 382 387 usb_fill_control_urb(urbtrack->urb, usbdev, 383 388 usb_sndctrlpipe(usbdev, 0), 384 - (unsigned char *)&setup, 389 + (unsigned char *)urbtrack->setup, 385 390 NULL, 0, async_complete, urbtrack); 386 391 kref_init(&urbtrack->ref_count); 387 392 INIT_LIST_HEAD(&urbtrack->urblist_entry);
+1 -1
drivers/usb/serial/mos7840.c
··· 2193 2193 static int mos7840_probe(struct usb_serial *serial, 2194 2194 const struct usb_device_id *id) 2195 2195 { 2196 - u16 product = serial->dev->descriptor.idProduct; 2196 + u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); 2197 2197 u8 *buf; 2198 2198 int device_type; 2199 2199
+5 -4
drivers/usb/serial/ti_usb_3410_5052.c
··· 1536 1536 char buf[32]; 1537 1537 1538 1538 /* try ID specific firmware first, then try generic firmware */ 1539 - sprintf(buf, "ti_usb-v%04x-p%04x.fw", dev->descriptor.idVendor, 1540 - dev->descriptor.idProduct); 1539 + sprintf(buf, "ti_usb-v%04x-p%04x.fw", 1540 + le16_to_cpu(dev->descriptor.idVendor), 1541 + le16_to_cpu(dev->descriptor.idProduct)); 1541 1542 status = request_firmware(&fw_p, buf, &dev->dev); 1542 1543 1543 1544 if (status != 0) { 1544 1545 buf[0] = '\0'; 1545 - if (dev->descriptor.idVendor == MTS_VENDOR_ID) { 1546 - switch (dev->descriptor.idProduct) { 1546 + if (le16_to_cpu(dev->descriptor.idVendor) == MTS_VENDOR_ID) { 1547 + switch (le16_to_cpu(dev->descriptor.idProduct)) { 1547 1548 case MTS_CDMA_PRODUCT_ID: 1548 1549 strcpy(buf, "mts_cdma.fw"); 1549 1550 break;
+10 -10
drivers/usb/serial/usb_wwan.c
··· 291 291 tty_flip_buffer_push(&port->port); 292 292 } else 293 293 dev_dbg(dev, "%s: empty read urb received\n", __func__); 294 - 295 - /* Resubmit urb so we continue receiving */ 296 - err = usb_submit_urb(urb, GFP_ATOMIC); 297 - if (err) { 298 - if (err != -EPERM) { 299 - dev_err(dev, "%s: resubmit read urb failed. (%d)\n", __func__, err); 300 - /* busy also in error unless we are killed */ 301 - usb_mark_last_busy(port->serial->dev); 302 - } 303 - } else { 294 + } 295 + /* Resubmit urb so we continue receiving */ 296 + err = usb_submit_urb(urb, GFP_ATOMIC); 297 + if (err) { 298 + if (err != -EPERM) { 299 + dev_err(dev, "%s: resubmit read urb failed. (%d)\n", 300 + __func__, err); 301 + /* busy also in error unless we are killed */ 304 302 usb_mark_last_busy(port->serial->dev); 305 303 } 304 + } else { 305 + usb_mark_last_busy(port->serial->dev); 306 306 } 307 307 } 308 308
+7 -2
drivers/usb/wusbcore/wa-xfer.c
··· 1226 1226 } 1227 1227 spin_lock_irqsave(&xfer->lock, flags); 1228 1228 rpipe = xfer->ep->hcpriv; 1229 + if (rpipe == NULL) { 1230 + pr_debug("%s: xfer id 0x%08X has no RPIPE. %s", 1231 + __func__, wa_xfer_id(xfer), 1232 + "Probably already aborted.\n" ); 1233 + goto out_unlock; 1234 + } 1229 1235 /* Check the delayed list -> if there, release and complete */ 1230 1236 spin_lock_irqsave(&wa->xfer_list_lock, flags2); 1231 1237 if (!list_empty(&xfer->list_node) && xfer->seg == NULL) ··· 1650 1644 break; 1651 1645 } 1652 1646 usb_status = xfer_result->bTransferStatus & 0x3f; 1653 - if (usb_status == WA_XFER_STATUS_ABORTED 1654 - || usb_status == WA_XFER_STATUS_NOT_FOUND) 1647 + if (usb_status == WA_XFER_STATUS_NOT_FOUND) 1655 1648 /* taken care of already */ 1656 1649 break; 1657 1650 xfer_id = xfer_result->dwTransferID;