diff options
author | sobomax <sobomax@FreeBSD.org> | 2003-04-14 15:50:04 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2003-04-14 15:50:04 +0000 |
commit | ac94030547f98c8a485b9f9195dea381fa3935c2 (patch) | |
tree | 066a929cf18c4a1c6187c00fd778deced2b3e61d /sys/dev/fxp | |
parent | 3ff8bde4fafdfb376b4404e508b0e6f248a1d559 (diff) | |
download | FreeBSD-src-ac94030547f98c8a485b9f9195dea381fa3935c2.zip FreeBSD-src-ac94030547f98c8a485b9f9195dea381fa3935c2.tar.gz |
Use pci_enable_{busmaster|io}() instead of directly writing into
PCI configuration register.
Submitted by: mdodd
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 8829739..036e167 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -388,9 +388,9 @@ fxp_attach(device_t dev) * Enable bus mastering. Enable memory/port space too, in case * BIOS/Prom forgot about it. */ - val = pci_read_config(dev, PCIR_COMMAND, 2); - val |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); - pci_write_config(dev, PCIR_COMMAND, val, 2); + pci_enable_busmaster(dev); + pci_enable_io(dev, SYS_RES_IOPORT); + pci_enable_io(dev, SYS_RES_MEMORY); val = pci_read_config(dev, PCIR_COMMAND, 2); fxp_powerstate_d0(dev); |