Skip to content

Commit d0550cd

Browse files
Thinh Nguyenfelipebalbi
authored andcommitted
usb: dwc3: gadget: Do link recovery for SS and SSP
The controller always supports link recovery for device in SS and SSP. Remove the speed limit check. Also, when the device is in RESUME or RESET state, it means the controller received the resume/reset request. The driver must send the link recovery to acknowledge the request. They are valid states for the driver to send link recovery. Fixes: 72246da ("usb: Introduce DesignWare USB3 DRD Driver") Fixes: ee5cd41 ("usb: dwc3: Update speed checks for SuperSpeedPlus") Signed-off-by: Thinh Nguyen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 68b1add commit d0550cd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/usb/dwc3/gadget.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,6 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
17281728
u32 reg;
17291729

17301730
u8 link_state;
1731-
u8 speed;
17321731

17331732
/*
17341733
* According to the Databook Remote wakeup request should
@@ -1738,16 +1737,13 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
17381737
*/
17391738
reg = dwc3_readl(dwc->regs, DWC3_DSTS);
17401739

1741-
speed = reg & DWC3_DSTS_CONNECTSPD;
1742-
if ((speed == DWC3_DSTS_SUPERSPEED) ||
1743-
(speed == DWC3_DSTS_SUPERSPEED_PLUS))
1744-
return 0;
1745-
17461740
link_state = DWC3_DSTS_USBLNKST(reg);
17471741

17481742
switch (link_state) {
1743+
case DWC3_LINK_STATE_RESET:
17491744
case DWC3_LINK_STATE_RX_DET: /* in HS, means Early Suspend */
17501745
case DWC3_LINK_STATE_U3: /* in HS, means SUSPEND */
1746+
case DWC3_LINK_STATE_RESUME:
17511747
break;
17521748
default:
17531749
return -EINVAL;

0 commit comments

Comments
 (0)