summaryrefslogtreecommitdiff
path: root/sys/dev/gem/if_gem_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/gem/if_gem_pci.c')
-rw-r--r--sys/dev/gem/if_gem_pci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c
index 03fa1d4f3be2..49f2ddc129f8 100644
--- a/sys/dev/gem/if_gem_pci.c
+++ b/sys/dev/gem/if_gem_pci.c
@@ -158,11 +158,14 @@ gem_pci_attach(dev)
struct gem_pci_softc *gsc = device_get_softc(dev);
struct gem_softc *sc = &gsc->gsc_gem;
+ pci_enable_busmaster(dev);
+
/*
- * Enable bus master and memory access. The firmware does in some
- * cases not do this for us on sparc64 machines.
+ * Some Sun GEMs/ERIs do have their intpin register bogusly set to 0,
+ * although it should be 1. correct that.
*/
- pci_enable_busmaster(dev);
+ if (pci_get_intpin(dev) == 0)
+ pci_set_intpin(dev, 1);
sc->sc_dev = dev;
sc->sc_pci = 1; /* XXX */