esp: store lun coming from the MESSAGE OUT phase
commit4eb86065603400fe27c17a346985a97b489b55d4
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Jun 2021 11:38:58 +0000 (11 13:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Jun 2021 15:17:09 +0000 (15 17:17 +0200)
tree3d2a8bdc2fa00e5ea5e4159346373f24e26d9bf9
parent0bcd5a18940e1c1e3350b93cfadcdc6b58ca1c0e
esp: store lun coming from the MESSAGE OUT phase

The LUN is selected with an IDENTIFY message, and persists
until the next message out phase.  Instead of passing it to
do_busid_cmd, store it in ESPState.  Because do_cmd can simply
skip the message out phase if cmdfifo_cdb_offset is zero, it
can now be used for the S without ATN cases as well.

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/esp.c
hw/scsi/trace-events
include/hw/scsi/esp.h