[PATCH] EHCI: Add module parameter to specify EHCI_IO_JIFFIES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From b076459721690a5a03bc6490d0a98237ada74628 Mon Sep 17 00:00:00 2001
From: Alek Du <alek.du@xxxxxxxxx>
Date: Wed, 10 Jun 2009 12:29:57 +0800
Subject: [PATCH] EHCI: Add module parameter to specify EHCI_IO_JIFFIES

The default EHCI_IO_JIFFIES is just waking up system too much (~10 times per
second) and it won't benefit those no interrupt quirk EHCI controllers. This
patch adds an io_jiffies parameter to ehci-hcd, user either could specify the
parameter during modprobe time or provide ehci-hcd.io_jiffies=xxxx in kernel
cmdline for ehci-hcd built-in case.

Signed-off-by: Alek Du <alek.du@xxxxxxxxx>
---
 drivers/usb/host/ehci-hcd.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c637207..4821ace 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -101,6 +101,11 @@ static int ignore_oc = 0;
 module_param (ignore_oc, bool, S_IRUGO);
 MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
 
+static unsigned int io_jiffies = EHCI_IO_JIFFIES;
+module_param(io_jiffies, int, S_IRUGO);
+MODULE_PARM_DESC(io_jiffies,
+		"ehci_watchdog scheduling jiffies (default HZ/10)\n");
+
 #define	INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
 
 /*-------------------------------------------------------------------------*/
@@ -127,7 +132,7 @@ timer_action(struct ehci_hcd *ehci, enum ehci_timer_action action)
 
 		switch (action) {
 		case TIMER_IO_WATCHDOG:
-			t = EHCI_IO_JIFFIES;
+			t = io_jiffies;
 			break;
 		case TIMER_ASYNC_OFF:
 			t = EHCI_ASYNC_JIFFIES;
-- 
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux