PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu

Given that Windows has no daemons, I can only assume that these “daemon
tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
a Windows virtual mini-port is like taking the word of Hollywood about
warp drive. You can overcome the issues of PNP refusing to load your
driver by using an ISA bus type, but that is only one of many issues you
will have to address.

There are several reasons why virtual SCSI mini-ports are virtually
impossible in current Windows architecture. Chief among them is that your
virtual SCSI mini-port can never have legitimate access to the DPC,
requiring you to either suffer the slings and arrows of a 10 millisecond
delay waiting on a timer, or requiring such rampant OS butchery that to
even think of submitting it to WHQL will result in terrible bouts of
hysterics.

have heard that the solution may be in the realm of iSCSI, but that is
still not released and what is available is undocumented. Pursuing a
virtual SCSI miniport really is a fool’s errand. I

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, April 22, 2006 9:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks for your help!

Daemon tools means daemon tools’ virtual
cdrom(http://www.daemon-tools.cc/dtcc/download.php?mode=ViewCategory&catid=5).
They implement the virtual cdrom as a totally pnp compatible driver with
the help of one virtual bus driver and one virtual scsi miniport driver.

How about the idea of Complete the related SRB request to inject it to
the SCSIPORT context through the IOCTL_SCSI_MINIPORT irp? I mean when I
have to complete a SRB, I send a preallocated Irp whose Minor code is
IOCTL_SCSI_MINIPORT to the SCSI miniport driver. And this irp will
contain some informtion about the SRB. When my miniport driver receive
this IOCTL_SCSI_MINIPORT request, it should reside in the context of
SCSIPORT and it could complete the SRB request. IMHO, the overhead for
this approach is rather low compared with the timer callback’s 10ms latency.

By the way, Do I have to send IOCT_SCSI_MINIPORT when the SCSIPORT finds
out (INQUERY) a LUN for my virtual scsi adapter? Someone told me that
the SCSIPORT will reject my request if it couldn’t locate a
corresponding LUN for my virtual scsi adapter!

I can load my driver right now if I can adjust the LegacyBusType of
Toaster static bus to Internal instead of PnpBus. Anyway, thanks for
your tips.

If I have to reinvent a SCSI port only for my graduate design software,
that’s really a horrible task for me! :slight_smile:

Any suggestion will be appreciated!


Best Regards,
hanzhu

xxxxx@seagate.com дµÀ:

Given that Windows has no daemons, I can only assume that these “daemon
tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
a Windows virtual mini-port is like taking the word of Hollywood about
warp drive. You can overcome the issues of PNP refusing to load your
driver by using an ISA bus type, but that is only one of many issues you
will have to address.

There are several reasons why virtual SCSI mini-ports are virtually
impossible in current Windows architecture. Chief among them is that your
virtual SCSI mini-port can never have legitimate access to the DPC,
requiring you to either suffer the slings and arrows of a 10 millisecond
delay waiting on a timer, or requiring such rampant OS butchery that to
even think of submitting it to WHQL will result in terrible bouts of
hysterics.

have heard that the solution may be in the realm of iSCSI, but that is
still not released and what is available is undocumented. Pursuing a
virtual SCSI miniport really is a fool’s errand. I

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, April 22, 2006 9:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

That’s exactly how the things should work (search this list archive as this topic including pre-allocated IRP completion idea was discussed here tons of times).

However you’ll still need to have timer callback to push frozen queue sometimes.

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of hanzhu
Sent: Monday, April 24, 2006 7:33 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] PNP virtual scsi miniport driver

Thanks for your help!

Daemon tools means daemon tools’ virtual
cdrom(http://www.daemon-tools.cc/dtcc/download.php?mode=ViewCategory&catid=5).
They implement the virtual cdrom as a totally pnp compatible driver with
the help of one virtual bus driver and one virtual scsi miniport driver.

How about the idea of Complete the related SRB request to inject it to
the SCSIPORT context through the IOCTL_SCSI_MINIPORT irp? I mean when I
have to complete a SRB, I send a preallocated Irp whose Minor code is
IOCTL_SCSI_MINIPORT to the SCSI miniport driver. And this irp will
contain some informtion about the SRB. When my miniport driver receive
this IOCTL_SCSI_MINIPORT request, it should reside in the context of
SCSIPORT and it could complete the SRB request. IMHO, the overhead for
this approach is rather low compared with the timer callback’s 10ms latency.

By the way, Do I have to send IOCT_SCSI_MINIPORT when the SCSIPORT finds
out (INQUERY) a LUN for my virtual scsi adapter? Someone told me that
the SCSIPORT will reject my request if it couldn’t locate a
corresponding LUN for my virtual scsi adapter!

I can load my driver right now if I can adjust the LegacyBusType of
Toaster static bus to Internal instead of PnpBus. Anyway, thanks for
your tips.

If I have to reinvent a SCSI port only for my graduate design software,
that’s really a horrible task for me! :slight_smile:

Any suggestion will be appreciated!


Best Regards,
hanzhu

xxxxx@seagate.com 写道:

Given that Windows has no daemons, I can only assume that these “daemon
tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
a Windows virtual mini-port is like taking the word of Hollywood about
warp drive. You can overcome the issues of PNP refusing to load your
driver by using an ISA bus type, but that is only one of many issues you
will have to address.

There are several reasons why virtual SCSI mini-ports are virtually
impossible in current Windows architecture. Chief among them is that your
virtual SCSI mini-port can never have legitimate access to the DPC,
requiring you to either suffer the slings and arrows of a 10 millisecond
delay waiting on a timer, or requiring such rampant OS butchery that to
even think of submitting it to WHQL will result in terrible bouts of
hysterics.

have heard that the solution may be in the realm of iSCSI, but that is
still not released and what is available is undocumented. Pursuing a
virtual SCSI miniport really is a fool’s errand. I

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, April 22, 2006 9:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I remember Jamey Kirby and I discussing using the SCSI_MINIPORT IOCTL when
I was trying to do the same thing, and I wrote code to do that. But … in
the end I still ran into the brick wall that SCSIPORT has both the
underlying DPC and the interrupt service routine, and you can only queue a
DPC request by either a registered ISR or a timer request. You don’t have
hardware so you don?t have an ISR, leaving you the timer request and that
is a 10 millisecond delay.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Monday, April 24, 2006 11:33 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] PNP virtual scsi miniport driver

Thanks for your help!

Daemon tools means daemon tools’ virtual
cdrom(http://www.daemon-tools.cc/dtcc/download.php?mode=ViewCategory&catid
=5).
They implement the virtual cdrom as a totally pnp compatible driver with
the help of one virtual bus driver and one virtual scsi miniport driver.

How about the idea of Complete the related SRB request to inject it to
the SCSIPORT context through the IOCTL_SCSI_MINIPORT irp? I mean when I
have to complete a SRB, I send a preallocated Irp whose Minor code is
IOCTL_SCSI_MINIPORT to the SCSI miniport driver. And this irp will
contain some informtion about the SRB. When my miniport driver receive
this IOCTL_SCSI_MINIPORT request, it should reside in the context of
SCSIPORT and it could complete the SRB request. IMHO, the overhead for
this approach is rather low compared with the timer callback’s 10ms
latency.

By the way, Do I have to send IOCT_SCSI_MINIPORT when the SCSIPORT finds
out (INQUERY) a LUN for my virtual scsi adapter? Someone told me that
the SCSIPORT will reject my request if it couldn’t locate a
corresponding LUN for my virtual scsi adapter!

I can load my driver right now if I can adjust the LegacyBusType of
Toaster static bus to Internal instead of PnpBus. Anyway, thanks for
your tips.

If I have to reinvent a SCSI port only for my graduate design software,
that’s really a horrible task for me! :slight_smile:

Any suggestion will be appreciated!


Best Regards,
hanzhu

xxxxx@seagate.com д??:

Given that Windows has no daemons, I can only assume that these “daemon
tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port
to
a Windows virtual mini-port is like taking the word of Hollywood about
warp drive. You can overcome the issues of PNP refusing to load your
driver by using an ISA bus type, but that is only one of many issues you
will have to address.

There are several reasons why virtual SCSI mini-ports are virtually
impossible in current Windows architecture. Chief among them is that
your
virtual SCSI mini-port can never have legitimate access to the DPC,
requiring you to either suffer the slings and arrows of a 10 millisecond
delay waiting on a timer, or requiring such rampant OS butchery that to
even think of submitting it to WHQL will result in terrible bouts of
hysterics.

have heard that the solution may be in the realm of iSCSI, but that is
still not released and what is available is undocumented. Pursuing a
virtual SCSI miniport really is a fool’s errand. I

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, April 22, 2006 9:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I think that Daemon Tools use full storage port.
They are also reveng-protected by not working if KD is attached.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Monday, April 24, 2006 6:39 PM
Subject: RE: [ntdev] PNP virtual scsi miniport driver

> Given that Windows has no daemons, I can only assume that these “daemon
> tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
> a Windows virtual mini-port is like taking the word of Hollywood about
> warp drive. You can overcome the issues of PNP refusing to load your
> driver by using an ISA bus type, but that is only one of many issues you
> will have to address.
>
> There are several reasons why virtual SCSI mini-ports are virtually
> impossible in current Windows architecture. Chief among them is that your
> virtual SCSI mini-port can never have legitimate access to the DPC,
> requiring you to either suffer the slings and arrows of a 10 millisecond
> delay waiting on a timer, or requiring such rampant OS butchery that to
> even think of submitting it to WHQL will result in terrible bouts of
> hysterics.
>
> have heard that the solution may be in the realm of iSCSI, but that is
> still not released and what is available is undocumented. Pursuing a
> virtual SCSI miniport really is a fool’s errand. I
>
> The personal opinion of
> Gary G. Little
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
> xxxxx@gmail.com
> Sent: Saturday, April 22, 2006 9:14 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] PNP virtual scsi miniport driver
>
>
> This question has been asked many times here. Sorry for that. I have
> searched
> the archive but I can’t find any tips about this problem!
>
> Someone told me it’s impossible to implement a PNP software-only scsi
> miniport driver.
> But the daemon tools guys have already write their own product as a PNP
> software cdrom using a software
> bus and scsi miniport driver. How do they achieved this?
>
> I use the toaster static bus driver containing in the KMDF kit as my
> bus driver. I found that every time when PNP manager
> sent a IRP_MN_START_DEVICE IRP to my driver,
> SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
> SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
> SCSIPORT!SpFindInitData. The problem arised by this
> strange routine-SpFindInitData. It always returns 0 to the callee
> function-ScsiPortInitPnpAdapter, and the callee returns
> STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
> HwScsiFindAdapter cannot be invoked to finish the corresponding work!
> Actually, the pnp manager will call my unload routine directly without
> invoking any other routine registered by the ScsiPortInitialize routine.
>
> Could anyone provide me some information to solve this problem? Do I
> have to change or add something about the bus driver?
> It is also helpful if anyone could tell me why SpFindInitData always
> failed by the same reason!
>
> Thanks a lot!
>
> best regards,
> hanzhu
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

No, you’re wrong. They don’t use full storage port in current public
release.

It’s not against you, it’s against StarForce and SecuROM developers :slight_smile:

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Monday, April 24, 2006 7:42 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] PNP virtual scsi miniport driver

I think that Daemon Tools use full storage port.
They are also reveng-protected by not working if KD is attached.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Monday, April 24, 2006 6:39 PM
Subject: RE: [ntdev] PNP virtual scsi miniport driver

> Given that Windows has no daemons, I can only assume that these “daemon
> tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
> a Windows virtual mini-port is like taking the word of Hollywood about
> warp drive. You can overcome the issues of PNP refusing to load your
> driver by using an ISA bus type, but that is only one of many issues you
> will have to address.
>
> There are several reasons why virtual SCSI mini-ports are virtually
> impossible in current Windows architecture. Chief among them is that your
> virtual SCSI mini-port can never have legitimate access to the DPC,
> requiring you to either suffer the slings and arrows of a 10 millisecond
> delay waiting on a timer, or requiring such rampant OS butchery that to
> even think of submitting it to WHQL will result in terrible bouts of
> hysterics.
>
> have heard that the solution may be in the realm of iSCSI, but that is
> still not released and what is available is undocumented. Pursuing a
> virtual SCSI miniport really is a fool’s errand. I
>
> The personal opinion of
> Gary G. Little
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
> xxxxx@gmail.com
> Sent: Saturday, April 22, 2006 9:14 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] PNP virtual scsi miniport driver
>
>
> This question has been asked many times here. Sorry for that. I have
> searched
> the archive but I can’t find any tips about this problem!
>
> Someone told me it’s impossible to implement a PNP software-only scsi
> miniport driver.
> But the daemon tools guys have already write their own product as a PNP
> software cdrom using a software
> bus and scsi miniport driver. How do they achieved this?
>
> I use the toaster static bus driver containing in the KMDF kit as my
> bus driver. I found that every time when PNP manager
> sent a IRP_MN_START_DEVICE IRP to my driver,
> SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
> SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
> SCSIPORT!SpFindInitData. The problem arised by this
> strange routine-SpFindInitData. It always returns 0 to the callee
> function-ScsiPortInitPnpAdapter, and the callee returns
> STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
> HwScsiFindAdapter cannot be invoked to finish the corresponding work!
> Actually, the pnp manager will call my unload routine directly without
> invoking any other routine registered by the ScsiPortInitialize routine.
>
> Could anyone provide me some information to solve this problem? Do I
> have to change or add something about the bus driver?
> It is also helpful if anyone could tell me why SpFindInitData always
> failed by the same reason!
>
> Thanks a lot!
>
> best regards,
> hanzhu
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Key point here is to use BOTH ways to complete the request at the same time
and not only recursive calls OR timer callback.

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Monday, April 24, 2006 7:26 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PNP virtual scsi miniport driver

I remember Jamey Kirby and I discussing using the SCSI_MINIPORT IOCTL when
I was trying to do the same thing, and I wrote code to do that. But … in
the end I still ran into the brick wall that SCSIPORT has both the
underlying DPC and the interrupt service routine, and you can only queue a
DPC request by either a registered ISR or a timer request. You don’t have
hardware so you don?t have an ISR, leaving you the timer request and that
is a 10 millisecond delay.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Monday, April 24, 2006 11:33 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] PNP virtual scsi miniport driver

Thanks for your help!

Daemon tools means daemon tools’ virtual
cdrom(http://www.daemon-tools.cc/dtcc/download.php?mode=ViewCategory&catid
=5).
They implement the virtual cdrom as a totally pnp compatible driver with
the help of one virtual bus driver and one virtual scsi miniport driver.

How about the idea of Complete the related SRB request to inject it to
the SCSIPORT context through the IOCTL_SCSI_MINIPORT irp? I mean when I
have to complete a SRB, I send a preallocated Irp whose Minor code is
IOCTL_SCSI_MINIPORT to the SCSI miniport driver. And this irp will
contain some informtion about the SRB. When my miniport driver receive
this IOCTL_SCSI_MINIPORT request, it should reside in the context of
SCSIPORT and it could complete the SRB request. IMHO, the overhead for
this approach is rather low compared with the timer callback’s 10ms
latency.

By the way, Do I have to send IOCT_SCSI_MINIPORT when the SCSIPORT finds
out (INQUERY) a LUN for my virtual scsi adapter? Someone told me that
the SCSIPORT will reject my request if it couldn’t locate a
corresponding LUN for my virtual scsi adapter!

I can load my driver right now if I can adjust the LegacyBusType of
Toaster static bus to Internal instead of PnpBus. Anyway, thanks for
your tips.

If I have to reinvent a SCSI port only for my graduate design software,
that’s really a horrible task for me! :slight_smile:

Any suggestion will be appreciated!


Best Regards,
hanzhu

xxxxx@seagate.com д??:

Given that Windows has no daemons, I can only assume that these “daemon
tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port
to
a Windows virtual mini-port is like taking the word of Hollywood about
warp drive. You can overcome the issues of PNP refusing to load your
driver by using an ISA bus type, but that is only one of many issues you
will have to address.

There are several reasons why virtual SCSI mini-ports are virtually
impossible in current Windows architecture. Chief among them is that
your
virtual SCSI mini-port can never have legitimate access to the DPC,
requiring you to either suffer the slings and arrows of a 10 millisecond
delay waiting on a timer, or requiring such rampant OS butchery that to
even think of submitting it to WHQL will result in terrible bouts of
hysterics.

have heard that the solution may be in the realm of iSCSI, but that is
still not released and what is available is undocumented. Pursuing a
virtual SCSI miniport really is a fool’s errand. I

The personal opinion of
Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, April 22, 2006 9:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PNP virtual scsi miniport driver

This question has been asked many times here. Sorry for that. I have
searched
the archive but I can’t find any tips about this problem!

Someone told me it’s impossible to implement a PNP software-only scsi
miniport driver.
But the daemon tools guys have already write their own product as a PNP
software cdrom using a software
bus and scsi miniport driver. How do they achieved this?

I use the toaster static bus driver containing in the KMDF kit as my
bus driver. I found that every time when PNP manager
sent a IRP_MN_START_DEVICE IRP to my driver,
SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
SCSIPORT!SpFindInitData. The problem arised by this
strange routine-SpFindInitData. It always returns 0 to the callee
function-ScsiPortInitPnpAdapter, and the callee returns
STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
HwScsiFindAdapter cannot be invoked to finish the corresponding work!
Actually, the pnp manager will call my unload routine directly without
invoking any other routine registered by the ScsiPortInitialize routine.

Could anyone provide me some information to solve this problem? Do I
have to change or add something about the bus driver?
It is also helpful if anyone could tell me why SpFindInitData always
failed by the same reason!

Thanks a lot!

best regards,
hanzhu


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I found when daemon tools’ device was enumerated by their virtual bus,
you can observe that the related routines exported by SCSIPORT will
be called, such as ScsiportAddDevice etc. So, IMHO, Daemon tools should
be a miniport driver!


Best Regards,
hanzhu

Maxim S. Shatskih дµÀ:

I think that Daemon Tools use full storage port.
They are also reveng-protected by not working if KD is attached.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From:
> To: “Windows System Software Devs Interest List”
> Sent: Monday, April 24, 2006 6:39 PM
> Subject: RE: [ntdev] PNP virtual scsi miniport driver
>
>
>> Given that Windows has no daemons, I can only assume that these “daemon
>> tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port to
>> a Windows virtual mini-port is like taking the word of Hollywood about
>> warp drive. You can overcome the issues of PNP refusing to load your
>> driver by using an ISA bus type, but that is only one of many issues you
>> will have to address.
>>
>> There are several reasons why virtual SCSI mini-ports are virtually
>> impossible in current Windows architecture. Chief among them is that your
>> virtual SCSI mini-port can never have legitimate access to the DPC,
>> requiring you to either suffer the slings and arrows of a 10 millisecond
>> delay waiting on a timer, or requiring such rampant OS butchery that to
>> even think of submitting it to WHQL will result in terrible bouts of
>> hysterics.
>>
>> have heard that the solution may be in the realm of iSCSI, but that is
>> still not released and what is available is undocumented. Pursuing a
>> virtual SCSI miniport really is a fool’s errand. I
>>
>> The personal opinion of
>> Gary G. Little
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of
>> xxxxx@gmail.com
>> Sent: Saturday, April 22, 2006 9:14 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] PNP virtual scsi miniport driver
>>
>>
>> This question has been asked many times here. Sorry for that. I have
>> searched
>> the archive but I can’t find any tips about this problem!
>>
>> Someone told me it’s impossible to implement a PNP software-only scsi
>> miniport driver.
>> But the daemon tools guys have already write their own product as a PNP
>> software cdrom using a software
>> bus and scsi miniport driver. How do they achieved this?
>>
>> I use the toaster static bus driver containing in the KMDF kit as my
>> bus driver. I found that every time when PNP manager
>> sent a IRP_MN_START_DEVICE IRP to my driver,
>> SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
>> SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
>> SCSIPORT!SpFindInitData. The problem arised by this
>> strange routine-SpFindInitData. It always returns 0 to the callee
>> function-ScsiPortInitPnpAdapter, and the callee returns
>> STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
>> HwScsiFindAdapter cannot be invoked to finish the corresponding work!
>> Actually, the pnp manager will call my unload routine directly without
>> invoking any other routine registered by the ScsiPortInitialize routine.
>>
>> Could anyone provide me some information to solve this problem? Do I
>> have to change or add something about the bus driver?
>> It is also helpful if anyone could tell me why SpFindInitData always
>> failed by the same reason!
>>
>> Thanks a lot!
>>
>> best regards,
>> hanzhu
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Great. I’ll try that!
Thanks for your gurus’ valuable suggestion!


Best Regards,
hanzhu

Anton Kolomyeytsev дµÀ:

Key point here is to use BOTH ways to complete the request at the same time
and not only recursive calls OR timer callback.

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Monday, April 24, 2006 7:26 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PNP virtual scsi miniport driver

I remember Jamey Kirby and I discussing using the SCSI_MINIPORT IOCTL when
I was trying to do the same thing, and I wrote code to do that. But … in
the end I still ran into the brick wall that SCSIPORT has both the
underlying DPC and the interrupt service routine, and you can only queue a
DPC request by either a registered ISR or a timer request. You don’t have
hardware so you don’t have an ISR, leaving you the timer request and that
is a 10 millisecond delay.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Monday, April 24, 2006 11:33 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] PNP virtual scsi miniport driver

Thanks for your help!

Daemon tools means daemon tools’ virtual
cdrom(http://www.daemon-tools.cc/dtcc/download.php?mode=ViewCategory&catid
=5).
They implement the virtual cdrom as a totally pnp compatible driver with
the help of one virtual bus driver and one virtual scsi miniport driver.

How about the idea of Complete the related SRB request to inject it to
the SCSIPORT context through the IOCTL_SCSI_MINIPORT irp? I mean when I
have to complete a SRB, I send a preallocated Irp whose Minor code is
IOCTL_SCSI_MINIPORT to the SCSI miniport driver. And this irp will
contain some informtion about the SRB. When my miniport driver receive
this IOCTL_SCSI_MINIPORT request, it should reside in the context of
SCSIPORT and it could complete the SRB request. IMHO, the overhead for
this approach is rather low compared with the timer callback’s 10ms
latency.

By the way, Do I have to send IOCT_SCSI_MINIPORT when the SCSIPORT finds
out (INQUERY) a LUN for my virtual scsi adapter? Someone told me that
the SCSIPORT will reject my request if it couldn’t locate a
corresponding LUN for my virtual scsi adapter!

I can load my driver right now if I can adjust the LegacyBusType of
Toaster static bus to Internal instead of PnpBus. Anyway, thanks for
your tips.

If I have to reinvent a SCSI port only for my graduate design software,
that’s really a horrible task for me! :slight_smile:

Any suggestion will be appreciated!


Best Regards,
hanzhu

xxxxx@seagate.com дµÀ:
> Given that Windows has no daemons, I can only assume that these “daemon
> tools guys” are Linuxites, and comparing a Linux virtual SCSI mini-port
to
> a Windows virtual mini-port is like taking the word of Hollywood about
> warp drive. You can overcome the issues of PNP refusing to load your
> driver by using an ISA bus type, but that is only one of many issues you
> will have to address.
>
> There are several reasons why virtual SCSI mini-ports are virtually
> impossible in current Windows architecture. Chief among them is that
your
> virtual SCSI mini-port can never have legitimate access to the DPC,
> requiring you to either suffer the slings and arrows of a 10 millisecond
> delay waiting on a timer, or requiring such rampant OS butchery that to
> even think of submitting it to WHQL will result in terrible bouts of
> hysterics.
>
> have heard that the solution may be in the realm of iSCSI, but that is
> still not released and what is available is undocumented. Pursuing a
> virtual SCSI miniport really is a fool’s errand. I
>
> The personal opinion of
> Gary G. Little
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of
> xxxxx@gmail.com
> Sent: Saturday, April 22, 2006 9:14 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] PNP virtual scsi miniport driver
>
>
> This question has been asked many times here. Sorry for that. I have
> searched
> the archive but I can’t find any tips about this problem!
>
> Someone told me it’s impossible to implement a PNP software-only scsi
> miniport driver.
> But the daemon tools guys have already write their own product as a PNP
> software cdrom using a software
> bus and scsi miniport driver. How do they achieved this?
>
> I use the toaster static bus driver containing in the KMDF kit as my
> bus driver. I found that every time when PNP manager
> sent a IRP_MN_START_DEVICE IRP to my driver,
> SCSIPORT!SCSIPORT!ScsiPortFdoPnp called
> SCSIPORT!ScsiPortInitPnpAdapter, and then it invoked
> SCSIPORT!SpFindInitData. The problem arised by this
> strange routine-SpFindInitData. It always returns 0 to the callee
> function-ScsiPortInitPnpAdapter, and the callee returns
> STATUS_NO_SUCH_DEVICE(0xc000000e) to the pnp manager. So my miniport’s
> HwScsiFindAdapter cannot be invoked to finish the corresponding work!
> Actually, the pnp manager will call my unload routine directly without
> invoking any other routine registered by the ScsiPortInitialize routine.
>
> Could anyone provide me some information to solve this problem? Do I
> have to change or add something about the bus driver?
> It is also helpful if anyone could tell me why SpFindInitData always
> failed by the same reason!
>
> Thanks a lot!
>
> best regards,
> hanzhu
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer