qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, Alexander Bulekov <alxndr@bu.edu>,
	John Snow <jsnow@redhat.com>,
	qemu-block@nongnu.org, philmd@redhat.com
Subject: [PATCH 6/7] ide: clear interrupt on command write
Date: Fri, 24 Jul 2020 01:22:59 -0400	[thread overview]
Message-ID: <20200724052300.1163728-7-jsnow@redhat.com> (raw)
In-Reply-To: <20200724052300.1163728-1-jsnow@redhat.com>

Not known to fix any bug, but I couldn't help but notice that ATA
specifies that writing to this register should clear an interrupt.

ATA7: Section 5.3.3 (Command register - Effect)
ATA6: Section 7.4.4 (Command register - Effect)
ATA5: Section 7.4.4 (Command register - Effect)
ATA4: Section 7.4.4 (Command register - Effect)
ATA3: Section 5.2.2 (Command register)

Other editions: try searching for the phrase "Writing this register".

Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 5f4f004312..e4c69a7fde 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1312,6 +1312,7 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
     default:
     case ATA_IOPORT_WR_COMMAND:
         ide_clear_hob(bus);
+        qemu_irq_lower(bus->irq);
         ide_exec_cmd(bus, val);
         break;
     }
-- 
2.26.2



  parent reply	other threads:[~2020-07-24  5:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  5:22 [PATCH 0/7] IDE: SRST and other fixes John Snow
2020-07-24  5:22 ` [PATCH 1/7] ide: rename cmd_write to ctrl_write John Snow
2020-07-24  6:16   ` Philippe Mathieu-Daudé
2020-07-24  5:22 ` [PATCH 2/7] ide: don't tamper with the device register John Snow
2020-07-24  5:22 ` [PATCH 3/7] ide: model HOB correctly John Snow
2020-07-24  5:22 ` [PATCH 4/7] ide: reorder set/get sector functions John Snow
2020-07-24  6:17   ` Philippe Mathieu-Daudé
2020-07-24  5:22 ` [PATCH 5/7] ide: remove magic constants from the device register John Snow
2020-07-24  5:22 ` John Snow [this message]
2020-07-24  5:23 ` [PATCH 7/7] ide: cancel pending callbacks on SRST John Snow

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=20200724052300.1163728-7-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alxndr@bu.edu \
    --cc=kwolf@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).