diff options
author | jimharris <jimharris@FreeBSD.org> | 2013-03-26 21:00:18 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2013-03-26 21:00:18 +0000 |
commit | 3c0b8367a2ce30c62befa431e1720df65cfc1f49 (patch) | |
tree | ad79338c72d5a2294eab91a297a57e1b956519e0 /sys/dev/nvme/nvme_test.c | |
parent | d0a775e7949e871c4beabbef339069ca9560c538 (diff) | |
download | FreeBSD-src-3c0b8367a2ce30c62befa431e1720df65cfc1f49.zip FreeBSD-src-3c0b8367a2ce30c62befa431e1720df65cfc1f49.tar.gz |
Create struct nvme_status.
NVMe error log entries include status, so breaking this out into
its own data structure allows it to be included in both the
nvme_completion data structure as well as error log entry data
structures.
While here, expose nvme_completion_is_error(), and change all of
the places that were explicitly looking at sc/sct bits to use this
macro instead.
Sponsored by: Intel
Reviewed by: carl
Diffstat (limited to 'sys/dev/nvme/nvme_test.c')
-rw-r--r-- | sys/dev/nvme/nvme_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/nvme/nvme_test.c b/sys/dev/nvme/nvme_test.c index 4177227..93e2ed9 100644 --- a/sys/dev/nvme/nvme_test.c +++ b/sys/dev/nvme/nvme_test.c @@ -172,14 +172,14 @@ nvme_ns_bio_test(void *arg) } static void -nvme_ns_io_test_cb(void *arg, const struct nvme_completion *status) +nvme_ns_io_test_cb(void *arg, const struct nvme_completion *cpl) { struct nvme_io_test_thread *tth = arg; struct timeval t; tth->io_completed++; - if (status->sf_sc || status->sf_sct) { + if (nvme_completion_is_error(cpl)) { printf("%s: error occurred\n", __func__); wakeup_one(tth); return; |