diff options
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 10 | ||||
-rw-r--r-- | drivers/usb/class/usblp.c | 1 | ||||
-rw-r--r-- | drivers/usb/core/quirks.c | 12 | ||||
-rw-r--r-- | drivers/usb/gadget/ether.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 5 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 26 | ||||
-rw-r--r-- | drivers/usb/misc/ldusb.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/trancevibrator.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 43 | ||||
-rw-r--r-- | drivers/usb/serial/sierra.c | 1 | ||||
-rw-r--r-- | drivers/usb/storage/protocol.c | 27 | ||||
-rw-r--r-- | drivers/usb/storage/transport.c | 11 | ||||
-rw-r--r-- | drivers/usb/storage/unusual_devs.h | 34 |
15 files changed, 130 insertions, 53 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index bcc42136c93f..0147ea39340e 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -496,13 +496,10 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) | |||
496 | otherwise it is scheduled, and with high data rates data can get lost. */ | 496 | otherwise it is scheduled, and with high data rates data can get lost. */ |
497 | tty->low_latency = 1; | 497 | tty->low_latency = 1; |
498 | 498 | ||
499 | if (usb_autopm_get_interface(acm->control)) { | 499 | if (usb_autopm_get_interface(acm->control) < 0) |
500 | mutex_unlock(&open_mutex); | 500 | goto early_bail; |
501 | return -EIO; | ||
502 | } | ||
503 | 501 | ||
504 | mutex_lock(&acm->mutex); | 502 | mutex_lock(&acm->mutex); |
505 | mutex_unlock(&open_mutex); | ||
506 | if (acm->used++) { | 503 | if (acm->used++) { |
507 | usb_autopm_put_interface(acm->control); | 504 | usb_autopm_put_interface(acm->control); |
508 | goto done; | 505 | goto done; |
@@ -536,6 +533,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) | |||
536 | done: | 533 | done: |
537 | err_out: | 534 | err_out: |
538 | mutex_unlock(&acm->mutex); | 535 | mutex_unlock(&acm->mutex); |
536 | mutex_unlock(&open_mutex); | ||
539 | return rv; | 537 | return rv; |
540 | 538 | ||
541 | full_bailout: | 539 | full_bailout: |
@@ -544,6 +542,8 @@ bail_out: | |||
544 | usb_autopm_put_interface(acm->control); | 542 | usb_autopm_put_interface(acm->control); |
545 | acm->used--; | 543 | acm->used--; |
546 | mutex_unlock(&acm->mutex); | 544 | mutex_unlock(&acm->mutex); |
545 | early_bail: | ||
546 | mutex_unlock(&open_mutex); | ||
547 | return -EIO; | 547 | return -EIO; |
548 | } | 548 | } |
549 | 549 | ||
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index ad632f2d6f94..0647164d36db 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -428,6 +428,7 @@ static int usblp_open(struct inode *inode, struct file *file) | |||
428 | usblp->rcomplete = 0; | 428 | usblp->rcomplete = 0; |
429 | 429 | ||
430 | if (handle_bidir(usblp) < 0) { | 430 | if (handle_bidir(usblp) < 0) { |
431 | usb_autopm_put_interface(intf); | ||
431 | usblp->used = 0; | 432 | usblp->used = 0; |
432 | file->private_data = NULL; | 433 | file->private_data = NULL; |
433 | retval = -EIO; | 434 | retval = -EIO; |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index d42c561c75f1..f90ab5e94c58 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
@@ -28,11 +28,23 @@ | |||
28 | * devices is broken... | 28 | * devices is broken... |
29 | */ | 29 | */ |
30 | static const struct usb_device_id usb_quirk_list[] = { | 30 | static const struct usb_device_id usb_quirk_list[] = { |
31 | /* Action Semiconductor flash disk */ | ||
32 | { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255}, | ||
33 | |||
31 | /* CBM - Flash disk */ | 34 | /* CBM - Flash disk */ |
32 | { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, | 35 | { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, |
33 | /* HP 5300/5370C scanner */ | 36 | /* HP 5300/5370C scanner */ |
34 | { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, | 37 | { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, |
35 | 38 | ||
39 | /* Creative SB Audigy 2 NX */ | ||
40 | { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
41 | |||
42 | /* Roland SC-8820 */ | ||
43 | { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
44 | |||
45 | /* Edirol SD-20 */ | ||
46 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, | ||
47 | |||
36 | /* INTEL VALUE SSD */ | 48 | /* INTEL VALUE SSD */ |
37 | { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, | 49 | { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, |
38 | 50 | ||
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index a70e255402b8..e99872308144 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -1561,6 +1561,7 @@ done_set_intf: | |||
1561 | memcpy(req->buf, buf, n); | 1561 | memcpy(req->buf, buf, n); |
1562 | req->complete = rndis_response_complete; | 1562 | req->complete = rndis_response_complete; |
1563 | rndis_free_response(dev->rndis_config, buf); | 1563 | rndis_free_response(dev->rndis_config, buf); |
1564 | value = n; | ||
1564 | } | 1565 | } |
1565 | /* else stalls ... spec says to avoid that */ | 1566 | /* else stalls ... spec says to avoid that */ |
1566 | } | 1567 | } |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 9fdabc8fcac4..4f6bfa100f2a 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -1299,7 +1299,7 @@ printer_unbind(struct usb_gadget *gadget) | |||
1299 | printer_req_free(dev->in_ep, req); | 1299 | printer_req_free(dev->in_ep, req); |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | if (dev->current_rx_req != NULL); | 1302 | if (dev->current_rx_req != NULL) |
1303 | printer_req_free(dev->out_ep, dev->current_rx_req); | 1303 | printer_req_free(dev->out_ep, dev->current_rx_req); |
1304 | 1304 | ||
1305 | while (!list_empty(&dev->rx_reqs)) { | 1305 | while (!list_empty(&dev->rx_reqs)) { |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index d97b16b52efa..bf8be2a41a4a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -69,10 +69,9 @@ config USB_EHCI_BIG_ENDIAN_DESC | |||
69 | default y | 69 | default y |
70 | 70 | ||
71 | config USB_EHCI_FSL | 71 | config USB_EHCI_FSL |
72 | bool | 72 | bool "Support for Freescale on-chip EHCI USB controller" |
73 | depends on USB_EHCI_HCD | 73 | depends on USB_EHCI_HCD && FSL_SOC |
74 | select USB_EHCI_ROOT_HUB_TT | 74 | select USB_EHCI_ROOT_HUB_TT |
75 | default y if MPC834x || PPC_MPC831x | ||
76 | ---help--- | 75 | ---help--- |
77 | Variation of ARC USB block used in some Freescale chips. | 76 | Variation of ARC USB block used in some Freescale chips. |
78 | 77 | ||
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 4caa6a8b9a37..b8ad55aff842 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -862,18 +862,18 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
862 | /* reschedule QH iff another request is queued */ | 862 | /* reschedule QH iff another request is queued */ |
863 | if (!list_empty (&qh->qtd_list) | 863 | if (!list_empty (&qh->qtd_list) |
864 | && HC_IS_RUNNING (hcd->state)) { | 864 | && HC_IS_RUNNING (hcd->state)) { |
865 | int schedule_status; | 865 | rc = qh_schedule(ehci, qh); |
866 | 866 | ||
867 | schedule_status = qh_schedule (ehci, qh); | 867 | /* An error here likely indicates handshake failure |
868 | spin_unlock_irqrestore (&ehci->lock, flags); | 868 | * or no space left in the schedule. Neither fault |
869 | 869 | * should happen often ... | |
870 | if (schedule_status != 0) { | 870 | * |
871 | // shouldn't happen often, but ... | 871 | * FIXME kill the now-dysfunctional queued urbs |
872 | // FIXME kill those tds' urbs | 872 | */ |
873 | err ("can't reschedule qh %p, err %d", | 873 | if (rc != 0) |
874 | qh, schedule_status); | 874 | ehci_err(ehci, |
875 | } | 875 | "can't reschedule qh %p, err %d", |
876 | return status; | 876 | qh, rc); |
877 | } | 877 | } |
878 | break; | 878 | break; |
879 | 879 | ||
@@ -1014,7 +1014,7 @@ MODULE_LICENSE ("GPL"); | |||
1014 | #endif | 1014 | #endif |
1015 | 1015 | ||
1016 | #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ | 1016 | #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ |
1017 | !defined(PS3_SYSTEM_BUS_DRIVER) | 1017 | !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) |
1018 | #error "missing bus glue for ehci-hcd" | 1018 | #error "missing bus glue for ehci-hcd" |
1019 | #endif | 1019 | #endif |
1020 | 1020 | ||
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 8208496dfc63..c730d20eec66 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 | 61 | #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 |
62 | #define USB_DEVICE_ID_VERNIER_SKIP 0x0003 | 62 | #define USB_DEVICE_ID_VERNIER_SKIP 0x0003 |
63 | #define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004 | 63 | #define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004 |
64 | #define USB_DEVICE_ID_VERNIER_LCSPEC 0x0006 | ||
64 | 65 | ||
65 | #define USB_VENDOR_ID_MICROCHIP 0x04d8 | 66 | #define USB_VENDOR_ID_MICROCHIP 0x04d8 |
66 | #define USB_DEVICE_ID_PICDEM 0x000c | 67 | #define USB_DEVICE_ID_PICDEM 0x000c |
@@ -92,6 +93,7 @@ static struct usb_device_id ld_usb_table [] = { | |||
92 | { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) }, | 93 | { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) }, |
93 | { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS) }, | 94 | { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS) }, |
94 | { USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICDEM) }, | 95 | { USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICDEM) }, |
96 | { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LCSPEC) }, | ||
95 | { } /* Terminating entry */ | 97 | { } /* Terminating entry */ |
96 | }; | 98 | }; |
97 | MODULE_DEVICE_TABLE(usb, ld_usb_table); | 99 | MODULE_DEVICE_TABLE(usb, ld_usb_table); |
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 67e2fc20eeeb..03368edf3f22 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c | |||
@@ -59,13 +59,14 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr, | |||
59 | { | 59 | { |
60 | struct usb_interface *intf = to_usb_interface(dev); | 60 | struct usb_interface *intf = to_usb_interface(dev); |
61 | struct trancevibrator *tv = usb_get_intfdata(intf); | 61 | struct trancevibrator *tv = usb_get_intfdata(intf); |
62 | int temp, retval; | 62 | int temp, retval, old; |
63 | 63 | ||
64 | temp = simple_strtoul(buf, NULL, 10); | 64 | temp = simple_strtoul(buf, NULL, 10); |
65 | if (temp > 255) | 65 | if (temp > 255) |
66 | temp = 255; | 66 | temp = 255; |
67 | else if (temp < 0) | 67 | else if (temp < 0) |
68 | temp = 0; | 68 | temp = 0; |
69 | old = tv->speed; | ||
69 | tv->speed = temp; | 70 | tv->speed = temp; |
70 | 71 | ||
71 | dev_dbg(&tv->udev->dev, "speed = %d\n", tv->speed); | 72 | dev_dbg(&tv->udev->dev, "speed = %d\n", tv->speed); |
@@ -77,6 +78,7 @@ static ssize_t set_speed(struct device *dev, struct device_attribute *attr, | |||
77 | tv->speed, /* speed value */ | 78 | tv->speed, /* speed value */ |
78 | 0, NULL, 0, USB_CTRL_GET_TIMEOUT); | 79 | 0, NULL, 0, USB_CTRL_GET_TIMEOUT); |
79 | if (retval) { | 80 | if (retval) { |
81 | tv->speed = old; | ||
80 | dev_dbg(&tv->udev->dev, "retval = %d\n", retval); | 82 | dev_dbg(&tv->udev->dev, "retval = %d\n", retval); |
81 | return retval; | 83 | return retval; |
82 | } | 84 | } |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 90dcc625f70d..76db2fef4657 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -393,8 +393,8 @@ static const char *ftdi_chip_name[] = { | |||
393 | #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) | 393 | #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) |
394 | /* End TIOCMIWAIT */ | 394 | /* End TIOCMIWAIT */ |
395 | 395 | ||
396 | #define FTDI_IMPL_ASYNC_FLAGS = ( ASYNC_SPD_HI | ASYNC_SPD_VHI \ | 396 | #define FTDI_IMPL_ASYNC_FLAGS = (ASYNC_SPD_HI | ASYNC_SPD_VHI \ |
397 | ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP ) | 397 | | ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP) |
398 | 398 | ||
399 | /* function prototypes for a FTDI serial converter */ | 399 | /* function prototypes for a FTDI serial converter */ |
400 | static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id); | 400 | static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id); |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5e8bf1bc1e50..af2674c57414 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -113,6 +113,9 @@ static int option_send_setup(struct usb_serial_port *port); | |||
113 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 | 113 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 |
114 | #define DELL_VENDOR_ID 0x413C | 114 | #define DELL_VENDOR_ID 0x413C |
115 | 115 | ||
116 | #define KYOCERA_VENDOR_ID 0x0c88 | ||
117 | #define KYOCERA_PRODUCT_KPC680 0x180a | ||
118 | |||
116 | #define ANYDATA_VENDOR_ID 0x16d5 | 119 | #define ANYDATA_VENDOR_ID 0x16d5 |
117 | #define ANYDATA_PRODUCT_ADU_E100A 0x6501 | 120 | #define ANYDATA_PRODUCT_ADU_E100A 0x6501 |
118 | #define ANYDATA_PRODUCT_ADU_500A 0x6502 | 121 | #define ANYDATA_PRODUCT_ADU_500A 0x6502 |
@@ -121,6 +124,8 @@ static int option_send_setup(struct usb_serial_port *port); | |||
121 | #define BANDRICH_PRODUCT_C100_1 0x1002 | 124 | #define BANDRICH_PRODUCT_C100_1 0x1002 |
122 | #define BANDRICH_PRODUCT_C100_2 0x1003 | 125 | #define BANDRICH_PRODUCT_C100_2 0x1003 |
123 | 126 | ||
127 | #define QUALCOMM_VENDOR_ID 0x05C6 | ||
128 | |||
124 | static struct usb_device_id option_ids[] = { | 129 | static struct usb_device_id option_ids[] = { |
125 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 130 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
126 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 131 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -174,18 +179,23 @@ static struct usb_device_id option_ids[] = { | |||
174 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ | 179 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ |
175 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */ | 180 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */ |
176 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */ | 181 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */ |
182 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ | ||
177 | { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ | 183 | { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ |
178 | { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ | 184 | { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
179 | { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ | 185 | { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
180 | { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */ | 186 | { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */ |
181 | { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ | 187 | { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ |
182 | { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ | 188 | { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ |
189 | { USB_DEVICE(DELL_VENDOR_ID, 0x8129) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */ | ||
190 | { USB_DEVICE(DELL_VENDOR_ID, 0x8133) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ | ||
183 | { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ | 191 | { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
184 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ | 192 | { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ |
185 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, | 193 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, |
186 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 194 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
187 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 195 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
188 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 196 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
197 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, | ||
198 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ | ||
189 | { } /* Terminating entry */ | 199 | { } /* Terminating entry */ |
190 | }; | 200 | }; |
191 | MODULE_DEVICE_TABLE(usb, option_ids); | 201 | MODULE_DEVICE_TABLE(usb, option_ids); |
@@ -247,10 +257,10 @@ static int debug; | |||
247 | struct option_port_private { | 257 | struct option_port_private { |
248 | /* Input endpoints and buffer for this port */ | 258 | /* Input endpoints and buffer for this port */ |
249 | struct urb *in_urbs[N_IN_URB]; | 259 | struct urb *in_urbs[N_IN_URB]; |
250 | char in_buffer[N_IN_URB][IN_BUFLEN]; | 260 | u8 *in_buffer[N_IN_URB]; |
251 | /* Output endpoints and buffer for this port */ | 261 | /* Output endpoints and buffer for this port */ |
252 | struct urb *out_urbs[N_OUT_URB]; | 262 | struct urb *out_urbs[N_OUT_URB]; |
253 | char out_buffer[N_OUT_URB][OUT_BUFLEN]; | 263 | u8 *out_buffer[N_OUT_URB]; |
254 | unsigned long out_busy; /* Bit vector of URBs in use */ | 264 | unsigned long out_busy; /* Bit vector of URBs in use */ |
255 | 265 | ||
256 | /* Settings for the port */ | 266 | /* Settings for the port */ |
@@ -737,9 +747,10 @@ static int option_send_setup(struct usb_serial_port *port) | |||
737 | 747 | ||
738 | static int option_startup(struct usb_serial *serial) | 748 | static int option_startup(struct usb_serial *serial) |
739 | { | 749 | { |
740 | int i, err; | 750 | int i, j, err; |
741 | struct usb_serial_port *port; | 751 | struct usb_serial_port *port; |
742 | struct option_port_private *portdata; | 752 | struct option_port_private *portdata; |
753 | u8 *buffer; | ||
743 | 754 | ||
744 | dbg("%s", __FUNCTION__); | 755 | dbg("%s", __FUNCTION__); |
745 | 756 | ||
@@ -753,6 +764,20 @@ static int option_startup(struct usb_serial *serial) | |||
753 | return (1); | 764 | return (1); |
754 | } | 765 | } |
755 | 766 | ||
767 | for (j = 0; j < N_IN_URB; j++) { | ||
768 | buffer = (u8 *)__get_free_page(GFP_KERNEL); | ||
769 | if (!buffer) | ||
770 | goto bail_out_error; | ||
771 | portdata->in_buffer[j] = buffer; | ||
772 | } | ||
773 | |||
774 | for (j = 0; j < N_OUT_URB; j++) { | ||
775 | buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); | ||
776 | if (!buffer) | ||
777 | goto bail_out_error2; | ||
778 | portdata->out_buffer[j] = buffer; | ||
779 | } | ||
780 | |||
756 | usb_set_serial_port_data(port, portdata); | 781 | usb_set_serial_port_data(port, portdata); |
757 | 782 | ||
758 | if (! port->interrupt_in_urb) | 783 | if (! port->interrupt_in_urb) |
@@ -766,6 +791,16 @@ static int option_startup(struct usb_serial *serial) | |||
766 | option_setup_urbs(serial); | 791 | option_setup_urbs(serial); |
767 | 792 | ||
768 | return (0); | 793 | return (0); |
794 | |||
795 | bail_out_error2: | ||
796 | for (j = 0; j < N_OUT_URB; j++) | ||
797 | kfree(portdata->out_buffer[j]); | ||
798 | bail_out_error: | ||
799 | for (j = 0; j < N_IN_URB; j++) | ||
800 | if (portdata->in_buffer[j]) | ||
801 | free_page((unsigned long)portdata->in_buffer[j]); | ||
802 | kfree(portdata); | ||
803 | return 1; | ||
769 | } | 804 | } |
770 | 805 | ||
771 | static void option_shutdown(struct usb_serial *serial) | 806 | static void option_shutdown(struct usb_serial *serial) |
@@ -794,12 +829,14 @@ static void option_shutdown(struct usb_serial *serial) | |||
794 | for (j = 0; j < N_IN_URB; j++) { | 829 | for (j = 0; j < N_IN_URB; j++) { |
795 | if (portdata->in_urbs[j]) { | 830 | if (portdata->in_urbs[j]) { |
796 | usb_free_urb(portdata->in_urbs[j]); | 831 | usb_free_urb(portdata->in_urbs[j]); |
832 | free_page((unsigned long)portdata->in_buffer[j]); | ||
797 | portdata->in_urbs[j] = NULL; | 833 | portdata->in_urbs[j] = NULL; |
798 | } | 834 | } |
799 | } | 835 | } |
800 | for (j = 0; j < N_OUT_URB; j++) { | 836 | for (j = 0; j < N_OUT_URB; j++) { |
801 | if (portdata->out_urbs[j]) { | 837 | if (portdata->out_urbs[j]) { |
802 | usb_free_urb(portdata->out_urbs[j]); | 838 | usb_free_urb(portdata->out_urbs[j]); |
839 | kfree(portdata->out_buffer[j]); | ||
803 | portdata->out_urbs[j] = NULL; | 840 | portdata->out_urbs[j] = NULL; |
804 | } | 841 | } |
805 | } | 842 | } |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 4c925e3e8a63..e3d44ae8d448 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -178,7 +178,6 @@ static struct usb_device_id id_table [] = { | |||
178 | 178 | ||
179 | { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ | 179 | { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ |
180 | { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ | 180 | { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ |
181 | { USB_DEVICE(0x05C6, 0x6613), .driver_info = DEVICE_1_PORT }, /* Onda H600/ZTE MF330 */ | ||
182 | 181 | ||
183 | { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, | 182 | { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, |
184 | { } | 183 | { } |
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index a41ce21c0697..958f5b17847c 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c | |||
@@ -150,13 +150,14 @@ void usb_stor_transparent_scsi_command(struct scsi_cmnd *srb, | |||
150 | 150 | ||
151 | /* Copy a buffer of length buflen to/from the srb's transfer buffer. | 151 | /* Copy a buffer of length buflen to/from the srb's transfer buffer. |
152 | * Update the **sgptr and *offset variables so that the next copy will | 152 | * Update the **sgptr and *offset variables so that the next copy will |
153 | * pick up from where this one left off. */ | 153 | * pick up from where this one left off. |
154 | 154 | */ | |
155 | unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | 155 | unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, |
156 | unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, | 156 | unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, |
157 | unsigned int *offset, enum xfer_buf_dir dir) | 157 | unsigned int *offset, enum xfer_buf_dir dir) |
158 | { | 158 | { |
159 | unsigned int cnt; | 159 | unsigned int cnt; |
160 | struct scatterlist *sg = *sgptr; | ||
160 | 161 | ||
161 | /* We have to go through the list one entry | 162 | /* We have to go through the list one entry |
162 | * at a time. Each s-g entry contains some number of pages, and | 163 | * at a time. Each s-g entry contains some number of pages, and |
@@ -164,22 +165,23 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | |||
164 | * in kernel-addressable memory then kmap() will return its address. | 165 | * in kernel-addressable memory then kmap() will return its address. |
165 | * If the page is not directly accessible -- such as a user buffer | 166 | * If the page is not directly accessible -- such as a user buffer |
166 | * located in high memory -- then kmap() will map it to a temporary | 167 | * located in high memory -- then kmap() will map it to a temporary |
167 | * position in the kernel's virtual address space. */ | 168 | * position in the kernel's virtual address space. |
168 | struct scatterlist *sg = *sgptr; | 169 | */ |
169 | 170 | ||
170 | if (!sg) | 171 | if (!sg) |
171 | sg = scsi_sglist(srb); | 172 | sg = scsi_sglist(srb); |
173 | buflen = min(buflen, scsi_bufflen(srb)); | ||
172 | 174 | ||
173 | /* This loop handles a single s-g list entry, which may | 175 | /* This loop handles a single s-g list entry, which may |
174 | * include multiple pages. Find the initial page structure | 176 | * include multiple pages. Find the initial page structure |
175 | * and the starting offset within the page, and update | 177 | * and the starting offset within the page, and update |
176 | * the *offset and **sgptr values for the next loop. */ | 178 | * the *offset and **sgptr values for the next loop. |
179 | */ | ||
177 | cnt = 0; | 180 | cnt = 0; |
178 | while (cnt < buflen) { | 181 | while (cnt < buflen && sg) { |
179 | struct page *page = sg_page(sg) + | 182 | struct page *page = sg_page(sg) + |
180 | ((sg->offset + *offset) >> PAGE_SHIFT); | 183 | ((sg->offset + *offset) >> PAGE_SHIFT); |
181 | unsigned int poff = | 184 | unsigned int poff = (sg->offset + *offset) & (PAGE_SIZE-1); |
182 | (sg->offset + *offset) & (PAGE_SIZE-1); | ||
183 | unsigned int sglen = sg->length - *offset; | 185 | unsigned int sglen = sg->length - *offset; |
184 | 186 | ||
185 | if (sglen > buflen - cnt) { | 187 | if (sglen > buflen - cnt) { |
@@ -222,14 +224,15 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | |||
222 | } | 224 | } |
223 | 225 | ||
224 | /* Store the contents of buffer into srb's transfer buffer and set the | 226 | /* Store the contents of buffer into srb's transfer buffer and set the |
225 | * SCSI residue. */ | 227 | * SCSI residue. |
228 | */ | ||
226 | void usb_stor_set_xfer_buf(unsigned char *buffer, | 229 | void usb_stor_set_xfer_buf(unsigned char *buffer, |
227 | unsigned int buflen, struct scsi_cmnd *srb) | 230 | unsigned int buflen, struct scsi_cmnd *srb) |
228 | { | 231 | { |
229 | unsigned int offset = 0; | 232 | unsigned int offset = 0; |
230 | struct scatterlist *sg = NULL; | 233 | struct scatterlist *sg = NULL; |
231 | 234 | ||
232 | usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, | 235 | buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, |
233 | TO_XFER_BUF); | 236 | TO_XFER_BUF); |
234 | if (buflen < scsi_bufflen(srb)) | 237 | if (buflen < scsi_bufflen(srb)) |
235 | scsi_set_resid(srb, scsi_bufflen(srb) - buflen); | 238 | scsi_set_resid(srb, scsi_bufflen(srb) - buflen); |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index d9f4912f873d..5780ed15f1ad 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -891,17 +891,6 @@ int usb_stor_Bulk_max_lun(struct us_data *us) | |||
891 | if (result > 0) | 891 | if (result > 0) |
892 | return us->iobuf[0]; | 892 | return us->iobuf[0]; |
893 | 893 | ||
894 | /* | ||
895 | * Some devices (i.e. Iomega Zip100) need this -- apparently | ||
896 | * the bulk pipes get STALLed when the GetMaxLUN request is | ||
897 | * processed. This is, in theory, harmless to all other devices | ||
898 | * (regardless of if they stall or not). | ||
899 | */ | ||
900 | if (result == -EPIPE) { | ||
901 | usb_stor_clear_halt(us, us->recv_bulk_pipe); | ||
902 | usb_stor_clear_halt(us, us->send_bulk_pipe); | ||
903 | } | ||
904 | |||
905 | /* | 894 | /* |
906 | * Some devices don't like GetMaxLUN. They may STALL the control | 895 | * Some devices don't like GetMaxLUN. They may STALL the control |
907 | * pipe, they may return a zero-length result, they may do nothing at | 896 | * pipe, they may return a zero-length result, they may do nothing at |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index fe12737e0e2b..99679a8cfa02 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -357,7 +357,7 @@ UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200, | |||
357 | US_FL_FIX_CAPACITY), | 357 | US_FL_FIX_CAPACITY), |
358 | 358 | ||
359 | /* Reported by Emil Larsson <emil@swip.net> */ | 359 | /* Reported by Emil Larsson <emil@swip.net> */ |
360 | UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, | 360 | UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0110, |
361 | "NIKON", | 361 | "NIKON", |
362 | "NIKON DSC D80", | 362 | "NIKON DSC D80", |
363 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 363 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
@@ -759,6 +759,18 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, | |||
759 | "Digital Camera EX-20 DSC", | 759 | "Digital Camera EX-20 DSC", |
760 | US_SC_8070, US_PR_DEVICE, NULL, 0 ), | 760 | US_SC_8070, US_PR_DEVICE, NULL, 0 ), |
761 | 761 | ||
762 | /* Reported by Andre Welter <a.r.welter@gmx.de> | ||
763 | * This antique device predates the release of the Bulk-only Transport | ||
764 | * spec, and if it gets a Get-Max-LUN then it requires the host to do a | ||
765 | * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent | ||
766 | * us from sending the request. | ||
767 | */ | ||
768 | UNUSUAL_DEV( 0x059b, 0x0001, 0x0100, 0x0100, | ||
769 | "Iomega", | ||
770 | "ZIP 100", | ||
771 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
772 | US_FL_SINGLE_LUN ), | ||
773 | |||
762 | /* Reported by <Hendryk.Pfeiffer@gmx.de> */ | 774 | /* Reported by <Hendryk.Pfeiffer@gmx.de> */ |
763 | UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, | 775 | UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, |
764 | "LaCie", | 776 | "LaCie", |
@@ -1412,6 +1424,17 @@ UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, | |||
1412 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1424 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1413 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), | 1425 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), |
1414 | 1426 | ||
1427 | /* Patch by Leonid Petrov mail at lpetrov.net | ||
1428 | * Reported by Robert Spitzenpfeil <robert@spitzenpfeil.org> | ||
1429 | * http://www.qbik.ch/usb/devices/showdev.php?id=1705 | ||
1430 | * Updated to 103 device by MJ Ray mjr at phonecoop.coop | ||
1431 | */ | ||
1432 | UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, | ||
1433 | "Oracom Co., Ltd", | ||
1434 | "ORC-200M", | ||
1435 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1436 | US_FL_IGNORE_RESIDUE ), | ||
1437 | |||
1415 | /* David Kuehling <dvdkhlng@gmx.de>: | 1438 | /* David Kuehling <dvdkhlng@gmx.de>: |
1416 | * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI | 1439 | * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI |
1417 | * errors when trying to write. | 1440 | * errors when trying to write. |
@@ -1477,6 +1500,15 @@ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x0110, | |||
1477 | US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, | 1500 | US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, |
1478 | 0 ), | 1501 | 0 ), |
1479 | 1502 | ||
1503 | /* Reported by Fabio Venturi <f.venturi@tdnet.it> | ||
1504 | * The device reports a vendor-specific bDeviceClass. | ||
1505 | */ | ||
1506 | UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, | ||
1507 | "Actions Semiconductor", | ||
1508 | "Mtp device", | ||
1509 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1510 | 0), | ||
1511 | |||
1480 | /* Reported by Kevin Lloyd <linux@sierrawireless.com> | 1512 | /* Reported by Kevin Lloyd <linux@sierrawireless.com> |
1481 | * Entry is needed for the initializer function override, | 1513 | * Entry is needed for the initializer function override, |
1482 | * which instructs the device to load as a modem | 1514 | * which instructs the device to load as a modem |