]> 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)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 6 Mar 2017 08:09:37 +0000 (10:09 +0200)
commit7369090a9fb57c3fc705ce355d2e4523a5a24716
tree301da658eb46f0980d57a4718f31a56e498613c2
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201
usb: dwc3: gadget: make Set Endpoint Configuration macros safe

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.

Cc: <stable@vger.kernel.org> # v3.2+
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>
drivers/usb/dwc3/gadget.h