To fetch INTx irq line number. Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> --- lib/pci.c | 5 +++++ lib/pci.h | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/pci.c b/lib/pci.c index 6416191..a7cfacb 100644 --- a/lib/pci.c +++ b/lib/pci.c @@ -327,6 +327,11 @@ void pci_scan_bars(struct pci_dev *dev) } } +uint8_t pci_intx_line(struct pci_dev *dev) +{ + return pci_config_readb(dev->bdf, PCI_INTERRUPT_LINE); +} + void pci_enable_defaults(struct pci_dev *dev) { pci_scan_bars(dev); diff --git a/lib/pci.h b/lib/pci.h index e71a05d..df86951 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -64,6 +64,7 @@ extern bool pci_bar_is_memory(struct pci_dev *dev, int bar_num); extern bool pci_bar_is_valid(struct pci_dev *dev, int bar_num); extern void pci_bar_print(struct pci_dev *dev, int bar_num); extern void pci_dev_print_id(pcidevaddr_t dev); +extern uint8_t pci_intx_line(struct pci_dev *dev); extern int pci_testdev(void); -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html