qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] PATCH: ide.c: send irq for WIN_DIAGNOSE
Date: Fri, 30 Nov 2007 08:12:12 -0600	[thread overview]
Message-ID: <20071130141212.GB28369@tapir> (raw)
In-Reply-To: <375D8547-0185-445A-9C24-FE51C1CB86AA@adacore.com>

On Thu, Nov 29, 2007 at 05:46:08PM +0100, Tristan Gingold wrote:
> On Nov 29, 2007, at 4:07 PM, Carlo Marcelo Arenas Belon wrote:
> >On Thu, Nov 29, 2007 at 02:05:36PM +0100, Tristan Gingold wrote:
> 
> >>  The pending interrupt condition shall be set by:
> >>  ??? the completion of a command; or
> >>
> >>This patch sends an irq for WIN_DIAGNOSE (and WIN_SRST)
> >
> >DEVICE RESET or DEVICE DIAGNOSTIC in T13/1153D revision 18 don't  
> >ask for an
> >irq.
> 
> Well, not just after the command is executed.  But according to 9.5.1  
> of 1153D:
> 
> l) After completing the above steps, Device 0 shall assert INTRQ if  
> nIEN is cleared to zero.
> 
> So the IRQ is asserted at the end of diagnostic.

right my bad, missed that on my copy of ATA-4 while looking for a match to
your description of the mis-implementation, but why are you asserting one
also for the reset?

If I am reading the spec and the code right, the patch should be instead :

Index: hw/ide.c
===================================================================
RCS file: /sources/qemu/qemu/hw/ide.c,v
retrieving revision 1.72
diff -u -r1.72 ide.c
--- hw/ide.c	18 Nov 2007 01:44:37 -0000	1.72
+++ hw/ide.c	30 Nov 2007 14:02:33 -0000
@@ -2042,6 +2053,7 @@
             ide_set_signature(s);
             s->status = 0x00; /* NOTE: READY is _not_ set */
             s->error = 0x01;
+            ide_set_irq(s);
             break;
         case WIN_SRST:
             if (!s->is_cdrom)

> >what is the use case you are trying to solve? which guest OS?
> 
> The OS timeout during diagnostic.

is there a way to reproduce that timeout on the guest OS you are using?
if using Linux and smartctl, you will get a timeout but not because of this
but because SMART is not supported (which might be also a bug, but at least
not this bug)

Carlo

  reply	other threads:[~2007-11-30 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 13:05 [Qemu-devel] PATCH: ide.c: send irq for WIN_DIAGNOSE Tristan Gingold
2007-11-29 15:07 ` Carlo Marcelo Arenas Belon
2007-11-29 16:46   ` Tristan Gingold
2007-11-30 14:12     ` Carlo Marcelo Arenas Belon [this message]
2007-12-03  9:04       ` Tristan Gingold
2007-12-10 15:29       ` Tristan Gingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071130141212.GB28369@tapir \
    --to=carenas@sajinet.com.pe \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).