[tulip] Re: Linksys Network Card not working

Christopher Smith x@xman.org
Fri, 19 May 2000 18:52:25 -0700


On Wed, May 17, 2000 at 09:17:08PM -0400, Donald Becker wrote:
> On Wed, 17 May 2000, Poly wrote:
> > In /var/log/messages, I found the following suspicious lines:
> > The PCI BIOS has not enabled the device at 0/96
> > updating PCI Command 0083 to 0087
> > tulip.c :v0.91g-ppc 7/16/99 becker@cesdis.gsfc.nasa.gov
> > eth0: Lite-on PNIC-II rev 37 at 0x1400, 00:A0:CC
> > :37:95:B8, IRQ 0
> 
> IRQ 0
> Read
>  http://www.scyld.com/expert/irq-conflict.html

After you fix that you will potentially find problems with the card's
autonegotiation if you are using a switch. This can be corrected
either by upgrading to Donald's latest driver, upgrading to the latest
devel kernel, or applying this attached patch against the driver in
the 2.2.x kernel. I recommend only going with the patch if you
actually experience the problem, as I wrote it myself and my knowledge
of the tulip driver, tulip chip, and network driver programming is
miniscule compared to the collective efforts that went into the driver
in the first place, so there's a decent chance the patch causes
problems elsewhere (although I haven't had any problems).

--Chris

patch:

--- donald/tulip.c	Tue Apr 11 21:03:51 2000
+++ tulip/tulip.c	Tue Apr 11 21:07:17 2000
@@ -18,7 +18,7 @@
 */
 
 #define SMP_CHECK
-static const char version[] = "tulip.c:v0.91g-ppc 7/16/99 becker@cesdis.gsfc.nasa.gov\n";
+static const char version[] = "tulip.c:v0.91g-ppc 7/16/99 becker@cesdis.gsfc.nasa.gov\nModified (ver.5) by Christopher Smith (x@xman.org) to work with Linksys LNE100TX\nPlease do not bug Donald about problems with this driver until you've tested with regular v0.91g-ppc\n";
 
 /* A few user-configurable values. */
 
@@ -389,6 +389,7 @@
 	HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | MC_HASH_ONLY, tulip_timer },
   { "Lite-On PNIC-II", 256, 0x0801fbff,
 	HAS_MII | HAS_NWAY143 | HAS_8023X, t21142_timer },
+	//	HAS_MII | HAS_NWAY143 | HAS_8023X, mxic_timer },
   { "ADMtek Comet", 256, 0x0001abef,
 	MC_HASH_ONLY, comet_timer },
   { "Compex 9881 PMAC", 128, 0x0001ebef,
@@ -949,7 +950,6 @@
 			outl(tp->mtable->csr12dir | 0x100, ioaddr + CSR12);
 		break;
 	case DC21142:
-	case PNIC2:
 		if (tp->mii_cnt  ||  media_cap[dev->if_port] & MediaIsMII) {
 			outl(0x82020000, ioaddr + CSR6);
 			outl(0x0000, ioaddr + CSR13);
@@ -973,7 +973,7 @@
 		outl(0x000711C0, ioaddr + CSR14); /* Turn on NWay. */
 		outl(0x00000001, ioaddr + CSR13);
 		break;
-	case MX98715: case MX98725:
+	case MX98715: case MX98725:	case PNIC2:
 		outl(0x01a80000, ioaddr + CSR6);
 		outl(0xFFFFFFFF, ioaddr + CSR14);
 		outl(0x00001000, ioaddr + CSR12);
@@ -1524,8 +1524,9 @@
 			outl(0x0000, ioaddr + CSR14);
 		} else
 			t21142_start_nway(dev);
-	} else if (tp->chip_id == PNIC2) {
-		t21142_start_nway(dev);
+		// Chris hack
+		//	} else if (tp->chip_id == PNIC2) {
+		//		t21142_start_nway(dev);
 	} else if (tp->chip_id == LC82C168  &&  ! tp->medialock) {
 		if (tp->mii_cnt) {
 			dev->if_port = 11;
@@ -1546,7 +1547,7 @@
 		dev->if_port = 0;
 		tp->csr6 = 0x01880000 | (tp->full_duplex ? 0x0200 : 0);
 		outl(0x0f370000 | inw(ioaddr + 0x80), ioaddr + 0x80);
-	} else if (tp->chip_id == MX98715 || tp->chip_id == MX98725) {
+	} else if (tp->chip_id == MX98715 || tp->chip_id == MX98725 || tp->chip_id == PNIC2) {
 		/* Provided by BOLO, Macronix - 12/10/1998. */
 		dev->if_port = 0;
 		tp->csr6 = 0x01a80200;