diff options
author | Jon Smirl <jonsmirl@gmail.com> | 2008-10-18 07:40:59 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-10-22 07:26:49 -0400 |
commit | bd28bdb18f1028f8f0a3f83291336529b2cb5b7a (patch) | |
tree | e23f0e510f164ab0b802fe3be82a2558b9ee5d34 /drivers/net | |
parent | bb0d215c8f970345746129d4c110159b099e032f (diff) |
[netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.
Implement polling for 5200FEC to make netconsole work. Tested on
Phytec pcm030 and Efika.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 4e4f68304e82..aec3b97e794d 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d | |||
401 | return 0; | 401 | return 0; |
402 | } | 402 | } |
403 | 403 | ||
404 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
405 | static void mpc52xx_fec_poll_controller(struct net_device *dev) | ||
406 | { | ||
407 | struct mpc52xx_fec_priv *priv = netdev_priv(dev); | ||
408 | |||
409 | disable_irq(priv->t_irq); | ||
410 | mpc52xx_fec_tx_interrupt(priv->t_irq, dev); | ||
411 | enable_irq(priv->t_irq); | ||
412 | disable_irq(priv->r_irq); | ||
413 | mpc52xx_fec_rx_interrupt(priv->r_irq, dev); | ||
414 | enable_irq(priv->r_irq); | ||
415 | } | ||
416 | #endif | ||
417 | |||
418 | |||
404 | /* This handles BestComm transmit task interrupts | 419 | /* This handles BestComm transmit task interrupts |
405 | */ | 420 | */ |
406 | static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) | 421 | static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) |
@@ -926,6 +941,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
926 | ndev->tx_timeout = mpc52xx_fec_tx_timeout; | 941 | ndev->tx_timeout = mpc52xx_fec_tx_timeout; |
927 | ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT; | 942 | ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT; |
928 | ndev->base_addr = mem.start; | 943 | ndev->base_addr = mem.start; |
944 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
945 | ndev->poll_controller = mpc52xx_fec_poll_controller; | ||
946 | #endif | ||
929 | 947 | ||
930 | priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */ | 948 | priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */ |
931 | 949 | ||