]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 22:20:49 +0000 (15:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 May 2012 22:20:49 +0000 (15:20 -0700)
added patches:
usb-gadget-udc-core-fix-incompatibility-with-dummy-hcd.patch
usb-gadget-udc-core-fix-wrong-call-order.patch

queue-3.3/net-fix-issue-with-netdev_tx_reset_queue-not-resetting-queue-from-xoff-state.patch
queue-3.3/series
queue-3.3/usb-gadget-udc-core-fix-incompatibility-with-dummy-hcd.patch [new file with mode: 0644]
queue-3.3/usb-gadget-udc-core-fix-wrong-call-order.patch [new file with mode: 0644]

index d393f37bf791bae8bfcb6cdcb2d4ed856cf43641..02279fe48cf7b615ffb13fb0c5b91c9ba7207130 100644 (file)
@@ -23,29 +23,9 @@ Tested-by: Stephen Ko <stephen.s.ko@intel.com>
 Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- drivers/net/ethernet/intel/igb/igb_main.c |    3 ++-
- include/linux/netdevice.h                 |    1 +
- 2 files changed, 3 insertions(+), 1 deletion(-)
+ include/linux/netdevice.h |    1 +
+ 1 file changed, 1 insertion(+)
 
---- a/drivers/net/ethernet/intel/igb/igb_main.c
-+++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -2750,6 +2750,8 @@ void igb_configure_tx_ring(struct igb_ad
-       txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
-       wr32(E1000_TXDCTL(reg_idx), txdctl);
-+
-+      netdev_tx_reset_queue(txring_txq(ring));
- }
- /**
-@@ -3242,7 +3244,6 @@ static void igb_clean_tx_ring(struct igb
-               buffer_info = &tx_ring->tx_buffer_info[i];
-               igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
-       }
--      netdev_tx_reset_queue(txring_txq(tx_ring));
-       size = sizeof(struct igb_tx_buffer) * tx_ring->count;
-       memset(tx_ring->tx_buffer_info, 0, size);
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
 @@ -1955,6 +1955,7 @@ static inline void netdev_completed_queu
index 10afa3a2e0667e51a621b0e06ebc337f113eb50f..c7040d8895aa75500e31c5db7d8fd512346b3c98 100644 (file)
@@ -50,3 +50,5 @@ block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch
 nfsd-don-t-fail-unchecked-creates-of-non-special-files.patch
 arm-7397-1-l2x0-only-apply-workaround-for-erratum-753970.patch
 arm-7398-1-l2x0-only-write-to-debug-registers-on-pl310.patch
+usb-gadget-udc-core-fix-wrong-call-order.patch
+usb-gadget-udc-core-fix-incompatibility-with-dummy-hcd.patch
diff --git a/queue-3.3/usb-gadget-udc-core-fix-incompatibility-with-dummy-hcd.patch b/queue-3.3/usb-gadget-udc-core-fix-incompatibility-with-dummy-hcd.patch
new file mode 100644 (file)
index 0000000..ceec646
--- /dev/null
@@ -0,0 +1,46 @@
+From 320cd1e750f1bf3e47eb41209dcb2be07264cb76 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 26 Apr 2012 11:31:57 -0400
+Subject: usb: gadget: udc-core: fix incompatibility with dummy-hcd
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 320cd1e750f1bf3e47eb41209dcb2be07264cb76 upstream.
+
+This patch (as1548) fixes a recently-introduced incompatibility
+between the UDC core and the dummy-hcd driver.  Commit
+8ae8090c82eb407267001f75b3d256b3bd4ae691 (usb: gadget: udc-core: fix
+asymmetric calls in remove_driver) moved the usb_gadget_udc_stop()
+call in usb_gadget_remove_driver() below the usb_gadget_disconnect()
+call.
+
+As a result, usb_gadget_disconnect() gets called at a time when the
+gadget driver believes it has been unbound but dummy-hcd believes
+it has not.  A nasty error ensues when dummy-hcd calls the gadget
+driver's disconnect method a second time.
+
+To fix the problem, this patch moves the gadget driver's unbind
+notification after the usb_gadget_disconnect() call.  Now nothing
+happens between the two unbind notifications, so nothing goes wrong.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc-core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/udc-core.c
++++ b/drivers/usb/gadget/udc-core.c
+@@ -211,8 +211,8 @@ static void usb_gadget_remove_driver(str
+       if (udc_is_newstyle(udc)) {
+               udc->driver->disconnect(udc->gadget);
+-              udc->driver->unbind(udc->gadget);
+               usb_gadget_disconnect(udc->gadget);
++              udc->driver->unbind(udc->gadget);
+               usb_gadget_udc_stop(udc->gadget, udc->driver);
+       } else {
+               usb_gadget_stop(udc->gadget, udc->driver);
diff --git a/queue-3.3/usb-gadget-udc-core-fix-wrong-call-order.patch b/queue-3.3/usb-gadget-udc-core-fix-wrong-call-order.patch
new file mode 100644 (file)
index 0000000..430548a
--- /dev/null
@@ -0,0 +1,34 @@
+From 83a787a71e034244a9fd1d5988fe18f226341417 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 27 Apr 2012 11:02:15 +0300
+Subject: usb: gadget: udc-core: fix wrong call order
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 83a787a71e034244a9fd1d5988fe18f226341417 upstream.
+
+commit 6d258a4 (usb: gadget: udc-core: stop UDC on device-initiated
+disconnect) introduced another case of asymmetric calls when issuing
+a device-initiated disconnect. Fix it.
+
+Reported-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc-core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/udc-core.c
++++ b/drivers/usb/gadget/udc-core.c
+@@ -363,9 +363,9 @@ static ssize_t usb_udc_softconn_store(st
+                       usb_gadget_udc_start(udc->gadget, udc->driver);
+               usb_gadget_connect(udc->gadget);
+       } else if (sysfs_streq(buf, "disconnect")) {
++              usb_gadget_disconnect(udc->gadget);
+               if (udc_is_newstyle(udc))
+                       usb_gadget_udc_stop(udc->gadget, udc->driver);
+-              usb_gadget_disconnect(udc->gadget);
+       } else {
+               dev_err(dev, "unsupported command '%s'\n", buf);
+               return -EINVAL;