Re: [patch] netconsole-2.4.10-B1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux