]> www.infradead.org Git - users/hch/nvme-cli.git/commit
Correct self-test-log output
authorekohande <abe.kohandel@intel.com>
Thu, 19 Sep 2019 01:20:34 +0000 (18:20 -0700)
committerekohande <abe.kohandel@intel.com>
Thu, 19 Sep 2019 06:23:44 +0000 (23:23 -0700)
commitc9c7a8889a6dd515efea1aa5477dc368c9f89302
tree646ed105bc43ab85297fafbe8ad2e3abe78a0eab
parent611f10cdd8db8843be9069c973c83a96f12ccd5a
Correct self-test-log output

Changes determination of Device Self-Test in progress to be based on the
Current Device Self-Test Operation field as opposed to the Current
Device Self-Test Completion field.

Current implementation assumes that the Current Device Self-Test
Completion field will be 100% when no Device Self-Test operation is in
progress. This is an unsafe assumption as the NVMe Specification
explicitly specifies that the Current Device Self-Test Completion field
is invalid when no Device Self-Test operation in progress as indicated
by a value of 0 in the Current Device Self-Test Operation field.

A safe assumption is to use the Current Device Self-Test Operation field
which will be 0 when no Device Self-Test operation is in progress.

Signed-off-by: ekohande <abe.kohandel@intel.com>
nvme.c