summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authortychon <tychon@FreeBSD.org>2014-11-03 12:55:31 +0000
committertychon <tychon@FreeBSD.org>2014-11-03 12:55:31 +0000
commitdc557cbaff80ead79a64bf34fcf8c27d739da9b1 (patch)
tree4358453a6123acd76ec8c746dbb70ad3a415457a /usr.sbin
parent16333ed6a92bb27cc94dda0ac74b3931730c5943 (diff)
downloadFreeBSD-src-dc557cbaff80ead79a64bf34fcf8c27d739da9b1.zip
FreeBSD-src-dc557cbaff80ead79a64bf34fcf8c27d739da9b1.tar.gz
If the start bit, PxCMD.ST, is cleared and nothing is in-flight then
PxCI, PxSACT, PxCMD.CCS and PxCMD.CR should be 0. Reviewed by: grehan
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/pci_ahci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c
index 42aa0b3..ab40854 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -367,11 +367,15 @@ ahci_check_stopped(struct ahci_port *p)
{
/*
* If we are no longer processing the command list and nothing
- * is in-flight, clear the running bit.
+ * is in-flight, clear the running bit, the current command
+ * slot, the command issue and active bits.
*/
if (!(p->cmd & AHCI_P_CMD_ST)) {
- if (p->pending == 0)
+ if (p->pending == 0) {
p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK);
+ p->ci = 0;
+ p->sact = 0;
+ }
}
}
OpenPOWER on IntegriCloud