about virtual bus driver and miniport driver

hi everyone,
for study, i write a scsi miniport driver to emulate a disk with a
file. to support disk’s dynamic plug-in and unplug, i overwrote the toaster
bus driver which handles the ioctl application sent, however, i dont’ know
how to plug my virtual disk in my specified bus, for some reason that i am
not very sure what is the hardwareid. What should i do? Am i in the right
way? Is there any other way to implement that?
any advise or help will be appreciated.
thanks in advance.
paul


Getting married? Find tips, tools and the latest trends at MSN Life Events.
http://lifeevents.msn.com/category.aspx?cid=married

No. All is simpler. Just respond properly to INQUIRY sent by SCSIPORT and
respond for all virtual disks you have.

One of the ScsiPortNotification calls will also give you the ability
(similar to IoInvalidateDeviceRelations) which will force SCSIPORT to re-send
INQUIRY to all SCSI addresses. SCSIPORT is already a hot-plug-supporting bus
driver, just reuse the functionality.

The only problem you have is with SCSIPORT execution context. It can be
solved 100% by writing your own full SCSI port - you can do it from scratch
based on Toaster bus driver, or purchase this kit:

http://www.storagecraft.com/products/vsport.html

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

----- Original Message -----
From: “paul chen”
To: “Windows System Software Devs Interest List”
Sent: Sunday, May 16, 2004 6:25 AM
Subject: [ntdev] about virtual bus driver and miniport driver

> hi everyone,
> for study, i write a scsi miniport driver to emulate a disk with a
> file. to support disk’s dynamic plug-in and unplug, i overwrote the toaster
> bus driver which handles the ioctl application sent, however, i dont’ know
> how to plug my virtual disk in my specified bus, for some reason that i am
> not very sure what is the hardwareid. What should i do? Am i in the right
> way? Is there any other way to implement that?
> any advise or help will be appreciated.
> thanks in advance.
> paul
>
> _________________________________________________________________
> Getting married? Find tips, tools and the latest trends at MSN Life Events.
> http://lifeevents.msn.com/category.aspx?cid=married
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

hi,Maxim
as you have told, SCSIPORT is already a hot-plug-supporting bus driver,
does it means that
if i do it from scratch based on Toaster, I cannot or dont’ need port
driver that ms provide?
What is the difference between the new bus driver and the default port
driver except that i can get the SCSIPORT execution context from the new
one?
thanks for ur reply.
paul

Date: Sun, 16 May 2004 17:43:57 +0400
From: “Maxim S. Shatskih”
>Subject: Re: about virtual bus driver and miniport driver
>
> No. All is simpler. Just respond properly to INQUIRY sent by SCSIPORT
>and
>respond for all virtual disks you have.
>
> One of the ScsiPortNotification calls will also give you the ability
>(similar to IoInvalidateDeviceRelations) which will force SCSIPORT to
>re-send
>INQUIRY to all SCSI addresses. SCSIPORT is already a hot-plug-supporting
>bus
>driver, just reuse the functionality.
>
> The only problem you have is with SCSIPORT execution context. It can
>be
>solved 100% by writing your own full SCSI port - you can do it from scratch
>based on Toaster bus driver, or purchase this kit:
>
> http://www.storagecraft.com/products/vsport.html
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com

_________________________________________________________________
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com

The problem is that SCSIPORT owns both the ISR and the DPC. Requests are
queued to the DPC via only two methods: the ISR or the timer. Since the
timer runs at a quantum, about 10 ms, you have a huge lump of slowdown if
you use the timer because you can’t get to the ISR. If your bus driver owns
the ISR and you attempt an interface linkage or callback into your SCSI
miniport residing under SCSIPORT, you can never queue to the proper DPC
since you don’t own and cannot acquire the device object that holds the DPC.
You’re still stuck with a 10 ms timer.

Yes you can write your own monolithic port driver, but the time you invest
in that, and it is not minimal, would probably be best spent in using
VSPORT, as Max suggested. Your code will then hold the ISR and DPC.


Gary G. Little
Seagate Technologies, LLC

“paul chen” wrote in message news:xxxxx@ntdev…
> hi,Maxim
> as you have told, SCSIPORT is already a hot-plug-supporting bus
driver,
> does it means that
> if i do it from scratch based on Toaster, I cannot or dont’ need port
> driver that ms provide?
> What is the difference between the new bus driver and the default port
> driver except that i can get the SCSIPORT execution context from the new
> one?
> thanks for ur reply.
> paul
>
> >Date: Sun, 16 May 2004 17:43:57 +0400
> >From: “Maxim S. Shatskih”
> >Subject: Re: about virtual bus driver and miniport driver
> >
> > No. All is simpler. Just respond properly to INQUIRY sent by
SCSIPORT
> >and
> >respond for all virtual disks you have.
> >
> > One of the ScsiPortNotification calls will also give you the ability
> >(similar to IoInvalidateDeviceRelations) which will force SCSIPORT to
> >re-send
> >INQUIRY to all SCSI addresses. SCSIPORT is already a hot-plug-supporting
> >bus
> >driver, just reuse the functionality.
> >
> > The only problem you have is with SCSIPORT execution context. It can
> >be
> >solved 100% by writing your own full SCSI port - you can do it from
scratch
> >based on Toaster bus driver, or purchase this kit:
> >
> > http://www.storagecraft.com/products/vsport.html
> >
> >Maxim Shatskih, Windows DDK MVP
> >StorageCraft Corporation
> >xxxxx@storagecraft.com
> >http://www.storagecraft.com
>
> _________________________________________________________________
> Check out the coupons and bargains on MSN Offers!
http://youroffers.msn.com
>
>

You can either:

a) use SCSIPORT. Then forget about Toaster, and try to deal with the
context limitation.

b) write your own full SCSI port to have no context limitation. For this,
you can use Toaster as a skeleton, or use our VSPORT library.

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

----- Original Message -----
From: “paul chen”
To: “Windows System Software Devs Interest List”
Sent: Monday, May 17, 2004 10:49 AM
Subject: Re:[ntdev] about virtual bus driver and miniport driver

> hi,Maxim
> as you have told, SCSIPORT is already a hot-plug-supporting bus driver,
> does it means that
> if i do it from scratch based on Toaster, I cannot or dont’ need port
> driver that ms provide?
> What is the difference between the new bus driver and the default port
> driver except that i can get the SCSIPORT execution context from the new
> one?
> thanks for ur reply.
> paul
>
> >Date: Sun, 16 May 2004 17:43:57 +0400
> >From: “Maxim S. Shatskih”
> >Subject: Re: about virtual bus driver and miniport driver
> >
> > No. All is simpler. Just respond properly to INQUIRY sent by SCSIPORT
> >and
> >respond for all virtual disks you have.
> >
> > One of the ScsiPortNotification calls will also give you the ability
> >(similar to IoInvalidateDeviceRelations) which will force SCSIPORT to
> >re-send
> >INQUIRY to all SCSI addresses. SCSIPORT is already a hot-plug-supporting
> >bus
> >driver, just reuse the functionality.
> >
> > The only problem you have is with SCSIPORT execution context. It can
> >be
> >solved 100% by writing your own full SCSI port - you can do it from scratch
> >based on Toaster bus driver, or purchase this kit:
> >
> > http://www.storagecraft.com/products/vsport.html
> >
> >Maxim Shatskih, Windows DDK MVP
> >StorageCraft Corporation
> >xxxxx@storagecraft.com
> >http://www.storagecraft.com
>
> _________________________________________________________________
> Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com