Tech Support > Microsoft Windows > Drivers > scsi miniport HwStartIo() IRQL if no interrupts
scsi miniport HwStartIo() IRQL if no interrupts
Posted by a!s on July 1st, 2003


in a scsi miniport driver for a virtual HW(obviously no HW
interrupts),

if i set the PORT_CONFIGURATION_INFORMATION -> BusInterruptVector = 0;
for findadapter
and
HW_INITIALIZATION_DATA -> HwScsiInterrupt = NULL

can i be gauranteed that my HwStartIo() and/or HwTimer()will be called
at DISPATCH_LEVEL(atleast)/PASSIVE_LEVEL? because i cant think of what
DIRQL can SCSIPORT assume before calling into me?
KeSynchronizeExecution() requires interrupt#

question 2
-------------
since HwStartIo() can be called at DIRQL what syncronization
mechanisms are available inside this routine to share data with a
PASSIVE_LEVEL thread? even spinlocks are useless > DISPATCH_LEVEL. i
am prepared to use any NTDDK only kernel functions

thx
alex

Posted by Mark Roddy on July 1st, 2003


On 1 Jul 2003 01:42:44 -0700, alex35711@yahoo.com (a!s) wrote:

Ah, yes well you have hit the scsiport design problem with respect to
virtual miniports that require communication with other kernel
components. There are *hacks* that have been proposed to work around
the problems, however it is generally accepted that the correct
solution is to write a complete port driver. There are third party
packages available that provide port drivers. You should search the
newsgroups and the ntdev email list for the complete discussions of
this issue.

Oh, and the answer is DISPATCH_LEVEL for your no-interrupt miniport.




=====================
Mark Roddy
Windows XP/2000/NT Consulting, Microsoft DDK MVP
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
For Windows Device Driver Training: see www.azius.com

Posted by Jamey Kirby on July 1st, 2003


Try VSPORT from StorageCraft. It will allow yu to do exactlly what you want.
www.storagecraft.com




"a!s" <alex35711@yahoo.com> wrote in message
news:f388d6a.0307010042.1a84cd6@posting.google.com ...


Posted by a!s on July 2nd, 2003


Mark Roddy <mroddy@tellink.net> wrote in message news:<rnq2gvk8n3d7vf35a4bal6h80rljdss1j7@4ax.com>. ..

thx for the replies. i figured out a way for synch between DIRQL and
PASSIVE_LEVEL threads. i will use ExInterlockedInsertTailList(..)
family of functions.

BTW, is there some kind of a flow control available in scsi miniports?
like, i wud like to request SCSIPORT not to bombard me with read/write
data, till i finish some house-keeping work and restart taking
requests from SCSIPORT. Apart from a crude stop/start? Because, i
cannot hold on to an SRB in HwStartIo() too long, risking a SCSIPORT
timeout. Or can I?

----alex

Posted by David J. Craig on July 2nd, 2003


I guess using a baseball bat over the internet doesn't work very well.
Maybe he wants real-time behavior too. Maybe a GUI interface for his driver
to accept input from the user.

I am beginning to think some can't be helped.

"Gary G. Little" <gary.g.little@seagate.com> wrote in message
news:%23EKdVnNQDHA.304@tk2msftngp13.phx.gbl...


Posted by 440gtx on July 3rd, 2003


How long? I've observed 7 second timeouts in Win95 and 10 seconds in
Windows 2000. You'll get a bus reset if the timeout is exceeded.

One way to hold off I/O is to return SRB_STATUS_BUSY and scsiport will
retry the request after a short period of time. A better way is to
implement overlapped command queuing using
ScsiPortNotification(NextLuRequest / NextRequest) to signal when you
can handle more requests with event driven efficiency.


Similar Posts