All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] driver/net: cosa driver uses udelay incorrectly
@ 2014-04-15  1:53 Li, Zhen-Hua
  2014-04-15  4:09 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Li, Zhen-Hua @ 2014-04-15  1:53 UTC (permalink / raw)
  To: kas, davem, netdev, linux-kernel; +Cc: Li, Zhen-Hua

From: "Li, Zhen-Hua" <zhen-hual@hp.com>

In cosa driver, udelay with more than 20000 may cause __bad_udelay.
Use msleep for instead.

Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
---
 drivers/net/wan/cosa.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 84734a8..83c39e2 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -1521,11 +1521,7 @@ static int cosa_reset_and_read_id(struct cosa_data *cosa, char *idstring)
 	cosa_putstatus(cosa, 0);
 	cosa_getdata8(cosa);
 	cosa_putstatus(cosa, SR_RST);
-#ifdef MODULE
 	msleep(500);
-#else
-	udelay(5*100000);
-#endif
 	/* Disable all IRQs from the card */
 	cosa_putstatus(cosa, 0);
 
-- 
1.7.10.4


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

* Re: [PATCH 1/1] driver/net: cosa driver uses udelay incorrectly
  2014-04-15  1:53 [PATCH 1/1] driver/net: cosa driver uses udelay incorrectly Li, Zhen-Hua
@ 2014-04-15  4:09 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-15  4:09 UTC (permalink / raw)
  To: zhen-hual; +Cc: kas, netdev, linux-kernel

From: "Li, Zhen-Hua" <zhen-hual@hp.com>
Date: Tue, 15 Apr 2014 09:53:11 +0800

> From: "Li, Zhen-Hua" <zhen-hual@hp.com>
> 
> In cosa driver, udelay with more than 20000 may cause __bad_udelay.
> Use msleep for instead.
> 
> Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>

Applied, thank you.

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

end of thread, other threads:[~2014-04-15  4:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  1:53 [PATCH 1/1] driver/net: cosa driver uses udelay incorrectly Li, Zhen-Hua
2014-04-15  4:09 ` David Miller

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.