Google
  Web www.spinics.net

[patch 1/1] CATS: Do not try and map bad PCI IRQ numbers

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


The cats_map_irq() function in the Simtec CATS support
code is mapping IRQ 255 (invalid IRQ) into what is a
supposedly valid interrupt numner which can cause problems
with other devices then seeing an interrupt they cannot
claim.

If the IRQ number if >= 255, then return -1 as this is not
something we can map.

Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>

--- linux-2.6.26-quilt2.orig/arch/arm/mach-footbridge/cats-pci.c	2008-07-23 14:47:59.000000000 +0100
+++ linux-2.6.26-quilt2/arch/arm/mach-footbridge/cats-pci.c	2008-07-23 14:48:17.000000000 +0100
@@ -18,6 +18,9 @@ static int irqmap_cats[] __initdata = { 
 
 static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
+	if (dev->irq >= 255)
+		return -1;	/* not a valid interrupt. */
+
 	if (dev->irq >= 128)
 		return dev->irq & 0x1f;
 

-- 

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool