qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mateusz Albecki <mateusz.p.albecki@gmail.com>
To: qemu-devel@nongnu.org
Cc: jsnow@redhat.com, Mateusz Albecki <mateusz.albecki@outlook.com>,
	Mateusz Albecki <mateusz.p.albecki@gmail.com>
Subject: [PATCH 1/1] hw/ide/core.c: fix handling of unsupported commands
Date: Mon, 17 Apr 2023 00:28:38 +0200	[thread overview]
Message-ID: <20230416222838.36642-2-mateusz.p.albecki@gmail.com> (raw)
In-Reply-To: <20230416222838.36642-1-mateusz.p.albecki@gmail.com>

From: Mateusz Albecki <mateusz.albecki@outlook.com>

Current code will not call ide_cmd_done when aborting the unsupported
command which will lead to the command timeout on the driver side instead
of getting a D2H FIS with ABRT indication. This can lead to problems on the
driver side as the spec mandates that device should return a D2H FIS with
ABRT bit set in ERR register(from SATA 3.1 section 16.3.3.8.6)

Signed-off-by: Mateusz Albecki <mateusz.p.albecki@gmail.com>
---
 hw/ide/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 45d14a25e9..d7027bbd4d 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2146,6 +2146,7 @@ void ide_bus_exec_cmd(IDEBus *bus, uint32_t val)
 
     if (!ide_cmd_permitted(s, val)) {
         ide_abort_command(s);
+        ide_cmd_done(s);
         ide_bus_set_irq(s->bus);
         return;
     }
-- 
2.40.0



  reply	other threads:[~2023-04-16 22:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-16 22:28 [PATCH 0/1] hw/ide/core.c: fix handling of unsupported commands Mateusz Albecki
2023-04-16 22:28 ` Mateusz Albecki [this message]
2023-05-17 21:32   ` [PATCH 1/1] " John Snow
2023-05-22 21:16     ` Mateusz Albecki
2023-05-23 14:35       ` John Snow
2023-05-24  8:17         ` Niklas Cassel
2023-05-24 15:20           ` John Snow
2023-06-01 14:03             ` Niklas Cassel
2023-06-01 16:39               ` 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=20230416222838.36642-2-mateusz.p.albecki@gmail.com \
    --to=mateusz.p.albecki@gmail.com \
    --cc=jsnow@redhat.com \
    --cc=mateusz.albecki@outlook.com \
    --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).