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

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

Disk lower filter, SCSIPORT vs STORPORT

Igor_RIgor_R Posts: 7
Hi all,

I have a storage class lower filter driver for write protection. Most of the storage devices used in our units are connected to a LSI SAS/SATA host adapter. The filter works fine with the older lsi_sas2.sys driver. But they have changed something in the new generation lsi_sas3.sys that my filter does not catch any IRPs anymore. I have not tried to debug the driver yet, but I noticed in their release notes they are stating that the new miniport is using the STORPORT rather than SCSIPORT interface. So I am wondering if that has anything to do with my filter not working now, and if there is an easy fix.

Thanks for any input,
Igor

Comments

  • Igor_RIgor_R Posts: 7
    Additional info.
    I compiled a debug version with some debug messages, and with DebugView I see that on a new disk arrival my driver's AddDevice routine does not get called at all, when the disk is connected to the SAS controller. But for USB it works fine.
  • Mark_RoddyMark_Roddy Posts: 4,269
    If your add device routine is not getting called then you are not filtering
    the correct enumeration type. Certainly the disk class driver's add device
    routine is getting called, right?

    Mark Roddy

    On Tue, Jan 2, 2018 at 9:43 AM, xxxxx@gmail.com
    wrote:

    > Additional info.
    > I compiled a debug version with some debug messages, and with DebugView I
    > see that on a new disk arrival my driver's AddDevice routine does not get
    > called at all, when the disk is connected to the SAS controller. But for
    > USB it works fine.
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at: showlists.cfm?list=ntdev>
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and
    > software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at <
    > http://www.osronline.com/page.cfm?name=ListServer>;
    >
  • Igor_RIgor_R Posts: 7
    Hi Mark,
    Thank you for your reply.
    Please give me an idea what I should check, because as I said it works if I use the older SAS controller. My filter is installed as a lower filter on the disk drive class like below, so I don' understand why a disk on one controller should work and another not.
    Thanks

    [ClassFilter_AddReg]
    HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00000004
    HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00010008, "filter"
  • Tim_RobertsTim_Roberts Posts: 12,619
    xxxxx@gmail.com wrote:
    > Hi Mark,
    > Thank you for your reply.
    > Please give me an idea what I should check, because as I said it works if I use the older SAS controller. My filter is installed as a lower filter on the disk drive class like below, so I don' understand why a disk on one controller should work and another not.

    Do you have any evidence that those other drives actually come up in
    class 4D36E967-E325-11CE-BFC1-08002BE10318?  Do they show up under "Disk
    drives" in Device Manager?

     
    > [ClassFilter_AddReg]
    > HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00000004
    > HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00010008, "filter"

    I don't believe there are any guarantees about the order of operations
    in an AddReg section, so you don't know that it will do the delete
    first.  You should only need the second 0x00010008 line.  It's not up to
    you to delete any filters that might already be there.

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Igor_RIgor_R Posts: 7
    Yes, they all show up under disk drives. If a disk is connected to any interface other than that new SAS controller, my AddDevice gets called.
    Thanks
  • Mark_RoddyMark_Roddy Posts: 4,269
    So how are you installing your filter?

    Mark Roddy

    On Wed, Jan 3, 2018 at 8:05 PM, xxxxx@gmail.com
    wrote:

    > Yes, they all show up under disk drives. If a disk is connected to any
    > interface other than that new SAS controller, my AddDevice gets called.
    > Thanks
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at: showlists.cfm?list=ntdev>
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and
    > software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at <
    > http://www.osronline.com/page.cfm?name=ListServer>;
    >
  • Igor_RIgor_R Posts: 7
    From my installer app, like this:
    RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 ...

    And I have an inf file that copies the driver file to the system drivers folder and adds the registry entries to register it as a lower filter to the hard drive class, like this:

    [Filter_AddReg]
    HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00000004
    HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00010008, "filter"
  • Mark_RoddyMark_Roddy Posts: 4,269
    So if you examine the class guid for the disks that you don't attach to
    what is their guid? (device manager device properties details Class Guid)

    Or alternatively look in the Enum key for these devices and see what Driver
    they are connecting to.

    You need to poke around at the configuration to see what is going on.
    !devnode and !devstack in the debugger might be helpful.

    Mark Roddy

    On Thu, Jan 4, 2018 at 10:09 AM, xxxxx@gmail.com
    wrote:

    > From my installer app, like this:
    > RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 ...
    >
    > And I have an inf file that copies the driver file to the system drivers
    > folder and adds the registry entries to register it as a lower filter to
    > the hard drive class, like this:
    >
    > [Filter_AddReg]
    > HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318},
    > "LowerFilters", 0x00000004
    > HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318},
    > "LowerFilters", 0x00010008, "filter"
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list online at: showlists.cfm?list=ntdev>
    >
    > MONTHLY seminars on crash dump analysis, WDF, Windows internals and
    > software drivers!
    > Details at
    >
    > To unsubscribe, visit the List Server section of OSR Online at <
    > http://www.osronline.com/page.cfm?name=ListServer>;
    >
  • Doron_HolanDoron_Holan Posts: 10,360
    You really shouldn't be deleting the LowerFilters value as you could be removing other filters from the list

    -----Original Message-----
    From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
    Sent: Tuesday, January 2, 2018 4:43 PM
    To: Windows System Software Devs Interest List <xxxxx@lists.osr.com>
    Subject: RE:[ntdev] Disk lower filter, SCSIPORT vs STORPORT

    Hi Mark,
    Thank you for your reply.
    Please give me an idea what I should check, because as I said it works if I use the older SAS controller. My filter is installed as a lower filter on the disk drive class like below, so I don' understand why a disk on one controller should work and another not.
    Thanks

    [ClassFilter_AddReg]
    HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00000004 HKLM, System\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}, "LowerFilters", 0x00010008, "filter"


    ---
    NTDEV is sponsored by OSR

    Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/showlists.cfm?list=ntdev&amp;data=02|01|[email protected]|84125fb0505e4b0340fb08d55242ee99|72f988bf86f141af91ab2d7cd011db47|1|0|636505370033568367&amp;sdata=gxReJtWih+V5DnQysS4cQ2N9krWk4e2xztcnLdSgJFk=&amp;reserved=0&gt;

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at <https://na01.safelinks.protection.outlook.com/?url=http://www.osr.com/seminars&amp;data=02|01|[email protected]|84125fb0505e4b0340fb08d55242ee99|72f988bf86f141af91ab2d7cd011db47|1|0|636505370033568367&amp;sdata=oEcGLncvEUPsBfv6X8sHhrPOUd6QlmaPpGp2wR8EBD0=&amp;reserved=0&gt;

    To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http://www.osronline.com/page.cfm?name=ListServer&amp;data=02|01|[email protected]|84125fb0505e4b0340fb08d55242ee99|72f988bf86f141af91ab2d7cd011db47|1|0|636505370033568367&amp;sdata=0ikGlmxrLwiNYl0KjpDubvXh4Biwy7cBFY2WrspTFzw=&amp;reserved=0&gt;
  • MBondMBond Posts: 843
    IIRC STOREPORT was introduced with server 2003, so I don?t know how old your old driver is.



    I would expect that all SAS and SATA controllers would have mini port drivers based on the storeport model as the older driver models had much inferior performance ? especially in the case of multi core machines and deep queues of pending IO.







    Sent from Mail for Windows 10



    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@gmail.com
    Sent: Wednesday, January 3, 2018 8:05:06 PM
    To: Windows System Software Devs Interest List
    Subject: RE:[ntdev] Disk lower filter, SCSIPORT vs STORPORT

    Yes, they all show up under disk drives. If a disk is connected to any interface other than that new SAS controller, my AddDevice gets called.
    Thanks

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Igor_RIgor_R Posts: 7
    Yes, correct. They said that the new driver is based on the storport model. So how does it affect the disk lower filter drivers?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!