diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-07 22:06:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-07 22:06:36 -0400 |
commit | 7b2aa037e878c939676675969983284a02958ae3 (patch) | |
tree | eb7387b6d26f8f3550d99b1d9b77ebce818e5657 /drivers | |
parent | 710ad849ae76bc2f938a885e928b90cdbbe61a6e (diff) | |
parent | cf7fdd57f978d40ceb9a0f58a25f5cf9c84d6f33 (diff) |
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:
USB: fix oops on disconnect in cdc-acm
USB: storage: include Prolific Technology USB drive in unusual_devs list
USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client
USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial converter cable
USB: EHCI: fix counting of transaction error retries
USB: EHCI: fix two new bugs related to Clear-TT-Buffer
USB: usbfs: fix -ENOENT error code to be -ENODEV
USB: musb: fix the nop registration for OMAP3EVM
USB: devio: Properly do access_ok() checks
USB: pl2303: New vendor and product id
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 10 | ||||
-rw-r--r-- | drivers/usb/class/cdc-acm.h | 2 | ||||
-rw-r--r-- | drivers/usb/core/devio.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/ehci-q.c | 15 | ||||
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 1 | ||||
-rw-r--r-- | drivers/usb/musb/Kconfig | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 14 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/pl2303.h | 4 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_devs.h | 7 |
12 files changed, 53 insertions, 18 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index e1f89416ef8c..2bfc41ece0e1 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
387 | struct acm_ru *rcv; | 387 | struct acm_ru *rcv; |
388 | unsigned long flags; | 388 | unsigned long flags; |
389 | unsigned char throttled; | 389 | unsigned char throttled; |
390 | struct usb_host_endpoint *ep; | ||
391 | 390 | ||
392 | dbg("Entering acm_rx_tasklet"); | 391 | dbg("Entering acm_rx_tasklet"); |
393 | 392 | ||
@@ -463,14 +462,12 @@ urbs: | |||
463 | 462 | ||
464 | rcv->buffer = buf; | 463 | rcv->buffer = buf; |
465 | 464 | ||
466 | ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out) | 465 | if (acm->is_int_ep) |
467 | [usb_pipeendpoint(acm->rx_endpoint)]; | ||
468 | if (usb_endpoint_xfer_int(&ep->desc)) | ||
469 | usb_fill_int_urb(rcv->urb, acm->dev, | 466 | usb_fill_int_urb(rcv->urb, acm->dev, |
470 | acm->rx_endpoint, | 467 | acm->rx_endpoint, |
471 | buf->base, | 468 | buf->base, |
472 | acm->readsize, | 469 | acm->readsize, |
473 | acm_read_bulk, rcv, ep->desc.bInterval); | 470 | acm_read_bulk, rcv, acm->bInterval); |
474 | else | 471 | else |
475 | usb_fill_bulk_urb(rcv->urb, acm->dev, | 472 | usb_fill_bulk_urb(rcv->urb, acm->dev, |
476 | acm->rx_endpoint, | 473 | acm->rx_endpoint, |
@@ -1183,6 +1180,9 @@ made_compressed_probe: | |||
1183 | spin_lock_init(&acm->read_lock); | 1180 | spin_lock_init(&acm->read_lock); |
1184 | mutex_init(&acm->mutex); | 1181 | mutex_init(&acm->mutex); |
1185 | acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); | 1182 | acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); |
1183 | acm->is_int_ep = usb_endpoint_xfer_int(epread); | ||
1184 | if (acm->is_int_ep) | ||
1185 | acm->bInterval = epread->bInterval; | ||
1186 | tty_port_init(&acm->port); | 1186 | tty_port_init(&acm->port); |
1187 | acm->port.ops = &acm_port_ops; | 1187 | acm->port.ops = &acm_port_ops; |
1188 | 1188 | ||
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 1602324808ba..c4a0ee8ffccf 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h | |||
@@ -126,6 +126,8 @@ struct acm { | |||
126 | unsigned int ctrl_caps; /* control capabilities from the class specific header */ | 126 | unsigned int ctrl_caps; /* control capabilities from the class specific header */ |
127 | unsigned int susp_count; /* number of suspended interfaces */ | 127 | unsigned int susp_count; /* number of suspended interfaces */ |
128 | int combined_interfaces:1; /* control and data collapsed */ | 128 | int combined_interfaces:1; /* control and data collapsed */ |
129 | int is_int_ep:1; /* interrupt endpoints contrary to spec used */ | ||
130 | u8 bInterval; | ||
129 | struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ | 131 | struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ |
130 | }; | 132 | }; |
131 | 133 | ||
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 38b8bce782d6..4247eccf858c 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file) | |||
595 | if (!ps) | 595 | if (!ps) |
596 | goto out; | 596 | goto out; |
597 | 597 | ||
598 | ret = -ENOENT; | 598 | ret = -ENODEV; |
599 | 599 | ||
600 | /* usbdev device-node */ | 600 | /* usbdev device-node */ |
601 | if (imajor(inode) == USB_DEVICE_MAJOR) | 601 | if (imajor(inode) == USB_DEVICE_MAJOR) |
@@ -1321,7 +1321,8 @@ static int get_urb32(struct usbdevfs_urb *kurb, | |||
1321 | struct usbdevfs_urb32 __user *uurb) | 1321 | struct usbdevfs_urb32 __user *uurb) |
1322 | { | 1322 | { |
1323 | __u32 uptr; | 1323 | __u32 uptr; |
1324 | if (get_user(kurb->type, &uurb->type) || | 1324 | if (!access_ok(VERIFY_READ, uurb, sizeof(*uurb)) || |
1325 | __get_user(kurb->type, &uurb->type) || | ||
1325 | __get_user(kurb->endpoint, &uurb->endpoint) || | 1326 | __get_user(kurb->endpoint, &uurb->endpoint) || |
1326 | __get_user(kurb->status, &uurb->status) || | 1327 | __get_user(kurb->status, &uurb->status) || |
1327 | __get_user(kurb->flags, &uurb->flags) || | 1328 | __get_user(kurb->flags, &uurb->flags) || |
@@ -1536,8 +1537,9 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg) | |||
1536 | u32 udata; | 1537 | u32 udata; |
1537 | 1538 | ||
1538 | uioc = compat_ptr((long)arg); | 1539 | uioc = compat_ptr((long)arg); |
1539 | if (get_user(ctrl.ifno, &uioc->ifno) || | 1540 | if (!access_ok(VERIFY_READ, uioc, sizeof(*uioc)) || |
1540 | get_user(ctrl.ioctl_code, &uioc->ioctl_code) || | 1541 | __get_user(ctrl.ifno, &uioc->ifno) || |
1542 | __get_user(ctrl.ioctl_code, &uioc->ioctl_code) || | ||
1541 | __get_user(udata, &uioc->data)) | 1543 | __get_user(udata, &uioc->data)) |
1542 | return -EFAULT; | 1544 | return -EFAULT; |
1543 | ctrl.data = compat_ptr(udata); | 1545 | ctrl.data = compat_ptr(udata); |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 7d03549c3339..11c627ce6022 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
903 | /* already started */ | 903 | /* already started */ |
904 | break; | 904 | break; |
905 | case QH_STATE_IDLE: | 905 | case QH_STATE_IDLE: |
906 | WARN_ON(1); | 906 | /* QH might be waiting for a Clear-TT-Buffer */ |
907 | qh_completions(ehci, qh); | ||
907 | break; | 908 | break; |
908 | } | 909 | } |
909 | break; | 910 | break; |
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 9a1384747f3b..7673554fa64d 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
375 | */ | 375 | */ |
376 | if ((token & QTD_STS_XACT) && | 376 | if ((token & QTD_STS_XACT) && |
377 | QTD_CERR(token) == 0 && | 377 | QTD_CERR(token) == 0 && |
378 | --qh->xacterrs > 0 && | 378 | ++qh->xacterrs < QH_XACTERR_MAX && |
379 | !urb->unlinked) { | 379 | !urb->unlinked) { |
380 | ehci_dbg(ehci, | 380 | ehci_dbg(ehci, |
381 | "detected XactErr len %zu/%zu retry %d\n", | 381 | "detected XactErr len %zu/%zu retry %d\n", |
382 | qtd->length - QTD_LENGTH(token), qtd->length, | 382 | qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs); |
383 | QH_XACTERR_MAX - qh->xacterrs); | ||
384 | 383 | ||
385 | /* reset the token in the qtd and the | 384 | /* reset the token in the qtd and the |
386 | * qh overlay (which still contains | 385 | * qh overlay (which still contains |
@@ -494,7 +493,7 @@ halt: | |||
494 | last = qtd; | 493 | last = qtd; |
495 | 494 | ||
496 | /* reinit the xacterr counter for the next qtd */ | 495 | /* reinit the xacterr counter for the next qtd */ |
497 | qh->xacterrs = QH_XACTERR_MAX; | 496 | qh->xacterrs = 0; |
498 | } | 497 | } |
499 | 498 | ||
500 | /* last urb's completion might still need calling */ | 499 | /* last urb's completion might still need calling */ |
@@ -940,7 +939,8 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
940 | head->qh_next.qh = qh; | 939 | head->qh_next.qh = qh; |
941 | head->hw_next = dma; | 940 | head->hw_next = dma; |
942 | 941 | ||
943 | qh->xacterrs = QH_XACTERR_MAX; | 942 | qh_get(qh); |
943 | qh->xacterrs = 0; | ||
944 | qh->qh_state = QH_STATE_LINKED; | 944 | qh->qh_state = QH_STATE_LINKED; |
945 | /* qtd completions reported later by interrupt */ | 945 | /* qtd completions reported later by interrupt */ |
946 | } | 946 | } |
@@ -1080,7 +1080,7 @@ submit_async ( | |||
1080 | * the HC and TT handle it when the TT has a buffer ready. | 1080 | * the HC and TT handle it when the TT has a buffer ready. |
1081 | */ | 1081 | */ |
1082 | if (likely (qh->qh_state == QH_STATE_IDLE)) | 1082 | if (likely (qh->qh_state == QH_STATE_IDLE)) |
1083 | qh_link_async (ehci, qh_get (qh)); | 1083 | qh_link_async(ehci, qh); |
1084 | done: | 1084 | done: |
1085 | spin_unlock_irqrestore (&ehci->lock, flags); | 1085 | spin_unlock_irqrestore (&ehci->lock, flags); |
1086 | if (unlikely (qh == NULL)) | 1086 | if (unlikely (qh == NULL)) |
@@ -1115,8 +1115,6 @@ static void end_unlink_async (struct ehci_hcd *ehci) | |||
1115 | && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) | 1115 | && HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) |
1116 | qh_link_async (ehci, qh); | 1116 | qh_link_async (ehci, qh); |
1117 | else { | 1117 | else { |
1118 | qh_put (qh); // refcount from async list | ||
1119 | |||
1120 | /* it's not free to turn the async schedule on/off; leave it | 1118 | /* it's not free to turn the async schedule on/off; leave it |
1121 | * active but idle for a while once it empties. | 1119 | * active but idle for a while once it empties. |
1122 | */ | 1120 | */ |
@@ -1124,6 +1122,7 @@ static void end_unlink_async (struct ehci_hcd *ehci) | |||
1124 | && ehci->async->qh_next.qh == NULL) | 1122 | && ehci->async->qh_next.qh == NULL) |
1125 | timer_action (ehci, TIMER_ASYNC_OFF); | 1123 | timer_action (ehci, TIMER_ASYNC_OFF); |
1126 | } | 1124 | } |
1125 | qh_put(qh); /* refcount from async list */ | ||
1127 | 1126 | ||
1128 | if (next) { | 1127 | if (next) { |
1129 | ehci->reclaim = NULL; | 1128 | ehci->reclaim = NULL; |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 74f7f83b29ad..edd61ee90323 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
542 | } | 542 | } |
543 | } | 543 | } |
544 | qh->qh_state = QH_STATE_LINKED; | 544 | qh->qh_state = QH_STATE_LINKED; |
545 | qh->xacterrs = 0; | ||
545 | qh_get (qh); | 546 | qh_get (qh); |
546 | 547 | ||
547 | /* update per-qh bandwidth for usbfs */ | 548 | /* update per-qh bandwidth for usbfs */ |
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 70073b157f0a..803adcb5ac1d 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -12,6 +12,7 @@ config USB_MUSB_HDRC | |||
12 | depends on !SUPERH | 12 | depends on !SUPERH |
13 | select NOP_USB_XCEIV if ARCH_DAVINCI | 13 | select NOP_USB_XCEIV if ARCH_DAVINCI |
14 | select TWL4030_USB if MACH_OMAP_3430SDP | 14 | select TWL4030_USB if MACH_OMAP_3430SDP |
15 | select NOP_USB_XCEIV if MACH_OMAP3EVM | ||
15 | select USB_OTG_UTILS | 16 | select USB_OTG_UTILS |
16 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' | 17 | tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' |
17 | help | 18 | help |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index b574878c78b2..8fec5d4455c9 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -699,6 +699,9 @@ static struct usb_device_id id_table_combined [] = { | |||
699 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 699 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
700 | { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, | 700 | { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, |
701 | { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, | 701 | { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, |
702 | { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, | ||
703 | { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), | ||
704 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
702 | { }, /* Optional parameter entry */ | 705 | { }, /* Optional parameter entry */ |
703 | { } /* Terminating entry */ | 706 | { } /* Terminating entry */ |
704 | }; | 707 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 24dbd99e87d7..8c92b88166ae 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -954,6 +954,20 @@ | |||
954 | #define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */ | 954 | #define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */ |
955 | 955 | ||
956 | /* | 956 | /* |
957 | * Bayer Ascensia Contour blood glucose meter USB-converter cable. | ||
958 | * http://winglucofacts.com/cables/ | ||
959 | */ | ||
960 | #define BAYER_VID 0x1A79 | ||
961 | #define BAYER_CONTOUR_CABLE_PID 0x6001 | ||
962 | |||
963 | /* | ||
964 | * Marvell OpenRD Base, Client | ||
965 | * http://www.open-rd.org | ||
966 | * OpenRD Base, Client use VID 0x0403 | ||
967 | */ | ||
968 | #define MARVELL_OPENRD_PID 0x9e90 | ||
969 | |||
970 | /* | ||
957 | * BmRequestType: 1100 0000b | 971 | * BmRequestType: 1100 0000b |
958 | * bRequest: FTDI_E2_READ | 972 | * bRequest: FTDI_E2_READ |
959 | * wValue: 0 | 973 | * wValue: 0 |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 7d15bfa7c2db..3e86815b2705 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -95,6 +95,7 @@ static struct usb_device_id id_table [] = { | |||
95 | { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, | 95 | { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, |
96 | { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, | 96 | { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, |
97 | { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, | 97 | { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, |
98 | { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) }, | ||
98 | { } /* Terminating entry */ | 99 | { } /* Terminating entry */ |
99 | }; | 100 | }; |
100 | 101 | ||
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 12aac7d2462d..ee9505e1dd92 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -126,3 +126,7 @@ | |||
126 | /* Cressi Edy (diving computer) PC interface */ | 126 | /* Cressi Edy (diving computer) PC interface */ |
127 | #define CRESSI_VENDOR_ID 0x04b8 | 127 | #define CRESSI_VENDOR_ID 0x04b8 |
128 | #define CRESSI_EDY_PRODUCT_ID 0x0521 | 128 | #define CRESSI_EDY_PRODUCT_ID 0x0521 |
129 | |||
130 | /* Sony, USB data cable for CMD-Jxx mobile phones */ | ||
131 | #define SONY_VENDOR_ID 0x054c | ||
132 | #define SONY_QN3USB_PRODUCT_ID 0x0437 | ||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 1b9c5dd0fb27..7477d411959f 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -838,6 +838,13 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, | |||
838 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 838 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
839 | US_FL_FIX_CAPACITY ), | 839 | US_FL_FIX_CAPACITY ), |
840 | 840 | ||
841 | /* Reported by Rogerio Brito <rbrito@ime.usp.br> */ | ||
842 | UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, | ||
843 | "Prolific Technology, Inc.", | ||
844 | "Mass Storage Device", | ||
845 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
846 | US_FL_NOT_LOCKABLE ), | ||
847 | |||
841 | /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ | 848 | /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ |
842 | /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by | 849 | /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by |
843 | * Thomas Bartosik <tbartdev@gmx-topmail.de> */ | 850 | * Thomas Bartosik <tbartdev@gmx-topmail.de> */ |