[PATCH] sound/hda: rate-limit timeout message

From: Randy Dunlap (randy_d_dunlap_at_linux.intel.com)
Date: 10/31/05

  • Next message: Pavel Machek: "Re: amd64 bitops fix for -Os"
    Date:	Mon, 31 Oct 2005 13:20:02 -0800
    To: perex@suse.cz, akpm <akpm@osdl.org>
    
    

    From: Randy Dunlap <randy_d_dunlap@linux.intel.com>

    Rate-limit the azx_get_response timeout message.
    A continuous 2 per second is too much.

    Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>

    ---
     sound/pci/hda/hda_intel.c |    5 ++++-
     1 files changed, 4 insertions(+), 1 deletion(-)
    diff -Naurp linux-2614-work/sound/pci/hda/hda_intel.c~hda_rate_limit linux-2614-work/sound/pci/hda/hda_intel.c
    --- linux-2614-work/sound/pci/hda/hda_intel.c~hda_rate_limit	2005-10-27 17:02:08.000000000 -0700
    +++ linux-2614-work/sound/pci/hda/hda_intel.c	2005-10-31 13:11:33.000000000 -0800
    @@ -37,6 +37,7 @@
     #include <asm/io.h>
     #include <linux/delay.h>
     #include <linux/interrupt.h>
    +#include <linux/kernel.h>
     #include <linux/module.h>
     #include <linux/moduleparam.h>
     #include <linux/init.h>
    @@ -508,7 +509,9 @@ static unsigned int azx_get_response(str
     
     	while (chip->rirb.cmds) {
     		if (! --timeout) {
    -			snd_printk(KERN_ERR "azx_get_response timeout\n");
    +			if (printk_ratelimit())
    +				snd_printk(KERN_ERR
    +					"azx_get_response timeout\n");
     			chip->rirb.rp = azx_readb(chip, RIRBWP);
     			chip->rirb.cmds = 0;
     			return -1;
    ---
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Pavel Machek: "Re: amd64 bitops fix for -Os"