From e92e63aabacf049fd64477e5e29eae0375d8d064 Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Wed, 12 Mar 2008 19:20:09 +0200 Subject: [SCSI] isd200: Allocate sense_buffer for hacked up scsi_cmnd Since the separation of sense_buffer from scsi_cmnd, Drivers that hack their own struct scsi_cmnd like here isd200, must also take care of their own sense_buffer. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley --- drivers/usb/storage/isd200.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 2ae1e8673b1..9d3f28b92cb 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c @@ -1469,6 +1469,7 @@ static void isd200_free_info_ptrs(void *info_) if (info) { kfree(info->id); kfree(info->RegsBuf); + kfree(info->srb.sense_buffer); } } @@ -1494,7 +1495,9 @@ static int isd200_init_info(struct us_data *us) kzalloc(sizeof(struct hd_driveid), GFP_KERNEL); info->RegsBuf = (unsigned char *) kmalloc(sizeof(info->ATARegs), GFP_KERNEL); - if (!info->id || !info->RegsBuf) { + info->srb.sense_buffer = + kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); + if (!info->id || !info->RegsBuf || !info->srb.sense_buffer) { isd200_free_info_ptrs(info); kfree(info); retStatus = ISD200_ERROR; -- cgit v1.2.3 From 12cd5b984f825c5448aa4c0df561f8252076fd52 Mon Sep 17 00:00:00 2001 From: Roy Hashimoto Date: Wed, 12 Mar 2008 13:55:31 -0800 Subject: USB: fix gadgetfs class request delegation gadgetfs (drivers/usb/gadget/inode.c) was not delegating all non-device requests to userspace. This patch makes the handling of all request cases consistent. Signed-off-by: Roy Hashimoto Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 805602a687c..0a6feafc8d2 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -1458,7 +1458,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) /* currently one config, two speeds */ case USB_REQ_SET_CONFIGURATION: if (ctrl->bRequestType != 0) - break; + goto unrecognized; if (0 == (u8) w_value) { value = 0; dev->current_config = 0; @@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) /* PXA automagically handles this request too */ case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != 0x80) - break; + goto unrecognized; *(u8 *)req->buf = dev->current_config; value = min (w_length, (u16) 1); break; -- cgit v1.2.3 From 392e1d9817d0024c96aae237c3c4349e47c976fd Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Tue, 11 Mar 2008 10:20:12 -0400 Subject: USB: new quirk flag to avoid Set-Interface This patch (as1057) fixes a problem with the X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter; the device crashes when it receives a Set-Interface request. A new quirk (USB_QUIRK_NO_SET_INTF) is introduced and a quirks entry is created for this device. Signed-off-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/message.c | 5 ++++- drivers/usb/core/quirks.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index fefb92296e8..c311f67b7f0 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1206,7 +1206,10 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) return -EINVAL; } - ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + if (dev->quirks & USB_QUIRK_NO_SET_INTF) + ret = -EPIPE; + else + ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, alternate, interface, NULL, 0, 5000); diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index d9d1eb19f2a..dfc5418ea10 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -50,6 +50,9 @@ static const struct usb_device_id usb_quirk_list[] = { /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, + /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ + { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF }, + /* Action Semiconductor flash disk */ { USB_DEVICE(0x10d6, 0x2200), .driver_info = USB_QUIRK_STRING_FETCH_255 }, -- cgit v1.2.3 From b483b6aaa56f0db72fa50e85b6499a32d82009bf Mon Sep 17 00:00:00 2001 From: Max Arnold Date: Thu, 20 Mar 2008 16:43:56 +0700 Subject: USB: pl2303: another product ID Device like this http://aldiga.com/english/A-100-USB-EDGE10.htm contains Prolific 2303 chip. Actually their site a bit outdated - I have AlDiga AL-11U GSM/GPRS/EDGE modem and it works with pl2303 module after adding corresponding product ID. By default modem uses baud rate 460800. GSM chipset - SIMCom SIM600, quad band 850/900/1800/1900 MHz Device info: T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=067b ProdID=0611 Rev= 0.00 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=pl2303 E: Ad=81(I) Atr=03(Int.) MxPS= 10 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms From: Max Arnold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/pl2303.c | 1 + drivers/usb/serial/pl2303.h | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index ae3ec1a6400..2af778555bd 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -55,6 +55,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 237a41f6638..10cf872e5ec 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h @@ -13,6 +13,7 @@ #define PL2303_PRODUCT_ID_DCU11 0x1234 #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 +#define PL2303_PRODUCT_ID_ALDIGA 0x0611 #define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID2 0x0547 -- cgit v1.2.3 From ba2ef3b36c8ad9aa1df6b2061b0a56f68c64776d Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Mon, 17 Mar 2008 14:21:01 -0700 Subject: USB: isd200: fix memory leak in isd200_get_inquiry_data If the inquiry fails then the info structure on us->extra was not freed. Signed-off-by: Boaz Harrosh Acked-by: Alan Stern Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/isd200.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb') diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 9d3f28b92cb..971d13dd5e6 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c @@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us ) /* Free driver structure */ us->extra_destructor(info); + kfree(info); us->extra = NULL; us->extra_destructor = NULL; } -- cgit v1.2.3 From cc36bdd47ae51b66780b317c1fa519221f894405 Mon Sep 17 00:00:00 2001 From: Constantin Baranov Date: Sun, 16 Mar 2008 20:04:23 +0000 Subject: USB: add support for Motorola ROKR Z6 cellphone in mass storage mode Motorola ROKR Z6 cellphone has bugs in its USB, so it is impossible to use it as mass storage. Patch describes new "unusual" USB device for it with FIX_INQUIRY and FIX_CAPACITY flags and new BULK_IGNORE_TAG flag. Last flag relaxes check for equality of bcs->Tag and us->tag in usb_stor_Bulk_transport routine. Signed-off-by: Constantin Baranov Signed-off-by: Matthew Dharm Signed-off-by: Daniel Drake Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/transport.c | 3 ++- drivers/usb/storage/unusual_devs.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 5780ed15f1a..bdd4334bed5 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -1009,7 +1009,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", le32_to_cpu(bcs->Signature), bcs->Tag, residue, bcs->Status); - if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) { + if (!(bcs->Tag == us->tag || (us->flags & US_FL_BULK_IGNORE_TAG)) || + bcs->Status > US_BULK_STAT_PHASE) { US_DEBUGP("Bulk logical error\n"); return USB_STOR_TRANSPORT_ERROR; } diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 99679a8cfa0..e5219a56947 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1589,6 +1589,17 @@ UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), +/* + * Patch by Constantin Baranov + * Report by Andreas Koenecke. + * Motorola ROKR Z6. + */ +UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101, + "Motorola", + "MSnc.", + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG), + /* Reported by Radovan Garabik */ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, "MPIO", -- cgit v1.2.3 From 4f4f9c53c241a0205434c76d05eba2c5f160e9d0 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Fri, 14 Mar 2008 00:53:24 -0700 Subject: USB: sierra: dma fixes while I was adding autosuspend to that driver I noticed a few issues. You were having DMAed buffers as a part of a structure. This will fail on platforms that are not DMA-coherent (arm, sparc, ppc, ...) Please test this patch to fix it. Signed-off-by: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/sierra.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index e3d44ae8d44..dda4d05fe23 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings */ -#define DRIVER_VERSION "v.1.2.7" +#define DRIVER_VERSION "v.1.2.8" #define DRIVER_AUTHOR "Kevin Lloyd " #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" @@ -196,9 +196,9 @@ struct sierra_port_private { spinlock_t lock; /* lock the structure */ int outstanding_urbs; /* number of out urbs in flight */ - /* Input endpoints and buffer for this port */ + /* Input endpoints and buffers for this port */ struct urb *in_urbs[N_IN_URB]; - char in_buffer[N_IN_URB][IN_BUFLEN]; + char *in_buffer[N_IN_URB]; /* Settings for the port */ int rts_state; /* Handshaking pins (outputs) */ @@ -638,6 +638,15 @@ static int sierra_startup(struct usb_serial *serial) return -ENOMEM; } spin_lock_init(&portdata->lock); + for (j = 0; j < N_IN_URB; j++) { + portdata->in_buffer[j] = kmalloc(IN_BUFLEN, GFP_KERNEL); + if (!portdata->in_buffer[j]) { + for (--j; j >= 0; j--) + kfree(portdata->in_buffer[j]); + kfree(portdata); + return -ENOMEM; + } + } usb_set_serial_port_data(port, portdata); @@ -681,7 +690,7 @@ static void sierra_shutdown(struct usb_serial *serial) for (j = 0; j < N_IN_URB; j++) { usb_kill_urb(portdata->in_urbs[j]); usb_free_urb(portdata->in_urbs[j]); - portdata->in_urbs[j] = NULL; + kfree(portdata->in_buffer[j]); } kfree(portdata); usb_set_serial_port_data(port, NULL); -- cgit v1.2.3 From 7f170a632d67297b4076947f9b42f55f710ccd42 Mon Sep 17 00:00:00 2001 From: Kevin Lloyd Date: Fri, 14 Mar 2008 00:53:24 -0700 Subject: USB: sierra: add another device id Add support for the MC8775 device to the sierra driver. Signed-off-by: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/sierra.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index dda4d05fe23..ed678811e6a 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -163,6 +163,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Thinkpad internal) */ + { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ -- cgit v1.2.3 From 055b93c9e32a44acfe3e5e58b900f1e8fcd5f858 Mon Sep 17 00:00:00 2001 From: Rene Herman Date: Thu, 20 Mar 2008 00:58:16 -0700 Subject: USB: ehci: stop vt6212 bus hogging The VIA VT6212 defaults to only waiting 1us between passes over EHCI's async ring, which hammers PCI badly ... and by preventing other devices from accessing the bus, causes problems like drops in IDE throughput, a problem that's been bugging users of those chips for several years. A (partial) datasheet for this chip eventually turned up, letting us see how to make it use a VIA-specific register to switch over to the the normal 10us value instead, as suggested by the EHCI specification Solution noted by Lev A. Melnikovsky. It's not clear whether this register exists on other VIA chips; we know that it's ineffective on the vt8235. So this patch only applies to chips that seem to be incarnations of the (discrete) vt6212. Signed-off-by: Rene Herman Tested-by: Lev A. Melnikovsky Tested-by: Alessandro Suardi Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-pci.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 3ba01664f82..72ccd56e36d 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -152,6 +152,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd) break; } break; + case PCI_VENDOR_ID_VIA: + if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x60) { + u8 tmp; + + /* The VT6212 defaults to a 1 usec EHCI sleep time which + * hogs the PCI bus *badly*. Setting bit 5 of 0x4B makes + * that sleep time use the conventional 10 usec. + */ + pci_read_config_byte(pdev, 0x4b, &tmp); + if (tmp & 0x20) + break; + pci_write_config_byte(pdev, 0x4b, tmp | 0x20); + } + break; } ehci_reset(ehci); -- cgit v1.2.3 From cdc647a9b75741659bfc6acc44a6b3a646ad53bf Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 2 Apr 2008 13:40:20 -0700 Subject: USB: another ehci_iaa_watchdog fix This patch, suggested by Alan Stern, fixes the hung USB issues on my notebook from suspend/resume cycles. It does so by eliminating some confusion about the internal state machine associated with unlinking from the EHCI async schedule ring, which caused a recent regression: http://bugzilla.kernel.org/show_bug.cgi?id=10345 Signed-off-by: Mark Lord Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 40e8240b785..4e065e556e4 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -135,8 +135,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) hcd->state = HC_STATE_QUIESCING; } ehci->command = ehci_readl(ehci, &ehci->regs->command); - if (ehci->reclaim) - end_unlink_async(ehci); ehci_work(ehci); /* Unlike other USB host controller types, EHCI doesn't have @@ -180,6 +178,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) ehci_halt (ehci); hcd->state = HC_STATE_SUSPENDED; + if (ehci->reclaim) + end_unlink_async(ehci); + /* allow remote wakeup */ mask = INTR_MASK; if (!device_may_wakeup(&hcd->self.root_hub->dev)) -- cgit v1.2.3 From 1bfd6693cd66f1e79abce62d3e8c3647e1f59a55 Mon Sep 17 00:00:00 2001 From: Robert Spanton Date: Sun, 23 Mar 2008 19:47:23 +0000 Subject: USB: serial: ti_usb_3410_5052: Correct TUSB3410 endpoint requirements. The changes introduced in commit 063a2da8f01806906f7d7b1a1424b9afddebc443 changed the semantics of the num_interrupt_in, num_interrupt_out, num_bulk_in and num_bulk_out entries of the usb_serial_driver struct to be the number of endpoints the device has when probed. This patch changes the ti_1port_device usb_serial_driver struct to reflect this change. The single port devices only have 1 bulk_out endpoint in their initial configuration, and so this patch changes the number of other types to NUM_DONT_CARE. The same change probably needs doing to the ti_2port_device struct, but I don't have a two port device at hand. Signed-off-by: Robert Spanton Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ti_usb_3410_5052.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index b517f93352e..e3d241f67af 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -265,8 +265,8 @@ static struct usb_serial_driver ti_1port_device = { .description = "TI USB 3410 1 port adapter", .usb_driver = &ti_usb_driver, .id_table = ti_id_table_3410, - .num_interrupt_in = 1, - .num_bulk_in = 1, + .num_interrupt_in = NUM_DONT_CARE, + .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = 1, .num_ports = 1, .attach = ti_startup, -- cgit v1.2.3 From e8898681023c8bfb920afcd215e43c8832597b91 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 25 Mar 2008 17:32:16 +0100 Subject: USB: cp2101: Add identifiers for the Telegesys ETRX2USB This patch adds support for the Telegesys ETRX2USB which works fine with the cp2101 driver. Signed-off-by: Florian Fainelli Tested-by: Xavier Carcelle Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cp2101.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index f3ca66017a0..324bb61d68f 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c @@ -75,6 +75,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ + { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ -- cgit v1.2.3 From d04863e9e65767feff7807c8f693ac2719dd1944 Mon Sep 17 00:00:00 2001 From: Brad Sawatzky Date: Tue, 25 Mar 2008 22:32:43 -0400 Subject: USB: serial: fix regression in Visor/Palm OS module for kernels >= 2.6.24 Fixes a bug/inconsistency revealed by the additional sanity checking in commit 063a2da8f01806906f7d7b1a1424b9afddebc443 introduced in the original 2.6.24 branch. The Handspring Visor / PalmOS 4 device structure defines .num_bulk_out=2 but the usb-serial probe returns num_bulk_out=3, triggering the check in the above commit and forcing a bail out when the device (a Garmin iQue in my case) attempts to connect. The patch bumps the expected number of endpoints to 3. FWIW, this patch will probably solve the following kernel bug report for Treo users (identical symptoms, different model PalmOS units): Signed-off-by: Brad Sawatzky Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/visor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 22b3f78a388..c2b01f7c319 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -191,7 +191,7 @@ static struct usb_serial_driver handspring_device = { .id_table = id_table, .num_interrupt_in = NUM_DONT_CARE, .num_bulk_in = 2, - .num_bulk_out = 2, + .num_bulk_out = NUM_DONT_CARE, .num_ports = 2, .open = visor_open, .close = visor_close, -- cgit v1.2.3 From 4756febb10d96104e08661031ba835771075419c Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Thu, 27 Mar 2008 10:15:22 -0400 Subject: USB: fix bug in sg initialization in usbtest This patch (as1062) fixes a bug in the scatter-gather initialization code in the usbtest driver. When the sg-helper conversion was performed, it wasn't done correctly. Signed-off-by: Alan Stern CC: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/usbtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index da922dfc0dc..b6b5b2affad 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -378,6 +378,7 @@ alloc_sglist (int nents, int max, int vary) sg = kmalloc (nents * sizeof *sg, GFP_KERNEL); if (!sg) return NULL; + sg_init_table(sg, nents); for (i = 0; i < nents; i++) { char *buf; @@ -390,7 +391,7 @@ alloc_sglist (int nents, int max, int vary) } /* kmalloc pages are always physically contiguous! */ - sg_init_one(&sg[i], buf, size); + sg_set_buf(&sg[i], buf, size); switch (pattern) { case 0: -- cgit v1.2.3 From 822470537d0fc1dee38a2a9c8b8c398bfbb332bb Mon Sep 17 00:00:00 2001 From: Clark Rawlins Date: Thu, 27 Mar 2008 09:56:17 -0400 Subject: USB: Allow initialization of broken keyspan serial adapters. Fixes the keyspan driver after the addition of additional checking of driver requirements introduced in usb-serial.c commit 063a2da8f01806906f7d7b1a1424b9afddebc443. The initialization of the keyspan usb_serial_driver structs were not initializing the num_interrupt_out field and the additional checking was rejecting the end point so the driver wouldn't finish initializing. This commit initializes the fields to NUM_DONT_CARE. It works for the keyspan USA-49WG and doesn't break the USA-19HS which are the two keyspan devices I have to test with. Signed-off-by: Clark Rawlins Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h index 8a0d1740152..74ce8bca3e6 100644 --- a/drivers/usb/serial/keyspan.h +++ b/drivers/usb/serial/keyspan.h @@ -637,6 +637,7 @@ static struct usb_serial_driver keyspan_pre_device = { .description = "Keyspan - (without firmware)", .id_table = keyspan_pre_ids, .num_interrupt_in = NUM_DONT_CARE, + .num_interrupt_out = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE, .num_ports = 1, @@ -651,6 +652,7 @@ static struct usb_serial_driver keyspan_1port_device = { .description = "Keyspan 1 port adapter", .id_table = keyspan_1port_ids, .num_interrupt_in = NUM_DONT_CARE, + .num_interrupt_out = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE, .num_ports = 1, @@ -678,6 +680,7 @@ static struct usb_serial_driver keyspan_2port_device = { .description = "Keyspan 2 port adapter", .id_table = keyspan_2port_ids, .num_interrupt_in = NUM_DONT_CARE, + .num_interrupt_out = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE, .num_ports = 2, @@ -705,6 +708,7 @@ static struct usb_serial_driver keyspan_4port_device = { .description = "Keyspan 4 port adapter", .id_table = keyspan_4port_ids, .num_interrupt_in = NUM_DONT_CARE, + .num_interrupt_out = NUM_DONT_CARE, .num_bulk_in = NUM_DONT_CARE, .num_bulk_out = NUM_DONT_CARE, .num_ports = 4, -- cgit v1.2.3 From 9cebcdc7fb10d478b22d7125b215cee3b9ea82f2 Mon Sep 17 00:00:00 2001 From: Richard Kennedy Date: Fri, 28 Mar 2008 14:50:30 -0700 Subject: USB: ohci: fix 2 timers to fire at jiffies + 1s Code inspection discovered in 2 places timers were being incorrectly setup using round_jiffies_relative(HZ). The timer would then fire at time (0 <= T < HZ). Fix them to use round_jiffies(jiffies + HZ); Signed-off-by: Richard Kennedy Cc: Alan Stern Cc: David Brownell Cc: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/host/ohci-q.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index dd4798ee028..33f1c1c32ed 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -467,7 +467,7 @@ static void unlink_watchdog_func(unsigned long _ohci) out: kfree(seen); if (ohci->eds_scheduled) - mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ)); + mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ)); done: spin_unlock_irqrestore(&ohci->lock, flags); } diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index 51817322232..9c9f3b59186 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c @@ -169,7 +169,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) if (quirk_zfmicro(ohci) && (ed->type == PIPE_INTERRUPT) && !(ohci->eds_scheduled++)) - mod_timer(&ohci->unlink_watchdog, round_jiffies_relative(HZ)); + mod_timer(&ohci->unlink_watchdog, round_jiffies(jiffies + HZ)); wmb (); /* we care about rm_list when setting CLE/BLE in case the HC was at -- cgit v1.2.3