Fix TI PCI1520 PCI Cardbus bridge, but others affected.

On system with Celeron 1.5GHz CPU, sometimes when a PCMCIA to Compact Flash
adapter containing a Compact Flash card is inserted in the cardbus slot the
system hangs. This problem has not been observed in systems with a 2.8GHz
XEON CPU or faster.

Analysis of the cbb driver shows functional interrupts are routed to PCI
BEFORE the interrupt handler for functional interrupts has been registered.

Fix applied as described in the bug.

PR: 128040
Submitted by: Arthur Hartwig
This commit is contained in:
Warner Losh 2019-01-07 05:59:58 +00:00
parent f871c5d99d
commit 7afbd60504
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342842

View file

@ -275,6 +275,8 @@ cbb_enable_func_intr(struct cbb_softc *sc)
reg = (exca_getb(&sc->exca[0], EXCA_INTR) & ~EXCA_INTR_IRQ_MASK) |
EXCA_INTR_IRQ_NONE;
exca_putb(&sc->exca[0], EXCA_INTR, reg);
PCI_MASK_CONFIG(sc->dev, CBBR_BRIDGECTRL,
& ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2);
}
int
@ -873,8 +875,6 @@ cbb_power(device_t brdev, int volts)
reg_ctrl &= ~TOPIC97_REG_CTRL_CLKRUN_ENA;
pci_write_config(sc->dev, TOPIC_REG_CTRL, reg_ctrl, 4);
}
PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL,
& ~CBBM_BRIDGECTRL_INTR_IREQ_ISA_EN, 2);
retval = 1;
done:;
if (volts != 0 && sc->chipset == CB_O2MICRO)