All of lore.kernel.org
 help / color / mirror / Atom feed
* usb: xhci: increase CRS timeout value
@ 2018-06-11 12:05 Mathias Nyman
  0 siblings, 0 replies; 3+ messages in thread
From: Mathias Nyman @ 2018-06-11 12:05 UTC (permalink / raw)
  To: Oliver Neukum, Ajay Gupta, linux-usb; +Cc: Nagaraj Annaiah, felipe.balbi

On 11.06.2018 11:50, Oliver Neukum wrote:
> On Do, 2018-06-07 at 11:48 -0700, Ajay Gupta wrote:
>> Some controllers take almost 55ms to complete controller
>> restore state (CRS).
>> There is no timeout limit mentioned in xhci specification so
>> fix the issue by increasing the timeout limit to 55ms
> 
> Hi,
> 
> the chances that you saw the true worst case are slim.
> I would suggest you include at least a bit of a safety margin
> and a comment that explains it.
> 
> 	Regards
> 		Oliver
> 

Agree with this,

polling up to 100ms perhaps?

-Mathias
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* usb: xhci: increase CRS timeout value
@ 2018-06-11  8:50 Oliver Neukum
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2018-06-11  8:50 UTC (permalink / raw)
  To: Ajay Gupta, linux-usb; +Cc: Nagaraj Annaiah, felipe.balbi

On Do, 2018-06-07 at 11:48 -0700, Ajay Gupta wrote:
> Some controllers take almost 55ms to complete controller
> restore state (CRS).
> There is no timeout limit mentioned in xhci specification so
> fix the issue by increasing the timeout limit to 55ms

Hi,

the chances that you saw the true worst case are slim.
I would suggest you include at least a bit of a safety margin
and a comment that explains it.

	Regards
		Oliver
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* usb: xhci: increase CRS timeout value
@ 2018-06-07 18:48 Ajay Gupta
  0 siblings, 0 replies; 3+ messages in thread
From: Ajay Gupta @ 2018-06-07 18:48 UTC (permalink / raw)
  To: linux-usb; +Cc: felipe.balbi, Ajay Gupta, Nagaraj Annaiah

Some controllers take almost 55ms to complete controller
restore state (CRS).
There is no timeout limit mentioned in xhci specification so
fix the issue by increasing the timeout limit to 55ms

Signed-off-by: Ajay Gupta <ajaykuee@gmail.com>
Signed-off-by: Nagaraj Annaiah <naga.annaiah@gmail.com>
---
 drivers/usb/host/xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 8c8da2d..44b1af5 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1044,7 +1044,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 		command |= CMD_CRS;
 		writel(command, &xhci->op_regs->command);
 		if (xhci_handshake(&xhci->op_regs->status,
-			      STS_RESTORE, 0, 10 * 1000)) {
+			      STS_RESTORE, 0, 55 * 1000)) {
 			xhci_warn(xhci, "WARN: xHC restore state timeout\n");
 			spin_unlock_irq(&xhci->lock);
 			return -ETIMEDOUT;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-11 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 12:05 usb: xhci: increase CRS timeout value Mathias Nyman
  -- strict thread matches above, loose matches on Subject: below --
2018-06-11  8:50 Oliver Neukum
2018-06-07 18:48 Ajay Gupta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.