diff options
author | Scott Long <scottl@FreeBSD.org> | 2005-04-25 22:11:43 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2005-04-25 22:11:43 +0000 |
commit | 20fc2576fe4ecb1236e5fa713fbd354bceebaf9b (patch) | |
tree | f04d673092304299cc6823f616c8abb67ce913bd /sys/dev/esp | |
parent | 379ad2436980d8b512fb42a4029291450ebe643d (diff) | |
download | src-20fc2576fe4ecb1236e5fa713fbd354bceebaf9b.tar.gz src-20fc2576fe4ecb1236e5fa713fbd354bceebaf9b.zip |
Apply a torniquet to the problem of the drive unexpectedly disconnecting
during a data phase. Before, we would try to recover the autosense, but
the DMA engine would still be active with interrupted transfer, and we'd
quickly spiral out of control and cause massive data corruption. For now,
just reset the chip and cancel everything. The better solution is to
cancel the DMA operation, but there is no clear way to do that right now.
The data corruption problem is severe enough to warrant this fix in the
interim. Thanks to Kris Kenneway to sacrificing countless filesystems to
this bug.
MFC After: 3 days
Notes
Notes:
svn path=/head/; revision=145535
Diffstat (limited to 'sys/dev/esp')
-rw-r--r-- | sys/dev/esp/ncr53c9x.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index f9f08b4e4f74..9d587a75f1b1 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -2330,7 +2330,15 @@ again: sc->sc_espintr, sc->sc_espstat, sc->sc_phase, sc->sc_prevphase); - if ((ecb->flags & ECB_SENSE) != 0) { + /* + * XXX This will cause a chip reset and will + * prevent us from finding out the real + * problem with the device. However, it's + * neccessary until a way can be found to + * safely cancel the DMA that is in + * progress. + */ + if (1 || (ecb->flags & ECB_SENSE) != 0) { printf("resetting\n"); goto reset; } |