NET: smc91x: Fix irq flags
Subsystems (2)
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
@@ -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);
Quoted 10 lines · Russell King - ARM Linux
smc91x.hdefinesSMC_IRQ_FLAGSto 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_irqrather than the desired result. Combine the two conditions into one so that the IRQ flags are taken from the resource if eitherSMC_IRQ_FLAGSis -1 or the resource flags specify an interrupt trigger.
Quoted 3 lines
This restores network on at least the Versatile platform.
Signed-off-by Russell King <[email protected]>
David Miller
maintainerFrom: Eric Miao <[email protected]>
Date: Sat, 28 Nov 2009 23:15:13 +0800
Quoted 12 lines
Quoted 10 lines · Russell King - ARM Linux
smc91x.hdefinesSMC_IRQ_FLAGSto 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_irqrather than the desired result. ,A (BCombine the two conditions into one so that the IRQ flags are taken from the resource if eitherSMC_IRQ_FLAGSis -1 or the resource flags specify an interrupt trigger.
Quoted 5 lines
Quoted 3 lines
This restores network on at least the Versatile platform.
Signed-off-by Russell King <[email protected]>Acked-by Eric Miao <[email protected]>
Applied and queued up for -stable, thanks.