summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdnsp-gadget.h
diff options
context:
space:
mode:
authorPawel Laszczak <pawell@cadence.com>2021-04-07 08:36:29 +0200
committerPeter Chen <peter.chen@kernel.org>2021-04-12 20:19:23 +0800
commit10076de33b5ed5b1e049593a611d2fd9eba60565 (patch)
tree7c2aa695c1a714f4a3b1ebd8a81d1c7a6232e396 /drivers/usb/cdns3/cdnsp-gadget.h
parent9ecc3eb03c37b54c507ba5127a4c781d36b0c121 (diff)
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>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-gadget.h')
-rw-r--r--drivers/usb/cdns3/cdnsp-gadget.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdnsp-gadget.h b/drivers/usb/cdns3/cdnsp-gadget.h
index 6bbb26548c04..783ca8ffde00 100644
--- a/drivers/usb/cdns3/cdnsp-gadget.h
+++ b/drivers/usb/cdns3/cdnsp-gadget.h
@@ -835,6 +835,7 @@ struct cdnsp_ep {
#define EP_WEDGE BIT(4)
#define EP0_HALTED_STATUS BIT(5)
#define EP_HAS_STREAMS BIT(6)
+#define EP_UNCONFIGURED BIT(7)
bool skip;
};