Skip to content

Commit

Permalink
NET: smc91x: Fix irq flags
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Russell King - ARM Linux authored and David S. Miller committed Nov 30, 2009
1 parent 6c53b1b commit d5ccd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d5ccd67

Please sign in to comment.