From 521b85ae66ad40a670b27b0596312d347a89b669 Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Tue, 13 Mar 2007 08:30:50 -0700 Subject: USB: fix usb-serial regression This patch reverts d9a7ecacac5f8274d2afce09aadcf37bdb42b93a since it breaks drivers that need to access the ->port[] array in shutdown (most of them). Signed-Off: Jim Radford Acked-by: Mark Lord Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/usb-serial.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8511352251f..7639022cdf8 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -138,6 +138,11 @@ static void destroy_serial(struct kref *kref) dbg("%s - %s", __FUNCTION__, serial->type->description); + serial->type->shutdown(serial); + + /* return the minor range that this device had */ + return_serial(serial); + for (i = 0; i < serial->num_ports; ++i) serial->port[i]->open_count = 0; @@ -148,12 +153,6 @@ static void destroy_serial(struct kref *kref) serial->port[i] = NULL; } - if (serial->type->shutdown) - serial->type->shutdown(serial); - - /* return the minor range that this device had */ - return_serial(serial); - /* If this is a "fake" port, we have to clean it up here, as it will * not get cleaned up in port_release() as it was never registered with * the driver core */ -- cgit v1.2.3 From 6dc477f3e4dd456122fdb231a1c57393659b93b5 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sun, 11 Mar 2007 20:03:03 +0000 Subject: USB: two more device ids for dm9601 usbnet driver This patch for the linux-usb-devel tree adds two more product ids to the dm9601 driver. These ids were found on rebadged dm9601 devices in the wild. Signed-off-by: Jon Dowland Acked-by: Peter Korsgaard Signed-off-by: Greg Kroah-Hartman --- drivers/usb/net/dm9601.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/net/dm9601.c b/drivers/usb/net/dm9601.c index c0bc52be5e1..5130cc7eb31 100644 --- a/drivers/usb/net/dm9601.c +++ b/drivers/usb/net/dm9601.c @@ -578,6 +578,14 @@ static const struct usb_device_id products[] = { USB_DEVICE(0x0a46, 0x9601), /* Davicom USB-100 */ .driver_info = (unsigned long)&dm9601_info, }, + { + USB_DEVICE(0x0a46, 0x6688), /* ZT6688 USB NIC */ + .driver_info = (unsigned long)&dm9601_info, + }, + { + USB_DEVICE(0x0a46, 0x0268), /* ShanTou ST268 USB NIC */ + .driver_info = (unsigned long)&dm9601_info, + }, {}, // END }; -- cgit v1.2.3 From a7f3dd5d4b74030964c80fb1b7f2131986fe2d67 Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Sat, 10 Mar 2007 15:17:16 -0800 Subject: USB: RAZR v3i unusual_devs This adds an unusual_devs entry for the Motorola RAZR 3vi. From: Pete Zaitcev Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 2dd31e3f510..e13637dfb64 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1411,6 +1411,16 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), +/* + * Patch by Pete Zaitcev + * Report by Mark Patton. Red Hat bz#208928. + */ +UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, + "Motorola", + "RAZR V3i", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + /* Reported by Radovan Garabik */ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, "MPIO", -- cgit v1.2.3 From e8e30c765c5cfa5219918d3e5017fc563cf7ea03 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 14 Mar 2007 11:11:08 +0100 Subject: USB: necessary update for mos7720 driver these devices have a shared interrupt endpoint. For serialcore to pass an interrupt endpoint to a subdriver, the subdriver must define and _export_ a fitting callback. The mos7720 driver failed to do so. This led invariably to an oops upon open. This patch fixes it. The driver is useless without it. Please try to get this into 2.6.21 and the stable kernels that have this driver. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mos7720.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 2d588fb8257..19bf403f9db 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -1628,6 +1628,7 @@ static struct usb_serial_driver moschip7720_2port_driver = { .chars_in_buffer = mos7720_chars_in_buffer, .break_ctl = mos7720_break, .read_bulk_callback = mos7720_bulk_in_callback, + .read_int_callback = mos7720_interrupt_callback, }; static int __init moschip7720_init(void) -- cgit v1.2.3 From e5740b5d75af4ad9423911fe77d687f47e880a4d Mon Sep 17 00:00:00 2001 From: Mark Glines Date: Wed, 14 Mar 2007 11:55:28 -0700 Subject: airprime: USB ID for Novatel EV620 mini PCI-E card Add an ID to recognise the Novatel EV620 wireless adapter. http://www.novatelwireless.com/products/expedite/ev620.html It looks like a mini PCI-Express adapter. The mPCIE connector includes USB pins... the card shows up to the system as a USB device, and powers itself from the PCI bus. The card I have isn't activated yet, so I can't get a PPP session up yet, but I have tested basic serial communication successfully in both 2.6.18 and 2.6.20 kernels, once the product ID was added. (the driver changed quite a bit between the two revs.) In both drivers, it responds to AT commands and such. Signed-off-by: Mark Glines Cc: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/airprime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 310a8b5f590..5b4ef96a2c6 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -18,11 +18,12 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ + { USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */ { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */ { USB_DEVICE(0x1410, 0x1130) }, /* Novatel Wireless S720 CDMA/EV-DO */ - { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 CDMA/EV-DO */ { USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */ - { USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */ + { USB_DEVICE(0x1410, 0x2100) }, /* Novatel Wireless EV620 CDMA/EV-DO */ + { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 CDMA/EV-DO */ { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */ { }, }; -- cgit v1.2.3 From 5ec71db59ac07eeac89a54b35a90c181bbd3c445 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Fri, 16 Mar 2007 15:53:07 -0400 Subject: usblp: quirk flag and device entry for Seiko Epson M129C printer This patch (as872) adds a device table entry and a new quirk flag to the usblp driver for the Seiko Epson Receipt printer. This printer returns Vendor-Specific values for bInterfaceClass and bInterfaceSubClass, but the bInterfaceProtocol value is valid and it works with usblp. The new quirks flag tells the driver to ignore the Class and SubClass values in the interface descriptor. Signed-off-by: Alan Stern Cc: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/usblp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 63e50a1f139..6584cf00f7f 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -202,6 +202,7 @@ struct quirk_printer_struct { #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ +#define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific Class or SubClass */ static const struct quirk_printer_struct quirk_printers[] = { { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ @@ -218,6 +219,7 @@ static const struct quirk_printer_struct quirk_printers[] = { { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */ { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */ { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut */ + { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt Printer M129C */ { 0, 0 } }; @@ -1048,7 +1050,8 @@ static int usblp_select_alts(struct usblp *usblp) ifd = &if_alt->altsetting[i]; if (ifd->desc.bInterfaceClass != 7 || ifd->desc.bInterfaceSubClass != 1) - continue; + if (!(usblp->quirks & USBLP_QUIRK_BAD_CLASS)) + continue; if (ifd->desc.bInterfaceProtocol < USBLP_FIRST_PROTOCOL || ifd->desc.bInterfaceProtocol > USBLP_LAST_PROTOCOL) @@ -1232,6 +1235,7 @@ static struct usb_device_id usblp_ids [] = { { USB_INTERFACE_INFO(7, 1, 1) }, { USB_INTERFACE_INFO(7, 1, 2) }, { USB_INTERFACE_INFO(7, 1, 3) }, + { USB_DEVICE(0x04b8, 0x0202) }, /* Seiko Epson Receipt Printer M129C */ { } /* Terminating entry */ }; -- cgit v1.2.3 From 774f78cf3b81c553c087ca0e8740e9cd779df578 Mon Sep 17 00:00:00 2001 From: Ken L Johnson Date: Fri, 16 Mar 2007 10:17:31 -0600 Subject: USB: berry_charge: correct dbg string for second magic command I was testing the berry_charge module with my Blackberry 8700c and had great success, thanks. Looking at the code for my own learning I noticed the following cut and paste error... just a nit. Signed-off-by: Ken L Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/berry_charge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/misc/berry_charge.c b/drivers/usb/misc/berry_charge.c index 60893c6c822..b15f2fd8dab 100644 --- a/drivers/usb/misc/berry_charge.c +++ b/drivers/usb/misc/berry_charge.c @@ -69,7 +69,7 @@ static int magic_charge(struct usb_device *udev) return retval; } - dbg(&udev->dev, "Sending first magic command\n"); + dbg(&udev->dev, "Sending second magic command\n"); retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 0xa2, 0x40, 0, 1, dummy_buffer, 0, 100); if (retval != 0) { -- cgit v1.2.3 From 69806d5631b79ed0c442ae5b15c46bcfd8662476 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 19 Mar 2007 13:39:51 -0700 Subject: USB: new Novatel device ids for option driver This moves all of the Novatel device ids to the option driver, where they belong. Thanks to Novatel for providing a list of all supported devices. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/airprime.c | 5 ----- drivers/usb/serial/option.c | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 5b4ef96a2c6..7538c64a509 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -19,11 +19,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */ { USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */ - { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */ - { USB_DEVICE(0x1410, 0x1130) }, /* Novatel Wireless S720 CDMA/EV-DO */ - { USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */ - { USB_DEVICE(0x1410, 0x2100) }, /* Novatel Wireless EV620 CDMA/EV-DO */ - { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 CDMA/EV-DO */ { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */ { }, }; diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index db92a7fb1f7..e178e6f4031 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -109,7 +109,6 @@ static int option_send_setup(struct usb_serial_port *port); #define HUAWEI_PRODUCT_E220 0x1003 #define NOVATELWIRELESS_VENDOR_ID 0x1410 -#define NOVATELWIRELESS_PRODUCT_U740 0x1400 #define ANYDATA_VENDOR_ID 0x16d5 #define ANYDATA_PRODUCT_ID 0x6501 @@ -152,7 +151,19 @@ 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(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) }, + { 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 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1130) }, /* Novatel Merlin S720 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1400) }, /* Novatel U730 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1410) }, /* Novatel U740 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1420) }, /* Novatel EU870 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel XU870 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2100) }, /* Novatel EV620 CDMA/EV-DO */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) }, { } /* Terminating entry */ }; -- cgit v1.2.3