staging: mt7621-pci: Hack 2 more PCI interrupts for gnubee1
authorNeilBrown <neil@brown.name>
Mon, 2 Apr 2018 00:20:15 +0000 (10:20 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:33:20 +0000 (15:33 +0200)
The mt7621-pci support 3 pci devices and has 3 interrupts.
Each of these need to be enabled by the same sort of hack to
map hwirq number to virq number.
This is a hack which will go as soon as I understand how this is
supposed to work.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-pci/pci-mt7621.c

index 1fa41eb..6023215 100644 (file)
@@ -441,11 +441,16 @@ pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        /*
         * 'irq' here is a hwirq, but a virq is needed.  Until we know how and where
         * to convert one to the other, we have this hack for the GNUBEE1
+        * Similarly 31->23 and 32->24.
         */
-       return irq == 11 ? 22 : irq;
-#else
-       return irq;
+       if (irq == 11)
+               return 22;
+       if (irq == 31)
+               return 23;
+       if (irq == 32)
+               return 24;
 #endif
+       return irq;
 }
 
 void