HomeFreeBSD

bcm2835_sdhci: don't use DMA for kernel dumps

Description

bcm2835_sdhci: don't use DMA for kernel dumps

When handling a data irq, the sdhci driver calls the
sdhci_platform_will_handle() method, to determine if it should allow the
platform driver to handle the transfer or fall back to programmed I/O.
While dumping, the data irq path may be invoked directly (not from an
interrupt context), which the bcm2835_sdhci DMA code is not prepared to
handle. Return early in this case, to force the fallback to PIO.

Otherwise, the KASSERT that follows will be triggered, and the dump will
fail. On non-INVARIANTS kernels, the system will hang, waiting for a DMA
interrupt that will never arrive.

Reviewed by: kevans
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31893

Details

Provenance
mhorneAuthored on Sep 9 2021, 6:07 PM
Reviewer
kevans
Differential Revision
D31893: bcm2835_sdhci: don't use DMA for kernel dumps
Parents
rG0b79a76f8487: sctp: improve consistency when calling stream scheduler
Branches
Unknown
Tags
Unknown