diff options
author | Christian Ruppert <spooky85@gmail.com> | 2009-05-14 18:57:26 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2009-05-14 18:57:26 +0000 |
commit | 0cdb0313f171d80b13f02014ad4987b84c935a83 (patch) | |
tree | 3dea3b3bf5e588ca0afd0d76aab57f65ab0b8f06 /internal.c | |
parent | c2a9c9c5fd791d8fb2a85e726b80f44f2b28759e (diff) | |
download | ast2050-flashrom-0cdb0313f171d80b13f02014ad4987b84c935a83.zip ast2050-flashrom-0cdb0313f171d80b13f02014ad4987b84c935a83.tar.gz |
nic3com: allow selection of a particular PCI device to use as programmer
Add support for users to specify a certain NIC via PCI bus:slot.func
notation, in case there are multiple NICs in one system.
Usage: flashrom -p nic3com=bb:ss.f
Corresponding to flashrom svn r510.
Signed-off-by: Christian Ruppert <spooky85@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'internal.c')
-rw-r--r-- | internal.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -34,6 +34,17 @@ int io_fd; struct pci_access *pacc; /* For board and chipset_enable */ +struct pci_dev *pci_dev_find_filter(struct pci_filter filter) +{ + struct pci_dev *temp; + + for (temp = pacc->devices; temp; temp = temp->next) + if (pci_filter_match(&filter, temp)) + return temp; + + return NULL; +} + struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device) { struct pci_dev *temp; |