[PATCH] drivers/net/tlan.c remaining HZ assumptions

From: Artur Skawina (skawina@geocities.com)
Date: Thu Jan 13 2000 - 15:55:47 EST


while 2.3.39 has some fixes, it also introduces a new problem
("50/(1000/HZ)" isn't exactly ideal), plus a few other changes.

diff -urNp /img/linux-2.3.40pre1/drivers/net/tlan.c linux-2.3.40pre1as/drivers/net/tlan.c
--- /img/linux-2.3.40pre1/drivers/net/tlan.c Thu Jan 13 18:11:18 2000
+++ linux-2.3.40pre1as/drivers/net/tlan.c Thu Jan 13 18:55:09 2000
@@ -2042,7 +2042,7 @@ TLan_FinishReset( struct net_device *dev
                 outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD );
         } else {
                 printk( "TLAN: %s: Link inactive, will retry in 10 secs...\n", dev->name );
- TLan_SetTimer( dev, 1000, TLAN_TIMER_FINISH_RESET );
+ TLan_SetTimer( dev, 10*HZ, TLAN_TIMER_FINISH_RESET );
                 return;
         }
 
@@ -2228,7 +2228,7 @@ void TLan_PhyPowerDown( struct net_devic
          * This is abitrary. It is intended to make sure the
          * tranceiver settles.
          */
- TLan_SetTimer( dev, (50/(1000/HZ)), TLAN_TIMER_PHY_PUP );
+ TLan_SetTimer( dev, HZ/20, TLAN_TIMER_PHY_PUP );
 
 } /* TLan_PhyPowerDown */
 
@@ -2334,7 +2334,7 @@ void TLan_PhyStartLink( struct net_devic
                 priv->phyNum = 0;
                 data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN;
                 TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data );
- TLan_SetTimer( dev, 4, TLAN_TIMER_PHY_PDOWN );
+ TLan_SetTimer( dev, 4*HZ/100, TLAN_TIMER_PHY_PDOWN );
                 return;
         } else if ( priv->phyNum == 0 ) {
                 TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tctl );
@@ -2401,7 +2401,7 @@ void TLan_PhyFinishAutoNeg( struct net_d
                 priv->phyNum = 0;
                 data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN;
                 TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data );
- TLan_SetTimer( dev, 40, TLAN_TIMER_PHY_PDOWN );
+ TLan_SetTimer( dev, 40*HZ/100, TLAN_TIMER_PHY_PDOWN );
                 return;
         }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:23 EST