From 3c0b8367a2ce30c62befa431e1720df65cfc1f49 Mon Sep 17 00:00:00 2001 From: jimharris Date: Tue, 26 Mar 2013 21:00:18 +0000 Subject: 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 --- sys/dev/nvme/nvme_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/nvme/nvme_test.c') 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; -- cgit v1.1