소스 검색

USB: EHCI: don't allocate hardware periodic table atomically by default

ehci_mem_init() is executed one time during ehci_init() and by default
all memory allocations but ehci->periodic are done not atomically,
GFP_KERNEL is passed as flags parameter.

Do similar allocation for ehci->periodic and free some space in
coherent atomic DMA pool by default.

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 년 전
부모
커밋
47c6ae7cdc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/usb/host/ehci-mem.c

+ 1 - 1
drivers/usb/host/ehci-mem.c

@@ -209,7 +209,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
 	ehci->periodic = (__le32 *)
 		dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller,
 			ehci->periodic_size * sizeof(__le32),
-			&ehci->periodic_dma, 0);
+			&ehci->periodic_dma, flags);
 	if (ehci->periodic == NULL) {
 		goto fail;
 	}