aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-25 02:24:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-25 02:24:16 -0400
commita4083c9271e0a697278e089f2c0b9a95363ada0a (patch)
treedb82449c18bc1410091d39f29c59d47379dd9ec5
parent4742dc1d7670bd00253d2dfb637d55446dc6ef81 (diff)
parent7fdba2f2917da4403044d9ea5d239f9cc0e9693d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: Fix cut-and-paste error in rtl8150.c USB: ehci: stop vt6212 bus hogging USB: sierra: add another device id USB: sierra: dma fixes USB: add support for Motorola ROKR Z6 cellphone in mass storage mode USB: isd200: fix memory leak in isd200_get_inquiry_data USB: pl2303: another product ID USB: new quirk flag to avoid Set-Interface USB: fix gadgetfs class request delegation
-rw-r--r--drivers/net/usb/rtl8150.c2
-rw-r--r--drivers/usb/core/message.c5
-rw-r--r--drivers/usb/core/quirks.c3
-rw-r--r--drivers/usb/gadget/inode.c4
-rw-r--r--drivers/usb/host/ehci-pci.c14
-rw-r--r--drivers/usb/serial/pl2303.c1
-rw-r--r--drivers/usb/serial/pl2303.h1
-rw-r--r--drivers/usb/serial/sierra.c18
-rw-r--r--drivers/usb/storage/isd200.c1
-rw-r--r--drivers/usb/storage/transport.c3
-rw-r--r--drivers/usb/storage/unusual_devs.h11
-rw-r--r--include/linux/usb/quirks.h3
-rw-r--r--include/linux/usb_usual.h4
13 files changed, 60 insertions, 10 deletions
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index 7e1f00131f91..df56a518691c 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -376,7 +376,7 @@ static int alloc_all_urbs(rtl8150_t * dev)
376 return 0; 376 return 0;
377 } 377 }
378 dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL); 378 dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
379 if (!dev->intr_urb) { 379 if (!dev->ctrl_urb) {
380 usb_free_urb(dev->rx_urb); 380 usb_free_urb(dev->rx_urb);
381 usb_free_urb(dev->tx_urb); 381 usb_free_urb(dev->tx_urb);
382 usb_free_urb(dev->intr_urb); 382 usb_free_urb(dev->intr_urb);
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index fefb92296e8f..c311f67b7f08 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)
1206 return -EINVAL; 1206 return -EINVAL;
1207 } 1207 }
1208 1208
1209 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 1209 if (dev->quirks & USB_QUIRK_NO_SET_INTF)
1210 ret = -EPIPE;
1211 else
1212 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
1210 USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, 1213 USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
1211 alternate, interface, NULL, 0, 5000); 1214 alternate, interface, NULL, 0, 5000);
1212 1215
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index d9d1eb19f2a1..dfc5418ea10c 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[] = {
50 /* M-Systems Flash Disk Pioneers */ 50 /* M-Systems Flash Disk Pioneers */
51 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, 51 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
52 52
53 /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
54 { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
55
53 /* Action Semiconductor flash disk */ 56 /* Action Semiconductor flash disk */
54 { USB_DEVICE(0x10d6, 0x2200), .driver_info = 57 { USB_DEVICE(0x10d6, 0x2200), .driver_info =
55 USB_QUIRK_STRING_FETCH_255 }, 58 USB_QUIRK_STRING_FETCH_255 },
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 805602a687cb..0a6feafc8d28 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)
1458 /* currently one config, two speeds */ 1458 /* currently one config, two speeds */
1459 case USB_REQ_SET_CONFIGURATION: 1459 case USB_REQ_SET_CONFIGURATION:
1460 if (ctrl->bRequestType != 0) 1460 if (ctrl->bRequestType != 0)
1461 break; 1461 goto unrecognized;
1462 if (0 == (u8) w_value) { 1462 if (0 == (u8) w_value) {
1463 value = 0; 1463 value = 0;
1464 dev->current_config = 0; 1464 dev->current_config = 0;
@@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
1505 /* PXA automagically handles this request too */ 1505 /* PXA automagically handles this request too */
1506 case USB_REQ_GET_CONFIGURATION: 1506 case USB_REQ_GET_CONFIGURATION:
1507 if (ctrl->bRequestType != 0x80) 1507 if (ctrl->bRequestType != 0x80)
1508 break; 1508 goto unrecognized;
1509 *(u8 *)req->buf = dev->current_config; 1509 *(u8 *)req->buf = dev->current_config;
1510 value = min (w_length, (u16) 1); 1510 value = min (w_length, (u16) 1);
1511 break; 1511 break;
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 3ba01664f821..72ccd56e36dd 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)
152 break; 152 break;
153 } 153 }
154 break; 154 break;
155 case PCI_VENDOR_ID_VIA:
156 if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x60) {
157 u8 tmp;
158
159 /* The VT6212 defaults to a 1 usec EHCI sleep time which
160 * hogs the PCI bus *badly*. Setting bit 5 of 0x4B makes
161 * that sleep time use the conventional 10 usec.
162 */
163 pci_read_config_byte(pdev, 0x4b, &tmp);
164 if (tmp & 0x20)
165 break;
166 pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
167 }
168 break;
155 } 169 }
156 170
157 ehci_reset(ehci); 171 ehci_reset(ehci);
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index ae3ec1a64008..2af778555bdc 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -55,6 +55,7 @@ static struct usb_device_id id_table [] = {
55 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, 55 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) },
56 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, 56 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
57 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, 57 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
58 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) },
58 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, 59 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
59 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, 60 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
60 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, 61 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 237a41f6638a..10cf872e5ecb 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -13,6 +13,7 @@
13#define PL2303_PRODUCT_ID_DCU11 0x1234 13#define PL2303_PRODUCT_ID_DCU11 0x1234
14#define PL2303_PRODUCT_ID_PHAROS 0xaaa0 14#define PL2303_PRODUCT_ID_PHAROS 0xaaa0
15#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 15#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2
16#define PL2303_PRODUCT_ID_ALDIGA 0x0611
16 17
17#define ATEN_VENDOR_ID 0x0557 18#define ATEN_VENDOR_ID 0x0557
18#define ATEN_VENDOR_ID2 0x0547 19#define ATEN_VENDOR_ID2 0x0547
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index e3d44ae8d448..ed678811e6a6 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -14,7 +14,7 @@
14 Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> 14 Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
15*/ 15*/
16 16
17#define DRIVER_VERSION "v.1.2.7" 17#define DRIVER_VERSION "v.1.2.8"
18#define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>" 18#define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>"
19#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" 19#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
20 20
@@ -163,6 +163,7 @@ static struct usb_device_id id_table [] = {
163 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ 163 { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
164 { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ 164 { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */
165 { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Thinkpad internal) */ 165 { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Thinkpad internal) */
166 { USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */
166 { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ 167 { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */
167 { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ 168 { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/
168 { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ 169 { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/
@@ -196,9 +197,9 @@ struct sierra_port_private {
196 spinlock_t lock; /* lock the structure */ 197 spinlock_t lock; /* lock the structure */
197 int outstanding_urbs; /* number of out urbs in flight */ 198 int outstanding_urbs; /* number of out urbs in flight */
198 199
199 /* Input endpoints and buffer for this port */ 200 /* Input endpoints and buffers for this port */
200 struct urb *in_urbs[N_IN_URB]; 201 struct urb *in_urbs[N_IN_URB];
201 char in_buffer[N_IN_URB][IN_BUFLEN]; 202 char *in_buffer[N_IN_URB];
202 203
203 /* Settings for the port */ 204 /* Settings for the port */
204 int rts_state; /* Handshaking pins (outputs) */ 205 int rts_state; /* Handshaking pins (outputs) */
@@ -638,6 +639,15 @@ static int sierra_startup(struct usb_serial *serial)
638 return -ENOMEM; 639 return -ENOMEM;
639 } 640 }
640 spin_lock_init(&portdata->lock); 641 spin_lock_init(&portdata->lock);
642 for (j = 0; j < N_IN_URB; j++) {
643 portdata->in_buffer[j] = kmalloc(IN_BUFLEN, GFP_KERNEL);
644 if (!portdata->in_buffer[j]) {
645 for (--j; j >= 0; j--)
646 kfree(portdata->in_buffer[j]);
647 kfree(portdata);
648 return -ENOMEM;
649 }
650 }
641 651
642 usb_set_serial_port_data(port, portdata); 652 usb_set_serial_port_data(port, portdata);
643 653
@@ -681,7 +691,7 @@ static void sierra_shutdown(struct usb_serial *serial)
681 for (j = 0; j < N_IN_URB; j++) { 691 for (j = 0; j < N_IN_URB; j++) {
682 usb_kill_urb(portdata->in_urbs[j]); 692 usb_kill_urb(portdata->in_urbs[j]);
683 usb_free_urb(portdata->in_urbs[j]); 693 usb_free_urb(portdata->in_urbs[j]);
684 portdata->in_urbs[j] = NULL; 694 kfree(portdata->in_buffer[j]);
685 } 695 }
686 kfree(portdata); 696 kfree(portdata);
687 usb_set_serial_port_data(port, NULL); 697 usb_set_serial_port_data(port, NULL);
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index 9d3f28b92cbe..971d13dd5e65 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 )
1230 1230
1231 /* Free driver structure */ 1231 /* Free driver structure */
1232 us->extra_destructor(info); 1232 us->extra_destructor(info);
1233 kfree(info);
1233 us->extra = NULL; 1234 us->extra = NULL;
1234 us->extra_destructor = NULL; 1235 us->extra_destructor = NULL;
1235 } 1236 }
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 5780ed15f1ad..bdd4334bed5a 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)
1009 US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", 1009 US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
1010 le32_to_cpu(bcs->Signature), bcs->Tag, 1010 le32_to_cpu(bcs->Signature), bcs->Tag,
1011 residue, bcs->Status); 1011 residue, bcs->Status);
1012 if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) { 1012 if (!(bcs->Tag == us->tag || (us->flags & US_FL_BULK_IGNORE_TAG)) ||
1013 bcs->Status > US_BULK_STAT_PHASE) {
1013 US_DEBUGP("Bulk logical error\n"); 1014 US_DEBUGP("Bulk logical error\n");
1014 return USB_STOR_TRANSPORT_ERROR; 1015 return USB_STOR_TRANSPORT_ERROR;
1015 } 1016 }
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 99679a8cfa02..e5219a56947c 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,
1589 US_SC_DEVICE, US_PR_DEVICE, NULL, 1589 US_SC_DEVICE, US_PR_DEVICE, NULL,
1590 US_FL_FIX_CAPACITY), 1590 US_FL_FIX_CAPACITY),
1591 1591
1592/*
1593 * Patch by Constantin Baranov <const@tltsu.ru>
1594 * Report by Andreas Koenecke.
1595 * Motorola ROKR Z6.
1596 */
1597UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101,
1598 "Motorola",
1599 "MSnc.",
1600 US_SC_DEVICE, US_PR_DEVICE, NULL,
1601 US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG),
1602
1592/* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */ 1603/* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */
1593UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, 1604UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999,
1594 "MPIO", 1605 "MPIO",
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 2692ec9389ca..1f999ec8d08c 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -9,3 +9,6 @@
9 9
10/* device can't resume correctly so reset it instead */ 10/* device can't resume correctly so reset it instead */
11#define USB_QUIRK_RESET_RESUME 0x00000002 11#define USB_QUIRK_RESET_RESUME 0x00000002
12
13/* device can't handle Set-Interface requests */
14#define USB_QUIRK_NO_SET_INTF 0x00000004
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index cee0623b3c7b..0a40dfa44c9f 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -50,7 +50,9 @@
50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ 50 US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
51 /* sometimes sizes is too big */ \ 51 /* sometimes sizes is too big */ \
52 US_FLAG(MAX_SECTORS_MIN,0x00002000) \ 52 US_FLAG(MAX_SECTORS_MIN,0x00002000) \
53 /* Sets max_sectors to arch min */ 53 /* Sets max_sectors to arch min */ \
54 US_FLAG(BULK_IGNORE_TAG,0x00004000) \
55 /* Ignore tag mismatch in bulk operations */
54 56
55 57
56#define US_FLAG(name, value) US_FL_##name = value , 58#define US_FLAG(name, value) US_FL_##name = value ,