]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.1 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Nov 2011 23:46:36 +0000 (16:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 3 Nov 2011 23:46:36 +0000 (16:46 -0700)
queue-3.1/ath9k_hw-fix-descriptor-status-of-txopexceeded.patch
queue-3.1/series
queue-3.1/usb_storage-don-t-freeze-in-usb-stor-scan.patch [new file with mode: 0644]
queue-3.1/xhci-if-no-endpoints-changed-don-t-issue-bw-command.patch [new file with mode: 0644]

index 6630723a5e0767ec06a3ee8eabb878fd88176bb7..62d9a4231e3552083f3fd609f2161fba1c3b167a 100644 (file)
@@ -9,6 +9,7 @@ commit 2a15b394f8e46dd3e2ab365ab41cfa701d92fa77 upstream.
 
 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
 Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 
 ---
  drivers/net/wireless/ath/ath9k/ar9003_mac.c |    4 ++--
index 8f243a0ff57465ac230e9c810a94456606beca1a..9da0179f750ac60535b2ee7bb042f4e02d62e8e7 100644 (file)
@@ -173,3 +173,5 @@ ext4-ext4_mkdir-should-dirty-dir_block-with-newly-created-directory-inode.patch
 ext4-call-ext4_handle_dirty_metadata-with-correct-inode-in-ext4_dx_add_entry.patch
 ext4-let-ext4_page_mkwrite-stop-started-handle-in-failure.patch
 ext4-fix-race-in-xattr-block-allocation-path.patch
+usb_storage-don-t-freeze-in-usb-stor-scan.patch
+xhci-if-no-endpoints-changed-don-t-issue-bw-command.patch
diff --git a/queue-3.1/usb_storage-don-t-freeze-in-usb-stor-scan.patch b/queue-3.1/usb_storage-don-t-freeze-in-usb-stor-scan.patch
new file mode 100644 (file)
index 0000000..a3f405a
--- /dev/null
@@ -0,0 +1,67 @@
+From f02fe890ece7d695a5744b20525d45312382e6e4 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Tue, 26 Jul 2011 09:56:07 -0500
+Subject: usb_storage: Don't freeze in usb-stor-scan
+
+From: Seth Forshee <seth.forshee@canonical.com>
+
+commit f02fe890ece7d695a5744b20525d45312382e6e4 upstream.
+
+Scanning cannot be run during suspend or hibernation, but if
+usb-stor-scan freezes another thread waiting on scanning to
+complete may fail to freeze.
+
+However, if usb-stor-scan is left freezable without ever actually
+freezing then the freezer will wait on it to exit, and threads
+waiting for scanning to finish will no longer be blocked. One
+problem with this approach is that usb-stor-scan has a delay to
+wait for devices to settle (which is currently the only point where
+it can freeze). To work around this we can request that the freezer
+send a fake signal when freezing, then use interruptible sleep to
+wake the thread early when freezing happens.
+
+To make this happen, the following changes are made to
+usb-stor-scan:
+
+ * Use set_freezable_with_signal() instead of set_freezable() to
+   request a fake signal when freezing
+
+ * Use wait_event_interruptible_timeout() instead of
+   wait_event_freezable_timeout() to avoid freezing
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/usb.c |   16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -831,12 +831,22 @@ static int usb_stor_scan_thread(void * _
+       dev_dbg(dev, "device found\n");
+-      set_freezable();
+-      /* Wait for the timeout to expire or for a disconnect */
++      set_freezable_with_signal();
++      /*
++       * Wait for the timeout to expire or for a disconnect
++       *
++       * We can't freeze in this thread or we risk causing khubd to
++       * fail to freeze, but we can't be non-freezable either. Nor can
++       * khubd freeze while waiting for scanning to complete as it may
++       * hold the device lock, causing a hang when suspending devices.
++       * So we request a fake signal when freezing and use
++       * interruptible sleep to kick us out of our wait early when
++       * freezing happens.
++       */
+       if (delay_use > 0) {
+               dev_dbg(dev, "waiting for device to settle "
+                               "before scanning\n");
+-              wait_event_freezable_timeout(us->delay_wait,
++              wait_event_interruptible_timeout(us->delay_wait,
+                               test_bit(US_FLIDX_DONT_SCAN, &us->dflags),
+                               delay_use * HZ);
+       }
diff --git a/queue-3.1/xhci-if-no-endpoints-changed-don-t-issue-bw-command.patch b/queue-3.1/xhci-if-no-endpoints-changed-don-t-issue-bw-command.patch
new file mode 100644 (file)
index 0000000..bfe885b
--- /dev/null
@@ -0,0 +1,44 @@
+From 2dc3753997f3c80ce8b950242ab9bb3fb936acfd Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Fri, 2 Sep 2011 11:05:40 -0700
+Subject: xhci: If no endpoints changed, don't issue BW command.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 2dc3753997f3c80ce8b950242ab9bb3fb936acfd upstream.
+
+Some alternate interface settings have no endpoints associated with them.
+This shows up in some USB webcams, particularly the Logitech HD 1080p,
+which uses the uvcvideo driver.  If a driver switches between two alt
+settings with no endpoints, there is no need to issue a configure endpoint
+command, because there is no endpoint information to update.
+
+The only time a configure endpoint command with just the add slot flag set
+makes sense is when the driver is updating hub characteristics in the slot
+context.  However, that code never calls xhci_check_bandwidth, so we
+should be safe not issuing a command if only the slot context add flag is
+set.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -1888,6 +1888,12 @@ int xhci_check_bandwidth(struct usb_hcd
+       ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG);
+       ctrl_ctx->add_flags &= cpu_to_le32(~EP0_FLAG);
+       ctrl_ctx->drop_flags &= cpu_to_le32(~(SLOT_FLAG | EP0_FLAG));
++
++      /* Don't issue the command if there's no endpoints to update. */
++      if (ctrl_ctx->add_flags == cpu_to_le32(SLOT_FLAG) &&
++                      ctrl_ctx->drop_flags == 0)
++              return 0;
++
+       xhci_dbg(xhci, "New Input Control Context:\n");
+       slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
+       xhci_dbg_ctx(xhci, virt_dev->in_ctx,