- use nonseekable_open() instead of messing with
if (*ppos != file->f_pos)
return -EISPIPE
in ->write() (->read is NULL).
- trivial __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Clean-up control status code (use control status defines +
change pcipcwd_clear_status)
* Clean-up boot-code (move card info to pcipcwd_show_card_info() )
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
The timer/watchdog register definitions were missing from
the mpcore watchdog patch. Add them.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Attached patch removes #ifdef CONFIG_WATCHDOG_NOWAYOUT mess and
replaces it with common define in linux/watchdog.h.
Signed-Off-By: Wim Van Sebroeck <wim@iguana.be>
In a project for my company I've needed to use the watchdog device in a
PCM-5335 SBC from AAEON. The watchdog timer is from a Winbond's SuperIO
chip, the W83977F.
I've made this driver based on two others already on the kernel tree,
the w83877f_wdt and the wdt977.
Signed-off-by: Jose Goncalves <jose.goncalves@inov.pt>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
New SBC8360 watchdog driver patch
From: Ian E. Morgan <imorgan@webcon.ca>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
The device/watchdog has a fixed timeout/heartbeat.
So we don't support the WDIOC_SETTIMEOUT ioctl call
and we also may not set the WDIOF_SETTIMEOUT flag.
Cc: Andrey Panin <pazke@donpac.ru>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This patch adds driver for IBM Automatic Server Restart watchdog hardware
found in some IBM eServer xSeries machines. This driver is based on the ugly
driver provided by IBM. Driver was tested on IBM eServer 226.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
the attached patch moves the content of drivers/char/watchdog/i6300.h
into drivers/char/watchdog/i6300.c, since it is the only file using the
defines there is no real reason to have a separate header.
Also cleaned up the comments a bit and added myself to the copyright
holders.
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
In i6300esb.c watchdog card driver were 2 bugs (misused pc_match_device and
pci_dev_put wasn't called in one error case) and one little cleanup was
done (long line was converted to a shorter one with using built-in macro).
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
One pci_dev_put was misused (there was one case without putting
the device).
Changed nowayout according to other drivers.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
This patch writes into bit 8 of the reload register to perform the
correct 'Reload Sequence' instead of writing into bit 4 of Watchdog for
Intel 6300ESB chipset.
Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
This patch sets the WDT_ENABLE bit of the Lock Register to enable the
watchdog and WDT_LOCK bit only if nowayout is set. The old code always
sets the WDT_LOCK bit of watchdog timer for Intel 6300ESB chipset. So, we
end up locking the watchdog instead of enabling it.
Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
This patch changes pci_find_device to pci_get_device
(encapsulated in for_each_pci_dev) in i6300esb watchdog
card with appropriate adding pci_dev_put.
Generated in 2.6.13-rc5-mm1 kernel version.
Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
I wrote earlier to the list[1] asking for a driver for the watchdog
included in the 6300ESB chipset. I got a 2.4 driver via private email
from Ross Biro which I've changed into what I hope resembles a 2.6
driver (which was done by looking a lot at the watchdog drivers
already in the 2.6 tree).
I've attached the result, and I'm hoping to get some feedback on the
coding as a first step. I can't actually test it on the hardware
right now as I won't have physical access until April. So my own tests
have been limited to "compiles-without-warnings" and
"can-be-insmodded-in-other-machine-without-oops".
[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=110711079825794&w=2
[2] http://marc.theaimsgroup.com/?l=linux-kernel&m=110711973917746&w=2
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Clean the Kconfig+Makefile according to a sorted list
of the drivers of each architecture (and sub-architecture).
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
I've noticed that the patch from Ben Dooks (commit
af4bb822bc on your git tree) is
introducing a warning. It's using 'u32 state' instead of 'pm_message_t
state'. I've attached a one liner to fix it.
Signed-Off-By: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been
been in the -RT tree for some time.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Automated merge from
master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
failed due to duplicate different changes to Kconfig file. Manually fixed
up. Hopefully.
Renamed global variables used to convey if the watchdog is enabled and
periodicity of the timer and moved the declarations into a header for these
variables
Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
PowerPC 40x and Book-E processors support a watchdog timer at the processor
core level. The timer has implementation dependent timeout frequencies
that can be configured by software.
One the first Watchdog timeout we get a critical exception. It is left to
board specific code to determine what should happen at this point. If
nothing is done and another timeout period expires the processor may
attempt to reset the machine.
Command line parameters:
wdt=0 : disable watchdog (default)
wdt=1 : enable watchdog
wdt_period=N : N sets the value of the Watchdog Timer Period.
The Watchdog Timer Period meaning is implementation specific. Check
User Manual for the processor for more details.
This patch is based off of work done by Takeharu Kato.
Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 <schierlm@gmx.de>
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 <76306.1226@compuserve.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
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: P@draig Brady <P@draigBrady.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Patch from Dimitry Andric <dimitry.andric@tomtom.com>
Change to using platfrom driver's .shutdown method instead
of an reboot notifier
Signed-off-by: Dimitry Andric <dimitry.andric@tomtom.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Patch from Dimitry Andric <dimitry.andric@tomtom.com>, updated
by Ben Dooks <ben-linux@fluff.org>. 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 <dimitry.andric@tomtom.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
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 <olh@suse.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Clean the Kconfig+Makefile according to a sorted list
of the drivers of each architecture (and sub-architecture).
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
i8xx_tco.c v0.08: only "arm" the watchdog when the watchdog has been
started. (Kernel Bug 4251: system reset when battery is read and i8xx_tco
driver loaded)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Patch from Ian Campbell
On PXA255 there is no way to disable the watchdog. Turning off OIER[E3]
as suggested in the existing comment does not work.
I posted a note to the ARM mailing list a little while ago asking for
opinions from people using SA1100. There was one reponse from Nico who
believes that the SA1100 is the same as the PXA255 in this respect.
You also asked me to involve the watchdog maintainer which I tried to
do but didn't hear anything back. There are only a couple of other
drivers which can't stop the watchdog and there seems to be no
consistancy regarding printing an error etc. I decided to print
something since that matches the case for all the other drivers when
NOWAYOUT is turned on.
Also, I changed the device .name to "watchdog" like most of the other
watchdogs. udev uses it as the device name (by default) and spaces etc.
get in the way.
Superceded 2833/1 because 2.6.13-rc4 caused rejects.
Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Attached patch removes #ifdef CONFIG_WATCHDOG_NOWAYOUT mess duplicated in
almost every watchdog driver and replaces it with common define in
linux/watchdog.h.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Usually the device IDs are given in hex. This one is a bit strange: it is
without 0x in the first place and used with it some lines later. I suspect
the first one to be the wrong.
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/watchdog/softdog.c:94: too many arguments to function `emergency_restart'
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/watchdog/eurotechwdt.c:165: too many arguments to function `emergency_restart'
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The call appears to come from process context so kernel_power_off
should be safe. And acpi_power_off won't necessarily work if you just
call machine_power_off.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
If a watchdog driver has decided it is time to reboot the system
we know something is wrong and we are in interrupt context
so emergency_reboot() is what we want.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The dynamic pci id logic has been bothering me for a while, and now that
I started to look into how to move some of this to the driver core, I
thought it was time to clean it all up.
It ends up making the code smaller, and easier to follow, and fixes a
few bugs at the same time (dynamic ids were not being matched
everywhere, and so could be missed on some call paths for new devices,
semaphore not needed to be grabbed when adding a new id and calling the
driver core, etc.)
I also renamed the function pci_match_device() to pci_match_id() as
that's what it really does.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix the same typo in the ixp4xx and ixp2000 watchdog drivers.
Signed-off-by: Lennert Buytenhek <buytenh+lkml@wantstofly.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Add a watchdog using the RTAS OS surveillance service. This is
provided as a simpler alternative to rtasd. The added value
is that it works with standard watchdog client programs and
can therefore also do user space monitoring.
On BPA, rtasd is not really useful because the hardware does
not have much to report with event-scan.
The driver should also work on other platforms that support
the OS surveillance rtas calls.
Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Patch from Lennert Buytenhek
The IXP2000 has four timers, but if we're on an A-step IXP2800, timer
2 and 3 don't work. We need two timers for timekeeping (one for the
timer interrupt and one for tracking missed jiffies), so on early
IXP2800s we have no other choice but to use timer 1 and 4 for that,
but on all other IXP2000s we'd rather leave timer 4 free since that's
the only timer we can use for the watchdog.
So, on buggy IXP2000s (i.e. the A-step IXP2800) we use timer 4 for
tracking missed jiffies, and on all all non-buggy IXP2000s (i.e.
everything but the A-step IXP2800) we use timer 2.
On a pre-production IXP2800, this patch should print these messages
on boot:
Enabling IXP2800 erratum #25 workaround
Unable to use IXP2000 watchdog due to IXP2800 erratum #25
On any non-buggy IXP2800 (as well as on IXP2400s) you shouldn't see
anything at all, and the watchdog should be usable again.
Signed-off-by: Lennert Buytenhek
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!