public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* forcedeth: option to disable 100Hz timer
@ 2008-09-01 22:47 Mikhail Kshevetskiy
  2008-09-02  0:40 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Kshevetskiy @ 2008-09-01 22:47 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[-- 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");

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: forcedeth: option to disable 100Hz timer
  2008-09-01 22:47 forcedeth: option to disable 100Hz timer Mikhail Kshevetskiy
@ 2008-09-02  0:40 ` Alan Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2008-09-02  0:40 UTC (permalink / raw)
  To: Mikhail Kshevetskiy; +Cc: Linux Kernel Mailing List

On Tue, 2 Sep 2008 02:47:48 +0400
Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com> wrote:

> 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.

Is it not possible to detect this case. Do the problem devices just miss
some TX interrupts or generate most but not all ?

Alan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: forcedeth: option to disable 100Hz timer
       [not found] <fa.zbmDQFBw5U2qR0I4VSAlvj/j2ek@ifi.uio.no>
@ 2008-09-02  0:41 ` Robert Hancock
  2008-09-02 16:11   ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2008-09-02  0:41 UTC (permalink / raw)
  To: Mikhail Kshevetskiy; +Cc: Linux Kernel Mailing List

Mikhail Kshevetskiy wrote:
> 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
> 

Someone (ideally NVIDIA) should really find out what hardware actually 
requires this timer IRQ and only set the flag on those chipsets rather 
than blindingly setting it on everything. This patch would be useful to 
test whether a chipset does need it, however.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: forcedeth: option to disable 100Hz timer
  2008-09-02  0:41 ` Robert Hancock
@ 2008-09-02 16:11   ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2008-09-02 16:11 UTC (permalink / raw)
  To: Robert Hancock; +Cc: linux-kernel, netdev

On Mon, 01 Sep 2008 18:41:44 -0600
Robert Hancock <hancockr@shaw.ca> wrote:

> Mikhail Kshevetskiy wrote:
> > 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
> > 
> 
> Someone (ideally NVIDIA) should really find out what hardware actually 
> requires this timer IRQ and only set the flag on those chipsets rather 
> than blindingly setting it on everything. This patch would be useful to 
> test whether a chipset does need it, however.

Some drivers run without TX done interrupts at all. It can be done, it just
requires cleaning up the ring in the start of the next transmit, and starting
a longer interval timer to cleanup leftover frames at the end of a burst.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-02 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 22:47 forcedeth: option to disable 100Hz timer Mikhail Kshevetskiy
2008-09-02  0:40 ` Alan Cox
     [not found] <fa.zbmDQFBw5U2qR0I4VSAlvj/j2ek@ifi.uio.no>
2008-09-02  0:41 ` Robert Hancock
2008-09-02 16:11   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox