Skip to contentSkip to conversation

NET: smc91x: Fix irq flags

PATCH In review Russell King - ARM Linux 3 participants 3 messages Nov 28, 2009 – Nov 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NET: smc91x: Fix irq flags

smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt flags to be taken from the resource structure. However, d280ead changed this to checking for non-zero resource flags.

Unfortunately, this means that on some platforms, we end up passing '-1' to request_irq rather than the desired result. Combine the two conditions into one so that the IRQ flags are taken from the resource if either SMC_IRQ_FLAGS is -1 or the resource flags specify an interrupt trigger.

This restores network on at least the Versatile platform.

--

 drivers/net/smc91x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/smc91x.c +1 -1
index 05c91ee..a7af1f5 100644
@@ -2283,7 +2283,7 @@ static int __devinit smc_drv_probe(struct platform_device *pdev)
 
 	ndev->irq = ires->start;
 
-	if (ires->flags & IRQF_TRIGGER_MASK)
+	if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK)
 		irq_flags = ires->flags & IRQF_TRIGGER_MASK;
 
 	ret = smc_request_attrib(pdev, ndev);
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Russell King - ARM Linux

smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt flags to be taken from the resource structure.  However, d280ead changed this to checking for non-zero resource flags.

Unfortunately, this means that on some platforms, we end up passing '-1' to request_irq rather than the desired result.  Combine the two conditions into one so that the IRQ flags are taken from the resource if either SMC_IRQ_FLAGS is -1 or the resource flags specify an interrupt trigger.

Quoted 3 lines

This restores network on at least the Versatile platform.

maintainer
#2 lore raw

From: Eric Miao <[email protected]>
Date: Sat, 28 Nov 2009 23:15:13 +0800

Quoted 12 lines
Quoted 10 lines · Russell King - ARM Linux

smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt flags to be taken from the resource structure. ,A (BHowever, d280ead changed this to checking for non-zero resource flags.

Unfortunately, this means that on some platforms, we end up passing '-1' to request_irq rather than the desired result. ,A (BCombine the two conditions into one so that the IRQ flags are taken from the resource if either SMC_IRQ_FLAGS is -1 or the resource flags specify an interrupt trigger.

Quoted 5 lines
Quoted 3 lines

This restores network on at least the Versatile platform.

Applied and queued up for -stable, thanks.