Messages in this thread Patch in this message |  | | Date | Thu, 27 Sep 2001 22:53:59 -0400 | From | Albert Cranford <> | Subject | Re: [patch] netconsole - log kernel messages over the network. 2.4.10. |
| |
Great tool Ingo thanks. Below is a tested tulip patch. Thanks Andrew for the the inspiration. Albert Andrew Morton wrote: > > Ookhoi wrote: > > > > What we need is for a bunch of people to implement poll_controller() > for *their* ethernet driver and contribute the tested diffs > back to Ingo. >
/etc/rc.d/rc.netconsole 192.168.1.2 dev=eth0 target_ip=0xC0A80102 source_port=6666 target_port=6666 \ target_eth_byte0=0x00 target_eth_byte1=0x03 target_eth_byte2=0x6D \ target_eth_byte3=0x16 target_eth_byte4=0x51 target_eth_byte5=0xAE Using /lib/modules/2.4.10/kernel/drivers/net/netconsole.o
~~~~~~~~~~~ DMESG from server ~~~~~~~~~~~~~~~~ Linux version 2.4.10 (root@home1) (gcc version 3.0.1) \ #1 Thu Sep 27 22:28:20 EDT 2001 ....... Linux Tulip driver version 0.9.15-pre6 (July 2, 2001) eth0: ADMtek Comet rev 17 at 0xdc00, 00:03:6D:16:4E:39, IRQ 10. ......... netconsole: using network device <eth0> netconsole: using source IP -64.-88.1.10 netconsole: using target IP -64.-88.1.2 netconsole: using source UDP port: 6666 netconsole: using target UDP port: 6666 netconsole: using target ethernet address 00:03:6d:16:51:ae. netconsole: network logging started up successfully! netconsole-client -server 0xc0a8010a -client 0xc0a80102 -port 6666 ~~~~~~~~~ Start netconsole-client ~~~~~~~~ displaying netconsole output from server 0xc0a8010a, \ client 0xc0a80102, UDP port 6666. ~~~~~~~~~ Alt-SysRq-s on Server output to client ~~~~~ SysRq : Emergency Sync Syncing device 08:04 ... OK Syncing device 08:12 ... OK Syncing device 08:01 ... OK Done. ~~~~~~~~~~ PATCH BEGIN ~~~~~~~~~~~~~~~ --- linux/drivers/net/tulip/tulip_core.c.orig Thu Sep 27 21:04:14 2001 +++ linux/drivers/net/tulip/tulip_core.c Thu Sep 27 10:10:15 2001 @@ -243,6 +243,7 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev); static int private_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void set_rx_mode(struct net_device *dev); +static void poll_tulip(struct net_device *dev); @@ -1671,6 +1672,9 @@ dev->get_stats = tulip_get_stats; dev->do_ioctl = private_ioctl; dev->set_multicast_list = set_rx_mode; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &poll_tulip; +#endif if (register_netdev(dev)) goto err_out_free_ring; @@ -1839,6 +1843,24 @@ /* pci_power_off (pdev, -1); */ } + + +#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 poll_tulip (struct net_device *dev) +{ + disable_irq(dev->irq); + tulip_interrupt (dev->irq, dev, NULL); + enable_irq(dev->irq); +} + +#endif static struct pci_driver tulip_driver = { ~~~~~~~~~~ PATCH END ~~~~~~~~~~~~~~~ -- Albert Cranford Deerfield Beach FL USA ac9410@bellsouth.net
- 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/
|  |