ZwDeviceIoControlFile from SCSI Miniport

I want to send a request from mu SCSI miniport driver to another driver to get some data.
If the inputBuffer and outputBuffer is NULL it’s working fine, but if the outputBuffer is not NULL (I expect some return data) I got a crash.
The strange thing the ZwDeviceIoControlFile returned with SUCCESS, but nothing came back in the outputBuffer.

The stack is:

ntoskrnl!KiDeliverApc + 0084
hal!HalClearSoftwareInterrupt + 0320

So I thought I need a completion function fro the ZwDeviceIoControlFile, but it’s never been called :slight_smile:

Any thoughts?

Regards,

Zoltan


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

Yeah I have a thought: you can’t do that! Your SCSI miniport code is running
at DIRQL - this is way, way too high an interrupt level to call
ZwAnythingAtAll.

-----Original Message-----
From: xxxxx@yahoo.com [mailto:xxxxx@yahoo.com]
Sent: Thursday, July 05, 2001 1:20 PM
To: NT Developers Interest List
Subject: [ntdev] ZwDeviceIoControlFile from SCSI Miniport

I want to send a request from mu SCSI miniport driver to another driver to
get some data.
If the inputBuffer and outputBuffer is NULL it’s working fine, but if the
outputBuffer is not NULL (I expect some return data) I got a crash.
The strange thing the ZwDeviceIoControlFile returned with SUCCESS, but
nothing came back in the outputBuffer.

The stack is:

ntoskrnl!KiDeliverApc + 0084
hal!HalClearSoftwareInterrupt + 0320

So I thought I need a completion function fro the ZwDeviceIoControlFile, but
it’s never been called :slight_smile:

Any thoughts?

Regards,

Zoltan

You are currently subscribed to ntdev as: xxxxx@stratus.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 Zoltan,

I saw your CoolStorage code. I want to do some similar, to create a
virtual disk from a file. And the user can mount files as drives.

Why write the same code? If you want to use KoolStorage for non-commercial
use it’s free for it. If not we can license you either binaries or full
source code.
And in a week or so there will be full SCSI port driver in addition to SCSI
miniport.

I have 2 drivers SCSI miniport and simple driver to provide data for
miniport and for user action.
I ran into the following problem:
I want to send a request from my SCSI miniport driver to another >driver
to get some data.
If the inputBuffer and outputBuffer is NULL it’s working fine, but if >the
outputBuffer is not NULL (I expect some return data) I got a crash.
The strange thing the ZwDeviceIoControlFile returned with SUCCESS, but
nothing came back in the outputBuffer.
The stack is:
ntoskrnl!KiDeliverApc + 0084
hal!HalClearSoftwareInterrupt + 0320
So I thought I need a completion function fro the >ZwDeviceIoControlFile,
but it’s never been called :slight_smile:
Any thoughts?

From where do you call ZwDeviceIoControlFile()? IRQL & thread context?
IRQL must be PASSIVE_LEVEL and thread context must be system thread
context. Queue a work item and call any file I/O from it. Use timer
callback as there is no other way to complete requests from SCSIPORT
context in miniport driver.

Regards,
Anton
On 07/05/01, “” wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0020_01C1054C.CF3BF130
> Content-Type: text/plain;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: quoted-printable
>
> I want to send a request from mu SCSI miniport driver to another driver =
> to get some data.
> If the inputBuffer and outputBuffer is NULL it’s working fine, but if =
> the outputBuffer is not NULL (I expect some return data) I got a crash.
> The strange thing the ZwDeviceIoControlFile returned with SUCCESS, but =
> nothing came back in the outputBuffer.
>
> The stack is:
>
> ntoskrnl!KiDeliverApc + 0084
> hal!HalClearSoftwareInterrupt + 0320
>
> So I thought I need a completion function fro the ZwDeviceIoControlFile, =
> but it’s never been called :slight_smile:
>
> Any thoughts?
>
> Regards,
>
> Zoltan
>
>
> —
> 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
>
> ------=_NextPart_000_0020_01C1054C.CF3BF130
> Content-Type: text/html;
> charset=“iso-8859-1”
> Content-Transfer-Encoding: quoted-printable
>
>
>
> > charset=3Diso-8859-1">
>

>

>
>
>

I want to send a request from mu SCSI =
> miniport=20
> driver to another driver to get some data.


>
If the inputBuffer and outputBuffer is =
> NULL it’s=20
> working fine, but if the outputBuffer is not NULL (I expect some return =
> data) I=20
> got a crash.


>
The strange thing the =
> ZwDeviceIoControlFile=20
> returned with SUCCESS, but nothing came back in the =
> outputBuffer.


>



>
The stack is:


>



>
ntoskrnl!KiDeliverApc + =
> 0084


>
hal!HalClearSoftwareInterrupt + =
> 0320


>



>
So I thought I need a completion =
> function fro the=20
> ZwDeviceIoControlFile, but it’s never been called :slight_smile:


>



>
Any thoughts?


>



>
Regards,


>



>
Zoltan


> —

> 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 are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)

To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>
>
> ------=_NextPart_000_0020_01C1054C.CF3BF130–
>
>
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @yahoo.com address at http://mail.yahoo.com

We have a virtual disk driver implemented as a SCSI port driver. Anyone
who would like a copy, send me an email and I will send the binary and
the source for the miniport. I can not send the source for the SCSIPORT
without a license agreement.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Thursday, July 05, 2001 2:15 PM
To: NT Developers Interest List
Subject: [ntdev] Re: ZwDeviceIoControlFile from SCSI Miniport

Hi Zoltan,

>I saw your CoolStorage code. I want to do some similar, to create a
>virtual disk from a file. And the user can mount files as drives.

Why write the same code? If you want to use KoolStorage for
non-commercial
use it’s free for it. If not we can license you either
binaries or full
source code.
And in a week or so there will be full SCSI port driver in
addition to SCSI
miniport.

>I have 2 drivers SCSI miniport and simple driver to provide data for
>miniport and for user action.
>I ran into the following problem:
>I want to send a request from my SCSI miniport driver to
another >driver
to get some data.
>If the inputBuffer and outputBuffer is NULL it’s working
fine, but if
>>the
outputBuffer is not NULL (I expect some return data) I got a crash.
>The strange thing the ZwDeviceIoControlFile returned with
SUCCESS, but
>nothing came back in the outputBuffer.
>The stack is:
>ntoskrnl!KiDeliverApc + 0084
>hal!HalClearSoftwareInterrupt + 0320
>So I thought I need a completion function fro the
>ZwDeviceIoControlFile,
but it’s never been called :slight_smile:
>Any thoughts?

From where do you call ZwDeviceIoControlFile()? IRQL & thread
context? IRQL must be PASSIVE_LEVEL and thread context must
be system thread
context. Queue a work item and call any file I/O from it. Use timer
callback as there is no other way to complete requests from SCSIPORT
context in miniport driver.

Regards,
Anton
On 07/05/01, “” wrote:
> > This is a multi-part message in MIME format.
> >
> > ------=_NextPart_000_0020_01C1054C.CF3BF130
> > Content-Type: text/plain;
> > charset=“iso-8859-1”
> > Content-Transfer-Encoding: quoted-printable
> >
> > I want to send a request from mu SCSI miniport driver to another
> > driver = to get some data. If the inputBuffer and
> outputBuffer is NULL
> > it’s working fine, but if = the outputBuffer is not NULL (I expect
> > some return data) I got a crash. The strange thing the
> > ZwDeviceIoControlFile returned with SUCCESS, but = nothing
> came back
> > in the outputBuffer.
> >
> > The stack is:
> >
> > ntoskrnl!KiDeliverApc + 0084
> > hal!HalClearSoftwareInterrupt + 0320
> >
> > So I thought I need a completion function fro the
> > ZwDeviceIoControlFile, = but it’s never been called :slight_smile:
> >
> > Any thoughts?
> >
> > Regards,
> >
> > Zoltan
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> xxxxx@storagecraft.com To
> > unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> > ------=_NextPart_000_0020_01C1054C.CF3BF130
> > Content-Type: text/html;
> > charset=“iso-8859-1”
> > Content-Transfer-Encoding: quoted-printable
> >
> >
> > > > charset=3Diso-8859-1">
> >

> >

> >
> >
> >

I want to send a request
> from mu SCSI =
> > miniport=20
> > driver to another driver to get some data.


> >
If the inputBuffer and
> outputBuffer is =
> > NULL it’s=20
> > working fine, but if the outputBuffer is not NULL (I expect
> some return =
> > data) I=20
> > got a crash.


> >
The strange thing the =
> > ZwDeviceIoControlFile=20
> > returned with SUCCESS, but nothing came back in the =
> > outputBuffer.


> >



> >
The stack is:


> >



> >
ntoskrnl!KiDeliverApc + =
> > 0084


> >
hal!HalClearSoftwareInterrupt + =
> > 0320


> >



> >
So I thought I need a completion =
> > function fro the=20
> > ZwDeviceIoControlFile, but it’s never been called :slight_smile:


> >



> >
Any thoughts?


> >



> >
Regards,


> >



> >
Zoltan


> > —

> > You are currently subscribed to ntdev as:
> xxxxx@storagecraft.com

> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> —

> You are currently subscribed to ntdev as:
> xxxxx@storagecraft.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

> >
> >
> > ------=_NextPart_000_0020_01C1054C.CF3BF130–
> >
> >
> >
> > _________________________________________________________
> >
> > Do You Yahoo!?
> >
> > Get your free @yahoo.com address at http://mail.yahoo.com
>

>Queue a work item and call any file I/O from it. Use timer

callback as there is no other way to complete requests from
SCSIPORT context in miniport driver.

This assumes that you have no concerns for performance. Using a callback
will KILL performance.

Jamey


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