From: Brancaleoni Matteo <mbrancaleoni@tiscali.it>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] sis900.c net poll support
Date: Wed, 05 Jan 2005 11:32:07 +0100 [thread overview]
Message-ID: <1104921127.5729.17.camel@athlon64> (raw)
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
Hi.
I was in need to use netconsole to trace some lock
of my sata disk, but my onboard network card (sis900)
seems doesn't support net poll.
So searching the web I found out an old patch for enabling
in under 2.4, and ported it to 2.6.10 (looking
also into 2.6.x device drivers already working)
Seems to be ok, netconsole works without issues.
Hope that's ok and can be useful.
Matteo Brancaleoni.
[-- Attachment #2: sis900.patch --]
[-- Type: text/x-patch, Size: 1462 bytes --]
--- linux-2.6.10/drivers/net/sis900.orig 2005-01-05 09:55:46.000000000 +0100
+++ linux-2.6.10/drivers/net/sis900.c 2005-01-05 10:09:04.000000000 +0100
@@ -185,6 +185,7 @@ MODULE_PARM_DESC(multicast_filter_limit,
MODULE_PARM_DESC(max_interrupt_work, "SiS 900/7016 maximum events handled per interrupt");
MODULE_PARM_DESC(debug, "SiS 900/7016 debug level (2-4)");
+static void sis900_poll(struct net_device *dev);
static int sis900_open(struct net_device *net_dev);
static int sis900_mii_probe (struct net_device * net_dev);
static void sis900_init_rxfilter (struct net_device * net_dev);
@@ -454,6 +455,9 @@ static int __devinit sis900_probe(struct
net_dev->tx_timeout = sis900_tx_timeout;
net_dev->watchdog_timeo = TX_TIMEOUT;
net_dev->ethtool_ops = &sis900_ethtool_ops;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ net_dev->poll_controller = &sis900_poll;
+#endif
ret = register_netdev(net_dev);
if (ret)
@@ -928,6 +932,20 @@ static u16 sis900_reset_phy(struct net_d
return status;
}
+#ifdef CONFIG_NET_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 sis900_poll(struct net_device *dev)
+{
+ disable_irq(dev->irq);
+ sis900_interrupt(dev->irq, dev, NULL);
+ enable_irq(dev->irq);
+}
+#endif
+
/**
* sis900_open - open sis900 device
* @net_dev: the net device to open
next reply other threads:[~2005-01-05 10:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-05 10:32 Brancaleoni Matteo [this message]
2005-01-05 14:59 ` Daniele Venzano
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=1104921127.5729.17.camel@athlon64 \
--to=mbrancaleoni@tiscali.it \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®