netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Konecny <pekon@fi.muni.cz>
To: netdev@oss.sgi.com
Subject: PATCH: netpoll with xircom_cb
Date: Thu, 14 Oct 2004 04:41:10 +0200	[thread overview]
Message-ID: <qww8yaarph5.fsf@decibel.fi.muni.cz> (raw)

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)

             reply	other threads:[~2004-10-14  2:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  2:41 Petr Konecny [this message]
2004-10-14 20:54 ` PATCH: netpoll with xircom_cb 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qww8yaarph5.fsf@decibel.fi.muni.cz \
    --to=pekon@fi.muni.cz \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).