mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Faisal Hassan <quic_faisalh@quicinc.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: core: update LC timer as per USB Spec V3.2
Date: Thu, 29 Aug 2024 00:03:34 +0000	[thread overview]
Message-ID: <20240829000327.wqol2m3fbpc6h3dn@synopsys.com> (raw)
In-Reply-To: <20240822084504.1355-1-quic_faisalh@quicinc.com>

On Thu, Aug 22, 2024, Faisal Hassan wrote:
> This fix addresses STAR 9001285599, which only affects dwc3 core version
> 320a. The timer value for PM_LC_TIMER in 320a for the Link ECN changes

When note for the controller IP and version in comments, use the IP name
and version: DWC_usb3 version 3.20a

"dwc3" is ambiguous.

> is incorrect. If the PM TIMER ECN is enabled via GUCTL2[19], the link
> compliance test (TD7.21) may fail. If the ECN is not enabled
> (GUCTL2[19] = 0), the controller will use the old timer value (5us),
> which is still acceptable for the link compliance test. Therefore, clear
> GUCTL2[19] to pass the USB link compliance test: TD 7.21.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Faisal Hassan <quic_faisalh@quicinc.com>
> ---
>  drivers/usb/dwc3/core.c | 15 +++++++++++++++
>  drivers/usb/dwc3/core.h |  2 ++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 734de2a8bd21..d0bd3a0e1f9c 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1378,6 +1378,21 @@ static int dwc3_core_init(struct dwc3 *dwc)
>  		dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
>  	}
>  
> +	/*
> +	 * STAR 9001285599: This issue affects dwc3 core version 3.20a

Note IP name along with version.
ie. "... affects DWC_usb3 version 3.20a ..."

> +	 * only. If the PM TIMER ECM is enabled through GUCTL2[19], the
> +	 * link compliance test (TD7.21) may fail. If the ECN is not
> +	 * enabled (GUCTL2[19] = 0), the controller will use the old timer
> +	 * value (5us), which is still acceptable for the link compliance
> +	 * test. Therefore, do not enable PM TIMER ECM in 3.20a by
> +	 * setting GUCTL2[19] by default; instead, use GUCTL2[19] = 0.
> +	 */
> +	if (DWC3_VER_IS(DWC3, 320A)) {
> +		reg = dwc3_readl(dwc->regs, DWC3_GUCTL2);
> +		reg &= ~DWC3_GUCTL2_LC_TIMER;
> +		dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
> +	}
> +
>  	/*
>  	 * When configured in HOST mode, after issuing U3/L2 exit controller
>  	 * fails to send proper CRC checksum in CRC5 feild. Because of this
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index 1e561fd8b86e..c71240e8f7c7 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -421,6 +421,7 @@
>  
>  /* Global User Control Register 2 */
>  #define DWC3_GUCTL2_RST_ACTBITLATER		BIT(14)
> +#define DWC3_GUCTL2_LC_TIMER			BIT(19)
>  
>  /* Global User Control Register 3 */
>  #define DWC3_GUCTL3_SPLITDISABLE		BIT(14)
> @@ -1269,6 +1270,7 @@ struct dwc3 {
>  #define DWC3_REVISION_290A	0x5533290a
>  #define DWC3_REVISION_300A	0x5533300a
>  #define DWC3_REVISION_310A	0x5533310a
> +#define DWC3_REVISION_320A	0x5533320a
>  #define DWC3_REVISION_330A	0x5533330a
>  
>  #define DWC31_REVISION_ANY	0x0
> -- 
> 2.17.1
> 

After the minor fix, you can include this:

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

Thanks,
Thinh

      reply	other threads:[~2024-08-29  0:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  8:45 Faisal Hassan
2024-08-29  0:03 ` Thinh Nguyen [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=20240829000327.wqol2m3fbpc6h3dn@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_faisalh@quicinc.com \
    --cc=stable@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

all inboxes | Powered by JetHome®