Netdev List
 help / color / mirror / Atom feed
* [PATCH] bfin_mac: Make the MDIO polling faster
@ 2008-01-29 12:28 Kalle Pokki
  2008-01-29 17:47 ` Bryan Wu
  0 siblings, 1 reply; 2+ messages in thread
From: Kalle Pokki @ 2008-01-29 12:28 UTC (permalink / raw)
  To: netdev, Bryan Wu

The poll routine always got 10 ms penalty when called immediately
after starting the transfer. The MDIO transfer takes 25.6 us at the
nominal 2.5 MHz, so MAX_TIMEOUT_CNT being 500 is still big enough.
---
 drivers/net/bfin_mac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c199633..d2e6813 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -296,7 +296,7 @@ static void mdio_poll(void)
 
 	/* poll the STABUSY bit */
 	while ((bfin_read_EMAC_STAADD()) & STABUSY) {
-		mdelay(10);
+		udelay(1);
 		if (timeout_cnt-- < 0) {
 			printk(KERN_ERR DRV_NAME
 			": wait MDC/MDIO transaction to complete timeout\n");
-- 
1.4.4.2


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

* Re: [PATCH] bfin_mac: Make the MDIO polling faster
  2008-01-29 12:28 [PATCH] bfin_mac: Make the MDIO polling faster Kalle Pokki
@ 2008-01-29 17:47 ` Bryan Wu
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Wu @ 2008-01-29 17:47 UTC (permalink / raw)
  To: Kalle Pokki; +Cc: netdev, Bryan Wu


On Tue, 2008-01-29 at 20:28 +0800, Kalle Pokki wrote:
> The poll routine always got 10 ms penalty when called immediately 
> after starting the transfer. The MDIO transfer takes 25.6 us at the 
> noinal 2.5 MHz, so MAX_TIMEOUT_CNT being 500 is still big enough. 

Exactly, but we got a same fixing already.
It will be sent out soon.

Thanks a lot
-Bryan

> --- 
>  drivers/net/bfin_mac.c |    2 +- 
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c 
> index c199633..d2e6813 100644 
> --- a/drivers/net/bfin_mac.c 
> +++ b/drivers/net/bfin_mac.c 
> @@ -296,7 +296,7 @@ static void mdio_poll(void) 
>   
>         /* poll the STABUSY bit */ 
>         while ((bfin_read_EMAC_STAADD()) & STABUSY) { 
> -               mdelay(10); 
> +               udelay(1); 
>                 if (timeout_cnt-- < 0) { 
>                         printk(KERN_ERR DRV_NAME 
>                         ": wait MDC/MDIO transaction to complete
> timeout\n"); 
> -- 
> 1.4.4.2
> 

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

end of thread, other threads:[~2008-01-29 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 12:28 [PATCH] bfin_mac: Make the MDIO polling faster Kalle Pokki
2008-01-29 17:47 ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox