All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can: flexcan: bump FLEXCAN_TIMEOUT_US to 250
@ 2019-03-07 15:00 Rasmus Villemoes
  2019-03-18  7:40 ` Rasmus Villemoes
  2019-03-20 13:18 ` Marc Kleine-Budde
  0 siblings, 2 replies; 8+ messages in thread
From: Rasmus Villemoes @ 2019-03-07 15:00 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller
  Cc: Thomas Winding, Fabio Estevam, Per Christensen, Rasmus Villemoes,
	linux-can, netdev, linux-kernel

While trying to add support for the Flexcan modules on the MPC8309,
I'm hitting ETIMEDOUT in flexcan_chip_disable(). With this, probing
succeeds. Checking the leftover value of timeout with a primitive

  pr_err("%s: timeout==%d\n", __func__, timeout);

after the loop in chip_disable() typically shows values around 12-14,
i.e. suggesting that it takes about 110-130 us for the LPM_ACK bit to
appear. So a timeout value of about twice that seems reasonable.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/net/can/flexcan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 75ce11395ee8..5f32053f78de 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -165,7 +165,7 @@
 #define FLEXCAN_MB_CNT_LENGTH(x)	(((x) & 0xf) << 16)
 #define FLEXCAN_MB_CNT_TIMESTAMP(x)	((x) & 0xffff)
 
-#define FLEXCAN_TIMEOUT_US		(50)
+#define FLEXCAN_TIMEOUT_US		(250)
 
 /* FLEXCAN hardware feature flags
  *
-- 
2.20.1

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

end of thread, other threads:[~2019-04-29  8:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 15:00 [PATCH] can: flexcan: bump FLEXCAN_TIMEOUT_US to 250 Rasmus Villemoes
2019-03-18  7:40 ` Rasmus Villemoes
2019-03-20 13:18 ` Marc Kleine-Budde
2019-03-21 14:34   ` Rasmus Villemoes
2019-03-21 15:30     ` Marc Kleine-Budde
2019-03-22  7:45       ` Rasmus Villemoes
2019-03-22  7:51         ` Marc Kleine-Budde
2019-04-29  8:53           ` Rasmus Villemoes

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.