* [PATCH] NET: smc91x: Fix irq flags
@ 2009-11-28 10:13 Russell King - ARM Linux
2009-11-28 15:15 ` Eric Miao
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2009-11-28 10:13 UTC (permalink / raw)
To: Nicolas Pitre, eric miao, netdev
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.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
--
drivers/net/smc91x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 05c91ee..a7af1f5 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NET: smc91x: Fix irq flags
2009-11-28 10:13 [PATCH] NET: smc91x: Fix irq flags Russell King - ARM Linux
@ 2009-11-28 15:15 ` Eric Miao
2009-11-30 7:47 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Eric Miao @ 2009-11-28 15:15 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: Nicolas Pitre, netdev
On Sat, Nov 28, 2009 at 6:13 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> 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.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NET: smc91x: Fix irq flags
2009-11-28 15:15 ` Eric Miao
@ 2009-11-30 7:47 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-11-30 7:47 UTC (permalink / raw)
To: eric.y.miao; +Cc: linux, nico, netdev
From: Eric Miao <eric.y.miao@gmail.com>
Date: Sat, 28 Nov 2009 23:15:13 +0800
> On Sat, Nov 28, 2009 at 6:13 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> 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.
>>
>> This restores network on at least the Versatile platform.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Acked-by: Eric Miao <eric.y.miao@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-30 7:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28 10:13 [PATCH] NET: smc91x: Fix irq flags Russell King - ARM Linux
2009-11-28 15:15 ` Eric Miao
2009-11-30 7:47 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.