From 0cdb0313f171d80b13f02014ad4987b84c935a83 Mon Sep 17 00:00:00 2001 From: Christian Ruppert Date: Thu, 14 May 2009 18:57:26 +0000 Subject: 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 Acked-by: Uwe Hermann --- internal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal.c') diff --git a/internal.c b/internal.c index aa1fd9c..4c12115 100644 --- a/internal.c +++ b/internal.c @@ -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; -- cgit v1.1