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

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

Win 7 - two INF's and one driver?

Don_Burn_1Don_Burn_1 Member Posts: 4,311
I created a driver that is highly customizable for a client, which is
now using the driver for a large number of different PCI devices. Each
devices parameters are under a registry key derived from the PCI
hardware ID. The customer distributes the driver with an INF file
unique for each device, recognizing that for a second different PCI card
install this unfortunately needs a reboot. The problem is that with
Win7 we are getting:

Windows found driver software for your device but encountered an
error while attempting to install it
This device is not working properly because Windows cannot load the
drivers required for this device. (Code 31)

This is causing the end users to freak out and assume there is a serious
problem instead just rebooting. I am trying to figure an approach that
relieve this. The work was originally done for XP which nicely just
indicated you need to restart.

It is not possible for the client to combine everything into one INF
file, for a number of reasons. Anyone have any suggestions on
approaches that would reduce the "oh my god" factor in this install?


Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

Comments

  • Alex_GrigAlex_Grig Member Posts: 3,238
    Why don't you just rename the sys file into a different name and use a separate service name for each different INF?
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    At present there are two, in the end there will be a lot of different
    devices, having N copies of a driver loaded is not a great idea.


    Don Burn
    Windows Filesystem and Driver Consulting
    Website: http://www.windrvr.com
    Blog: http://msmvps.com/blogs/WinDrvr




    "xxxxx@broadcom.com" <xxxxx@broadcom.com> wrote in message
    news:xxxxx@ntdev:

    > Why don't you just rename the sys file into a different name and use a separate service name for each different INF?
  • Alex_GrigAlex_Grig Member Posts: 3,238
    Is the binary 1MB or 10MB or 100 MB? What's a chance of a customer running 3 different incarnations of that?
    I would not sweat about 10 MB loaded twice. It was year 2011 when I woke up this morning.

    Also, is the service name and all other strings (like the service friendly name) always the same for different INFs?
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    Chances of running 5 different is high and it is a small system. The
    service name and all the other strings are the same.


    Don Burn
    Windows Filesystem and Driver Consulting
    Website: http://www.windrvr.com
    Blog: http://msmvps.com/blogs/WinDrvr




    "xxxxx@broadcom.com" <xxxxx@broadcom.com> wrote in message
    news:xxxxx@ntdev:

    > Is the binary 1MB or 10MB or 100 MB? What's a chance of a customer running 3 different incarnations of that?
    > I would not sweat about 10 MB loaded twice. It was year 2011 when I woke up this morning.
    >
    > Also, is the service name and all other strings (like the service friendly name) always the same for different INFs?
  • Pavel_APavel_A Member Posts: 2,659
    Can a custom interface class be defined for PCI like it can be for USB?
    Then it could be specified in the inf instead of vid,pid.
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,914
    xxxxx@fastmail.fm wrote:
    > Can a custom interface class be defined for PCI like it can be for USB?
    > Then it could be specified in the inf instead of vid,pid.

    I'm not exactly sure what you mean, but I think the answer is yes.
    Device Manager creates compatible IDs for PCI devices that includes the
    class code from the descriptors. For example, my 1394 controller has
    the following compatible IDs:

    PCI\VEN_1106&DEV_3044&REV_46
    PCI\VEN_1106&DEV_3044
    PCI\VEN_1106&CC_0C0010
    PCI\VEN_1106&CC_0C00
    PCI\VEN_1106
    PCI\CC_0C0010
    PCI\CC_0C00

    So, I could have an INF file that matches this specific revision, or all
    revisions of this device, or all devices from this vendor with this
    specific class and subclass, or all devices from this vendor with this
    class, or all devices in this class.

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

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

  • Pavel_APavel_A Member Posts: 2,659
    I mean that all devices supported by that driver can have same CC and one common inf will match all existing and future devices. After automatic install, user can enter nesessary registry parameters per vid/pid and restart the device. But i do not have the spec handy and not sure how custom classes are defined for pci.

    Regards,
    Pavel
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    The devices have the same VID but different PID's and the registry
    settings are very large, including a block of binary data that can be
    several hundred bytes long.

    I think we are just going to have to document it.


    Don Burn
    Windows Filesystem and Driver Consulting
    Website: http://www.windrvr.com
    Blog: http://msmvps.com/blogs/WinDrvr



    "xxxxx@fastmail.fm" <xxxxx@fastmail.fm> wrote in message
    news:xxxxx@ntdev:

    > I mean that all devices supported by that driver can have same CC and one common inf will match all existing and future devices. After automatic install, user can enter nesessary registry parameters per vid/pid and restart the device. But i do not have the spec handy and not sure how custom classes are defined for pci.
    >
    > Regards,
    > Pavel
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    > This is causing the end users to freak out and assume there is a serious
    > problem instead just rebooting.

    Could you use a co-installer to request the reboot?

    Tim.
  • Pavel_APavel_A Member Posts: 2,659
    On 06-Aug-2011 13:26, Tim Green wrote:
    >
    >> This is causing the end users to freak out and assume there is a serious
    >> problem instead just rebooting.
    >
    > Could you use a co-installer to request the reboot?
    >
    > Tim.

    Sorry for offtopic, but can't help to recall how easy this is in Linux.
    You just say: hey driver X, you now handle devices with these vid and
    pid. Presto, with one trivial echo command it Just Works. No reboots, no
    snake oil.

    --pa
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    Pavel,

    My frustration is that until Vista/Win 7 the OS would come up and
    say "You must restart your computer before the new settings will take
    effect." Which was fine for the client and their customers, but now it
    just rules the device as malfunctioning.


    Don Burn
    Windows Filesystem and Driver Consulting
    Website: http://www.windrvr.com
    Blog: http://msmvps.com/blogs/WinDrvr




    "Pavel A" <xxxxx@fastmail.fm> wrote in message news:xxxxx@ntdev:

    > On 06-Aug-2011 13:26, Tim Green wrote:
    > >
    > >> This is causing the end users to freak out and assume there is a serious
    > >> problem instead just rebooting.
    > >
    > > Could you use a co-installer to request the reboot?
    > >
    > > Tim.
    >
    > Sorry for offtopic, but can't help to recall how easy this is in Linux.
    > You just say: hey driver X, you now handle devices with these vid and
    > pid. Presto, with one trivial echo command it Just Works. No reboots, no
    > snake oil.
    >
    > --pa
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,914
    xxxxx@fastmail.fm wrote:
    > I mean that all devices supported by that driver can have same CC and one common inf will match all existing and future devices.

    Yes, that's exactly what I showed you.

    > After automatic install, user can enter nesessary registry parameters per vid/pid and restart the device.

    VID/PID is the USB term. PCI calls it vendor ID and device ID.

    How would the user know to do this? These are PCI devices, so they're
    all going to be detected at boot time.

    > But i do not have the spec handy and not sure how custom classes are defined for pci.

    Well, you need to have the spec. The class code is a 24-bit field in
    the PCI configuration space.

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

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

  • Pavel_APavel_A Member Posts: 2,659
    On 08-Aug-2011 21:03, Tim Roberts wrote:
    > xxxxx@fastmail.fm wrote:
    >> I mean that all devices supported by that driver can have same CC and one common inf will match all existing and future devices.
    >
    > Yes, that's exactly what I showed you.

    Thanks. Back to my machine and bookshelf now.
    So, FF maybe can indicate "vendor specific" class.

    >> After automatic install, user can enter nesessary registry parameters per vid/pid and restart the device.
    >
    > VID/PID is the USB term. PCI calls it vendor ID and device ID.
    >
    > How would the user know to do this? These are PCI devices, so they're
    > all going to be detected at boot time.

    Yes but if Windows can install a PCI driver by class it won't prompt to
    reboot or scare the user otherways. It will be up to the driver to fail
    or not. The driver could write an eventlog message that says, "new
    device found but no data for it".
    However the data per h/w IDs cannot be in the common INF with this
    approach, so this is not suitable for the OP. It would work if they
    could put this data in files or other place in the registry.

    >> But i do not have the spec handy and not sure how custom classes are defined for pci.
    >
    > Well, you need to have the spec. The class code is a 24-bit field in
    > the PCI configuration space.


    Thanks,
    -- pa
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!

Upcoming OSR Seminars
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Developing Minifilters 8 April 2019 OSR Seminar Space