patch-2.3.99-pre6 linux/drivers/net/tulip/21142.c

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

diff -u --recursive --new-file v2.3.99-pre5/linux/drivers/net/tulip/21142.c linux/drivers/net/tulip/21142.c
@@ -88,8 +88,10 @@
 		next_tick = 3*HZ;
 	}
 
-	tp->timer.expires = RUN_AT(next_tick);
-	add_timer(&tp->timer);
+	/* mod_timer synchronizes us with potential add_timer calls
+	 * from interrupts.
+	 */
+	mod_timer(&tp->timer, RUN_AT(next_tick));
 }
 
 
@@ -108,7 +110,10 @@
 			   dev->name, csr14);
 	outl(0x0001, ioaddr + CSR13);
 	outl(csr14, ioaddr + CSR14);
-	tp->csr6 = 0x82420000 | (tp->to_advertise & 0x0040 ? 0x0200 : 0);
+	if (tp->chip_id == PNIC2)
+	  tp->csr6 = 0x01a80000 | (tp->to_advertise & 0x0040 ? 0x0200 : 0);
+	else 
+	  tp->csr6 = 0x82420000 | (tp->to_advertise & 0x0040 ? 0x0200 : 0);
 	tulip_outl_CSR6(tp, tp->csr6);
 	if (tp->mtable  &&  tp->mtable->csr15dir) {
 		outl(tp->mtable->csr15dir, ioaddr + CSR15);

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