lkml.org 
[lkml]   [2004]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[WATCHDOG] v2.6.10-rc2 i8xx_tco.c-request_region-patch
Hi Linus, Andrew,

please do a

bk pull http://linux-watchdog.bkbits.net/linux-2.6-watchdog

This will update the following files:

drivers/char/watchdog/i8xx_tco.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)

through these ChangeSets:

<castet.matthieu@free.fr> (04/10/29 1.2026.42.1)
[WATCHDOG] i8xx_tco.c-request_region-patch

Fix: in i8xx_tco.c, during the initialisation, the driver accesses io
without checking if the port is free.


The ChangeSets can also be looked at on:
http://linux-watchdog.bkbits.net:8080/linux-2.6-watchdog

For completeness, I added the patches below.

Greetings,
Wim.

================================================================================
diff -Nru a/drivers/char/watchdog/i8xx_tco.c b/drivers/char/watchdog/i8xx_tco.c
--- a/drivers/char/watchdog/i8xx_tco.c 2004-11-30 09:08:10 +01:00
+++ b/drivers/char/watchdog/i8xx_tco.c 2004-11-30 09:08:10 +01:00
@@ -415,12 +415,15 @@
}
}
/* Set the TCO_EN bit in SMI_EN register */
+ if (!request_region (SMI_EN + 1, 1, "i8xx TCO")) {
+ printk (KERN_ERR PFX "I/O address 0x%04x already in use\n",
+ SMI_EN + 1);
+ return 0;
+ }
val1 = inb (SMI_EN + 1);
val1 &= 0xdf;
outb (val1, SMI_EN + 1);
- /* Clear out the (probably old) status */
- outb (0, TCO1_STS);
- outb (3, TCO2_STS);
+ release_region (SMI_EN + 1, 1);
return 1;
}
return 0;
@@ -442,6 +445,10 @@
ret = -EIO;
goto out;
}
+
+ /* Clear out the (probably old) status */
+ outb (0, TCO1_STS);
+ outb (3, TCO2_STS);

/* Check that the heartbeat value is within it's range ; if not reset to the default */
if (tco_timer_set_heartbeat (heartbeat)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.040 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site