USB: UHCI: don't allocate frame list atomically
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Thu, 3 Jul 2014 18:37:42 +0000 (21:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 23:16:07 +0000 (16:16 -0700)
uhci_start() is executed one time during usb_add_hcd() call and by
default UHCI frame list is allocated from atomic DMA pool.

Do non-atomic allocation of uhci->frame and free some space in
coherent atomic DMA pool.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/uhci-hcd.c

index 27f35e8f161b20c968baf9fbaec77b42a075e849..a7de8e8bb4582bbee1e411a136a3223efcb9ac59 100644 (file)
@@ -591,7 +591,7 @@ static int uhci_start(struct usb_hcd *hcd)
 
        uhci->frame = dma_alloc_coherent(uhci_dev(uhci),
                        UHCI_NUMFRAMES * sizeof(*uhci->frame),
-                       &uhci->frame_dma_handle, 0);
+                       &uhci->frame_dma_handle, GFP_KERNEL);
        if (!uhci->frame) {
                dev_err(uhci_dev(uhci),
                        "unable to allocate consistent memory for frame list\n");