Blob Blame History Raw
From b4e9b91cce5952bb67a235490ad5f6bdb6b73ed5 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Thu, 16 Jul 2015 16:15:59 +0200
Subject: [PATCH 2/3] ide/atapi: Fix START STOP UNIT command completion

Message-id: <1437056160-3284-3-git-send-email-kwolf@redhat.com>
Patchwork-id: n/a
O-Subject: [virt-devel] [RHEL/RHEV-7 qemu-kvm(-rhev) EMBARGOED PATCH 2/3]
        ide/atapi: Fix START STOP UNIT command completion
Bugzilla: 1243689
RH-Acked-by: Petr Matousek <pmatouse@redhat.com>
RH-Acked-by: John Snow <jsnow@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>

The command must be completed on all code paths. START STOP UNIT with
pwrcnd set should succeed without doing anything.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/ide/atapi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 05e60b1..f6d66a0 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -879,6 +879,7 @@ static void cmd_start_stop_unit(IDEState *s, uint8_t* buf)
 
     if (pwrcnd) {
         /* eject/load only happens for power condition == 0 */
+        ide_atapi_cmd_ok(s);
         return;
     }
 
-- 
1.8.3.1