summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-07-17 23:26:56 +0000
committerjimharris <jimharris@FreeBSD.org>2013-07-17 23:26:56 +0000
commit9f183750a611ee65b8ae05f76c9d14a5228cdb1a (patch)
tree7b7fb70a5c3c6357db945e7ffdac45c5215874f9 /sys/dev
parent8281445679a1a40c3039155ced18766cc7635428 (diff)
downloadFreeBSD-src-9f183750a611ee65b8ae05f76c9d14a5228cdb1a.zip
FreeBSD-src-9f183750a611ee65b8ae05f76c9d14a5228cdb1a.tar.gz
Use pause() instead of DELAY() when polling for completion of admin
commands during controller initialization. DELAY() does not work here during config_intrhook context - we need to explicitly relinquish the CPU for the admin command completion to get processed. Sponsored by: Intel Reported by: Adam Brooks <adam.j.brooks@intel.com> Reviewed by: carl MFC after: 3 days
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 32b7448..1338f15 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -455,7 +455,7 @@ nvme_ctrlr_identify(struct nvme_controller *ctrlr)
nvme_ctrlr_cmd_identify_controller(ctrlr, &ctrlr->cdata,
nvme_completion_poll_cb, &status);
while (status.done == FALSE)
- DELAY(5);
+ pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_identify_controller failed!\n");
return (ENXIO);
@@ -487,7 +487,7 @@ nvme_ctrlr_set_num_qpairs(struct nvme_controller *ctrlr)
nvme_ctrlr_cmd_set_num_queues(ctrlr, ctrlr->num_io_queues,
nvme_completion_poll_cb, &status);
while (status.done == FALSE)
- DELAY(5);
+ pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_set_num_queues failed!\n");
return (ENXIO);
@@ -540,7 +540,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr)
nvme_ctrlr_cmd_create_io_cq(ctrlr, qpair, qpair->vector,
nvme_completion_poll_cb, &status);
while (status.done == FALSE)
- DELAY(5);
+ pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_create_io_cq failed!\n");
return (ENXIO);
@@ -550,7 +550,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr)
nvme_ctrlr_cmd_create_io_sq(qpair->ctrlr, qpair,
nvme_completion_poll_cb, &status);
while (status.done == FALSE)
- DELAY(5);
+ pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_create_io_sq failed!\n");
return (ENXIO);
OpenPOWER on IntegriCloud