summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-02-20 00:00:07 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-02-20 00:00:07 +0000
commit0bab2cdc90d3a5ce8d2f3c2167e6ca1b7e70adff (patch)
treeabbbdfed77d27b8a2bfbf7d6520cc2401e526e78 /sys/dev/pci/if_em.c
parent126e71f88f9a7d718b9f8213bb6328c0ed6fb756 (diff)
Add support for the Intel ICH9 chipsets.
Initial diff from Henry Precheur based on a commit from matthias@dragonflybsd which was derived from the FreeBSD driver. Additional Flash changes from sephe@dragonflybsd which was derived from the FreeBSD driver. Typo fixes in Henry's diff and a few other improvements from the FreeBSD driver from brad@. Tested on a variety of different em(4) adapters in addition to ICH8/9. ok dlg@
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index ec29d4e1e55..0e57fac779d 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.176 2008/02/04 00:30:01 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.177 2008/02/20 00:00:06 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -114,13 +114,18 @@ const struct pci_matchid em_devices[] = {
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82573L_PL_1 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82573L_PL_2 },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82573V_PM },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_M_AMT },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_AMT },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_C },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_G },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IFE_GT },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_M }
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_AMT },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_C },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_M },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH8_IGP_M_AMT },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH9_IFE },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH9_IFE_G },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH9_IFE_GT },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH9_IGP_AMT },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_ICH9_IGP_C }
};
/*********************************************************************
@@ -302,6 +307,7 @@ em_attach(struct device *parent, struct device *self, void *aux)
}
case em_82571:
case em_82572:
+ case em_ich9lan:
case em_80003es2lan: /* Limit Jumbo Frame size */
sc->hw.max_frame_size = 9234;
break;
@@ -686,6 +692,9 @@ em_init(void *arg)
case em_ich8lan:
pba = E1000_PBA_8K;
break;
+ case em_ich9lan:
+ pba = E1000_PBA_10K;
+ break;
default:
/* Devices before 82547 had a Packet Buffer of 64K. */
if (sc->hw.max_frame_size > EM_RXBUFFER_8192)
@@ -1486,8 +1495,9 @@ em_allocate_pci_resources(struct em_softc *sc)
sc->hw.io_base = 0;
}
- /* for ICH8 we need to find the flash memory */
- if (sc->hw.mac_type == em_ich8lan) {
+ /* for ICH8 and family we need to find the flash memory */
+ if (sc->hw.mac_type == em_ich8lan ||
+ sc->hw.mac_type == em_ich9lan) {
val = pci_conf_read(pa->pa_pc, pa->pa_tag, EM_FLASH);
if (PCI_MAPREG_TYPE(val) != PCI_MAPREG_TYPE_MEM) {
printf(": flash is not mem space\n");