[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191018172843.GA27290@amd>
Date: Fri, 18 Oct 2019 19:28:43 +0200
From: Pavel Machek <pavel@...x.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Rick Tseng <rtseng@...dia.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>
Subject: Re: [PATCH 4.19 12/81] usb: xhci: wait for CNR controller not ready
bit in xhci resume
Hi!
> From: Rick Tseng <rtseng@...dia.com>
>
> commit a70bcbc322837eda1ab5994d12db941dc9733a7d upstream.
>
> NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold.
> Thus we need to wait for CNR bit to clear in xhci resume, just as in
> xhci init.
...
> @@ -1098,6 +1098,18 @@ int xhci_resume(struct xhci_hcd *xhci, b
> hibernated = true;
>
> if (!hibernated) {
> + /*
> + * Some controllers might lose power during suspend, so wait
> + * for controller not ready bit to clear, just as in xHC init.
> + */
> + retval = xhci_handshake(&xhci->op_regs->status,
> + STS_CNR, 0, 10 * 1000 * 1000);
> + if (retval) {
> + xhci_warn(xhci, "Controller not ready at resume %d\n",
> + retval);
> + spin_unlock_irq(&xhci->lock);
> + return retval;
> + }
AFAICT if this error happens, xhci will be unusable. So maybe print
should be at higher level that warning... that's clearly an error.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists