]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set
authorNiklas Cassel <niklas.cassel@wdc.com>
Fri, 9 Jun 2023 14:08:42 +0000 (16:08 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Sep 2023 16:39:58 +0000 (19:39 +0300)
commitf7cca09987983644d054fc4f4feb8414dcd624c5
tree212da7ff123117ba511182cc136573c5678ce43b
parent2eaf7775fc05d65c9254530ea0fdbbcf910c92cd
hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set

For NCQ, PxCI is cleared on command queued successfully.
For non-NCQ, PxCI is cleared on command completed successfully.
Successfully means ERR_STAT, BUSY and DRQ are all cleared.

A command that has ERR_STAT set, does not get to clear PxCI.
See AHCI 1.3.1, section 5.3.8, states RegFIS:Entry and RegFIS:ClearCI,
and 5.3.16.5 ERR:FatalTaskfile.

In the case of non-NCQ commands, not clearing PxCI is needed in order
for host software to be able to see which command slot that failed.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Message-id: 20230609140844.202795-7-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 1a16ce64fda11bdf50f0c4ab5d9fdde72c1383a2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/ide/ahci.c
tests/qtest/libqos/ahci.c
tests/qtest/libqos/ahci.h