On Thu, 31 May 2007 16:17:00 -0700
Roland Dreier <[EMAIL PROTECTED]> wrote:

> What about the changes to fix the order that MSI-X irqs are returned
> in (iirc, list_add had to be changed to list_add_tail in a couple of
> places).  Without that change, multiple MSI-X interrupts seem to be
> broken: the kernel programs the MSI-X table in the opposite order that
> it gives the irq numbers to the driver.  The net effect is that if I
> request, say, 3 MSI-X interrupts for a device, then when the device
> generates the first interrupt, the driver thinks it generated the
> third interrupt, and things go fairly haywire.
> 

That's msi-fix-the-ordering-of-msix-irqs.patch, which is also queued for
the next batch.


"next batch" == around 40 patches atm.  Some of these need maintainer acks
so they will be further delayed, or more likely just merged without the
appropriate ack.



From: "Eric W. Biederman" <[EMAIL PROTECTED]>

"Mike Miller (OS Dev)" <[EMAIL PROTECTED]> writes:

Found what seems the problem with our vectors being listed backward.  In
drivers/pci/msi.c we should be using list_add_tail rather than list_add to
preserve the ordering across various kernels.  Please consider this for
inclusion.

Signed-off-by: "Eric W. Biederman" <[EMAIL PROTECTED]>
Screwed-up-by: Michael Ellerman <[EMAIL PROTECTED]>
Cc: "Mike Miller (OS Dev)" <[EMAIL PROTECTED]>
Cc: Andi Kleen <[EMAIL PROTECTED]>
Cc: Greg KH <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/pci/msi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/pci/msi.c~msi-fix-the-ordering-of-msix-irqs drivers/pci/msi.c
--- a/drivers/pci/msi.c~msi-fix-the-ordering-of-msix-irqs
+++ a/drivers/pci/msi.c
@@ -333,7 +333,7 @@ static int msi_capability_init(struct pc
                        msi_mask_bits_reg(pos, is_64bit_address(control)),
                        maskbits);
        }
-       list_add(&entry->list, &dev->msi_list);
+       list_add_tail(&entry->list, &dev->msi_list);
 
        /* Configure MSI capability structure */
        ret = arch_setup_msi_irqs(dev, 1, PCI_CAP_ID_MSI);
@@ -404,7 +404,7 @@ static int msix_capability_init(struct p
                entry->dev = dev;
                entry->mask_base = base;
 
-               list_add(&entry->list, &dev->msi_list);
+               list_add_tail(&entry->list, &dev->msi_list);
        }
 
        ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to