ahci: add get_cmd_header helper
commitee364416c1b5ed1adc779ca7197451a131666236
authorJohn Snow <jsnow@redhat.com>
Sat, 4 Jul 2015 06:06:05 +0000 (4 02:06 -0400)
committerJohn Snow <jsnow@redhat.com>
Sat, 4 Jul 2015 06:06:05 +0000 (4 02:06 -0400)
tree5c4de8bc5714c00e6c0dd1cec79f34750decf537
parentc82bd3c893825fc76af3634f5461f5eabd94e9df
ahci: add get_cmd_header helper

cur_cmd is an internal bookmark that points to the
current AHCI Command Header being processed by the
AHCI state machine. With NCQ needing to occasionally
rely on some of the same AHCI helpers, we cannot use
cur_cmd and will need to grab explicit pointers instead.

In an attempt to begin relying on the cur_cmd pointer
less, add a helper to let us specifically get the pointer
to the command header of particular interest.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1435767578-32743-12-git-send-email-jsnow@redhat.com
hw/ide/ahci.c