[nvmewin] good spot to write to registry?
Freyensee, James P
james.p.freyensee at intel.com
Tue May 15 18:49:09 PDT 2012
Is there a good spot in the NVMe driver to write to the registry via NVMeWriteRegistry() when all the initialization and internal variables are set?
It seems like all initialization can end in NVMeInitialize() at the code:
if (pAE->ntldrDump == FALSE) {
/* Enumerate granted MSI/MSI-X messages if there is any */
if (NVMeEnumMsiMessages(pAE) == FALSE) {
NVMeFreeBuffers(pAE);
return (FALSE);
}
/* Call StorPortPassiveInitialization to enable passive init */
StorPortEnablePassiveInitialization(pAE, NVMePassiveInitialize);
return (TRUE);
and all the internal variables and tables are set in the driver at this point. However, if you wanted to write a value out to the registry before the return(), it will fail here in NVMeInitialize().
BUT, NVMeWriteRegistry() will succeed if called within NVMeFindAdapter(). However, not all the important, internal variables are set yet in this function. For example, pAE->ResMapTbl.NumMsiMsgGranted is not set by the system at this point, which is something I care about.
NVMeWriteRegistry() is using StorPortWriteRegistry(), and it seems to be finicky when you can actually successfully use it. Unfortunately it only returns TRUE or FALSE and gives no further info what really failed and why, so I am not sure what is going on.
Maybe someone might know? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20120516/2d549eb1/attachment.html>
More information about the nvmewin
mailing list