Storage MiniPort Driver

Hi,

I want to write a virtual storage miniport port driver for a custom device. The documentation says we can use other WDM routines in Virtual Mini Port driver. But for a real miniport driver we cant use such routines. Whether it is mandatory or we can still use other WDM routines in real miniport driver?

Regards,
Kumar

>>Whether it is mandatory or we can still use other WDM routines in real
miniport driver?

For real miniport driver, its mandatory to use *only* StorPortXXX APIs.

Regards,
Gokul T V

On Wed, May 26, 2010 at 2:57 PM, wrote:

> Hi,
>
> I want to write a virtual storage miniport port driver for a custom
> device. The documentation says we can use other WDM routines in Virtual Mini
> Port driver. But for a real miniport driver we cant use such routines.
> Whether it is mandatory or we can still use other WDM routines in real
> miniport driver?
>
> Regards,
> Kumar
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

On 2010/5/26 17:27, xxxxx@yahoo.com wrote:

Hi,

I want to write a virtual storage miniport port driver for a custom device. The documentation says we can use other WDM routines in Virtual Mini Port driver. But for a real miniport driver we cant use such routines. Whether it is mandatory or we can still use other WDM routines in real miniport driver?

Regards,
Kumar

For Storport Vitual Miniport driver, Yes you can use other WDM routines.
For SCSI/Stor Miniport driver, you just can use ScsiPort/Storport
routines as WDK doc says.

Thanks
Wayne

The document says if virtual storport miniport is not supposed to touch
hardware. A hardware miniport is not supposed to call anything other than
ScsiXxx or StorXxx.

In reality, there is no link or load time check implemented in the OS yet.
DTM/WHQL doesn’t check import table of a storage miniport driver.

Calvin

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.com
Sent: Wednesday, May 26, 2010 2:27 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Storage MiniPort Driver

Hi,

I want to write a virtual storage miniport port driver for a custom
device. The documentation says we can use other WDM routines in Virtual Mini
Port driver. But for a real miniport driver we cant use such routines.
Whether it is mandatory or we can still use other WDM routines in real
miniport driver?

Regards,
Kumar


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

>In reality, there is no link or load time check implemented in the OS yet. DTM/WHQL doesn’t check >import table of a storage miniport driver.
Even building a miniport StorPort driver with call to others than StorPortXXXX functions would require changing *.h files. It is not easy to do. And I think it does not make any sense because miniport driver works under control StorPort driver. Calling others WDM functions would change a state of StorPort driver which may lead to undefined result. Before doing such work it is necessary to understand the implementation of StorPort driver.

Igor Sharovar

If i want to write a virtual SCSI Miniport driver, i still can use other WDM routines right?? DDK says that StorPort only works from WS 2003 onwards. Is it do not support XP?

>If i want to write a virtual SCSI Miniport driver, i still can use other WDM routines right??
You could not develop a virtual SCSI Miniport driver. Where do you get such information?

Is it do not support XP?
Virtual miniport StorPort driver is not supported in XP.

Igor Sharovar

>routines. Whether it is mandatory or we can still use other WDM routines in real miniport driver?

Only in a virtual miniport.

–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>that StorPort only works from WS 2003 onwards. Is it do not support XP?

StorPort is not supported on XP at all.

–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>> You could not develop a virtual SCSI Miniport driver. Where do you get
such information?
A monolithic root enumerated virtual scsi miniport cannot be free from
non-ScsiXxx calls (simple RAM IO is ok) and has some well known problems
which have been discussed many times.

A bus enumerated virtual scsi miniport SOLVES ALL problems if it’s done
carefully. At least mine is WHQL certified. It requires more unpleasant work
than an equivalent virtual storport miniport. And that’s the only model
works from w2k to w2k8.

> Virtual miniport StorPort driver is not supported in XP.
WHY DOESN’T MSFT back port storport to xp? Shouldn’t be that hard, no? WXP
support is still often an item in MRD.

Calvin

>A bus enumerated virtual scsi miniport SOLVES ALL problems if it’s done >carefully. At least mine is WHQL certified. It requires more unpleasant >work than an equivalent virtual storport miniport. And that’s the only model >works from w2k to w2k8.

I believe such design does not involved SCSI/Stor Port driver. The bus driver play itself a role of Port driver. The bus driver just could create a PDO of disk.sys and handles all SRB’s.
OP asks different question. He wants to use a SCSI virtual miniport driver which could, as virtual miniport StorPort driver, work under control of SCSI Port driver. I don’t think it is possible.

Igor Sharovar

>>I believe such design does not involved SCSI/Stor Port driver.

>The bus driver play itself a role of Port driver. The bus driver
>just could create a PDO of disk.sys and handles all SRB’s.

What you describes is full port driver.

No, my bus driver plays the same role as pci.sys. It enumerates PDO for the
miniport adapter. It doesn’t know anything about srb. Its children is a scsi
miniport which links to scsiport.sys. I also have a equivalent storport
miniport but is not very useful. Scsiport or storport enumerates the disk
PDO as usual.

Calvin

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Saturday, May 29, 2010 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Storage MiniPort Driver

A bus enumerated virtual scsi miniport SOLVES ALL problems if it’s done
carefully. At least mine is WHQL certified. It requires more unpleasant
work than an equivalent virtual storport miniport. And that’s the only
model >works from w2k to w2k8.

I believe such design does not involved SCSI/Stor Port driver. The bus
driver play itself a role of Port driver. The bus driver just could create a
PDO of disk.sys and handles all SRB’s.
OP asks different question. He wants to use a SCSI virtual miniport driver
which could, as virtual miniport StorPort driver, work under control of SCSI
Port driver. I don’t think it is possible.

Igor Sharovar


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

>Its children is a scsi miniport which links to scsiport.sys.
Wow! The most amazing works in programming I saw in Windows device driver development.
The first thing that come to my mind is a problem how to register your device in SCSI Port driver. SCSI port enumerates devices and calls HwScsiFindAdapter. Your bus driver does enumeration also. Who does create and own PDO of the device?

Igor Sharovar

> A bus enumerated virtual scsi miniport SOLVES ALL problems if it’s done

carefully. At least mine is WHQL certified. It requires more unpleasant work
than an equivalent virtual storport miniport. And that’s the only model
works from w2k to w2k8.

And how your miniport passes the requests down to the bus?

–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>> And how your miniport passes the requests down to the bus?

This is a very good question, Max.

In virtual storport, it’s simple because it has access to the !devstack. In scsi miniport model, it does require some special work such that the miniport can “bind” to the bus driver legally.

I need to check with my management to see how much I’m allowed to talk before getting myself in trouble. They owns *all* of my work by default. I’m sure some of them are reading NTDEV.

Calvin

>I need to check with my management to see how much I’m allowed to talk >before getting myself in trouble.
Everybody understand it. I personally met, in fact I worked, on projects for virtual storage driver for XP and early version of Windows, which either implemented as a Storage Port driver as a described before or as a Disk Class driver. And I didn’t think should be a third options. For me just enough to know that everything is possible even implementing a virtual miniport SCSI driver :slight_smile:
And I just simple have a big respect for such type of work.

Igor Sharovar

1 Like