Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2014 12:55:32 +0000 (UTC)
From:      Tycho Nightingale <tychon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274045 - head/usr.sbin/bhyve
Message-ID:  <201411031255.sA3CtWj0086506@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
+		}
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411031255.sA3CtWj0086506>