aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2010-10-25 02:14:50 -0400
committerLen Brown <len.brown@intel.com>2010-10-25 02:14:50 -0400
commit4895ae6f9f81011bf3a6fea70d46bab08d58fd8c (patch)
tree33f36ed65e65c3cbf30c7c22286ea98af83bda8c
parent8c654bb80801aeafba071396602c777758604980 (diff)
parent7a18e96dcbdec3c96876444ae2c7e36ce458e151 (diff)
Merge branch 'ec-param' into release
-rw-r--r--drivers/acpi/ec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index f31291ba94d0..372ff80b7b0c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -83,6 +83,11 @@ enum {
83 EC_FLAGS_BLOCKED, /* Transactions are blocked */ 83 EC_FLAGS_BLOCKED, /* Transactions are blocked */
84}; 84};
85 85
86/* ec.c is compiled in acpi namespace so this shows up as acpi.ec_delay param */
87static unsigned int ec_delay __read_mostly = ACPI_EC_DELAY;
88module_param(ec_delay, uint, 0644);
89MODULE_PARM_DESC(ec_delay, "Timeout(ms) waited until an EC command completes");
90
86/* If we find an EC via the ECDT, we need to keep a ptr to its context */ 91/* If we find an EC via the ECDT, we need to keep a ptr to its context */
87/* External interfaces use first EC only, so remember */ 92/* External interfaces use first EC only, so remember */
88typedef int (*acpi_ec_query_func) (void *data); 93typedef int (*acpi_ec_query_func) (void *data);
@@ -210,7 +215,7 @@ static int ec_poll(struct acpi_ec *ec)
210 int repeat = 2; /* number of command restarts */ 215 int repeat = 2; /* number of command restarts */
211 while (repeat--) { 216 while (repeat--) {
212 unsigned long delay = jiffies + 217 unsigned long delay = jiffies +
213 msecs_to_jiffies(ACPI_EC_DELAY); 218 msecs_to_jiffies(ec_delay);
214 do { 219 do {
215 /* don't sleep with disabled interrupts */ 220 /* don't sleep with disabled interrupts */
216 if (EC_FLAGS_MSI || irqs_disabled()) { 221 if (EC_FLAGS_MSI || irqs_disabled()) {
@@ -265,7 +270,7 @@ static int ec_check_ibf0(struct acpi_ec *ec)
265 270
266static int ec_wait_ibf0(struct acpi_ec *ec) 271static int ec_wait_ibf0(struct acpi_ec *ec)
267{ 272{
268 unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY); 273 unsigned long delay = jiffies + msecs_to_jiffies(ec_delay);
269 /* interrupt wait manually if GPE mode is not active */ 274 /* interrupt wait manually if GPE mode is not active */
270 while (time_before(jiffies, delay)) 275 while (time_before(jiffies, delay))
271 if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), 276 if (wait_event_timeout(ec->wait, ec_check_ibf0(ec),