]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Jan 2012 18:15:18 +0000 (10:15 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Jan 2012 18:15:18 +0000 (10:15 -0800)
added patches:
asix-fix-infinite-loop-in-rx_fixup.patch
bonding-fix-error-handling-if-slave-is-busy-v2.patch
igmp-avoid-zero-delay-when-receiving-odd-mixture-of-igmp-queries.patch
ohci-final-fix-for-nvidia-problems-i-hope.patch
usb-add-quirk-for-another-camera.patch
usb-add-usb-id-for-multiplex-rc-serial-adapter-to-cp210x.c.patch
usb-ch9-fix-up-maxstreams-helper.patch
usb-fix-number-of-mapped-sg-dma-entries.patch
usb-musb-fix-pm_runtime-mismatch.patch
usb-omninet-fix-write_room.patch
usb-option-add-id-for-3g-dongle-model-vt1000-of-viettel.patch
usb-option-add-zd-incorporated-hspa-modem.patch
usb-usb-storage-doesn-t-support-dynamic-id-currently-the-patch-disables-the-feature-to-fix-an-oops.patch
xhci-properly-handle-comp_2nd_bw_err.patch

15 files changed:
queue-3.0/asix-fix-infinite-loop-in-rx_fixup.patch [new file with mode: 0644]
queue-3.0/bonding-fix-error-handling-if-slave-is-busy-v2.patch [new file with mode: 0644]
queue-3.0/igmp-avoid-zero-delay-when-receiving-odd-mixture-of-igmp-queries.patch [new file with mode: 0644]
queue-3.0/ohci-final-fix-for-nvidia-problems-i-hope.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/usb-add-quirk-for-another-camera.patch [new file with mode: 0644]
queue-3.0/usb-add-usb-id-for-multiplex-rc-serial-adapter-to-cp210x.c.patch [new file with mode: 0644]
queue-3.0/usb-ch9-fix-up-maxstreams-helper.patch [new file with mode: 0644]
queue-3.0/usb-fix-number-of-mapped-sg-dma-entries.patch [new file with mode: 0644]
queue-3.0/usb-musb-fix-pm_runtime-mismatch.patch [new file with mode: 0644]
queue-3.0/usb-omninet-fix-write_room.patch [new file with mode: 0644]
queue-3.0/usb-option-add-id-for-3g-dongle-model-vt1000-of-viettel.patch [new file with mode: 0644]
queue-3.0/usb-option-add-zd-incorporated-hspa-modem.patch [new file with mode: 0644]
queue-3.0/usb-usb-storage-doesn-t-support-dynamic-id-currently-the-patch-disables-the-feature-to-fix-an-oops.patch [new file with mode: 0644]
queue-3.0/xhci-properly-handle-comp_2nd_bw_err.patch [new file with mode: 0644]

diff --git a/queue-3.0/asix-fix-infinite-loop-in-rx_fixup.patch b/queue-3.0/asix-fix-infinite-loop-in-rx_fixup.patch
new file mode 100644 (file)
index 0000000..4ecac95
--- /dev/null
@@ -0,0 +1,36 @@
+From 6c15d74defd38e7e7f8805392578b7a1d508097e Mon Sep 17 00:00:00 2001
+From: Aurelien Jacobs <aurel@gnuage.org>
+Date: Sat, 7 Jan 2012 12:15:16 -0800
+Subject: asix: fix infinite loop in rx_fixup()
+
+From: Aurelien Jacobs <aurel@gnuage.org>
+
+commit 6c15d74defd38e7e7f8805392578b7a1d508097e upstream.
+
+At this point if skb->len happens to be 2, the subsequant skb_pull(skb, 4)
+call won't work and the skb->len won't be decreased and won't ever reach 0,
+resulting in an infinite loop.
+
+With an ASIX 88772 under heavy load, without this patch, rx_fixup() reaches
+an infinite loop in less than a minute. With this patch applied,
+no infinite loop even after hours of heavy load.
+
+Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
+Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+
+---
+ drivers/net/usb/asix.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/asix.c
++++ b/drivers/net/usb/asix.c
+@@ -371,7 +371,7 @@ static int asix_rx_fixup(struct usbnet *
+               skb_pull(skb, (size + 1) & 0xfffe);
+-              if (skb->len == 0)
++              if (skb->len < sizeof(header))
+                       break;
+               head = (u8 *) skb->data;
diff --git a/queue-3.0/bonding-fix-error-handling-if-slave-is-busy-v2.patch b/queue-3.0/bonding-fix-error-handling-if-slave-is-busy-v2.patch
new file mode 100644 (file)
index 0000000..c1714b5
--- /dev/null
@@ -0,0 +1,66 @@
+From f7d9821a6a9c83450ac35e76d3709e32fd38b76f Mon Sep 17 00:00:00 2001
+From: stephen hemminger <shemminger@vyatta.com>
+Date: Sat, 31 Dec 2011 13:26:46 +0000
+Subject: bonding: fix error handling if slave is busy (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: stephen hemminger <shemminger@vyatta.com>
+
+commit f7d9821a6a9c83450ac35e76d3709e32fd38b76f upstream.
+
+If slave device already has a receive handler registered, then the
+error unwind of bonding device enslave function is broken.
+
+The following will leave a pointer to freed memory in the slave
+device list, causing a later kernel panic.
+# modprobe dummy
+# ip li add dummy0-1 link dummy0 type macvlan
+# modprobe bonding
+# echo +dummy0 >/sys/class/net/bond0/bonding/slaves
+
+The fix is to detach the slave (which removes it from the list)
+in the unwind path.
+
+Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
+Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/bonding/bond_main.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/bonding/bond_main.c
++++ b/drivers/net/bonding/bond_main.c
+@@ -1905,7 +1905,7 @@ int bond_enslave(struct net_device *bond
+                                "but new slave device does not support netpoll.\n",
+                                bond_dev->name);
+                       res = -EBUSY;
+-                      goto err_close;
++                      goto err_detach;
+               }
+       }
+ #endif
+@@ -1914,7 +1914,7 @@ int bond_enslave(struct net_device *bond
+       res = bond_create_slave_symlinks(bond_dev, slave_dev);
+       if (res)
+-              goto err_close;
++              goto err_detach;
+       res = netdev_rx_handler_register(slave_dev, bond_handle_frame,
+                                        new_slave);
+@@ -1935,6 +1935,11 @@ int bond_enslave(struct net_device *bond
+ err_dest_symlinks:
+       bond_destroy_slave_symlinks(bond_dev, slave_dev);
++err_detach:
++      write_lock_bh(&bond->lock);
++      bond_detach_slave(bond, new_slave);
++      write_unlock_bh(&bond->lock);
++
+ err_close:
+       dev_close(slave_dev);
diff --git a/queue-3.0/igmp-avoid-zero-delay-when-receiving-odd-mixture-of-igmp-queries.patch b/queue-3.0/igmp-avoid-zero-delay-when-receiving-odd-mixture-of-igmp-queries.patch
new file mode 100644 (file)
index 0000000..9498e25
--- /dev/null
@@ -0,0 +1,34 @@
+From a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Mon, 9 Jan 2012 14:06:46 -0800
+Subject: igmp: Avoid zero delay when receiving odd mixture of IGMP queries
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 upstream.
+
+Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
+behavior on v3 query during v2-compatibility mode') added yet another
+case for query parsing, which can result in max_delay = 0.  Substitute
+a value of 1, as in the usual v3 case.
+
+Reported-by: Simon McVittie <smcv@debian.org>
+References: http://bugs.debian.org/654876
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+
+---
+ net/ipv4/igmp.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/net/ipv4/igmp.c
++++ b/net/ipv4/igmp.c
+@@ -875,6 +875,8 @@ static void igmp_heard_query(struct in_d
+                * to be intended in a v3 query.
+                */
+               max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
++              if (!max_delay)
++                      max_delay = 1;  /* can't mod w/ 0 */
+       } else { /* v3 */
+               if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
+                       return;
diff --git a/queue-3.0/ohci-final-fix-for-nvidia-problems-i-hope.patch b/queue-3.0/ohci-final-fix-for-nvidia-problems-i-hope.patch
new file mode 100644 (file)
index 0000000..1a019b7
--- /dev/null
@@ -0,0 +1,198 @@
+From c61875977458637226ab093a35d200f2d5789787 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 17 Nov 2011 16:41:45 -0500
+Subject: OHCI: final fix for NVIDIA problems (I hope)
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit c61875977458637226ab093a35d200f2d5789787 upstream.
+
+Problems with NVIDIA's OHCI host controllers persist.  After looking
+carefully through the spec, I finally realized that when a controller
+is reset it then automatically goes into a SUSPEND state in which it
+is completely quiescent (no DMA and no IRQs) and from which it will
+not awaken until the system puts it into the OPERATIONAL state.
+
+Therefore there's no need to worry about controllers being in the
+RESET state for extended periods, or remaining in the OPERATIONAL
+state during system shutdown.  The proper action for device
+initialization is to put the controller into the RESET state (if it's
+not there already) and then to issue a software reset.  Similarly, the
+proper action for device shutdown is simply to do a software reset.
+
+This patch (as1499) implements such an approach.  It simplifies
+initialization and shutdown, and allows the NVIDIA shutdown-quirk code
+to be removed.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Andre "Osku" Schmidt <andre.osku.schmidt@googlemail.com>
+Tested-by: Arno Augustin <Arno.Augustin@web.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-hcd.c   |   15 ++++-------
+ drivers/usb/host/ohci-pci.c   |   26 --------------------
+ drivers/usb/host/ohci.h       |    1 
+ drivers/usb/host/pci-quirks.c |   54 ++++++++++++++++++------------------------
+ 4 files changed, 30 insertions(+), 66 deletions(-)
+
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -389,17 +389,14 @@ ohci_shutdown (struct usb_hcd *hcd)
+       struct ohci_hcd *ohci;
+       ohci = hcd_to_ohci (hcd);
+-      ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+-      ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
++      ohci_writel(ohci, (u32) ~0, &ohci->regs->intrdisable);
+-      /* If the SHUTDOWN quirk is set, don't put the controller in RESET */
+-      ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
+-                      OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
+-                      OHCI_CTRL_RWC);
+-      ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
++      /* Software reset, after which the controller goes into SUSPEND */
++      ohci_writel(ohci, OHCI_HCR, &ohci->regs->cmdstatus);
++      ohci_readl(ohci, &ohci->regs->cmdstatus);       /* flush the writes */
++      udelay(10);
+-      /* flush the writes */
+-      (void) ohci_readl (ohci, &ohci->regs->control);
++      ohci_writel(ohci, ohci->fminterval, &ohci->regs->fminterval);
+ }
+ static int check_ed(struct ohci_hcd *ohci, struct ed *ed)
+--- a/drivers/usb/host/ohci-pci.c
++++ b/drivers/usb/host/ohci-pci.c
+@@ -175,28 +175,6 @@ static int ohci_quirk_amd700(struct usb_
+       return 0;
+ }
+-/* nVidia controllers continue to drive Reset signalling on the bus
+- * even after system shutdown, wasting power.  This flag tells the
+- * shutdown routine to leave the controller OPERATIONAL instead of RESET.
+- */
+-static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
+-{
+-      struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+-      struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+-
+-      /* Evidently nVidia fixed their later hardware; this is a guess at
+-       * the changeover point.
+-       */
+-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB         0x026d
+-
+-      if (pdev->device < PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_USB) {
+-              ohci->flags |= OHCI_QUIRK_SHUTDOWN;
+-              ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
+-      }
+-
+-      return 0;
+-}
+-
+ static void sb800_prefetch(struct ohci_hcd *ohci, int on)
+ {
+       struct pci_dev *pdev;
+@@ -260,10 +238,6 @@ static const struct pci_device_id ohci_p
+               PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
+               .driver_data = (unsigned long)ohci_quirk_amd700,
+       },
+-      {
+-              PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+-              .driver_data = (unsigned long) ohci_quirk_nvidia_shutdown,
+-      },
+       /* FIXME for some of the early AMD 760 southbridges, OHCI
+        * won't work at all.  blacklist them.
+--- a/drivers/usb/host/ohci.h
++++ b/drivers/usb/host/ohci.h
+@@ -403,7 +403,6 @@ struct ohci_hcd {
+ #define       OHCI_QUIRK_HUB_POWER    0x100                   /* distrust firmware power/oc setup */
+ #define       OHCI_QUIRK_AMD_PLL      0x200                   /* AMD PLL quirk*/
+ #define       OHCI_QUIRK_AMD_PREFETCH 0x400                   /* pre-fetch for ISO transfer */
+-#define       OHCI_QUIRK_SHUTDOWN     0x800                   /* nVidia power bug */
+       // there are also chip quirks/bugs in init logic
+       struct work_struct      nec_work;       /* Worker for NEC quirk */
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -36,6 +36,7 @@
+ #define OHCI_INTRENABLE               0x10
+ #define OHCI_INTRDISABLE      0x14
+ #define OHCI_FMINTERVAL               0x34
++#define OHCI_HCFS             (3 << 6)        /* hc functional state */
+ #define OHCI_HCR              (1 << 0)        /* host controller reset */
+ #define OHCI_OCR              (1 << 3)        /* ownership change request */
+ #define OHCI_CTRL_RWC         (1 << 9)        /* remote wakeup connected */
+@@ -465,6 +466,8 @@ static void __devinit quirk_usb_handoff_
+ {
+       void __iomem *base;
+       u32 control;
++      u32 fminterval;
++      int cnt;
+       if (!mmio_resource_enabled(pdev, 0))
+               return;
+@@ -497,41 +500,32 @@ static void __devinit quirk_usb_handoff_
+       }
+ #endif
+-      /* reset controller, preserving RWC (and possibly IR) */
+-      writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
+-      readl(base + OHCI_CONTROL);
+-
+-      /* Some NVIDIA controllers stop working if kept in RESET for too long */
+-      if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) {
+-              u32 fminterval;
+-              int cnt;
++      /* disable interrupts */
++      writel((u32) ~0, base + OHCI_INTRDISABLE);
+-              /* drive reset for at least 50 ms (7.1.7.5) */
+-              msleep(50);
+-
+-              /* software reset of the controller, preserving HcFmInterval */
+-              fminterval = readl(base + OHCI_FMINTERVAL);
+-              writel(OHCI_HCR, base + OHCI_CMDSTATUS);
+-
+-              /* reset requires max 10 us delay */
+-              for (cnt = 30; cnt > 0; --cnt) {        /* ... allow extra time */
+-                      if ((readl(base + OHCI_CMDSTATUS) & OHCI_HCR) == 0)
+-                              break;
+-                      udelay(1);
+-              }
+-              writel(fminterval, base + OHCI_FMINTERVAL);
++      /* Reset the USB bus, if the controller isn't already in RESET */
++      if (control & OHCI_HCFS) {
++              /* Go into RESET, preserving RWC (and possibly IR) */
++              writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
++              readl(base + OHCI_CONTROL);
+-              /* Now we're in the SUSPEND state with all devices reset
+-               * and wakeups and interrupts disabled
+-               */
++              /* drive bus reset for at least 50 ms (7.1.7.5) */
++              msleep(50);
+       }
+-      /*
+-       * disable interrupts
+-       */
+-      writel(~(u32)0, base + OHCI_INTRDISABLE);
+-      writel(~(u32)0, base + OHCI_INTRSTATUS);
++      /* software reset of the controller, preserving HcFmInterval */
++      fminterval = readl(base + OHCI_FMINTERVAL);
++      writel(OHCI_HCR, base + OHCI_CMDSTATUS);
++
++      /* reset requires max 10 us delay */
++      for (cnt = 30; cnt > 0; --cnt) {        /* ... allow extra time */
++              if ((readl(base + OHCI_CMDSTATUS) & OHCI_HCR) == 0)
++                      break;
++              udelay(1);
++      }
++      writel(fminterval, base + OHCI_FMINTERVAL);
++      /* Now the controller is safely in SUSPEND and nothing can wake it up */
+       iounmap(base);
+ }
index 085259c4aa8c45ef62f2099650b8a194003f56c8..164b422dd277bcae524882d1aa40e54878ace9df 100644 (file)
@@ -20,3 +20,17 @@ cgroup-fix-to-allow-mounting-a-hierarchy-by-name.patch
 udf-fix-deadlock-when-converting-file-from-in-icb-one-to-normal-one.patch
 drivers-usb-class-cdc-acm.c-clear-dangling-pointer.patch
 usb-isight-fix-kernel-bug-when-loading-firmware.patch
+usb-usb-storage-doesn-t-support-dynamic-id-currently-the-patch-disables-the-feature-to-fix-an-oops.patch
+usb-add-quirk-for-another-camera.patch
+usb-musb-fix-pm_runtime-mismatch.patch
+usb-omninet-fix-write_room.patch
+usb-add-usb-id-for-multiplex-rc-serial-adapter-to-cp210x.c.patch
+usb-fix-number-of-mapped-sg-dma-entries.patch
+xhci-properly-handle-comp_2nd_bw_err.patch
+usb-option-add-id-for-3g-dongle-model-vt1000-of-viettel.patch
+usb-option-add-zd-incorporated-hspa-modem.patch
+usb-ch9-fix-up-maxstreams-helper.patch
+ohci-final-fix-for-nvidia-problems-i-hope.patch
+igmp-avoid-zero-delay-when-receiving-odd-mixture-of-igmp-queries.patch
+asix-fix-infinite-loop-in-rx_fixup.patch
+bonding-fix-error-handling-if-slave-is-busy-v2.patch
diff --git a/queue-3.0/usb-add-quirk-for-another-camera.patch b/queue-3.0/usb-add-quirk-for-another-camera.patch
new file mode 100644 (file)
index 0000000..1e9667a
--- /dev/null
@@ -0,0 +1,35 @@
+From 35284b3d2f68a8a3703745e629999469f78386b5 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver@neukum.org>
+Date: Tue, 3 Jan 2012 09:58:54 +0100
+Subject: USB: add quirk for another camera
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit 35284b3d2f68a8a3703745e629999469f78386b5 upstream.
+
+The Guillemot Webcam Hercules Dualpix Exchange camera
+has been reported with a second ID.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/quirks.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -117,9 +117,12 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x06a3, 0x0006), .driver_info =
+                       USB_QUIRK_CONFIG_INTF_STRINGS },
+-      /* Guillemot Webcam Hercules Dualpix Exchange*/
++      /* Guillemot Webcam Hercules Dualpix Exchange (2nd ID) */
+       { USB_DEVICE(0x06f8, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },
++      /* Guillemot Webcam Hercules Dualpix Exchange*/
++      { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
++
+       /* M-Systems Flash Disk Pioneers */
+       { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
diff --git a/queue-3.0/usb-add-usb-id-for-multiplex-rc-serial-adapter-to-cp210x.c.patch b/queue-3.0/usb-add-usb-id-for-multiplex-rc-serial-adapter-to-cp210x.c.patch
new file mode 100644 (file)
index 0000000..0fad68e
--- /dev/null
@@ -0,0 +1,33 @@
+From 08e87d0d773dc9ca5faf4c3306e238ed0ea129b0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Malte=20Schr=C3=B6der?= <maltesch@gmx.de>
+Date: Thu, 5 Jan 2012 20:34:40 +0100
+Subject: USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Malte Schröder <maltesch@gmx.de>
+
+commit 08e87d0d773dc9ca5faf4c3306e238ed0ea129b0 upstream.
+
+Hi, below patch adds the USB-ID of the serial adapters sold by
+Multiplex RC (www.multiplex-rc.de).
+
+Signed-off-by: Malte Schröder <maltesch@gmx.de>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp210x.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -92,6 +92,7 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
+       { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
+       { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
++      { USB_DEVICE(0x10C4, 0x81A9) }, /* Multiplex RC Interface */
+       { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
+       { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */
+       { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
diff --git a/queue-3.0/usb-ch9-fix-up-maxstreams-helper.patch b/queue-3.0/usb-ch9-fix-up-maxstreams-helper.patch
new file mode 100644 (file)
index 0000000..d0d6d78
--- /dev/null
@@ -0,0 +1,77 @@
+From 18b7ede5f7ee2092aedcb578d3ac30bd5d4fc23c Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Mon, 2 Jan 2012 13:35:41 +0200
+Subject: usb: ch9: fix up MaxStreams helper
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 18b7ede5f7ee2092aedcb578d3ac30bd5d4fc23c upstream.
+
+[ removed the dwc3 portion of the patch as it didn't apply to
+older kernels - gregkh]
+
+According to USB 3.0 Specification Table 9-22, if
+bmAttributes [4:0] are set to zero, it means "no
+streams supported", but the way this helper was
+defined on Linux, we will *always* have one stream
+which might cause several problems.
+
+For example on DWC3, we would tell the controller
+endpoint has streams enabled and yet start transfers
+with Stream ID set to 0, which would goof up the host
+side.
+
+While doing that, convert the macro to an inline
+function due to the different checks we now need.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci.c |    3 +--
+ include/linux/usb/ch9.h |   20 +++++++++++++++++++-
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -2184,8 +2184,7 @@ static int xhci_calculate_streams_and_bi
+               if (ret < 0)
+                       return ret;
+-              max_streams = USB_SS_MAX_STREAMS(
+-                              eps[i]->ss_ep_comp.bmAttributes);
++              max_streams = usb_ss_max_streams(&eps[i]->ss_ep_comp);
+               if (max_streams < (*num_streams - 1)) {
+                       xhci_dbg(xhci, "Ep 0x%x only supports %u stream IDs.\n",
+                                       eps[i]->desc.bEndpointAddress,
+--- a/include/linux/usb/ch9.h
++++ b/include/linux/usb/ch9.h
+@@ -583,8 +583,26 @@ struct usb_ss_ep_comp_descriptor {
+ } __attribute__ ((packed));
+ #define USB_DT_SS_EP_COMP_SIZE                6
++
+ /* Bits 4:0 of bmAttributes if this is a bulk endpoint */
+-#define USB_SS_MAX_STREAMS(p)         (1 << ((p) & 0x1f))
++static inline int
++usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp)
++{
++      int             max_streams;
++
++      if (!comp)
++              return 0;
++
++      max_streams = comp->bmAttributes & 0x1f;
++
++      if (!max_streams)
++              return 0;
++
++      max_streams = 1 << max_streams;
++
++      return max_streams;
++}
++
+ /* Bits 1:0 of bmAttributes if this is an isoc endpoint */
+ #define USB_SS_MULT(p)                        (1 + ((p) & 0x3))
diff --git a/queue-3.0/usb-fix-number-of-mapped-sg-dma-entries.patch b/queue-3.0/usb-fix-number-of-mapped-sg-dma-entries.patch
new file mode 100644 (file)
index 0000000..fb79db8
--- /dev/null
@@ -0,0 +1,143 @@
+From bc677d5b64644c399cd3db6a905453e611f402ab Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Sat, 3 Dec 2011 23:41:31 +0100
+Subject: usb: fix number of mapped SG DMA entries
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit bc677d5b64644c399cd3db6a905453e611f402ab upstream.
+
+Add a new field num_mapped_sgs to struct urb so that we have a place to
+store the number of mapped entries and can also retain the original
+value of entries in num_sgs.  Previously, usb_hcd_map_urb_for_dma()
+would overwrite this with the number of mapped entries, which would
+break dma_unmap_sg() because it requires the original number of entries.
+
+This fixes warnings like the following when using USB storage devices:
+ ------------[ cut here ]------------
+ WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()
+ ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1]
+ Modules linked in: ohci_hcd ehci_hcd
+ Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319
+ Call Trace:
+  <IRQ>  [<ffffffff81036d3b>] warn_slowpath_common+0x80/0x98
+  [<ffffffff81036de7>] warn_slowpath_fmt+0x41/0x43
+  [<ffffffff811fa5ae>] check_unmap+0x4e4/0x695
+  [<ffffffff8105e92c>] ? trace_hardirqs_off+0xd/0xf
+  [<ffffffff8147208b>] ? _raw_spin_unlock_irqrestore+0x33/0x50
+  [<ffffffff811fa84a>] debug_dma_unmap_sg+0xeb/0x117
+  [<ffffffff8137b02f>] usb_hcd_unmap_urb_for_dma+0x71/0x188
+  [<ffffffff8137b166>] unmap_urb_for_dma+0x20/0x22
+  [<ffffffff8137b1c5>] usb_hcd_giveback_urb+0x5d/0xc0
+  [<ffffffffa0000d02>] ehci_urb_done+0xf7/0x10c [ehci_hcd]
+  [<ffffffffa0001140>] qh_completions+0x429/0x4bd [ehci_hcd]
+  [<ffffffffa000340a>] ehci_work+0x95/0x9c0 [ehci_hcd]
+  ...
+ ---[ end trace f29ac88a5a48c580 ]---
+ Mapped at:
+  [<ffffffff811faac4>] debug_dma_map_sg+0x45/0x139
+  [<ffffffff8137bc0b>] usb_hcd_map_urb_for_dma+0x22e/0x478
+  [<ffffffff8137c494>] usb_hcd_submit_urb+0x63f/0x6fa
+  [<ffffffff8137d01c>] usb_submit_urb+0x2c7/0x2de
+  [<ffffffff8137dcd4>] usb_sg_wait+0x55/0x161
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hcd.c       |    5 ++---
+ drivers/usb/host/ehci-q.c    |    2 +-
+ drivers/usb/host/uhci-q.c    |    2 +-
+ drivers/usb/host/whci/qset.c |    4 ++--
+ drivers/usb/host/xhci-ring.c |    4 ++--
+ include/linux/usb.h          |    1 +
+ 6 files changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/usb/core/hcd.c
++++ b/drivers/usb/core/hcd.c
+@@ -1387,11 +1387,10 @@ int usb_hcd_map_urb_for_dma(struct usb_h
+                                       ret = -EAGAIN;
+                               else
+                                       urb->transfer_flags |= URB_DMA_MAP_SG;
+-                              if (n != urb->num_sgs) {
+-                                      urb->num_sgs = n;
++                              urb->num_mapped_sgs = n;
++                              if (n != urb->num_sgs)
+                                       urb->transfer_flags |=
+                                                       URB_DMA_SG_COMBINED;
+-                              }
+                       } else if (urb->sg) {
+                               struct scatterlist *sg = urb->sg;
+                               urb->transfer_dma = dma_map_page(
+--- a/drivers/usb/host/ehci-q.c
++++ b/drivers/usb/host/ehci-q.c
+@@ -649,7 +649,7 @@ qh_urb_transaction (
+       /*
+        * data transfer stage:  buffer setup
+        */
+-      i = urb->num_sgs;
++      i = urb->num_mapped_sgs;
+       if (len > 0 && i > 0) {
+               sg = urb->sg;
+               buf = sg_dma_address(sg);
+--- a/drivers/usb/host/uhci-q.c
++++ b/drivers/usb/host/uhci-q.c
+@@ -943,7 +943,7 @@ static int uhci_submit_common(struct uhc
+       if (usb_pipein(urb->pipe))
+               status |= TD_CTRL_SPD;
+-      i = urb->num_sgs;
++      i = urb->num_mapped_sgs;
+       if (len > 0 && i > 0) {
+               sg = urb->sg;
+               data = sg_dma_address(sg);
+--- a/drivers/usb/host/whci/qset.c
++++ b/drivers/usb/host/whci/qset.c
+@@ -443,7 +443,7 @@ static int qset_add_urb_sg(struct whc *w
+       remaining = urb->transfer_buffer_length;
+-      for_each_sg(urb->sg, sg, urb->num_sgs, i) {
++      for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
+               dma_addr_t dma_addr;
+               size_t dma_remaining;
+               dma_addr_t sp, ep;
+@@ -561,7 +561,7 @@ static int qset_add_urb_sg_linearize(str
+       remaining = urb->transfer_buffer_length;
+-      for_each_sg(urb->sg, sg, urb->num_sgs, i) {
++      for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
+               size_t len;
+               size_t sg_remaining;
+               void *orig;
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -2570,7 +2570,7 @@ static unsigned int count_sg_trbs_needed
+       struct scatterlist *sg;
+       sg = NULL;
+-      num_sgs = urb->num_sgs;
++      num_sgs = urb->num_mapped_sgs;
+       temp = urb->transfer_buffer_length;
+       xhci_dbg(xhci, "count sg list trbs: \n");
+@@ -2754,7 +2754,7 @@ static int queue_bulk_sg_tx(struct xhci_
+               return -EINVAL;
+       num_trbs = count_sg_trbs_needed(xhci, urb);
+-      num_sgs = urb->num_sgs;
++      num_sgs = urb->num_mapped_sgs;
+       total_packet_count = roundup(urb->transfer_buffer_length,
+                       le16_to_cpu(urb->ep->desc.wMaxPacketSize));
+--- a/include/linux/usb.h
++++ b/include/linux/usb.h
+@@ -1202,6 +1202,7 @@ struct urb {
+       void *transfer_buffer;          /* (in) associated data buffer */
+       dma_addr_t transfer_dma;        /* (in) dma addr for transfer_buffer */
+       struct scatterlist *sg;         /* (in) scatter gather buffer list */
++      int num_mapped_sgs;             /* (internal) mapped sg entries */
+       int num_sgs;                    /* (in) number of entries in the sg list */
+       u32 transfer_buffer_length;     /* (in) data buffer length */
+       u32 actual_length;              /* (return) actual transfer length */
diff --git a/queue-3.0/usb-musb-fix-pm_runtime-mismatch.patch b/queue-3.0/usb-musb-fix-pm_runtime-mismatch.patch
new file mode 100644 (file)
index 0000000..4cb853d
--- /dev/null
@@ -0,0 +1,49 @@
+From 772aed45b604c5ff171f0f12c12392d868333f79 Mon Sep 17 00:00:00 2001
+From: Felipe Contreras <felipe.contreras@gmail.com>
+Date: Mon, 19 Dec 2011 22:01:54 +0200
+Subject: usb: musb: fix pm_runtime mismatch
+
+From: Felipe Contreras <felipe.contreras@gmail.com>
+
+commit 772aed45b604c5ff171f0f12c12392d868333f79 upstream.
+
+In musb_init_controller() there's a pm_runtime_put(), but there's no
+pm_runtime_get(), which creates a mismatch that causes the driver to
+sleep when it shouldn't.
+
+This was introduced in 7acc619[1], but it wasn't triggered in my setup
+until 18a2689[2] was merged to Linus' branch at point df0914[3]. IOW;
+when PM is working as it was supposed to.
+
+However, it seems most of the time this is used in a way that keeps the
+counter above 0, so nobody noticed. Also, it seems to depend on the
+configuration used in versions before 3.1, but not later (or in it).
+
+I found the problem by loading isp1704_charger before any usb gadgets:
+http://article.gmane.org/gmane.linux.kernel/1226122
+
+All versions after 2.6.39 are affected.
+
+[1] usb: musb: Idle path retention and offmode support for OMAP3
+[2] OMAP2+: musb: hwmod adaptation for musb registration
+[3] Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
+
+Cc: Hema HK <hemahk@ti.com>
+Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+
+---
+ drivers/usb/musb/musb_core.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -2078,8 +2078,6 @@ musb_init_controller(struct device *dev,
+       if (status < 0)
+               goto fail3;
+-      pm_runtime_put(musb->controller);
+-
+       status = musb_init_debugfs(musb);
+       if (status < 0)
+               goto fail4;
diff --git a/queue-3.0/usb-omninet-fix-write_room.patch b/queue-3.0/usb-omninet-fix-write_room.patch
new file mode 100644 (file)
index 0000000..f9eaf42
--- /dev/null
@@ -0,0 +1,32 @@
+From 694c6301e515bad574af74b6552134c4d9dcb334 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Sun, 6 Nov 2011 19:06:21 +0100
+Subject: USB: omninet: fix write_room
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 694c6301e515bad574af74b6552134c4d9dcb334 upstream.
+
+Fix regression introduced by commit 507ca9bc047666 ([PATCH] USB: add
+ability for usb-serial drivers to determine if their write urb is
+currently being used.) which inverted the logic in write_room so that it
+returns zero when the write urb is actually free.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/omninet.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/omninet.c
++++ b/drivers/usb/serial/omninet.c
+@@ -315,7 +315,7 @@ static int omninet_write_room(struct tty
+       int room = 0; /* Default: no room */
+       /* FIXME: no consistent locking for write_urb_busy */
+-      if (wport->write_urb_busy)
++      if (!wport->write_urb_busy)
+               room = wport->bulk_out_size - OMNINET_HEADERLEN;
+       dbg("%s - returns %d", __func__, room);
diff --git a/queue-3.0/usb-option-add-id-for-3g-dongle-model-vt1000-of-viettel.patch b/queue-3.0/usb-option-add-id-for-3g-dongle-model-vt1000-of-viettel.patch
new file mode 100644 (file)
index 0000000..ce1abc7
--- /dev/null
@@ -0,0 +1,39 @@
+From 5b061623355d8f69327a24838b0aa05e435ae5d5 Mon Sep 17 00:00:00 2001
+From: VU Tuan Duc <DucVT@viettel.com.vn>
+Date: Tue, 15 Nov 2011 14:08:00 +0700
+Subject: USB: option: add id for 3G dongle Model VT1000 of Viettel
+
+From: VU Tuan Duc <DucVT@viettel.com.vn>
+
+commit 5b061623355d8f69327a24838b0aa05e435ae5d5 upstream.
+
+Add VendorID/ProductID for USB 3G dongle Model VT1000 of Viettel.
+
+Signed-off-by: VU Tuan Duc <ducvt@viettel.com.vn>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -472,6 +472,10 @@ static void option_instat_callback(struc
+ #define YUGA_PRODUCT_CLU528                   0x260D
+ #define YUGA_PRODUCT_CLU526                   0x260F
++/* Viettel products */
++#define VIETTEL_VENDOR_ID                     0x2262
++#define VIETTEL_PRODUCT_VT1000                        0x0002
++
+ /* some devices interfaces need special handling due to a number of reasons */
+ enum option_blacklist_reason {
+               OPTION_BLACKLIST_NONE = 0,
+@@ -1173,6 +1177,7 @@ static const struct usb_device_id option
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) },
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
++      { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
+       { } /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/queue-3.0/usb-option-add-zd-incorporated-hspa-modem.patch b/queue-3.0/usb-option-add-zd-incorporated-hspa-modem.patch
new file mode 100644 (file)
index 0000000..9539ca3
--- /dev/null
@@ -0,0 +1,51 @@
+From 3c8c9316710b83e906e425024153bf0929887b59 Mon Sep 17 00:00:00 2001
+From: Janne Snabb <snabb@epipe.com>
+Date: Wed, 28 Dec 2011 19:36:00 +0000
+Subject: usb: option: add ZD Incorporated HSPA modem
+
+From: Janne Snabb <snabb@epipe.com>
+
+commit 3c8c9316710b83e906e425024153bf0929887b59 upstream.
+
+Add support for Chinese Noname HSPA USB modem which is apparently
+manufactured by a company called ZD Incorporated (based on texts in the
+Windows drivers).
+
+This product is available at least from Dealextreme (SKU 80032) and
+possibly in India with name Olive V-MW250. It is based on Qualcomm
+MSM6280 chip.
+
+I needed to also add "options usb-storage quirks=0685:7000:i" in modprobe
+configuration because udevd or the kernel keeps poking the embedded
+fake-cd-rom which fails and causes the device to reset. There might be
+a better way to accomplish the same. usb_modeswitch is not needed with
+this device.
+
+Signed-off-by: Janne Snabb <snabb@epipe.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -476,6 +476,10 @@ static void option_instat_callback(struc
+ #define VIETTEL_VENDOR_ID                     0x2262
+ #define VIETTEL_PRODUCT_VT1000                        0x0002
++/* ZD Incorporated */
++#define ZD_VENDOR_ID                          0x0685
++#define ZD_PRODUCT_7000                               0x7000
++
+ /* some devices interfaces need special handling due to a number of reasons */
+ enum option_blacklist_reason {
+               OPTION_BLACKLIST_NONE = 0,
+@@ -1178,6 +1182,7 @@ static const struct usb_device_id option
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
+       { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
+       { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) },
++      { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) },
+       { } /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/queue-3.0/usb-usb-storage-doesn-t-support-dynamic-id-currently-the-patch-disables-the-feature-to-fix-an-oops.patch b/queue-3.0/usb-usb-storage-doesn-t-support-dynamic-id-currently-the-patch-disables-the-feature-to-fix-an-oops.patch
new file mode 100644 (file)
index 0000000..6724bc0
--- /dev/null
@@ -0,0 +1,118 @@
+From 1a3a026ba1b6bbfe0b7f79ab38cf991d691e7c9a Mon Sep 17 00:00:00 2001
+From: Huajun Li <huajun.li.lee@gmail.com>
+Date: Wed, 4 Jan 2012 19:25:33 +0800
+Subject: usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
+
+From: Huajun Li <huajun.li.lee@gmail.com>
+
+commit 1a3a026ba1b6bbfe0b7f79ab38cf991d691e7c9a upstream.
+
+Echo vendor and product number of a non usb-storage device to
+usb-storage driver's new_id, then plug in the device to host and you
+will find following oops msg, the root cause is usb_stor_probe1()
+refers invalid id entry if giving a dynamic id, so just disable the
+feature.
+
+[ 3105.018012] general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
+[ 3105.018062] CPU 0
+[ 3105.018075] Modules linked in: usb_storage usb_libusual bluetooth
+dm_crypt binfmt_misc snd_hda_codec_analog snd_hda_intel snd_hda_codec
+snd_hwdep hp_wmi ppdev sparse_keymap snd_pcm snd_seq_midi snd_rawmidi
+snd_seq_midi_event snd_seq snd_timer snd_seq_device psmouse snd
+serio_raw tpm_infineon soundcore i915 snd_page_alloc tpm_tis
+parport_pc tpm tpm_bios drm_kms_helper drm i2c_algo_bit video lp
+parport usbhid hid sg sr_mod sd_mod ehci_hcd uhci_hcd usbcore e1000e
+usb_common floppy
+[ 3105.018408]
+[ 3105.018419] Pid: 189, comm: khubd Tainted: G          I  3.2.0-rc7+
+#29 Hewlett-Packard HP Compaq dc7800p Convertible Minitower/0AACh
+[ 3105.018481] RIP: 0010:[<ffffffffa045830d>]  [<ffffffffa045830d>]
+usb_stor_probe1+0x2fd/0xc20 [usb_storage]
+[ 3105.018536] RSP: 0018:ffff880056a3d830  EFLAGS: 00010286
+[ 3105.018562] RAX: ffff880065f4e648 RBX: ffff88006bb28000 RCX: 0000000000000000
+[ 3105.018597] RDX: ffff88006f23c7b0 RSI: 0000000000000001 RDI: 0000000000000206
+[ 3105.018632] RBP: ffff880056a3d900 R08: 0000000000000000 R09: ffff880067365000
+[ 3105.018665] R10: 00000000000002ac R11: 0000000000000010 R12: ffff6000b41a7340
+[ 3105.018698] R13: ffff880065f4ef60 R14: ffff88006bb28b88 R15: ffff88006f23d270
+[ 3105.018733] FS:  0000000000000000(0000) GS:ffff88007a200000(0000)
+knlGS:0000000000000000
+[ 3105.018773] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
+[ 3105.018801] CR2: 00007fc99c8c4650 CR3: 0000000001e05000 CR4: 00000000000006f0
+[ 3105.018835] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+[ 3105.018870] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
+[ 3105.018906] Process khubd (pid: 189, threadinfo ffff880056a3c000,
+task ffff88005677a400)
+[ 3105.018945] Stack:
+[ 3105.018959]  0000000000000000 0000000000000000 ffff880056a3d8d0
+0000000000000002
+[ 3105.019011]  0000000000000000 ffff880056a3d918 ffff880000000000
+0000000000000002
+[ 3105.019058]  ffff880056a3d8d0 0000000000000012 ffff880056a3d8d0
+0000000000000006
+[ 3105.019105] Call Trace:
+[ 3105.019128]  [<ffffffffa0458cd4>] storage_probe+0xa4/0xe0 [usb_storage]
+[ 3105.019173]  [<ffffffffa0097822>] usb_probe_interface+0x172/0x330 [usbcore]
+[ 3105.019211]  [<ffffffff815fda67>] driver_probe_device+0x257/0x3b0
+[ 3105.019243]  [<ffffffff815fdd43>] __device_attach+0x73/0x90
+[ 3105.019272]  [<ffffffff815fdcd0>] ? __driver_attach+0x110/0x110
+[ 3105.019303]  [<ffffffff815fb93c>] bus_for_each_drv+0x9c/0xf0
+[ 3105.019334]  [<ffffffff815fd6c7>] device_attach+0xf7/0x120
+[ 3105.019364]  [<ffffffff815fc905>] bus_probe_device+0x45/0x80
+[ 3105.019396]  [<ffffffff815f98a6>] device_add+0x876/0x990
+[ 3105.019434]  [<ffffffffa0094e42>] usb_set_configuration+0x822/0x9e0 [usbcore]
+[ 3105.019479]  [<ffffffffa00a3492>] generic_probe+0x62/0xf0 [usbcore]
+[ 3105.019518]  [<ffffffffa0097a46>] usb_probe_device+0x66/0xb0 [usbcore]
+[ 3105.019555]  [<ffffffff815fda67>] driver_probe_device+0x257/0x3b0
+[ 3105.019589]  [<ffffffff815fdd43>] __device_attach+0x73/0x90
+[ 3105.019617]  [<ffffffff815fdcd0>] ? __driver_attach+0x110/0x110
+[ 3105.019648]  [<ffffffff815fb93c>] bus_for_each_drv+0x9c/0xf0
+[ 3105.019680]  [<ffffffff815fd6c7>] device_attach+0xf7/0x120
+[ 3105.019709]  [<ffffffff815fc905>] bus_probe_device+0x45/0x80
+[ 3105.021040] usb usb6: usb auto-resume
+[ 3105.021045] usb usb6: wakeup_rh
+[ 3105.024849]  [<ffffffff815f98a6>] device_add+0x876/0x990
+[ 3105.025086]  [<ffffffffa0088987>] usb_new_device+0x1e7/0x2b0 [usbcore]
+[ 3105.025086]  [<ffffffffa008a4d7>] hub_thread+0xb27/0x1ec0 [usbcore]
+[ 3105.025086]  [<ffffffff810d5200>] ? wake_up_bit+0x50/0x50
+[ 3105.025086]  [<ffffffffa00899b0>] ? usb_remote_wakeup+0xa0/0xa0 [usbcore]
+[ 3105.025086]  [<ffffffff810d49b8>] kthread+0xd8/0xf0
+[ 3105.025086]  [<ffffffff81939884>] kernel_thread_helper+0x4/0x10
+[ 3105.025086]  [<ffffffff8192a8c0>] ? _raw_spin_unlock_irq+0x50/0x80
+[ 3105.025086]  [<ffffffff8192b1b4>] ? retint_restore_args+0x13/0x13
+[ 3105.025086]  [<ffffffff810d48e0>] ? __init_kthread_worker+0x80/0x80
+[ 3105.025086]  [<ffffffff81939880>] ? gs_change+0x13/0x13
+[ 3105.025086] Code: 00 48 83 05 cd ad 00 00 01 48 83 05 cd ad 00 00
+01 4c 8b ab 30 0c 00 00 48 8b 50 08 48 83 c0 30 48 89 45 a0 4c 89 a3
+40 0c 00 00 <41> 0f b6 44 24 10 48 89 55 a8 3c ff 0f 84 b8 04 00 00 48
+83 05
+[ 3105.025086] RIP  [<ffffffffa045830d>] usb_stor_probe1+0x2fd/0xc20
+[usb_storage]
+[ 3105.025086]  RSP <ffff880056a3d830>
+[ 3105.060037] hub 6-0:1.0: hub_resume
+[ 3105.062616] usb usb5: usb auto-resume
+[ 3105.064317] ehci_hcd 0000:00:1d.7: resume root hub
+[ 3105.094809] ---[ end trace a7919e7f17c0a727 ]---
+[ 3105.130069] hub 5-0:1.0: hub_resume
+[ 3105.132131] usb usb4: usb auto-resume
+[ 3105.132136] usb usb4: wakeup_rh
+[ 3105.180059] hub 4-0:1.0: hub_resume
+[ 3106.290052] usb usb6: suspend_rh (auto-stop)
+[ 3106.290077] usb usb4: suspend_rh (auto-stop)
+
+Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/usb.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -1073,6 +1073,7 @@ static struct usb_driver usb_storage_dri
+       .id_table =     usb_storage_usb_ids,
+       .supports_autosuspend = 1,
+       .soft_unbind =  1,
++      .no_dynamic_id = 1,
+ };
+ static int __init usb_stor_init(void)
diff --git a/queue-3.0/xhci-properly-handle-comp_2nd_bw_err.patch b/queue-3.0/xhci-properly-handle-comp_2nd_bw_err.patch
new file mode 100644 (file)
index 0000000..ed79363
--- /dev/null
@@ -0,0 +1,58 @@
+From 71d85724bdd947a3b42a88d08af79f290a1a767b Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 4 Jan 2012 23:29:18 +0100
+Subject: xhci: Properly handle COMP_2ND_BW_ERR
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 71d85724bdd947a3b42a88d08af79f290a1a767b upstream.
+
+I encountered a result of COMP_2ND_BW_ERR while improving how the pwc
+webcam driver handles not having the full usb1 bandwidth available to
+itself.
+
+I created the following test setup, a NEC xhci controller with a
+single TT USB 2 hub plugged into it, with a usb keyboard and a pwc webcam
+plugged into the usb2 hub. This caused the following to show up in dmesg
+when trying to stream from the pwc camera at its highest alt setting:
+
+xhci_hcd 0000:01:00.0: ERROR: unexpected command completion code 0x23.
+usb 6-2.1: Not enough bandwidth for altsetting 9
+
+And usb_set_interface returned -EINVAL, which caused my pwc code to not
+do the right thing as it expected -ENOSPC.
+
+This patch makes the xhci driver properly handle COMP_2ND_BW_ERR and makes
+usb_set_interface return -ENOSPC as expected.
+
+This should be backported to stable kernels as old as 2.6.32.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci.c |    1 +
+ drivers/usb/host/xhci.h |    1 -
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -1568,6 +1568,7 @@ static int xhci_configure_endpoint_resul
+               /* FIXME: can we allocate more resources for the HC? */
+               break;
+       case COMP_BW_ERR:
++      case COMP_2ND_BW_ERR:
+               dev_warn(&udev->dev, "Not enough bandwidth "
+                               "for new device state.\n");
+               ret = -ENOSPC;
+--- a/drivers/usb/host/xhci.h
++++ b/drivers/usb/host/xhci.h
+@@ -900,7 +900,6 @@ struct xhci_transfer_event {
+ /* Invalid Stream ID Error */
+ #define COMP_STRID_ERR        34
+ /* Secondary Bandwidth Error - may be returned by a Configure Endpoint cmd */
+-/* FIXME - check for this */
+ #define COMP_2ND_BW_ERR       35
+ /* Split Transaction Error */
+ #define       COMP_SPLIT_ERR  36