diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2014-06-10 04:27:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-17 19:44:57 -0400 |
commit | be3de32107091c266b00a48265fe7e06233af4f0 (patch) | |
tree | e944bb41bb5b3f98bca3af7934a03f3ee73c8d0b | |
parent | e3d9558082061481af96b588583e0cf220c2943c (diff) |
xhci: Fix sleeping with IRQs disabled in xhci_stop_device()
xhci_stop_device() allocates and issues stop commands for each active endpoint.
This is done with spinlock held and interrupt disabled so we can't sleep during
memory allocation. Use GFP_NOWAIT instead
Regression from commit ddba5cd0aeff5bbed92ebdf4b1223300b0541e78
"xhci: Use command structures when queuing commands on the command ring"
for 3.16-rc1
Fixes: ddba5cd0aeff ("xhci: Use command structures when queuing commands")
Reported-by: Dan Williams <dan.j.williams@intel.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 6231ce6aa0c3..2b998c60faf2 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -287,7 +287,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) | |||
287 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) { | 287 | if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) { |
288 | struct xhci_command *command; | 288 | struct xhci_command *command; |
289 | command = xhci_alloc_command(xhci, false, false, | 289 | command = xhci_alloc_command(xhci, false, false, |
290 | GFP_NOIO); | 290 | GFP_NOWAIT); |
291 | if (!command) { | 291 | if (!command) { |
292 | spin_unlock_irqrestore(&xhci->lock, flags); | 292 | spin_unlock_irqrestore(&xhci->lock, flags); |
293 | xhci_free_command(xhci, cmd); | 293 | xhci_free_command(xhci, cmd); |