bug-hurd
[Top][All Lists]
Advanced

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

Re: [patch] GNU Mach-1.x support for 3c556 NIC


From: Marco Gerards
Subject: Re: [patch] GNU Mach-1.x support for 3c556 NIC
Date: Wed, 18 Feb 2004 02:28:50 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Marco Gerards <metgerards@student.han.nl> writes:

> What about:
>
> 2004-02-15  Michael Banck  <mbanck@gmx.net>
>
>       Adds support for 3c556 from Linux-2.2.17-pre14, originally by
>       Fred Maciel.
>       
>       * linux/src/drivers/net/3c59x.c (pci_tbl): Added 3c556 PCI IDs and
>       chipset features.
>       (vortex_probe1): Special case data values for 3c556 when doing
>       outw() port output.

Or better:

2004-02-15  Michael Banck  <mbanck@gmx.net>

        Adds support for 3c556 from Linux 2.2.17-pre14.
        
        * linux/src/drivers/net/3c59x.c (pci_tbl): Added 3c556 PCI IDs and
        chipset features, from Linux 2.2.17-pre14.
        (vortex_probe1): Special case data values for 3c556 when doing
        outw() port output, from Linux 2.2.17-pre14.

I've changed the patch so it includes mentions the person who
originally wrote the support for this card.

I guess this is ok.  I'm too tired now, so I'll wait a day and check
this in tomorrow.

Thanks,
Marco


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 -p -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       18 Feb 2004 01:13:04 -0000
@@ -12,6 +12,9 @@
        The author may be reached as becker@CESDIS.gsfc.nasa.gov, or C/O
        Center of Excellence in Space Data and Information Sciences
           Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
+
+
+       Support for 3c556 10/100 Mini PCI Adapter by Fred Maciel.
 */
 
 static char *version =
@@ -286,6 +289,8 @@ static struct pci_id_info pci_tbl[] = {
         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 +850,11 @@ static struct device *vortex_probe1(int 
 #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 +902,11 @@ static struct device *vortex_probe1(int 
                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_ResetOptions);
+               if (pci_tbl[chip_idx].device_id == 0x6055) {
+                       outw(0x4010 | inw(ioaddr + Wn2_ResetOptions), ioaddr + 
Wn2_ResetOptions);
+               } else {
+                       outw(0x10 | inw(ioaddr + Wn2_ResetOptions), ioaddr + 
Wn2_ResetOptions);
+               }
        }
 
        /* Extract our information from the EEPROM data. */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]