From 55ce7b5117f1b3898179727e57f08f7a7c94c2ce Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 18 Jun 2000 10:26:09 +0000 Subject: [PATCH] Added support for the i82559ER (10/100Mbps NIC for embedded applications). Product device ID provided by: Les Biffle --- sys/dev/fxp/if_fxp.c | 24 +++++++++++++++--------- sys/dev/fxp/if_fxpreg.h | 1 + sys/pci/if_fxp.c | 24 +++++++++++++++--------- sys/pci/if_fxpreg.h | 1 + 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index b5de024d6f61..d10b43a3c5de 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -491,15 +491,21 @@ fxp_ether_ioctl(ifp, cmd, data) static int fxp_probe(device_t dev) { - if ((pci_get_vendor(dev) == FXP_VENDORID_INTEL) && - (pci_get_device(dev) == FXP_DEVICEID_i82557)) { - device_set_desc(dev, "Intel EtherExpress Pro 10/100B Ethernet"); - return 0; - } - if ((pci_get_vendor(dev) == FXP_VENDORID_INTEL) && - (pci_get_device(dev) == FXP_DEVICEID_i82559)) { - device_set_desc(dev, "Intel InBusiness 10/100 Ethernet"); - return 0; + if (pci_get_vendor(dev) == FXP_VENDORID_INTEL) { + switch (pci_get_device(dev)) { + + case FXP_DEVICEID_i82557: + device_set_desc(dev, "Intel Pro 10/100B/100+ Ethernet"); + return 0; + case FXP_DEVICEID_i82559: + device_set_desc(dev, "Intel InBusiness 10/100 Ethernet"); + return 0; + case FXP_DEVICEID_i82559ER: + device_set_desc(dev, "Intel Embedded 10/100 Ethernet"); + return 0; + default: + break; + } } return ENXIO; diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h index 55808130fee6..9ca2f7e792c3 100644 --- a/sys/dev/fxp/if_fxpreg.h +++ b/sys/dev/fxp/if_fxpreg.h @@ -30,6 +30,7 @@ #define FXP_VENDORID_INTEL 0x8086 #define FXP_DEVICEID_i82557 0x1229 /* 82557 - 82559 "classic" */ #define FXP_DEVICEID_i82559 0x1030 /* New 82559 device id.. */ +#define FXP_DEVICEID_i82559ER 0x1209 /* 82559 for embedded applications */ #define FXP_PCI_MMBA 0x10 #define FXP_PCI_IOBA 0x14 diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index b5de024d6f61..d10b43a3c5de 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -491,15 +491,21 @@ fxp_ether_ioctl(ifp, cmd, data) static int fxp_probe(device_t dev) { - if ((pci_get_vendor(dev) == FXP_VENDORID_INTEL) && - (pci_get_device(dev) == FXP_DEVICEID_i82557)) { - device_set_desc(dev, "Intel EtherExpress Pro 10/100B Ethernet"); - return 0; - } - if ((pci_get_vendor(dev) == FXP_VENDORID_INTEL) && - (pci_get_device(dev) == FXP_DEVICEID_i82559)) { - device_set_desc(dev, "Intel InBusiness 10/100 Ethernet"); - return 0; + if (pci_get_vendor(dev) == FXP_VENDORID_INTEL) { + switch (pci_get_device(dev)) { + + case FXP_DEVICEID_i82557: + device_set_desc(dev, "Intel Pro 10/100B/100+ Ethernet"); + return 0; + case FXP_DEVICEID_i82559: + device_set_desc(dev, "Intel InBusiness 10/100 Ethernet"); + return 0; + case FXP_DEVICEID_i82559ER: + device_set_desc(dev, "Intel Embedded 10/100 Ethernet"); + return 0; + default: + break; + } } return ENXIO; diff --git a/sys/pci/if_fxpreg.h b/sys/pci/if_fxpreg.h index 55808130fee6..9ca2f7e792c3 100644 --- a/sys/pci/if_fxpreg.h +++ b/sys/pci/if_fxpreg.h @@ -30,6 +30,7 @@ #define FXP_VENDORID_INTEL 0x8086 #define FXP_DEVICEID_i82557 0x1229 /* 82557 - 82559 "classic" */ #define FXP_DEVICEID_i82559 0x1030 /* New 82559 device id.. */ +#define FXP_DEVICEID_i82559ER 0x1209 /* 82559 for embedded applications */ #define FXP_PCI_MMBA 0x10 #define FXP_PCI_IOBA 0x14