scsi: Support TEST UNIT READY in the dummy LUN0

SeaBIOS waits for LUN0 to respond to the TEST UNIT READY command
in order to decide whether it should part of the boot sequence.
If LUN0 does not respond to the command, boot is delayed by up
to 5 seconds.  This currently happens when there is no LUN0 on
a target.  Fix that by adding a trivial implementation of the
command.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2014-01-16 13:06:13 +01:00
parent dc6afb99b3
commit 1cb27d9233

View File

@ -469,6 +469,8 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
r->req.dev->sense_is_ua = false; r->req.dev->sense_is_ua = false;
} }
break; break;
case TEST_UNIT_READY:
break;
default: default:
scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED)); scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));
scsi_req_complete(req, CHECK_CONDITION); scsi_req_complete(req, CHECK_CONDITION);