mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Pavel Machek <pavel@suse.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	alsa-devel@alsa-project.org, Andrew Morton <akpm@osdl.org>
Subject: Re: 2.6.18: hda_intel: azx_get_response timeout, switching to single_cmd mode...
Date: Wed, 04 Oct 2006 21:04:04 +0200	[thread overview]
Message-ID: <s5hpsd7j42j.wl%tiwai@suse.de> (raw)
In-Reply-To: <4523D041.8000400@goop.org>

At Wed, 04 Oct 2006 08:16:17 -0700,
Jeremy Fitzhardinge wrote:
> 
> Takashi Iwai wrote:
> > At least, you have to see a different kernel message after the
> > patch...  Could you confirm it?
> >   
> 
> No, it looks like the same message as ever:
> 
>     hda_intel: azx_get_response timeout, switching to polling mode...
>     hda_intel: azx_get_response timeout, switching to single_cmd mode...

A counter of RIRB pending commands could overflow the size of RIRB 
when a bunch of commands are sent but not synced.  This may lead to
the azx_get_response error, theoretically.

Could you apply the patch below and check what values are shown there?


thanks,

Takashi

diff -r 4963791e6192 sound/pci/hda/hda_intel.c
--- a/sound/pci/hda/hda_intel.c	Wed Oct 04 18:38:16 2006 +0200
+++ b/sound/pci/hda/hda_intel.c	Wed Oct 04 20:59:57 2006 +0200
@@ -325,6 +325,7 @@ struct azx {
 	/* CORB/RIRB */
 	struct azx_rb corb;
 	struct azx_rb rirb;
+	int max_rirb_cmds;
 
 	/* BDL, CORB/RIRB and position buffers */
 	struct snd_dma_buffer bdl;
@@ -480,6 +481,8 @@ static int azx_corb_send_cmd(struct hda_
 
 	spin_lock_irq(&chip->reg_lock);
 	chip->rirb.cmds++;
+	if (chip->rirb.cmds > chip->max_rirb_cmds)
+		chip->max_rirb_cmds = chip->rirb.cmds;
 	chip->corb.buf[wp] = cpu_to_le32(val);
 	azx_writel(chip, CORBWP, wp);
 	spin_unlock_irq(&chip->reg_lock);
@@ -538,12 +541,16 @@ static unsigned int azx_rirb_get_respons
 	if (!chip->polling_mode) {
 		snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, "
 			   "switching to polling mode...\n");
+		snd_printk(KERN_WARNING "           RIRB pending = %d, peak = %d\n",
+			   chip->rirb.cmds, chip->max_rirb_cmds);
 		chip->polling_mode = 1;
 		goto again;
 	}
 
 	snd_printk(KERN_ERR "hda_intel: azx_get_response timeout, "
 		   "switching to single_cmd mode...\n");
+	snd_printk(KERN_ERR "           RIRB pending = %d, peak = %d\n",
+		   chip->rirb.cmds, chip->max_rirb_cmds);
 	chip->rirb.rp = azx_readb(chip, RIRBWP);
 	chip->rirb.cmds = 0;
 	/* switch to single_cmd mode */

  parent reply	other threads:[~2006-10-04 19:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-25 19:58 Jeremy Fitzhardinge
2006-09-25 20:26 ` Pavel Machek
2006-09-26  1:12   ` Michael Clark
2006-09-26  1:15   ` Jeremy Fitzhardinge
2006-09-26 10:16 ` Takashi Iwai
2006-09-26 15:37   ` Randy Dunlap
2006-09-26 15:48     ` Takashi Iwai
2006-09-26 15:56       ` Randy Dunlap
2006-09-26 16:09         ` Takashi Iwai
2006-09-26 16:31   ` Andrew Morton
2006-09-26 16:42     ` Takashi Iwai
2006-10-01  6:03   ` Jeremy Fitzhardinge
2006-10-04  9:21     ` Takashi Iwai
2006-10-04 15:16       ` Jeremy Fitzhardinge
2006-10-04 15:38         ` Takashi Iwai
2006-10-04 19:04         ` Takashi Iwai [this message]
2006-10-04 20:07           ` Jeremy Fitzhardinge
2006-10-05  9:58             ` Takashi Iwai
2006-10-28  5:07     ` 2.6.18: hda_intel:azx_get_response " Shai Peretz
2006-10-04 13:57 ` 2.6.18: hda_intel: azx_get_response " Tomasz Torcz
2006-10-04 15:16   ` Jeremy Fitzhardinge

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=s5hpsd7j42j.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@osdl.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®