Date: Fri, 16 Jan 2015 06:19:53 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277235 - head/sys/dev/pccbb Message-ID: <201501160619.t0G6JrlC060581@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501160619.t0G6JrlC060581>