Hi all!
I’d like to work with storage miniport driver which has no real hardware “connected” to it. What are the problems here?
I suppose that such “virtual device” must be represented as legacy one in the DriverEntry routine. In such a case calling of ScsiPortInitialize routine leads to call of the FindAdapter routine. On return from FindAdapter device object will be registered by the port driver. What PORT_CONFIGURATION_INFORMATION is to be provided? Are there any restrictions on such miniport driver behavior?
Thanks.
-Alex
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Meet Singles
http://corp.mail.com/lavalife
Alex,
Where do you fore see completing ALL SRBs? If you will be completing all
SRBs in HwStartIo callback then a virtual SCSI miniport using SCSIPORT or
STORPORT is fairly easy to do, and can work well as WDM and plug and play.
If you need to pend and complete some SRBs outside of the HwStartIo callback
then you may have problems. If a 10 ms delay for a timer call will not
impact you then you, then you can queue the SRB and use a RequestTimer call
to complete SRBs in that queue.
As to what to set in port configuration, do not set any of the HW parameters
such as Interrupts, ports, ranges or DMA.
The problem with virtual SCSI miniports is when you need equivalent ISR
processing. This you really cannot do and you will need to go to a 3rd party
SCSI support package.
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
"Alex " wrote in message news:xxxxx@ntdev…
>
> Hi all!
> I’d like to work with storage miniport driver which has no real hardware
“connected” to it. What are the problems here?
> I suppose that such “virtual device” must be represented as legacy one in
the DriverEntry routine. In such a case calling of ScsiPortInitialize
routine leads to call of the FindAdapter routine. On return from FindAdapter
device object will be registered by the port driver. What
PORT_CONFIGURATION_INFORMATION is to be provided? Are there any restrictions
on such miniport driver behavior?
> Thanks.
> -Alex
> –
> _______________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
> Meet Singles
> http://corp.mail.com/lavalife
>
>
>
>
Thanks Gary,
but I have a problem with a device object creating already at the driver initialization stage. I have found that the device object for virtual device isn’t created by the port driver, if IORange or MemoryRange aren’t explicitly set. Moreover, FindAdapter routine isn’t called in such a case. Setting IORange or MemoryRange manualy to any available (non-conflicting) value leads to device object successful creation under W2K and WXP. If IORange or MemoryRange value already used by another device, FindAdapter routine is called, but no device object is created on returning.
But I have a problem on WNET. Here FindAdapter routine is called, but no device object is created on returning and HwInitialize routine also isn’t called, even if non-conflicting MemoryRange is set.
Can you comment such a behavior?
-Alex
----- Original Message -----
From: “Gary G. Little”
Date: Fri, 28 Feb 2003 12:38:41 -0800
To: “NT Developers Interest List”
Subject: [ntdev] Re: Storage miniport for virtual device
Alex,
Where do you fore see completing ALL SRBs? If you will be completing all
SRBs in HwStartIo callback then a virtual SCSI miniport using SCSIPORT or
STORPORT is fairly easy to do, and can work well as WDM and plug and play.
If you need to pend and complete some SRBs outside of the HwStartIo callback
then you may have problems. If a 10 ms delay for a timer call will not
impact you then you, then you can queue the SRB and use a RequestTimer call
to complete SRBs in that queue.
As to what to set in port configuration, do not set any of the HW parameters
such as Interrupts, ports, ranges or DMA.
The problem with virtual SCSI miniports is when you need equivalent ISR
processing. This you really cannot do and you will need to go to a 3rd party
SCSI support package.
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
"Alex " wrote in message news:xxxxx@ntdev…
>
> Hi all!
> I’d like to work with storage miniport driver which has no real hardware
“connected” to it. What are the problems here?
> I suppose that such “virtual device” must be represented as legacy one in
the DriverEntry routine. In such a case calling of ScsiPortInitialize
routine leads to call of the FindAdapter routine. On return from FindAdapter
device object will be registered by the port driver. What
PORT_CONFIGURATION_INFORMATION is to be provided? Are there any restrictions
on such miniport driver behavior?
> Thanks.
> -Alex
–
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Meet Singles
http://corp.mail.com/lavalife
Alex,
Why are you worried about, or even dealing with, a device object? Given you
are a SCSI miniport that is all handled by SCSI/STORPORT. You should be
filling in the HW_INITIALIZE and calling ScsiPortInitialize. If you have a
device object anywhere you are not a “standard” SCSI miniport. A WDM
miniport will call the HwFindAdapter while in SCSIPORT AddDevice – if it
likes everything in HW_INITIALIZE.
How have you set
HKLM\CurrentControlSettings\Services\yourdevice\Parameters\PnPInterface?
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
"Alex " wrote in message news:xxxxx@ntdev…
>
> Thanks Gary,
> but I have a problem with a device object creating already at the driver
initialization stage. I have found that the device object for virtual device
isn’t created by the port driver, if IORange or MemoryRange aren’t
explicitly set. Moreover, FindAdapter routine isn’t called in such a case.
Setting IORange or MemoryRange manualy to any available (non-conflicting)
value leads to device object successful creation under W2K and WXP. If
IORange or MemoryRange value already used by another device, FindAdapter
routine is called, but no device object is created on returning.
> But I have a problem on WNET. Here FindAdapter routine is called, but no
device object is created on returning and HwInitialize routine also isn’t
called, even if non-conflicting MemoryRange is set.
> Can you comment such a behavior?
> -Alex
>
> ----- Original Message -----
> From: “Gary G. Little”
> Date: Fri, 28 Feb 2003 12:38:41 -0800
> To: “NT Developers Interest List”
> Subject: [ntdev] Re: Storage miniport for virtual device
>
> Alex,
>
> Where do you fore see completing ALL SRBs? If you will be completing all
> SRBs in HwStartIo callback then a virtual SCSI miniport using SCSIPORT or
> STORPORT is fairly easy to do, and can work well as WDM and plug and play.
> If you need to pend and complete some SRBs outside of the HwStartIo
callback
> then you may have problems. If a 10 ms delay for a timer call will not
> impact you then you, then you can queue the SRB and use a RequestTimer
call
> to complete SRBs in that queue.
>
> As to what to set in port configuration, do not set any of the HW
parameters
> such as Interrupts, ports, ranges or DMA.
>
> The problem with virtual SCSI miniports is when you need equivalent ISR
> processing. This you really cannot do and you will need to go to a 3rd
party
> SCSI support package.
>
> –
> Gary G. Little
> Have Computer, Will Travel …
> 909-698-3191
> 909-551-2105
>
> "Alex " wrote in message news:xxxxx@ntdev…
> >
> > Hi all!
> > I’d like to work with storage miniport driver which has no real hardware
> “connected” to it. What are the problems here?
> > I suppose that such “virtual device” must be represented as legacy one
in
> the DriverEntry routine. In such a case calling of ScsiPortInitialize
> routine leads to call of the FindAdapter routine. On return from
FindAdapter
> device object will be registered by the port driver. What
> PORT_CONFIGURATION_INFORMATION is to be provided? Are there any
restrictions
> on such miniport driver behavior?
> > Thanks.
> > -Alex
> –
> _______________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
> Meet Singles
> http://corp.mail.com/lavalife
>
>
>
>
Gary,
I want to work with the miniport driver as it has a real hardware below. At least I’d like SCSIPORT driver “think” that it is so. I suppose that normal order of miniport routines invocation (if Parameters\PnpInterface is enabled) is as follows:
==>DriverEntry
<==DriverEntry
==>HwFindAdapter
<==HwFindAdapter
==>HwInitialize
<==HwInitialize
==>HwAdapterControl
<==HwAdapterControl
And I’ve really seen it.
If Parameters\PnpInterface is disabled then another picture comes up:
==>DriverEntry
==>HwFindAdapter
<==HwFindAdapter
==>HwInitialize
<==HwInitialize
<==DriverEntry
And this is also OK, because such a behavior is described in DDK. Invocation of ScsiPortInitialize from DriverEntry routine leads to immediate call of HwFindAdapter for legacy device. Of course HwAdapterControl isn’t called.
Both cases described above were observed under W2K. And in both cases HwInitialize routine has been invoked that means SCSIPORT “think” he is dealing with a real hardware. I’ve mentioned “device object is created” last time just to explain that my virtual device succsefully started.
Completely another picture is for WNET!
If Parameters\PnpInterface is disabled then nothing but only DriverEntry routine is invoked:
==>DriverEntry
<==DriverEntry
If Parameters\PnpInterface is enabled then HwFindAdapter is also called, but nothing more:
==>DriverEntry
<==DriverEntry
==>HwFindAdapter
<==HwFindAdapter
In both cases for WNET (with enabled PnP and disabled one) HwInitialize routine isn’t invoked. It means that SCSIPORT doesn’t “like” my virtual device for some reasons. What are these reasons? I couldn’t find any explanation in DDK. Note that in the WNET device manager it is also mentioned “device cann’t start” while the W2K device manager says “device is working properly”. It seems to me that PnP abilities of WNET were changed in comparison with W2K and WXP. But how?
What I should do to make my virtual device started under WNET as it is under W2K?
Thanks.
-Alex
----- Original Message -----
From: “Gary G. Little”
Date: Mon, 3 Mar 2003 16:21:25 -0800
To: “NT Developers Interest List”
Subject: [ntdev] Re: Storage miniport for virtual device
Alex,
Why are you worried about, or even dealing with, a device object? Given you
are a SCSI miniport that is all handled by SCSI/STORPORT. You should be
filling in the HW_INITIALIZE and calling ScsiPortInitialize. If you have a
device object anywhere you are not a “standard” SCSI miniport. A WDM
miniport will call the HwFindAdapter while in SCSIPORT AddDevice – if it
likes everything in HW_INITIALIZE.
How have you set
HKLM\CurrentControlSettings\Services\yourdevice\Parameters\PnPInterface?
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
"Alex " wrote in message news:xxxxx@ntdev…
>
> Thanks Gary,
> but I have a problem with a device object creating already at the driver
initialization stage. I have found that the device object for virtual device
isn’t created by the port driver, if IORange or MemoryRange aren’t
explicitly set. Moreover, FindAdapter routine isn’t called in such a case.
Setting IORange or MemoryRange manualy to any available (non-conflicting)
value leads to device object successful creation under W2K and WXP. If
IORange or MemoryRange value already used by another device, FindAdapter
routine is called, but no device object is created on returning.
> But I have a problem on WNET. Here FindAdapter routine is called, but no
device object is created on returning and HwInitialize routine also isn’t
called, even if non-conflicting MemoryRange is set.
> Can you comment such a behavior?
> -Alex
>
> ----- Original Message -----
> From: “Gary G. Little”
> Date: Fri, 28 Feb 2003 12:38:41 -0800
> To: “NT Developers Interest List”
> Subject: [ntdev] Re: Storage miniport for virtual device
>
> Alex,
>
> Where do you fore see completing ALL SRBs? If you will be completing all
> SRBs in HwStartIo callback then a virtual SCSI miniport using SCSIPORT or
> STORPORT is fairly easy to do, and can work well as WDM and plug and play.
> If you need to pend and complete some SRBs outside of the HwStartIo
callback
> then you may have problems. If a 10 ms delay for a timer call will not
> impact you then you, then you can queue the SRB and use a RequestTimer
call
> to complete SRBs in that queue.
>
> As to what to set in port configuration, do not set any of the HW
parameters
> such as Interrupts, ports, ranges or DMA.
>
> The problem with virtual SCSI miniports is when you need equivalent ISR
> processing. This you really cannot do and you will need to go to a 3rd
party
> SCSI support package.
>
> –
> Gary G. Little
> Have Computer, Will Travel …
> 909-698-3191
> 909-551-2105
>
> "Alex " wrote in message news:xxxxx@ntdev…
> >
> > Hi all!
> > I’d like to work with storage miniport driver which has no real hardware
> “connected” to it. What are the problems here?
> > I suppose that such “virtual device” must be represented as legacy one
in
> the DriverEntry routine. In such a case calling of ScsiPortInitialize
> routine leads to call of the FindAdapter routine. On return from
FindAdapter
> device object will be registered by the port driver. What
> PORT_CONFIGURATION_INFORMATION is to be provided? Are there any
restrictions
> on such miniport driver behavior?
> > Thanks.
> > -Alex
–
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
Meet Singles
http://corp.mail.com/lavalife
Mr. Wieland might be able to direct you here.
I can speak on SCSIPORT up through XP, which is where all of my research was
done. I have not seen this problem on WNET but then I went with a VSPORT
implementation since I had an underlying bus-driver that the miniport had to
use for IO. My best guess is that you are defining it as a PCI device and
the PNP portion of SCSIPORT is saying no it isn’t and completeing a PNP IRP
with a bad status.
–
Gary G. Little
Have Computer, will travel …
909-698-3191
909-551-2105
"Alex " wrote in message news:xxxxx@ntdev…
>
> Gary,
>
> I want to work with the miniport driver as it has a real hardware below.
At least I’d like SCSIPORT driver “think” that it is so. I suppose that
normal order of miniport routines invocation (if Parameters\PnpInterface is
enabled) is as follows:
> --------------------------------
> ==>DriverEntry
> <==DriverEntry
> ==>HwFindAdapter
> <==HwFindAdapter
> ==>HwInitialize
> <==HwInitialize
> ==>HwAdapterControl
> <==HwAdapterControl
> ---------------------------------
>
> And I’ve really seen it.
>
> If Parameters\PnpInterface is disabled then another picture comes up:
> ----------------------------------
> ==>DriverEntry
> ==>HwFindAdapter
> <==HwFindAdapter
> ==>HwInitialize
> <==HwInitialize
> <==DriverEntry
> ----------------------------------
> And this is also OK, because such a behavior is described in DDK.
Invocation of ScsiPortInitialize from DriverEntry routine leads to immediate
call of HwFindAdapter for legacy device. Of course HwAdapterControl isn’t
called.
>
> Both cases described above were observed under W2K. And in both cases
HwInitialize routine has been invoked that means SCSIPORT “think” he is
dealing with a real hardware. I’ve mentioned “device object is created” last
time just to explain that my virtual device succsefully started.
>
> Completely another picture is for WNET!
> If Parameters\PnpInterface is disabled then nothing but only DriverEntry
routine is invoked:
> ----------------------------------
> ==>DriverEntry
> <==DriverEntry
> ----------------------------------
> If Parameters\PnpInterface is enabled then HwFindAdapter is also called,
but nothing more:
> ----------------------------------
> ==>DriverEntry
> <==DriverEntry
> ==>HwFindAdapter
> <==HwFindAdapter
> ----------------------------------
>
> In both cases for WNET (with enabled PnP and disabled one) HwInitialize
routine isn’t invoked. It means that SCSIPORT doesn’t “like” my virtual
device for some reasons. What are these reasons? I couldn’t find any
explanation in DDK. Note that in the WNET device manager it is also
mentioned “device cann’t start” while the W2K device manager says “device is
working properly”. It seems to me that PnP abilities of WNET were changed in
comparison with W2K and WXP. But how?
> What I should do to make my virtual device started under WNET as it is
under W2K?
>
> Thanks.
> -Alex
>
> ----- Original Message -----
> From: “Gary G. Little”
> Date: Mon, 3 Mar 2003 16:21:25 -0800
> To: “NT Developers Interest List”
> Subject: [ntdev] Re: Storage miniport for virtual device
>
> Alex,
>
> Why are you worried about, or even dealing with, a device object? Given
you
> are a SCSI miniport that is all handled by SCSI/STORPORT. You should be
> filling in the HW_INITIALIZE and calling ScsiPortInitialize. If you have
a
> device object anywhere you are not a “standard” SCSI miniport. A WDM
> miniport will call the HwFindAdapter while in SCSIPORT AddDevice – if it
> likes everything in HW_INITIALIZE.
>
> How have you set
> HKLM\CurrentControlSettings\Services\yourdevice\Parameters\PnPInterface?
>
> –
> Gary G. Little
> Have Computer, Will Travel …
> 909-698-3191
> 909-551-2105
>
> "Alex " wrote in message news:xxxxx@ntdev…
> >
> > Thanks Gary,
> > but I have a problem with a device object creating already at the driver
> initialization stage. I have found that the device object for virtual
device
> isn’t created by the port driver, if IORange or MemoryRange aren’t
> explicitly set. Moreover, FindAdapter routine isn’t called in such a case.
> Setting IORange or MemoryRange manualy to any available (non-conflicting)
> value leads to device object successful creation under W2K and WXP. If
> IORange or MemoryRange value already used by another device, FindAdapter
> routine is called, but no device object is created on returning.
> > But I have a problem on WNET. Here FindAdapter routine is called, but no
> device object is created on returning and HwInitialize routine also isn’t
> called, even if non-conflicting MemoryRange is set.
> > Can you comment such a behavior?
> > -Alex
> >
> > ----- Original Message -----
> > From: “Gary G. Little”
> > Date: Fri, 28 Feb 2003 12:38:41 -0800
> > To: “NT Developers Interest List”
> > Subject: [ntdev] Re: Storage miniport for virtual device
> >
> > Alex,
> >
> > Where do you fore see completing ALL SRBs? If you will be completing all
> > SRBs in HwStartIo callback then a virtual SCSI miniport using SCSIPORT
or
> > STORPORT is fairly easy to do, and can work well as WDM and plug and
play.
> > If you need to pend and complete some SRBs outside of the HwStartIo
> callback
> > then you may have problems. If a 10 ms delay for a timer call will not
> > impact you then you, then you can queue the SRB and use a RequestTimer
> call
> > to complete SRBs in that queue.
> >
> > As to what to set in port configuration, do not set any of the HW
> parameters
> > such as Interrupts, ports, ranges or DMA.
> >
> > The problem with virtual SCSI miniports is when you need equivalent ISR
> > processing. This you really cannot do and you will need to go to a 3rd
> party
> > SCSI support package.
> >
> > –
> > Gary G. Little
> > Have Computer, Will Travel …
> > 909-698-3191
> > 909-551-2105
> >
> > "Alex " wrote in message news:xxxxx@ntdev…
> > >
> > > Hi all!
> > > I’d like to work with storage miniport driver which has no real
hardware
> > “connected” to it. What are the problems here?
> > > I suppose that such “virtual device” must be represented as legacy one
> in
> > the DriverEntry routine. In such a case calling of ScsiPortInitialize
> > routine leads to call of the FindAdapter routine. On return from
> FindAdapter
> > device object will be registered by the port driver. What
> > PORT_CONFIGURATION_INFORMATION is to be provided? Are there any
> restrictions
> > on such miniport driver behavior?
> > > Thanks.
> > > -Alex
> –
> _______________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
> Meet Singles
> http://corp.mail.com/lavalife
>
>
>
>