Problems with Linksys EtherFast 10/100 PCI and 0.89K

John G. jmich@iname.com
Fri Aug 14 14:17:21 1998


This is a multi-part message in MIME format.
--------------D3D28EE1C419D681F4238517
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Rob Ross wrote:
> 
> I just purchased a few of the Linksys EtherFast 10/100 PCI cards with
> the LC82C169 chip on board, and I'm having some troubles.

Are you sure it has the LC82C169 chip on board?  There are actually (at
least) 2 versions of the 3'rd revision of this board (the one with
Linksys printed on the chip).  Even though the box the card came in may
have LC82C169 printed on it and the chipset on the card itself has
Linksys written on it, the chipset could still have LC82C168 printed
beneath the Linksys logo.

I say this because (1) my card is 3'rd revision and has the Linksys logo
on the chipset, yet it still has LC82c168 stamped on the chipset too,
not LC82c169, and (2) because I quote from your post:

  Aug 13 14:20:33 playtoy kernel: tulip.c:v0.89K 8/8/98
becker@cesdis.gsfc.nasa.gov
  Aug 13 14:20:33 playtoy kernel: eth0: Lite-On 82c168 PNIC at 0x6c00,
          00 a0 cc 21 8b 29, IRQ 10.                 ^
                                                    /|\
                                                     |
> I'm using the 0.89K driver as a module.
> 
> Basically, sometimes I boot and the card works, other times it doesn't.
> Cold boot vs. rebooting doesn't seem to matter a whole lot.  From the
> available output, it appears as if the MII transceiver isn't always
> detected correctly(?).

I had the same problems, but now I'm using a patched version of 0.89H. 
I've attached the patch for everyone's good pleasure.  It's based on
changes that Guido Classen told me to make.

-- 
John G.  jmich@iname.com

"we build confusing systems with nonfunctioning or poor quality drivers"
 -- Jim Allchin, a senior vice president of Microsoft, WinHEC 98
(borrowed)
--------------D3D28EE1C419D681F4238517
Content-Type: text/plain; charset=us-ascii; name="Linksys-rev3_tulip.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="Linksys-rev3_tulip.c.patch"

--- tulip-0.89H.c	Fri Jun 19 14:41:09 1998
+++ tulip-0.89H-new.c	Fri Aug 14 13:57:53 1998
@@ -1151,8 +1151,15 @@
 		int i = 1000;
 		outl(0x60020000 + (phy_id<<23) + (location<<18), ioaddr + 0xA0);
 		while (--i > 0)
+		/* I added the below in place of the code commented out beneath it at the advice of Guido Classen */
+			if ( ! (inl(ioaddr + 0xA0) & 0x80000000)) {
+				udelay(1000);
+				return inl(ioaddr + 0xA0) & 0xffff;
+			}
+		/*
 			if ( ! ((retval = inl(ioaddr + 0xA0)) & 0x80000000))
 				return retval & 0xffff;
+		*/
 		return 0xffff;
 	}
 
@@ -1195,8 +1202,11 @@
 		int i = 1000;
 		outl(cmd, ioaddr + 0xA0);
 		do
-			if ( ! (inl(ioaddr + 0xA0) & 0x80000000))
+			if ( ! (inl(ioaddr + 0xA0) & 0x80000000)){
+				/* I added the next line at the advice of Guido Classen */
+				udelay(1000);
 				break;
+			}
 		while (--i > 0);
 		return;
 	}
@@ -1323,6 +1333,10 @@
 
 		tp->cur_tx++;
 	}
+
+	/* I added the next two lines at the suggestion of Guido Classen */
+	if (tp->chip_id == LC82C168)
+		outl(0x21, ioaddr + CSR15);
 
 	outl(virt_to_bus(tp->rx_ring), ioaddr + CSR3);
 	outl(virt_to_bus(tp->tx_ring), ioaddr + CSR4);

--------------D3D28EE1C419D681F4238517--