diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-10-17 03:03:25 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-10-17 03:03:25 +0000 |
commit | a4bc1708742c2b2fc8818297716852fb3f2e1564 (patch) | |
tree | 19e8aea8e5b7c3a4a243476aaafcba5a108fe425 /sys/dev/pci | |
parent | 86b78d94d28490f29f3a3d44550cdc00fe951d8c (diff) |
Start using the unused sc_variant to identify the GMAC vendor and chipset
model to the MI part of the driver. On Apple systems only attach the PHY to
location 0, unless using a K2 GMAC, then use location 1.
Tested by drahn@ and kettenis@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_gem_pci.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c index 3ecd8e33c88..dc7010e1f1c 100644 --- a/sys/dev/pci/if_gem_pci.c +++ b/sys/dev/pci/if_gem_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gem_pci.c,v 1.19 2005/10/01 19:08:57 brad Exp $ */ +/* $OpenBSD: if_gem_pci.c,v 1.20 2005/10/17 03:03:24 brad Exp $ */ /* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */ /* @@ -141,6 +141,21 @@ gem_attach_pci(parent, self, aux) sc->sc_pci = 1; /* XXXXX should all be done in bus_dma. */ + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_GEMNETWORK) + sc->sc_variant = GEM_SUN_GEM; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_ERINETWORK) + sc->sc_variant = GEM_SUN_ERI; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_K2_GMAC) + sc->sc_variant = GEM_APPLE_K2_GMAC; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PANGEA_GMAC) + sc->sc_variant = GEM_APPLE_PANGEA_GMAC; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_GMAC) + sc->sc_variant = GEM_APPLE_SHASTA_GMAC; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_UNINORTHGMAC) + sc->sc_variant = GEM_APPLE_UNINORTHGMAC; + else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_UNINORTH2GMAC) + sc->sc_variant = GEM_APPLE_UNINORTH2GMAC; + #define PCI_GEM_BASEADDR 0x10 if (pci_mapreg_map(pa, PCI_GEM_BASEADDR, type, 0, &gsc->gsc_memt, &gsc->gsc_memh, NULL, NULL, 0) != 0) |