[WATCHDOG] softdog-timer-running-oops.patch

2005-09-05 Thread Linux Kernel Mailing List
tree 6e5f8ee1053e7add2ec1890b594dc4086ae39f09
parent 93642ecd463df30d032da8ac37c2676cee4ad876
author Chuck Ebbert <[EMAIL PROTECTED]> Fri, 19 Aug 2005 14:14:07 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:59:46 +0200

[WATCHDOG] softdog-timer-running-oops.patch

The softdog watchdog timer has a bug that can create an oops:

1.  Load the module without the nowayout option.
2.  Open the driver and close it without writing 'V' before close.
3.  Unload the module.  The timer will continue to run...
4.  Oops happens when timer fires.

Reported Sun, 10 Oct 2004, by Michael Schierl <[EMAIL PROTECTED]>

Fix is easy: always take a reference on the module on open.
Release it only when the device is closed and no timer is running.
Tested on 2.6.13-rc6 using the soft_noboot option.  While the
timer is running and the device is closed, the module use count
stays at 1.  After the timer fires, it drops to 0.  Repeatedly
opening and closing the driver caused no problems.  Please apply.

Signed-off-by: Chuck Ebbert <[EMAIL PROTECTED]>
Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/softdog.c |   13 +
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c
--- a/drivers/char/watchdog/softdog.c
+++ b/drivers/char/watchdog/softdog.c
@@ -77,7 +77,7 @@ static void watchdog_fire(unsigned long)
 
 static struct timer_list watchdog_ticktock =
TIMER_INITIALIZER(watchdog_fire, 0, 0);
-static unsigned long timer_alive;
+static unsigned long driver_open, orphan_timer;
 static char expect_close;
 
 
@@ -87,6 +87,9 @@ static char expect_close;
 
 static void watchdog_fire(unsigned long data)
 {
+   if (test_and_clear_bit(0, &orphan_timer))
+   module_put(THIS_MODULE);
+
if (soft_noboot)
printk(KERN_CRIT PFX "Triggered - Reboot ignored.\n");
else
@@ -128,9 +131,9 @@ static int softdog_set_heartbeat(int t)
 
 static int softdog_open(struct inode *inode, struct file *file)
 {
-   if(test_and_set_bit(0, &timer_alive))
+   if (test_and_set_bit(0, &driver_open))
return -EBUSY;
-   if (nowayout)
+   if (!test_and_clear_bit(0, &orphan_timer))
__module_get(THIS_MODULE);
/*
 *  Activate timer
@@ -147,11 +150,13 @@ static int softdog_release(struct inode 
 */
if (expect_close == 42) {
softdog_stop();
+   module_put(THIS_MODULE);
} else {
printk(KERN_CRIT PFX "Unexpected close, not stopping 
watchdog!\n");
+   set_bit(0, &orphan_timer);
softdog_keepalive();
}
-   clear_bit(0, &timer_alive);
+   clear_bit(0, &driver_open);
expect_close = 0;
return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] w83627hf_wdt.c-initialized_bios_bug

2005-09-05 Thread Linux Kernel Mailing List
tree 11b4a099cf920a8d5ef639a4b8a6a3b23f6a15c9
parent 94f1e9f316b10972b77a64344006c3bf8a4929b4
author [EMAIL PROTECTED] Brady <[EMAIL PROTECTED]> Wed, 17 Aug 2005 09:06:07 
+0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:58:03 +0200

[WATCHDOG] w83627hf_wdt.c-initialized_bios_bug

Attached is a small update to the w83627hf watchdog driver
to initialise appropriately if it was already initialised
in the BIOS. On tyan motherboards for e.g. you can init
the watchdog to 4 mins, then when the driver is loaded it
sets the watchdog to "seconds" mode, and then machine will
reboot within 4 seconds. So this patch resets the timeout
to the configured value if the watchdog is already running.

Signed-off-by: [EMAIL PROTECTED] Brady <[EMAIL PROTECTED]>
Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/w83627hf_wdt.c |6 ++
 1 files changed, 6 insertions(+)

diff --git a/drivers/char/watchdog/w83627hf_wdt.c 
b/drivers/char/watchdog/w83627hf_wdt.c
--- a/drivers/char/watchdog/w83627hf_wdt.c
+++ b/drivers/char/watchdog/w83627hf_wdt.c
@@ -93,6 +93,12 @@ w83627hf_init(void)
 
w83627hf_select_wd_register();
 
+   outb_p(0xF6, WDT_EFER); /* Select CRF6 */
+   t=inb_p(WDT_EFDR);  /* read CRF6 */
+   if (t != 0) {
+   printk (KERN_INFO PFX "Watchdog already running. Resetting 
timeout to %d sec\n", timeout);
+   outb_p(timeout, WDT_EFDR);/* Write back to CRF6 */
+   }
outb_p(0xF5, WDT_EFER); /* Select CRF5 */
t=inb_p(WDT_EFDR);  /* read CRF5 */
t&=~0x0C;   /* set second mode & disable keyboard turning 
off watchdog */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] s3c2410 watchdog - replace reboot notifier

2005-09-05 Thread Linux Kernel Mailing List
tree 0671740ee1e05172d4254b322bcef62e7e945ee8
parent af4bb822bc65efb087cd36b83789f22161a6515b
author Ben Dooks <[EMAIL PROTECTED]> Wed, 17 Aug 2005 09:04:52 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:56:06 +0200

[WATCHDOG] s3c2410 watchdog - replace reboot notifier

Patch from Dimitry Andric <[EMAIL PROTECTED]>

Change to using platfrom driver's .shutdown method instead
of an reboot notifier

Signed-off-by: Dimitry Andric <[EMAIL PROTECTED]>
Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/s3c2410_wdt.c |   36 +++-
 1 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/drivers/char/watchdog/s3c2410_wdt.c 
b/drivers/char/watchdog/s3c2410_wdt.c
--- a/drivers/char/watchdog/s3c2410_wdt.c
+++ b/drivers/char/watchdog/s3c2410_wdt.c
@@ -30,6 +30,7 @@
  * 11-Jan-2005 BJD Fixed divide-by-2 in timeout code
  *
  * 25-Jan-2005 DA  Added suspend/resume support
+ * Replaced reboot notifier with .shutdown method
  *
  * 10-Mar-2005 LCVRChanged S3C2410_VA to S3C24XX_VA
 */
@@ -42,8 +43,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -319,20 +318,6 @@ static int s3c2410wdt_ioctl(struct inode
}
 }
 
-/*
- * Notifier for system down
- */
-
-static int s3c2410wdt_notify_sys(struct notifier_block *this, unsigned long 
code,
- void *unused)
-{
-   if(code==SYS_DOWN || code==SYS_HALT) {
-   /* Turn the WDT off */
-   s3c2410wdt_stop();
-   }
-   return NOTIFY_DONE;
-}
-
 /* kernel interface */
 
 static struct file_operations s3c2410wdt_fops = {
@@ -350,10 +335,6 @@ static struct miscdevice s3c2410wdt_misc
.fops   = &s3c2410wdt_fops,
 };
 
-static struct notifier_block s3c2410wdt_notifier = {
-   .notifier_call  = s3c2410wdt_notify_sys,
-};
-
 /* interrupt handler code */
 
 static irqreturn_t s3c2410wdt_irq(int irqno, void *param,
@@ -434,18 +415,10 @@ static int s3c2410wdt_probe(struct devic
}
}
 
-   ret = register_reboot_notifier(&s3c2410wdt_notifier);
-   if (ret) {
-   printk (KERN_ERR PFX "cannot register reboot notifier (%d)\n",
-   ret);
-   return ret;
-   }
-
ret = misc_register(&s3c2410wdt_miscdev);
if (ret) {
printk (KERN_ERR PFX "cannot register miscdev on minor=%d 
(%d)\n",
WATCHDOG_MINOR, ret);
-   unregister_reboot_notifier(&s3c2410wdt_notifier);
return ret;
}
 
@@ -481,6 +454,11 @@ static int s3c2410wdt_remove(struct devi
return 0;
 }
 
+static void s3c2410wdt_shutdown(struct device *dev)
+{
+   s3c2410wdt_stop();  
+}
+
 #ifdef CONFIG_PM
 
 static unsigned long wtcon_save;
@@ -527,6 +505,7 @@ static struct device_driver s3c2410wdt_d
.bus= &platform_bus_type,
.probe  = s3c2410wdt_probe,
.remove = s3c2410wdt_remove,
+   .shutdown   = s3c2410wdt_shutdown,
.suspend= s3c2410wdt_suspend,
.resume = s3c2410wdt_resume,
 };
@@ -543,7 +522,6 @@ static int __init watchdog_init(void)
 static void __exit watchdog_exit(void)
 {
driver_unregister(&s3c2410wdt_driver);
-   unregister_reboot_notifier(&s3c2410wdt_notifier);
 }
 
 module_init(watchdog_init);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] s3c2410 watchdog power management

2005-09-05 Thread Linux Kernel Mailing List
tree 72ce7609578358929453e65c0c67796d5bff2b07
parent 2dab3cabc4b3c1ef53965233dc8a05e0ddeeb38e
author Ben Dooks <[EMAIL PROTECTED]> Wed, 17 Aug 2005 09:03:23 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:54:16 +0200

[WATCHDOG] s3c2410 watchdog power management

Patch from Dimitry Andric <[EMAIL PROTECTED]>, updated
by Ben Dooks <[EMAIL PROTECTED]>. Patch is against 2.6.11-mm2

Add power management support to the s3c2410 watchdog, so that
it is shut-down over suspend, and re-initialised on resume.

Also add Dimitry to the list of authors.

Signed-off-by: Dimitry Andric <[EMAIL PROTECTED]>
Signed-off-by: Ben Dooks <[EMAIL PROTECTED]>
Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/s3c2410_wdt.c |   51 +---
 1 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/drivers/char/watchdog/s3c2410_wdt.c 
b/drivers/char/watchdog/s3c2410_wdt.c
--- a/drivers/char/watchdog/s3c2410_wdt.c
+++ b/drivers/char/watchdog/s3c2410_wdt.c
@@ -27,7 +27,9 @@
  * Fixed tmr_count / wdt_count confusion
  * Added configurable debug
  *
- * 11-Jan-2004 BJD Fixed divide-by-2 in timeout code
+ * 11-Jan-2005 BJD Fixed divide-by-2 in timeout code
+ *
+ * 25-Jan-2005 DA  Added suspend/resume support
  *
  * 10-Mar-2005 LCVRChanged S3C2410_VA to S3C24XX_VA
 */
@@ -479,15 +481,57 @@ static int s3c2410wdt_remove(struct devi
return 0;
 }
 
+#ifdef CONFIG_PM
+
+static unsigned long wtcon_save;
+static unsigned long wtdat_save;
+
+static int s3c2410wdt_suspend(struct device *dev, u32 state, u32 level)
+{
+   if (level == SUSPEND_POWER_DOWN) {
+   /* Save watchdog state, and turn it off. */
+   wtcon_save = readl(wdt_base + S3C2410_WTCON);
+   wtdat_save = readl(wdt_base + S3C2410_WTDAT);
+
+   /* Note that WTCNT doesn't need to be saved. */
+   s3c2410wdt_stop();
+   }
+
+   return 0;
+}
+
+static int s3c2410wdt_resume(struct device *dev, u32 level)
+{
+   if (level == RESUME_POWER_ON) {
+   /* Restore watchdog state. */
+
+   writel(wtdat_save, wdt_base + S3C2410_WTDAT);
+   writel(wtdat_save, wdt_base + S3C2410_WTCNT); /* Reset count */
+   writel(wtcon_save, wdt_base + S3C2410_WTCON);
+
+   printk(KERN_INFO PFX "watchdog %sabled\n",
+  (wtcon_save & S3C2410_WTCON_ENABLE) ? "en" : "dis");
+   }
+
+   return 0;
+}
+
+#else
+#define s3c2410wdt_suspend NULL
+#define s3c2410wdt_resume  NULL
+#endif /* CONFIG_PM */
+
+
 static struct device_driver s3c2410wdt_driver = {
.name   = "s3c2410-wdt",
.bus= &platform_bus_type,
.probe  = s3c2410wdt_probe,
.remove = s3c2410wdt_remove,
+   .suspend= s3c2410wdt_suspend,
+   .resume = s3c2410wdt_resume,
 };
 
 
-
 static char banner[] __initdata = KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 
Simtec Electronics\n";
 
 static int __init watchdog_init(void)
@@ -505,7 +549,8 @@ static void __exit watchdog_exit(void)
 module_init(watchdog_init);
 module_exit(watchdog_exit);
 
-MODULE_AUTHOR("Ben Dooks <[EMAIL PROTECTED]>");
+MODULE_AUTHOR("Ben Dooks <[EMAIL PROTECTED]>, "
+ "Dimitry Andric <[EMAIL PROTECTED]>");
 MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] correct sysfs name for watchdog devices

2005-09-05 Thread Linux Kernel Mailing List
tree 82dd082d2f40b0e86fac99893ff1ce44c73b635a
parent 09c8a9a0c0fe5b3182b6ecfa556fa77a55892c93
author Olaf Hering <[EMAIL PROTECTED]> Wed, 17 Aug 2005 08:58:34 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:51:18 +0200

[WATCHDOG] correct sysfs name for watchdog devices

While looking for possible candidates for our udev.rules package,
I found a few odd ->name properties. /dev/watchdog has minor 130
according to devices.txt. Since all watchdog drivers use the
misc_register() call, they will end up in /sys/class/misc/$foo.
udev may create the /dev/watchdog node if the driver is loaded.
I dont have such a device, so I cant test it.
The drivers below provide names with spaces and even with / in it.
Not a big deal, but apps may expect /dev/watchdog.

Signed-off-by: Olaf Hering <[EMAIL PROTECTED]>
Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/ixp2000_wdt.c |2 +-
 drivers/char/watchdog/ixp4xx_wdt.c  |2 +-
 drivers/char/watchdog/scx200_wdt.c  |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/char/watchdog/ixp2000_wdt.c 
b/drivers/char/watchdog/ixp2000_wdt.c
--- a/drivers/char/watchdog/ixp2000_wdt.c
+++ b/drivers/char/watchdog/ixp2000_wdt.c
@@ -182,7 +182,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP2000 Watchdog",
+   .name   = "watchdog",
.fops   = &ixp2000_wdt_fops,
 };
 
diff --git a/drivers/char/watchdog/ixp4xx_wdt.c 
b/drivers/char/watchdog/ixp4xx_wdt.c
--- a/drivers/char/watchdog/ixp4xx_wdt.c
+++ b/drivers/char/watchdog/ixp4xx_wdt.c
@@ -176,7 +176,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
.minor  = WATCHDOG_MINOR,
-   .name   = "IXP4xx Watchdog",
+   .name   = "watchdog",
.fops   = &ixp4xx_wdt_fops,
 };
 
diff --git a/drivers/char/watchdog/scx200_wdt.c 
b/drivers/char/watchdog/scx200_wdt.c
--- a/drivers/char/watchdog/scx200_wdt.c
+++ b/drivers/char/watchdog/scx200_wdt.c
@@ -206,7 +206,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
-   .name  = NAME,
+   .name  = "watchdog",
.fops  = &scx200_wdt_fops,
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] Kconfig+Makefile-clean

2005-09-05 Thread Linux Kernel Mailing List
tree 6e58e256da91f7c78221b4f887c0d0479ca3f304
parent be3df0f94d77ba3cff40c14c3e21a753c40ba6f2
author Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:46:56 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:46:56 +0200

[WATCHDOG] Kconfig+Makefile-clean

Clean the Kconfig+Makefile according to a sorted list
of the drivers of each architecture (and sub-architecture).

Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/Kconfig  |   43 -
 drivers/char/watchdog/Makefile |4 ++-
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig
--- a/drivers/char/watchdog/Kconfig
+++ b/drivers/char/watchdog/Kconfig
@@ -84,6 +84,17 @@ config 977_WATCHDOG
 
  Not sure? It's safe to say N.
 
+config IXP2000_WATCHDOG
+   tristate "IXP2000 Watchdog"
+   depends on WATCHDOG && ARCH_IXP2000
+   help
+ Say Y here if to include support for the watchdog timer
+ in the Intel IXP2000(2400, 2800, 2850) network processors.
+ This driver can be built as a module by choosing M. The module
+ will be called ixp2000_wdt.
+
+ Say N if you are unsure.
+
 config IXP4XX_WATCHDOG
tristate "IXP4xx Watchdog"
depends on WATCHDOG && ARCH_IXP4XX
@@ -100,17 +111,6 @@ config IXP4XX_WATCHDOG
 
  Say N if you are unsure.
 
-config IXP2000_WATCHDOG
-   tristate "IXP2000 Watchdog"
-   depends on WATCHDOG && ARCH_IXP2000
-   help
- Say Y here if to include support for the watchdog timer
- in the Intel IXP2000(2400, 2800, 2850) network processors.
- This driver can be built as a module by choosing M. The module
- will be called ixp2000_wdt.
-
- Say N if you are unsure.
-
 config S3C2410_WATCHDOG
tristate "S3C2410 Watchdog"
depends on WATCHDOG && ARCH_S3C2410
@@ -346,6 +346,17 @@ config 8xx_WDT
tristate "MPC8xx Watchdog Timer"
depends on WATCHDOG && 8xx
 
+# PPC64 Architecture
+
+config WATCHDOG_RTAS
+   tristate "RTAS watchdog"
+   depends on WATCHDOG && PPC_RTAS
+   help
+ This driver adds watchdog support for the RTAS watchdog.
+
+  To compile this driver as a module, choose M here. The module
+ will be called wdrtas.
+
 # MIPS Architecture
 
 config INDYDOG
@@ -414,16 +425,6 @@ config WATCHDOG_RIO
  machines.  The watchdog timeout period is normally one minute but
  can be changed with a boot-time parameter.
 
-# ppc64 RTAS watchdog
-config WATCHDOG_RTAS
-   tristate "RTAS watchdog"
-   depends on WATCHDOG && PPC_RTAS
-   help
- This driver adds watchdog support for the RTAS watchdog.
-
-  To compile this driver as a module, choose M here. The module
- will be called wdrtas.
-
 #
 # ISA-based Watchdog Cards
 #
diff --git a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile
--- a/drivers/char/watchdog/Makefile
+++ b/drivers/char/watchdog/Makefile
@@ -25,8 +25,8 @@ obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.
 # ARM Architecture
 obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
 obj-$(CONFIG_977_WATCHDOG) += wdt977.o
-obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
 obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
+obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
 obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
 obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
 
@@ -50,6 +50,8 @@ obj-$(CONFIG_MACHZ_WDT) += machzwd.o
 
 # PowerPC Architecture
 obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o
+
+# PPC64 Architecture
 obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
 
 # MIPS Architecture
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[WATCHDOG] Makefile-probe_order-patch

2005-09-05 Thread Linux Kernel Mailing List
tree 0c65ed434e64101630ac04944040cf9b17ae6ca2
parent f505380ba7b98ec97bf25300c2a58aeae903530b
author Wim Van Sebroeck <[EMAIL PROTECTED]> Wed, 17 Aug 2005 01:49:24 +0200
committer Wim Van Sebroeck <[EMAIL PROTECTED]> Sat, 03 Sep 2005 13:15:32 +0200

[WATCHDOG] Makefile-probe_order-patch

Re-arrange Makefile according to what we want to probe first.

Signed-off-by: Wim Van Sebroeck <[EMAIL PROTECTED]>

 drivers/char/watchdog/Makefile |   69 +++--
 1 files changed, 46 insertions(+), 23 deletions(-)

diff --git a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile
--- a/drivers/char/watchdog/Makefile
+++ b/drivers/char/watchdog/Makefile
@@ -2,42 +2,65 @@
 # Makefile for the WatchDog device drivers.
 #
 
+# Only one watchdog can succeed. We probe the ISA/PCI/USB based
+# watchdog-cards first, then the architecture specific watchdog
+# drivers and then the architecture independant "softdog" driver.
+# This means that if your ISA/PCI/USB card isn't detected that
+# you can fall back to an architecture specific driver and if
+# that also fails then you can fall back to the software watchdog
+# to give you some cover.
+
+# ISA-based Watchdog Cards
 obj-$(CONFIG_PCWATCHDOG) += pcwd.o
-obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
-obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o
-obj-$(CONFIG_IB700_WDT) += ib700wdt.o
 obj-$(CONFIG_MIXCOMWD) += mixcomwd.o
-obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o
-obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o
 obj-$(CONFIG_WDT) += wdt.o
+
+# PCI-based Watchdog Cards
+obj-$(CONFIG_PCIPCWATCHDOG) += pcwd_pci.o
 obj-$(CONFIG_WDTPCI) += wdt_pci.o
+
+# USB-based Watchdog Cards
+obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o
+
+# ARM Architecture
 obj-$(CONFIG_21285_WATCHDOG) += wdt285.o
 obj-$(CONFIG_977_WATCHDOG) += wdt977.o
-obj-$(CONFIG_I8XX_TCO) += i8xx_tco.o
-obj-$(CONFIG_MACHZ_WDT) += machzwd.o
-obj-$(CONFIG_SH_WDT) += shwdt.o
+obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
+obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
 obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
 obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
-obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
-obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o
-obj-$(CONFIG_W83627HF_WDT) += w83627hf_wdt.o
-obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
-obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
+
+# X86 (i386 + ia64 + x86_64) Architecture
+obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
+obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o
 obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o
-obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
+obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
+obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
+obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
+obj-$(CONFIG_IB700_WDT) += ib700wdt.o
 obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
+obj-$(CONFIG_I8XX_TCO) += i8xx_tco.o
+obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
+obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o
+obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o
 obj-$(CONFIG_CPU5_WDT) += cpu5wdt.o
-obj-$(CONFIG_INDYDOG) += indydog.o
-obj-$(CONFIG_PCIPCWATCHDOG) += pcwd_pci.o
-obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o
-obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
-obj-$(CONFIG_IXP2000_WATCHDOG) += ixp2000_wdt.o
+obj-$(CONFIG_W83627HF_WDT) += w83627hf_wdt.o
+obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o
+obj-$(CONFIG_MACHZ_WDT) += machzwd.o
+
+# PowerPC Architecture
 obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o
 obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
 
-# Only one watchdog can succeed. We probe the hardware watchdog
-# drivers first, then the softdog driver.  This means if your hardware
-# watchdog dies or is 'borrowed' for some reason the software watchdog
-# still gives you some cover.
+# MIPS Architecture
+obj-$(CONFIG_INDYDOG) += indydog.o
+
+# S390 Architecture
+
+# SUPERH Architecture
+obj-$(CONFIG_SH_WDT) += shwdt.o
+
+# SPARC64 Architecture
 
+# Architecture Independant
 obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] fix ATAPI-enable typo

2005-09-05 Thread Linux Kernel Mailing List
tree 157728e07af3efc756737108b01f9feee40eb360
parent 1623c81eece58740279b8de802fa5895221f2044
author Jeff Garzik <[EMAIL PROTECTED]> Wed, 31 Aug 2005 05:52:18 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Wed, 31 Aug 2005 05:52:18 -0400

[libata] fix ATAPI-enable typo

Dumb typo spotted by Mark Lord.

 drivers/scsi/libata-scsi.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1470,7 +1470,7 @@ ata_scsi_find_dev(struct ata_port *ap, s
if (unlikely(!ata_dev_present(dev)))
return NULL;
 
-   if (atapi_enabled) {
+   if (!atapi_enabled) {
if (unlikely(dev->class == ATA_DEV_ATAPI))
return NULL;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] allow ATAPI to be enabled with new atapi_enabled module option

2005-09-05 Thread Linux Kernel Mailing List
tree 486aa6a40ea419c14d02bc8561cdb8485f6a5189
parent 1fdab81e675c6ef76a49b8aabb7eaf4be51d1b80
author Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 11:37:42 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 11:37:42 -0400

[libata] allow ATAPI to be enabled with new atapi_enabled module option

ATAPI is getting close to being ready.  To increase exposure, we enable
the code in the upstream kernel, but default it to off (present
behavior).  Users must pass atapi_enabled=1 as a module option (if
module) or on the kernel command line (if built in) to turn on
discovery of their ATAPI devices.

 drivers/scsi/libata-core.c |4 
 drivers/scsi/libata-scsi.c |8 
 drivers/scsi/libata.h  |1 +
 include/linux/libata.h |1 -
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -75,6 +75,10 @@ static void __ata_qc_complete(struct ata
 static unsigned int ata_unique_id = 1;
 static struct workqueue_struct *ata_wq;
 
+int atapi_enabled = 0;
+module_param(atapi_enabled, int, 0444);
+MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 
1=on)");
+
 MODULE_AUTHOR("Jeff Garzik");
 MODULE_DESCRIPTION("Library module for ATA devices");
 MODULE_LICENSE("GPL");
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1470,10 +1470,10 @@ ata_scsi_find_dev(struct ata_port *ap, s
if (unlikely(!ata_dev_present(dev)))
return NULL;
 
-#ifndef ATA_ENABLE_ATAPI
-   if (unlikely(dev->class == ATA_DEV_ATAPI))
-   return NULL;
-#endif
+   if (atapi_enabled) {
+   if (unlikely(dev->class == ATA_DEV_ATAPI))
+   return NULL;
+   }
 
return dev;
 }
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -38,6 +38,7 @@ struct ata_scsi_args {
 };
 
 /* libata-core.c */
+extern int atapi_enabled;
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
  struct ata_device *dev);
 extern void ata_qc_free(struct ata_queued_cmd *qc);
diff --git a/include/linux/libata.h b/include/linux/libata.h
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -40,7 +40,6 @@
 #undef ATA_VERBOSE_DEBUG   /* yet more debugging output */
 #undef ATA_IRQ_TRAP/* define to ack screaming irqs */
 #undef ATA_NDEBUG  /* define to disable quick runtime checks */
-#undef ATA_ENABLE_ATAPI/* define to enable ATAPI support */
 #undef ATA_ENABLE_PATA /* define to enable PATA support in some
 * low-level drivers */
 #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[libata] update several drivers to use pci_iomap()/pci_iounmap()

2005-09-05 Thread Linux Kernel Mailing List
tree d53352d9fed18984e48cf734a1036ff8fbef856f
parent ea6ba10bbb88e106f9e2db7dc253993bb3bbbe3b
author Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 13:42:52 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 13:42:52 -0400

[libata] update several drivers to use pci_iomap()/pci_iounmap()

 drivers/scsi/ahci.c |7 +++
 drivers/scsi/ata_piix.c |9 -
 drivers/scsi/libata-core.c  |   11 ++-
 drivers/scsi/sata_nv.c  |9 +
 drivers/scsi/sata_promise.c |8 
 drivers/scsi/sata_qstor.c   |8 
 drivers/scsi/sata_sil.c |7 ---
 drivers/scsi/sata_svw.c |5 ++---
 drivers/scsi/sata_sx4.c |   15 +++
 drivers/scsi/sata_vsc.c |5 ++---
 include/linux/libata.h  |1 +
 11 files changed, 46 insertions(+), 39 deletions(-)

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -995,8 +995,7 @@ static int ahci_init_one (struct pci_dev
probe_ent->dev = pci_dev_to_dev(pdev);
INIT_LIST_HEAD(&probe_ent->node);
 
-   mmio_base = ioremap(pci_resource_start(pdev, AHCI_PCI_BAR),
-   pci_resource_len(pdev, AHCI_PCI_BAR));
+   mmio_base = pci_iomap(pdev, AHCI_PCI_BAR, 0);
if (mmio_base == NULL) {
rc = -ENOMEM;
goto err_out_free_ent;
@@ -1040,7 +1039,7 @@ static int ahci_init_one (struct pci_dev
 err_out_hpriv:
kfree(hpriv);
 err_out_iounmap:
-   iounmap(mmio_base);
+   pci_iounmap(pdev, mmio_base);
 err_out_free_ent:
kfree(probe_ent);
 err_out_msi:
@@ -1081,7 +1080,7 @@ static void ahci_remove_one (struct pci_
}
 
kfree(hpriv);
-   iounmap(host_set->mmio_base);
+   pci_iounmap(pdev, host_set->mmio_base);
kfree(host_set);
 
if (have_msi)
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -584,7 +584,6 @@ static void pci_enable_intx(struct pci_d
 static int piix_disable_ahci(struct pci_dev *pdev)
 {
void __iomem *mmio;
-   unsigned long addr;
u32 tmp;
int rc = 0;
 
@@ -592,11 +591,11 @@ static int piix_disable_ahci(struct pci_
 * works because this device is usually set up by BIOS.
 */
 
-   addr = pci_resource_start(pdev, AHCI_PCI_BAR);
-   if (!addr || !pci_resource_len(pdev, AHCI_PCI_BAR))
+   if (!pci_resource_start(pdev, AHCI_PCI_BAR) ||
+   !pci_resource_len(pdev, AHCI_PCI_BAR))
return 0;
 
-   mmio = ioremap(addr, 64);
+   mmio = pci_iomap(pdev, AHCI_PCI_BAR, 64);
if (!mmio)
return -ENOMEM;
 
@@ -610,7 +609,7 @@ static int piix_disable_ahci(struct pci_
rc = -EIO;
}
 
-   iounmap(mmio);
+   pci_iounmap(pdev, mmio);
return rc;
 }
 
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -4200,6 +4200,15 @@ ata_probe_ent_alloc(struct device *dev, 
 
 
 
+#ifdef CONFIG_PCI
+
+void ata_pci_host_stop (struct ata_host_set *host_set)
+{
+   struct pci_dev *pdev = to_pci_dev(host_set->dev);
+
+   pci_iounmap(pdev, host_set->mmio_base);
+}
+
 /**
  * ata_pci_init_native_mode - Initialize native-mode driver
  * @pdev:  pci device to be initialized
@@ -4212,7 +4221,6 @@ ata_probe_ent_alloc(struct device *dev, 
  * ata_probe_ent structure should then be freed with kfree().
  */
 
-#ifdef CONFIG_PCI
 struct ata_probe_ent *
 ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port)
 {
@@ -4595,6 +4603,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_simulate);
 
 #ifdef CONFIG_PCI
 EXPORT_SYMBOL_GPL(pci_test_config_bits);
+EXPORT_SYMBOL_GPL(ata_pci_host_stop);
 EXPORT_SYMBOL_GPL(ata_pci_init_native_mode);
 EXPORT_SYMBOL_GPL(ata_pci_init_one);
 EXPORT_SYMBOL_GPL(ata_pci_remove_one);
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -351,6 +351,7 @@ static void nv_scr_write (struct ata_por
 static void nv_host_stop (struct ata_host_set *host_set)
 {
struct nv_host *host = host_set->private_data;
+   struct pci_dev *pdev = to_pci_dev(host_set->dev);
 
// Disable hotplug event interrupts.
if (host->host_desc->disable_hotplug)
@@ -358,7 +359,8 @@ static void nv_host_stop (struct ata_hos
 
kfree(host);
 
-   ata_host_stop(host_set);
+   if (host_set->mmio_base)
+   pci_iounmap(pdev, host_set->mmio_base);
 }
 
 static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
@@ -420,8 +422,7 @@ static int nv_init_one (struct pci_dev *
if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) {
unsigned long base;
 
-   probe_ent->mmio_base = ioremap(pci_resource_start(pdev, 5),
-   pci_resou

[libata] __iomem annotations for various drivers

2005-09-05 Thread Linux Kernel Mailing List
tree aa83ab9aa74e85b7a5c76f40764514a6ac266226
parent e005f01de32f22be8af255f2761018e9766000d2
author Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 13:18:18 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 13:18:18 -0400

[libata] __iomem annotations for various drivers

 drivers/scsi/ahci.c |   33 +
 drivers/scsi/ata_piix.c |2 +-
 drivers/scsi/sata_promise.c |   12 ++--
 drivers/scsi/sata_sil.c |5 +++--
 drivers/scsi/sata_svw.c |2 +-
 drivers/scsi/sata_sx4.c |   39 ---
 6 files changed, 48 insertions(+), 45 deletions(-)

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -294,9 +294,9 @@ static inline unsigned long ahci_port_ba
return base + 0x100 + (port * 0x80);
 }
 
-static inline void *ahci_port_base (void *base, unsigned int port)
+static inline void __iomem *ahci_port_base (void __iomem *base, unsigned int 
port)
 {
-   return (void *) ahci_port_base_ul((unsigned long)base, port);
+   return (void __iomem *) ahci_port_base_ul((unsigned long)base, port);
 }
 
 static int ahci_port_start(struct ata_port *ap)
@@ -304,8 +304,9 @@ static int ahci_port_start(struct ata_po
struct device *dev = ap->host_set->dev;
struct ahci_host_priv *hpriv = ap->host_set->private_data;
struct ahci_port_priv *pp;
-   void *mem, *mmio = ap->host_set->mmio_base;
-   void *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void __iomem *mmio = ap->host_set->mmio_base;
+   void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void *mem;
dma_addr_t mem_dma;
 
pp = kmalloc(sizeof(*pp), GFP_KERNEL);
@@ -373,8 +374,8 @@ static void ahci_port_stop(struct ata_po
 {
struct device *dev = ap->host_set->dev;
struct ahci_port_priv *pp = ap->private_data;
-   void *mmio = ap->host_set->mmio_base;
-   void *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void __iomem *mmio = ap->host_set->mmio_base;
+   void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
u32 tmp;
 
tmp = readl(port_mmio + PORT_CMD);
@@ -536,8 +537,8 @@ static void ahci_qc_prep(struct ata_queu
 
 static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
 {
-   void *mmio = ap->host_set->mmio_base;
-   void *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void __iomem *mmio = ap->host_set->mmio_base;
+   void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
u32 tmp;
int work;
 
@@ -585,8 +586,8 @@ static void ahci_intr_error(struct ata_p
 static void ahci_eng_timeout(struct ata_port *ap)
 {
struct ata_host_set *host_set = ap->host_set;
-   void *mmio = host_set->mmio_base;
-   void *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void __iomem *mmio = host_set->mmio_base;
+   void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
struct ata_queued_cmd *qc;
unsigned long flags;
 
@@ -616,8 +617,8 @@ static void ahci_eng_timeout(struct ata_
 
 static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd 
*qc)
 {
-   void *mmio = ap->host_set->mmio_base;
-   void *port_mmio = ahci_port_base(mmio, ap->port_no);
+   void __iomem *mmio = ap->host_set->mmio_base;
+   void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
u32 status, serr, ci;
 
serr = readl(port_mmio + PORT_SCR_ERR);
@@ -653,7 +654,7 @@ static irqreturn_t ahci_interrupt (int i
struct ata_host_set *host_set = dev_instance;
struct ahci_host_priv *hpriv;
unsigned int i, handled = 0;
-   void *mmio;
+   void __iomem *mmio;
u32 irq_stat, irq_ack = 0;
 
VPRINTK("ENTER\n");
@@ -699,7 +700,7 @@ static irqreturn_t ahci_interrupt (int i
 static int ahci_qc_issue(struct ata_queued_cmd *qc)
 {
struct ata_port *ap = qc->ap;
-   void *port_mmio = (void *) ap->ioaddr.cmd_addr;
+   void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
 
writel(1, port_mmio + PORT_CMD_ISSUE);
readl(port_mmio + PORT_CMD_ISSUE);  /* flush */
@@ -884,7 +885,7 @@ static void ahci_print_info(struct ata_p
 {
struct ahci_host_priv *hpriv = probe_ent->private_data;
struct pci_dev *pdev = to_pci_dev(probe_ent->dev);
-   void *mmio = probe_ent->mmio_base;
+   void __iomem *mmio = probe_ent->mmio_base;
u32 vers, cap, impl, speed;
const char *speed_s;
u16 cc;
@@ -957,7 +958,7 @@ static int ahci_init_one (struct pci_dev
struct ata_probe_ent *probe_ent = NULL;
struct ahci_host_priv *hpriv;
unsigned long base;
-   void *mmio_base;
+   void __iomem *mmio_base;
unsigned int board_idx = (unsigned int) ent->driver_data;
int have_msi, pci_dev_busy = 0;
int rc;
diff --git a/drivers/scsi/ata_piix.c b/

[libata ahci] minor remove/unplug path cleanup

2005-09-05 Thread Linux Kernel Mailing List
tree 823f9aec427a108c873e50f215e36d225661a068
parent 1fdab81e675c6ef76a49b8aabb7eaf4be51d1b80
author Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 12:18:28 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 12:18:28 -0400

[libata ahci] minor remove/unplug path cleanup

Don't bother calling a hook, to call our own module, to call a helper
than simply calls ionumap().

If you unroll all that convolution, you get a simple kfree()+iounmap()
pair of calls.

 drivers/scsi/ahci.c |   14 ++
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -189,7 +189,6 @@ static void ahci_irq_clear(struct ata_po
 static void ahci_eng_timeout(struct ata_port *ap);
 static int ahci_port_start(struct ata_port *ap);
 static void ahci_port_stop(struct ata_port *ap);
-static void ahci_host_stop(struct ata_host_set *host_set);
 static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static void ahci_qc_prep(struct ata_queued_cmd *qc);
 static u8 ahci_check_status(struct ata_port *ap);
@@ -242,7 +241,6 @@ static struct ata_port_operations ahci_o
 
.port_start = ahci_port_start,
.port_stop  = ahci_port_stop,
-   .host_stop  = ahci_host_stop,
 };
 
 static struct ata_port_info ahci_port_info[] = {
@@ -301,14 +299,6 @@ static inline void *ahci_port_base (void
return (void *) ahci_port_base_ul((unsigned long)base, port);
 }
 
-static void ahci_host_stop(struct ata_host_set *host_set)
-{
-   struct ahci_host_priv *hpriv = host_set->private_data;
-   kfree(hpriv);
-
-   ata_host_stop(host_set);
-}
-
 static int ahci_port_start(struct ata_port *ap)
 {
struct device *dev = ap->host_set->dev;
@@ -1089,7 +1079,8 @@ static void ahci_remove_one (struct pci_
scsi_host_put(ap->host);
}
 
-   host_set->ops->host_stop(host_set);
+   kfree(hpriv);
+   iounmap(host_set->mmio_base);
kfree(host_set);
 
if (have_msi)
@@ -1106,7 +1097,6 @@ static int __init ahci_init(void)
return pci_module_init(&ahci_pci_driver);
 }
 
-
 static void __exit ahci_exit(void)
 {
pci_unregister_driver(&ahci_pci_driver);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html