Date: Thu, 30 Jan 2014 19:13:15 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261293 - stable/9/sys/dev/pccbb Message-ID: <201401301913.s0UJDFfp090736@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Jan 30 19:13:14 2014 New Revision: 261293 URL: http://svnweb.freebsd.org/changeset/base/261293 Log: MFC 261216: Explicitly enable I/O and memory decoding in the bridge's command register when activating an I/O or memory window on the CardBus bridge. Modified: stable/9/sys/dev/pccbb/pccbb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pccbb/pccbb.c ============================================================================== --- stable/9/sys/dev/pccbb/pccbb.c Thu Jan 30 19:09:59 2014 (r261292) +++ stable/9/sys/dev/pccbb/pccbb.c Thu Jan 30 19:13:14 2014 (r261293) @@ -1031,6 +1031,13 @@ cbb_cardbus_power_disable_socket(device_ /* CardBus Resource */ /************************************************************************/ +static void +cbb_activate_window(device_t brdev, int type) +{ + + PCI_ENABLE_IO(device_get_parent(brdev), brdev, type); +} + static int cbb_cardbus_io_open(device_t brdev, int win, uint32_t start, uint32_t end) { @@ -1048,6 +1055,7 @@ cbb_cardbus_io_open(device_t brdev, int pci_write_config(brdev, basereg, start, 4); pci_write_config(brdev, limitreg, end, 4); + cbb_activate_window(brdev, SYS_RES_IOPORT); return (0); } @@ -1068,6 +1076,7 @@ cbb_cardbus_mem_open(device_t brdev, int pci_write_config(brdev, basereg, start, 4); pci_write_config(brdev, limitreg, end, 4); + cbb_activate_window(brdev, SYS_RES_MEMORY); return (0); } @@ -1335,7 +1344,12 @@ cbb_pcic_activate_resource(device_t brde struct resource *res) { struct cbb_softc *sc = device_get_softc(brdev); - return (exca_activate_resource(&sc->exca[0], child, type, rid, res)); + int error; + + error = exca_activate_resource(&sc->exca[0], child, type, rid, res); + if (error == 0) + cbb_activate_window(brdev, type); + return (error); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401301913.s0UJDFfp090736>