hw/scsi/lsi53c895a: add timer to scripts processing
commit9876359990dd4c8a48de65cf5e1c3d13e96a7f4e
authorSven Schnelle <svens@stackframe.org>
Thu, 29 Feb 2024 20:44:07 +0000 (29 21:44 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 Mar 2024 14:51:21 +0000 (8 15:51 +0100)
tree1f7fd2a3d95a0aabe59f28872a1219d401fa7772
parent8f6330a807f2642dc2a3cdf33347aa28a4c00a87
hw/scsi/lsi53c895a: add timer to scripts processing

HP-UX 10.20 seems to make the lsi53c895a spinning on a memory location
under certain circumstances. As the SCSI controller and CPU are not
running at the same time this loop will never finish. After some
time, the check loop interrupts with a unexpected device disconnect.
This works, but is slow because the kernel resets the scsi controller.
Instead of signaling UDC, start a timer and exit the loop. Until the
timer fires, the CPU can process instructions which might changes the
memory location.

The limit of instructions is also reduced because scripts running on
the SCSI processor are usually very short. This keeps the time until
the loop is exit short.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-ID: <20240229204407.1699260-1-svens@stackframe.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/lsi53c895a.c
hw/scsi/trace-events