[PATCH] cdc-acm: fix wrong pipe type on rx interrupt xfers

2016-08-12 Thread gavinli
From: Gavin Li This fixes the "BOGUS urb xfer" warning logged by usb_submit_urb(). Signed-off-by: Gavin Li --- drivers/usb/class/cdc-acm.c | 5 ++--- drivers/usb/class/cdc-acm.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/clas

[PATCH] usb: devio: fix mmap() on non-coherent DMA architectures

2019-08-01 Thread gavinli
From: Gavin Li On architectures that are not (or are optionally) DMA coherent, dma_alloc_coherent() returns an address into the vmalloc space, and calling virt_to_phys() on this address returns an unusable physical address. This patch replaces the raw remap_pfn_range() call with a call to dmap_m

[PATCH] usb: devio: fix mmap() on non-coherent DMA architectures

2019-08-01 Thread gavinli
From: Gavin Li On architectures that are not (or are optionally) DMA coherent, dma_alloc_coherent() returns an address into the vmalloc space, and calling virt_to_phys() on this address returns an unusable physical address. This patch replaces the raw remap_pfn_range() call with a call to dmap_m

[PATCH v1] usb: usbfs: fix double-free of usb memory upon submiturb error

2019-08-04 Thread gavinli
From: Gavin Li Upon an error within proc_do_submiturb(), dec_usb_memory_use_count() gets called once by the error handling tail and again by free_async(). Remove the first call. Signed-off-by: Gavin Li --- drivers/usb/core/devio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/us

[PATCH] usb: host: xhci: reliable endpoint reset after halt

2017-05-25 Thread gavinli
From: Gavin Li If a stalling TRB is cancelled and NOOP'ed in xhci_handle_cmd_stop_ep(), finish_td() never gets called to reset the halted endpoint and the endpoint remains indefinitely stalled. This patch ensures that xhci_cleanup_halted_endpoint() is called after a TRB completion if the endpoint

[PATCH v1] usb: host: xhci: reliable endpoint reset after halt

2017-05-26 Thread gavinli
From: Gavin Li If a stalling TRB is cancelled and NOOP'ed in xhci_handle_cmd_stop_ep(), finish_td() never gets called to reset the halted endpoint and the endpoint remains indefinitely stalled. This patch ensures that xhci_cleanup_halted_endpoint() is called after a TRB completion if the endpoint

[PATCH] usb: usbfs: only account once for mmap()'ed usb memory usage

2019-08-14 Thread gavinli
From: Gavin Li Memory usage for USB memory allocated via mmap() is already accounted for at mmap() time; no need to account for it again at submiturb time. Signed-off-by: Gavin Li --- drivers/usb/core/devio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/cor