From: Greg KH <gregkh@linuxfoundation.org>
To: JC Kuo <jckuo@nvidia.com>
Cc: mathias.nyman@linux.intel.com, thierry.reding@gmail.com,
jonathanh@nvidia.com, robh@kernel.org,
linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org,
nkristam@nvidia.com
Subject: Re: [PATCH] xhci: tegra: Delay for disabling LFPS detector
Date: Fri, 18 Dec 2020 17:53:40 +0100 [thread overview]
Message-ID: <X9zelLu26bcQd7bs@kroah.com> (raw)
In-Reply-To: <20201218164234.128762-1-jckuo@nvidia.com>
On Sat, Dec 19, 2020 at 12:42:34AM +0800, JC Kuo wrote:
> Occasionally, we are seeing some SuperSpeed devices resumes right after
> being directed to U3. This commits add 500us delay to ensure LFPS
> detector is disabled before sending ACK to firmware.
>
> [ 16.099363] tegra-xusb 70090000.usb: entering ELPG
> [ 16.104343] tegra-xusb 70090000.usb: 2-1 isn't suspended: 0x0c001203
> [ 16.114576] tegra-xusb 70090000.usb: not all ports suspended: -16
> [ 16.120789] tegra-xusb 70090000.usb: entering ELPG failed
>
> Signed-off-by: JC Kuo <jckuo@nvidia.com>
> ---
> drivers/usb/host/xhci-tegra.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
> index 934be1686352..20cdc11f7dc6 100644
> --- a/drivers/usb/host/xhci-tegra.c
> +++ b/drivers/usb/host/xhci-tegra.c
> @@ -623,6 +623,12 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
> enable);
> if (err < 0)
> break;
> +
> + /*
> + * wait 500us for LFPS detector to be disabled before sending ACK
> + */
> + if (!enable)
> + usleep_range(500, 1000);
Where does the magic 500us come from? How can we "know" this is long
enough?
thanks,
greg k-h
next prev parent reply other threads:[~2020-12-18 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 16:42 [PATCH] xhci: tegra: Delay for disabling LFPS detector JC Kuo
2020-12-18 16:53 ` Greg KH [this message]
2021-01-06 6:05 ` JC Kuo
2021-01-07 9:53 ` Mathias Nyman
2021-01-08 6:32 ` JC Kuo
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=X9zelLu26bcQd7bs@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jckuo@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=nkristam@nvidia.com \
--cc=robh@kernel.org \
--cc=thierry.reding@gmail.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).