Subject: Re: looking for devices on PCI bus [II]
To: None <firstname.lastname@example.org, email@example.com>
From: None <firstname.lastname@example.org>
Date: 05/03/2001 21:46:28
I've implemented a function looking for devices on pci busses
based on pci_probe_bus() (pci_probe_bus() is just a wrapper now).
While doing this I figured that the 2 functions (one matching by ID and one by
class) could be collapsed in one:
pci_find_device(int bus, int vendor, int product, int rev,
int class, int subclass, int interface,
void *arg, void (*f) __P((void *, struct pci_attach_args *)))
Using wildcards it's possible to do what the 2 previous functions did, and
much more (it's possible to find all devices matching vendor = VIA and
class/subclass = PCI/ISA bridge :)
Patch attached. Comments ?
If all you need to do is poke around some other card's config space to
determine it's revision, you should add some MD code to do that rather
than alter the MI PCI configuration code.