FW: Looking for Anton

> -----Original Message-----

From: Joe Moriarty [mailto:xxxxx@east.sun.com]
Sent: Thursday, September 20, 2001 11:20 AM
To: NT Development List
Subject: Looking for Anton

Anton,

I hope your out there. I am currently trying to write a SCSI
miniport driver that calls down to another driver to do it’s I/O.
James Kirby told me that I should get a hold of you to discuss
some of the problems that I am having.

Here’s the jist:

  1. In my completion routine to my lower level driver, I
    supposedly have to make a call to a fake LUN to get the SCSI port
    driver in the right context to complete my original SRB.

Does this fake LUN have to exist (did Inquiry command to the Fake
LUN address need to respond with valid data, if so, then what
type of device do you assign to the fake LUN). Or does a Fake
LUN mean any address that does not have a device responding
(SRB_STATUS_SELECTION_TIMEOUT).

  1. When I make the call back into the port driver targeted for
    the fake LUN, do I have to be at passive level? I am running a
    check version of WinXp and everytime I call into the port driver I get

EX: Pageable code called at IRQL 2

*** Assertion failed: FALSE
*** Source File: d:\nt\drivers\storage\ide\atapi\internal.c, line 5837

3)Does the HAB have to support tagged queing?
pConfigInfo->TaggedQueueing = TRUE;
I ask this because I have to set the SRB Flag bit
SRB_FLAGS_BYPASS_FROZEN_QUEUE in the SRB sent to
the fake LUN.

Thanks In Advance,
Joe

Thanks In Advance,
Joe

>Yes the IO completion routine.
>1) What’s the major and minor function for creating the fake IOCTL IRP
>below? I assume this is headed towards //Device/ScsiPortX. Correct.

>[Yes. You can use the functions in the DDK to build a device IO control
>request (IRP). You will need to make the request a PASSTHROUGH (See SPTI
>in the DDK).

>2) The flag for bypassing the queue is it setting the TaggedQueueing
>field to FALSE in the PORT_CONFIGURATION_INFORMATION for the HBA. Or is
>it a value set in the QueueAction field of the fake LUN SRB. I do not
>support queing so I don’t know if I really have to set anything here.

>[#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010

>You should discuss this with Anton from the mailing list. He uses this
>method in several of his drivers. I have chosen not to use this method,
>so I have no practrical experience in getting one of these drivers to
>work.]

>3) When I get to my call to the fake LUN. I assume that this is the
>point were you tell the port driver that you have completed the request
>and are now ready for the next request.

>[Yes]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You should be doing the IoCallDriver at PASSIVE_LEVEL. The ScsiPort
IoControl function is going to check the IRQL level looking to see if the
caller is less than or equal to APC_LEVEL. (This discovered after hours of
tripping through disassembly windows in WinDbg.).

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Joe Moriarty [mailto:xxxxx@east.sun.com]
Sent: Thursday, September 20, 2001 8:20 AM
To: NT Developers Interest List
Subject: [ntdev] Looking for Anton

Anton,

I hope your out there. I am currently trying to write a SCSI miniport
driver that calls down to another driver to do it’s I/O. James Kirby told
me that I should get a hold of you to discuss some of the problems that I am
having.

Here’s the jist:

  1. In my completion routine to my lower level driver, I supposedly have to
    make a call to a fake LUN to get the SCSI port driver in the right context
    to complete my original SRB.

Does this fake LUN have to exist (did Inquiry command to the Fake LUN
address need to respond with valid data, if so, then what type of device do
you assign to the fake LUN). Or does a Fake LUN mean any address that does
not have a device responding (SRB_STATUS_SELECTION_TIMEOUT).

  1. When I make the call back into the port driver targeted for the fake LUN,
    do I have to be at passive level? I am running a check version of WinXp and
    everytime I call into the port driver I get

EX: Pageable code called at IRQL 2

*** Assertion failed: FALSE
*** Source File: d:\nt\drivers\storage\ide\atapi\internal.c, line 5837

3)Does the HAB have to support tagged queing?
pConfigInfo->TaggedQueueing = TRUE;
I ask this because I have to set the SRB Flag bit
SRB_FLAGS_BYPASS_FROZEN_QUEUE in the SRB sent to
the fake LUN.

Thanks In Advance,
Joe

Thanks In Advance,
Joe

Yes the IO completion routine.

  1. What’s the major and minor function for creating the fake IOCTL IRP
    below? I assume this is headed towards //Device/ScsiPortX. Correct.

[Yes. You can use the functions in the DDK to build a device IO control
request (IRP). You will need to make the request a PASSTHROUGH (See SPTI
in the DDK).

  1. The flag for bypassing the queue is it setting the TaggedQueueing
    field to FALSE in the PORT_CONFIGURATION_INFORMATION for the HBA. Or is
    it a value set in the QueueAction field of the fake LUN SRB. I do not
    support queing so I don’t know if I really have to set anything here.

[#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010

You should discuss this with Anton from the mailing list. He uses this
method in several of his drivers. I have chosen not to use this method,
so I have no practrical experience in getting one of these drivers to
work.]

  1. When I get to my call to the fake LUN. I assume that this is the
    point were you tell the port driver that you have completed the request
    and are now ready for the next request.

[Yes]


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Joe,

Sorry I was a bit busy and did not pay much attention on the list…

About your question. First of all it’s not very good idea to call the
drivers from the HwStartIo. Especially SCSIPORT (spinlocks, raised IRQL
etc). It’s much better idea just queue the SRB in HwStartIo() and pass it
to the own worker thread for execution and completion. Second did you check
the code sample I’ve sent you? The one that initiates completion of SRB?
I’ve checked your code and it looks like you’re missing the flags. Third in
your code you’re completin only one SRB (that originally came in). And you
need to complete two SRBs (first one you passed for completion and the
second one that was carring SRB to complete).

Hope this will help. If you have more questions I’ll be happy to help.

Regards,
Anton


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com