Author: mav
Date: Mon Apr 15 16:24:26 2019
New Revision: 346240
URL: https://svnweb.freebsd.org/changeset/base/346240

Log:
  MFC r340412: Use atomic_load_acq_int() here too to poll done, ala r328521

Modified:
  stable/11/sys/dev/nvme/nvme_ns.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/nvme/nvme_ns.c
==============================================================================
--- stable/11/sys/dev/nvme/nvme_ns.c    Mon Apr 15 16:23:57 2019        
(r346239)
+++ stable/11/sys/dev/nvme/nvme_ns.c    Mon Apr 15 16:24:26 2019        
(r346240)
@@ -516,11 +516,11 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t 
        if (!mtx_initialized(&ns->lock))
                mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF);
 
-       status.done = FALSE;
+       status.done = 0;
        nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data,
            nvme_completion_poll_cb, &status);
-       while (status.done == FALSE)
-               DELAY(5);
+       while (!atomic_load_acq_int(&status.done))
+               pause("nvme", 1);
        if (nvme_completion_is_error(&status.cpl)) {
                nvme_printf(ctrlr, "nvme_identify_namespace failed\n");
                return (ENXIO);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to