]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
usb: dwc3: gadget: make Set Endpoint Configuration macros safe
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 31 Jan 2017 11:24:54 +0000 (13:24 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 6 Apr 2017 08:23:04 +0000 (09:23 +0100)
commit365ea5df8601f0c318f2148d4c317db599a2491b
treee830064605a4c357857126f7a536421c2255223b
parenta669a4aa251be2ec504acc59b28856fa986b3314
usb: dwc3: gadget: make Set Endpoint Configuration macros safe

BugLink: http://bugs.launchpad.net/bugs/1674292
commit 7369090a9fb57c3fc705ce355d2e4523a5a24716 upstream.

Some gadget drivers are bad, bad boys. We notice
that ADB was passing bad Burst Size which caused top
bits of param0 to be overwritten which confused DWC3
when running this command.

In order to avoid future issues, we're going to make
sure values passed by macros are always safe for the
controller. Note that ADB still needs a fix to *not*
pass bad values.

Reported-by: Mohamed Abbas <mohamed.abbas@intel.com>
Sugested-by: Adam Andruszak <adam.andruszak@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/dwc3/gadget.h