1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

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>
This commit is contained in:
Christian Ruppert
2009-05-14 18:57:26 +00:00
committed by Uwe Hermann
parent c2a9c9c5fd
commit 0cdb0313f1
4 changed files with 65 additions and 22 deletions

View File

@ -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;