On Sat, 09 Sep 2006 16:25:25 +0100 Alan Cox wrote: > Ar Mer, 2006-09-06 am 12:29 +0200, ysgrifennodd Samuel Tardieu: > > +static unsigned char > > +w83697hg_get_reg(unsigned char reg) > > +{ > > + outb_p(reg, W83697HG_EFIR); > > + return inb_p(W83697HG_EFDR); > > +} > > No kernel level locking anywhere in the driver. Yet you could have two > people accessing it at once. Actually the situation is worse. This driver pokes at SuperIO configuration registers, which are shared by all logical devices of the SuperIO chip. There are other drivers which touch these registers - e.g., drivers/hwmon/w83627hf.c handles the hardware monitor part of this chip; many other hwmon drivers handle other SuperIO devices. Hardware monitor drivers access the SuperIO config during initialization and do not request that port region, therefore loading hwmon drivers when w83697hf_wdt is loaded can lead to conflicts. More places which seem to touch SuperIO config: - drivers/parport/parport_pc.c - drivers/net/irda/nsc-ircc.c - drivers/net/irda/smsc-ircc2.c - drivers/net/irda/via-ircc.h I can find at least two attempts to fix the SuperIO problem: - a SuperIO subsystem proposed by Evgeniy Polyakov (cc'd); - a simple SuperIO locks coordinator proposed by Jim Cromie (also cc'd; http://thread.gmane.org/gmane.linux.drivers.sensors/10052 - can't find actual patches). However, the mainline kernel still does not have anything for proper SuperIO access locking.
Attachment:
pgpuDRFjHLFiY.pgp
Description: PGP signature
- Follow-Ups:
- [RFC-patch 0/3] SuperIO locks coordinator (was: watchdog: add support for w83697hg chip)
- From: Jim Cromie <[email protected]>
- Re: [PATCH] watchdog: add support for w83697hg chip
- From: Wim Van Sebroeck <[email protected]>
- Re: [PATCH] watchdog: add support for w83697hg chip
- From: Evgeniy Polyakov <[email protected]>
- Re: [PATCH] watchdog: add support for w83697hg chip
- From: Samuel Tardieu <[email protected]>
- [RFC-patch 0/3] SuperIO locks coordinator (was: watchdog: add support for w83697hg chip)
- References:
- [PATCH] watchdog: add support for w83697hg chip
- From: Samuel Tardieu <[email protected]>
- Re: [PATCH] watchdog: add support for w83697hg chip
- From: Alan Cox <[email protected]>
- [PATCH] watchdog: add support for w83697hg chip
- Prev by Date: Re: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix
- Next by Date: Re: [PATCH] pktcdvd: added sysfs interface + bio write queue handling fix
- Previous by thread: Re: [PATCH] watchdog: add support for w83697hg chip
- Next by thread: Re: [PATCH] watchdog: add support for w83697hg chip
- Index(es):