summaryrefslogtreecommitdiff
path: root/sys/dev/gem/if_gem_pci.c
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2002-03-11 02:37:19 +0000
committerThomas Moestl <tmm@FreeBSD.org>2002-03-11 02:37:19 +0000
commit49921f1e25cfaf64c69b5c1fdc254c9d30cee1b8 (patch)
tree3d9585bdc0249024a93c71d565e4b1ec610d9289 /sys/dev/gem/if_gem_pci.c
parente26ddc9f60c6db7c7553b98edc3d6f110e52a2e8 (diff)
Notes
Diffstat (limited to 'sys/dev/gem/if_gem_pci.c')
-rw-r--r--sys/dev/gem/if_gem_pci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c
index 26bf635a80c9..0e2544f1e85a 100644
--- a/sys/dev/gem/if_gem_pci.c
+++ b/sys/dev/gem/if_gem_pci.c
@@ -143,15 +143,13 @@ gem_pci_attach(dev)
{
struct gem_pci_softc *gsc = device_get_softc(dev);
struct gem_softc *sc = &gsc->gsc_gem;
- u_int16_t csr;
/*
- * Enable bus master access. The firmware does in some cases not do
- * this for us on sparc64 machines.
+ * Enable bus master and memory access. The firmware does in some
+ * cases not do this for us on sparc64 machines.
*/
- csr = pci_read_config(dev, PCIR_COMMAND, 2);
- csr |= PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN;
- pci_write_config(dev, PCIR_COMMAND, csr, 2);
+ pci_enable_busmaster(dev);
+ pci_enable_io(dev, SYS_RES_MEMORY);
sc->sc_dev = dev;
sc->sc_pci = 1; /* XXX */