Re: [patch] netconsole-2.4.10-B1

From: Randy.Dunlap (rddunlap@osdlab.org)
Date: Sun Sep 30 2001 - 15:25:59 EST


"Randy.Dunlap" wrote:
>
> Ingo Molnar wrote:
> >
> >
> > does it make more sense now? :)
>
> Thanks for the definitions. I can work with them,
> although I think that there's much room for improvement...

and I did. Eliminating typos on 'insmod netconsole.o ...' helps. :)

Here's 3c59x.c patched for netconsole (HAVE_POLL_CONTROLLER).

Ingo, you _are_ planning to use most or all of Andreas's patches,
aren't you?

I'm interested in using netconsole early (during boot).
Any problems doing that, other than getting module parameters
to it? I can fix that part.

~Randy

--- linux/drivers/net/3c59x.c.org Sun Aug 12 12:27:18 2001
+++ linux/drivers/net/3c59x.c Sun Sep 30 12:37:39 2001
@@ -842,6 +842,7 @@
 static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static void vortex_tx_timeout(struct net_device *dev);
 static void acpi_set_WOL(struct net_device *dev);
+static void vorboom_poll(struct net_device *dev);
 
 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
 /* Option count limit only -- unlimited interfaces are supported. */
@@ -1328,6 +1329,9 @@
         dev->set_multicast_list = set_rx_mode;
         dev->tx_timeout = vortex_tx_timeout;
         dev->watchdog_timeo = (watchdog * HZ) / 1000;
+#ifdef HAVE_POLL_CONTROLLER
+ dev->poll_controller = &vorboom_poll;
+#endif
         if (pdev && vp->enable_wol) {
                 vp->pm_state_valid = 1;
                  pci_save_state(vp->pdev, vp->power_state);
@@ -2295,6 +2299,29 @@
 handler_exit:
         spin_unlock(&vp->lock);
 }
+
+#ifdef HAVE_POLL_CONTROLLER
+
+/*
+ * Polling 'interrupt' - used by things like netconsole to send skbs
+ * without having to re-enable interrupts. It's not called while
+ * the interrupt routine is executing.
+ */
+
+static void vorboom_poll (struct net_device *dev)
+{
+ struct vortex_private *vp = (struct vortex_private *)dev->priv;
+
+ disable_irq(dev->irq);
+ if (vp->full_bus_master_tx)
+ boomerang_interrupt(dev->irq, dev, 0);
+ else
+ vortex_interrupt(dev->irq, dev, 0);
+ enable_irq(dev->irq);
+}
+
+#endif
+
 
 static int vortex_rx(struct net_device *dev)
 {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:01:14 EST