Commit 352096c7 authored by Peter Xu's avatar Peter Xu Committed by Paolo Bonzini
Browse files

pci: introduce pci_intx_line()



To fetch INTx irq line number.
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7f2477c2
......@@ -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);
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment