Why does stor miniport receive SRB_FUNCTION_RESET_LOGICAL_UNIT?

Hi friends,

I am confused about why my stor miniport driver of Vista will always receive the SRB_FUNCTION_RESET_LOGICAL_UNIT command. In detail, when Vista boots, a great lot of SRB_FUNCTION_EXECUTE_SCSI commands have been sent to my stor miniport driver. And after about several minutes, the SRB_FUNCTION_RESET_LOGICAL_UNIT commands are sent to my stor miniport driver. It seems that my stor miniport driver has not managed the SRB_FUNCTION_EXECUTE_SCSI commands correctly or duly.
Really I have debugged my “HwStorStartIo” routine carefully and I think every SRB_FUNCTION_EXECUTE_SCSI command is completed by the following function
StorPortNotification(RequestComplete,DeviceExtension, Srb);
with Srb->SrbStatus equalling “SRB_STATUS_SUCCESS” .
So why does my stor miniport receive a SRB_FUNCTION_RESET_LOGICAL_UNIT command?

Did you set the SrbStatus correctly before completing the request?

On Nov 22, 2007 1:23 AM, wrote:

> Hi friends,
>
> I am confused about why my stor miniport driver of Vista will always
> receive the SRB_FUNCTION_RESET_LOGICAL_UNIT command. In detail, when Vista
> boots, a great lot of SRB_FUNCTION_EXECUTE_SCSI commands have been sent to
> my stor miniport driver. And after about several minutes, the
> SRB_FUNCTION_RESET_LOGICAL_UNIT commands are sent to my stor miniport
> driver. It seems that my stor miniport driver has not managed the
> SRB_FUNCTION_EXECUTE_SCSI commands correctly or duly.
> Really I have debugged my “HwStorStartIo” routine carefully and I think
> every SRB_FUNCTION_EXECUTE_SCSI command is completed by the following
> function
> StorPortNotification(RequestComplete,DeviceExtension, Srb);
> with Srb->SrbStatus equalling “SRB_STATUS_SUCCESS” .
> So why does my stor miniport receive a SRB_FUNCTION_RESET_LOGICAL_UNIT
> command?
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Mark Roddy

Hi Mark,
Now I have found although several hundreds of SRB_FUNCTION_EXECUTE_SCSI commands are finished correctly, however there are 2 SRB_FUNCTION_EXECUTE_SCSI commands are not completed by “StorPortNotification” routine. So I think this is the cause now.
I will try to verify my opinion and will come back if I have any new results.
Thank youvery much!