[tulip] Pavel Roskin
Felipe Contreras
al593181@mail.mty.itesm.mx
Mon Jan 28 12:10:09 2002
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
I can report that the Pavel Roskin patch works fine, it's exacly like
the tulip 0.93 but truly for 2.4.x.
I've always had an error with pc nic card (Davicom) and the cross-cable,
I hope this new driver doesn't ping me out of irc when I compile stuff,
anyway I'm sending this with it ;)
I'm sending the patch against a 2.5.2-dj6 kernel.
--
Felipe Contreras
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="tulip.diff"
diff -ur tulip.bak/tulip.h tulip/tulip.h
--- tulip.bak/tulip.h Sun Jan 27 02:33:48 2002
+++ tulip/tulip.h Mon Jan 28 01:50:53 2002
@@ -84,6 +84,7 @@
COMPEX9881,
I21145,
DM910X,
+ CONEXANT,
};
diff -ur tulip.bak/tulip_core.c tulip/tulip_core.c
--- tulip.bak/tulip_core.c Sun Jan 27 02:17:44 2002
+++ tulip/tulip_core.c Mon Jan 28 01:57:27 2002
@@ -185,6 +185,11 @@
{ "Davicom DM9102/DM9102A", 128, 0x0001ebef,
HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI,
tulip_timer },
+
+ /* RS7112 */
+ { "Conexant LANfinity", 256, 0x0001ebef,
+ HAS_MII | HAS_ACPI, tulip_timer },
+
};
@@ -209,6 +214,7 @@
{ 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
{ 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
{ 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+ { 0x14f1, 0x1803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CONEXANT },
{ 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 },
{ 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
{ } /* terminate list */
@@ -417,7 +423,7 @@
tp->csr6 = 0x01a80200;
outl(0x0f370000 | inw(ioaddr + 0x80), ioaddr + 0x80);
outl(0x11000 | inw(ioaddr + 0xa0), ioaddr + 0xa0);
- } else if (tp->chip_id == COMET) {
+ } else if (tp->chip_id == COMET || tp->chip_id == CONEXANT) {
/* Enable automatic Tx underrun recovery. */
outl(inl(ioaddr + 0x88) | 1, ioaddr + 0x88);
dev->if_port = tp->mii_cnt ? 11 : 0;
@@ -1251,7 +1257,6 @@
u8 chip_rev;
int i, irq;
unsigned short sum;
- u8 ee_data[EEPROM_SIZE];
struct net_device *dev;
long ioaddr;
static int board_idx = -1;
@@ -1450,17 +1455,21 @@
int sa_offset = 0;
int ee_addr_size = tulip_read_eeprom(ioaddr, 0xff, 8) & 0x40000 ? 8 : 6;
- for (i = 0; i < sizeof(ee_data)/2; i++)
- ((u16 *)ee_data)[i] =
+ for (i = 0; i < sizeof(tp->eeprom)/2; i++)
+ ((u16 *)tp->eeprom)[i] =
le16_to_cpu(tulip_read_eeprom(ioaddr, i, ee_addr_size));
/* DEC now has a specification (see Notes) but early board makers
just put the address in the first EEPROM locations. */
/* This does memcmp(eedata, eedata+16, 8) */
for (i = 0; i < 8; i ++)
- if (ee_data[i] != ee_data[16+i])
+ if (tp->eeprom[i] != tp->eeprom[16+i])
sa_offset = 20;
- if (ee_data[0] == 0xff && ee_data[1] == 0xff && ee_data[2] == 0) {
+ if (chip_idx == CONEXANT) {
+ /* Check that the tuple type and length is correct. */
+ if (tp->eeprom[0x198] == 0x04 && tp->eeprom[0x199] == 6)
+ sa_offset = 0x19A;
+ } else if (tp->eeprom[0] == 0xff && tp->eeprom[1] == 0xff && tp->eeprom[2] == 0) {
sa_offset = 2; /* Grrr, damn Matrox boards. */
multiport_cnt = 4;
}
@@ -1481,8 +1490,8 @@
}
#endif
for (i = 0; i < 6; i ++) {
- dev->dev_addr[i] = ee_data[i + sa_offset];
- sum += ee_data[i + sa_offset];
+ dev->dev_addr[i] = tp->eeprom[i + sa_offset];
+ sum += tp->eeprom[i + sa_offset];
}
}
/* Lite-On boards have the address byte-swapped. */
@@ -1553,8 +1562,6 @@
}
if (tp->flags & HAS_MEDIA_TABLE) {
- memcpy(tp->eeprom, ee_data, sizeof(tp->eeprom));
-
sprintf(dev->name, "tulip%d", board_idx); /* hack */
tulip_parse_eeprom(dev);
strcpy(dev->name, "eth%d"); /* un-hack */
--YiEDa0DAkWCtVeE4--