ahci: Add slot parameter to wait_ci_ready

Instead of wait for hardcoded slot 0, add slot parameter.

Signed-off-by: Asias He <asias@cloudius-systems.com>
ahci: Add slot parameter to wait_cmd_poll and wait_cmd_irq

This is a preparation for next patch. We will need the slot number in
wait_cmd_poll and wait_cmd_irq.

Signed-off-by: Asias He <asias@cloudius-systems.com>
ahci: Use cmd_active and PORT_CI to indicate completion of cmd

This simplifies the cmd completion code a bit.

Signed-off-by: Asias He <asias@cloudius-systems.com>
ahci: Do not wait for device and command issue ready

Currently, only one cmd will be pending at most. The device is always
ready when we send the next cmd.

Signed-off-by: Asias He <asias@cloudius-systems.com>
ahci: Do no write PORT_SACT

Writing to PORT_SACT is need for NCQ cmd only.

Signed-off-by: Asias He <asias@cloudius-systems.com>
ahci: Remove commented-out code

This line is useless.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Merge branch 'ahci.cleanup' of https://github.com/asias/osv

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>