From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-usb@vger.kernel.org
Cc: Guido Kiener <guido@kiener-muenchen.de>,
Felipe Balbi <balbi@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>
Subject: [PATCH 2/2] usb: gadget: net2280: Add workaround for AB chip Errata 11
Date: Fri, 23 Aug 2019 13:15:50 +1000 [thread overview]
Message-ID: <28ccd8ca12c3310b86c0b84b73c1b607c1e00ebe.camel@kernel.crashing.org> (raw)
The errata description is:
Workaround for Default Duration of LFPS Handshake Signaling for
Device-Initiated U1 Exit is too short.
The default duration of the LFPS handshake generated by USB3380 for a device-initiated U1-exit may not be
long enough for certain SuperSpeed downstream ports (SuperSpeed hubs/hosts) to recognize. This could lead
to USB3380 entering the recovery state pre-maturely and ending up in the SS.Inactive state.
I have observed various enumeration failures, seemingly related to
lost transactions or SETUP status phases on modern hosts (typically
thunderbolt capable systems) without this workaround.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/usb/gadget/udc/net2280.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index e0191146ba22..51efee21915f 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -2269,6 +2269,16 @@ static void usb_reinit_338x(struct net2280 *dev)
val |= 0x3 << HOT_RX_RESET_TS2;
writel(val, &dev->llregs->ll_tsn_counters_3);
+ /*
+ * AB errata. Errata 11. Workaround for Default Duration of LFPS
+ * Handshake Signaling for Device-Initiated U1 Exit is too short.
+ * Without this, various enumeration failures observed with
+ * modern superspeed hosts.
+ */
+ val = readl(&dev->llregs->ll_lfps_timers_2);
+ writel((val & 0xffff0000) | LFPS_TIMERS_2_WORKAROUND_VALUE,
+ &dev->llregs->ll_lfps_timers_2);
+
/*
* Set Recovery Idle to Recover bit:
* - On SS connections, setting Recovery Idle to Recover Fmw improves
next reply other threads:[~2019-08-23 3:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 3:15 Benjamin Herrenschmidt [this message]
2019-08-27 11:21 ` [PATCH 2/2] usb: gadget: net2280: Add workaround for AB chip Errata 11 guido
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=28ccd8ca12c3310b86c0b84b73c1b607c1e00ebe.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=balbi@kernel.org \
--cc=guido@kiener-muenchen.de \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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).