Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2013 21:42:53 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248764 - head/sys/dev/nvme
Message-ID:  <201303262142.r2QLgr0J024120@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Tue Mar 26 21:42:53 2013
New Revision: 248764
URL: http://svnweb.freebsd.org/changeset/base/248764

Log:
  Set Pre-boot Software Load Count to 0 at the end of the controller
  start process.
  
  The spec indicates the OS driver should use Set Features (Software
  Progress Marker) to set the pre-boot software load count to 0
  after the OS driver has successfully been initialized.  This allows
  pre-boot software to determine if there have been any issues with the
  OS loading.
  
  Sponsored by:	Intel
  Reviewed by:	carl

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c	Tue Mar 26 21:19:26 2013	(r248763)
+++ head/sys/dev/nvme/nvme_ctrlr.c	Tue Mar 26 21:42:53 2013	(r248764)
@@ -762,6 +762,16 @@ nvme_ctrlr_start(void *ctrlr_arg)
 
 	for (i = 0; i < ctrlr->num_io_queues; i++)
 		nvme_io_qpair_enable(&ctrlr->ioq[i]);
+
+	/*
+	 * Clear software progress marker to 0, to indicate to pre-boot
+	 *  software that OS driver load was successful.
+	 *
+	 * Chatham does not support this feature.
+	 */
+	if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID)
+		nvme_ctrlr_cmd_set_feature(ctrlr,
+		    NVME_FEAT_SOFTWARE_PROGRESS_MARKER, 0, NULL, 0, NULL, NULL);
 }
 
 void



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