From: Felipe Balbi <balbi@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: John Youn <John.Youn@synopsys.com>,
"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [RESEND PATCH v2] usb: dwc3: gadget: Do link recovery for SS and SSP
Date: Tue, 31 Mar 2020 11:11:18 +0300 [thread overview]
Message-ID: <87wo710wrd.fsf@kernel.org> (raw)
In-Reply-To: <73b1d4e0-6ce4-7c60-2c08-ec6a6e233304@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]
Hi,
Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> Thinh Nguyen wrote:
>> 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: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
>> Fixes: ee5cd41c9117 ("usb: dwc3: Update speed checks for SuperSpeedPlus")
>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
>> ---
>>
>> Resend note -
>> This was on Felipe's next branch some time ago,
>> but it was lost somehow.
>>
>> Changes in v2 -
>> Added Fixes tags
>>
>> drivers/usb/dwc3/gadget.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>> index a9aba716bf80..3dcdde9080f5 100644
>> --- a/drivers/usb/dwc3/gadget.c
>> +++ b/drivers/usb/dwc3/gadget.c
>> @@ -1712,7 +1712,6 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
>> u32 reg;
>>
>> u8 link_state;
>> - u8 speed;
>>
>> /*
>> * According to the Databook Remote wakeup request should
>> @@ -1722,16 +1721,13 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
>> */
>> reg = dwc3_readl(dwc->regs, DWC3_DSTS);
>>
>> - speed = reg & DWC3_DSTS_CONNECTSPD;
>> - if ((speed == DWC3_DSTS_SUPERSPEED) ||
>> - (speed == DWC3_DSTS_SUPERSPEED_PLUS))
>> - return 0;
>> -
>> link_state = DWC3_DSTS_USBLNKST(reg);
>>
>> switch (link_state) {
>> + case DWC3_LINK_STATE_RESET:
>> case DWC3_LINK_STATE_RX_DET: /* in HS, means Early Suspend */
>> case DWC3_LINK_STATE_U3: /* in HS, means SUSPEND */
>> + case DWC3_LINK_STATE_RESUME:
>> break;
>> default:
>> return -EINVAL;
>
> Maybe this patch was lost somewhere. Let me know if there's any issue
> with this patch.
It's now in my testing/fixes
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2020-03-31 8:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 2:26 [PATCH v2] usb: dwc3: gadget: Do link recovery for SS and SSP Thinh Nguyen
2020-02-01 0:25 ` [RESEND PATCH " Thinh Nguyen
2020-03-31 2:12 ` Thinh Nguyen
2020-03-31 8:11 ` Felipe Balbi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wo710wrd.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=John.Youn@synopsys.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).