From 8169bd919146f468942f40c3e708f9ada74a30a4 Mon Sep 17 00:00:00 2001 From: Eugene Surovegin Date: Thu, 24 Nov 2005 14:48:40 -0800 Subject: [PATCH] ibm_emac: fix graceful stop timeout handling This patch fixes graceful stop timeout handling in PPC4xx EMAC driver. Currently, when we stop TX/RX channels we just do some number of loops without relying on actual spent time. This has finally bitten me on one of our systems (heavy network traffic during start up, RX channel is stopped several times to configure multicast list). Graceful channel stop can take up to 1 frame time, so I've added device specific timeout counter which depends on current link speed and calls to udelay() to really wait required amount of time before giving up. Signed-off-by: Eugene Surovegin Signed-off-by: Jeff Garzik --- drivers/net/ibm_emac/ibm_emac_core.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/ibm_emac/ibm_emac_core.h') diff --git a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h index e9b44d030ac..911abbaf471 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.h +++ b/drivers/net/ibm_emac/ibm_emac_core.h @@ -189,6 +189,8 @@ struct ocp_enet_private { struct timer_list link_timer; int reset_failed; + int stop_timeout; /* in us */ + struct ibm_emac_error_stats estats; struct net_device_stats nstats; -- cgit v1.2.3