[nvmewin] final block for NVMeInitialize
Luse, Paul E
paul.e.luse at intel.com
Fri Aug 17 08:40:40 PDT 2012
And I won't check in the extra timeOut var either (deleted below) J
From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Luse, Paul E
Sent: Friday, August 17, 2012 8:24 AM
To: nvmewin at lists.openfabrics.org
Subject: Re: [nvmewin] final block for NVMeInitialize
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<mailto: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};
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/d75249f8/attachment.html>
More information about the nvmewin
mailing list