summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2003-07-01 14:11:04 +0000
committerThomas Moestl <tmm@FreeBSD.org>2003-07-01 14:11:04 +0000
commit5905e65b56fbf9af85d6e79b00f4c8dea559abe6 (patch)
treef701d62e15e9b35ff20b5d9a2d934f6a8f64d082
parent3920999db7a352f899447e41d4fae2c7a1f7442b (diff)
Notes
-rw-r--r--sys/dev/gem/if_gem_pci.c9
-rw-r--r--sys/dev/hme/if_hme_pci.c10
2 files changed, 12 insertions, 7 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 */
diff --git a/sys/dev/hme/if_hme_pci.c b/sys/dev/hme/if_hme_pci.c
index 8a89b6b46bdc..f1139210354f 100644
--- a/sys/dev/hme/if_hme_pci.c
+++ b/sys/dev/hme/if_hme_pci.c
@@ -132,13 +132,15 @@ hme_pci_attach(device_t dev)
struct hme_softc *sc = &hsc->hsc_hme;
int error;
+ pci_enable_busmaster(dev);
/*
- * Enable memory-space and bus master accesses. This is kinda of
- * gross; but the hme comes up with neither enabled.
+ * Some Sun HMEs 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_pci = 1; /* XXXXX should all be done in bus_dma. */
+ sc->sc_pci = 1;
sc->sc_dev = dev;
/*