From 850484a295a856474978d9338b8c17eb8e00f549 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 25 Dec 2013 15:17:43 +0100 Subject: ide: cmd_exec_dev_diagnostic() always set error register to 0x01 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This notably fix IDE CD probing on the Plan 9 operating system, which rely on the error register set by the Execute Device Diagnostic command to detect drive configurations. Thanks to RĂ©mi Pommarel for reporting this issue. Signed-off-by: David du Colombier <0intro@gmail.com> Signed-off-by: Michael Tokarev --- hw/ide/core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/ide') diff --git a/hw/ide/core.c b/hw/ide/core.c index e1f4c33fb8..7783d58291 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1321,6 +1321,7 @@ static bool cmd_exec_dev_diagnostic(IDEState *s, uint8_t cmd) s->status = 0; /* ATAPI spec (v6) section 9.10 defines packet * devices to return a clear status register * with READY_STAT *not* set. */ + s->error = 0x01; } else { s->status = READY_STAT | SEEK_STAT; /* The bits of the error register are not as usual for this command! -- cgit v1.2.1