Jelajahi Sumber

USB: OHCI: don't allocate HCCA atomically

OHCI HCCA memory region is allocated from atomic DMA pool one time
during usb_add_hcd() and deallocated by usb_remove_hcd().

Do non-atomic allocation of OHCI HCCA 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>
Vladimir Zapolskiy 11 tahun lalu
induk
melakukan
4428524d8d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      drivers/usb/host/ohci-hcd.c

+ 1 - 1
drivers/usb/host/ohci-hcd.c

@@ -559,7 +559,7 @@ static int ohci_init (struct ohci_hcd *ohci)
 		return 0;
 
 	ohci->hcca = dma_alloc_coherent (hcd->self.controller,
-			sizeof *ohci->hcca, &ohci->hcca_dma, 0);
+			sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL);
 	if (!ohci->hcca)
 		return -ENOMEM;