Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3393321ybv; Tue, 25 Feb 2020 00:25:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwK0cGISvaq5j41ux0LyoGrCx71ncWKeIfX6LhHVbupkfFf7F0oHF7SBxC3yvZPP6p9y6V7 X-Received: by 2002:a9d:20c1:: with SMTP id x59mr45127725ota.286.1582619104338; Tue, 25 Feb 2020 00:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582619104; cv=none; d=google.com; s=arc-20160816; b=AcitwLdFBwkpFV6eeVSO9QXP5sJGmmifqtRpvw4UYsr9muN0vTtirBMB/hedMFK64R y0Z1ft/1xzL+35cqs2eUjSRe1g8tQ0E5OsMX0bCDQdg1rv507kbXoqhxlAIfy+zMNylp Yk5z98Lnr2zSAopMmO6xxe09N++4YwrOvsWRQgoM99SY9Gc6aN9OLqpJg+CDLySj0luL +RvQYAwnf8bY3NfDfPSA+5R+C5KoMkkVElhWaGgniNKL4siYwatjkkS5yI9na4yGZdSQ c65UjR9AGTMI91owvEGwymr1NbaqAIK20bKKQfcuOhGMt9iUOh2gnNIZvLK8x/UtSGFQ 8N1w== 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=8yTnHbHgvYbN/34b9u984ZDefLlYVEq5sTzeyLj1IN8=; b=j1R7q0Elbi6hXgau9BueI/LRUPCi1ZAC9WCsYDaaQOznhY3mbMlX1sn4ya4pAatnCs 1llTnHYQyMcZ/bS9sI4+RnswAYjFqGnIoRmw6sAfvzPdHIiUZDNMlvqZYhMs9aQUogKc rP1sP1rjKiUlen3EEO2NjO1IUyWuijGn19gxmPBZAK/bqFnZDw1KOcc2DcLX0vZGxRZp +vYmBRa+z7i6RQme6X2/KrlBovNkdtJj1Nw3ue4b1xEdNlGPGpYo1U0XNP6vhj18tRrt c3dziOwwCy762zv9R96I2iTPZZm9u/OLQgGYo82PuCJfJvKceCeoW7jq3GT9+oYCK7fJ P7BQ== 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 a12si6031349oie.87.2020.02.25.00.24.51; Tue, 25 Feb 2020 00:25:04 -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 S1729712AbgBYIXX convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Feb 2020 03:23:23 -0500 Received: from skedge03.snt-world.com ([91.208.41.68]:49644 "EHLO skedge03.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729648AbgBYIXX (ORCPT ); Tue, 25 Feb 2020 03:23:23 -0500 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" CC: Schrempf Frieder , "stable@vger.kernel.org" , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" 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 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: 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.17.1