aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Laszczak <[email protected]>2021-06-23 09:02:47 +0200
committerPeter Chen <[email protected]>2021-07-29 14:13:02 +0800
commitaa35772f61752d4c636d46be51a4f7ca6c029ee6 (patch)
tree1070baa3a24cd66edbf75552902c49db5208b627
parentff1176468d368232b684f75e82563369208bc371 (diff)
usb: cdns3: Fixed incorrect gadget state
For delayed status phase, the usb_gadget->state was set to USB_STATE_ADDRESS and it has never been updated to USB_STATE_CONFIGURED. Patch updates the gadget state to correct USB_STATE_CONFIGURED. As a result of this bug the controller was not able to enter to Test Mode while using MSC function. Cc: <[email protected]> Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Pawel Laszczak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Peter Chen <[email protected]>
-rw-r--r--drivers/usb/cdns3/cdns3-ep0.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdns3-ep0.c b/drivers/usb/cdns3/cdns3-ep0.c
index 02ec7ab4bb48..e29989d57bef 100644
--- a/drivers/usb/cdns3/cdns3-ep0.c
+++ b/drivers/usb/cdns3/cdns3-ep0.c
@@ -731,6 +731,7 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep,
request->actual = 0;
priv_dev->status_completion_no_call = true;
priv_dev->pending_status_request = request;
+ usb_gadget_set_state(&priv_dev->gadget, USB_STATE_CONFIGURED);
spin_unlock_irqrestore(&priv_dev->lock, flags);
/*