diff options
author | davidn <davidn@FreeBSD.org> | 1997-04-18 04:44:37 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1997-04-18 04:44:37 +0000 |
commit | 3f74eae256c58f01d2abafa7e034721c53d5769c (patch) | |
tree | b4029b3c7aa1eeea5c374c9af2dd89ff0e5224e4 /sys/dev/ed | |
parent | 8a246b5224e111faa33b0392742663e0c1701257 (diff) | |
download | FreeBSD-src-3f74eae256c58f01d2abafa7e034721c53d5769c.zip FreeBSD-src-3f74eae256c58f01d2abafa7e034721c53d5769c.tar.gz |
Rearrange pci network card identification for easier additions.
Added KTI NE2000 clone.
Diffstat (limited to 'sys/dev/ed')
-rw-r--r-- | sys/dev/ed/if_ed_pci.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c index 45c04b9..2636994 100644 --- a/sys/dev/ed/if_ed_pci.c +++ b/sys/dev/ed/if_ed_pci.c @@ -17,7 +17,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id$ + * $Id: if_ed_p.c,v 1.8 1997/02/22 09:44:04 peter Exp $ */ #include "pci.h" @@ -32,9 +32,18 @@ #include "ed.h" -#define PCI_DEVICE_ID_RealTek_8029 0x802910ec -#define PCI_DEVICE_ID_ProLAN_NE2000 0x09401050 -#define PCI_DEVICE_ID_Compex_NE2000 0x140111f6 +static struct _pcsid +{ + pcidi_t type; + char *desc; +} pci_ids[] = +{ + { 0x802910ec, "NE2000 PCI Ethernet (RealTek 8029)" }, + { 0x09401050, "NE2000 PCI Ethernet (ProLAN)" }, + { 0x140111f6, "NE2000 PCI Ethernet (Compex)" }, + { 0x30008e2e, "NE2000 PCI Ethernet (KTI)" }, + { 0x00000000, NULL } +}; extern void *ed_attach_NE2000_pci __P((int, int)); @@ -56,15 +65,11 @@ DATA_SET (pcidevice_set, ed_pci_driver); static char* ed_pci_probe (pcici_t tag, pcidi_t type) { - switch(type) { - case PCI_DEVICE_ID_RealTek_8029: - return ("NE2000 PCI Ethernet (RealTek 8029)"); - case PCI_DEVICE_ID_ProLAN_NE2000: - return ("NE2000 PCI Ethernet (ProLAN)"); - case PCI_DEVICE_ID_Compex_NE2000: - return ("NE2000 PCI Ethernet (Compex)"); - } - return (0); + struct _pcsid *ep =pci_ids; + + while (ep->type && ep->type != type) + ++ep; + return (ep->desc); } void edintr_sc (void*); |