summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2003-04-14 15:50:04 +0000
committersobomax <sobomax@FreeBSD.org>2003-04-14 15:50:04 +0000
commitac94030547f98c8a485b9f9195dea381fa3935c2 (patch)
tree066a929cf18c4a1c6187c00fd778deced2b3e61d
parent3ff8bde4fafdfb376b4404e508b0e6f248a1d559 (diff)
downloadFreeBSD-src-ac94030547f98c8a485b9f9195dea381fa3935c2.zip
FreeBSD-src-ac94030547f98c8a485b9f9195dea381fa3935c2.tar.gz
Use pci_enable_{busmaster|io}() instead of directly writing into
PCI configuration register. Submitted by: mdodd
-rw-r--r--sys/dev/fxp/if_fxp.c6
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);
OpenPOWER on IntegriCloud