Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2015 15:34:03 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r285916 - stable/10/sbin/nvmecontrol
Message-ID:  <201507271534.t6RFY3Z9024488@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Mon Jul 27 15:34:02 2015
New Revision: 285916
URL: https://svnweb.freebsd.org/changeset/base/285916

Log:
  MFC r285796:
  
    nvmecontrol: read controller identify data before any log page operations
  
  Sponsored by:	Intel

Modified:
  stable/10/sbin/nvmecontrol/logpage.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/nvmecontrol/logpage.c
==============================================================================
--- stable/10/sbin/nvmecontrol/logpage.c	Mon Jul 27 15:32:37 2015	(r285915)
+++ stable/10/sbin/nvmecontrol/logpage.c	Mon Jul 27 15:34:02 2015	(r285916)
@@ -298,6 +298,8 @@ logpage(int argc, char *argv[])
 		open_dev(argv[optind], &fd, 1, 1);
 	}
 
+	read_controller_data(fd, &cdata);
+
 	/*
 	 * The log page attribtues indicate whether or not the controller
 	 * supports the SMART/Health information log page on a per
@@ -307,7 +309,6 @@ logpage(int argc, char *argv[])
 		if (log_page != NVME_LOG_HEALTH_INFORMATION)
 			errx(1, "log page %d valid only at controller level",
 			    log_page);
-		read_controller_data(fd, &cdata);
 		if (cdata.lpa.ns_smart == 0)
 			errx(1,
 			    "controller does not support per namespace "



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