patch-2.4.21 linux-2.4.21/drivers/net/pcnet32.c

Next file: linux-2.4.21/drivers/net/ppp_generic.c
Previous file: linux-2.4.21/drivers/net/pcmcia/xircom_tulip_cb.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/net/pcnet32.c linux-2.4.21/drivers/net/pcnet32.c
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"1.27b"
-#define DRV_RELDATE	"01.10.2002"
+#define DRV_VERSION	"1.27a"
+#define DRV_RELDATE	"10.02.2002"
 #define PFX		DRV_NAME ": "
 
 static const char *version =
@@ -97,8 +97,6 @@
 
 #define PCNET32_DMA_MASK 0xffffffff
 
-#define PCNET32_WATCHDOG_TIMEOUT (jiffies + (2 * HZ))
-
 /*
  * table to translate option values from tulip
  * to internal options
@@ -214,8 +212,6 @@
  *	   fix pci probe not increment cards_found
  *	   FD auto negotiate error workaround for xSeries250
  *	   clean up and using new mii module
- * v1.27b  Sep 30 2002 Kent Yoder <yoder1@us.ibm.com>
- * 	   Added timer for cable connection state changes.
  */
 
 
@@ -323,7 +319,6 @@
 	mii:1;				/* mii port available */
     struct net_device	*next;
     struct mii_if_info mii_if;
-    struct timer_list	watchdog_timer;
 };
 
 static void pcnet32_probe_vlbus(void);
@@ -339,7 +334,6 @@
 static struct net_device_stats *pcnet32_get_stats(struct net_device *);
 static void pcnet32_set_multicast_list(struct net_device *);
 static int  pcnet32_ioctl(struct net_device *, struct ifreq *, int);
-static void pcnet32_watchdog(struct net_device *);
 static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
 static void mdio_write(struct net_device *dev, int phy_id, int reg_num, int val);
 
@@ -784,13 +778,6 @@
 	}
     }
 
-    /* Set the mii phy_id so that we can query the link state */
-    if (lp->mii)
-	lp->mii_if.phy_id = ((lp->a.read_bcr (ioaddr, 33)) >> 5) & 0x1f;
-
-    init_timer (&lp->watchdog_timer);
-    lp->watchdog_timer.data = (unsigned long) dev;
-    lp->watchdog_timer.function = (void *) &pcnet32_watchdog;
     
     /* The PCNET32-specific entries in the device structure. */
     dev->open = &pcnet32_open;
@@ -915,12 +902,6 @@
 
     netif_start_queue(dev);
 
-    /* If we have mii, print the link status and start the watchdog */
-    if (lp->mii) {
-	mii_check_media (&lp->mii_if, 1, 1);
-	mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
-    }
-    
     i = 0;
     while (i++ < 100)
 	if (lp->a.read_csr (ioaddr, 0) & 0x0100)
@@ -1391,8 +1372,6 @@
     struct pcnet32_private *lp = dev->priv;
     int i;
 
-    del_timer_sync(&lp->watchdog_timer);
-
     netif_stop_queue(dev);
 
     lp->stats.rx_missed_errors = lp->a.read_csr (ioaddr, 112);
@@ -1486,7 +1465,7 @@
 	
 	crc = ether_crc_le(6, addrs);
 	crc = crc >> 26;
-	mcast_table [crc >> 4] |= 1 << (crc & 0xf);
+	mcast_table [crc >> 4] |= cpu_to_le16(1 << (crc & 0xf));
     }
     return;
 }
@@ -1673,17 +1652,6 @@
     return -EOPNOTSUPP;
 }
 
-static void pcnet32_watchdog(struct net_device *dev)
-{
-    struct pcnet32_private *lp = dev->priv;
-
-    /* Print the link status if it has changed */
-    if (lp->mii)
-	mii_check_media (&lp->mii_if, 1, 0);
-
-    mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
-}
-
 static struct pci_driver pcnet32_driver = {
     name:	DRV_NAME,
     probe:	pcnet32_probe_pci,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)