]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 May 2012 19:28:24 +0000 (04:28 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 May 2012 19:28:24 +0000 (04:28 +0900)
added patches:
usb-add-usb_quirk_reset_resume-for-m-audio-88es.patch
usb-gadget-fsl_udc_core-dtd-s-next-dtd-pointer-need-to-be-updated-once-written.patch
usb-remove-races-in-devio.c.patch
usb-serial-ti_usb_3410_5052-add-support-for-the-fri2-serial-console.patch
xhci-add-lynx-point-to-list-of-intel-switchable-hosts.patch

queue-3.0/series
queue-3.0/usb-add-usb_quirk_reset_resume-for-m-audio-88es.patch [new file with mode: 0644]
queue-3.0/usb-gadget-fsl_udc_core-dtd-s-next-dtd-pointer-need-to-be-updated-once-written.patch [new file with mode: 0644]
queue-3.0/usb-remove-races-in-devio.c.patch [new file with mode: 0644]
queue-3.0/usb-serial-ti_usb_3410_5052-add-support-for-the-fri2-serial-console.patch [new file with mode: 0644]
queue-3.0/xhci-add-lynx-point-to-list-of-intel-switchable-hosts.patch [new file with mode: 0644]

index 3ee6d31015e4dea5ec389dbbeb45127219c0468e..cf76327165bb93cc5a72782997796bb6dd435d3b 100644 (file)
@@ -34,3 +34,8 @@ usb-ffs-test-fix-length-argument-of-out-function-call.patch
 drivers-rtc-rtc-pl031.c-configure-correct-wday-for-2000-01-01.patch
 scsi-hpsa-fix-problem-with-msa2xxx-devices.patch
 usb-usbtest-two-super-speed-fixes-for-usbtest.patch
+usb-remove-races-in-devio.c.patch
+usb-serial-ti_usb_3410_5052-add-support-for-the-fri2-serial-console.patch
+usb-gadget-fsl_udc_core-dtd-s-next-dtd-pointer-need-to-be-updated-once-written.patch
+usb-add-usb_quirk_reset_resume-for-m-audio-88es.patch
+xhci-add-lynx-point-to-list-of-intel-switchable-hosts.patch
diff --git a/queue-3.0/usb-add-usb_quirk_reset_resume-for-m-audio-88es.patch b/queue-3.0/usb-add-usb_quirk_reset_resume-for-m-audio-88es.patch
new file mode 100644 (file)
index 0000000..199326a
--- /dev/null
@@ -0,0 +1,33 @@
+From 166cb70e97bd83d7ae9bbec6ae59a178fd9bb823 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Steffen=20M=C3=BCller?= <steffen.mueller@radio-frei.de>
+Date: Mon, 30 Apr 2012 13:05:34 +0200
+Subject: usb: add USB_QUIRK_RESET_RESUME for M-Audio 88es
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Steffen=20M=C3=BCller?= <steffen.mueller@radio-frei.de>
+
+commit 166cb70e97bd83d7ae9bbec6ae59a178fd9bb823 upstream.
+
+Tested-by: Steffen Müller <steffen.mueller@radio-frei.de>
+Signed-off-by: Steffen Müller <steffen.mueller@radio-frei.de>
+Signed-off-by: Stefan Seyfried <seife+kernel@b1-systems.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -123,6 +123,9 @@ static const struct usb_device_id usb_qu
+       /* Guillemot Webcam Hercules Dualpix Exchange*/
+       { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
++      /* Midiman M-Audio Keystation 88es */
++      { USB_DEVICE(0x0763, 0x0192), .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-gadget-fsl_udc_core-dtd-s-next-dtd-pointer-need-to-be-updated-once-written.patch b/queue-3.0/usb-gadget-fsl_udc_core-dtd-s-next-dtd-pointer-need-to-be-updated-once-written.patch
new file mode 100644 (file)
index 0000000..0e6f2ed
--- /dev/null
@@ -0,0 +1,41 @@
+From 4d0947dec4db1224354e2f6f00ae22ce38e62a43 Mon Sep 17 00:00:00 2001
+From: Peter Chen <peter.chen@freescale.com>
+Date: Sun, 1 Apr 2012 15:17:16 +0800
+Subject: usb: gadget: fsl_udc_core: dTD's next dtd pointer need to be updated once written
+
+From: Peter Chen <peter.chen@freescale.com>
+
+commit 4d0947dec4db1224354e2f6f00ae22ce38e62a43 upstream.
+
+dTD's next dtd pointer need to be updated once CPU writes it, or this
+request may not be handled by controller, then host will get NAK from
+device forever.
+
+This problem occurs when there is a request is handling, we need to add
+a new request to dTD list, if this new request is added before the current
+one is finished, the new request is intended to added as next dtd pointer
+at current dTD, but without wmb(), the dTD's next dtd pointer may not be
+updated when the controller reads it. In that case, the controller will
+still get Terminate Bit is 1 at dTD's next dtd pointer, that means there is
+no next request, then this new request is missed by controller.
+
+Signed-off-by: Peter Chen <peter.chen@freescale.com>
+Acked-by: Li Yang <leoli@freescale.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/fsl_udc_core.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/gadget/fsl_udc_core.c
++++ b/drivers/usb/gadget/fsl_udc_core.c
+@@ -717,6 +717,8 @@ static void fsl_queue_td(struct fsl_ep *
+               lastreq = list_entry(ep->queue.prev, struct fsl_req, queue);
+               lastreq->tail->next_td_ptr =
+                       cpu_to_hc32(req->head->td_dma & DTD_ADDR_MASK);
++              /* Ensure dTD's next dtd pointer to be updated */
++              wmb();
+               /* Read prime bit, if 1 goto done */
+               if (fsl_readl(&dr_regs->endpointprime) & bitmask)
+                       goto out;
diff --git a/queue-3.0/usb-remove-races-in-devio.c.patch b/queue-3.0/usb-remove-races-in-devio.c.patch
new file mode 100644 (file)
index 0000000..f1bdd18
--- /dev/null
@@ -0,0 +1,129 @@
+From 4e09dcf20f7b5358615514c2ec8584b248ab8874 Mon Sep 17 00:00:00 2001
+From: Huajun Li <huajun.li.lee@gmail.com>
+Date: Fri, 18 May 2012 20:12:51 +0800
+Subject: USB: Remove races in devio.c
+
+From: Huajun Li <huajun.li.lee@gmail.com>
+
+commit 4e09dcf20f7b5358615514c2ec8584b248ab8874 upstream.
+
+There exist races in devio.c, below is one case,
+and there are similar races in destroy_async()
+and proc_unlinkurb().  Remove these races.
+
+ cancel_bulk_urbs()        async_completed()
+-------------------                -----------------------
+ spin_unlock(&ps->lock);
+
+                           list_move_tail(&as->asynclist,
+                                   &ps->async_completed);
+
+                           wake_up(&ps->wait);
+
+                           Lead to free_async() be triggered,
+                           then urb and 'as' will be freed.
+
+ usb_unlink_urb(as->urb);
+ ===> refer to the freed 'as'
+
+Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: Oncaphillis <oncaphillis@snafu.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/devio.c |   33 +++++++++++++++++++++++++--------
+ 1 file changed, 25 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/core/devio.c
++++ b/drivers/usb/core/devio.c
+@@ -292,17 +292,14 @@ static struct async *async_getcompleted(
+ static struct async *async_getpending(struct dev_state *ps,
+                                            void __user *userurb)
+ {
+-      unsigned long flags;
+       struct async *as;
+-      spin_lock_irqsave(&ps->lock, flags);
+       list_for_each_entry(as, &ps->async_pending, asynclist)
+               if (as->userurb == userurb) {
+                       list_del_init(&as->asynclist);
+-                      spin_unlock_irqrestore(&ps->lock, flags);
+                       return as;
+               }
+-      spin_unlock_irqrestore(&ps->lock, flags);
++
+       return NULL;
+ }
+@@ -357,6 +354,7 @@ static void cancel_bulk_urbs(struct dev_
+ __releases(ps->lock)
+ __acquires(ps->lock)
+ {
++      struct urb *urb;
+       struct async *as;
+       /* Mark all the pending URBs that match bulk_addr, up to but not
+@@ -379,8 +377,11 @@ __acquires(ps->lock)
+       list_for_each_entry(as, &ps->async_pending, asynclist) {
+               if (as->bulk_status == AS_UNLINK) {
+                       as->bulk_status = 0;            /* Only once */
++                      urb = as->urb;
++                      usb_get_urb(urb);
+                       spin_unlock(&ps->lock);         /* Allow completions */
+-                      usb_unlink_urb(as->urb);
++                      usb_unlink_urb(urb);
++                      usb_put_urb(urb);
+                       spin_lock(&ps->lock);
+                       goto rescan;
+               }
+@@ -433,6 +434,7 @@ static void async_completed(struct urb *
+ static void destroy_async(struct dev_state *ps, struct list_head *list)
+ {
++      struct urb *urb;
+       struct async *as;
+       unsigned long flags;
+@@ -440,10 +442,13 @@ static void destroy_async(struct dev_sta
+       while (!list_empty(list)) {
+               as = list_entry(list->next, struct async, asynclist);
+               list_del_init(&as->asynclist);
++              urb = as->urb;
++              usb_get_urb(urb);
+               /* drop the spinlock so the completion handler can run */
+               spin_unlock_irqrestore(&ps->lock, flags);
+-              usb_kill_urb(as->urb);
++              usb_kill_urb(urb);
++              usb_put_urb(urb);
+               spin_lock_irqsave(&ps->lock, flags);
+       }
+       spin_unlock_irqrestore(&ps->lock, flags);
+@@ -1352,12 +1357,24 @@ static int proc_submiturb(struct dev_sta
+ static int proc_unlinkurb(struct dev_state *ps, void __user *arg)
+ {
++      struct urb *urb;
+       struct async *as;
++      unsigned long flags;
++      spin_lock_irqsave(&ps->lock, flags);
+       as = async_getpending(ps, arg);
+-      if (!as)
++      if (!as) {
++              spin_unlock_irqrestore(&ps->lock, flags);
+               return -EINVAL;
+-      usb_kill_urb(as->urb);
++      }
++
++      urb = as->urb;
++      usb_get_urb(urb);
++      spin_unlock_irqrestore(&ps->lock, flags);
++
++      usb_kill_urb(urb);
++      usb_put_urb(urb);
++
+       return 0;
+ }
diff --git a/queue-3.0/usb-serial-ti_usb_3410_5052-add-support-for-the-fri2-serial-console.patch b/queue-3.0/usb-serial-ti_usb_3410_5052-add-support-for-the-fri2-serial-console.patch
new file mode 100644 (file)
index 0000000..f300896
--- /dev/null
@@ -0,0 +1,71 @@
+From 975dc33b82cb887d75a29b1e3835c8eb063a8e99 Mon Sep 17 00:00:00 2001
+From: Darren Hart <dvhart@linux.intel.com>
+Date: Fri, 11 May 2012 13:56:57 -0700
+Subject: USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console
+
+From: Darren Hart <dvhart@linux.intel.com>
+
+commit 975dc33b82cb887d75a29b1e3835c8eb063a8e99 upstream.
+
+The Kontron M2M development board, also known as the Fish River Island II,
+has an optional daughter card providing access to the PCH_UART (EG20T) via
+a ti_usb_3410_5052 uart to usb chip.
+
+http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html
+
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+CC: Al Borchers <alborchers@steinerpoint.com>
+CC: Peter Berger <pberger@brimson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ti_usb_3410_5052.c |    6 ++++--
+ drivers/usb/serial/ti_usb_3410_5052.h |    1 +
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/ti_usb_3410_5052.c
++++ b/drivers/usb/serial/ti_usb_3410_5052.c
+@@ -165,7 +165,7 @@ static unsigned int product_5052_count;
+ /* the array dimension is the number of default entries plus */
+ /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */
+ /* null entry */
+-static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = {
++static struct usb_device_id ti_id_table_3410[15+TI_EXTRA_VID_PID_COUNT+1] = {
+       { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+       { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
+       { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
+@@ -180,6 +180,7 @@ static struct usb_device_id ti_id_table_
+       { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) },
+       { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) },
+       { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) },
++      { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) },
+ };
+ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = {
+@@ -189,7 +190,7 @@ static struct usb_device_id ti_id_table_
+       { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+ };
+-static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = {
++static struct usb_device_id ti_id_table_combined[19+2*TI_EXTRA_VID_PID_COUNT+1] = {
+       { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) },
+       { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) },
+       { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) },
+@@ -208,6 +209,7 @@ static struct usb_device_id ti_id_table_
+       { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) },
+       { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) },
+       { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) },
++      { USB_DEVICE(TI_VENDOR_ID, FRI2_PRODUCT_ID) },
+       { }
+ };
+--- a/drivers/usb/serial/ti_usb_3410_5052.h
++++ b/drivers/usb/serial/ti_usb_3410_5052.h
+@@ -37,6 +37,7 @@
+ #define TI_5152_BOOT_PRODUCT_ID               0x5152  /* no EEPROM, no firmware */
+ #define TI_5052_EEPROM_PRODUCT_ID     0x505A  /* EEPROM, no firmware */
+ #define TI_5052_FIRMWARE_PRODUCT_ID   0x505F  /* firmware is running */
++#define FRI2_PRODUCT_ID                       0x5053  /* Fish River Island II */
+ /* Multi-Tech vendor and product ids */
+ #define MTS_VENDOR_ID                 0x06E0
diff --git a/queue-3.0/xhci-add-lynx-point-to-list-of-intel-switchable-hosts.patch b/queue-3.0/xhci-add-lynx-point-to-list-of-intel-switchable-hosts.patch
new file mode 100644 (file)
index 0000000..e0b80b9
--- /dev/null
@@ -0,0 +1,76 @@
+From 1c12443ab8eba71a658fae4572147e56d1f84f66 Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Thu, 9 Feb 2012 15:55:13 -0800
+Subject: xhci: Add Lynx Point to list of Intel switchable hosts.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 1c12443ab8eba71a658fae4572147e56d1f84f66 upstream.
+
+The upcoming Intel Lynx Point chipset includes an xHCI host controller
+that can have ports switched from the EHCI host controller, just like
+the Intel Panther Point xHCI host.  This time, ports from both EHCI
+hosts can be switched to the xHCI host controller.  The PCI config
+registers to do the port switching are in the exact same place in the
+xHCI PCI configuration registers, with the same semantics.
+
+Hooray for shipping patches for next-gen hardware before the current gen
+hardware is even available for purchase!
+
+This patch should be backported to stable kernels as old as 3.0,
+that contain commit 69e848c2090aebba5698a1620604c7dccb448684
+"Intel xhci: Support EHCI/xHCI port switching."
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ehci-pci.c   |    4 +++-
+ drivers/usb/host/pci-quirks.c |   18 +++++++++++++++++-
+ 2 files changed, 20 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/ehci-pci.c
++++ b/drivers/usb/host/ehci-pci.c
+@@ -365,7 +365,9 @@ static bool usb_is_intel_switchable_ehci
+ {
+       return pdev->class == PCI_CLASS_SERIAL_USB_EHCI &&
+               pdev->vendor == PCI_VENDOR_ID_INTEL &&
+-              pdev->device == 0x1E26;
++              (pdev->device == 0x1E26 ||
++               pdev->device == 0x8C2D ||
++               pdev->device == 0x8C26);
+ }
+ static void ehci_enable_xhci_companion(void)
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -711,12 +711,28 @@ static int handshake(void __iomem *ptr,
+       return -ETIMEDOUT;
+ }
+-bool usb_is_intel_switchable_xhci(struct pci_dev *pdev)
++#define PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI   0x8C31
++
++bool usb_is_intel_ppt_switchable_xhci(struct pci_dev *pdev)
+ {
+       return pdev->class == PCI_CLASS_SERIAL_USB_XHCI &&
+               pdev->vendor == PCI_VENDOR_ID_INTEL &&
+               pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI;
+ }
++
++/* The Intel Lynx Point chipset also has switchable ports. */
++bool usb_is_intel_lpt_switchable_xhci(struct pci_dev *pdev)
++{
++      return pdev->class == PCI_CLASS_SERIAL_USB_XHCI &&
++              pdev->vendor == PCI_VENDOR_ID_INTEL &&
++              pdev->device == PCI_DEVICE_ID_INTEL_LYNX_POINT_XHCI;
++}
++
++bool usb_is_intel_switchable_xhci(struct pci_dev *pdev)
++{
++      return usb_is_intel_ppt_switchable_xhci(pdev) ||
++              usb_is_intel_lpt_switchable_xhci(pdev);
++}
+ EXPORT_SYMBOL_GPL(usb_is_intel_switchable_xhci);
+ /*