ahci: factor out FIS decomposition from handle_cmd
authorJohn Snow <jsnow@redhat.com>
Mon, 3 Nov 2014 23:56:19 +0000 (18:56 -0500)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 14 Nov 2014 09:20:35 +0000 (09:20 +0000)
commit107f0d4677e126b073d9b606788d2c126c520416
tree113ff9383c50a6620766077aa77c0844ade79809
parent102e56254dbf5f789e43d7eb29023f296cb67536
ahci: factor out FIS decomposition from handle_cmd

In order to make handle_cmd more readable at the macro level,
the details of how to decompose particular types of FIS packets
are left to helper functions.

In our case, the only type of FIS packet we currently expect to
see is a Register H2D FIS packet, but the gory details of its
decomposition are of no particular interest in handle_cmd.

This patch keeps the receipt of FIS packets and the decomposition
thereof separated to two different functions.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1415058979-16604-6-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/ide/ahci.c