hw/scsi/lsi53c895a: stop script on phase mismatch
commita9198b3132d81a6bfc9fdbf6f3d3a514c2864674
authorSven Schnelle <svens@stackframe.org>
Sat, 2 Mar 2024 21:44:53 +0000 (2 22:44 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 Mar 2024 14:51:21 +0000 (8 15:51 +0100)
tree02f24ce90c6d59a1c384e792989a2ecf44a9d8fa
parent5d402bd9aef3fdf9fbaa387db8be8318c9a37d0a
hw/scsi/lsi53c895a: stop script on phase mismatch

Netbsd isn't happy with qemu lsi53c895a emulation:

cd0(esiop0:0:2:0): command with tag id 0 reset
esiop0: autoconfiguration error: phase mismatch without command
esiop0: autoconfiguration error: unhandled scsi interrupt, sist=0x80 sstat1=0x0 DSA=0x23a64b1 DSP=0x50

This is because lsi_bad_phase() triggers a phase mismatch, which
stops SCRIPT processing. However, after returning to
lsi_command_complete(), SCRIPT is restarted with lsi_resume_script().
Fix this by adding a return value to lsi_bad_phase(), and only resume
script processing when lsi_bad_phase() didn't trigger a host interrupt.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Tested-by: Helge Deller <deller@gmx.de>
Message-ID: <20240302214453.2071388-1-svens@stackframe.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/lsi53c895a.c