Skip to contentSkip to conversation

ll_temac: Fix poll implementation

PATCH Applied Michal Simek 2 participants 3 messages Aug 18, 2010 – Aug 25, 2010

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

PATCH 1/1 ll_temac: Fix poll implementation

Functions ll_temac_rx_irq and ll_temac_tx_irq have pointer to net_device as second parameter not pointer to temac_local.

---
 drivers/net/ll_temac_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ll_temac_main.c +2 -2
index c7b6247..bdf2149 100644
@@ -902,8 +902,8 @@ temac_poll_controller(struct net_device *ndev)
 	disable_irq(lp->tx_irq);
 	disable_irq(lp->rx_irq);
 
-	ll_temac_rx_irq(lp->tx_irq, lp);
-	ll_temac_tx_irq(lp->rx_irq, lp);
+	ll_temac_rx_irq(lp->tx_irq, ndev);
+	ll_temac_tx_irq(lp->rx_irq, ndev);
 
 	enable_irq(lp->tx_irq);
 	enable_irq(lp->rx_irq);
Signature · 1 line
1.5.5.6
maintainer Applied
#1 lore raw

From: Michal Simek <[email protected]>
Date: Wed, 18 Aug 2010 12:26:34 +0200

Quoted 5 lines

Functions ll_temac_rx_irq and ll_temac_tx_irq have pointer to net_device as second parameter not pointer to temac_local.

Applied, thanks a lot.

I can't count how many times this kind of error has been introduced. It's of cource because the handle passed to IRQ handlers is an opaque void pointer, so if the underlying type gets changed there is absolutely no type checking done against by-hand calls of the IRQ handler.

Rusty Russell was, if I remember correctly, doing some work to correct this such that IRQ handlers could in fact have some proper typing in their handlers. Or maybe that was for timer handlers?

Anyways that kind of thing would help here.

Rusty?

#2 lore raw
Quoted 17 lines · David Miller

From: Michal Simek <[email protected]>
Date: Wed, 18 Aug 2010 12:26:34 +0200

Quoted 5 lines

Functions ll_temac_rx_irq and ll_temac_tx_irq have pointer to net_device as second parameter not pointer to temac_local.

Applied, thanks a lot.

I can't count how many times this kind of error has been introduced. It's of cource because the handle passed to IRQ handlers is an opaque void pointer, so if the underlying type gets changed there is absolutely no type checking done against by-hand calls of the IRQ handler.

Quoted 8 lines

Rusty Russell was, if I remember correctly, doing some work to correct this such that IRQ handlers could in fact have some proper typing in their handlers. Or maybe that was for timer handlers?

Anyways that kind of thing would help here.

Rusty?

Rusty, you there?

Michal

Signature · 4 lines
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian