[PATCH 2/2] usb: gadget: composite: remove duplicated code in OS desc handling

2017-12-31 Thread Chris Dickens
When the host wants to fetch OS descriptors, it sends two requests. The first is only for the header and the second for the full amount specified by the header in the first request. The OS descriptor handling code is distinguishing the header-only requests based on the wLength of the setup packet,

[PATCH 1/2] usb: gadget: composite: fix incorrect handling of OS desc requests

2017-12-31 Thread Chris Dickens
When handling an OS descriptor request, one of the first operations is to zero out the request buffer using the wLength from the setup packet. There is no bounds checking, so a wLength > 4096 would clobber memory adjacent to the request buffer. Fix this by taking the min of wLength and the request

[PATCH 0/2] usb: gadget: composite: OS desc handling improvements

2017-12-31 Thread Chris Dickens
Hi, This patch set fixes some incorrect (and possibly dangerous) behavior present in the OS descriptor handling code of the latest kernel tree and provides some simplifications that allow for a bit of code removal. The first patch may need to be considered for inclusion in stable kernels. Chris

Re: [PATCH v2] USB: host: Use zeroing memory allocator rather than allocator/memset

2017-12-31 Thread Alan Stern
On Sun, 31 Dec 2017, Himanshu Jha wrote: > Use dma_zalloc_coherent for allocating zeroed > memory and remove unnecessary memset function. > > Done using Coccinelle. > Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci > 0-day tested with no failures. > > Suggested-by: Luis R. Rodrig

Re: `pci_apply_final_quirks()` taking half a second

2017-12-31 Thread Alan Stern
On Sun, 31 Dec 2017, Paul Menzel wrote: > Am 29.12.2017 um 17:14 schrieb Alan Stern: > > On Thu, 28 Dec 2017, Bjorn Helgaas wrote: > > > >> On Tue, Dec 26, 2017 at 04:55:20PM +0100, Paul Menzel wrote: > >>> Am 08.04.2017 um 17:41 schrieb Bjorn Helgaas: > On Fri, Apr 07, 2017 at 11:07:15PM +0

[PATCH] smsc95xx: Delete an error message for a failed memory allocation in smsc95xx_suspend()

2017-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 31 Dec 2017 22:06:49 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/usb/smsc95xx.c | 1 - 1 file changed, 1 deletion(-) diff

Re: [PATCH] usb: quirks: Add reset-resume quirk for QCA6174 Rome Bluetooth

2017-12-31 Thread Marcel Holtmann
Hi Leif, > This is a rework of reverted commit fd865802c66bc451dc515ed89360f84376ce1a56 > The issue is that some QCA Rome bluetooth controllers stop functioning upon > resume from suspend. > These devices seem to be losing power during suspend. This patch will enable > reset_resume in usb core (i

Re: [PATCH v3 00/49] usb: dwc2: fixes, enhancements and new features

2017-12-31 Thread Stefan Wahren
Hi Grigor, sorry for misusing the cover letter for my comments, but i didn't received all patches. > Grigor Tovmasyan hat am 26. Dezember 2017 um > 12:21 geschrieben: > > > ... > > Gevorg Sahakyan (1): > usb: dwc2: Remove version check in GSNPSID > > Grigor Tovmasyan (4): > usb: dwc2:

[PATCH] usb: quirks: Add reset-resume quirk for QCA6174 Rome Bluetooth

2017-12-31 Thread Leif Liddy
This is a rework of reverted commit fd865802c66bc451dc515ed89360f84376ce1a56 The issue is that some QCA Rome bluetooth controllers stop functioning upon resume from suspend. These devices seem to be losing power during suspend. This patch will enable reset_resume in usb core (instead of btusb) and

[GIT PULL] USB/PHY driver fixes for 4.15-rc6

2017-12-31 Thread Greg KH
The following changes since commit 1291a0d5049dbc06baaaf66a9ff3f53db493b19b: Linux 4.15-rc4 (2017-12-17 18:59:59 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.15-rc6 for you to fetch changes up to da99706689481717998