[patch 1/2] kvm tools: Fix up PCI pin assignment to conform specification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Only 4 pins are allowed for every PCI compilant device. Mutlifunctional
devices can use up to all INTA#,B#,C#,D# pins, for our sindle function
devices pin INTA# is enough.

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---
 tools/kvm/irq.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6.git/tools/kvm/irq.c
=====================================================================
--- linux-2.6.git.orig/tools/kvm/irq.c
+++ linux-2.6.git/tools/kvm/irq.c
@@ -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 *nu
 
 		*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);

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux