From: Mike Fedyk <mfedyk@matchmail.com>
To: Mehmet Ceyran <mceyran@web.de>
Cc: linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: drivers/sound/i810_audio.c bug and patch
Date: Wed, 3 Sep 2003 18:43:27 -0700 [thread overview]
Message-ID: <20030904014327.GK16361@matchmail.com> (raw)
In-Reply-To: <005d01c37273$88183840$0100a8c0@server1>
On Thu, Sep 04, 2003 at 01:31:40AM +0200, Mehmet Ceyran wrote:
> I found out that the driver gives the sound chip 10 chances to become
> ready and my sound chip fails to do that in time. The following patch
> gives the chip 100 tries instead of 10:
>
> ---8<---
> --- i810_audio.c 2003-09-02 13:58:02.000000000 +0200
> +++ i810_audio.c.new 2003-09-02 13:58:12.000000000 +0200
> @@ -2727,7 +2727,7 @@
> i810_ac97_get(codec, AC97_POWER_CONTROL) &
> ~0x7f00);
>
> /* wait for analog ready */
> - for (i=10; i && ((i810_ac97_get(codec, AC97_POWER_CONTROL) &
> 0xf) != 0xf); i--)
> + for (i=100; i && ((i810_ac97_get(codec, AC97_POWER_CONTROL) &
> 0xf) != 0xf); i--)
> {
> set_current_state(TASK_UNINTERRUPTIBLE);
> schedule_timeout(HZ/20);
> --->8---
>
> Well, why not? The loop will only go through it's body 100 times if the
> hardware is actually not available or corrupt and even in this case the
> whole block won't take much time. It works for me and it should work for
> all the other people using this driver too:
Why busy wait especially when you can sleep 1ms each time and poll less?
next prev parent reply other threads:[~2003-09-04 1:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-03 12:22 Who maintains drivers/sound/i810_audio.c? Mehmet Ceyran
2003-09-03 12:29 ` Marc-Christian Petersen
2003-09-03 23:31 ` drivers/sound/i810_audio.c bug and patch Mehmet Ceyran
2003-09-04 1:43 ` Mike Fedyk [this message]
2003-09-04 2:55 ` AW: " Mehmet Ceyran
2003-09-04 11:01 ` Alan Cox
2003-09-04 17:53 ` Mike Fedyk
2003-09-04 11:01 ` Alan Cox
2003-09-03 15:00 ` Who maintains drivers/sound/i810_audio.c? 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=20030904014327.GK16361@matchmail.com \
--to=mfedyk@matchmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mceyran@web.de \
/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;
as well as URLs for NNTP newsgroup(s).