]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
usb: gadget: Fix OS descriptors support
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 27 Jun 2018 02:33:56 +0000 (12:33 +1000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 17 Jul 2018 07:12:51 +0000 (10:12 +0300)
commit50b9773c13bffbef32060e67c4483ea7b2eca7b5
treed1fed8535c3c4a8c981da6dc66c8928230628c42
parent9196b55e1270da125d5f126c1b91f1843e552f17
usb: gadget: Fix OS descriptors support

The current code is broken as it re-defines "req" inside the
if block, then goto out of it. Thus the request that ends
up being sent is not the one that was populated by the
code in question.

This fixes RNDIS driver autodetect by Windows 10 for me.

The bug was introduced by Chris rework to remove the local
queuing inside the if { } block of the redefined request.

Fixes: 636ba13aec8a ("usb: gadget: composite: remove duplicated code in OS desc handling")
Cc: <stable@vger.kernel.org> # v4.17
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/composite.c