Win 7 - two INF's and one driver?

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

Why don’t you just rename the sys file into a different name and use a separate service name for each different INF?

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” 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?

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?

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” 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?

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.

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.

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

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” 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

> 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.

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

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” 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

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.

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