From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Rick Tseng <rtseng@nvidia.com>,
mathias.nyman@intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, Rick <rtseng@nvidia.com>
Subject: Re: [PATCH] xhci: wait CNR when doing xhci resume
Date: Mon, 12 Aug 2019 11:12:01 +0300 [thread overview]
Message-ID: <87mugeu7ji.fsf@gmail.com> (raw)
In-Reply-To: <1565594692-23683-1-git-send-email-rtseng@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
Hi,
Rick Tseng <rtseng@nvidia.com> writes:
> +static int xhci_poll_cnr(struct usb_hcd *hcd)
> +{
> + struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> + void __iomem *reg = &xhci->op_regs->status;
> + u32 result;
> + int ret;
> +
> + ret = readl_poll_timeout_atomic(reg, result,
> + (result & STS_CNR) == 0,
> + 1, 100 * 1000);
> + return ret;
> +}
> +
instead of defining your own function...
> static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
> {
> struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> @@ -508,6 +522,12 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
> if (pdev->vendor == PCI_VENDOR_ID_INTEL)
> usb_enable_intel_xhci_ports(pdev);
>
> + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) {
> + retval = xhci_poll_cnr(hcd);
you could just use xhci_handshake() here, right?
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-08-12 8:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 7:24 [PATCH] xhci: wait CNR when doing xhci resume Rick Tseng
2019-08-12 8:12 ` Felipe Balbi [this message]
2019-08-12 8:19 ` Oliver Neukum
2019-08-13 10:39 ` Mathias Nyman
2019-08-13 12:33 ` Rick Tseng
2019-08-13 12:36 ` Felipe Balbi
2019-08-13 13:12 ` Mathias Nyman
2019-08-12 13:39 ` Greg KH
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=87mugeu7ji.fsf@gmail.com \
--to=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=rtseng@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.