From b5a06ec6f541a4ae5907da3437a8d56467a0a699 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Tue, 28 Dec 2010 13:08:42 -0800 Subject: [PATCH] --- yaml --- r: 232651 b: refs/heads/master c: a6d940dd759bf240d28624198660ed34582a327b h: refs/heads/master i: 232649: 20045a63f02a03399baa6ecf7c79c359a08160f4 232647: d2e244f6bb048a1f39b9b28760136989805fe2fc v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 780ca7081f29..0452396a6598 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 653a39d1f61bdc9f277766736d21d2e9be0391cb +refs/heads/master: a6d940dd759bf240d28624198660ed34582a327b diff --git a/trunk/drivers/usb/host/xhci.c b/trunk/drivers/usb/host/xhci.c index b2c56d15fb42..34cf4e165877 100644 --- a/trunk/drivers/usb/host/xhci.c +++ b/trunk/drivers/usb/host/xhci.c @@ -2431,8 +2431,12 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) xhci_err(xhci, "Error while assigning device slot ID\n"); return 0; } - /* xhci_alloc_virt_device() does not touch rings; no need to lock */ - if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_KERNEL)) { + /* xhci_alloc_virt_device() does not touch rings; no need to lock. + * Use GFP_NOIO, since this function can be called from + * xhci_discover_or_reset_device(), which may be called as part of + * mass storage driver error handling. + */ + if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_NOIO)) { /* Disable slot, if we can do it without mem alloc */ xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n"); spin_lock_irqsave(&xhci->lock, flags);