[nvmewin] final block for NVMeInitialize
Luse, Paul E
paul.e.luse at intel.com
Fri Aug 17 08:20:44 PDT 2012
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.
*/
while (CSTS.RDY != 1) {
CSTS.AsUlong =
StorPortReadRegisterUlong(pAE, &pAE->pCtrlRegister->CSTS.AsUlong);
NVMeCrashDelay(STORPORT_TIMER_CB_us);
time += STORPORT_TIMER_CB_us;
if (time > pAE->uSecCrtlTimeout) {
return (FALSE);
}
};
/* 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/470aadfc/attachment.html>
More information about the nvmewin
mailing list