usb: cdns3: Fixed incorrect gadget state
authorPawel Laszczak <pawell@cadence.com>
Wed, 23 Jun 2021 07:02:47 +0000 (09:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:10 +0000 (13:22 +0200)
commit051518d9cfe3b6aa20fa9a8a37bbb01bf5b18453
treee8e590e8cd8ad2b5aacb0659a850957dff6e0767
parent822bec5cbb05846b2a647f20c4acb2dec0e01ff0
usb: cdns3: Fixed incorrect gadget state

commit aa35772f61752d4c636d46be51a4f7ca6c029ee6 upstream.

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: <stable@vger.kernel.org>
Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20210623070247.46151-1-pawell@gli-login.cadence.com
Signed-off-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/ep0.c