esp: correctly terminate successful SCSI commands

An upcoming series for QEMU's ESP emulation will check that ESP commands are
only issued according to their valid states as listed in the datasheet, and
otherwise generate an illegal command interrupt.

Currently if a SCSI command is expected to return no data or transfers data
successfully, the ASC is not returned to its disconnected state. This means
that any subsequent ESP initiator commands should be rejected until the SCSI
bus transaction is terminated.

Update the ESP driver so that if a SCSI command is successful then the ICCS
and MSGACC commands are issued by the host to complete the SCSI transaction.
This ensures that the ASC is returned to the disconnected state which allows
the ESP to accept subsequent SCSI commands without generating an illegal
command interrupt.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
1 file changed