How to debug an overtime error of SRB?

Hi,

While my stor miniport driver processes a SRB_FUNCTION_EXECUTE_SCSI SRB command, it will overtime. And then the system storport driver will send the SRB_FUNCTION_RESET_LOGICAL_UNIT SRB command to my miniport driver, and then bug occurs.

Now my problem is to find a good way to debug the “overtime” SRB while my “startio” routine is just beginning to process it. But how can I know whether a SRB will be overtime ? So I am confused.

Debug prints with timestamps.

On Jan 18, 2008 4:27 AM, wrote:
> Hi,
>
> While my stor miniport driver processes a SRB_FUNCTION_EXECUTE_SCSI SRB command, it will overtime. And then the system storport driver will send the SRB_FUNCTION_RESET_LOGICAL_UNIT SRB command to my miniport driver, and then bug occurs.
>
> Now my problem is to find a good way to debug the “overtime” SRB while my “startio” routine is just beginning to process it. But how can I know whether a SRB will be overtime ? So I am confused.
>
>
>
>
> —
> 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

I have added many prints and I know the “overtime” SRB is a “SRB_FUNCTION_EXECUTE_SCSI” writing command. And you know, during Longhorn’s installation, there will be thousands of “SRB_FUNCTION_EXECUTE_SCSI” commands. And unluckily, my bug seems irregular. sometimes it occurs very early, sometimes very late.
So my problem seems complicated.

I understand it, let me try. I will come back while having results.

In Storport model, many srb commands will be sent to miniport driver continuously, so it is hard for me to calculate the time for each SRB. Do you have any good ideas?

Add a timestamp field to your srb extension.

On Jan 22, 2008 5:30 AM, wrote:
> In Storport model, many srb commands will be sent to miniport driver continuously, so it is hard for me to calculate the time for each SRB. Do you have any good ideas?
>
> —
> 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

Dear Mark, now I have used a tip to calculate the time as follows:
1.Add a variable to device extension.
2.Before nearly each call of ScsiportNotification/StorportNotification, clear that variable to zero.
3.In my timer service, add that variable by one.
In my case, once a srb is overtime, then ScsiportNotification/StorportNotification will not be called. So my tip works!
Your idears inspired me. Thank you very much!