From fa0e6721e7931f5bb0293db982b327b0dff97596 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 22 Aug 2007 23:11:06 +0100 Subject: USB: oti6858: Remove broken ioctl code in -mm tree and also the broken fixes This stuff is simply not needed. Signed-off-by: Alan Cox Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/oti6858.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index 833ada47fc54..64f3f66a7a35 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -817,21 +817,6 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file, __FUNCTION__, port->number, cmd, arg); switch (cmd) { - case TCGETS: - if (kernel_termios_to_user_termios((struct ktermios __user *)arg, - port->tty->termios)) - return -EFAULT; - return 0; - - case TCSETS: - case TCSETSW: /* FIXME: this is not the same! */ - case TCSETSF: /* FIXME: this is not the same! */ - if (user_termios_to_kernel_termios(port->tty->termios, - (struct ktermios __user *)arg)) - return -EFAULT; - oti6858_set_termios(port, NULL); - return 0; - case TCFLSH: /* FIXME */ return 0; -- cgit v1.2.3 From ca9024eb6ca31df971c5fa40bf4bee2d913115e2 Mon Sep 17 00:00:00 2001 From: samson yeung Date: Fri, 31 Aug 2007 16:40:40 -0400 Subject: usb/misc/sisusbvga: add product ID of TARGUS/MCT device Device is Targus ACP50US which includes a Magic Control Technologies usb vga device using the SiS315(E) or compatible. Signed-off-by: Samson Yeung Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/sisusbvga/sisusb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 9f37ba44c132..b64ca91d9b02 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -3404,6 +3404,7 @@ static void sisusb_disconnect(struct usb_interface *intf) } static struct usb_device_id sisusb_table [] = { + { USB_DEVICE(0x0711, 0x0550) }, { USB_DEVICE(0x0711, 0x0900) }, { USB_DEVICE(0x0711, 0x0901) }, { USB_DEVICE(0x0711, 0x0902) }, -- cgit v1.2.3 From d7fde2d6729482e093b18a74fc24c4c2c0c61ca5 Mon Sep 17 00:00:00 2001 From: Pierre Castella Date: Thu, 6 Sep 2007 22:34:39 +0200 Subject: USB: ftdi_sio: add of a new product/manufacturer, TML I have added to a new product based on the FTDI 232R USB/Serial transceiver, which is commercialized by The Mobility Lab. Here is a trivial patch enclosed, against 2.6.22.6 kernel. Signed-off-by: Pierre Castella Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio.h | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 1370c423d7c2..2d045857b181 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -568,6 +568,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(ELEKTOR_VID, ELEKTOR_FT323R_PID) }, { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, + { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk }, { }, /* Optional parameter entry */ diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index c70e1de6389e..b57b90ae9f9d 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h @@ -534,6 +534,14 @@ #define OLIMEX_VID 0x15BA #define OLIMEX_ARM_USB_OCD_PID 0x0003 + +/* + * The Mobility Lab (TML) + * Submitted by Pierre Castella + */ +#define TML_VID 0x1B91 /* Vendor ID */ +#define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */ + /* Commands */ #define FTDI_SIO_RESET 0 /* Reset the port */ #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ -- cgit v1.2.3 From a74108d33878078b9403e5426a04c54683a8ebc2 Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Tue, 28 Aug 2007 23:33:52 -0700 Subject: USB: Add iPhone device id to the quirk list. --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 9e467118dc94..a5cde8ba1655 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -87,6 +87,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0fca, 0x0004), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, { USB_DEVICE(0x0fca, 0x0006), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* Apple iPhone */ + { USB_DEVICE(0x05ac, 0x1290), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + { } /* terminating entry must be last */ }; -- cgit v1.2.3 From d7790baf62a0e9f034e4668bb4b5fdaaa248412b Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 4 Sep 2007 10:11:56 -0400 Subject: USB: prevent Thomson card reader from autosuspending This patch (as985) prevents the SGS THomson Microelectronics 4in1 card reader from autosuspending. This resolves Bugzilla #8885. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index a5cde8ba1655..af3b627a93cf 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -32,6 +32,10 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, /* Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage) */ { USB_DEVICE(0x03f0, 0x4002), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + + /* SGS Thomson Microelectronics 4in1 card reader */ + { USB_DEVICE(0x0483, 0x0321), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* Acer Peripherals Inc. (now BenQ Corp.) Prisa 640BU */ { USB_DEVICE(0x04a5, 0x207e), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, /* Benq S2W 3300U */ -- cgit v1.2.3 From c269b6abd65c24517b70ccc9430c4c50dbc0dc84 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 4 Sep 2007 10:12:44 -0400 Subject: USB: prevent Genesys USB-IDE from autosuspending This patch (as986) prevents the troublesome Genesys USB-IDE adapter from autosuspending. It may not be necessary for all such devices, but the one in Bugzilla #8892 sometimes fails to resume. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index af3b627a93cf..e388cbceaad9 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -70,6 +70,10 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x05cc, 0x2267), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, /* Ultima Electronics Corp.*/ { USB_DEVICE(0x05d8, 0x4005), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + + /* Genesys USB-to-IDE */ + { USB_DEVICE(0x0503, 0x0702), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* Agfa Snapscan1212u */ { USB_DEVICE(0x06bd, 0x2061), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, /* Seagate RSS LLC */ -- cgit v1.2.3 From ce05916f6bf9906fba88853078715f9a4d300237 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 4 Sep 2007 16:11:41 +0200 Subject: USB: quirky flash drive That drive is quite odd. It has 2K sectors, times out getting string descriptors and needs a quirk. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index e388cbceaad9..1766a2d4e091 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -28,6 +28,8 @@ * devices is broken... */ static const struct usb_device_id usb_quirk_list[] = { + /* CBM - Flash disk */ + { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, /* HP 5300/5370C scanner */ { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 }, /* Hewlett-Packard PhotoSmart 720 / PhotoSmart 935 (storage) */ -- cgit v1.2.3 From e5dd01154c1e9ca2400f4682602d1a4fa54c25dd Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Tue, 4 Sep 2007 11:46:23 +0200 Subject: USB: fix linked list insertion bugfix for usb core This patch fixes the order of list_add_tail() arguments in usb_store_new_id() so the list can have more than one single element. Signed-off-by: Nathael Pajani Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index a1ad11d0c47c..63b1243a9139 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -60,7 +60,7 @@ ssize_t usb_store_new_id(struct usb_dynids *dynids, dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE; spin_lock(&dynids->lock); - list_add_tail(&dynids->list, &dynid->node); + list_add_tail(&dynid->node, &dynids->list); spin_unlock(&dynids->lock); if (get_driver(driver)) { -- cgit v1.2.3 From a3209a0efc404cc4190b496bae247e7706371032 Mon Sep 17 00:00:00 2001 From: Jaime Velasco Juan Date: Fri, 7 Sep 2007 19:06:39 +0100 Subject: USB: option: Add a new device ID for the HUAWEI E220 HSDPA modem. Signed-off-by: Jaime Velasco Juan CC: Matthias Urlichs Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 4cb3c165742b..5d9967db6c2c 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -108,6 +108,7 @@ static int option_send_setup(struct usb_serial_port *port); #define HUAWEI_VENDOR_ID 0x12D1 #define HUAWEI_PRODUCT_E600 0x1001 #define HUAWEI_PRODUCT_E220 0x1003 +#define HUAWEI_PRODUCT_E220BIS 0x1004 #define NOVATELWIRELESS_VENDOR_ID 0x1410 #define DELL_VENDOR_ID 0x413C @@ -158,6 +159,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ -- cgit v1.2.3 From 2c4cd1f13a658daacb4fe5ed88887675c31ae78f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 30 Aug 2007 19:02:10 +0200 Subject: USB: option: Add Dell HSDPA 5520 to driver This is based on information sent in by Christian Gothe. Cc: Christian Gothe Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5d9967db6c2c..a18659e0700c 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -178,6 +178,7 @@ 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, 0x8137) }, /* Dell Wireless HSDPA 5520 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, -- cgit v1.2.3 From 61392af387787dfa2b381880d195dfb7ab0d1ea3 Mon Sep 17 00:00:00 2001 From: Ricardo Barberis Date: Wed, 5 Sep 2007 22:37:19 -0700 Subject: USB: Add Sony Ericsson P1i to unusual_devs.h Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2d92ce31018f..f69f15e352f1 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1393,6 +1393,13 @@ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), +/* Reported by Ricardo Barberis */ +UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000, + "Sony Ericsson", + "P1i", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_IGNORE_RESIDUE ), + /* Reported by Emmanuel Vasilakis */ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, "Sony Ericsson", -- cgit v1.2.3 From 9374b9fd6cef7f8b75a543d044c5b0925aae08cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ortwin=20Gl=C3=BCck?= Date: Thu, 6 Sep 2007 00:06:26 +0200 Subject: USB: Nikon D40 Quirks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The D40 needs the same quirks as the other (semi-)professional Nikon cameras. The patch is against 2.6.23-rc5. Details: http://bugs.gentoo.org/show_bug.cgi?id=191431 From: Ortwin Glück Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index f69f15e352f1..da52d1077473 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -348,6 +348,13 @@ UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), +/* Reported by Ortwin Glueck */ +UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0110, + "NIKON", + "NIKON DSC D40", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + /* BENQ DC5330 * Reported by Manuel Fombuena and * Frank Copeland */ -- cgit v1.2.3 From c4766560e4d3e2a9c10d69d7d618dc2b0082a3dc Mon Sep 17 00:00:00 2001 From: Massimiliano Ghilardi Date: Tue, 4 Sep 2007 22:53:43 +0200 Subject: USB Mass Storage: limit "Rockchip ROCK MP3" device (071b:3203) max I/O to 64 sectors per command The MP3/MP4/AVI player "Rockchip ROCK MP3" is seen as a USB disk, but fails if more than 128 sectors (64kB) are sent or requested in a single read or write command, and disconnects from the USB bus. Typical kernel log showing the problem is: usb 3-1: reset high speed USB device using ehci_hcd and address 6 usb 3-1: reset high speed USB device using ehci_hcd and address 6 sd 14:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00 end_request: I/O error, dev sdb, sector 32 sd 14:0:0:0: [sdb] Result: hostbyte=0x07 driverbyte=0x00 end_request: I/O error, dev sdb, sector 32 usb 3-1: USB disconnect, address 6 This patch works around the device limitation by adding "Rockchip ROCK MP3" to unusual USB devices list and limiting data transfers to 64 sectors (32kB) per command. Tested on 2.6.23-rc5 (amd64). Signed-off-by: Massimiliano Ghilardi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index da52d1077473..c6b78ba815ea 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -904,6 +904,22 @@ UNUSUAL_DEV( 0x069b, 0x3004, 0x0001, 0x0001, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), +/* Reported by Massimiliano Ghilardi + * This USB MP3/AVI player device fails and disconnects if more than 128 + * sectors (64kB) are read/written in a single command, and may be present + * at least in the following products: + * "Magnex Digital Video Panel DVP 1800" + * "MP4 AIGO 4GB SLOT SD" + * "Teclast TL-C260 MP3" + * "i.Meizu PMP MP3/MP4" + * "Speed MV8 MP4 Audio Player" + */ +UNUSUAL_DEV( 0x071b, 0x3203, 0x0100, 0x0100, + "RockChip", + "ROCK MP3", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_MAX_SECTORS_64), + /* Reported by Olivier Blondeau */ UNUSUAL_DEV( 0x0727, 0x0306, 0x0100, 0x0100, "ATMEL", -- cgit v1.2.3 From 86833691c21efba661bd3512d2ebfa0b96c011c5 Mon Sep 17 00:00:00 2001 From: Lamarque Vieira Souza Date: Tue, 4 Sep 2007 12:15:08 -0300 Subject: USB: More USB_QUIRK_RESET_RESUME devices I would like have the attached patch added to Linux kernel. The three usb flash memories listed in the patch are being used in Intel's ClassmatePC and need USB_QUIRK_RESET_RESUME to work reliably when resuming from ram. --- drivers/usb/core/quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 1766a2d4e091..25453d6a59ea 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -76,6 +76,12 @@ static const struct usb_device_id usb_quirk_list[] = { /* Genesys USB-to-IDE */ { USB_DEVICE(0x0503, 0x0702), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* INTEL VALUE SSD */ + { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* M-Systems Flash Disk Pioneers */ + { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Agfa Snapscan1212u */ { USB_DEVICE(0x06bd, 0x2061), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, /* Seagate RSS LLC */ @@ -100,6 +106,9 @@ static const struct usb_device_id usb_quirk_list[] = { /* Apple iPhone */ { USB_DEVICE(0x05ac, 0x1290), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* SKYMEDI USB_DRIVE */ + { USB_DEVICE(0x1516, 0x8628), .driver_info = USB_QUIRK_RESET_RESUME }, + { } /* terminating entry must be last */ }; -- cgit v1.2.3 From 49b4f902857c3d8d95b47ae5a8cecb34ae96a3ba Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 26 Aug 2007 12:44:24 -0700 Subject: USB: fix serial gadget ACM breakage Two of the CDC ACM control requests in the serial gadget have never been correct, and have been reported to cause serious troubles ... as in, soft lockup and maybe watchdog reset (depending on hardware). This patch makes those request fail cleanly, rather than misbehaving. Someone using CDC ACM should fix them according to the FIXME comments which now replace the previous bugs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/serial.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 9cd98e73dc1d..ce4d2e09633d 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -1691,14 +1691,12 @@ static int gs_setup_class(struct usb_gadget *gadget, switch (ctrl->bRequest) { case USB_CDC_REQ_SET_LINE_CODING: - ret = min(wLength, - (u16)sizeof(struct usb_cdc_line_coding)); - if (port) { - spin_lock(&port->port_lock); - memcpy(&port->port_line_coding, req->buf, ret); - spin_unlock(&port->port_lock); - } - ret = 0; + /* FIXME Submit req to read the data; have its completion + * handler copy that data to port->port_line_coding (iff + * it's valid) and maybe pass it on. Until then, fail. + */ + printk(KERN_WARNING "gs_setup: set_line_coding " + "unuspported\n"); break; case USB_CDC_REQ_GET_LINE_CODING: @@ -1713,11 +1711,18 @@ static int gs_setup_class(struct usb_gadget *gadget, break; case USB_CDC_REQ_SET_CONTROL_LINE_STATE: - ret = 0; + /* FIXME Submit req to read the data; have its completion + * handler use that to set the state (iff it's valid) and + * maybe pass it on. Until then, fail. + */ + printk(KERN_WARNING "gs_setup: set_control_line_state " + "unuspported\n"); break; default: - printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n", + printk(KERN_ERR "gs_setup: unknown class request, " + "type=%02x, request=%02x, value=%04x, " + "index=%04x, length=%d\n", ctrl->bRequestType, ctrl->bRequest, wValue, wIndex, wLength); break; -- cgit v1.2.3 From e6a20ff999fe849d1f5f15d5e14763f5a553778f Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 28 Aug 2007 10:34:22 +0200 Subject: USB: another quirky device (LCD display) this time it is an LCD. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 25453d6a59ea..7f17d0fd76c0 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -76,6 +76,9 @@ static const struct usb_device_id usb_quirk_list[] = { /* Genesys USB-to-IDE */ { USB_DEVICE(0x0503, 0x0702), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* USB Graphical LCD - EEH Datalink GmbH */ + { USB_DEVICE(0x060c, 0x04eb), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, + /* INTEL VALUE SSD */ { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, -- cgit v1.2.3 From 03fc370bdc1b31f3d09bd88d65bc50c03f450a9d Mon Sep 17 00:00:00 2001 From: Satyam Sharma Date: Mon, 3 Sep 2007 01:42:43 +0530 Subject: USB: drivers/usb/serial/bus.c: Fix incompatible pointer type warning drivers/usb/serial/bus.c: In function usb_serial_bus_deregister: drivers/usb/serial/bus.c:185: warning: passing argument 1 of free_dynids from incompatible pointer type Above build warning comes when CONFIG_HOTPLUG=n because argument of free_dynids() in serial/bus.c is a struct usb_serial_driver, not a struct usb_driver. This is not a runtime bug, because the function is an empty stub and never dereferences the passed pointer anyway. Signed-off-by: Satyam Sharma Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index c08a38402b93..a47a24f8820d 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -138,7 +138,7 @@ static void free_dynids(struct usb_serial_driver *drv) static struct driver_attribute drv_attrs[] = { __ATTR_NULL, }; -static inline void free_dynids(struct usb_driver *drv) +static inline void free_dynids(struct usb_serial_driver *drv) { } #endif -- cgit v1.2.3