]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commitdiff
pass-through: pt_reset_interrupt_and_io_mapping(): use hw INTX
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 20 Jul 2009 11:26:39 +0000 (12:26 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 20 Jul 2009 11:26:39 +0000 (12:26 +0100)
This fixes a few things that I missed in previous patches:

* Use the hw INTX rather than INTA in pt_reset_interrupt_and_io_mapping()
  This is consistent with other uses of pci_intx()
* Remove now inaccurate "/* fix virtual interrupt pin to INTA# */" comments
* Use PCI_SLOT()

Signed-off-by: Simon Horman <horms@verge.net.au>
hw/pass-through.c

index 5062b31968a38da3ab448c2a03478fe5b112ed8a..c1a9b42b656c4130cd78f31bc4bd2edbb85eee5c 100644 (file)
@@ -2156,9 +2156,8 @@ static void pt_reset_interrupt_and_io_mapping(struct pt_dev *ptdev)
     uint8_t e_intx = 0;
 
     /* unbind INTx */
-    e_device = (ptdev->dev.devfn >> 3) & 0x1f;
-    /* fix virtual interrupt pin to INTA# */
-    e_intx = 0;
+    e_device = PCI_SLOT(ptdev->dev.devfn);
+    e_intx = pci_intx(ptdev);
 
     if (ptdev->msi_trans_en == 0 && ptdev->machine_irq)
     {
@@ -4131,7 +4130,6 @@ static struct pt_dev * register_real_device(PCIBus *e_bus,
     if (rc < 0 && machine_irq != 0)
     {
         e_device = PCI_SLOT(assigned_device->dev.devfn);
-        /* fix virtual interrupt pin to INTA# */
         e_intx = pci_intx(assigned_device);
 
         rc = xc_domain_bind_pt_pci_irq(xc_handle, domid, machine_irq, 0,