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.
This commit is contained in:
Kyle Evans 2019-11-10 03:06:03 +00:00
parent 27961ea525
commit da30baba4a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354579

View File

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