Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Scsi Port Filter driver

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Hi all,
I have developed a filter driver which layers itself between the SCSI
port driver and the Disk/class driver for NT4.0. The driver loads
properly, but it does not receive any IRPs other than the ones with the
IOCTL_SCSI_GET_INQUIRY_DATA, IOCTL_SCSI_GET_CAPABILITIES and
IOCTL_SCSI_RESCAN_BUS and the CREATE and CLOSE calls. I need help to
figure out why this happens. Is there any documentation about filter
drivers which layer between the SCSI class driver and the port driver ?

Thanks in advance,
Unni

Comments

  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Be aware that there are a fair number of monolithic storage drivers around.
    They don't use the disk/class/port driver mechanisms at all. Your filter
    won't work with those devices. Most notably, fibre channel drivers. There
    are a few companies with miniports for their cards, but most are now
    monolithic for performance reasons (there's a 10-15% penalty for using a
    miniport).

    See appendix A, part 2 (Designing SCSI Filter drivers) of the kernel mode
    drivers design guide for pretty complete information re: scsi filter drivers
    and how to implement them.

    > -----Original Message-----
    > From: [email protected]
    > [mailto:[email protected]]On Behalf Of Unnikrishnan P K
    > Sent: Wednesday, March 22, 2000 9:12 AM
    > To: NT Developers Interest List
    > Subject: [ntdev] Scsi Port Filter driver
    >
    >
    > Hi all,
    > I have developed a filter driver which layers itself between the SCSI
    > port driver and the Disk/class driver for NT4.0. The driver loads
    > properly, but it does not receive any IRPs other than the ones with the
    > IOCTL_SCSI_GET_INQUIRY_DATA, IOCTL_SCSI_GET_CAPABILITIES and
    > IOCTL_SCSI_RESCAN_BUS and the CREATE and CLOSE calls. I need help to
    > figure out why this happens. Is there any documentation about filter
    > drivers which layer between the SCSI class driver and the port driver ?
    >
    > Thanks in advance,
    > Unni
    >
    >
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Are you handling IRP_MJ_SCSI commands? I have a SCSI filter and it is
    working and capturing requests correctly.

    --Mark

    Mark J. Cariddi
    Consulting Associate
    [email protected]

    OSR Open Systems Resources, Inc.
    105 Route 101A, Suite 19
    Amherst, New Hampshire 03031
    603/595-6500
    603/595-6503 Fax
    http://www.osr.com

    ****************************************
    The definitive book on writing Windows NT
    device drivers, "Windows NT Device Driver
    Development" by OSR consulting partners
    Peter Viscarola and Tony Mason, is now
    available for ordering.
    ****************************************





    -----Original Message-----
    From: Unnikrishnan P K [mailto:[email protected]]
    Sent: Wednesday, March 22, 2000 10:12 AM
    To: NT Developers Interest List
    Subject: [ntdev] Scsi Port Filter driver


    Hi all,
    I have developed a filter driver which layers itself between the SCSI
    port driver and the Disk/class driver for NT4.0. The driver loads
    properly, but it does not receive any IRPs other than the ones with the
    IOCTL_SCSI_GET_INQUIRY_DATA, IOCTL_SCSI_GET_CAPABILITIES and
    IOCTL_SCSI_RESCAN_BUS and the CREATE and CLOSE calls. I need help to
    figure out why this happens. Is there any documentation about filter
    drivers which layer between the SCSI class driver and the port driver ?

    Thanks in advance,
    Unni



    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Hi Mark,
    I have not been able to receive the IRP_MJ_SCSI commands in my filter
    driver. But the OSR book mentions about filter driver being able to receive
    all commands. Is there any flag setting required ?
    Thanks in advance,
    Unni

    Mark Cariddi wrote:

    > Are you handling IRP_MJ_SCSI commands? I have a SCSI filter and it is
    > working and capturing requests correctly.
    >
    > --Mark
    >
    > Mark J. Cariddi
    > Consulting Associate
    > [email protected]
    >
    > OSR Open Systems Resources, Inc.
    > 105 Route 101A, Suite 19
    > Amherst, New Hampshire 03031
    > 603/595-6500
    > 603/595-6503 Fax
    > http://www.osr.com
    >
    > ****************************************
    > The definitive book on writing Windows NT
    > device drivers, "Windows NT Device Driver
    > Development" by OSR consulting partners
    > Peter Viscarola and Tony Mason, is now
    > available for ordering.
    > ****************************************
    >
    > -----Original Message-----
    > From: Unnikrishnan P K [mailto:[email protected]]
    > Sent: Wednesday, March 22, 2000 10:12 AM
    > To: NT Developers Interest List
    > Subject: [ntdev] Scsi Port Filter driver
    >
    > Hi all,
    > I have developed a filter driver which layers itself between the SCSI
    > port driver and the Disk/class driver for NT4.0. The driver loads
    > properly, but it does not receive any IRPs other than the ones with the
    > IOCTL_SCSI_GET_INQUIRY_DATA, IOCTL_SCSI_GET_CAPABILITIES and
    > IOCTL_SCSI_RESCAN_BUS and the CREATE and CLOSE calls. I need help to
    > figure out why this happens. Is there any documentation about filter
    > drivers which layer between the SCSI class driver and the port driver ?
    >
    > Thanks in advance,
    > Unni
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Well the first think I would do is download devicetree (for nt4.0) from
    www.osr.com and make sure that your driver is correctly filtering what you
    think your filtering. Second, I would make sure that you've loaded
    correctly. I assume that you are loading as part of SCSI CLASS group and
    are the first driver in the group to be loaded (in the same boot phase as
    the scsi class drivers). Then I would make sure that you are correctly
    attaching to SCSIPORT0 through SCSIPORTN.

    Finally, if none of the above help, then maybe you need to post your driver
    entry code so that people can look at it.

    -----Original Message-----
    From: Unnikrishnan P K [mailto:[email protected]]
    Sent: Wednesday, March 22, 2000 11:40 AM
    To: NT Developers Interest List
    Subject: [ntdev] RE: Scsi Port Filter driver


    Hi Mark,
    I have not been able to receive the IRP_MJ_SCSI commands in my filter
    driver. But the OSR book mentions about filter driver being able to receive
    all commands. Is there any flag setting required ?
    Thanks in advance,
    Unni

    Mark Cariddi wrote:

    > Are you handling IRP_MJ_SCSI commands? I have a SCSI filter and it is
    > working and capturing requests correctly.
    >
    > --Mark
    >
    > Mark J. Cariddi
    > Consulting Associate
    > [email protected]
    >
    > OSR Open Systems Resources, Inc.
    > 105 Route 101A, Suite 19
    > Amherst, New Hampshire 03031
    > 603/595-6500
    > 603/595-6503 Fax
    > http://www.osr.com
    >
    > ****************************************
    > The definitive book on writing Windows NT
    > device drivers, "Windows NT Device Driver
    > Development" by OSR consulting partners
    > Peter Viscarola and Tony Mason, is now
    > available for ordering.
    > ****************************************
    >
    > -----Original Message-----
    > From: Unnikrishnan P K [mailto:[email protected]]
    > Sent: Wednesday, March 22, 2000 10:12 AM
    > To: NT Developers Interest List
    > Subject: [ntdev] Scsi Port Filter driver
    >
    > Hi all,
    > I have developed a filter driver which layers itself between the SCSI
    > port driver and the Disk/class driver for NT4.0. The driver loads
    > properly, but it does not receive any IRPs other than the ones with the
    > IOCTL_SCSI_GET_INQUIRY_DATA, IOCTL_SCSI_GET_CAPABILITIES and
    > IOCTL_SCSI_RESCAN_BUS and the CREATE and CLOSE calls. I need help to
    > figure out why this happens. Is there any documentation about filter
    > drivers which layer between the SCSI class driver and the port driver ?
    >
    > Thanks in advance,
    > Unni
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]
    > To unsubscribe send a blank email to $subst('Email.Unsub')
    >
    > ---
    > You are currently subscribed to ntdev as: [email protected]dia.hp.com
    > To unsubscribe send a blank email to $subst('Email.Unsub')


    ---
    You are currently subscribed to ntdev as: [email protected]
    To unsubscribe send a blank email to $subst('Email.Unsub')
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 24 January 2022 Live, Online
Internals & Software Drivers 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online
Developing Minifilters 23 May 2022 Live, Online