svn commit: r277235 - head/sys/dev/pccbb
Warner Losh
imp at FreeBSD.org
Fri Jan 16 06:19:53 UTC 2015
Author: imp
Date: Fri Jan 16 06:19:52 2015
New Revision: 277235
URL: https://svnweb.freebsd.org/changeset/base/277235
Log:
Always enable I/O, memory and dma cycles. Some BIOSes don't enable
them, sometimes they are reset for power state transitions or during
whatever happens while suspended. Also, it is good practice to always
do this.
Modified:
head/sys/dev/pccbb/pccbb_pci.c
Modified: head/sys/dev/pccbb/pccbb_pci.c
==============================================================================
--- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:39 2015 (r277234)
+++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:52 2015 (r277235)
@@ -479,10 +479,10 @@ cbb_chipinit(struct cbb_softc *sc)
pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1);
pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1);
- /* Enable memory access */
+ /* Enable DMA, memory access for this card and I/O acces for children */
pci_enable_busmaster(sc->dev);
- /* XXX: This should not be necessary, but some chipsets require it */
- PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2);
+ pci_enable_io(sc->dev, SYS_RES_IOPORT);
+ pci_enable_io(sc->dev, SYS_RES_MEMORY);
/* disable Legacy IO */
switch (sc->chipset) {
More information about the svn-src-head
mailing list