* [PATCH] Implement polling for 5200FEC to make netconsole work.
@ 2008-10-18 21:40 Jon Smirl
2008-10-21 23:41 ` Jon Smirl
0 siblings, 1 reply; 3+ messages in thread
From: Jon Smirl @ 2008-10-18 21:40 UTC (permalink / raw)
To: linuxppc-dev, netdev
Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
---
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 4e4f683..aec3b97 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
return 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 */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Implement polling for 5200FEC to make netconsole work.
2008-10-18 21:40 [PATCH] Implement polling for 5200FEC to make netconsole work Jon Smirl
@ 2008-10-21 23:41 ` Jon Smirl
2008-10-21 23:57 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Jon Smirl @ 2008-10-21 23:41 UTC (permalink / raw)
To: linuxppc-dev, netdev, Grant Likely
Is anyone going to pick this up?
On Sat, Oct 18, 2008 at 5:40 PM, Jon Smirl <jonsmirl@gmail.com> wrote:
> Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
>
> Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
> ---
> 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 4e4f683..aec3b97 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
> return 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 */
>
>
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Implement polling for 5200FEC to make netconsole work.
2008-10-21 23:41 ` Jon Smirl
@ 2008-10-21 23:57 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2008-10-21 23:57 UTC (permalink / raw)
To: Jon Smirl; +Cc: linuxppc-dev, netdev
On Tue, Oct 21, 2008 at 5:41 PM, Jon Smirl <jonsmirl@gmail.com> wrote:
> 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.
>
> On Sat, Oct 18, 2008 at 5:40 PM, Jon Smirl <jonsmirl@gmail.com> wrote:
>> Implement polling for 5200FEC to make netconsole work. Tested on Phytec pcm030 and Efika.
>>
>> Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
>> ---
>> 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 4e4f683..aec3b97 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
>> return 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 */
>>
>>
>>
>
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-21 23:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-18 21:40 [PATCH] Implement polling for 5200FEC to make netconsole work Jon Smirl
2008-10-21 23:41 ` Jon Smirl
2008-10-21 23:57 ` Grant Likely
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).