public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [BUG] unsafe reset in ac97_codec.c
Date: Wed, 04 Feb 2004 16:24:22 -0500	[thread overview]
Message-ID: <40216306.2010602@pobox.com> (raw)
In-Reply-To: <1075822947.5204.506.camel@cearnarfon>

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




  reply	other threads:[~2004-02-04 21:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-03 15:42 [BUG] unsafe reset in ac97_codec.c Liam Girdwood
2004-02-04 21:24 ` Jeff Garzik [this message]
2004-02-05 16:31   ` Liam Girdwood
2004-02-05 17:59     ` Alan Cox
2004-02-26 15:55       ` Liam Girdwood
2004-02-29 18:38         ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40216306.2010602@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=liam.girdwood@wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox