<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/watchdog/watchdog_dev.c, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-06-28T18:40:56Z</updated>
<entry>
<title>watchdog: core: fix WDIOC_GETSTATUS return value</title>
<updated>2012-06-28T18:40:56Z</updated>
<author>
<name>Wim Van Sebroeck</name>
</author>
<published>2012-06-26T18:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b9468d496abd357cc797b27a79d4402f5e0e94d'/>
<id>urn:sha1:8b9468d496abd357cc797b27a79d4402f5e0e94d</id>
<content type='text'>
In commit 7a87982420e5e126bfefeb42232d1fd92052794e we added
a wrapper for the WDIOC_GETSTATUS ioctl call. The code results
however in a different behaviour: it returns an error if the
driver doesn't support the status operation. This is not
according to the API that says that when we don't support
the status operation, that we just should return a 0 value.
Only when the device isn't there anymore, we should return an
error.

Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Add support for dynamically allocated watchdog_device structs</title>
<updated>2012-05-30T05:55:31Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2012-05-22T09:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e907df32725204d6d2cb79b872529911c8eadcdf'/>
<id>urn:sha1:e907df32725204d6d2cb79b872529911c8eadcdf</id>
<content type='text'>
If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the module is not enough,
even with a drivers module locked, the driver can be unbound from the device,
examples:
1) The root user can unbind it through sysfd
2) The i2c bus master driver being unloaded for an i2c watchdog

I will gladly admit that these are corner cases, but we still need to handle
them correctly.

The fix for this consists of 2 parts:
1) Add ref / unref operations, so that the driver can refcount the struct
   holding the watchdog_device struct and delay freeing it until any
   open filehandles referring to it are closed
2) Most driver operations will do IO on the device and the driver should not
   do any IO on the device after it has been unbound. Rather then letting each
   driver deal with this internally, it is better to ensure at the watchdog
   core level that no operations (other then unref) will get called after
   the driver has called watchdog_unregister_device(). This actually is the
   bulk of this patch.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Add Locking support</title>
<updated>2012-05-30T05:55:23Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2012-05-22T09:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4e9c82f64b524314a390b13d3ba7d483f09258f'/>
<id>urn:sha1:f4e9c82f64b524314a390b13d3ba7d483f09258f</id>
<content type='text'>
This patch fixes some potential multithreading issues, despite only
allowing one process to open the /dev/watchdog device, we can still get
called multiple times at the same time, since a program could be using thread,
or could share the fd after a fork.

This causes 2 potential problems:
1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
   if these 2 race, the watchdog could be stopped while the active
   bit indicates it is running or visa versa.

2) Most watchdog_dev drivers probably assume that only one
   watchdog-op will get called at a time, this is not necessary
   true atm.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: watchdog_dev: Rewrite wrapper code</title>
<updated>2012-05-30T05:55:17Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2012-05-22T09:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a87982420e5e126bfefeb42232d1fd92052794e'/>
<id>urn:sha1:7a87982420e5e126bfefeb42232d1fd92052794e</id>
<content type='text'>
Rewrite and extend the wrapper code so that we can easily introduce
locking (this to be able to prevent potential multithreading issues).

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: use dev_ functions</title>
<updated>2012-05-30T05:54:57Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2012-05-11T10:00:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3dfd6218da4cb9d0eae596581a08de9959aa2b1f'/>
<id>urn:sha1:3dfd6218da4cb9d0eae596581a08de9959aa2b1f</id>
<content type='text'>
While they are registered all our watchdogs now have a valid device object
so we can in turn use that to report problems nicely.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: create all the proper device files</title>
<updated>2012-05-30T05:54:46Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2012-05-11T10:00:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6b469d915ae348b3bb8b25034063d6870ff4a00'/>
<id>urn:sha1:d6b469d915ae348b3bb8b25034063d6870ff4a00</id>
<content type='text'>
Create the watchdog class and it's associated devices.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Add multiple device support</title>
<updated>2012-05-30T05:54:25Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2012-05-10T19:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45f5fed30a6460ec58f159ff297a2974153a97de'/>
<id>urn:sha1:45f5fed30a6460ec58f159ff297a2974153a97de</id>
<content type='text'>
We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc driver layer tweaked for watchdog.

Revised to fix problems noted by Hans de Goede

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: correct the name of the watchdog_core inlude file</title>
<updated>2012-05-30T05:54:03Z</updated>
<author>
<name>Wim Van Sebroeck</name>
</author>
<published>2012-05-21T13:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6cfb5aa836884bcd66e2c5d0a101e97ba78aaafd'/>
<id>urn:sha1:6cfb5aa836884bcd66e2c5d0a101e97ba78aaafd</id>
<content type='text'>
The watchdog_core include file should have been named
watchdog_core.h and not watchdog_dev.h . Correct this.

Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: Add watchdog_active() routine</title>
<updated>2012-05-30T05:53:46Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2012-03-12T04:21:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=257f8c4aae392654d4ab846030b9f4518f16ed32'/>
<id>urn:sha1:257f8c4aae392654d4ab846030b9f4518f16ed32</id>
<content type='text'>
Some watchdog may need to check if watchdog is ACTIVE or not, for example in
their suspend/resume hooks.

This patch adds this routine and changes the core drivers to use it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@st.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
<entry>
<title>watchdog: watchdog_dev: include private header to pickup global symbol prototypes</title>
<updated>2012-05-30T05:53:28Z</updated>
<author>
<name>H Hartley Sweeten</name>
</author>
<published>2012-04-20T20:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09a46e739780aab2eadf47afdefa70c9cd69d83d'/>
<id>urn:sha1:09a46e739780aab2eadf47afdefa70c9cd69d83d</id>
<content type='text'>
Include the private watchdog_dev.h header to pickup the prototypes for the
watchdog_dev_register/unregister functions.

This quiets the following sparse warnings:

warning: symbol 'watchdog_dev_register' was not declared. Should it be static?
warning: symbol 'watchdog_dev_unregister' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
</content>
</entry>
</feed>
