[nvmewin] final block for NVMeInitialize

Luse, Paul E paul.e.luse at intel.com
Fri Aug 17 08:23:37 PDT 2012


Sorry, didn't send the final one... corrected below

From: Luse, Paul E
Sent: Friday, August 17, 2012 8:21 AM
To: nvmewin at lists.openfabrics.org
Subject: final block for NVMeInitialize


I'll pass this along to Ray later today, wanted to give everyone one last chance to review...


    CC.AsUlong =
        StorPortReadRegisterUlong(pAE, (PULONG)(&pAE->pCtrlRegister->CC));

    if (CC.EN == 1) {
        NVMe_CONTROLLER_STATUS CSTS = {0};
        BOOLEAN timeOut = TRUE;
        ULONG time = 0;

        /*
         * Before we transition to 0, make sure the ctrl is actually RDY
         * NOTE:  Some HW implementations may not require this wait and
         * if not then it could be removed as waiting at this IRQL is
         * not recommended.  The spec is not clear on whether we need
         * to wait for RDY to transition EN back to 0 or not.
         */
         CSTS.AsUlong =
             StorPortReadRegisterUlong(pAE, &pAE->pCtrlRegister->CSTS.AsUlong);
         while (CSTS.RDY != 1) {
            NVMeCrashDelay(STORPORT_TIMER_CB_us);
            time += STORPORT_TIMER_CB_us;
            if (time > pAE->uSecCrtlTimeout) {
                return (FALSE);
            }
            CSTS.AsUlong =
                StorPortReadRegisterUlong(pAE, &pAE->pCtrlRegister->CSTS.AsUlong);
         };

        /* Now reset */
        CC.EN = 0;
        StorPortWriteRegisterUlong(pAE,
                                   (PULONG)(&pAE->pCtrlRegister->CC),
                                   CC.AsUlong);
    }

____________________________________
Paul Luse
Sr. Staff Engineer
PCG Server Software Engineering
Desk: 480.554.3688, Mobile: 480.334.4630

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20120817/98959d09/attachment.html>


More information about the nvmewin mailing list