patch-2.4.11-dontuse linux/drivers/net/tulip/interrupt.c

Next file: linux/drivers/net/tulip/tulip_core.c
Previous file: linux/drivers/net/tulip/eeprom.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/net/tulip/interrupt.c linux/drivers/net/tulip/interrupt.c
@@ -301,7 +301,7 @@
 	long ioaddr = dev->base_addr;
 	int csr5;
 	int entry;
-	int missed;
+	int csr8;
 	int rx = 0;
 	int tx = 0;
 	int oi = 0;
@@ -434,7 +434,6 @@
 				}
 			}
 			if (csr5 & RxDied) {		/* Missed a Rx frame. */
-                                tp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff;
 #ifdef CONFIG_NET_HW_FLOWCONTROL
 				if (tp->fc_bit && !test_bit(tp->fc_bit, &netdev_fc_xoff)) {
 					tp->stats.rx_errors++;
@@ -548,9 +547,8 @@
 		}
 	}
 
-	if ((missed = inl(ioaddr + CSR8) & 0x1ffff)) {
-		tp->stats.rx_dropped += missed & 0x10000 ? 0x10000 : missed;
-	}
+	csr8 = inl(ioaddr + CSR8);
+	tp->stats.rx_dropped += (csr8 & 0x1ffff) + ((csr8 >> 17) & 0xfff);
 
 	if (tulip_debug > 4)
 		printk(KERN_DEBUG "%s: exiting interrupt, csr5=%#4.4x.\n",

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