[tulip] tulip-diag.c patch

Dan Hollis goemon@anime.net
Wed, 25 Apr 2001 16:25:24 -0700 (PDT)


Most centaur cards use integrated PHY, not MII (eg lne100tx 4.x)

Maybe only ones using MII are the HomePNA cards? But I dont know if they
use centaur or some other chip.

Patch vs tulip-diag.c:v2.07 3/31/2001

-Dan

--- tulip-diag.c.orig	Wed Apr 25 16:15:17 2001
+++ tulip-diag.c	Wed Apr 25 16:15:09 2001
@@ -634,7 +634,13 @@
 			printf(" Port selection is %s-duplex.\n",
 				   csr6 & 0x0200 ? "full" : "half");
 		else if (flags & COMET_MACADDR)	{		/* ADMtek chips. */
-			printf(" Comet duplex is reported in the MII status registers.\n");
+			int omr = inl(ioaddr + 0xFC);
+			if ((flags & COMET_MACADDR) && ((omr & 0x07) == 7)) {
+				printf(" Port selection is %smbps %s duplex (Link is %s)\n",
+					(omr & 0x80000000 ? "100" : "10"),
+					(omr & 0x40000000 ? "full" : "half"),
+					(omr & 0x20000000 ? "on" : "off"));
+			}
 		} else if (flags & PNIC2_MACADDR)	{		/* The PNIC-II chip. */
 			int csr14 = inl(ioaddr + CSR14);
 			printf(" Port selection is %s, %s-duplex.\n",