RE: [PATCH v4] staging: gdm724x: Fix DMA from stack

2 messages, 2 authors, 2021-02-11 · open the first message on its own page

RE: [PATCH v4] staging: gdm724x: Fix DMA from stack

From: David Laight <hidden>
Date: 2021-02-11 13:45:52

Stack allocated buffers cannot be used for DMA
on all architectures so allocate hci_packet buffer
using kmalloc.
I wonder if the usb stack ought/could support a short bounce
buffer within the memory is already has to allocate?

For hci and lengths less than 8 the immediate data can be
placed directly in the ring structure replacing the data
pointer itself.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Re: [PATCH v4] staging: gdm724x: Fix DMA from stack

From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Date: 2021-02-11 14:11:58

On Thu, Feb 11, 2021 at 01:28:41PM +0000, David Laight wrote:
quoted
Stack allocated buffers cannot be used for DMA
on all architectures so allocate hci_packet buffer
using kmalloc.
I wonder if the usb stack ought/could support a short bounce
buffer within the memory is already has to allocate?
No.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help