mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
f589b3e040
commit
4428524d8d
|
@ -559,7 +559,7 @@ static int ohci_init (struct ohci_hcd *ohci)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ohci->hcca = dma_alloc_coherent (hcd->self.controller,
|
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)
|
if (!ohci->hcca)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue