svn commit: r274045 - head/usr.sbin/bhyve
Tycho Nightingale
tychon at FreeBSD.org
Mon Nov 3 12:55:32 UTC 2014
Author: tychon
Date: Mon Nov 3 12:55:31 2014
New Revision: 274045
URL: https://svnweb.freebsd.org/changeset/base/274045
Log:
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
Modified:
head/usr.sbin/bhyve/pci_ahci.c
Modified: head/usr.sbin/bhyve/pci_ahci.c
==============================================================================
--- head/usr.sbin/bhyve/pci_ahci.c Mon Nov 3 12:38:41 2014 (r274044)
+++ head/usr.sbin/bhyve/pci_ahci.c Mon Nov 3 12:55:31 2014 (r274045)
@@ -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;
+ }
}
}
More information about the svn-src-all
mailing list