[vortex] 3com 556B MiniPCI Ethernet card

Louis Gerbarg gerbal@rpi.edu
Wed, 6 Sep 2000 01:15:37 -0400 (EDT)


I have a patch to the vortex driver that makes it work with the 3com 556B
MiniPCI card. This patch is based on the work done by Jon Chen, which has
been incorprated into FreeBSD-STABLE. The card and patch seem to work
fine with my machine's suspend modes. According to Jon the card requires
some special tweaks to reset properly, which I have not yet incorporated.
What this means is that if the module is loaded, unloaded, then loaded
again things do not work properly. I will look into that in the next few
days. I believe that this should not break any other cards, though I
am not able to confirm that.

Louis

--- ./3c59x.c	Mon Aug  7 18:58:58 2000
+++ ../3c59x.c	Tue Sep  5 00:10:24 2000
@@ -225,7 +225,7 @@
 #define CYCLONE_SIZE 0x80
 enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4, IS_TORNADO=8,
 	   HAS_PWR_CTRL=0x10, HAS_MII=0x20, HAS_NWAY=0x40, HAS_CB_FNS=0x80,
-	   EEPROM_8BIT=0x200, INVERT_LED_PWR=0x400, MII_XCVR_PWR=0x4000, };
+	   EEPROM_8BIT=0x200, INVERT_LED_PWR=0x400, EEPROM_OFFSET=0x800, MII_XCVR_PWR=0x4000, };
 static void *vortex_probe1(struct pci_dev *pdev, void *init_dev,
 						   long ioaddr, int irq, int chip_idx, int find_cnt);
 static int pwr_event(void *dev_instance, int event);
@@ -278,6 +278,8 @@
 	 PCI_IOTYPE, CYCLONE_SIZE, IS_CYCLONE, },
 	{"3c556 Laptop Tornado",{ 0x605510B7, 0xffffffff },
 	 PCI_IOTYPE, CYCLONE_SIZE, IS_TORNADO|HAS_NWAY|EEPROM_8BIT, },
+	{"3c556B Laptop Hurricane", { 0x605610B7, 0xffffffff },
+	 PCI_IOTYPE, CYCLONE_SIZE, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET,},
 	{"3c556 series Laptop Tornado",{ 0x605510B7, 0xf0ffffff },
 	 PCI_IOTYPE, CYCLONE_SIZE, IS_TORNADO|HAS_NWAY|EEPROM_8BIT, },
 	{"3c575 Boomerang CardBus",	{ 0x505710B7, 0xffffffff },
@@ -802,7 +804,7 @@
 	EL3WINDOW(0);
 	for (i = 0; i < 0x40; i++) {
 		int timer;
-		outw((drv_flags & EEPROM_8BIT ? 0x230 : EEPROM_Read) + i,
+		outw((drv_flags & EEPROM_8BIT ? 0x230 : (drv_flags & EEPROM_OFFSET ? EEPROM_Read + 0x30 : EEPROM_Read)) + i,
 			  ioaddr + Wn0EepromCmd);
 		/* The read may take up to 162 usec, timed with PCI cycles. */
 		for (timer = 162*5; timer >= 0; timer--) {