Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Rick Tseng <rtseng@nvidia.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>,
	Oliver Neukum <oneukum@suse.com>,
	"mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: [PATCH] xhci: wait CNR when doing xhci resume
Date: Tue, 13 Aug 2019 12:33:43 +0000
Message-ID: <MN2PR12MB3215AA4B411231FC2D67E81FB1D20@MN2PR12MB3215.namprd12.prod.outlook.com> (raw)
In-Reply-To: <47f0e5d6-145c-4542-362f-dbb4cccb514d@linux.intel.com>

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 own function to check CNR.

Thanks,
Rick

--
nvpublic

  
寄件者: Mathias Nyman <mathias.nyman@linux.intel.com>
 寄件日期: 2019年8月13日 上午 03:39
 收件者: Oliver Neukum <oneukum@suse.com>; Rick Tseng <rtseng@nvidia.com>; mathias.nyman@intel.com <mathias.nyman@intel.com>; gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
 副本: linux-usb@vger.kernel.org <linux-usb@vger.kernel.org>
 主旨: Re: [PATCH] xhci: wait CNR when doing xhci resume 
   
 
On 12.8.2019 11.19, Oliver Neukum wrote:
 > Am Montag, den 12.08.2019, 15:24 +0800 schrieb Rick Tseng:
 >> From: Rick <rtseng@nvidia.com>
 >>
 >> 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?
 > 
 
 Good point, always checking CNR in resume sounds like a good idea.
 
 And use xhci_handshake() as Felipe pointed out, just like in xhci_reset():
 
 ret = xhci_handshake(&xhci->op_regs->status, STS_CNR, 0, 10 * 1000 * 1000);
 
 Rick, would you like to write a patch for this?
 
 -Mathias
 
 
     

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12  7:24 Rick Tseng
2019-08-12  8:12 ` Felipe Balbi
2019-08-12  8:19 ` Oliver Neukum
2019-08-13 10:39   ` Mathias Nyman
2019-08-13 12:33     ` Rick Tseng [this message]
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 publically 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=MN2PR12MB3215AA4B411231FC2D67E81FB1D20@MN2PR12MB3215.namprd12.prod.outlook.com \
    --to=rtseng@nvidia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=oneukum@suse.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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox