yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-scsi-Support-TEST-UNIT-READY-in-the-dummy-LUN0.patch

9ae3a8
From 4dfa4b8a0adf2ff3b5f48426e5f293d4ccaa86ce Mon Sep 17 00:00:00 2001
9ae3a8
From: Fam Zheng <famz@redhat.com>
9ae3a8
Date: Wed, 29 Jan 2014 05:09:21 +0100
9ae3a8
Subject: [PATCH 03/28] scsi: Support TEST UNIT READY in the dummy LUN0
9ae3a8
9ae3a8
RH-Author: Fam Zheng <famz@redhat.com>
9ae3a8
Message-id: <1390972161-27425-1-git-send-email-famz@redhat.com>
9ae3a8
Patchwork-id: 57014
9ae3a8
O-Subject: [RHEL-7 qemu-kvm PATCH] scsi: Support TEST UNIT READY in the dummy LUN0
9ae3a8
Bugzilla: 1004143
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
From: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1004143
9ae3a8
Brew:     http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6965573
9ae3a8
9ae3a8
SeaBIOS waits for LUN0 to respond to the TEST UNIT READY command
9ae3a8
in order to decide whether it should part of the boot sequence.
9ae3a8
If LUN0 does not respond to the command, boot is delayed by up
9ae3a8
to 5 seconds.  This currently happens when there is no LUN0 on
9ae3a8
a target.  Fix that by adding a trivial implementation of the
9ae3a8
command.
9ae3a8
9ae3a8
Cc: qemu-stable@nongnu.org
9ae3a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
(cherry picked from commit 1cb27d9233d572826b45bd8498d2fab1b6f01df9)
9ae3a8
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
---
9ae3a8
 hw/scsi/scsi-bus.c | 2 ++
9ae3a8
 1 file changed, 2 insertions(+)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/scsi/scsi-bus.c |    2 ++
9ae3a8
 1 files changed, 2 insertions(+), 0 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
9ae3a8
index 0f02208..a0fbf06 100644
9ae3a8
--- a/hw/scsi/scsi-bus.c
9ae3a8
+++ b/hw/scsi/scsi-bus.c
9ae3a8
@@ -461,6 +461,8 @@ static int32_t scsi_target_send_command(SCSIRequest *req, uint8_t *buf)
9ae3a8
             r->req.dev->sense_is_ua = false;
9ae3a8
         }
9ae3a8
         break;
9ae3a8
+    case TEST_UNIT_READY:
9ae3a8
+        break;
9ae3a8
     default:
9ae3a8
         scsi_req_build_sense(req, SENSE_CODE(LUN_NOT_SUPPORTED));
9ae3a8
         scsi_req_complete(req, CHECK_CONDITION);
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8