]> git.samba.org - sfrench/cifs-2.6.git/commit
usb: cdnsp: Fixes issue with Configure Endpoint command
authorPawel Laszczak <pawell@cadence.com>
Wed, 7 Apr 2021 06:36:29 +0000 (08:36 +0200)
committerPeter Chen <peter.chen@kernel.org>
Mon, 12 Apr 2021 12:19:23 +0000 (20:19 +0800)
commit10076de33b5ed5b1e049593a611d2fd9eba60565
tree7c2aa695c1a714f4a3b1ebd8a81d1c7a6232e396
parent9ecc3eb03c37b54c507ba5127a4c781d36b0c121
usb: cdnsp: Fixes issue with Configure Endpoint command

Patch adds flag EP_UNCONFIGURED to detect whether endpoint was
unconfigured. This flag is set in cdnsp_reset_device after Reset Device
command. Among others this command disables all non control endpoints.
Flag is used in cdnsp_gadget_ep_disable to protect controller against
invoking Configure Endpoint command on disabled endpoint. Lack of this
protection in some cases caused that Configure Endpoint command completed
with Context State Error code completion.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
drivers/usb/cdns3/cdnsp-gadget.c
drivers/usb/cdns3/cdnsp-gadget.h