All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tulip: Poll link status more frequently for Comet chips
@ 2014-06-21 20:29 Ondrej Zary
  2014-06-21 22:59 ` Grant Grundler
  0 siblings, 1 reply; 5+ messages in thread
From: Ondrej Zary @ 2014-06-21 20:29 UTC (permalink / raw)
  To: Grant Grundler; +Cc: netdev, linux-kernel

Poll link status every 2 seconds instead of 60 for ADMtek Comet chips.
Tested with AN983B.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 drivers/net/ethernet/dec/tulip/timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/timer.c b/drivers/net/ethernet/dec/tulip/timer.c
index 768379b..523d9dd 100644
--- a/drivers/net/ethernet/dec/tulip/timer.c
+++ b/drivers/net/ethernet/dec/tulip/timer.c
@@ -158,7 +158,7 @@ void comet_timer(unsigned long data)
 {
 	struct net_device *dev = (struct net_device *)data;
 	struct tulip_private *tp = netdev_priv(dev);
-	int next_tick = 60*HZ;
+	int next_tick = 2*HZ;
 
 	if (tulip_debug > 1)
 		netdev_dbg(dev, "Comet link status %04x partner capability %04x\n",
-- 
Ondrej Zary


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

* Re: [PATCH] tulip: Poll link status more frequently for Comet chips
  2014-06-21 20:29 [PATCH] tulip: Poll link status more frequently for Comet chips Ondrej Zary
@ 2014-06-21 22:59 ` Grant Grundler
  2014-06-22  2:22   ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Grundler @ 2014-06-21 22:59 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: Grant Grundler, open list:TULIP NETWORK DRI..., open list

Hi Ondrej,

On Sat, Jun 21, 2014 at 1:29 PM, Ondrej Zary <linux@rainbow-software.org> wrote:
> Poll link status every 2 seconds instead of 60 for ADMtek Comet chips.

Why use 2 seconds for the polling interval?

I'm sure you have a good reason for this and it should be in the
commit message or as a comment in the code.

I otherwise have no objection to this change.

thanks,
grant

> Tested with AN983B.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> ---
>  drivers/net/ethernet/dec/tulip/timer.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/dec/tulip/timer.c b/drivers/net/ethernet/dec/tulip/timer.c
> index 768379b..523d9dd 100644
> --- a/drivers/net/ethernet/dec/tulip/timer.c
> +++ b/drivers/net/ethernet/dec/tulip/timer.c
> @@ -158,7 +158,7 @@ void comet_timer(unsigned long data)
>  {
>         struct net_device *dev = (struct net_device *)data;
>         struct tulip_private *tp = netdev_priv(dev);
> -       int next_tick = 60*HZ;
> +       int next_tick = 2*HZ;
>
>         if (tulip_debug > 1)
>                 netdev_dbg(dev, "Comet link status %04x partner capability %04x\n",
> --
> Ondrej Zary

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

* Re: [PATCH] tulip: Poll link status more frequently for Comet chips
  2014-06-21 22:59 ` Grant Grundler
@ 2014-06-22  2:22   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-06-22  2:22 UTC (permalink / raw)
  To: grantgrundler; +Cc: linux, grundler, netdev, linux-kernel

From: Grant Grundler <grantgrundler@gmail.com>
Date: Sat, 21 Jun 2014 15:59:30 -0700

> Hi Ondrej,
> 
> On Sat, Jun 21, 2014 at 1:29 PM, Ondrej Zary <linux@rainbow-software.org> wrote:
>> Poll link status every 2 seconds instead of 60 for ADMtek Comet chips.
> 
> Why use 2 seconds for the polling interval?
> 
> I'm sure you have a good reason for this and it should be in the
> commit message or as a comment in the code.
> 
> I otherwise have no objection to this change.

Agreed, please post this with a better commit message, specifically
make sure you explain why the interval is being changed and why
2*HZ is specifically being choosen.

Thanks.

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

* Re: [PATCH] tulip: Poll link status more frequently for Comet chips
  2014-06-22 10:01 Ondrej Zary
@ 2014-06-23  0:13 ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-06-23  0:13 UTC (permalink / raw)
  To: linux; +Cc: grundler, netdev, linux-kernel

From: Ondrej Zary <linux@rainbow-software.org>
Date: Sun, 22 Jun 2014 12:01:12 +0200

> It now takes up to 60 seconds to detect cable (un)plug on ADMtek Comet chips.
> That's too slow and might cause people to think that it doesn't work at all.
> 
> Poll link status every 2 seconds instead of 60 for ADMtek Comet chips.
> That should be fast enough while not stressing the system too much.
> 
> Tested with ADMtek AN983B.
> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

Looks good, and this is consistent with tulip_media_timer().

Applied, thanks.

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

* [PATCH] tulip: Poll link status more frequently for Comet chips
@ 2014-06-22 10:01 Ondrej Zary
  2014-06-23  0:13 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ondrej Zary @ 2014-06-22 10:01 UTC (permalink / raw)
  To: Grant Grundler; +Cc: netdev, linux-kernel

It now takes up to 60 seconds to detect cable (un)plug on ADMtek Comet chips.
That's too slow and might cause people to think that it doesn't work at all.

Poll link status every 2 seconds instead of 60 for ADMtek Comet chips.
That should be fast enough while not stressing the system too much.

Tested with ADMtek AN983B.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 drivers/net/ethernet/dec/tulip/timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/dec/tulip/timer.c b/drivers/net/ethernet/dec/tulip/timer.c
index 768379b..523d9dd 100644
--- a/drivers/net/ethernet/dec/tulip/timer.c
+++ b/drivers/net/ethernet/dec/tulip/timer.c
@@ -158,7 +158,7 @@ void comet_timer(unsigned long data)
 {
 	struct net_device *dev = (struct net_device *)data;
 	struct tulip_private *tp = netdev_priv(dev);
-	int next_tick = 60*HZ;
+	int next_tick = 2*HZ;
 
 	if (tulip_debug > 1)
 		netdev_dbg(dev, "Comet link status %04x partner capability %04x\n",
-- 
Ondrej Zary


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

end of thread, other threads:[~2014-06-23  0:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 20:29 [PATCH] tulip: Poll link status more frequently for Comet chips Ondrej Zary
2014-06-21 22:59 ` Grant Grundler
2014-06-22  2:22   ` David Miller
2014-06-22 10:01 Ondrej Zary
2014-06-23  0:13 ` 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.