aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2017-04-26 17:18:08 +0300
committerKevin O'Connor <kevin@koconnor.net>2017-05-02 19:57:04 -0400
commit11277846e819b9eef3db5ac833a6a47f95f5ef15 (patch)
treeb5ce85926acbde9a8c87f020a5ca2239b31e0c50 /src
parentcf480dd3edd851db8ad62342937e25c064960b31 (diff)
downloadseabios-11277846e819b9eef3db5ac833a6a47f95f5ef15.tar.gz
lsi-scsi: reset in case of a serious problem
When the device reports a serious problem via SIST[01] registers, it needs to be reset, otherwise the following requests will most likely fail, too. In particular, REPORT LUNS which fails (wrongly) with underflow in QEMU makes all the following requests fail, too, rendering the device unusable. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Diffstat (limited to 'src')
-rw-r--r--src/hw/lsi-scsi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c
index b63430dc..d2649930 100644
--- a/src/hw/lsi-scsi.c
+++ b/src/hw/lsi-scsi.c
@@ -116,6 +116,8 @@ lsi_scsi_process_op(struct disk_op_s *op)
u8 sist0 = inb(iobase + LSI_REG_SIST0);
u8 sist1 = inb(iobase + LSI_REG_SIST1);
if (sist0 || sist1) {
+ /* serious problem, can't continue w/o reset */
+ outb(LSI_ISTAT0_SRST, iobase + LSI_REG_ISTAT0);
goto fail;
}
if (dstat & 0x04) {