From patchwork Thu Feb 18 08:16:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8347241 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F15FEC0553 for ; Thu, 18 Feb 2016 08:19:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 209D8202A1 for ; Thu, 18 Feb 2016 08:19:30 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8A9CB20384 for ; Thu, 18 Feb 2016 08:19:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 62F72266949; Thu, 18 Feb 2016 09:19:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0D4F82668F3; Thu, 18 Feb 2016 09:18:09 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 44446266931; Thu, 18 Feb 2016 09:18:07 +0100 (CET) Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 6C61E265DD8 for ; Thu, 18 Feb 2016 09:16:08 +0100 (CET) Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie2.idc.renesas.com with ESMTP; 18 Feb 2016 17:16:06 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id E33E94C90D; Thu, 18 Feb 2016 17:16:06 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id D44EC1800A; Thu, 18 Feb 2016 17:16:06 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id CBF6418070; Thu, 18 Feb 2016 17:16:06 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac3.idc.renesas.com with ESMTP id TAJ08607; Thu, 18 Feb 2016 17:16:06 +0900 X-IronPort-AV: E=Sophos;i="5.22,464,1449500400"; d="scan'";a="205897054" Received: from mail-hk2apc01lp0208.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.208]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 18 Feb 2016 17:16:06 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2pkjfRVIbL1g6buPz39H/BYWxFY450jbFxmxF/2ffRU=; b=bnjF2puWnR3m/HRJj75h6w3Po2+k0wZFvCQdUc6PCTtJ1stJ5CL4IGMvtSGH1gjNJaQqjOoktU29dAqRGIBM9d8IcpxbyTkuq0qPwTcMpiw/G+juTw6eVD3QXW0XjiUO8XieBjCM38njA6akePvj3ssUUZ1ZF7jM4frq9RNB80Q= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB1011.apcprd06.prod.outlook.com (10.161.187.28) with Microsoft SMTP Server (TLS) id 15.1.409.15; Thu, 18 Feb 2016 08:16:04 +0000 Message-ID: <87lh6itp2w.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Mark Brown In-Reply-To: <87si0qtp8x.wl%kuninori.morimoto.gx@renesas.com> References: <87si0qtp8x.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Thu, 18 Feb 2016 08:16:04 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0046.jpnprd01.prod.outlook.com (25.164.162.28) To HK2PR06MB1011.apcprd06.prod.outlook.com (25.161.187.28) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1011; 2:sHi1vLgblqLs4U9RzO1DtHoSb6v9y9XkENVC2IzrOxQK1pui070KMml1Efn9qw31tnVjbYYoUr0DfH4nASx31BHrDMLy+XQUHkt+yO+wvoyA7uRV9yGnb5epYzADMWFDFZ4lquVI3ngHd2GFxApIRg==; 3:RsF0z33amJsv2Adhjse+XmXLlAkAbQEEKzmtTbwDTVoHLNHPz1tSIFnOEShDk3psS6DhEgWIvyq6VodpM80W+3YqkDlXnN72RzsBi4scu3LlyVK1mCLR6bEJeMYMrEcP; 25:3rWQPEzoSp2JPZ0p2hBYrqaGP/p4RIG37OiPiVPPVLBs/0OYSchzSq+Wf7t+qL9Uzz2HbjBaXZIEYo9z+yPUD/VuGiSuVwUOuU4/NX6C50v0MaOrCw6gxe/sAkKHDzk40kPj6haeez6V3LWDbf4hMyxyknPFntVsiz0FlIJXI98zilj0t63WkwAznaExzfjX8BgqsifgoROMozJezpdoR0XQfReRJMyQ7bx6cIQXC4WT/OzVtQ/T8Oz+gugf/N1cwlZIa8x1utZetqCRlGwc0W3teeg7FgrvL6ULquDJrIWBX8urSu3nu9yFbd1FUouI X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB1011; X-MS-Office365-Filtering-Correlation-Id: 0e5ce62c-e487-40ab-0d77-08d3383bbf5a X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1011; 20:WOVZTyykWqjZZHQoLqLSqfJDzFmDPjtDA2+4Xj2IPBIrtqI/z3T4kjoiLC8aPVX0fEIV0fXksowTikdMTmS8finTwF3VfSTr0gxMM8nXYz9Xxd03jGzLfxRKGH4roeO1WPCZDAgypUoDsUWlZh0f2Yts1CjXg+9nLWamnbvqDdKf6NcU1mbqidJJKbqa1mEzKisd1Mf3MbBYbrvNLXqJnirFl9hz+Y410mhSYW8Z/Zif/rfevXvGa20GCebjMjqdhRQRSIdht/JQOG9v5BPWJaqJcs2yonteKoRHmP1zlu8hO8KYa8cFFWsWUMT7ImsQCy0h6e3Uwp2mejG2m698q338NoByYXqHqOkD72X4bGCVmyCZkPffeN1k5qcm0Eg7yv0HYoybT0ENmn0EHSqEYzKHurGggmIHYSgeSTQ9RbcyFA5WVD/HWSmmdegygeBIa9Mxov9out1XswQ3WIxgeeUNTP9BlUEhwHjkQJYDflaiXawlvq8+68fMrrqS+grj; 4:y6uqdi9KoMpa0wDjNKDouSmlqNz0BUzMs/SRWGoGlSnsEz0RGcrniMmmwAv02JuLJvIsVVzB3qgzmJv/cMneSn3FtxaetUCVJ3zPEiYaPNYKjStUf36dzv/fIESHYN96ICyxSa+Y7ut9zjirAN0aW6h9pQ7L6fosk+vWZ9FgQVWUBvGF6IAKZBBQFtMF6Q3EHJHKaQ2qxFWv9DuzpgCt3iSLbia1pzFvgGNKjVhZWajuaK/K4oMVfwt1n9xcOFPTRuUMUiuAuVuk3DTDz1zrMfMLhGxfhudsDPS1FW+nXTPUQTTaMC0dw+QDS9T8Viu9tEY82EH4PGBsmO60BrinQQ+ThTsUsice2r/kvFEwmNg1qY9MqtohI2sg+QeNtbC6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:HK2PR06MB1011; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1011; X-Forefront-PRVS: 085634EFF4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(2950100001)(3846002)(5008740100001)(86362001)(47776003)(122386002)(4001350100001)(4326007)(77096005)(50466002)(40100003)(23726003)(1096002)(2906002)(586003)(189998001)(19580405001)(36756003)(53416004)(42186005)(5001960100002)(50986999)(87976001)(92566002)(46406003)(33646002)(19580395003)(229853001)(83506001)(5004730100002)(76176999)(110136002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1011; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1011; 23:IAmfNp+Yg0JxYt0c2mV+hIDRDiprDAf5jl7Kb/T/K0KCygK7lCBcTm2ss5PKwiwBmPgd59GmtWATdrmCsjgSG6MlxTWv+aOixwCV34B1PPgRkwN+y14MHY867pkwf+PP+upGxrKVdOUccE1b3+SIc6nqLIRbwcmwTdiUKTWh0fDSubTgxhN4hxzFRycUCJZqNuZq5txoC8FGiQTSu7yaPkTCSe3pqeXpRO6rOoBpY7xhou4L68w0ffpVkBbJMjVjSigeccMTnyGgVCx1EH1cdj1vswXPxxHKVY5BMdjeck5z4AP2DUX0PFp0IYIqKsdA4L3Feqk9joYvX+M4tS7SN2WbUnQh4HyjWCRM2QPiDf0mNjRqO31NegCbbW1Qu/3ttEPRlgxpBl6yB8lMPeF6kGa8zMiZEujQXOu+c2YvIyBOZpKgO8B+tmVuRy8eHv2JxWDMcap82ncPb8rlJdn7FL5/gRRlWHEfTNEWAeu4zNqnZNaehlZQGqvdSJzJYUv8/utQxQXYmVGP2KgEBQHsmkm0ksdKbZPqEYbNntLljPkrosyYlkZvKlR4pTfySsdaixmSQeXhe3kd3Yb04KGFvgvFzStBBw6I2KRFVvzqDVu9I9cgi3cDW7flRbwWLZHQNRDfaKzcbCH8MKoUNMUWoR5bOGM4DQHlz5rznAto13mWFL6pB5HU59ZdfCpEY/BDRPUO1kfh2809RfPyYVER3DQR0ZUAq6J4w7ZKy7SSGkrVZ5YC9G6TFTEY+StcdrWAuHY6xAjucFn8aaIYXds8YX62J4W/EV0GSkz2QzSC34muDksxhxsf3pNgTcZ/lnr6mmJY+qPLBnnBx61MGET46srYXxQAcZJxK9DJZ126Qaqk4xfTjjcXbH+Un+L0s6ntdcN7d+a+RZOzuPy7mPqfSJOorgvaZKgBiEvAo74YkZ5oAjB808J+I0plL5R7B0jU X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1011; 5:tGQXwKOKN1zQxw+1MXMSS1rP5gfByYqQkAyVbu3G8MXx4XUQ83qztLVlI8itj1kSZ1Y/u3/yAUmpHC82ZCmt/CoTusVUcOqVB0hAby6Le1eJ/QYdob9rnqgitspCL2L0T7nvJZiDULfahatw51VXnw==; 24:v3YK8DLUjIaY4Mv+9Aqo2aqrByq0Ap618UjZSa8Iis3Pair7bTJGWG+Z184PYPK7pMJX2TXohTwDMZLgQVo76nmiwaS37Xo2Gu1f175Uxi0=; 20:7hRBN8GMnyTp0mRuPSjHKCBM5nP9ykBOnSPUgXHLNoHzMxuBlYBFUG/rOc/nmmEEs2x4szvrkLdAv+0QhpeIuJ9dt2koehPlc9Geb7stQlx0VfMlxVdM1a36X+a8fLuirhP3eFr6t6GcND0drxl7Was06sS3gE4Eh8vSBagdYUk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2016 08:16:04.8479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1011 Cc: linux-renesas-soc@vger.kernel.org, Linux-ALSA , Simon , Liam Girdwood Subject: [alsa-devel] [PATCH 05/11] ASoC: rsnd: fixup forever loop bug on SSI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto commit b5b442abd9 ("ASoC: rsnd: add .irq callback") added .irq support, and it cares both parent SSI and normal SSI. But it should care only normal SSI. Otherwise SSI might be forever loop if SSI is used as both parent SSI and normal SSI (= 2 users), and if under/over run error happen. Because irq disable do nothing in such case. This patch solve this issue. Signed-off-by: Kuninori Morimoto --- sound/soc/sh/rcar/ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index c5c4510..90c3f58 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -149,13 +149,12 @@ static int rsnd_ssi_irq(struct rsnd_mod *mod, struct rsnd_priv *priv, int enable) { - struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); u32 val = 0; if (rsnd_is_gen1(priv)) return 0; - if (ssi->usrcnt != 1) + if (rsnd_ssi_is_parent(mod, io)) return 0; if (enable)