summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-07-31 18:47:17 +0000
committeradrian <adrian@FreeBSD.org>2012-07-31 18:47:17 +0000
commit3fbbc135fcae885279751f17af68a3f9b2f8bc12 (patch)
tree8c19a1eba5559e4573792cb77d181dc09e3a73db
parent27e973c32436df1ee2cd096301302832bef97fe9 (diff)
downloadFreeBSD-src-3fbbc135fcae885279751f17af68a3f9b2f8bc12.zip
FreeBSD-src-3fbbc135fcae885279751f17af68a3f9b2f8bc12.tar.gz
Restore the PCI bridge configuration upon resume.
This allows my TI1510 cardbus/PCI bridge to work after a suspend/resume, without having to unload/reload the cbb driver. I've also tested this on stable/9. I'll MFC it shortly. PR: kern/170058 Reviewed by: jhb MFC after: 1 day
-rw-r--r--sys/dev/pccbb/pccbb_pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index eca5ed7..542dea6 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -465,6 +465,11 @@ cbb_chipinit(struct cbb_softc *sc)
if (pci_read_config(sc->dev, PCIR_LATTIMER, 1) < 0x20)
pci_write_config(sc->dev, PCIR_LATTIMER, 0x20, 1);
+ /* Restore bus configuration */
+ pci_write_config(sc->dev, PCIR_PRIBUS_2, sc->pribus, 1);
+ pci_write_config(sc->dev, PCIR_SECBUS_2, sc->secbus, 1);
+ pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1);
+
/* Enable memory access */
PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND,
| PCIM_CMD_MEMEN
OpenPOWER on IntegriCloud