From: Mike Fochtman on
I've got an old WDM driver for a SCSI device. This 'SCSI Processor' device
needs exact CDB structure (6-byte CDB) to work. And that all worked under
the WDM driver. (a note under WDM storage class drivers says you have to use
Storage Class to talk with other SCSI devices such as scanners, so that's
what I did in the past)

Now I want to write a WDF driver for this device. Can a WDF driver setup
the SRB and CDB for such a device? How do I get access to the CDB that is
built for each Irp from the Foundation?

(it just seems like the WDF would make my driver a lot simpler, handling a
lot of the 'boiler-plate' coding)

Thanks,

Mike


From: Don Burn on
My reading of your question is can WDF support a driver at the storage
class layer, i.e. like the disk and tape, but in this case your scanner.
The answer is yes, Microsoft did a talk on this at the last DDC see
http://download.microsoft.com/download/d/1/d/d1dd7745-426b-4cc3-a269-abbbe427c0ef/dde-t681_ddc08.pptx


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr




> -----Original Message-----
> From: Mike Fochtman [mailto:MikeFochtman(a)discussions.microsoft.com]
> Posted At: Monday, May 10, 2010 11:52 AM
> Posted To: microsoft.public.development.device.drivers
> Conversation: WDF for Storage CLASS device
> Subject: WDF for Storage CLASS device
>
> I've got an old WDM driver for a SCSI device. This 'SCSI Processor'
> device
> needs exact CDB structure (6-byte CDB) to work. And that all worked
> under the
> WDM driver. (a note under WDM storage class drivers says you have to
> use
> Storage Class to talk with other SCSI devices such as scanners, so
> that's what
> I did in the past)
>
> Now I want to write a WDF driver for this device. Can a WDF driver
> setup the
> SRB and CDB for such a device? How do I get access to the CDB that is
> built
> for each Irp from the Foundation?
>
> (it just seems like the WDF would make my driver a lot simpler, handling
> a lot
> of the 'boiler-plate' coding)
>
> Thanks,
>
> Mike
>
>
>
> __________ Information from ESET Smart Security, version of virus
> signature
> database 5102 (20100510) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>

From: Doron Holan [MSFT] on
KMDF does not natively format or understand CDBs and SRBs. KMDF will help
you with queueing incoming storage requests as well generically formatting
them/tracking sent requests though. you would still have the code in your
driver which formats the CDB/SRB data structure though.

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Mike Fochtman" <MikeFochtman(a)discussions.microsoft.com> wrote in message
news:8CC6FA03-4C3A-458C-A573-64B9FCC0416B(a)microsoft.com...
> I've got an old WDM driver for a SCSI device. This 'SCSI Processor'
> device
> needs exact CDB structure (6-byte CDB) to work. And that all worked under
> the WDM driver. (a note under WDM storage class drivers says you have to
> use
> Storage Class to talk with other SCSI devices such as scanners, so that's
> what I did in the past)
>
> Now I want to write a WDF driver for this device. Can a WDF driver setup
> the SRB and CDB for such a device? How do I get access to the CDB that is
> built for each Irp from the Foundation?
>
> (it just seems like the WDF would make my driver a lot simpler, handling a
> lot of the 'boiler-plate' coding)
>
> Thanks,
>
> Mike
>
>
From: Mike Fochtman on


"Don Burn" wrote:

> My reading of your question is can WDF support a driver at the storage
> class layer, i.e. like the disk and tape, but in this case your scanner.

Yes, that's the idea. This device is very SCSI specific and I need to set
up the CDB length etc...

> The answer is yes, Microsoft did a talk on this at the last DDC see
> http://download.microsoft.com/download/d/1/d/d1dd7745-426b-4cc3-a269-abbbe427c0ef/dde-t681_ddc08.pptx
>

Thanks, I'll give that a good read through.

>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> > -----Original Message-----
> > From: Mike Fochtman [mailto:MikeFochtman(a)discussions.microsoft.com]
> > Posted At: Monday, May 10, 2010 11:52 AM
> > Posted To: microsoft.public.development.device.drivers
> > Conversation: WDF for Storage CLASS device
> > Subject: WDF for Storage CLASS device
> >
> > I've got an old WDM driver for a SCSI device. This 'SCSI Processor'
> > device
> > needs exact CDB structure (6-byte CDB) to work. And that all worked
> > under the
> > WDM driver. (a note under WDM storage class drivers says you have to
> > use
> > Storage Class to talk with other SCSI devices such as scanners, so
> > that's what
> > I did in the past)
> >
> > Now I want to write a WDF driver for this device. Can a WDF driver
> > setup the
> > SRB and CDB for such a device? How do I get access to the CDB that is
> > built
> > for each Irp from the Foundation?
> >
> > (it just seems like the WDF would make my driver a lot simpler, handling
> > a lot
> > of the 'boiler-plate' coding)
> >
> > Thanks,
> >
> > Mike
> >
> >
> >
> > __________ Information from ESET Smart Security, version of virus
> > signature
> > database 5102 (20100510) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
>
> .
>
From: Mike Fochtman on
Sorry I didn't get back sooner...

I reviewed the presentation that Don had mentioned...
http://download.microsoft.com/download/d/1/d/d1dd7745-426b-4cc3-a269-abbbe427c0ef/dde-t681_ddc08.pptx

But it was a bit light on details.

Yes, I want to use the KMDF to handle some of the routine queing and Power
stuff and then have my driver custom format the CDBs and SRBs.

I'm trying to figure out how to get access to the IRP/SRB and CDB so I can
change them. Can I do that from the WDF Request object? Most of the samples
just use a Wdf format method and don't show how to access these structures.

Thanks,



"Doron Holan [MSFT]" wrote:

> KMDF does not natively format or understand CDBs and SRBs. KMDF will help
> you with queueing incoming storage requests as well generically formatting
> them/tracking sent requests though. you would still have the code in your
> driver which formats the CDB/SRB data structure though.
>
> d
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Mike Fochtman" <MikeFochtman(a)discussions.microsoft.com> wrote in message
> news:8CC6FA03-4C3A-458C-A573-64B9FCC0416B(a)microsoft.com...
> > I've got an old WDM driver for a SCSI device. This 'SCSI Processor'
> > device
> > needs exact CDB structure (6-byte CDB) to work. And that all worked under
> > the WDM driver. (a note under WDM storage class drivers says you have to
> > use
> > Storage Class to talk with other SCSI devices such as scanners, so that's
> > what I did in the past)
> >
> > Now I want to write a WDF driver for this device. Can a WDF driver setup
> > the SRB and CDB for such a device? How do I get access to the CDB that is
> > built for each Irp from the Foundation?
> >
> > (it just seems like the WDF would make my driver a lot simpler, handling a
> > lot of the 'boiler-plate' coding)
> >
> > Thanks,
> >
> > Mike
> >
> >
> .
>