[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>

authored by Jon Smirl and committed by Jeff Garzik bd28bdb1 bb0d215c

+18
+18
drivers/net/fec_mpc52xx.c
··· 401 return 0; 402 } 403 404 /* This handles BestComm transmit task interrupts 405 */ 406 static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) ··· 941 ndev->tx_timeout = mpc52xx_fec_tx_timeout; 942 ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT; 943 ndev->base_addr = mem.start; 944 945 priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */ 946
··· 401 return 0; 402 } 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 + 419 /* This handles BestComm transmit task interrupts 420 */ 421 static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id) ··· 926 ndev->tx_timeout = mpc52xx_fec_tx_timeout; 927 ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT; 928 ndev->base_addr = mem.start; 929 + #ifdef CONFIG_NET_POLL_CONTROLLER 930 + ndev->poll_controller = mpc52xx_fec_poll_controller; 931 + #endif 932 933 priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */ 934