Implement polling for 5200FEC to make netconsole work.
Subsystems (2)
PATCH 1/1 Implement polling for 5200FEC to make netconsole work.
Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
Signed-off-by Jon Smirl <[email protected]>
--- drivers/net/fec_mpc52xx.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/net/fec_mpc52xx.c +18 -0
@@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *dreturn 0 ; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void mpc52xx_fec_poll_controller (struct net_device *dev) +{ +struct mpc52xx_fec_priv *priv =netdev_priv (dev); + +disable_irq (priv->t_irq); +mpc52xx_fec_tx_interrupt (priv->t_irq, dev); +enable_irq (priv->t_irq); +disable_irq (priv->r_irq); +mpc52xx_fec_rx_interrupt (priv->r_irq, dev); +enable_irq (priv->r_irq); +} +#endif + +/* This handles BestComm transmit task interrupts */ 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) ndev->tx_timeout = mpc52xx_fec_tx_timeout; ndev->watchdog_timeo =FEC_WATCHDOG_TIMEOUT ; ndev->base_addr = mem.start; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = mpc52xx_fec_poll_controller; +#endif priv->t_irq = priv->r_irq = ndev->irq =NO_IRQ ;/* IRQ are free for now */
Is anyone going to pick this up?
Quoted 45 lines · Jon Smirl
Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
Signed-off-by Jon Smirl <[email protected]>--- drivers/net/fec_mpc52xx.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)drivers/net/fec_mpc52xx.c +18
-0@@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *dreturn 0 ; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void mpc52xx_fec_poll_controller (struct net_device *dev) +{ +struct mpc52xx_fec_priv *priv =netdev_priv (dev); + +disable_irq (priv->t_irq); +mpc52xx_fec_tx_interrupt (priv->t_irq, dev); +enable_irq (priv->t_irq); +disable_irq (priv->r_irq); +mpc52xx_fec_rx_interrupt (priv->r_irq, dev); +enable_irq (priv->r_irq); +} +#endif + +/* This handles BestComm transmit task interrupts */ 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) ndev->tx_timeout = mpc52xx_fec_tx_timeout; ndev->watchdog_timeo =FEC_WATCHDOG_TIMEOUT ; ndev->base_addr = mem.start; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = mpc52xx_fec_poll_controller; +#endif priv->t_irq = priv->r_irq = ndev->irq =NO_IRQ ;/* IRQ are free for now */
Signature · 2 lines
Jon Smirl [email protected]
Quoted 1 line · Jon Smirl
Is anyone going to pick this up?
I'm looking at it, but I'm not picking it up for .28. It's non-trivial enough that I would have needed to have it before the merge window opened to get it into .28.
g.
Quoted 54 lines · Jon Smirl
Quoted 36 lines
Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
Signed-off-by Jon Smirl <[email protected]>--- drivers/net/fec_mpc52xx.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)drivers/net/fec_mpc52xx.c +15
-0@@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *dreturn 0 ; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void mpc52xx_fec_poll_controller (struct net_device *dev) +{ +struct mpc52xx_fec_priv *priv =netdev_priv (dev); + +disable_irq (priv->t_irq); +mpc52xx_fec_tx_interrupt (priv->t_irq, dev); +enable_irq (priv->t_irq); +disable_irq (priv->r_irq); +mpc52xx_fec_rx_interrupt (priv->r_irq, dev); +enable_irq (priv->r_irq); +} +#endif + +/* This handles BestComm transmit task interrupts */ static irqreturn_t mpc52xx_fec_tx_interrupt (int irq,void *dev_id)drivers/net/fec_mpc52xx.c mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) · line 949
Quoted 9 lines
drivers/net/fec_mpc52xx.c +3
-0@@ -926,6 +941,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) ndev->tx_timeout = mpc52xx_fec_tx_timeout; ndev->watchdog_timeo =FEC_WATCHDOG_TIMEOUT ; ndev->base_addr = mem.start; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = mpc52xx_fec_poll_controller; +#endif priv->t_irq = priv->r_irq = ndev->irq =NO_IRQ ;/* IRQ are free for now */ --
Jon Smirl
[email protected]
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.