Re: [patch] netconsole-2.4.10-B1

Randy.Dunlap (rddunlap@osdlab.org)
Sun, 30 Sep 2001 13:25:59 -0700


This is a multi-part message in MIME format.
--------------BC742B6CC3660A9A3E7C6B46
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"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
--------------BC742B6CC3660A9A3E7C6B46
Content-Type: text/plain; charset=us-ascii;
name="3c59x-poll.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="3c59x-poll.patch"

--- 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)
{

--------------BC742B6CC3660A9A3E7C6B46--

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