svn commit: r354579 - head/sys/arm/broadcom/bcm2835
Kyle Evans
kevans at FreeBSD.org
Sun Nov 10 03:06:04 UTC 2019
Author: kevans
Date: Sun Nov 10 03:06:03 2019
New Revision: 354579
URL: https://svnweb.freebsd.org/changeset/base/354579
Log:
bcm2835_sdhci: don't panic in DMA interrupt if curcmd went away
This is an exceptional case; generally found during controller errors.
A panic when we attempt to acess slot->curcmd->data is less ideal than
warning, and other verbiage will be emitted to indicate the exact error.
Modified:
head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Nov 10 02:31:29 2019 (r354578)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Nov 10 03:06:03 2019 (r354579)
@@ -570,6 +570,13 @@ bcm_sdhci_dma_intr(int ch, void *arg)
mtx_lock(&slot->mtx);
+ if (slot->curcmd == NULL) {
+ mtx_unlock(&slot->mtx);
+ device_printf(sc->sc_dev,
+ "command aborted in the middle of DMA\n");
+ return;
+ }
+
/*
* If there are more segments for the current dma, start the next one.
* Otherwise unload the dma map and decide what to do next based on the
More information about the svn-src-all
mailing list