diff options
author | adrian <adrian@FreeBSD.org> | 2012-07-31 18:47:17 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-07-31 18:47:17 +0000 |
commit | 3fbbc135fcae885279751f17af68a3f9b2f8bc12 (patch) | |
tree | 8c19a1eba5559e4573792cb77d181dc09e3a73db | |
parent | 27e973c32436df1ee2cd096301302832bef97fe9 (diff) | |
download | FreeBSD-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.c | 5 |
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 |