]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 Mar 2008 06:24:16 +0000 (23:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 Mar 2008 06:24:16 +0000 (23:24 -0700)
* 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

13 files changed:
drivers/net/usb/rtl8150.c
drivers/usb/core/message.c
drivers/usb/core/quirks.c
drivers/usb/gadget/inode.c
drivers/usb/host/ehci-pci.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/serial/sierra.c
drivers/usb/storage/isd200.c
drivers/usb/storage/transport.c
drivers/usb/storage/unusual_devs.h
include/linux/usb/quirks.h
include/linux/usb_usual.h

index 7e1f00131f91160833e023f416ae2834afeb52cf..df56a518691c6c9fb5664c2f972082ac84fdf693 100644 (file)
@@ -376,7 +376,7 @@ static int alloc_all_urbs(rtl8150_t * dev)
                return 0;
        }
        dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
-       if (!dev->intr_urb) {
+       if (!dev->ctrl_urb) {
                usb_free_urb(dev->rx_urb);
                usb_free_urb(dev->tx_urb);
                usb_free_urb(dev->intr_urb);
index fefb92296e8f5a921edf849a30caf808cf904793..c311f67b7f0824dba591b50d4b21f943827349b0 100644 (file)
@@ -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);
 
index d9d1eb19f2a134ecde7a5f5bad21cb195da0bdb1..dfc5418ea10c0a11654cb59d392bb535be0aad0b 100644 (file)
@@ -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 },
index 805602a687cbc7bfd2b225d5e247a6f4f8c19cc5..0a6feafc8d2847ef39ab4ed3c74cac750e8b931c 100644 (file)
@@ -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;
index 3ba01664f82154b00bef518eea7c3e809566f63b..72ccd56e36dd46665712ea26d5944312f8a10635 100644 (file)
@@ -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);
index ae3ec1a64008b65e2b10f4a95152ea74e6c23729..2af778555bdc85496e3a3f02c9d8f3f977cda72f 100644 (file)
@@ -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) },
index 237a41f6638ac239b9c3dc980230cf4c615537f5..10cf872e5ecbf1c86e1f52d0895e1913e8c89e9f 100644 (file)
@@ -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
index e3d44ae8d4482c1c1753e286e1c26a0878ad995a..ed678811e6a6d0ed54e3f6db2c9c1b343bcdba69 100644 (file)
@@ -14,7 +14,7 @@
   Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
 */
 
-#define DRIVER_VERSION "v.1.2.7"
+#define DRIVER_VERSION "v.1.2.8"
 #define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>"
 #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
 
@@ -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*/
@@ -196,9 +197,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 +639,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 +691,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);
index 9d3f28b92cbeaa8411d8953e6128ffe4f01af64c..971d13dd5e65a55e9256c932d63bc6b0a0caa1e4 100644 (file)
@@ -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;
                }
index 5780ed15f1ad19d6b3d1a17f74bd37b4bfe0bfab..bdd4334bed5a71c7615455cedbb755925cec1436 100644 (file)
@@ -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;
        }
index 99679a8cfa0268d3d3e557eb91a45da2bf034dcd..e5219a56947cb9ee20d0483d143dd7771bd28450 100644 (file)
@@ -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 <const@tltsu.ru>
+ * 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 <garabik@kassiopeia.juls.savba.sk> */
 UNUSUAL_DEV(  0x2735, 0x100b, 0x0000, 0x9999,
                "MPIO",
index 2692ec9389ca2047120f2b175b34076b88c0c049..1f999ec8d08c520c431d626e3bf5372e890c51a3 100644 (file)
@@ -9,3 +9,6 @@
 
 /* device can't resume correctly so reset it instead */
 #define USB_QUIRK_RESET_RESUME         0x00000002
+
+/* device can't handle Set-Interface requests */
+#define USB_QUIRK_NO_SET_INTF          0x00000004
index cee0623b3c7be52b17b2a47b5208b3528f13cf18..0a40dfa44c9f9a640524f03cecd2ef5261b1f78d 100644 (file)
@@ -50,7 +50,9 @@
        US_FLAG(CAPACITY_HEURISTICS,    0x00001000)             \
                /* sometimes sizes is too big */                \
        US_FLAG(MAX_SECTORS_MIN,0x00002000)                     \
-               /* Sets max_sectors to arch min */
+               /* Sets max_sectors to arch min */              \
+       US_FLAG(BULK_IGNORE_TAG,0x00004000)                     \
+               /* Ignore tag mismatch in bulk operations */
 
 
 #define US_FLAG(name, value)   US_FL_##name = value ,