Hello,

we have a HP rx2660 with a cciss controller that uses MSI. When
dumping into the kdump kernel, the kernel hangs with following error:

    cciss: Device 0x3230 has been found at bus 5 dev 0 func 0
    ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 45 (level, low) -> IRQ 53
    cciss: MSI-X init failed -22
    cciss: using DAC cycles
          blocks= 71065440 block_size= 512
          heads= 255, sectors= 32, cylinders= 8709

          blocks= 286611840 block_size= 512
          heads= 255, sectors= 32, cylinders= 35124

    Unexpected irq vector 0x3f on CPU 0!

KDB says:

    [0]kdb> bt
    Stack traceback for pid 0
    0xa0000001006f8000        0        0  1    0   I  0xa0000001006f83a0 
*swapper
    0xa000000100012210 ia64_pal_call_static+0x90
            args (0x1d, 0x0, 0x0, 0x0, 0x0)
    0xa0000001000153d0 default_idle+0x90
            args (0xa0000001006ffdb0, 0xa000000100014570, 0x40b, 0x0)
    0xa000000100014570 cpu_idle+0x250
            args (0x0, 0xa000000100944f64, 0x0, 0xa0000001009ed658, 
0xa000000100009930)
    0xa000000100009930 rest_init+0x70
            args (0xa000000100655180, 0x794, 0xa000000100655140)
    0xa000000100655180 start_kernel+0x680
            args (0x20, 0x27fd0000, 0x27fc00b0, 0x27fe8128, 0x27fe8080)
    0xa0000001000089e0 __end_ivt_text+0x6c0

If I boot the normal kernel with psi=nomsi (the kdump kernel is not
relevant here!), it works. Adding following (see below) code, works, too.
The problem I have with that code is that I guess that it will fail if
the kernel is a bit corrupted, so it cannot be added.

Do you have better ideas to fix that issue and/or can give me some
hints? Thanks for your input!


Regards,
Bernhard


Index: b/arch/ia64/kernel/crash.c
===================================================================
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -16,6 +16,7 @@
 #include <linux/elfcore.h>
 #include <linux/sysctl.h>
 #include <linux/init.h>
+#include <linux/pci.h>
 
 #include <asm/kdebug.h>
 #include <asm/mca.h>
@@ -92,6 +93,32 @@ kdump_wait_cpu_freeze(void)
        return 1;
 }
 
+
+void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+
+int disable_msix_for_dev(struct device *dev, void *cookie)
+{
+       struct pci_dev *pdev = to_pci_dev(dev);
+       int pos;
+
+       if (!pdev || pdev->no_msi)
+               return -1;
+
+       pos = pci_find_capability(pdev, PCI_CAP_ID_MSIX);
+       if (pos < 0) 
+               return -1;
+
+       printk(KERN_WARNING "Disable, v=%d, d=%d\n", pdev->vendor, 
pdev->device);
+       disable_msi_mode(pdev, pos, PCI_CAP_ID_MSIX);
+
+       return 0;
+}
+
+void disable_msix_for_all(void)
+{
+       bus_for_each_dev(&pci_bus_type, NULL, NULL, disable_msix_for_dev);
+}
+
 void
 machine_crash_shutdown(struct pt_regs *pt)
 {
@@ -103,6 +130,7 @@ machine_crash_shutdown(struct pt_regs *p
         * In practice this means shooting down the other cpus in
         * an SMP system.
         */
+       disable_msix_for_all();
        kexec_disable_iosapic();
 #ifdef CONFIG_SMP
        kdump_smp_send_stop();
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to