Messages in this thread Patch in this message | | | Date | Thu, 28 Aug 2003 14:38:37 +0200 | From | Steffen Klassert <> | Subject | Re: [PATCH][RFC] Netconsole debugging tool for 2.6 |
| |
On Mon, Aug 11, 2003 at 03:55:08AM -0500 or thereabouts, Matt Mackall wrote: ... > I've also added support for a third NIC (TLAN). Accepting patches for > other cards (only about 10 lines of code each). ...
With the patch below netconsole works with the ne2k-pci driver. The patch applies on 2.6.0-test4. Tested with my RealTek RTL-8029 card.
Are you interested on code cleanup patches etc. for netconsole too?
Steffen
--- vanilla-2.6.0-test4/drivers/net/ne2k-pci.c Fri Aug 22 23:53:07 2003 +++ linux-2.6.0-test4-sk/drivers/net/ne2k-pci.c Sat Aug 23 11:04:36 2003 @@ -167,6 +167,7 @@ MODULE_DEVICE_TABLE(pci, ne2k_pci_tbl); static int ne2k_pci_open(struct net_device *dev); static int ne2k_pci_close(struct net_device *dev); +static void poll_ne2k_pci(struct net_device *dev); static void ne2k_pci_reset_8390(struct net_device *dev); static void ne2k_pci_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page); @@ -362,6 +363,10 @@ static int __devinit ne2k_pci_init_one ( dev->open = &ne2k_pci_open; dev->stop = &ne2k_pci_close; dev->do_ioctl = &netdev_ioctl; +#ifdef HAVE_POLL_CONTROLLER + dev->poll_controller = &poll_ne2k_pci; +#endif + NS8390_init(dev, 0); i = register_netdev(dev); @@ -436,6 +441,23 @@ static void ne2k_pci_reset_8390(struct n } outb(ENISR_RESET, NE_BASE + EN0_ISR); /* Ack intr. */ } + +#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_ne2k_pci (struct net_device *dev) +{ + disable_irq(dev->irq); + ei_interrupt (dev->irq, dev, NULL); + enable_irq(dev->irq); +} + +#endif /* Grab the 8390 specific header. Similar to the block_input routine, but we don't need to be concerned with ring wrap as the header will be at - 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/
| |