qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] ide: cmd_exec_dev_diagnostic() always set err


From: Michael Tokarev
Subject: Re: [Qemu-trivial] [PATCH] ide: cmd_exec_dev_diagnostic() always set error register to 0x01
Date: Wed, 15 Jan 2014 20:15:09 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

25.12.2013 18:17, David du Colombier wrote:
> 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.

While this is a one-liner, I'm not sure it is "trivial enough", just because
it is not at all obvious we shuold clear error here and not somewhere else.
I mean, shouldn't s->error be cleared somewhere when next request is queued,
or something like that?

That's basically why I haven't applied this initially.

CC'ing qemu-devel.

Thanks,

/mjt

> Thanks to RĂ©mi Pommarel for reporting this issue.
> 
> Signed-off-by: David du Colombier <address@hidden>
> ---
>  hw/ide/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index e1f4c33..7783d58 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!
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]