mirror of
				https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
				synced 2025-10-31 05:14:38 +00:00 
			
		
		
		
	[ARM] CATS: Do not try and map bad PCI IRQ numbers
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@fluff.org>
This commit is contained in:
		
							parent
							
								
									2921047594
								
							
						
					
					
						commit
						e38d523fd0
					
				| @ -18,6 +18,9 @@ static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; | |||||||
| 
 | 
 | ||||||
| static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 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) | 	if (dev->irq >= 128) | ||||||
| 		return dev->irq & 0x1f; | 		return dev->irq & 0x1f; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Ben Dooks
						Ben Dooks