Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2666594ybv; Mon, 24 Feb 2020 09:17:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwAZiVUw22zG2y1j3/jYyseaFt1FGRBVCKGMDrmh8cdPOj6WYTG1vgG1k7EOuWURQYj8/bx X-Received: by 2002:a9d:2c2:: with SMTP id 60mr41016106otl.208.1582564658799; Mon, 24 Feb 2020 09:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582564658; cv=none; d=google.com; s=arc-20160816; b=vMFWivv/4aNfkzz9WPDc6aXacl7XJ42lluBIJ/zG3ROYS6kbGdvEtrt5azJBMjGqr7 2PV5CKQRYBoi/ZaFMTTgIu906TSUQDA1soclkiznfsJFiLqhZd5bmlvABXae7WPKcZJm FzQrnsQZZE8Ei2wE+FjUgZomf8TcDzEZ0kpFX5mqdtKToGAaSckGJEgeJt0gkrqQVAWZ c4XcbYgSbUWN++6BI9l5owzYI0HigfZvd6IktU55zCpqN/cw8oj50SyIoRpvJ22Y6nGz r7zMPqT2ldIGCqZNCICLA45+/cJwBCbX7H7SvuDXvPZgAhNaZ0fyZQaCozZ9koaF6jUR nxbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=wRkhWyKtXXS52v/6t9JddG7LF5vxwVyMVPjqCYg+Ybc=; b=E/D/CtS6om02pPk34CAcNHWpcdI0aF73DG2HxkWDYDqTNMoAZ16BmJ9fvJKzLigaAK wpQQF8jtDTpBS+KiJ2+D6xJbvY08ClRuL9bFfoytlZ2rn4NBGE5lFLw6/pT6t+pVAMnN BdjmRNvNhHCVJlSs6CTeaLFvwusUYO22LLDQ8vjU59fxJji/wMM3RYKOfewSbFD72JEv /4z4EfW87vgCM+SkI3GhpCJuOH4hQc5xfip2AK8Pp+5YhT5A25P15kqLo9IRfYEjGOjF gd88kqRRFkg12woJhp2HQPAffMzeAmAhUhgXc154Pi8L+dLyWor3pzuiyQXGaTP1Jcx+ eCNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si5438181oif.122.2020.02.24.09.17.26; Mon, 24 Feb 2020 09:17:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727689AbgBXRQE convert rfc822-to-8bit (ORCPT + 99 others); Mon, 24 Feb 2020 12:16:04 -0500 Received: from skedge03.snt-world.com ([91.208.41.68]:42874 "EHLO skedge03.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727090AbgBXRQE (ORCPT ); Mon, 24 Feb 2020 12:16:04 -0500 Received: from sntmail12r.snt-is.com (unknown [10.203.32.182]) (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 AAE8367A7D5; Mon, 24 Feb 2020 18:16:01 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail12r.snt-is.com (10.203.32.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Mon, 24 Feb 2020 18:16:01 +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; Mon, 24 Feb 2020 18:16:01 +0100 From: Schrempf Frieder To: Dan Williams , Fabio Estevam , Linus Walleij , "NXP Linux Team" , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , "Vinod Koul" CC: Schrempf Frieder , "stable@vger.kernel" , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] dma: imx-sdma: Fix the event id check to include RX event for UART6 Thread-Topic: [PATCH] dma: imx-sdma: Fix the event id check to include RX event for UART6 Thread-Index: AQHV6zYWVmd7WYLi20CvYMo8u04O/w== Date: Mon, 24 Feb 2020 17:16:01 +0000 Message-ID: <20200224171531.22204-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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: AAE8367A7D5.A05BA 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, vkoul@kernel.org X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frieder Schrempf On i.MX6 the DMA event 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 Signed-off-by: Frieder Schrempf --- 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); -- 2.17.1