Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f589b3e0 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Greg Kroah-Hartman
Browse files

USB: UHCI: don't allocate frame list atomically



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: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 47c6ae7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -591,7 +591,7 @@ static int uhci_start(struct usb_hcd *hcd)


	uhci->frame = dma_alloc_coherent(uhci_dev(uhci),
	uhci->frame = dma_alloc_coherent(uhci_dev(uhci),
			UHCI_NUMFRAMES * sizeof(*uhci->frame),
			UHCI_NUMFRAMES * sizeof(*uhci->frame),
			&uhci->frame_dma_handle, 0);
			&uhci->frame_dma_handle, GFP_KERNEL);
	if (!uhci->frame) {
	if (!uhci->frame) {
		dev_err(uhci_dev(uhci),
		dev_err(uhci_dev(uhci),
			"unable to allocate consistent memory for frame list\n");
			"unable to allocate consistent memory for frame list\n");