summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_gem_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/if_gem_pci.c')
-rw-r--r--sys/dev/pci/if_gem_pci.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/dev/pci/if_gem_pci.c b/sys/dev/pci/if_gem_pci.c
index e164b6f3bed..80c8b8a18d3 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.32 2011/04/03 15:36:02 jasper Exp $ */
+/* $OpenBSD: if_gem_pci.c,v 1.33 2012/09/30 02:16:17 brad Exp $ */
/* $NetBSD: if_gem_pci.c,v 1.1 2001/09/16 00:11:42 eeh Exp $ */
/*
@@ -227,22 +227,19 @@ gem_attach_pci(struct device *parent, struct device *self, void *aux)
sc->sc_pci = 1; /* XXXXX should all be done in bus_dma. */
- if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_GEMNETWORK)
+ switch (PCI_PRODUCT(pa->pa_id)) {
+ case PCI_PRODUCT_SUN_GEMNETWORK:
sc->sc_variant = GEM_SUN_GEM;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_ERINETWORK)
+ break;
+ case PCI_PRODUCT_SUN_ERINETWORK:
sc->sc_variant = GEM_SUN_ERI;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_INTREPID2_GMAC)
- sc->sc_variant = GEM_APPLE_GMAC;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_PANGEA_GMAC)
- sc->sc_variant = GEM_APPLE_GMAC;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_GMAC)
- sc->sc_variant = GEM_APPLE_GMAC;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_UNINORTHGMAC)
- sc->sc_variant = GEM_APPLE_GMAC;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_UNINORTH2GMAC)
- sc->sc_variant = GEM_APPLE_GMAC;
- else if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_K2_GMAC)
+ break;
+ case PCI_PRODUCT_APPLE_K2_GMAC:
sc->sc_variant = GEM_APPLE_K2_GMAC;
+ break;
+ default:
+ sc->sc_variant = GEM_APPLE_GMAC;
+ }
#define PCI_GEM_BASEADDR 0x10
if (pci_mapreg_map(pa, PCI_GEM_BASEADDR, type, 0,