Hi All,

I need to write a bus driver for a customer storage controller chip. I
cannot use the SCSIPORT model as the enumeration of the devices is very
specific and I feel writing a bus driver will provide me the most
flexibility to do this. I am trying to decide between using the WDM and
KMDF framework for writing this driver. From KMDF documentation I could
not figure out what the framework entry point will be for IRP_MJ_SCSI.
Is it possible to do this storage bus driver using KMDF?

vs

Re: IRP_MJ_SCSI by Don

Don
Mon Jul 31 12:07:08 CDT 2006

I would strongly recomend you reconsider your approach, for the following
reasons:

1. The SCSI port driver interface is undocumented, and subject to
change.

2. Two firms offer SCSI port drivers, OSR and StorageCraft. They
charge big bucks (over $100,000) for these.

3. Even if you get the driver working, supporting Microsoft drivers
above this such as MPIO require lots of tweaking, since the upper drivers
expect certain error codes and only those codes, etc.

4. Microsoft has a new policy and will shortly no longer WHQL a SCSI
port driver, so you will not have signed code which will limit the sales of
your device.

If you can look at the Virtual Storport efforts Microsoft is currently
beta'ing. This may allow you enough flexibility to handle what you need.
If not, reengineer your device to not need a custom Port driver it will be
cheaper.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"vs" <windrv@gmail.com> wrote in message
news:1154364834.569779.150840@i42g2000cwa.googlegroups.com...
> Hi All,
>
> I need to write a bus driver for a customer storage controller chip. I
> cannot use the SCSIPORT model as the enumeration of the devices is very
> specific and I feel writing a bus driver will provide me the most
> flexibility to do this. I am trying to decide between using the WDM and
> KMDF framework for writing this driver. From KMDF documentation I could
> not figure out what the framework entry point will be for IRP_MJ_SCSI.
> Is it possible to do this storage bus driver using KMDF?
>
> vs
>



Re: IRP_MJ_SCSI by vs

vs
Mon Jul 31 13:27:24 CDT 2006

Don,
Would you be able to give me a pointer to the Virtual Storport? I did
some searches and could not find much.

regards
vs
> If you can look at the Virtual Storport efforts Microsoft is currently
> beta'ing. This may allow you enough flexibility to handle what you need.
> If not, reengineer your device to not need a custom Port driver it will be
> cheaper.


Re: IRP_MJ_SCSI by Don

Don
Mon Jul 31 13:36:21 CDT 2006

I think you are going to have to contact the storage group. It is a spin
off of the ISCSI work, I believe Jeff Goldner who posts here is involved in
this.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



"vs" <windrv@gmail.com> wrote in message
news:1154370444.126612.89630@b28g2000cwb.googlegroups.com...
> Don,
> Would you be able to give me a pointer to the Virtual Storport? I did
> some searches and could not find much.
>
> regards
> vs
>> If you can look at the Virtual Storport efforts Microsoft is currently
>> beta'ing. This may allow you enough flexibility to handle what you need.
>> If not, reengineer your device to not need a custom Port driver it will
>> be
>> cheaper.
>



Re: IRP_MJ_SCSI by Doron

Doron
Mon Jul 31 20:31:29 CDT 2006

IRP_MJ_SCSI is just a #define to IRP_MJ_INTERNAL_DEVICE_CONTROL. as such,
you can setup your WDFDEVICE to handle internal IOCTLs which allows you to
support SRBs.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"vs" <windrv@gmail.com> wrote in message
news:1154364834.569779.150840@i42g2000cwa.googlegroups.com...
> Hi All,
>
> I need to write a bus driver for a customer storage controller chip. I
> cannot use the SCSIPORT model as the enumeration of the devices is very
> specific and I feel writing a bus driver will provide me the most
> flexibility to do this. I am trying to decide between using the WDM and
> KMDF framework for writing this driver. From KMDF documentation I could
> not figure out what the framework entry point will be for IRP_MJ_SCSI.
> Is it possible to do this storage bus driver using KMDF?
>
> vs
>



Re: IRP_MJ_SCSI by vs

vs
Mon Jul 31 23:24:04 CDT 2006

Thanks Doron. My controller really does not speak SCSI. So I will need
to translate SCSI to its protocol. Your explanation satisfies my
requirement to get to the CDB. However would you think getting a
function driver like the RAMDISK to load for the PDO created by my bus
driver would be a good idea. I would then not have to do the SCSI
command translation.

My system would not have any SCSI/IDE controllers and will need to boot
off the disks attached my controller. I have a custom BIOS to do the
INT13. I also need to support attaching CD/DVD devices to my controller
ports.

Please advice the best way to proceed further. I am trying to choose
between the below:

- My bus controller creating PDO for which standard drivers like
disk.sys load. In this case I need to the SCSI command translation.

- My bus controller creating PDO for which I load my own function
driver - similar to ramdisk.

- Any other?

BTW this is an experimental system so WHQL is not a big concern for me
now. However please do advice if any of these paths take me to a major
roadblock in future..

thanks much.

-vs


Re: IRP_MJ_SCSI by Doron

Doron
Tue Aug 01 01:01:16 CDT 2006

AFAIK, root enumerate drivers are started too late in the boot process to be
used as the boot disk stack.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"vs" <windrv@gmail.com> wrote in message
news:1154406244.713418.120140@m79g2000cwm.googlegroups.com...
> Thanks Doron. My controller really does not speak SCSI. So I will need
> to translate SCSI to its protocol. Your explanation satisfies my
> requirement to get to the CDB. However would you think getting a
> function driver like the RAMDISK to load for the PDO created by my bus
> driver would be a good idea. I would then not have to do the SCSI
> command translation.
>
> My system would not have any SCSI/IDE controllers and will need to boot
> off the disks attached my controller. I have a custom BIOS to do the
> INT13. I also need to support attaching CD/DVD devices to my controller
> ports.
>
> Please advice the best way to proceed further. I am trying to choose
> between the below:
>
> - My bus controller creating PDO for which standard drivers like
> disk.sys load. In this case I need to the SCSI command translation.
>
> - My bus controller creating PDO for which I load my own function
> driver - similar to ramdisk.
>
> - Any other?
>
> BTW this is an experimental system so WHQL is not a big concern for me
> now. However please do advice if any of these paths take me to a major
> roadblock in future..
>
> thanks much.
>
> -vs
>



Re: IRP_MJ_SCSI by Mark

Mark
Tue Aug 01 06:32:29 CDT 2006

On 31 Jul 2006 21:24:04 -0700, "vs" <windrv@gmail.com> wrote:

>Thanks Doron. My controller really does not speak SCSI. So I will need
>to translate SCSI to its protocol. Your explanation satisfies my
>requirement to get to the CDB. However would you think getting a
>function driver like the RAMDISK to load for the PDO created by my bus
>driver would be a good idea. I would then not have to do the SCSI
>command translation.
>
>My system would not have any SCSI/IDE controllers and will need to boot
>off the disks attached my controller. I have a custom BIOS to do the
>INT13. I also need to support attaching CD/DVD devices to my controller
>ports.
>
>Please advice the best way to proceed further. I am trying to choose
>between the below:
>
>- My bus controller creating PDO for which standard drivers like
>disk.sys load. In this case I need to the SCSI command translation.
>

The SCSI command translation method is pretty trivial as there is a
very small subset of SCSI commands you need to support. This is the
method that has been used repeatedly in the past to support non
standard boot devices.


=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: IRP_MJ_SCSI by vs

vs
Fri Aug 04 17:51:02 CDT 2006

Thanks all. I got the basic functions working and I am able to mount
volumes and store/retreive.

Now I need to make my disk the boot device. Any references to guide me
where to look for information on doing this configuration will be very
useful for me. Thanks in advance.

vs