[vortex] 3c905 oddities

Donald Becker becker@scyld.com
Tue, 12 Dec 2000 18:33:31 -0500 (EST)


On Tue, 12 Dec 2000, Kevin Kress wrote:


> The mod to the timeout worked great, I am not up an running on the
> network.
> 
> I have a couple of naive questions about the change.
> 
> 1) will a timeout of 4000000 as suggested in previous emails cause a
> performance hit? (ie should I try and optimize)

No, it's in the initialization and error recovery path.  So it's a one-time
pause when the interface is started.

The change can cause major problems with other kernel systems, such as disk
controllers and the clock.  The old Xircom PCMCIA driver had code like this,
and the clock lost three seconds each time the interface was started.  You
sometimes see the same effect with Windows device drivers.

The second related problem is with detecting MII transceivers.
There are two changes that might make a difference.  The first is adding an
extra preamble, the second is changing the scan order to check for the usual
address of 24 first, and never check for an external phy:

	EL3WINDOW(4);
	mii_preamble_required++;
-	mii_preamble_required++;
+	mdio_sync(ioaddr, 32);
	mdio_read(ioaddr, 24, 1);
-	for (phy = 1; phy <= 32 && phy_idx < sizeof(vp->phys); phy++) {
-		int mii_status, phyx = phy & 0x1f;
+	for (phy = 0; phy < 32 && phy_idx < 1; phy++) {
+		int mii_status, phyx = (phy == 0 ? 24 : phy == 24 );


Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993