Re: [BUG] unsafe reset in ac97_codec.c

From: Jeff Garzik
Date: Wed Feb 04 2004 - 16:37:19 EST


Liam Girdwood wrote:
/* probing AC97 codec, AC97 2.0 says that bit 15 of register 0x00
(reset) should * be read zero.
*
* FIXME: is the following comment outdated? -jgarzik * Probing of AC97 in this way is not reliable, it is not even SAFE !!
*/
codec->codec_write(codec, AC97_RESET, 0L);


IMO, this is unsafe because it can also reset the codec into it's
default power state which can be "power down". This is not normally a
problem for PC's, but some battery powered devices have the default
codec state as "power down" to conserve power.

Was this introduced as a workaround for some buggy device ?
If no one objects I'll submit a patch.


In general it's important for Linux to be able to reset a device reliable. Where in Other Operating Systems one must reboot the computer, Linux users can just re-load the driver quite often.

So I think there are two comments here:

* I can certainly see -probing- being unreliable (but not necessarily reset)

* If the default state for some devices is power-down, the driver should be aware of that -anyway-, and we should power up on startup or on-demand.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/