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 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (45 commits)
USB: gadget/multi: cdc_do_config: remove redundant check
usb: r8a66597-hcd: fix removed from an attached hub
USB: xhci: Make endpoint interval debugging clearer.
USB: Fix usb_fill_int_urb for SuperSpeed devices
USB: cp210x: Remove double usb_control_msg from cp210x_set_config
USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
USB: gadget: add gadget controller number for s3c-hsotg driver
USB: ftdi_sio: Fix locking for change_speed() function
USB: g_mass_storage: fixed module name in Kconfig
USB: gadget: f_mass_storage::fsg_bind(): fix error handling
USB: g_mass_storage: fix section mismatch warnings
USB: gadget: fix Blackfin builds after gadget cleansing
USB: goku_udc: remove potential null dereference
USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
USB: serial: Fix module name typo for qcaux Kconfig entry.
usb: cdc-wdm: Fix deadlock between write and resume
usb: cdc-wdm: Fix order in disconnect and fix locking
usb: cdc-wdm:Fix loss of data due to autosuspend
usb: cdc-wdm: Fix submission of URB after suspension
usb: cdc-wdm: Fix race between disconnect and debug messages
...

+336 -149
+1 -1
Documentation/ABI/testing/sysfs-bus-usb
··· 160 160 match the driver to the device. For example: 161 161 # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id 162 162 163 - What: /sys/bus/usb/device/.../avoid_reset 163 + What: /sys/bus/usb/device/.../avoid_reset_quirk 164 164 Date: December 2009 165 165 Contact: Oliver Neukum <oliver@neukum.org> 166 166 Description:
+1 -1
drivers/usb/class/cdc-acm.c
··· 1441 1441 wb = acm->delayed_wb; 1442 1442 acm->delayed_wb = NULL; 1443 1443 spin_unlock_irq(&acm->write_lock); 1444 - acm_start_wb(acm, acm->delayed_wb); 1444 + acm_start_wb(acm, wb); 1445 1445 } else { 1446 1446 spin_unlock_irq(&acm->write_lock); 1447 1447 }
+79 -57
drivers/usb/class/cdc-wdm.c
··· 52 52 #define WDM_READ 4 53 53 #define WDM_INT_STALL 5 54 54 #define WDM_POLL_RUNNING 6 55 - 55 + #define WDM_RESPONDING 7 56 + #define WDM_SUSPENDING 8 56 57 57 58 #define WDM_MAX 16 58 59 ··· 88 87 int count; 89 88 dma_addr_t shandle; 90 89 dma_addr_t ihandle; 91 - struct mutex wlock; 92 - struct mutex rlock; 93 - struct mutex plock; 90 + struct mutex lock; 94 91 wait_queue_head_t wait; 95 92 struct work_struct rxwork; 96 93 int werr; ··· 116 117 int status = urb->status; 117 118 118 119 spin_lock(&desc->iuspin); 120 + clear_bit(WDM_RESPONDING, &desc->flags); 119 121 120 122 if (status) { 121 123 switch (status) { 122 124 case -ENOENT: 123 125 dev_dbg(&desc->intf->dev, 124 126 "nonzero urb status received: -ENOENT"); 125 - break; 127 + goto skip_error; 126 128 case -ECONNRESET: 127 129 dev_dbg(&desc->intf->dev, 128 130 "nonzero urb status received: -ECONNRESET"); 129 - break; 131 + goto skip_error; 130 132 case -ESHUTDOWN: 131 133 dev_dbg(&desc->intf->dev, 132 134 "nonzero urb status received: -ESHUTDOWN"); 133 - break; 135 + goto skip_error; 134 136 case -EPIPE: 135 137 dev_err(&desc->intf->dev, 136 138 "nonzero urb status received: -EPIPE\n"); ··· 147 147 desc->reslength = urb->actual_length; 148 148 memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength); 149 149 desc->length += desc->reslength; 150 + skip_error: 150 151 wake_up(&desc->wait); 151 152 152 153 set_bit(WDM_READ, &desc->flags); ··· 230 229 desc->response->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 231 230 spin_lock(&desc->iuspin); 232 231 clear_bit(WDM_READ, &desc->flags); 233 - if (!test_bit(WDM_DISCONNECTING, &desc->flags)) { 232 + set_bit(WDM_RESPONDING, &desc->flags); 233 + if (!test_bit(WDM_DISCONNECTING, &desc->flags) 234 + && !test_bit(WDM_SUSPENDING, &desc->flags)) { 234 235 rv = usb_submit_urb(desc->response, GFP_ATOMIC); 235 236 dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d", 236 237 __func__, rv); 237 238 } 238 239 spin_unlock(&desc->iuspin); 239 240 if (rv < 0) { 241 + clear_bit(WDM_RESPONDING, &desc->flags); 240 242 if (rv == -EPERM) 241 243 return; 242 244 if (rv == -ENOMEM) { ··· 309 305 if (we < 0) 310 306 return -EIO; 311 307 312 - r = mutex_lock_interruptible(&desc->wlock); /* concurrent writes */ 313 - rv = -ERESTARTSYS; 314 - if (r) 308 + desc->outbuf = buf = kmalloc(count, GFP_KERNEL); 309 + if (!buf) { 310 + rv = -ENOMEM; 315 311 goto outnl; 312 + } 313 + 314 + r = copy_from_user(buf, buffer, count); 315 + if (r > 0) { 316 + kfree(buf); 317 + rv = -EFAULT; 318 + goto outnl; 319 + } 320 + 321 + /* concurrent writes and disconnect */ 322 + r = mutex_lock_interruptible(&desc->lock); 323 + rv = -ERESTARTSYS; 324 + if (r) { 325 + kfree(buf); 326 + goto outnl; 327 + } 328 + 329 + if (test_bit(WDM_DISCONNECTING, &desc->flags)) { 330 + kfree(buf); 331 + rv = -ENODEV; 332 + goto outnp; 333 + } 316 334 317 335 r = usb_autopm_get_interface(desc->intf); 318 - if (r < 0) 336 + if (r < 0) { 337 + kfree(buf); 319 338 goto outnp; 339 + } 320 340 321 341 if (!file->f_flags && O_NONBLOCK) 322 342 r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE, ··· 348 320 else 349 321 if (test_bit(WDM_IN_USE, &desc->flags)) 350 322 r = -EAGAIN; 351 - if (r < 0) 352 - goto out; 353 - 354 - if (test_bit(WDM_DISCONNECTING, &desc->flags)) { 355 - rv = -ENODEV; 356 - goto out; 357 - } 358 - 359 - desc->outbuf = buf = kmalloc(count, GFP_KERNEL); 360 - if (!buf) { 361 - rv = -ENOMEM; 362 - goto out; 363 - } 364 - 365 - r = copy_from_user(buf, buffer, count); 366 - if (r > 0) { 323 + if (r < 0) { 367 324 kfree(buf); 368 - rv = -EFAULT; 369 325 goto out; 370 326 } 371 327 ··· 386 374 out: 387 375 usb_autopm_put_interface(desc->intf); 388 376 outnp: 389 - mutex_unlock(&desc->wlock); 377 + mutex_unlock(&desc->lock); 390 378 outnl: 391 379 return rv < 0 ? rv : count; 392 380 } ··· 399 387 struct wdm_device *desc = file->private_data; 400 388 401 389 402 - rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */ 390 + rv = mutex_lock_interruptible(&desc->lock); /*concurrent reads */ 403 391 if (rv < 0) 404 392 return -ERESTARTSYS; 405 393 ··· 436 424 spin_lock_irq(&desc->iuspin); 437 425 438 426 if (desc->rerr) { /* read completed, error happened */ 439 - int t = desc->rerr; 440 427 desc->rerr = 0; 441 428 spin_unlock_irq(&desc->iuspin); 442 - dev_err(&desc->intf->dev, 443 - "reading had resulted in %d\n", t); 444 429 rv = -EIO; 445 430 goto err; 446 431 } ··· 474 465 rv = cntr; 475 466 476 467 err: 477 - mutex_unlock(&desc->rlock); 478 - if (rv < 0 && rv != -EAGAIN) 479 - dev_err(&desc->intf->dev, "wdm_read: exit error\n"); 468 + mutex_unlock(&desc->lock); 480 469 return rv; 481 470 } 482 471 ··· 540 533 } 541 534 intf->needs_remote_wakeup = 1; 542 535 543 - mutex_lock(&desc->plock); 536 + mutex_lock(&desc->lock); 544 537 if (!desc->count++) { 545 538 rv = usb_submit_urb(desc->validity, GFP_KERNEL); 546 539 if (rv < 0) { ··· 551 544 } else { 552 545 rv = 0; 553 546 } 554 - mutex_unlock(&desc->plock); 547 + mutex_unlock(&desc->lock); 555 548 usb_autopm_put_interface(desc->intf); 556 549 out: 557 550 mutex_unlock(&wdm_mutex); ··· 563 556 struct wdm_device *desc = file->private_data; 564 557 565 558 mutex_lock(&wdm_mutex); 566 - mutex_lock(&desc->plock); 559 + mutex_lock(&desc->lock); 567 560 desc->count--; 568 - mutex_unlock(&desc->plock); 561 + mutex_unlock(&desc->lock); 569 562 570 563 if (!desc->count) { 571 564 dev_dbg(&desc->intf->dev, "wdm_release: cleanup"); ··· 662 655 desc = kzalloc(sizeof(struct wdm_device), GFP_KERNEL); 663 656 if (!desc) 664 657 goto out; 665 - mutex_init(&desc->wlock); 666 - mutex_init(&desc->rlock); 667 - mutex_init(&desc->plock); 658 + mutex_init(&desc->lock); 668 659 spin_lock_init(&desc->iuspin); 669 660 init_waitqueue_head(&desc->wait); 670 661 desc->wMaxCommand = maxcom; ··· 776 771 /* to terminate pending flushes */ 777 772 clear_bit(WDM_IN_USE, &desc->flags); 778 773 spin_unlock_irqrestore(&desc->iuspin, flags); 779 - cancel_work_sync(&desc->rxwork); 774 + mutex_lock(&desc->lock); 780 775 kill_urbs(desc); 776 + cancel_work_sync(&desc->rxwork); 777 + mutex_unlock(&desc->lock); 781 778 wake_up_all(&desc->wait); 782 779 if (!desc->count) 783 780 cleanup(desc); 784 781 mutex_unlock(&wdm_mutex); 785 782 } 786 783 784 + #ifdef CONFIG_PM 787 785 static int wdm_suspend(struct usb_interface *intf, pm_message_t message) 788 786 { 789 787 struct wdm_device *desc = usb_get_intfdata(intf); ··· 794 786 795 787 dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor); 796 788 797 - mutex_lock(&desc->plock); 798 - #ifdef CONFIG_PM 789 + /* if this is an autosuspend the caller does the locking */ 790 + if (!(message.event & PM_EVENT_AUTO)) 791 + mutex_lock(&desc->lock); 792 + spin_lock_irq(&desc->iuspin); 793 + 799 794 if ((message.event & PM_EVENT_AUTO) && 800 - test_bit(WDM_IN_USE, &desc->flags)) { 795 + (test_bit(WDM_IN_USE, &desc->flags) 796 + || test_bit(WDM_RESPONDING, &desc->flags))) { 797 + spin_unlock_irq(&desc->iuspin); 801 798 rv = -EBUSY; 802 799 } else { 803 - #endif 804 - cancel_work_sync(&desc->rxwork); 800 + 801 + set_bit(WDM_SUSPENDING, &desc->flags); 802 + spin_unlock_irq(&desc->iuspin); 803 + /* callback submits work - order is essential */ 805 804 kill_urbs(desc); 806 - #ifdef CONFIG_PM 805 + cancel_work_sync(&desc->rxwork); 807 806 } 808 - #endif 809 - mutex_unlock(&desc->plock); 807 + if (!(message.event & PM_EVENT_AUTO)) 808 + mutex_unlock(&desc->lock); 810 809 811 810 return rv; 812 811 } 812 + #endif 813 813 814 814 static int recover_from_urb_loss(struct wdm_device *desc) 815 815 { ··· 831 815 } 832 816 return rv; 833 817 } 818 + 819 + #ifdef CONFIG_PM 834 820 static int wdm_resume(struct usb_interface *intf) 835 821 { 836 822 struct wdm_device *desc = usb_get_intfdata(intf); 837 823 int rv; 838 824 839 825 dev_dbg(&desc->intf->dev, "wdm%d_resume\n", intf->minor); 840 - mutex_lock(&desc->plock); 826 + 827 + clear_bit(WDM_SUSPENDING, &desc->flags); 841 828 rv = recover_from_urb_loss(desc); 842 - mutex_unlock(&desc->plock); 829 + 843 830 return rv; 844 831 } 832 + #endif 845 833 846 834 static int wdm_pre_reset(struct usb_interface *intf) 847 835 { 848 836 struct wdm_device *desc = usb_get_intfdata(intf); 849 837 850 - mutex_lock(&desc->plock); 838 + mutex_lock(&desc->lock); 851 839 return 0; 852 840 } 853 841 ··· 861 841 int rv; 862 842 863 843 rv = recover_from_urb_loss(desc); 864 - mutex_unlock(&desc->plock); 844 + mutex_unlock(&desc->lock); 865 845 return 0; 866 846 } 867 847 ··· 869 849 .name = "cdc_wdm", 870 850 .probe = wdm_probe, 871 851 .disconnect = wdm_disconnect, 852 + #ifdef CONFIG_PM 872 853 .suspend = wdm_suspend, 873 854 .resume = wdm_resume, 874 855 .reset_resume = wdm_resume, 856 + #endif 875 857 .pre_reset = wdm_pre_reset, 876 858 .post_reset = wdm_post_reset, 877 859 .id_table = wdm_ids,
+14 -3
drivers/usb/core/devio.c
··· 1207 1207 free_async(as); 1208 1208 return -ENOMEM; 1209 1209 } 1210 + /* Isochronous input data may end up being discontiguous 1211 + * if some of the packets are short. Clear the buffer so 1212 + * that the gaps don't leak kernel data to userspace. 1213 + */ 1214 + if (is_in && uurb->type == USBDEVFS_URB_TYPE_ISO) 1215 + memset(as->urb->transfer_buffer, 0, 1216 + uurb->buffer_length); 1210 1217 } 1211 1218 as->urb->dev = ps->dev; 1212 1219 as->urb->pipe = (uurb->type << 30) | ··· 1352 1345 void __user *addr = as->userurb; 1353 1346 unsigned int i; 1354 1347 1355 - if (as->userbuffer && urb->actual_length) 1356 - if (copy_to_user(as->userbuffer, urb->transfer_buffer, 1357 - urb->actual_length)) 1348 + if (as->userbuffer && urb->actual_length) { 1349 + if (urb->number_of_packets > 0) /* Isochronous */ 1350 + i = urb->transfer_buffer_length; 1351 + else /* Non-Isoc */ 1352 + i = urb->actual_length; 1353 + if (copy_to_user(as->userbuffer, urb->transfer_buffer, i)) 1358 1354 goto err_out; 1355 + } 1359 1356 if (put_user(as->status, &userurb->status)) 1360 1357 goto err_out; 1361 1358 if (put_user(urb->actual_length, &userurb->actual_length))
+1
drivers/usb/core/urb.c
··· 453 453 if (urb->interval > (1 << 15)) 454 454 return -EINVAL; 455 455 max = 1 << 15; 456 + break; 456 457 case USB_SPEED_WIRELESS: 457 458 if (urb->interval > 16) 458 459 return -EINVAL;
+1 -1
drivers/usb/gadget/Kconfig
··· 747 747 which may be used with composite framework. 748 748 749 749 Say "y" to link the driver statically, or "m" to build 750 - a dynamically linked module called "g_file_storage". If unsure, 750 + a dynamically linked module called "g_mass_storage". If unsure, 751 751 consider File-backed Storage Gadget. 752 752 753 753 config USB_G_SERIAL
+1 -1
drivers/usb/gadget/epautoconf.c
··· 266 266 } 267 267 268 268 #ifdef CONFIG_BLACKFIN 269 - } else if (gadget_is_musbhsfc(gadget) || gadget_is_musbhdrc(gadget)) { 269 + } else if (gadget_is_musbhdrc(gadget)) { 270 270 if ((USB_ENDPOINT_XFER_BULK == type) || 271 271 (USB_ENDPOINT_XFER_ISOC == type)) { 272 272 if (USB_DIR_IN & desc->bEndpointAddress)
+1 -2
drivers/usb/gadget/f_mass_storage.c
··· 2910 2910 } 2911 2911 2912 2912 2913 - static int fsg_bind(struct usb_configuration *c, struct usb_function *f) 2913 + static int __init fsg_bind(struct usb_configuration *c, struct usb_function *f) 2914 2914 { 2915 2915 struct fsg_dev *fsg = fsg_from_func(f); 2916 2916 struct usb_gadget *gadget = c->cdev->gadget; ··· 2954 2954 autoconf_fail: 2955 2955 ERROR(fsg, "unable to autoconfigure all endpoints\n"); 2956 2956 rc = -ENOTSUPP; 2957 - fsg_unbind(c, f); 2958 2957 return rc; 2959 2958 } 2960 2959
+8
drivers/usb/gadget/gadget_chips.h
··· 136 136 #define gadget_is_r8a66597(g) 0 137 137 #endif 138 138 139 + #ifdef CONFIG_USB_S3C_HSOTG 140 + #define gadget_is_s3c_hsotg(g) (!strcmp("s3c-hsotg", (g)->name)) 141 + #else 142 + #define gadget_is_s3c_hsotg(g) 0 143 + #endif 144 + 139 145 140 146 /** 141 147 * usb_gadget_controller_number - support bcdDevice id convention ··· 198 192 return 0x24; 199 193 else if (gadget_is_r8a66597(gadget)) 200 194 return 0x25; 195 + else if (gadget_is_s3c_hsotg(gadget)) 196 + return 0x26; 201 197 return -ENOENT; 202 198 } 203 199
+1 -1
drivers/usb/gadget/goku_udc.c
··· 1768 1768 * usb_gadget_driver_{register,unregister}() must change. 1769 1769 */ 1770 1770 if (the_controller) { 1771 - WARNING(dev, "ignoring %s\n", pci_name(pdev)); 1771 + pr_warning("ignoring %s\n", pci_name(pdev)); 1772 1772 return -EBUSY; 1773 1773 } 1774 1774 if (!pdev->irq) {
-2
drivers/usb/gadget/multi.c
··· 211 211 ret = fsg_add(c->cdev, c, fsg_common); 212 212 if (ret < 0) 213 213 return ret; 214 - if (ret < 0) 215 - return ret; 216 214 217 215 return 0; 218 216 }
+1
drivers/usb/gadget/r8a66597-udc.c
··· 23 23 #include <linux/module.h> 24 24 #include <linux/interrupt.h> 25 25 #include <linux/delay.h> 26 + #include <linux/err.h> 26 27 #include <linux/io.h> 27 28 #include <linux/platform_device.h> 28 29 #include <linux/clk.h>
+2 -2
drivers/usb/host/Makefile
··· 12 12 ifeq ($(CONFIG_FHCI_DEBUG),y) 13 13 fhci-objs += fhci-dbg.o 14 14 endif 15 - xhci-objs := xhci-hcd.o xhci-mem.o xhci-pci.o xhci-ring.o xhci-hub.o xhci-dbg.o 15 + xhci-hcd-objs := xhci.o xhci-mem.o xhci-pci.o xhci-ring.o xhci-hub.o xhci-dbg.o 16 16 17 17 obj-$(CONFIG_USB_WHCI_HCD) += whci/ 18 18 ··· 25 25 obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o 26 26 obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o 27 27 obj-$(CONFIG_USB_FHCI_HCD) += fhci.o 28 - obj-$(CONFIG_USB_XHCI_HCD) += xhci.o 28 + obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o 29 29 obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o 30 30 obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o 31 31 obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o
+1 -1
drivers/usb/host/ehci-hcd.c
··· 995 995 /* endpoints can be iso streams. for now, we don't 996 996 * accelerate iso completions ... so spin a while. 997 997 */ 998 - if (qh->hw->hw_info1 == 0) { 998 + if (qh->hw == NULL) { 999 999 ehci_vdbg (ehci, "iso delay\n"); 1000 1000 goto idle_timeout; 1001 1001 }
+21 -7
drivers/usb/host/ehci-sched.c
··· 1123 1123 urb->interval); 1124 1124 } 1125 1125 1126 - /* if dev->ep [epnum] is a QH, info1.maxpacket is nonzero */ 1127 - } else if (unlikely (stream->hw_info1 != 0)) { 1126 + /* if dev->ep [epnum] is a QH, hw is set */ 1127 + } else if (unlikely (stream->hw != NULL)) { 1128 1128 ehci_dbg (ehci, "dev %s ep%d%s, not iso??\n", 1129 1129 urb->dev->devpath, epnum, 1130 1130 usb_pipein(urb->pipe) ? "in" : "out"); ··· 1565 1565 static inline void 1566 1566 itd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd) 1567 1567 { 1568 - /* always prepend ITD/SITD ... only QH tree is order-sensitive */ 1569 - itd->itd_next = ehci->pshadow [frame]; 1570 - itd->hw_next = ehci->periodic [frame]; 1571 - ehci->pshadow [frame].itd = itd; 1568 + union ehci_shadow *prev = &ehci->pshadow[frame]; 1569 + __hc32 *hw_p = &ehci->periodic[frame]; 1570 + union ehci_shadow here = *prev; 1571 + __hc32 type = 0; 1572 + 1573 + /* skip any iso nodes which might belong to previous microframes */ 1574 + while (here.ptr) { 1575 + type = Q_NEXT_TYPE(ehci, *hw_p); 1576 + if (type == cpu_to_hc32(ehci, Q_TYPE_QH)) 1577 + break; 1578 + prev = periodic_next_shadow(ehci, prev, type); 1579 + hw_p = shadow_next_periodic(ehci, &here, type); 1580 + here = *prev; 1581 + } 1582 + 1583 + itd->itd_next = here; 1584 + itd->hw_next = *hw_p; 1585 + prev->itd = itd; 1572 1586 itd->frame = frame; 1573 1587 wmb (); 1574 - ehci->periodic[frame] = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD); 1588 + *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD); 1575 1589 } 1576 1590 1577 1591 /* fit urb's itds into the selected schedule slot; activate as needed */
+2 -3
drivers/usb/host/ehci.h
··· 394 394 * acts like a qh would, if EHCI had them for ISO. 395 395 */ 396 396 struct ehci_iso_stream { 397 - /* first two fields match QH, but info1 == 0 */ 398 - __hc32 hw_next; 399 - __hc32 hw_info1; 397 + /* first field matches ehci_hq, but is NULL */ 398 + struct ehci_qh_hw *hw; 400 399 401 400 u32 refcount; 402 401 u8 bEndpointAddress;
+11 -5
drivers/usb/host/r8a66597-hcd.c
··· 418 418 419 419 /* this function must be called with interrupt disabled */ 420 420 static void free_usb_address(struct r8a66597 *r8a66597, 421 - struct r8a66597_device *dev) 421 + struct r8a66597_device *dev, int reset) 422 422 { 423 423 int port; 424 424 ··· 430 430 dev->state = USB_STATE_DEFAULT; 431 431 r8a66597->address_map &= ~(1 << dev->address); 432 432 dev->address = 0; 433 - dev_set_drvdata(&dev->udev->dev, NULL); 433 + /* 434 + * Only when resetting USB, it is necessary to erase drvdata. When 435 + * a usb device with usb hub is disconnect, "dev->udev" is already 436 + * freed on usb_desconnect(). So we cannot access the data. 437 + */ 438 + if (reset) 439 + dev_set_drvdata(&dev->udev->dev, NULL); 434 440 list_del(&dev->device_list); 435 441 kfree(dev); 436 442 ··· 1075 1069 struct r8a66597_device *dev = r8a66597->root_hub[port].dev; 1076 1070 1077 1071 disable_r8a66597_pipe_all(r8a66597, dev); 1078 - free_usb_address(r8a66597, dev); 1072 + free_usb_address(r8a66597, dev, 0); 1079 1073 1080 1074 start_root_hub_sampling(r8a66597, port, 0); 1081 1075 } ··· 2091 2085 spin_lock_irqsave(&r8a66597->lock, flags); 2092 2086 dev = get_r8a66597_device(r8a66597, addr); 2093 2087 disable_r8a66597_pipe_all(r8a66597, dev); 2094 - free_usb_address(r8a66597, dev); 2088 + free_usb_address(r8a66597, dev, 0); 2095 2089 put_child_connect_map(r8a66597, addr); 2096 2090 spin_unlock_irqrestore(&r8a66597->lock, flags); 2097 2091 } ··· 2234 2228 rh->port |= (1 << USB_PORT_FEAT_RESET); 2235 2229 2236 2230 disable_r8a66597_pipe_all(r8a66597, dev); 2237 - free_usb_address(r8a66597, dev); 2231 + free_usb_address(r8a66597, dev, 1); 2238 2232 2239 2233 r8a66597_mdfy(r8a66597, USBRST, USBRST | UACT, 2240 2234 get_dvstctr_reg(port));
+1
drivers/usb/host/xhci-hcd.c drivers/usb/host/xhci.c
··· 1173 1173 cmd_completion = &virt_dev->cmd_completion; 1174 1174 cmd_status = &virt_dev->cmd_status; 1175 1175 } 1176 + init_completion(cmd_completion); 1176 1177 1177 1178 if (!ctx_change) 1178 1179 ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma,
+7 -2
drivers/usb/host/xhci-mem.c
··· 566 566 if (interval < 3) 567 567 interval = 3; 568 568 if ((1 << interval) != 8*ep->desc.bInterval) 569 - dev_warn(&udev->dev, "ep %#x - rounding interval to %d microframes\n", 570 - ep->desc.bEndpointAddress, 1 << interval); 569 + dev_warn(&udev->dev, 570 + "ep %#x - rounding interval" 571 + " to %d microframes, " 572 + "ep desc says %d microframes\n", 573 + ep->desc.bEndpointAddress, 574 + 1 << interval, 575 + 8*ep->desc.bInterval); 571 576 } 572 577 break; 573 578 default:
+9 -4
drivers/usb/musb/musb_core.c
··· 379 379 u8 devctl, u8 power) 380 380 { 381 381 irqreturn_t handled = IRQ_NONE; 382 - void __iomem *mbase = musb->mregs; 383 382 384 383 DBG(3, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl, 385 384 int_usb); ··· 393 394 394 395 if (devctl & MUSB_DEVCTL_HM) { 395 396 #ifdef CONFIG_USB_MUSB_HDRC_HCD 397 + void __iomem *mbase = musb->mregs; 398 + 396 399 switch (musb->xceiv->state) { 397 400 case OTG_STATE_A_SUSPEND: 398 401 /* remote wakeup? later, GetPortStatus ··· 472 471 #ifdef CONFIG_USB_MUSB_HDRC_HCD 473 472 /* see manual for the order of the tests */ 474 473 if (int_usb & MUSB_INTR_SESSREQ) { 474 + void __iomem *mbase = musb->mregs; 475 + 475 476 DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb)); 476 477 477 478 /* IRQ arrives from ID pin sense or (later, if VBUS power ··· 522 519 case OTG_STATE_A_WAIT_BCON: 523 520 case OTG_STATE_A_WAIT_VRISE: 524 521 if (musb->vbuserr_retry) { 522 + void __iomem *mbase = musb->mregs; 523 + 525 524 musb->vbuserr_retry--; 526 525 ignore = 1; 527 526 devctl |= MUSB_DEVCTL_SESSION; ··· 627 622 628 623 if (int_usb & MUSB_INTR_CONNECT) { 629 624 struct usb_hcd *hcd = musb_to_hcd(musb); 625 + void __iomem *mbase = musb->mregs; 630 626 631 627 handled = IRQ_HANDLED; 632 628 musb->is_active = 1; ··· 2013 2007 /* host side needs more setup */ 2014 2008 if (is_host_enabled(musb)) { 2015 2009 struct usb_hcd *hcd = musb_to_hcd(musb); 2016 - u8 busctl; 2017 2010 2018 2011 otg_set_host(musb->xceiv, &hcd->self); 2019 2012 ··· 2023 2018 2024 2019 /* program PHY to use external vBus if required */ 2025 2020 if (plat->extvbus) { 2026 - busctl = musb_readb(musb->mregs, MUSB_ULPI_BUSCONTROL); 2021 + u8 busctl = musb_read_ulpi_buscontrol(musb->mregs); 2027 2022 busctl |= MUSB_ULPI_USE_EXTVBUS; 2028 - musb_writeb(musb->mregs, MUSB_ULPI_BUSCONTROL, busctl); 2023 + musb_write_ulpi_buscontrol(musb->mregs, busctl); 2029 2024 } 2030 2025 } 2031 2026
+2 -2
drivers/usb/musb/musb_core.h
··· 469 469 470 470 struct musb_context_registers { 471 471 472 - #if defined(CONFIG_ARCH_OMAP34XX) || defined(CONFIG_ARCH_OMAP2430) 472 + #ifdef CONFIG_PM 473 473 u32 otg_sysconfig, otg_forcestandby; 474 474 #endif 475 475 u8 power; ··· 483 483 struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; 484 484 }; 485 485 486 - #if defined(CONFIG_ARCH_OMAP34XX) || defined(CONFIG_ARCH_OMAP2430) 486 + #ifdef CONFIG_PM 487 487 extern void musb_platform_save_context(struct musb *musb, 488 488 struct musb_context_registers *musb_context); 489 489 extern void musb_platform_restore_context(struct musb *musb,
+1 -1
drivers/usb/musb/musb_host.c
··· 1689 1689 dma->desired_mode = 1; 1690 1690 if (rx_count < hw_ep->max_packet_sz_rx) { 1691 1691 length = rx_count; 1692 - dma->bDesiredMode = 0; 1692 + dma->desired_mode = 0; 1693 1693 } else { 1694 1694 length = urb->transfer_buffer_length; 1695 1695 }
+28
drivers/usb/musb/musb_regs.h
··· 326 326 musb_writew(mbase, MUSB_RXFIFOADD, c_off); 327 327 } 328 328 329 + static inline void musb_write_ulpi_buscontrol(void __iomem *mbase, u8 val) 330 + { 331 + musb_writeb(mbase, MUSB_ULPI_BUSCONTROL, val); 332 + } 333 + 329 334 static inline u8 musb_read_txfifosz(void __iomem *mbase) 330 335 { 331 336 return musb_readb(mbase, MUSB_TXFIFOSZ); ··· 349 344 static inline u16 musb_read_rxfifoadd(void __iomem *mbase) 350 345 { 351 346 return musb_readw(mbase, MUSB_RXFIFOADD); 347 + } 348 + 349 + static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase) 350 + { 351 + return musb_readb(mbase, MUSB_ULPI_BUSCONTROL); 352 352 } 353 353 354 354 static inline u8 musb_read_configdata(void __iomem *mbase) ··· 520 510 { 521 511 } 522 512 513 + static inline void musb_write_ulpi_buscontrol(void __iomem *mbase, u8 val) 514 + { 515 + } 516 + 523 517 static inline u8 musb_read_txfifosz(void __iomem *mbase) 524 518 { 519 + return 0; 525 520 } 526 521 527 522 static inline u16 musb_read_txfifoadd(void __iomem *mbase) 528 523 { 524 + return 0; 529 525 } 530 526 531 527 static inline u8 musb_read_rxfifosz(void __iomem *mbase) 532 528 { 529 + return 0; 533 530 } 534 531 535 532 static inline u16 musb_read_rxfifoadd(void __iomem *mbase) 536 533 { 534 + return 0; 535 + } 536 + 537 + static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase) 538 + { 539 + return 0; 537 540 } 538 541 539 542 static inline u8 musb_read_configdata(void __iomem *mbase) ··· 600 577 601 578 static inline u8 musb_read_rxfunaddr(void __iomem *mbase, u8 epnum) 602 579 { 580 + return 0; 603 581 } 604 582 605 583 static inline u8 musb_read_rxhubaddr(void __iomem *mbase, u8 epnum) 606 584 { 585 + return 0; 607 586 } 608 587 609 588 static inline u8 musb_read_rxhubport(void __iomem *mbase, u8 epnum) 610 589 { 590 + return 0; 611 591 } 612 592 613 593 static inline u8 musb_read_txfunaddr(void __iomem *mbase, u8 epnum) 614 594 { 595 + return 0; 615 596 } 616 597 617 598 static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum) 618 599 { 600 + return 0; 619 601 } 620 602 621 603 static inline void musb_read_txhubport(void __iomem *mbase, u8 epnum)
+2 -2
drivers/usb/serial/Kconfig
··· 474 474 475 475 config USB_SERIAL_QCAUX 476 476 tristate "USB Qualcomm Auxiliary Serial Port Driver" 477 - ---help--- 477 + help 478 478 Say Y here if you want to use the auxiliary serial ports provided 479 479 by many modems based on Qualcomm chipsets. These ports often use 480 480 a proprietary protocol called DM and cannot be used for AT- or 481 481 PPP-based communication. 482 482 483 483 To compile this driver as a module, choose M here: the 484 - module will be called moto_modem. If unsure, choose N. 484 + module will be called qcaux. If unsure, choose N. 485 485 486 486 config USB_SERIAL_QUALCOMM 487 487 tristate "USB Qualcomm Serial modem"
-5
drivers/usb/serial/cp210x.c
··· 313 313 return -EPROTO; 314 314 } 315 315 316 - /* Single data value */ 317 - result = usb_control_msg(serial->dev, 318 - usb_sndctrlpipe(serial->dev, 0), 319 - request, REQTYPE_HOST_TO_DEVICE, data[0], 320 - 0, NULL, 0, 300); 321 316 return 0; 322 317 } 323 318
+5 -2
drivers/usb/serial/ftdi_sio.c
··· 91 91 unsigned long tx_outstanding_bytes; 92 92 unsigned long tx_outstanding_urbs; 93 93 unsigned short max_packet_size; 94 - struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() */ 94 + struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() and change_speed() */ 95 95 }; 96 96 97 97 /* struct ftdi_sio_quirk is used by devices requiring special attention. */ ··· 658 658 { USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) }, 659 659 { USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) }, 660 660 { USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) }, 661 + { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) }, 661 662 { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, 662 663 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, 663 664 { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) }, ··· 1273 1272 (priv->flags & ASYNC_SPD_MASK)) || 1274 1273 (((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) && 1275 1274 (old_priv.custom_divisor != priv->custom_divisor))) { 1276 - mutex_unlock(&priv->cfg_lock); 1277 1275 change_speed(tty, port); 1276 + mutex_unlock(&priv->cfg_lock); 1278 1277 } 1279 1278 else 1280 1279 mutex_unlock(&priv->cfg_lock); ··· 2265 2264 clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); 2266 2265 } else { 2267 2266 /* set the baudrate determined before */ 2267 + mutex_lock(&priv->cfg_lock); 2268 2268 if (change_speed(tty, port)) 2269 2269 dev_err(&port->dev, "%s urb failed to set baudrate\n", 2270 2270 __func__); 2271 + mutex_unlock(&priv->cfg_lock); 2271 2272 /* Ensure RTS and DTR are raised when baudrate changed from 0 */ 2272 2273 if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) 2273 2274 set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
+7
drivers/usb/serial/ftdi_sio_ids.h
··· 501 501 #define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */ 502 502 503 503 /* 504 + * Contec products (http://www.contec.com) 505 + * Submitted by Daniel Sangorrin 506 + */ 507 + #define CONTEC_VID 0x06CE /* Vendor ID */ 508 + #define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */ 509 + 510 + /* 504 511 * Definitions for B&B Electronics products. 505 512 */ 506 513 #define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */
+27 -22
drivers/usb/serial/generic.c
··· 130 130 spin_unlock_irqrestore(&port->lock, flags); 131 131 132 132 /* if we have a bulk endpoint, start reading from it */ 133 - if (serial->num_bulk_in) { 133 + if (port->bulk_in_size) { 134 134 /* Start reading from the device */ 135 135 usb_fill_bulk_urb(port->read_urb, serial->dev, 136 136 usb_rcvbulkpipe(serial->dev, ··· 159 159 dbg("%s - port %d", __func__, port->number); 160 160 161 161 if (serial->dev) { 162 - /* shutdown any bulk reads that might be going on */ 163 - if (serial->num_bulk_out) 162 + /* shutdown any bulk transfers that might be going on */ 163 + if (port->bulk_out_size) 164 164 usb_kill_urb(port->write_urb); 165 - if (serial->num_bulk_in) 165 + if (port->bulk_in_size) 166 166 usb_kill_urb(port->read_urb); 167 167 } 168 168 } ··· 333 333 334 334 dbg("%s - port %d", __func__, port->number); 335 335 336 + /* only do something if we have a bulk out endpoint */ 337 + if (!port->bulk_out_size) 338 + return -ENODEV; 339 + 336 340 if (count == 0) { 337 341 dbg("%s - write request of 0 bytes", __func__); 338 342 return 0; 339 343 } 340 - 341 - /* only do something if we have a bulk out endpoint */ 342 - if (!serial->num_bulk_out) 343 - return 0; 344 344 345 345 if (serial->type->max_in_flight_urbs) 346 346 return usb_serial_multi_urb_write(tty, port, ··· 364 364 int room = 0; 365 365 366 366 dbg("%s - port %d", __func__, port->number); 367 + 368 + if (!port->bulk_out_size) 369 + return 0; 370 + 367 371 spin_lock_irqsave(&port->lock, flags); 368 372 if (serial->type->max_in_flight_urbs) { 369 373 if (port->urbs_in_flight < serial->type->max_in_flight_urbs) 370 374 room = port->bulk_out_size * 371 375 (serial->type->max_in_flight_urbs - 372 376 port->urbs_in_flight); 373 - } else if (serial->num_bulk_out) 377 + } else { 374 378 room = kfifo_avail(&port->write_fifo); 379 + } 375 380 spin_unlock_irqrestore(&port->lock, flags); 376 381 377 382 dbg("%s - returns %d", __func__, room); ··· 387 382 { 388 383 struct usb_serial_port *port = tty->driver_data; 389 384 struct usb_serial *serial = port->serial; 390 - int chars = 0; 391 385 unsigned long flags; 386 + int chars; 392 387 393 388 dbg("%s - port %d", __func__, port->number); 389 + 390 + if (!port->bulk_out_size) 391 + return 0; 394 392 395 393 spin_lock_irqsave(&port->lock, flags); 396 394 if (serial->type->max_in_flight_urbs) 397 395 chars = port->tx_bytes_flight; 398 - else if (serial->num_bulk_out) 396 + else 399 397 chars = kfifo_len(&port->write_fifo); 400 398 spin_unlock_irqrestore(&port->lock, flags); 401 399 ··· 423 415 ((serial->type->read_bulk_callback) ? 424 416 serial->type->read_bulk_callback : 425 417 usb_serial_generic_read_bulk_callback), port); 418 + 426 419 result = usb_submit_urb(urb, mem_flags); 427 - if (result) 420 + if (result && result != -EPERM) { 428 421 dev_err(&port->dev, 429 422 "%s - failed resubmitting read urb, error %d\n", 430 423 __func__, result); 424 + } 431 425 } 432 426 EXPORT_SYMBOL_GPL(usb_serial_generic_resubmit_read_urb); 433 427 ··· 508 498 if (port->urbs_in_flight < 0) 509 499 port->urbs_in_flight = 0; 510 500 spin_unlock_irqrestore(&port->lock, flags); 511 - 512 - if (status) { 513 - dbg("%s - nonzero multi-urb write bulk status " 514 - "received: %d", __func__, status); 515 - return; 516 - } 517 501 } else { 518 502 port->write_urb_busy = 0; 519 503 520 - if (status) { 521 - dbg("%s - nonzero multi-urb write bulk status " 522 - "received: %d", __func__, status); 504 + if (status) 523 505 kfifo_reset_out(&port->write_fifo); 524 - } else 506 + else 525 507 usb_serial_generic_write_start(port); 526 508 } 509 + 510 + if (status) 511 + dbg("%s - non-zero urb status: %d", __func__, status); 527 512 528 513 usb_serial_port_softint(port); 529 514 }
+50 -3
drivers/usb/serial/option.c
··· 288 288 289 289 #define QUALCOMM_VENDOR_ID 0x05C6 290 290 291 - #define MAXON_VENDOR_ID 0x16d8 291 + #define CMOTECH_VENDOR_ID 0x16d8 292 + #define CMOTECH_PRODUCT_6008 0x6008 293 + #define CMOTECH_PRODUCT_6280 0x6280 292 294 293 295 #define TELIT_VENDOR_ID 0x1bc7 294 296 #define TELIT_PRODUCT_UC864E 0x1003 ··· 311 309 #define DLINK_VENDOR_ID 0x1186 312 310 #define DLINK_PRODUCT_DWM_652 0x3e04 313 311 #define DLINK_PRODUCT_DWM_652_U5 0xce16 312 + #define DLINK_PRODUCT_DWM_652_U5A 0xce1e 314 313 315 314 #define QISDA_VENDOR_ID 0x1da5 316 315 #define QISDA_PRODUCT_H21_4512 0x4512 ··· 334 331 /* ALCATEL PRODUCTS */ 335 332 #define ALCATEL_VENDOR_ID 0x1bbb 336 333 #define ALCATEL_PRODUCT_X060S 0x0000 334 + 335 + #define PIRELLI_VENDOR_ID 0x1266 336 + #define PIRELLI_PRODUCT_C100_1 0x1002 337 + #define PIRELLI_PRODUCT_C100_2 0x1003 338 + #define PIRELLI_PRODUCT_1004 0x1004 339 + #define PIRELLI_PRODUCT_1005 0x1005 340 + #define PIRELLI_PRODUCT_1006 0x1006 341 + #define PIRELLI_PRODUCT_1007 0x1007 342 + #define PIRELLI_PRODUCT_1008 0x1008 343 + #define PIRELLI_PRODUCT_1009 0x1009 344 + #define PIRELLI_PRODUCT_100A 0x100a 345 + #define PIRELLI_PRODUCT_100B 0x100b 346 + #define PIRELLI_PRODUCT_100C 0x100c 347 + #define PIRELLI_PRODUCT_100D 0x100d 348 + #define PIRELLI_PRODUCT_100E 0x100e 349 + #define PIRELLI_PRODUCT_100F 0x100f 350 + #define PIRELLI_PRODUCT_1011 0x1011 351 + #define PIRELLI_PRODUCT_1012 0x1012 337 352 338 353 /* Airplus products */ 339 354 #define AIRPLUS_VENDOR_ID 0x1011 ··· 568 547 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 569 548 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */ 570 549 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 571 - { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ 550 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ 551 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, 572 552 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, 573 553 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) }, 574 554 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ ··· 681 659 { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, 682 660 { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, 683 661 { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ 662 + { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5A) }, 684 663 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, 685 664 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, 686 665 { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, ··· 689 666 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) }, 690 667 { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */ 691 668 { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) }, 692 - { USB_DEVICE(ALINK_VENDOR_ID, 0xce16) }, 693 669 { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) }, 694 670 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) }, 695 671 { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, ··· 697 675 .driver_info = (kernel_ulong_t)&four_g_w14_blacklist 698 676 }, 699 677 { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, 678 + /* Pirelli */ 679 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)}, 680 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2)}, 681 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1004)}, 682 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1005)}, 683 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1006)}, 684 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1007)}, 685 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1008)}, 686 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1009)}, 687 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100A)}, 688 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100B) }, 689 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100C) }, 690 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100D) }, 691 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100E) }, 692 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) }, 693 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, 694 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, 695 + 700 696 { } /* Terminating entry */ 701 697 }; 702 698 MODULE_DEVICE_TABLE(usb, option_ids); ··· 838 798 const struct usb_device_id *id) 839 799 { 840 800 struct option_intf_private *data; 801 + 841 802 /* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */ 842 803 if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID && 843 804 serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 && 844 805 serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8) 806 + return -ENODEV; 807 + 808 + /* Bandrich modem and AT command interface is 0xff */ 809 + if ((serial->dev->descriptor.idVendor == BANDRICH_VENDOR_ID || 810 + serial->dev->descriptor.idVendor == PIRELLI_VENDOR_ID) && 811 + serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) 845 812 return -ENODEV; 846 813 847 814 data = serial->private = kzalloc(sizeof(struct option_intf_private), GFP_KERNEL);
+29
drivers/usb/serial/qcserial.c
··· 47 47 {USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */ 48 48 {USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */ 49 49 {USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */ 50 + {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU936) */ 51 + {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */ 52 + {USB_DEVICE(0x05c6, 0x9224)}, /* Sony Gobi 2000 QDL device (N0279, VU730) */ 53 + {USB_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */ 54 + {USB_DEVICE(0x05c6, 0x9244)}, /* Samsung Gobi 2000 QDL device (VL176) */ 55 + {USB_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */ 56 + {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */ 57 + {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */ 58 + {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */ 59 + {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */ 60 + {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */ 61 + {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */ 62 + {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR306) */ 63 + {USB_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */ 64 + {USB_DEVICE(0x05c6, 0x9274)}, /* iRex Technologies Gobi 2000 QDL device (VR307) */ 65 + {USB_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */ 66 + {USB_DEVICE(0x1199, 0x9000)}, /* Sierra Wireless Gobi 2000 QDL device (VT773) */ 67 + {USB_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 68 + {USB_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 69 + {USB_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 70 + {USB_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 71 + {USB_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 72 + {USB_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 73 + {USB_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 74 + {USB_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 75 + {USB_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 76 + {USB_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */ 77 + {USB_DEVICE(0x16d8, 0x8001)}, /* CMDTech Gobi 2000 QDL device (VU922) */ 78 + {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */ 50 79 { } /* Terminating entry */ 51 80 }; 52 81 MODULE_DEVICE_TABLE(usb, id_table);
+9 -14
drivers/usb/storage/unusual_devs.h
··· 374 374 US_SC_DEVICE, US_PR_DEVICE, NULL, 375 375 US_FL_FIX_INQUIRY), 376 376 377 + /* Reported by Ondrej Zary <linux@rainbow-software.org> 378 + * The device reports one sector more and breaks when that sector is accessed 379 + */ 380 + UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, 381 + "ScanLogic", 382 + "SL11R-IDE", 383 + US_SC_DEVICE, US_PR_DEVICE, NULL, 384 + US_FL_FIX_CAPACITY), 385 + 377 386 /* Reported by Kriston Fincher <kriston@airmail.net> 378 387 * Patch submitted by Sean Millichamp <sean@bruenor.org> 379 388 * This is to support the Panasonic PalmCam PV-SD4090 ··· 1388 1379 "A-VOX", 1389 1380 US_SC_DEVICE, US_PR_DEVICE, NULL, 1390 1381 US_FL_IGNORE_RESIDUE ), 1391 - 1392 - /* Jeremy Katz <katzj@redhat.com>: 1393 - * The Blackberry Pearl can run in two modes; a usb-storage only mode 1394 - * and a mode that allows access via mass storage and to its database. 1395 - * The berry_charge module will set the device to dual mode and thus we 1396 - * should ignore its native mode if that module is built 1397 - */ 1398 - #ifdef CONFIG_USB_BERRY_CHARGE 1399 - UNUSUAL_DEV( 0x0fca, 0x0006, 0x0001, 0x0001, 1400 - "RIM", 1401 - "Blackberry Pearl", 1402 - US_SC_DEVICE, US_PR_DEVICE, NULL, 1403 - US_FL_IGNORE_DEVICE ), 1404 - #endif 1405 1382 1406 1383 /* Reported by Michael Stattmann <michael@stattmann.com> */ 1407 1384 UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
+13 -5
include/linux/usb.h
··· 1055 1055 * @number_of_packets: Lists the number of ISO transfer buffers. 1056 1056 * @interval: Specifies the polling interval for interrupt or isochronous 1057 1057 * transfers. The units are frames (milliseconds) for full and low 1058 - * speed devices, and microframes (1/8 millisecond) for highspeed ones. 1058 + * speed devices, and microframes (1/8 millisecond) for highspeed 1059 + * and SuperSpeed devices. 1059 1060 * @error_count: Returns the number of ISO transfers that reported errors. 1060 1061 * @context: For use in completion functions. This normally points to 1061 1062 * request-specific driver context. ··· 1287 1286 * 1288 1287 * Initializes a interrupt urb with the proper information needed to submit 1289 1288 * it to a device. 1290 - * Note that high speed interrupt endpoints use a logarithmic encoding of 1291 - * the endpoint interval, and express polling intervals in microframes 1292 - * (eight per millisecond) rather than in frames (one per millisecond). 1289 + * 1290 + * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic 1291 + * encoding of the endpoint interval, and express polling intervals in 1292 + * microframes (eight per millisecond) rather than in frames (one per 1293 + * millisecond). 1294 + * 1295 + * Wireless USB also uses the logarithmic encoding, but specifies it in units of 1296 + * 128us instead of 125us. For Wireless USB devices, the interval is passed 1297 + * through to the host controller, rather than being translated into microframe 1298 + * units. 1293 1299 */ 1294 1300 static inline void usb_fill_int_urb(struct urb *urb, 1295 1301 struct usb_device *dev, ··· 1313 1305 urb->transfer_buffer_length = buffer_length; 1314 1306 urb->complete = complete_fn; 1315 1307 urb->context = context; 1316 - if (dev->speed == USB_SPEED_HIGH) 1308 + if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) 1317 1309 urb->interval = 1 << (interval - 1); 1318 1310 else 1319 1311 urb->interval = interval;