mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-15 18:05:49 +00:00
kvm tools: Fix up PCI pin assignment to conform specification
Only 4 pins are allowed for every PCI compilant device as per PCI 2.2 spec
Section 2.2.6 ("Interrupt Pins"). Multifunctional devices can use up to all
INTA#,B#,C#,D# pins, for our single function devices pin INTA# is enough.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
384922b381
commit
33348d034d
@@ -7,7 +7,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static u8 next_pin = 1;
|
||||
static u8 next_line = 3;
|
||||
static u8 next_dev = 1;
|
||||
static struct rb_root pci_tree = RB_ROOT;
|
||||
@@ -71,7 +70,13 @@ int irq__register_device(u32 dev, u8 *num, u8 *pin, u8 *line)
|
||||
|
||||
*node = (struct pci_dev) {
|
||||
.id = dev,
|
||||
.pin = next_pin++,
|
||||
/*
|
||||
* PCI supports only INTA#,B#,C#,D# per device.
|
||||
* A#,B#,C#,D# are allowed for multifunctional
|
||||
* devices so stick with A# for our single
|
||||
* function devices.
|
||||
*/
|
||||
.pin = 1,
|
||||
};
|
||||
|
||||
INIT_LIST_HEAD(&node->lines);
|
||||
|
||||
Reference in New Issue
Block a user