[nvmewin] Samsung Patch for Bus Reset Enhancements

Alex Chang Alex.Chang at pmcs.com
Wed Oct 15 09:25:32 PDT 2014


Thank you very much, Judy and Suman, for the swift response and have the patch available.
Dear all,
Please start reviewing/testing the patch at your earliest convenience and provide your feedback.
Thank you!
Alex

From: SUMAN PRAKASH B [mailto:suman.p at samsung.com]
Sent: Wednesday, October 15, 2014 6:00 AM
To: nvmewin at lists.openfabrics.org
Cc: Alex Chang; cgps at samsung.com
Subject: Samsung Patch for Bus Reset Enhancements


Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: 8bit

Date: %%SENT_DATE%%

Subject: Suspect Message Quarantined







WARNING: The virus scanner was unable to scan an attachment in an email message sent to you.  This attachment could possibly contain viruses or other malicious programs.  The attachment could not be scanned for the following reasons:



%%DESC%%



The full message and the attachment have been stored in the quarantine.



The identifier for this message is '%%QID%%'.



Access the quarantine at:

https://puremessage.pmc-sierra.bc.ca:28443/



For more information on PMC's Anti-Spam system:

http://pmc-intranet/wiki/index.php/Outlook:Anti-Spam_FAQ



IT Services

PureMessage Admin



Hi Everyone,



We have a patch for the Bus Reset Enhancements.

Please find attached the source code. The password is samsung123



Please find the change description below -



1. There are multiple paths in the driver that reset the controller and execute the initialization state machine.  Our patch is not concerned with the majority of those paths. Aside from a few additional isolated modifications, our patch focuses on the two paths that are supposed to be synchronous -i.e. they should not return to caller until all work is completed -  but which currently are not so. They are:

a) NVMeResetBus (and)
b) NVMeAdapterControl-> ScsiRestartAdapter

We have introduced a new routine NVMeReInitializeController(), which will be invoked from NVMeReseBus() and NVMeAdapterControl() - ScsiRestartAdapter. This routine will reset and initialize the controller and then complete the requests. It will not return until the initialization state machine is complete.

We disallow processing of any SRB in NVMeStartIo() when NextDriverState != NVMeStateComplete. In this way we direct the PowerUp operations to be executed in NVMeAdapterControl() - ScsiRestartAdapter only. When resuming from hibernation for example, NVMeStartio() will not process the POWER SRB. Instead, the Power Up operations will be invoked in NVMeAdapterControl()->ScsiRestartAdapter.

Additionally , Miniport drivers should disregard requests to reset the bus when ntldrDump is set to TRUE in NvmeResetBus(). But current implementation processes this request.

2. When pAE->ntldrDump is TRUE, in the NVMeMapCore2Queue() routine, the pPGT value is NULL. Hence a BSOD occurs when executing ULONG coreNum = (ULONG)(pPN->Number + pPGT->BaseProcessor). We fixed the problem by moving access to pPGT when ntldrDump is FALSE.



3. In ProcessIo(), when IoStatus is set to NOT_SUBMITTED, the SRB is not completed. Due to this, a BSOD was occuring when executing WHCK test "DP WLK - Hot-Add - Device test". We  fixed the problem by changing the code to complete SRB when IoStatus is NOT_SUBMITTED.



4. We changed the use of StorPortBusy()/StorPortReady() to StorPortPause()/StorPortResume(), since StorPortBusy() will not prevent new IOS from coming in once the current ones in the driver have been completed.





Tested the following on Win7 and Windows 2012R2.

- WHCK

- Install/Uninstall, Enable/Disable, FS Format

- Hibernation/Resume, Sleep/Resume

- IOmeter



Thanks,

Suman



[cid:image001.gif at 01CFE859.D481BF40]

[Image removed by sender.]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20141015/350cefdd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD000.jpg
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20141015/350cefdd/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: image001.gif
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20141015/350cefdd/attachment.gif>


More information about the nvmewin mailing list