]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 21:53:21 +0000 (13:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 21:53:21 +0000 (13:53 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: ACE1001 patch for cp2101.c
  USB: usbmon: fix read(2)
  USB: gadget rndis: send notifications
  USB: gadget rndis: stop windows self-immolation
  USB: storage: update unusual_devs entries for Nokia 5300 and 5310
  USB: storage: updates unusual_devs entry for the Nokia 6300
  usb: musb: fix bug in musb_schedule
  USB: fix SB700 usb subsystem hang bug

drivers/usb/gadget/f_rndis.c
drivers/usb/host/ehci-pci.c
drivers/usb/mon/mon_bin.c
drivers/usb/musb/musb_host.c
drivers/usb/serial/cp2101.c
drivers/usb/storage/unusual_devs.h

index 659b3d9671c4fe3f0f31220cb4b3bde514d88d2b..428b5993575a9126104da3ec32ea695e7881c9e8 100644 (file)
@@ -172,7 +172,6 @@ static struct usb_interface_descriptor rndis_data_intf __initdata = {
        .bDescriptorType =      USB_DT_INTERFACE,
 
        /* .bInterfaceNumber = DYNAMIC */
-       .bAlternateSetting =    1,
        .bNumEndpoints =        2,
        .bInterfaceClass =      USB_CLASS_CDC_DATA,
        .bInterfaceSubClass =   0,
@@ -303,7 +302,7 @@ static void rndis_response_available(void *_rndis)
        __le32                          *data = req->buf;
        int                             status;
 
-       if (atomic_inc_return(&rndis->notify_count))
+       if (atomic_inc_return(&rndis->notify_count) != 1)
                return;
 
        /* Send RNDIS RESPONSE_AVAILABLE notification; a
index c46a58f9181ded00f97627f076277fd32db9ff79..9d0ea573aef60c3e45afb3dec145c5f0f4ed843b 100644 (file)
@@ -66,6 +66,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci(hcd);
        struct pci_dev          *pdev = to_pci_dev(hcd->self.controller);
+       struct pci_dev          *p_smbus;
+       u8                      rev;
        u32                     temp;
        int                     retval;
 
@@ -166,6 +168,25 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                        pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
                }
                break;
+       case PCI_VENDOR_ID_ATI:
+               /* SB700 old version has a bug in EHCI controller,
+                * which causes usb devices lose response in some cases.
+                */
+               if (pdev->device == 0x4396) {
+                       p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
+                                                PCI_DEVICE_ID_ATI_SBX00_SMBUS,
+                                                NULL);
+                       if (!p_smbus)
+                               break;
+                       rev = p_smbus->revision;
+                       if ((rev == 0x3a) || (rev == 0x3b)) {
+                               u8 tmp;
+                               pci_read_config_byte(pdev, 0x53, &tmp);
+                               pci_write_config_byte(pdev, 0x53, tmp | (1<<3));
+                       }
+                       pci_dev_put(p_smbus);
+               }
+               break;
        }
 
        ehci_reset(ehci);
index c9de3f027aab07a9907b331f25c7723ac012d8e3..e06810aef2dfedbec54f8b232b4219d79fba5536 100644 (file)
@@ -687,7 +687,10 @@ static ssize_t mon_bin_read(struct file *file, char __user *buf,
        }
 
        if (rp->b_read >= sizeof(struct mon_bin_hdr)) {
-               step_len = min(nbytes, (size_t)ep->len_cap);
+               step_len = ep->len_cap;
+               step_len -= rp->b_read - sizeof(struct mon_bin_hdr);
+               if (step_len > nbytes)
+                       step_len = nbytes;
                offset = rp->b_out + PKT_SIZE;
                offset += rp->b_read - sizeof(struct mon_bin_hdr);
                if (offset >= rp->b_size)
index e45e70bcc5e2ea1c79610ad7f754a8029e922ccd..cc64462d4c4ee0ee97e5271afa3769bdfdab7686 100644 (file)
@@ -1757,7 +1757,7 @@ static int musb_schedule(
                }
        }
        /* use bulk reserved ep1 if no other ep is free */
-       if (best_end > 0 && qh->type == USB_ENDPOINT_XFER_BULK) {
+       if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) {
                hw_ep = musb->bulk_ep;
                if (is_in)
                        head = &musb->in_bulk;
index 9035d7256b03570a63203994d0fc031ea59e0a22..cfaf1f0855351c110a13a0c9c0287b79702d722b 100644 (file)
@@ -56,6 +56,7 @@ static void cp2101_shutdown(struct usb_serial *);
 static int debug;
 
 static struct usb_device_id id_table [] = {
+       { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
        { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
        { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
        { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
index d4e5fc86e43c679eee20ee64e5334cfd2eceda66..6da9a7a962a8a2790b30dd3f25fa952aec763ec8 100644 (file)
@@ -167,6 +167,13 @@ UNUSUAL_DEV(  0x0421, 0x005d, 0x0001, 0x0600,
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
+/* Patch for Nokia 5310 capacity */
+UNUSUAL_DEV(  0x0421, 0x006a, 0x0000, 0x0591,
+               "Nokia",
+               "5310",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY ),
+
 /* Reported by Mario Rettig <mariorettig@web.de> */
 UNUSUAL_DEV(  0x0421, 0x042e, 0x0100, 0x0100,
                "Nokia",
@@ -233,14 +240,14 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x0370,
                US_FL_MAX_SECTORS_64 ),
 
 /* Reported by Cedric Godin <cedric@belbone.be> */
-UNUSUAL_DEV(  0x0421, 0x04b9, 0x0551, 0x0551,
+UNUSUAL_DEV(  0x0421, 0x04b9, 0x0500, 0x0551,
                "Nokia",
                "5300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY ),
 
 /* Reported by Richard Nauber <RichardNauber@web.de> */
-UNUSUAL_DEV(  0x0421, 0x04fa, 0x0601, 0x0601,
+UNUSUAL_DEV(  0x0421, 0x04fa, 0x0550, 0x0660,
                "Nokia",
                "6300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,