netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: netpoll with xircom_cb
@ 2004-10-14  2:41 Petr Konecny
  2004-10-14 20:54 ` Matt Mackall
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Konecny @ 2004-10-14  2:41 UTC (permalink / raw)
  To: netdev

Hi,

I have a headless computer with xircom pcmcia card and needed netconsole
on it. After looking around in other drivers I concocted this patch.  It
survived light testing. I have no documentation for the hw, so it maybe
totally bogus. What do you think ?

                                                        Petr

lspci -v of the card is:
0000:02:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03) (prog-if 02 [16550])
        Subsystem: Xircom CBEM56G-100 Ethernet + 56k Modem
        Flags: medium devsel, IRQ 11
        I/O ports at 4080 [size=8]
        Memory at 10801000 (32-bit, non-prefetchable) [size=2K]
        Memory at 10801800 (32-bit, non-prefetchable) [size=2K]
        Expansion ROM at 10404000 [disabled] [size=16K]
        Capabilities: [dc] Power Management version 1

--- linux-2.6.8.1/drivers/net/tulip/xircom_cb.c	2004-08-13 22:37:38.000000000 -0700
+++ work/drivers/net/tulip/xircom_cb.c	2004-10-13 18:54:34.000000000 -0700
@@ -117,6 +117,9 @@
 static int xircom_close(struct net_device *dev);
 static void xircom_up(struct xircom_private *card);
 static struct net_device_stats *xircom_get_stats(struct net_device *dev);
+#if CONFIG_NET_POLL_CONTROLLER
+static void xircom_poll_controller(struct net_device *dev);
+#endif
 
 static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset);
 static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset);
@@ -269,6 +272,9 @@
 	dev->stop = &xircom_close;
 	dev->get_stats = &xircom_get_stats;
 	dev->priv = private;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	dev->poll_controller = &xircom_poll_controller;
+#endif
 	SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
 	pci_set_drvdata(pdev, dev);
 
@@ -500,6 +506,14 @@
 } 
                                                  
 
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void xircom_poll_controller(struct net_device *dev)
+{
+	disable_irq(dev->irq);
+	xircom_interrupt(dev->irq, dev, NULL);
+	enable_irq(dev->irq);
+}
+#endif
 
 
 static void initialize_card(struct xircom_private *card)

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <qwwd5zmrrpt.fsf@decibel.fi.muni.cz>]

end of thread, other threads:[~2004-10-15  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-14  2:41 PATCH: netpoll with xircom_cb Petr Konecny
2004-10-14 20:54 ` Matt Mackall
2004-10-15  3:25   ` Jeff Garzik
     [not found] <qwwd5zmrrpt.fsf@decibel.fi.muni.cz>
     [not found] ` <20041014124140.GI2646@devserv.devel.redhat.com>
2004-10-14 14:40   ` Petr Konecny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).