From: Kuninori Morimoto Date: Thu, 19 Mar 2015 04:13:47 +0000 (+0000) Subject: ASoC: rsnd: no more SSI restart when unusual situation X-Git-Tag: v4.1-rc1~117^2~1^2~3^4~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=044930b4a69a6c0645b6199bec4f870e0b6e77f4;p=karo-tx-linux.git ASoC: rsnd: no more SSI restart when unusual situation It will be SSI interrupt endless loop f unusual situation happen. This patch adds restart limit for it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index fea4aa53918a..060d3d205250 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -416,11 +416,14 @@ static irqreturn_t rsnd_ssi_interrupt(int irq, void *data) /* * restart SSI */ - rsnd_ssi_stop(mod, priv); - rsnd_ssi_start(mod, priv); - dev_dbg(dev, "%s[%d] restart\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); + + rsnd_ssi_stop(mod, priv); + if (ssi->err < 1024) + rsnd_ssi_start(mod, priv); + else + dev_warn(dev, "no more SSI restart\n"); } rsnd_ssi_record_error(ssi, status);