[WATCHDOG] v2.6.10-rc2 i8xx_tco.c-request_region-patch

From: Wim Van Sebroeck (wim_at_iguana.be)
Date: 11/30/04

  • Next message: Bernard Hatt: "Yet another filesystem - sffs"
    Date:	Tue, 30 Nov 2004 09:19:56 +0100
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    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/


  • Next message: Bernard Hatt: "Yet another filesystem - sffs"

    Relevant Pages

    • [BK PATCHES] 2.6.x net driver merges
      ... through these ChangeSets: ... My fix was wrong, and, mainline now has a better fix. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: udev and devfs - The final word
      ... all sorts of weird crap deep in the bowels of arch/ppc/*/*, ... but there will be a *lot* of crap to take care of. ... Several hundreds changesets, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kernel.bkbits.net off the air
      ... These changesets represent what someone "submitted". ... they could be used to recreate the whole repository in whatever format ... "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.13-rc3-mm2
      ... > number of changesets in external trees: ... There is a bit more than 9 changesets (or whatever it is called in the ... git world) in the .git trees you suck in. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [WATCHDOG] v2.6.8.1 watchdog-patches
      ... bk pull http://linux-watchdog.bkbits.net/linux-2.6-watchdog ... The watchdog ioctl interface is defined correctly for 32 bit emulation, ... The ChangeSets can also be looked at on: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)