On Thu, Feb 11, 2021 at 01:28:41PM +, 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 a
> 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
On Thu, Feb 11, 2021 at 11:08:19AM +0530, Amey Narkhede wrote:
> Stack allocated buffers cannot be used for DMA
> on all architectures so allocate hci_packet buffer
> using kmalloc.
>
> Signed-off-by: Amey Narkhede
Looks good.
Reviewed-by: Dan Carpenter
regards,
dan carpenter
___
Stack allocated buffers cannot be used for DMA
on all architectures so allocate hci_packet buffer
using kmalloc.
Signed-off-by: Amey Narkhede
---
Changes in v4:
- Use struct_size to allocate memory for hci_packet
- Fix memory corruption
drivers/staging/gdm724x/gdm_usb.c | 10 +++