]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
scsi: Support TEST UNIT READY in the dummy LUN0
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 16 Jan 2014 12:06:13 +0000 (13:06 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 21 Feb 2014 06:34:40 +0000 (00:34 -0600)
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>
(cherry picked from commit 1cb27d9233d572826b45bd8498d2fab1b6f01df9)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/scsi-bus.c

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