From patchwork Tue Feb 25 08:23:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 11402819 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C9F713A4 for ; Tue, 25 Feb 2020 08:23:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF6B721744 for ; Tue, 25 Feb 2020 08:23:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jzS5FcCb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF6B721744 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kontron.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aRAOwscUfVl0S2Kik/O6ZXHjMay+n4n6T0OU+GfJXBY=; b=jzS5FcCbnegVgx B67Tyd4tbTVy3ADAB6Guw/vAxXTVbEB0V1oIR2TSG0oCk1sX9XQWzfR+78TUqyNke3G5Qm+5VL4+w B8Db0pbdm2YrzCR+NMIZp4cl7ePWgH3gmR4wEUysuIVj9mPx+APwTXqVVeQdkW3AnohyXNjCAubgQ b5W4nUAMQ6+MJFhKvlzRky5tJfoDtGOEAJZKHwStugAtME0R3KynBM4oCQbzkjHVkZI32fjGJnWYB LKTtjDUVVFHKY9w+XuUFWoM/DQ01Aj9fO7aO+bAg512FxSlbJ0rtowJ8wvQ1jSikyq0eWcBCVxdWM g8My+r2MKv1tGZ/xsAGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6VUz-0006N7-Ut; Tue, 25 Feb 2020 08:23:25 +0000 Received: from skedge03.snt-world.com ([91.208.41.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6VUx-0006Mc-FH for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 08:23:25 +0000 Received: from sntmail14r.snt-is.com (unknown [10.203.32.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge03.snt-world.com (Postfix) with ESMTPS id 8458367A7D5; Tue, 25 Feb 2020 09:23:20 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail14r.snt-is.com (10.203.32.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 25 Feb 2020 09:23:20 +0100 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%3]) with mapi id 15.01.1913.005; Tue, 25 Feb 2020 09:23:20 +0100 From: Schrempf Frieder To: Dan Williams , Fabio Estevam , Linus Walleij , "NXP Linux Team" , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , "Vinod Koul" Subject: [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 Thread-Topic: [PATCH v2] dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 Thread-Index: AQHV67TW1CT++vzAE0CZMa71bI30KA== Date: Tue, 25 Feb 2020 08:23:20 +0000 Message-ID: <20200225082139.7646-1-frieder.schrempf@kontron.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-originating-ip: [172.25.9.193] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 8458367A7D5.ADFDA X-SnT-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: dan.j.williams@intel.com, dmaengine@vger.kernel.org, festevam@gmail.com, kernel@pengutronix.de, linus.ml.walleij@gmail.com, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org, stable@vger.kernel.org, vkoul@kernel.org X-Spam-Status: No X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_002323_836646_49010DC7 X-CRM114-Status: GOOD ( 12.46 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [91.208.41.68 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "dmaengine@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Schrempf Frieder , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Frieder Schrempf On i.MX6UL/ULL and i.MX6SX the DMA event id for the RX channel of UART6 is '0'. To fix the broken DMA support for UART6, we change the check for event_id0 to include '0' as a valid id. Fixes: 1ec1e82f2510 ("dmaengine: Add Freescale i.MX SDMA support") Cc: stable@vger.kernel.org Signed-off-by: Frieder Schrempf Reviewed-by: Fabio Estevam --- Changes in v2: * Be more specific about the affected SoCs in the commit message * Fix the prefix in the subject to 'dmaengine' * Add Fabio's R-b tag --- drivers/dma/imx-sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 066b21a32232..3d4aac97b1fc 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1331,7 +1331,7 @@ static void sdma_free_chan_resources(struct dma_chan *chan) sdma_channel_synchronize(chan); - if (sdmac->event_id0) + if (sdmac->event_id0 >= 0) sdma_event_disable(sdmac, sdmac->event_id0); if (sdmac->event_id1) sdma_event_disable(sdmac, sdmac->event_id1); @@ -1631,7 +1631,7 @@ static int sdma_config(struct dma_chan *chan, memcpy(&sdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg)); /* Set ENBLn earlier to make sure dma request triggered after that */ - if (sdmac->event_id0) { + if (sdmac->event_id0 >= 0) { if (sdmac->event_id0 >= sdmac->sdma->drvdata->num_events) return -EINVAL; sdma_event_enable(sdmac, sdmac->event_id0);