I want to make system resend a SRB in StartIO routine

Hi all,
I want to mark the status of SRB is temperately failed and make the system
resend this SRB a few time later in StartIO routine. How can I do?
Thanks.
Marvin

>

Hi all,
I want to mark the status of SRB is temperately failed and make the system
resend this SRB a few time later in StartIO routine. How can I do?
Thanks.
Marvin

Can you still set status to BUSY and then complete it under storport or was that just a scsiport thing?

Failing that, if “a few time later” is less that the reset timer then just store it in your own queue.

James

Hi James,
Thanks for your advise. This is my scenario, my device needs long time
to initialize, maybe 1~2 minutes. It is hardware issue and we are just
fixing the hardware design. So before the initialization, the driver cannot
response the SCSI command from OS. As your recommendation, I’ve tried to
set the SRB’s status as SRB_STATUS_BUSY. The system will resend the SRB
many times, however the time slot between them are very short. And it seems
like OS will not resend the SRB for ever , I just got the
SCSIOP_READ_CAPACITY about 60 times and then OS stop resenting them. So
after my device finish its initialization, the OS didn’t
send SCSIOP_READ_CAPACITY any more. Do you have any suggestion about that?
Thanks.
Marvin

On Thu, Feb 9, 2012 at 5:33 PM, James Harper
wrote:

> >
> > Hi all,
> > I want to mark the status of SRB is temperately failed and make the
> system
> > resend this SRB a few time later in StartIO routine. How can I do?
> > Thanks.
> > Marvin
>
> Can you still set status to BUSY and then complete it under storport or
> was that just a scsiport thing?
>
> Failing that, if “a few time later” is less that the reset timer then just
> store it in your own queue.
>
> James
>
> —
> 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
>

WOW, I find a good way to resolve it. StorPortNotification
(NotificationType = ResetDetected). It can enforce OS reset the driver.

On Thu, Feb 9, 2012 at 9:54 PM, Marvin(Fan) Zhang wrote:

> Hi James,
> Thanks for your advise. This is my scenario, my device needs long time
> to initialize, maybe 1~2 minutes. It is hardware issue and we are just
> fixing the hardware design. So before the initialization, the driver cannot
> response the SCSI command from OS. As your recommendation, I’ve tried to
> set the SRB’s status as SRB_STATUS_BUSY. The system will resend the SRB
> many times, however the time slot between them are very short. And it seems
> like OS will not resend the SRB for ever , I just got the
> SCSIOP_READ_CAPACITY about 60 times and then OS stop resenting them. So
> after my device finish its initialization, the OS didn’t
> send SCSIOP_READ_CAPACITY any more. Do you have any suggestion about that?
> Thanks.
> Marvin
>
>
> On Thu, Feb 9, 2012 at 5:33 PM, James Harper <
> xxxxx@bendigoit.com.au> wrote:
>
>> >
>> > Hi all,
>> > I want to mark the status of SRB is temperately failed and make the
>> system
>> > resend this SRB a few time later in StartIO routine. How can I do?
>> > Thanks.
>> > Marvin
>>
>> Can you still set status to BUSY and then complete it under storport or
>> was that just a scsiport thing?
>>
>> Failing that, if “a few time later” is less that the reset timer then
>> just store it in your own queue.
>>
>> James
>>
>> —
>> 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
>>
>
>

Using StorPortPauseDevice and StorPortResumeDevice might be a better approach. StorPortPauseDevice informs Storport not sending any IO to miniport in specified time period, or when miniport calls StorPortResumeDevice.

Regards,
Michael Xing

>

Hi James,
Thanks for your advise. This is my scenario, my device needs long time to
initialize, maybe 1~2 minutes. It is hardware issue and we are just fixing the
hardware design. So before the initialization, the driver cannot response the
SCSI command from OS. As your recommendation, I’ve tried to set the SRB’s
status as SRB_STATUS_BUSY. The system will resend the SRB many times,
however the time slot between them are very short. And it seems like OS
will not resend the SRB for ever , I just got the SCSIOP_READ_CAPACITY
about 60 times and then OS stop resenting them. So after my device finish its
initialization, the OS didn’t send SCSIOP_READ_CAPACITY any more. Do you
have any suggestion about that?

From your subsequent posts I think you have already found a solution that works for you, but is it the device that is initialising or the communications channel?

You could always report “device not present” initially, and then when the initialisation is complete you could do StorPortNotification(BusChangeDetected, …) and then report the device as present when it gets rescanned. BusChangeDetected is a little expensive but if you were only doing it once during system initialisation it should be acceptable.

I now curious… what sort of device takes 1-2 minutes to initialise?

James