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
This commit is contained in:
adrian 2012-07-31 18:47:17 +00:00
parent 27e973c324
commit 3fbbc135fc

View File

@ -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