From: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: forcedeth: option to disable 100Hz timer
Date: Tue, 2 Sep 2008 02:47:48 +0400 [thread overview]
Message-ID: <20080902024748.5528d1bb@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
On some hardware no TX done interrupts are generated, thus special
100Hz timer interrupt is required to handle this situation properly.
Other device do not require that timer interrupt feature.
Patch add a "disable_timerirq" option to disable interrupt timer
mentioned above. This may be extremely usefull for laptop users.
Mikhail Kshevetskiy
[-- Attachment #2: forcedeth.diff --]
[-- Type: text/x-patch, Size: 1547 bytes --]
--- linux-2.6.27-rc5/drivers/net/forcedeth.c.orig 2008-09-02 00:58:07.000000000 +0400
+++ linux-2.6.27-rc5/drivers/net/forcedeth.c 2008-09-02 02:02:34.000000000 +0400
@@ -842,6 +842,16 @@
static int poll_interval = -1;
/*
+ * On some hardware no TX done interrupts are generated, thus special
+ * timer interrupt is required to handle this situation properly.
+ *
+ * Setting this variable to 1 leads to removing DEV_NEED_TIMERIRQ from
+ * the driver_data flags and thus disable 100Hz timer mentioned above.
+ * This may be extremely usefull for laptop users.
+ */
+static int disable_timerirq = 0;
+
+/*
* MSI interrupts
*/
enum {
@@ -5704,7 +5714,7 @@
np->msi_flags |= 0x0001;
}
- if (id->driver_data & DEV_NEED_TIMERIRQ)
+ if (id->driver_data & DEV_NEED_TIMERIRQ && !disable_timerirq)
np->irqmask |= NVREG_IRQ_TIMER;
if (id->driver_data & DEV_NEED_LINKTIMER) {
dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev));
@@ -6180,6 +6190,8 @@
MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0.");
module_param(phy_cross, int, 0);
MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0.");
+module_param(disable_timerirq, int, 0);
+MODULE_PARM_DESC(disable_timerirq, "100Hz timer required for some hardware is disabled by setting to 1 and enabled by setting to 0.");
MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>");
MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver");
next reply other threads:[~2008-09-01 23:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 22:47 Mikhail Kshevetskiy [this message]
2008-09-02 0:40 ` forcedeth: option to disable 100Hz timer Alan Cox
[not found] <fa.zbmDQFBw5U2qR0I4VSAlvj/j2ek@ifi.uio.no>
2008-09-02 0:41 ` Robert Hancock
2008-09-02 16:11 ` Stephen Hemminger
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=20080902024748.5528d1bb@gmail.com \
--to=mikhail.kshevetskiy@gmail.com \
--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