linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH v4] staging: gdm724x: Fix DMA from stack
       [not found] <20210211053819.34858-1-ameynarkhede03@gmail.com>
@ 2021-02-11 13:28 ` David Laight
  2021-02-11 13:52   ` gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: David Laight @ 2021-02-11 13:28 UTC (permalink / raw)
  To: 'Amey Narkhede', gregkh, dan.carpenter
  Cc: devel, linux-kernel, linux-usb

> 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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v4] staging: gdm724x: Fix DMA from stack
  2021-02-11 13:28 ` [PATCH v4] staging: gdm724x: Fix DMA from stack David Laight
@ 2021-02-11 13:52   ` gregkh
  0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2021-02-11 13:52 UTC (permalink / raw)
  To: David Laight
  Cc: 'Amey Narkhede', dan.carpenter, devel, linux-kernel, linux-usb

On Thu, Feb 11, 2021 at 01:28:41PM +0000, David Laight wrote:
> > 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-11 13:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210211053819.34858-1-ameynarkhede03@gmail.com>
2021-02-11 13:28 ` [PATCH v4] staging: gdm724x: Fix DMA from stack David Laight
2021-02-11 13:52   ` gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).