diff options
author | jimharris <jimharris@FreeBSD.org> | 2015-07-27 15:34:02 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2015-07-27 15:34:02 +0000 |
commit | c7ba7d86bd0efb17c6050754c53545cfa03168f9 (patch) | |
tree | 0398ba3e117d9b74712d37e4114f8aa05f1da1f4 | |
parent | 6e669fcd5fcfae645821748bce9ce554e5ac1024 (diff) | |
download | FreeBSD-src-c7ba7d86bd0efb17c6050754c53545cfa03168f9.zip FreeBSD-src-c7ba7d86bd0efb17c6050754c53545cfa03168f9.tar.gz |
MFC r285796:
nvmecontrol: read controller identify data before any log page operations
Sponsored by: Intel
-rw-r--r-- | sbin/nvmecontrol/logpage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index e330988..ac443bb 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -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 " |