qemu-stable
[Top][All Lists]
Advanced

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

Re: [Stable-7.2.6 29/37] hw/ide/ahci: PxCI should not get cleared when E


From: Michael Tokarev
Subject: Re: [Stable-7.2.6 29/37] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set
Date: Mon, 11 Sep 2023 00:07:52 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

09.09.2023 16:04, Michael Tokarev wrote:
From: Niklas Cassel <niklas.cassel@wdc.com>

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>
Mjt: fix context in hw/ide/ahci.c for f63192b0544af5 (qemu_bh_new_guarded)

This one's interesting.  I looked at f63192b0544af5 and remember there's
this series to prevent dma/mmio reentrancy issues.  And gave it a try
on top of this 7.2 series (I already had the reentrancy fixes backported
to 7.2 in a separate branch, now added 3 more fixes in that area).  And
with these reentrancy fixes there's no need to context fixing here, it
applies cleanly right into the spot.  So I re-applied this change from
the original commit, unedited.

Dunno what to do with 8.0 version of it, - will most likely keep it with
context tweak, - although I prepared reentrancy fixes for 8.0 too.

/mjt



reply via email to

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