[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] GNU Mach-1.x support for 3c556 NIC
From: |
Michael Banck |
Subject: |
[patch] GNU Mach-1.x support for 3c556 NIC |
Date: |
Sun, 15 Feb 2004 21:28:42 +0100 |
User-agent: |
Mutt/1.5.4i |
Hi,
this patch adds support in GNU Mach 1.x for the 3Com 3c556 chip, as
found in my notebook. I've extracted it from Linux-2.2, and it seems to
work well :)
I hope the ChangeLog entry is alright, feel free to correct me.
2004-02-15 Michael Banck <mbanck@gmx.net>
* linux/src/drivers/net/3c59x.c: Added support for 3c556 from
Linux-2.2.17-pre14, originally by Fred Maciel.
(pci_tbl): Added 3c556 PCI IDs and chipset features.
(vortex_probe1): Special case data values for 3c556 when doing
outw() port output.
Index: linux/src/drivers/net/3c59x.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/linux/src/drivers/net/Attic/3c59x.c,v
retrieving revision 1.3
diff -u -r1.3 3c59x.c
--- linux/src/drivers/net/3c59x.c 8 Oct 1999 13:50:16 -0000 1.3
+++ linux/src/drivers/net/3c59x.c 15 Feb 2004 20:20:05 -0000
@@ -286,6 +286,8 @@
PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1},
{"3c555 Laptop Hurricane", 0x10B7, 0x5055, 0xffff,
PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1},
+ {"3c556 10/100 Mini PCI Adapter", 0x10B7, 0x6055, 0xffff,
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_CB_FNS, 128,
vortex_probe1} ,
{"3c575 Boomerang CardBus", 0x10B7, 0x5057, 0xffff,
PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, vortex_probe1},
{"3CCFE575 Cyclone CardBus", 0x10B7, 0x5157, 0xffff,
@@ -845,7 +847,11 @@
#ifdef CARDBUS
outw(0x230 + i, ioaddr + Wn0EepromCmd);
#else
- outw(EEPROM_Read + i, ioaddr + Wn0EepromCmd);
+ if (pci_tbl[chip_idx].device_id == 0x6055) {
+ outw(0x230 + i, ioaddr + Wn0EepromCmd);
+ } else {
+ outw(EEPROM_Read + i, ioaddr + Wn0EepromCmd);
+ }
#endif
/* Pause for at least 162 us. for the read to take place. */
for (timer = 10; timer >= 0; timer--) {
@@ -893,7 +899,11 @@
printk("%s: CardBus functions mapped %8.8x->%p (PCMCIA
committee "
" brain-damage).\n", dev->name, fn_st_addr,
vp->cb_fn _base);
EL3WINDOW(2);
- outw(0x10 | inw(ioaddr + Wn2_ResetOptions), ioaddr +
Wn2_ResetOp tions);
+ if (pci_tbl[chip_idx].device_id == 0x6055) {
+ outw(0x4010 | inw(ioaddr + Wn2_ResetOptions), ioaddr +
W n2_ResetOptions);
+ } else {
+ outw(0x10 | inw(ioaddr + Wn2_ResetOptions), ioaddr +
Wn2 _ResetOptions);
+ }
}
/* Extract our information from the EEPROM data. */
--
Michael Banck
Debian Developer
mbanck@debian.org
http://www.advogato.org/person/mbanck/diary.html
- [patch] GNU Mach-1.x support for 3c556 NIC,
Michael Banck <=
Re: [patch] GNU Mach-1.x support for 3c556 NIC, Alfred M. Szmidt, 2004/02/17