]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:26 +0000 (14:20 +0100)
commite6342a2b35fd6605b4f44128d52087fbf6075299
tree7601e4873643725e92fb704afbeb68b9d454a1bb
parent65373f7ece1e548af439de34c1a6b26d724adb27
usb: gadget: Fix OS descriptors support

BugLink: http://bugs.launchpad.net/bugs/1814813
commit 50b9773c13bffbef32060e67c4483ea7b2eca7b5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/gadget/composite.c