netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.26-git] enc28j60: don't specify (wrong) IRQ type
@ 2008-07-25  0:47 David Brownell
  2008-07-29 22:24 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: David Brownell @ 2008-07-25  0:47 UTC (permalink / raw)
  To: Network development list; +Cc: Jeff Garzik, Claudio Lanconelli

From: David Brownell <dbrownell@users.sourceforge.net>

Recent changes to the IRQ framework have made passing the wrong
trigger type to request_irq() become a fatal error.  In the case
of the enc28j60 driver, it stopped working in my test harness.

(Specifically:  the signal detects "pin change" events, both edges,
not just falling edges.  Similarly, other boards might route it
through an inverter.  Trigger type are board-specific.)

This fixes that problem by the usual fix of expecting board setup
code to have set up the correct IRQ trigger type.  The best known
example of that being x86 setup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -1547,8 +1547,10 @@ static int __devinit enc28j60_probe(struct spi_device *spi)
 	random_ether_addr(dev->dev_addr);
 	enc28j60_set_hw_macaddr(dev);
 
-	ret = request_irq(spi->irq, enc28j60_irq, IRQF_TRIGGER_FALLING,
-			  DRV_NAME, priv);
+	/* Board setup must set the relevant edge trigger type;
+	 * level triggers won't currently work.
+	 */
+	ret = request_irq(spi->irq, enc28j60_irq, 0, DRV_NAME, priv);
 	if (ret < 0) {
 		if (netif_msg_probe(priv))
 			dev_err(&spi->dev, DRV_NAME ": request irq %d failed "

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 2.6.26-git] enc28j60: don't specify (wrong) IRQ type
  2008-07-25  0:47 [patch 2.6.26-git] enc28j60: don't specify (wrong) IRQ type David Brownell
@ 2008-07-29 22:24 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-07-29 22:24 UTC (permalink / raw)
  To: David Brownell; +Cc: Network development list, Claudio Lanconelli

David Brownell wrote:
> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> Recent changes to the IRQ framework have made passing the wrong
> trigger type to request_irq() become a fatal error.  In the case
> of the enc28j60 driver, it stopped working in my test harness.
> 
> (Specifically:  the signal detects "pin change" events, both edges,
> not just falling edges.  Similarly, other boards might route it
> through an inverter.  Trigger type are board-specific.)
> 
> This fixes that problem by the usual fix of expecting board setup
> code to have set up the correct IRQ trigger type.  The best known
> example of that being x86 setup.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-29 22:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25  0:47 [patch 2.6.26-git] enc28j60: don't specify (wrong) IRQ type David Brownell
2008-07-29 22:24 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).