From bbc5d276ec1e24d48f794dae1c4bdfc1512f65d5 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Thu, 7 Feb 2008 01:06:07 +0100 Subject: USB: ftdi_sio.c add missing '|' add missing '|' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 90dcc625f70..76db2fef465 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[] = { #define FTDI_STATUS_B1_MASK (FTDI_RS_BI) /* End TIOCMIWAIT */ -#define FTDI_IMPL_ASYNC_FLAGS = ( ASYNC_SPD_HI | ASYNC_SPD_VHI \ - ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP ) +#define FTDI_IMPL_ASYNC_FLAGS = (ASYNC_SPD_HI | ASYNC_SPD_VHI \ + | ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP) /* function prototypes for a FTDI serial converter */ static int ftdi_sio_probe (struct usb_serial *serial, const struct usb_device_id *id); -- cgit v1.2.3 From 2129c4e1b4469e1f9711a54e97e8ddf8b26bb62d Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Fri, 1 Feb 2008 13:58:52 +0100 Subject: USB: Sane memory allocation in option driver The option driver - violates DMA coherency rules - allocates ~16500 bytes in one chunk This patch splits out the buffers and uses __get_free_page() to avoid higher order allocations. Signed-off-by: Oliver Neukum Acked-By: Matthias Urlichs Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5e8bf1bc1e5..a8126988efe 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -247,10 +247,10 @@ static int debug; struct option_port_private { /* Input endpoints and buffer for this port */ struct urb *in_urbs[N_IN_URB]; - char in_buffer[N_IN_URB][IN_BUFLEN]; + u8 *in_buffer[N_IN_URB]; /* Output endpoints and buffer for this port */ struct urb *out_urbs[N_OUT_URB]; - char out_buffer[N_OUT_URB][OUT_BUFLEN]; + u8 *out_buffer[N_OUT_URB]; unsigned long out_busy; /* Bit vector of URBs in use */ /* Settings for the port */ @@ -737,9 +737,10 @@ static int option_send_setup(struct usb_serial_port *port) static int option_startup(struct usb_serial *serial) { - int i, err; + int i, j, err; struct usb_serial_port *port; struct option_port_private *portdata; + u8 *buffer; dbg("%s", __FUNCTION__); @@ -753,6 +754,20 @@ static int option_startup(struct usb_serial *serial) return (1); } + for (j = 0; j < N_IN_URB; j++) { + buffer = (u8 *)__get_free_page(GFP_KERNEL); + if (!buffer) + goto bail_out_error; + portdata->in_buffer[j] = buffer; + } + + for (j = 0; j < N_OUT_URB; j++) { + buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); + if (!buffer) + goto bail_out_error2; + portdata->out_buffer[j] = buffer; + } + usb_set_serial_port_data(port, portdata); if (! port->interrupt_in_urb) @@ -766,6 +781,16 @@ static int option_startup(struct usb_serial *serial) option_setup_urbs(serial); return (0); + +bail_out_error2: + for (j = 0; j < N_OUT_URB; j++) + kfree(portdata->out_buffer[j]); +bail_out_error: + for (j = 0; j < N_IN_URB; j++) + if (portdata->in_buffer[j]) + free_page((unsigned long)portdata->in_buffer[j]); + kfree(portdata); + return 1; } static void option_shutdown(struct usb_serial *serial) @@ -794,12 +819,14 @@ static void option_shutdown(struct usb_serial *serial) for (j = 0; j < N_IN_URB; j++) { if (portdata->in_urbs[j]) { usb_free_urb(portdata->in_urbs[j]); + free_page((unsigned long)portdata->in_buffer[j]); portdata->in_urbs[j] = NULL; } } for (j = 0; j < N_OUT_URB; j++) { if (portdata->out_urbs[j]) { usb_free_urb(portdata->out_urbs[j]); + kfree(portdata->out_buffer[j]); portdata->out_urbs[j] = NULL; } } -- cgit v1.2.3 From 1902869019918411c148c18cc3a22aade569ac9a Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 12 Feb 2008 19:08:30 +0100 Subject: USB: fix pm counter leak in usblp if you fail in open() you must decrement the pm counter again. Signed-off-by: Oliver Neukum Cc: stable Signed-off-by: Pete Zaitcev --- drivers/usb/class/usblp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index ad632f2d6f9..0647164d36d 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) usblp->rcomplete = 0; if (handle_bidir(usblp) < 0) { + usb_autopm_put_interface(intf); usblp->used = 0; file->private_data = NULL; retval = -EIO; -- cgit v1.2.3 From 59036e94732edc2fb957465008c68bbcfc6736fa Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 4 Feb 2008 23:57:49 -0800 Subject: USB: usb: yet another Dell wireless CDMA/EVDO modem Add native support of the Dell wireless CDMA/EVDO modem. # modprobe usbserial vendor=0x413c product=0x8129 Following seesion lines describe modem itself at OK ati3 Manufacturer: NOVATEL WIRELESS INCORPORATED Model: EXPEDITE ET620 Revision: M6500C-BBIRD_TLS_MINI_DELL-Q40306.166 [Aug 25 2006 14:00:00] ESN: 0x5B39071D +GCAP: +CIS707-A, CIS-856, +MS, +ES, +DS, +FCLASS OK Signed-off-by: Andy Shevchenko Cc: Matthias Urlichs Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index a8126988efe..e3e71c5f1a7 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -181,6 +181,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ + { USB_DEVICE(DELL_VENDOR_ID, 0x8129) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */ { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, -- cgit v1.2.3 From 94409cc1e507b157f8442dad80ff5e560c3205e5 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Mon, 11 Feb 2008 15:22:29 +0100 Subject: USB: fix usb open suspend race in cdc-acm this fixes a race between open and disconnect in the CDC ACM driver. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/cdc-acm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index bcc42136c93..0147ea39340 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) otherwise it is scheduled, and with high data rates data can get lost. */ tty->low_latency = 1; - if (usb_autopm_get_interface(acm->control)) { - mutex_unlock(&open_mutex); - return -EIO; - } + if (usb_autopm_get_interface(acm->control) < 0) + goto early_bail; mutex_lock(&acm->mutex); - mutex_unlock(&open_mutex); if (acm->used++) { usb_autopm_put_interface(acm->control); goto done; @@ -536,6 +533,7 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) done: err_out: mutex_unlock(&acm->mutex); + mutex_unlock(&open_mutex); return rv; full_bailout: @@ -544,6 +542,8 @@ bail_out: usb_autopm_put_interface(acm->control); acm->used--; mutex_unlock(&acm->mutex); +early_bail: + mutex_unlock(&open_mutex); return -EIO; } -- cgit v1.2.3 From 618b88670573020920a52e8754f4d5f216f74fdb Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 11 Feb 2008 13:16:26 +0100 Subject: USB: ehci-fsl: mpc834x config symbol is PPC_MPC834x, not MPC834x The config symbol for mpc834x processors is CONFIG_PPC_MPC834x, not CONFIG_MPC834x. Signed-off-by: Peter Korsgaard Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index d97b16b52ef..2dd05441481 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -72,7 +72,7 @@ config USB_EHCI_FSL bool depends on USB_EHCI_HCD select USB_EHCI_ROOT_HUB_TT - default y if MPC834x || PPC_MPC831x + default y if PPC_MPC834x || PPC_MPC831x ---help--- Variation of ARC USB block used in some Freescale chips. -- cgit v1.2.3 From efa66f14e2d1aaad8ad7e1664d768de74ffb665b Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sat, 9 Feb 2008 03:16:03 -0800 Subject: USB: g_printer, fix empty if statement A bug every C programmer makes at some point in time... Signed-off-by: Adrian Bunk Signed-off-by: Craig W. Nadler Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/printer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 9fdabc8fcac..4f6bfa100f2 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -1299,7 +1299,7 @@ printer_unbind(struct usb_gadget *gadget) printer_req_free(dev->in_ep, req); } - if (dev->current_rx_req != NULL); + if (dev->current_rx_req != NULL) printer_req_free(dev->out_ep, dev->current_rx_req); while (!list_empty(&dev->rx_reqs)) { -- cgit v1.2.3 From 0cc5e2e7c3edd8b45775f50c74738d61b43ac5e8 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 30 Jan 2008 16:06:03 +0100 Subject: USB: fix error handling in trancevibrator trancevibrator should not pretend success if it returns an error. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/trancevibrator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 67e2fc20eee..03368edf3f2 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, { struct usb_interface *intf = to_usb_interface(dev); struct trancevibrator *tv = usb_get_intfdata(intf); - int temp, retval; + int temp, retval, old; temp = simple_strtoul(buf, NULL, 10); if (temp > 255) temp = 255; else if (temp < 0) temp = 0; + old = tv->speed; tv->speed = temp; 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, tv->speed, /* speed value */ 0, NULL, 0, USB_CTRL_GET_TIMEOUT); if (retval) { + tv->speed = old; dev_dbg(&tv->udev->dev, "retval = %d\n", retval); return retval; } -- cgit v1.2.3 From e1a491429e7f9b6fb608d9f173e5807fba053d5b Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 2 Feb 2008 02:36:53 -0800 Subject: USB: fix previous sparse fix which was incorrect The previous fix for a "sparse" warning in ehci_urb_dequeue() was incorrect. After rescheduling interrupt transfers it returned the URB's completion status, not status for the dequeue operation itself. This patch resolves that issue, cleans up the code in the reschedule path, and shrinks the object code by a dozen bytes. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hcd.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 4caa6a8b9a3..d64887bfa6a 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) /* reschedule QH iff another request is queued */ if (!list_empty (&qh->qtd_list) && HC_IS_RUNNING (hcd->state)) { - int schedule_status; - - schedule_status = qh_schedule (ehci, qh); - spin_unlock_irqrestore (&ehci->lock, flags); - - if (schedule_status != 0) { - // shouldn't happen often, but ... - // FIXME kill those tds' urbs - err ("can't reschedule qh %p, err %d", - qh, schedule_status); - } - return status; + rc = qh_schedule(ehci, qh); + + /* An error here likely indicates handshake failure + * or no space left in the schedule. Neither fault + * should happen often ... + * + * FIXME kill the now-dysfunctional queued urbs + */ + if (rc != 0) + ehci_err(ehci, + "can't reschedule qh %p, err %d", + qh, rc); } break; -- cgit v1.2.3 From b68a42b1d98f66c70a536a540f73dba07ddd5d36 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Mon, 4 Feb 2008 16:34:11 +0100 Subject: USB: quirks for known quirky audio devices RESET_RESUME entries for some sound devices that need it. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index d42c561c75f..dc51790582d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -33,6 +33,15 @@ static const struct usb_device_id usb_quirk_list[] = { /* HP 5300/5370C scanner */ { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, + /* Creative SB Audigy 2 NX */ + { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Roland SC-8820 */ + { USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Edirol SD-20 */ + { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, + /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, -- cgit v1.2.3 From 564d61d30effcc727f9519538143a6c6aeb92e46 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 19 Feb 2008 13:15:30 -0500 Subject: USB: option: Add Kyocera KPC680 ids Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index e3e71c5f1a7..fbc5aeec35d 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); #define NOVATELWIRELESS_VENDOR_ID 0x1410 #define DELL_VENDOR_ID 0x413C +#define KYOCERA_VENDOR_ID 0x0c88 +#define KYOCERA_PRODUCT_KPC680 0x180a + #define ANYDATA_VENDOR_ID 0x16d5 #define ANYDATA_PRODUCT_ADU_E100A 0x6501 #define ANYDATA_PRODUCT_ADU_500A 0x6502 @@ -187,6 +190,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, + { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); -- cgit v1.2.3 From aa59e053da08336e7def83e83c86369cd9fdaf8b Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Tue, 5 Feb 2008 15:25:35 -0500 Subject: USB: option: Added vendor id for Dell 5720 broadband modem this is a small patch to add support for a rebranded Novatel modem (see http://ubuntuforums.org/archive/index.php/t-608388.html for details). Signed-off-by: Stefan Bader Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index fbc5aeec35d..17ab77869ae 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -183,8 +183,9 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */ { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ - { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ { USB_DEVICE(DELL_VENDOR_ID, 0x8129) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */ + { USB_DEVICE(DELL_VENDOR_ID, 0x8133) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ + { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, -- cgit v1.2.3 From a462549b6ad6d4de19a7702c13fbb954d9a10f29 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 13 Feb 2008 10:45:28 -0500 Subject: USB: usb-storage: don't clear-halt when Get-Max-LUN stalls This patch (as1032) removes the Clear-Halt calls in usb_stor_Bulk_max_lun(). Evidently some devices (such as the Oracom MP3 player) really don't like to receive these requests when their bulk endpoints aren't halted. The only reason for adding them originally was to get an ancient ZIP-100 drive to work. But since this device has only a single LUN, we don't need to send it a Get-Max-LUN request at all. Adding an unusual_devs entry for the ZIP-100 with the SINGLE_LUN flag set will cause this step to be skipped. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/transport.c | 11 ----------- drivers/usb/storage/unusual_devs.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index d9f4912f873..5780ed15f1a 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) if (result > 0) return us->iobuf[0]; - /* - * Some devices (i.e. Iomega Zip100) need this -- apparently - * the bulk pipes get STALLed when the GetMaxLUN request is - * processed. This is, in theory, harmless to all other devices - * (regardless of if they stall or not). - */ - if (result == -EPIPE) { - usb_stor_clear_halt(us, us->recv_bulk_pipe); - usb_stor_clear_halt(us, us->send_bulk_pipe); - } - /* * Some devices don't like GetMaxLUN. They may STALL the control * 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 fe12737e0e2..a97e7ef252f 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -759,6 +759,18 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, "Digital Camera EX-20 DSC", US_SC_8070, US_PR_DEVICE, NULL, 0 ), +/* Reported by Andre Welter + * This antique device predates the release of the Bulk-only Transport + * spec, and if it gets a Get-Max-LUN then it requires the host to do a + * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent + * us from sending the request. + */ +UNUSUAL_DEV( 0x059b, 0x0001, 0x0100, 0x0100, + "Iomega", + "ZIP 100", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_SINGLE_LUN ), + /* Reported by */ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000, "LaCie", -- cgit v1.2.3 From 9232951ada7ec2f2c1424e4c024dc8540ae97e91 Mon Sep 17 00:00:00 2001 From: Konstantin Kletschke Date: Tue, 19 Feb 2008 02:15:32 -0800 Subject: USB: storage: Nikon D80 new FW still needs Fixup Add new BCD numbers for Nikon D80 Firmware revision v1.10 to the unusual_devs.h file. Signed-off-by: Konstantin Kletschke Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index a97e7ef252f..6b2b57c32f9 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, US_FL_FIX_CAPACITY), /* Reported by Emil Larsson */ -UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, +UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0110, "NIKON", "NIKON DSC D80", US_SC_DEVICE, US_PR_DEVICE, NULL, -- cgit v1.2.3 From 7f4a9e8750bb904d94f37778821afd021e875c51 Mon Sep 17 00:00:00 2001 From: Warren Turkal Date: Thu, 14 Feb 2008 14:01:46 -0800 Subject: USB: Add another Novatel U727 ID to the device table for usbserial Signed-off-by: Warren Turkal Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 17ab77869ae..8c892e54d20 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -177,6 +177,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ -- cgit v1.2.3 From 41566bcf35a8b23ce4715dadb5acfd1098c1d3e4 Mon Sep 17 00:00:00 2001 From: Jan Altenberg Date: Tue, 19 Feb 2008 01:44:50 +0100 Subject: USB: gadget: queue usb USB_CDC_GET_ENCAPSULATED_RESPONSE message commit 0cf4f2de0a0f4100795f38ef894d4910678c74f8 introduced a bug, which prevents sending an USB_CDC_GET_ENCAPSULATED_RESPONSE message. This breaks the RNDIS initialization (especially / only Windoze machines dislike this behavior...). Signed-off-by: Benedikt Spranger Signed-off-by: Jan Altenberg Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/ether.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index a70e255402b..e9987230814 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -1561,6 +1561,7 @@ done_set_intf: memcpy(req->buf, buf, n); req->complete = rndis_response_complete; rndis_free_response(dev->rndis_config, buf); + value = n; } /* else stalls ... spec says to avoid that */ } -- cgit v1.2.3 From 5b0a4d66a11df34b632e48ce80ebe81da94bdb65 Mon Sep 17 00:00:00 2001 From: Stephen Ware Date: Sun, 17 Feb 2008 11:01:58 -0800 Subject: USB: add new vernier product id to ldusb.c I have a new ldusb device to go into the device table. Jiri has merged the change for hiddev quirks already. From: Stephen Ware Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/ldusb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 8208496dfc6..c730d20eec6 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c @@ -61,6 +61,7 @@ #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002 #define USB_DEVICE_ID_VERNIER_SKIP 0x0003 #define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004 +#define USB_DEVICE_ID_VERNIER_LCSPEC 0x0006 #define USB_VENDOR_ID_MICROCHIP 0x04d8 #define USB_DEVICE_ID_PICDEM 0x000c @@ -92,6 +93,7 @@ static struct usb_device_id ld_usb_table [] = { { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) }, { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS) }, { USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICDEM) }, + { USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LCSPEC) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, ld_usb_table); -- cgit v1.2.3 From d726fb757722a3907356830a0b8d976267596d5c Mon Sep 17 00:00:00 2001 From: Kevin Lloyd Date: Thu, 14 Feb 2008 13:35:16 -0800 Subject: USB: serial: move zte MF330 from sierra to option Move the Onda H600/ZTE MF33 device from the sierra driver to the option driver. The reason it was moved is because the sierra driver is starting to support more and more sierra proprietary features, so it makes more sense to keep sierra only devices in there. Signed-off-by: Kevin Lloyd Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 3 +++ drivers/usb/serial/sierra.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 8c892e54d20..af2674c5741 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -124,6 +124,8 @@ static int option_send_setup(struct usb_serial_port *port); #define BANDRICH_PRODUCT_C100_1 0x1002 #define BANDRICH_PRODUCT_C100_2 0x1003 +#define QUALCOMM_VENDOR_ID 0x05C6 + static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, @@ -193,6 +195,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 4c925e3e8a6..e3d44ae8d44 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -178,7 +178,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0112), .driver_info = DEVICE_1_PORT }, /* Sierra Wireless AirCard 580 */ { USB_DEVICE(0x0F3D, 0x0112), .driver_info = DEVICE_1_PORT }, /* Airprime/Sierra PC 5220 */ - { USB_DEVICE(0x05C6, 0x6613), .driver_info = DEVICE_1_PORT }, /* Onda H600/ZTE MF330 */ { USB_DEVICE(0x1199, 0x0FFF), .driver_info = DEVICE_INSTALLER}, { } -- cgit v1.2.3 From 4e58407d5c31827de0225ea927420192a71daccd Mon Sep 17 00:00:00 2001 From: Robert Spitzenpfeil Date: Wed, 20 Feb 2008 12:11:22 -0500 Subject: USB: usb-storage: unusual_devs entry for Oracom MP3 player This patch (as1034) was written by Leonid Petrov, reported by Robert Spitzenpfeil, and updated by me. It adds an unusual_devs entry with the IGNORE_RESIDUE flag for the Oracom MP3 player. Together with the change to the Get-Max-LUN routine in as1032, it makes the player usable. Signed-off-by: Alan Stern Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 6b2b57c32f9..6494cc52a11 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1424,6 +1424,17 @@ UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), +/* Patch by Leonid Petrov mail at lpetrov.net + * Reported by Robert Spitzenpfeil + * http://www.qbik.ch/usb/devices/showdev.php?id=1705 + * Updated to 103 device by MJ Ray mjr at phonecoop.coop + */ +UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, + "Oracom Co., Ltd", + "ORC-200M", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_IGNORE_RESIDUE ), + /* David Kuehling : * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI * errors when trying to write. -- cgit v1.2.3 From 274399d14f121d7676ecb75a461cfed6cf9e4cdb Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 20 Feb 2008 12:10:04 -0500 Subject: USB: quirks and unusual_devs entry for Actions flash drive This patch (as1033) adds a quirks entry and an unusual_devs entry for the Actions Semiconductor flash drive. This device has a 64-byte string descriptor, which it doesn't terminate with a 0-length packet. Oddly enough, the reporter's logs show that when the device was plugged in at boot time, it changes its behavior completely -- it uses a different product ID, product string descriptor, and bDeviceClass. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 3 +++ drivers/usb/storage/unusual_devs.h | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index dc51790582d..f90ab5e94c5 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -28,6 +28,9 @@ * devices is broken... */ static const struct usb_device_id usb_quirk_list[] = { + /* Action Semiconductor flash disk */ + { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255}, + /* CBM - Flash disk */ { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, /* HP 5300/5370C scanner */ diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 6494cc52a11..99679a8cfa0 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1500,6 +1500,15 @@ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x0110, US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, 0 ), +/* Reported by Fabio Venturi + * The device reports a vendor-specific bDeviceClass. + */ +UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, + "Actions Semiconductor", + "Mtp device", + US_SC_DEVICE, US_PR_DEVICE, NULL, + 0), + /* Reported by Kevin Lloyd * Entry is needed for the initializer function override, * which instructs the device to load as a modem -- cgit v1.2.3 From 7084191d53b224b953c8e1db525ea6c31aca5fc7 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 20 Feb 2008 14:15:58 -0500 Subject: USB: usb-storage: don't access beyond the end of the sg buffer This patch (as1035) fixes a bug in usb_stor_access_xfer_buf() (the bug was originally found by Boaz Harrosh): The routine must not attempt to write beyond the end of a scatter-gather list or beyond the number of bytes requested. It also fixes up the formatting of a few comments and similar whitespace issues. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/protocol.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index a41ce21c069..958f5b17847 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, /* Copy a buffer of length buflen to/from the srb's transfer buffer. * Update the **sgptr and *offset variables so that the next copy will - * pick up from where this one left off. */ - + * pick up from where this one left off. + */ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, unsigned int *offset, enum xfer_buf_dir dir) { unsigned int cnt; + struct scatterlist *sg = *sgptr; /* We have to go through the list one entry * 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, * in kernel-addressable memory then kmap() will return its address. * If the page is not directly accessible -- such as a user buffer * located in high memory -- then kmap() will map it to a temporary - * position in the kernel's virtual address space. */ - struct scatterlist *sg = *sgptr; + * position in the kernel's virtual address space. + */ if (!sg) sg = scsi_sglist(srb); + buflen = min(buflen, scsi_bufflen(srb)); /* This loop handles a single s-g list entry, which may - * include multiple pages. Find the initial page structure - * and the starting offset within the page, and update - * the *offset and **sgptr values for the next loop. */ + * include multiple pages. Find the initial page structure + * and the starting offset within the page, and update + * the *offset and **sgptr values for the next loop. + */ cnt = 0; - while (cnt < buflen) { + while (cnt < buflen && sg) { struct page *page = sg_page(sg) + ((sg->offset + *offset) >> PAGE_SHIFT); - unsigned int poff = - (sg->offset + *offset) & (PAGE_SIZE-1); + unsigned int poff = (sg->offset + *offset) & (PAGE_SIZE-1); unsigned int sglen = sg->length - *offset; if (sglen > buflen - cnt) { @@ -222,14 +224,15 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, } /* Store the contents of buffer into srb's transfer buffer and set the - * SCSI residue. */ + * SCSI residue. + */ void usb_stor_set_xfer_buf(unsigned char *buffer, unsigned int buflen, struct scsi_cmnd *srb) { unsigned int offset = 0; struct scatterlist *sg = NULL; - usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, + buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, TO_XFER_BUF); if (buflen < scsi_bufflen(srb)) scsi_set_resid(srb, scsi_bufflen(srb) - buflen); -- cgit v1.2.3 From c6dd2e61d35e0fbd516c0169decc08e56619f0c6 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Thu, 21 Feb 2008 22:49:13 +0300 Subject: USB: POWERPC: ehci: fix ppc build Currently, this setup: CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD_PPC_OF=y Will fail to build: CC drivers/usb/host/ehci-hcd.o drivers/usb/host/ehci-hcd.c:1018:2: error: #error "missing bus glue for ehci-hcd" make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1 ehci-hcd.c actually contains OF_PLATFORM_DRIVER glue, so error is bogus. Signed-off-by: Anton Vorontsov Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index d64887bfa6a..b8ad55aff84 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1014,7 +1014,7 @@ MODULE_LICENSE ("GPL"); #endif #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ - !defined(PS3_SYSTEM_BUS_DRIVER) + !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) #error "missing bus glue for ehci-hcd" #endif -- cgit v1.2.3 From b5937a415fc0387c18c40d618c7e98d1e2f65b42 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Thu, 21 Feb 2008 23:30:58 +0300 Subject: ehci-fsl: add PPC_MPC837x to default y This patch converts USB_EHCI_FSL config option into the verbose bool, so we'll able to select it for other freescale processors with built-in EHCI controller. Signed-off-by: Anton Vorontsov Cc: Kumar Gala Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 2dd05441481..bf8be2a41a4 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -69,10 +69,9 @@ config USB_EHCI_BIG_ENDIAN_DESC default y config USB_EHCI_FSL - bool - depends on USB_EHCI_HCD + bool "Support for Freescale on-chip EHCI USB controller" + depends on USB_EHCI_HCD && FSL_SOC select USB_EHCI_ROOT_HUB_TT - default y if PPC_MPC834x || PPC_MPC831x ---help--- Variation of ARC USB block used in some Freescale chips. -- cgit v1.2.3