diff mbox

[04/10,v3] ASoC: rsnd: no more SSI restart when unusual situation

Message ID 87h9theiap.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kuninori Morimoto March 19, 2015, 4:13 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

It will be SSI interrupt endless loop f unusual situation happen.
This patch adds restart limit for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v2 -> v3

 - no change

 sound/soc/sh/rcar/ssi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Mark Brown March 22, 2015, 6:12 p.m. UTC | #1
On Thu, Mar 19, 2015 at 04:13:47AM +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> It will be SSI interrupt endless loop f unusual situation happen.
> This patch adds restart limit for it.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index fea4aa5..060d3d2 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);