On Dec 12, 2005, at 13:41, Dale Farnsworth wrote:

In article <[EMAIL PROTECTED]> you write:
On Mon, Dec 12, 2005 at 11:54:06AM -0700, Dale Farnsworth wrote:

+#ifdef CONFIG_NET_POLL_CONTROLLER
+/*
+ * Polling - used by netconsole and other diagnostic tools
+ * to allow network i/o with interrupts disabled.
+ */
+static void gfar_netpoll(struct net_device *dev)
+{
+       struct gfar_private *priv = netdev_priv(dev);
+
+       if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) {
+               disable_irq(priv->interruptReceive);
+               disable_irq(priv->interruptTransmit);
+               disable_irq(priv->interruptError);
+               gfar_interrupt(priv->interruptTransmit, dev, NULL);
+               enable_irq(priv->interruptError);
+               enable_irq(priv->interruptTransmit);
+               enable_irq(priv->interruptReceive);
+       } else {
+               disable_irq(priv->interruptTransmit);
+               gfar_interrupt(priv->interruptTransmit, dev, NULL);
+               enable_irq(priv->interruptTransmit);
+       }
+}
+#endif

Do the multiple interrupts need to be disabled/enabled in that order?
I'm presuming that is why you replicated the code for the tx interrupt
and for calling gfar_interrupt.

Of course, I'm not sure that doing it some other way would be any less
ugly either... :-)

I do not object to this patch.  I'm just being curious.

I don't know that the order is critical.  Maybe Kumar can comment.

I certainly doubt it is.

However, wouldn't it have simpler to mask the bits in the IMASK register?


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to