diff options
author | John Snow <jsnow@redhat.com> | 2015-07-04 02:06:05 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2015-07-04 02:06:05 -0400 |
commit | 7c649ac5b607e2339fb54fc0fc01311ba5eacadd (patch) | |
tree | c8ac6784155bfcc4fd199d80153030e02e24395a /gdbstub.c | |
parent | 8146d7dc2756138bd4011e8d882ead929f25f2d0 (diff) | |
download | qemu-7c649ac5b607e2339fb54fc0fc01311ba5eacadd.zip qemu-7c649ac5b607e2339fb54fc0fc01311ba5eacadd.tar.gz qemu-7c649ac5b607e2339fb54fc0fc01311ba5eacadd.tar.bz2 |
ahci: fix sdb fis semantics
There are two things to fix here:
The first one is subtle: the PxSACT register in the AHCI HBA has different
semantics from the field it is shadowing, the ACT field in the
Set Device Bits FIS.
In the HBA register, PxSACT acts as a bitfield indicating outstanding
NCQ commands where a set bit indicates a pending NCQ operation. The FIS
field however operates as an RWC register update to PxSACT, where a set
bit indicates a *successfully* completed command.
Correct the FIS semantics. At the same time, move the "clear finished"
action to the SDB FIS generation instead of the register read to mimick
how the other shadow registers work, which always just report the last
reported value from a FIS, and not the most current values which may
not have been reported by a FIS yet.
Lastly and more simply, SATA 3.2 section 13.6.4.2 (and later sections)
all specify that the Interrupt bit for the SDB FIS should always be set
to one for NCQ commands. That's currently the only time we generate this
FIS, so set it on all the time.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1435767578-32743-16-git-send-email-jsnow@redhat.com
Diffstat (limited to 'gdbstub.c')
0 files changed, 0 insertions, 0 deletions