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-4.10-rc7' 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 some reported issues, and the usual
number of new device ids for 4.10-rc7.

All of these, except the last new device id, have been in linux-next
for a while with no reported issues"

* tag 'usb-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: serial: pl2303: add ATEN device ID
usb: gadget: f_fs: Assorted buffer overflow checks.
USB: Add quirk for WORLDE easykey.25 MIDI keyboard
usb: musb: Fix external abort on non-linefetch for musb_irq_work()
usb: musb: Fix host mode error -71 regression
USB: serial: option: add device ID for HP lt2523 (Novatel E371)
USB: serial: qcserial: add Dell DW5570 QDL

+33 -15
+4
drivers/usb/core/quirks.c
··· 37 37 /* CBM - Flash disk */ 38 38 { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, 39 39 40 + /* WORLDE easy key (easykey.25) MIDI controller */ 41 + { USB_DEVICE(0x0218, 0x0401), .driver_info = 42 + USB_QUIRK_CONFIG_INTF_STRINGS }, 43 + 40 44 /* HP 5300/5370C scanner */ 41 45 { USB_DEVICE(0x03f0, 0x0701), .driver_info = 42 46 USB_QUIRK_STRING_FETCH_255 },
+12 -1
drivers/usb/gadget/function/f_fs.c
··· 2269 2269 if (len < sizeof(*d) || h->interface >= ffs->interfaces_count) 2270 2270 return -EINVAL; 2271 2271 length = le32_to_cpu(d->dwSize); 2272 + if (len < length) 2273 + return -EINVAL; 2272 2274 type = le32_to_cpu(d->dwPropertyDataType); 2273 2275 if (type < USB_EXT_PROP_UNICODE || 2274 2276 type > USB_EXT_PROP_UNICODE_MULTI) { ··· 2279 2277 return -EINVAL; 2280 2278 } 2281 2279 pnl = le16_to_cpu(d->wPropertyNameLength); 2280 + if (length < 14 + pnl) { 2281 + pr_vdebug("invalid os descriptor length: %d pnl:%d (descriptor %d)\n", 2282 + length, pnl, type); 2283 + return -EINVAL; 2284 + } 2282 2285 pdl = le32_to_cpu(*(u32 *)((u8 *)data + 10 + pnl)); 2283 2286 if (length != 14 + pnl + pdl) { 2284 2287 pr_vdebug("invalid os descriptor length: %d pnl:%d pdl:%d (descriptor %d)\n", ··· 2370 2363 } 2371 2364 } 2372 2365 if (flags & (1 << i)) { 2366 + if (len < 4) { 2367 + goto error; 2368 + } 2373 2369 os_descs_count = get_unaligned_le32(data); 2374 2370 data += 4; 2375 2371 len -= 4; ··· 2445 2435 2446 2436 ENTER(); 2447 2437 2448 - if (unlikely(get_unaligned_le32(data) != FUNCTIONFS_STRINGS_MAGIC || 2438 + if (unlikely(len < 16 || 2439 + get_unaligned_le32(data) != FUNCTIONFS_STRINGS_MAGIC || 2449 2440 get_unaligned_le32(data + 4) != len)) 2450 2441 goto error; 2451 2442 str_count = get_unaligned_le32(data + 8);
+13 -13
drivers/usb/musb/musb_core.c
··· 594 594 | MUSB_PORT_STAT_RESUME; 595 595 musb->rh_timer = jiffies 596 596 + msecs_to_jiffies(USB_RESUME_TIMEOUT); 597 - musb->need_finish_resume = 1; 598 - 599 597 musb->xceiv->otg->state = OTG_STATE_A_HOST; 600 598 musb->is_active = 1; 601 599 musb_host_resume_root_hub(musb); 600 + schedule_delayed_work(&musb->finish_resume_work, 601 + msecs_to_jiffies(USB_RESUME_TIMEOUT)); 602 602 break; 603 603 case OTG_STATE_B_WAIT_ACON: 604 604 musb->xceiv->otg->state = OTG_STATE_B_PERIPHERAL; ··· 1925 1925 static void musb_irq_work(struct work_struct *data) 1926 1926 { 1927 1927 struct musb *musb = container_of(data, struct musb, irq_work.work); 1928 + int error; 1929 + 1930 + error = pm_runtime_get_sync(musb->controller); 1931 + if (error < 0) { 1932 + dev_err(musb->controller, "Could not enable: %i\n", error); 1933 + 1934 + return; 1935 + } 1928 1936 1929 1937 musb_pm_runtime_check_session(musb); 1930 1938 ··· 1940 1932 musb->xceiv_old_state = musb->xceiv->otg->state; 1941 1933 sysfs_notify(&musb->controller->kobj, NULL, "mode"); 1942 1934 } 1935 + 1936 + pm_runtime_mark_last_busy(musb->controller); 1937 + pm_runtime_put_autosuspend(musb->controller); 1943 1938 } 1944 1939 1945 1940 static void musb_recover_from_babble(struct musb *musb) ··· 2721 2710 mask = MUSB_DEVCTL_BDEVICE | MUSB_DEVCTL_FSDEV | MUSB_DEVCTL_LSDEV; 2722 2711 if ((devctl & mask) != (musb->context.devctl & mask)) 2723 2712 musb->port1_status = 0; 2724 - if (musb->need_finish_resume) { 2725 - musb->need_finish_resume = 0; 2726 - schedule_delayed_work(&musb->finish_resume_work, 2727 - msecs_to_jiffies(USB_RESUME_TIMEOUT)); 2728 - } 2729 2713 2730 2714 /* 2731 2715 * The USB HUB code expects the device to be in RPM_ACTIVE once it came ··· 2771 2765 return 0; 2772 2766 2773 2767 musb_restore_context(musb); 2774 - 2775 - if (musb->need_finish_resume) { 2776 - musb->need_finish_resume = 0; 2777 - schedule_delayed_work(&musb->finish_resume_work, 2778 - msecs_to_jiffies(USB_RESUME_TIMEOUT)); 2779 - } 2780 2768 2781 2769 spin_lock_irqsave(&musb->lock, flags); 2782 2770 error = musb_run_resume_work(musb);
-1
drivers/usb/musb/musb_core.h
··· 410 410 411 411 /* is_suspended means USB B_PERIPHERAL suspend */ 412 412 unsigned is_suspended:1; 413 - unsigned need_finish_resume :1; 414 413 415 414 /* may_wakeup means remote wakeup is enabled */ 416 415 unsigned may_wakeup:1;
+1
drivers/usb/serial/option.c
··· 2007 2007 { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) }, 2008 2008 { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) }, 2009 2009 { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) }, 2010 + { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */ 2010 2011 { } /* Terminating entry */ 2011 2012 }; 2012 2013 MODULE_DEVICE_TABLE(usb, option_ids);
+1
drivers/usb/serial/pl2303.c
··· 49 49 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, 50 50 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, 51 51 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, 52 + { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) }, 52 53 { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, 53 54 { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, 54 55 { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID_UCSGT) },
+1
drivers/usb/serial/pl2303.h
··· 27 27 #define ATEN_VENDOR_ID 0x0557 28 28 #define ATEN_VENDOR_ID2 0x0547 29 29 #define ATEN_PRODUCT_ID 0x2008 30 + #define ATEN_PRODUCT_ID2 0x2118 30 31 31 32 #define IODATA_VENDOR_ID 0x04bb 32 33 #define IODATA_PRODUCT_ID 0x0a03
+1
drivers/usb/serial/qcserial.c
··· 124 124 {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ 125 125 {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ 126 126 {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ 127 + {USB_DEVICE(0x413c, 0x81a6)}, /* Dell DW5570 QDL (MC8805) */ 127 128 {USB_DEVICE(0x1199, 0x68a4)}, /* Sierra Wireless QDL */ 128 129 {USB_DEVICE(0x1199, 0x68a5)}, /* Sierra Wireless Modem */ 129 130 {USB_DEVICE(0x1199, 0x68a8)}, /* Sierra Wireless QDL */