linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: Prike Liang <Prike.Liang@amd.com>, linux-usb@vger.kernel.org
Cc: greg@kroah.com, mathias.nyman@intel.com,
	Alexander.Deucher@amd.com, Ramakanth.Akkenepalli@amd.com,
	Jack.Xie@amd.com
Subject: Re: [PATCH] usb: pci-quirks: disable D3cold on xhci suspend for s2idle
Date: Fri, 5 Feb 2021 17:20:45 +0530	[thread overview]
Message-ID: <5ae0f2ab-3723-7066-015c-42824388f9b9@amd.com> (raw)
In-Reply-To: <1612524764-6496-1-git-send-email-Prike.Liang@amd.com>

This has to be with the patch revision number, i.e. [PATCH v2] , [PATCH v3] etc.

On 2/5/2021 5:02 PM, Prike Liang wrote:
> The XHCI is required enter D3hot rather than D3cold for AMD s2idle solution.
> Otherwise, the 'Controller Not Ready' (CNR) bit not being cleared by host
> in resume and eventually result in xhci resume failed in s2idle wakeup period.
> 
> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> ---
>  drivers/usb/host/xhci-pci.c | 6 +++++-
>  drivers/usb/host/xhci.h     | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 3feaafe..8ecde66 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -170,6 +170,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>  		(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
>  		xhci->quirks |= XHCI_U2_DISABLE_WAKE;
>  
> +	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
> +		pdev->device == 0x1639)
> +		xhci->quirks |= XHCI_AMD_S2IDL_SUPPORT_QUIRK;
> +
>  	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
>  		xhci->quirks |= XHCI_LPM_SUPPORT;
>  		xhci->quirks |= XHCI_INTEL_HOST;
> @@ -500,7 +504,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
>  	 * Systems with the TI redriver that loses port status change events
>  	 * need to have the registers polled during D3, so avoid D3cold.
>  	 */
> -	if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
> +	if (xhci->quirks & (XHCI_COMP_MODE_QUIRK | XHCI_AMD_S2IDL_SUPPORT_QUIRK))
>  		pci_d3cold_disable(pdev);
>  
>  	if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index ea1754f..fafa044 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1874,6 +1874,7 @@ struct xhci_hcd {
>  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
>  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
>  #define XHCI_RENESAS_FW_QUIRK	BIT_ULL(36)
> +#define XHCI_AMD_S2IDL_SUPPORT_QUIRK   BIT_ULL(37)

Why don't we keep it the fullname i.e. XHCI_AMD_S2IDLE_SUPPORT_QUIRK
instead of XHCI_AMD_S2IDL_SUPPORT_QUIRK, likewise at all places?

-Shyam

  reply	other threads:[~2021-02-05 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 11:32 [PATCH] usb: pci-quirks: disable D3cold on xhci suspend for s2idle Prike Liang
2021-02-05 11:50 ` Shyam Sundar S K [this message]
2021-02-05 12:04   ` Liang, Prike

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=5ae0f2ab-3723-7066-015c-42824388f9b9@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Jack.Xie@amd.com \
    --cc=Prike.Liang@amd.com \
    --cc=Ramakanth.Akkenepalli@amd.com \
    --cc=greg@kroah.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /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).