Date: Wed, 24 Jul 2013 22:42:00 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253627 - stable/9/sys/dev/nvme Message-ID: <201307242242.r6OMg0pO036842@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Wed Jul 24 22:42:00 2013 New Revision: 253627 URL: http://svnweb.freebsd.org/changeset/base/253627 Log: MFC r253438: 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. Approved by: re (kib) Sponsored by: Intel Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ctrlr.c Wed Jul 24 22:40:34 2013 (r253626) +++ stable/9/sys/dev/nvme/nvme_ctrlr.c Wed Jul 24 22:42:00 2013 (r253627) @@ -455,7 +455,7 @@ nvme_ctrlr_identify(struct nvme_controll 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_co 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_con 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_con 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307242242.r6OMg0pO036842>