From 4bd55c43ea6e3ff5ae3f5ea340e16807ca914104 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 22 Apr 2005 03:37:10 +0000 Subject: [PATCH] If we get interrupted during a data phase and the DMA engine is still pumping data despite our scsi data counters being at 0, something has gone massively wrong. The consequence of happily ignoring this is more DMA phase errors and a disk full of spammed sectors. Instead, panic on the first occurance to hopefully limit the damage. MFC After: 3 days --- sys/dev/esp/ncr53c9x.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 8523a4b623c..f9f08b4e4f7 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -2228,6 +2228,11 @@ again: * a DATA transfer. Print a diagnostic * if the DMA counter and TC bit * appear to be out of sync. + * + * XXX This is fatal and usually means that + * the DMA engine is hopelessly out of + * sync with reality. A disk is likely + * getting spammed at this point. */ device_printf(sc->sc_dev, "!TC on DATA XFER" " [intr %x, stat %x, step %d]" @@ -2237,6 +2242,7 @@ again: sc->sc_espstep, sc->sc_prevphase, ecb ? ecb->dleft : -1); + panic("esp: unrecoverable DMA error"); } } }