[PATCH 2.6][RFC] non-MII 3c59x fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew, Jeff,

The following patch tries to fix a small bug that crept in at some
point during 2.5.

None of my 3c592 or 3c597 would work if I didn't force media
type. Instead, it would try to probe MII, looking for a suitable
transceiver, and finaly give up, because these cards really do not
have any sort of MII... :

EISA: Probing bus 0 at Intel Corp. 82375EB
EISA: Mainboard DEC5000 detected.
EISA: slot 2 : ADP0001 detected.
EISA: slot 3 : ADP7771 detected.
EISA: slot 4 : DPTA401 detected.
EISA: slot 5 : TCM5920 detected.
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
00:05: 3Com EISA 3c592 EISA 10Mbps Demon/Vortex at 0x5000. Vers LK1.1.19
  ***WARNING*** No MII transceivers found!
EISA: Detected 4 cards.

With the enclosed patch, it just works, at least on my setup (3c592 on
Alpha, and 3c597 on x86). I haven't been able to test it didn't break
cards with MII, because I do not have such cards in my test boxes...

The patch also removes two useless EISA-only #define I introduced some
time ago.

Thanks,

        M.

--- ../vanilla/linux-2.5/drivers/net/3c59x.c	2003-05-21 08:35:23.000000000 +0200
+++ linux-2.6.0-test1/drivers/net/3c59x.c	2003-07-17 16:26:10.000000000 +0200
@@ -484,10 +484,8 @@
 } vortex_info_tbl[] __devinitdata = {
 	{"3c590 Vortex 10Mbps",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
-#define EISA_3C592_OFFSET 1		/* Offset of this entry for vortex_eisa_init */
 	{"3c592 EISA 10Mbps Demon/Vortex",					/* AKPM: from Don's 3c59x_cb.c 0.49H */
 	 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
-#define EISA_3C597_OFFSET 2		/* Offset of this entry for vortex_eisa_init */
 	{"3c597 EISA Fast Demon/Vortex",					/* AKPM: from Don's 3c59x_cb.c 0.49H */
 	 PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
 	{"3c595 Vortex 100baseTx",
@@ -960,8 +958,8 @@
 
 #ifdef CONFIG_EISA
 static struct eisa_device_id vortex_eisa_ids[] = {
-	{ "TCM5920", EISA_3C592_OFFSET },
-	{ "TCM5970", EISA_3C597_OFFSET },
+	{ "TCM5920", CH_3C592 },
+	{ "TCM5970", CH_3C597 },
 	{ "" }
 };
 
@@ -1379,7 +1377,7 @@
 	} else
 		dev->if_port = vp->default_media;
 
-	if ((vp->available_media & 0x4b) || (vci->drv_flags & HAS_NWAY) ||
+	if ((vp->available_media & 0x40) || (vci->drv_flags & HAS_NWAY) ||
 		dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
 		int phy, phy_idx = 0;
 		EL3WINDOW(4);

-- 
Places change, faces change. Life is so very strange.
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux