* [2/2] usb: xhci: fix timeout for transition from RExit to U0
@ 2018-10-21 17:08 Aaron Ma
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Ma @ 2018-10-21 17:08 UTC (permalink / raw)
To: aaron.ma, mathias.nyman, gregkh, linux-usb, linux-kernel
This definition is used by msecs_to_jiffies in milliseconds.
According to the comments, max rexit timeout should be 20ms.
Align with the comments to properly calculate the delay.
Verified on Sunrise Point-LP and Cannon Lake.
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
drivers/usb/host/xhci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 6230a578324c..30225c53be1c 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1678,7 +1678,7 @@ struct xhci_bus_state {
* It can take up to 20 ms to transition from RExit to U0 on the
* Intel Lynx Point LP xHCI host.
*/
-#define XHCI_MAX_REXIT_TIMEOUT (20 * 1000)
+#define XHCI_MAX_REXIT_TIMEOUT 20
static inline unsigned int hcd_index(struct usb_hcd *hcd)
{
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [2/2] usb: xhci: fix timeout for transition from RExit to U0
@ 2018-10-21 18:21 Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2018-10-21 18:21 UTC (permalink / raw)
To: Aaron Ma; +Cc: mathias.nyman, linux-usb, linux-kernel
On Mon, Oct 22, 2018 at 01:08:45AM +0800, Aaron Ma wrote:
> This definition is used by msecs_to_jiffies in milliseconds.
> According to the comments, max rexit timeout should be 20ms.
> Align with the comments to properly calculate the delay.
>
> Verified on Sunrise Point-LP and Cannon Lake.
>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/usb/host/xhci.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index 6230a578324c..30225c53be1c 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -1678,7 +1678,7 @@ struct xhci_bus_state {
> * It can take up to 20 ms to transition from RExit to U0 on the
> * Intel Lynx Point LP xHCI host.
> */
> -#define XHCI_MAX_REXIT_TIMEOUT (20 * 1000)
> +#define XHCI_MAX_REXIT_TIMEOUT 20
Can we put the units in the #define itself so that this will be more
obvious in the future? Like XHCI_MAX_REXIT_TIMEOUT_MS?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [2/2] usb: xhci: fix timeout for transition from RExit to U0
@ 2018-10-22 3:37 Aaron Ma
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Ma @ 2018-10-22 3:37 UTC (permalink / raw)
To: Greg KH, mathias.nyman; +Cc: linux-usb, linux-kernel
On 10/22/18 2:21 AM, Greg KH wrote:
> Can we put the units in the #define itself so that this will be more
> obvious in the future? Like XHCI_MAX_REXIT_TIMEOUT_MS?
If no other concerns about these 2 patches,
I will send V2 of 2nd patch to follow your advice.
Thanks,
Aaron
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-22 3:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-22 3:37 [2/2] usb: xhci: fix timeout for transition from RExit to U0 Aaron Ma
-- strict thread matches above, loose matches on Subject: below --
2018-10-21 18:21 Greg Kroah-Hartman
2018-10-21 17:08 Aaron Ma
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).