]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/usb/dwc3/gadget.c
usb: dwc3: gadget: properly check ep cmd
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 22 Sep 2016 09:25:28 +0000 (12:25 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 31 Oct 2016 09:15:34 +0000 (11:15 +0200)
commit5999914f227b20addf01297b3df24be6b4161f69
treeaec10869581a784f575a6e6c15228b90d4e3a54a
parent6b9018d4c1e5c958625be94a160a5984351d4632
usb: dwc3: gadget: properly check ep cmd

The cmd argument we pass to
dwc3_send_gadget_ep_cmd() could contain extra
arguments embedded. When checking for StartTransfer
command, we need to make sure to match only lower 4
bits which contain the actual command and ignore the
rest.

Reported-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c