Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-13 Thread Mathias Nyman
Hi, Rick Tseng writes: Hi Mathias, Thanks for suggestion. The reason I do not use xhci_handshake() is we get build fail when configuring below as module: USB_XHCI_HCD = m USB_XHCI_PCI = m Fail message as below: ERROR: "xhci_handshake" [drivers/usb/host/xhci-pci.ko] undefined! So I write my

RE: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-13 Thread Felipe Balbi
(no top-posting, please) Hi, Rick Tseng writes: > Hi Mathias, > > Thanks for suggestion. > The reason I do not use xhci_handshake() is we get build fail when > configuring below as module: > USB_XHCI_HCD = m > USB_XHCI_PCI = m > > Fail message as below: > ERROR: "xhci_handshake" [drivers/usb

RE: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-13 Thread Rick Tseng
check CNR. Thanks, Rick -- nvpublic 寄件者: Mathias Nyman 寄件日期: 2019年8月13日 上午 03:39 收件者: Oliver Neukum ; Rick Tseng ; mathias.ny...@intel.com ; gre...@linuxfoundation.org 副本: linux-usb@vger.kernel.org 主旨: Re: [PATCH] xhci: wait CNR when doing xhci resume   On 12.8.2019 11.19, Oli

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-13 Thread Mathias Nyman
On 12.8.2019 11.19, Oliver Neukum wrote: Am Montag, den 12.08.2019, 15:24 +0800 schrieb Rick Tseng: From: Rick NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. Thus we need to wait CNR bit to clear when xhci resmue as xhci init. Should any controller have CNR set? W

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Greg KH
On Mon, Aug 12, 2019 at 03:24:52PM +0800, Rick Tseng wrote: > From: Rick > > NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. > Thus we need to wait CNR bit to clear when xhci resmue as xhci init. > > Signed-off-by: Rick We need a "full" name on the from and signed-of

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Oliver Neukum
Am Montag, den 12.08.2019, 15:24 +0800 schrieb Rick Tseng: > From: Rick > > NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. > Thus we need to wait CNR bit to clear when xhci resmue as xhci init. Should any controller have CNR set? Why is this specific to a vendor?

Re: [PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Felipe Balbi
Hi, Rick Tseng 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, > +

[PATCH] xhci: wait CNR when doing xhci resume

2019-08-12 Thread Rick Tseng
From: Rick NVIDIA 3.1 xHCI card would lose power when moving power state into D3Cold. Thus we need to wait CNR bit to clear when xhci resmue as xhci init. Signed-off-by: Rick --- drivers/usb/host/xhci-pci.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/h