From patchwork Tue Jun 19 16:56:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10473823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FCEE60230 for ; Tue, 19 Jun 2018 09:00:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EF0328B61 for ; Tue, 19 Jun 2018 09:00:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2182C28B6A; Tue, 19 Jun 2018 09:00:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DATE_IN_FUTURE_06_12, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8818F28B64 for ; Tue, 19 Jun 2018 09:00:47 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=O8efw/H4B7WZRQMCwGSFpSXsjDuKoO1sv+iHR35AF0E=; b=uRv8oP3s6zTyv6 /uyJ58Hg6WueemGdjQsXmsNObeiaXUrAXgLMol6c4FL4sN9vtQYm5QxujiPt3muCBLdirtUGFo8w3 URBAREh1J0OT/kemU/t4etAkQJIMtSmSdM2nuJhOLMDg3Jvv1WSnQ6zA+/rIxcP33CFiFPoJnot49 ZMkCPqbFAhYFO7/DIsgcW0eHGk8ZY+UTMAG1vp+uSzgxfJXjLiI/S14+qnhI8Aj/0b6c8Nd2aTFtm HKCmbKbwEzZFzJe+AzRhN1ntfYk5FrI2EWyjinHjWkoZI+jRQNj5z2fGQQ4kSUY7yxg9jF9+/EXyv TZi23STY6IeZ6j1pvZBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVCVC-0007aq-0O; Tue, 19 Jun 2018 09:00:38 +0000 Received: from mail-he1eur01on0084.outbound.protection.outlook.com ([104.47.0.84] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVCT6-0004me-8h for linux-arm-kernel@lists.infradead.org; Tue, 19 Jun 2018 08:58:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N1lbTXjQFvlybmaLu0QO7GawFMybVJDj5XrMowiJ21I=; b=R89bN1JnUtD+XX1dwqXt7OP5NE5sePNlsQdxLvEq06m9z6YDDOTKpzmfUqRSkvEGXDB92k6WBlaQJC/WTVPPHqmpTa+h/0b9mcSGV5w9JEswIHDOpndsWuHLjh07vkFmyvq2ZU/4d3cB7Z7RhQFBfUNNDNkmoxzdo/+B1igWx1U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by VI1PR04MB3231.eurprd04.prod.outlook.com (2603:10a6:802:6::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Tue, 19 Jun 2018 08:57:52 +0000 From: Robin Gong To: vkoul@kernel.org, s.hauer@pengutronix.de, l.stach@pengutronix.de, dan.j.williams@intel.com, gregkh@linuxfoundation.org, jslaby@suse.com Subject: [PATCH v5 1/7] tty: serial: imx: correct dma cookie status Date: Wed, 20 Jun 2018 00:56:58 +0800 Message-Id: <1529427424-12321-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529427424-12321-1-git-send-email-yibin.gong@nxp.com> References: <1529427424-12321-1-git-send-email-yibin.gong@nxp.com> MIME-Version: 1.0 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK0PR03CA0073.apcprd03.prod.outlook.com (2603:1096:203:72::13) To VI1PR04MB3231.eurprd04.prod.outlook.com (2603:10a6:802:6::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ceedd419-0d52-40ed-2290-08d5d5c2bfdc X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB3231; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB3231; 3:F8Rg4LOVN5QvVAvC3FeLsze/fqI0xp5EMtC+uslrCSHxEi33SHw/rBGPVM1BUL7ESajEzG+d1lDzev93dWEfk6qQnmjeOQEuqqqbwpwnbNnx4rYdb6fQcSOqzOoyRbIgfePl1z2lsg2ffkT33t2bSoZojjA4qU4AsX3iPES4AABWL33IRoUHobAc9RNRfUigifPTv9VOVPjNgNl1d3GqM2GpNmZJGHpgE2XQhohGOTMdGFVdFqm1d2JzACIRcCEc; 25:cX+1xnZHI0jO57WSq6MpNngMCYg7ft+AB1F8/ye52e7T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aqEdxxJJKlCH6XylZ1Eqrp1XyGENDVrVN; 4:I2zWt2EC6zNKKvo7fPt6GQ3NWP2pAhB9dtYpg+uAeSp/p6OXGx7EMXE91JxQt+wMLCTH1JlOA07AvxRPXoLg/jvQjOU1gNBQHT1rGvZrjBKgE3Pzg2CydFeQIB7561LpD6fIMRy+4bsUVL+KYOxoKVs05a1t4BLsA+3BERbxNpDoyDNFNbRZRkVAI+uhevVpaIZpigO+spvX6fs5bf7rD++x4fU0cjf4+uv+fvlSwS2gna7NgzIzQhU6V7bXbXYs9NzCnw3dikvsnK7kwq50NGyTsOXOqUfxk8o+LwECNs+m1svZQ22/8UpgHDDqsevP X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR04MB3231; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB3231; X-Forefront-PRVS: 07083FF734 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(346002)(376002)(396003)(366004)(199004)(189003)(53936002)(6512007)(5660300001)(478600001)(386003)(6506007)(59450400001)(26005)(52116002)(4326008)(25786009)(97736004)(51416003)(76176011)(68736007)(47776003)(86362001)(66066001)(7416002)(105586002)(36756003)(50466002)(6486002)(48376002)(106356001)(316002)(11346002)(446003)(476003)(186003)(16526019)(2616005)(956004)(486006)(81156014)(8936002)(2906002)(3846002)(305945005)(6116002)(50226002)(7736002)(8676002)(16586007)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB3231; H:robin-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR04MB3231; 23:Nd81qS/OScZ6MYz8KNeQ2mlZzVQ1+G3lJ9bQW6iok?= =?us-ascii?Q?wMGeXwctDKgk5rR84NeiRQX2fOQAgKVgu13YgP9VxhNfjQTdebL/gCMNB9zi?= =?us-ascii?Q?bCemm36T1NAB1djxhG4rZyNjfQ6M7OLHaQUtj2anirP1qSgZUiBoTdFPgW5E?= =?us-ascii?Q?VAiN78wYECxrIwZqWjq3b5D5WD+EHR6Sx4UWZLZsbEmoEeKmC5kCGkOr6v5m?= =?us-ascii?Q?PkXDoidUZCYB9PQrI4r9XAyB+s7wvVeGRq5rtLzImx3LsF6uwnGM1FcjilI6?= =?us-ascii?Q?SQg6SoMvfC8sORIPagQ9S+ihU/x8OjPbYVDNRt7ANJl41gpMnZivue5mAneW?= =?us-ascii?Q?ywD8jvfkfyftVmPidLrQU9aHN61rL4ZK++CSVaadJWfQijWSqPeZJDcO608x?= =?us-ascii?Q?Udj8uRls9GI/rAi3lHF5is0CAHWSyFJDscUezxw8i8DomdYE0q5HYiTnAfnd?= =?us-ascii?Q?qdwDGYT/fduUFoDIPMrqgVgCp+U4NaDNSVSfnNTKrlXo13Sf/TPdV7Cjmwfo?= =?us-ascii?Q?kmoONeAl9ikMpc9aXLuR21gTzJq3Rucv25DOsJVFBwOyBvcuvPPEKKVZaAL2?= =?us-ascii?Q?V0V57rK7lpAeIw/TtXbq221A/xcFj6/aPilSf048D1HyhJIAc//WTG4az3PD?= =?us-ascii?Q?+aUPKhMSf4dKk8ehB6DCdDxAX5VxQu6yP7O4nJ1TIVMZmeXCrGbp8dkVieL7?= =?us-ascii?Q?0LQM0IeNaFHqxQfb1fSKcnWZjFYLPJk4svyxC/4KFwUOeZuxEjXDH6VMYNEU?= =?us-ascii?Q?AjetE84V2Fh/WKyutl9AjDKMUWPCeqnkdwab0pUIGPW24hkGkPxO3FHNots2?= =?us-ascii?Q?B1zpdwIMst8+pi6s02FdKHsHgWLu5DGyzEQSVAI3/mOSMthvLbtu+MSEfp7L?= =?us-ascii?Q?VQC8Gu0UAy/HORVvoT5kd/mE+rXDE2MBzPjkcX7VfvFSUyWeBka1hXy/VicM?= =?us-ascii?Q?snhonox0BW9Rgjq2cvF/90aFvi1b2bqENLSPIF61ZDzhx5fCOJP/WC1UIkRF?= =?us-ascii?Q?Ie3nqDmnAUOhjtSIKBejjthc10WwkZg+5XrUapnQDBEIPyhMaT64XwRz3GSI?= =?us-ascii?Q?XGRa2YvyJm935Z6CFBnA/j5M32t/OE1DfnVWdj7pUI4aX1udQNoX5trvAV1e?= =?us-ascii?Q?QTMqpnPmSyx6/XWneF0NeBip5NMie8AHLFq2CHCdb0qxQRvcBK2e+PzyGSRD?= =?us-ascii?Q?QJ6HOu9NpiWrEE=3D?= X-Microsoft-Antispam-Message-Info: WxRu5yTOgS1tnii37JOMuqzGUs9wNvT5Icl1opOviivpCO5+4JcDsiePDcDAxjxzu8pxc4XjUJRKVPNjwVsuee9oreg2POjif59peyWUsPheRow4A0sjlzH6jP9uvyekP7GUscCcShghHhAvybFDq0V/2qQnU7xQ5wxBKy5SnYd7Uu5WHSJURQjNdXpBuKfru0k+ZTmPzp2o45BJoZ44z3V2mibV0HG9yP3vlLcITx01PSoMFmz3kGjUVntiNwp14BPeBnYVawrEUIHRNWo6J62jVHwUmyUDPTFysGpuR9IMvZkki+OCUoL+g0VE98kz X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB3231; 6:/I91WX6BlKmZLBROTXm6gsXfhs/cr1F/OOaYv6Fuu+y8nBqw81GCcwHXlHu3kMkC4deM+F0or2OfeZuZ+zIJ15j8sEnejpM65qvzZrZphVYpPrpC+QVfZ36IGB5YthDFPGh6on4/y3/AkmxGKGXsS1CW6j9dp4u10MVvLb8cCq5YIClz/9zvlQ1cXSz7BrWpigoNoLjsU088ZVGKLpQ/Y4CLo7tEOA5Q+aApsho3mfBDtCKZUG044p4Qp7oFKppq2tJQUHBYTlNvG5cM70KFUAj+NK7D5QpUhrh7zvEst2oKxJq7CG89LbWvuAZaTgInyHeZyjmpj+Uvp4VA5Zus3xDU6q5Sor98Zsr8B56nClkI4sV+j0odo0dT+DQi8gqdWnN7kTEUN7CIJ2NSlVVho1iMK0BRTScrqzHgRbQ/JxbJA5hGjcnY0xUQ/wQGEA8CRsSgFekK53IAvxj0dHCVIA==; 5:QZQTfFalDcyPlv43DMHfuUZpAmCi8Y8HEIxypthVupsIo4E92Kkd2pkFhQUa4kzVQNGewlsWijmzGZBDqFUw71sk+pP3vPqbpGrIrVvB1mMlf5PtB1BOzho/c7Vw62icqlGDK1RgVTQzjyuSAPmVfMawXZJc5/Vho03lAxVPmrA=; 24:8K+DWktC1HGa/n8DIcCCtvi7LbcFpa9n0Sde8/FPzUgJEdhHgQeG03t+0WE7cvOMRhEGaTdWqXSDk8e6CR9sXbHFw+tcswDLFI6mNHCIjLs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB3231; 7:3YJtbdnaLcwwIlwI1Zz2GIbjmXKmHk4DWGNsGrh6ZQF6c2zlv0qKrfuW8B47BK89HpeMJXdtkqFdki4OKA/jAnWJxUqXL5JepJtvRxGd/PvfXllTRgMfTl2U5OAJbvv8Zz9OuStCfQNQ+yZR7N81pX21A+/zjWyuiVBb9OIpgvVZz9dUIhLDtZRkQKYUUdooS1lx0uicxQhshVSgv13zwMlsFVnzlBddkivmtyzk7WNVOleOvU0i2THTIWz69OfH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2018 08:57:52.5524 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ceedd419-0d52-40ed-2290-08d5d5c2bfdc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3231 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180619_015828_568214_2BF3CA6D X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, 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 X-Virus-Scanned: ClamAV using ClamSMTP Correct to check the right rx dma cookie status in spit of it works because only one cookie is running in the current sdma. But it will not once sdma driver support multi cookies running based on virt-dma. Signed-off-by: Robin Gong Acked-by: Uwe Kleine-König --- drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 4e85357..2879407 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1051,7 +1051,7 @@ static void imx_uart_dma_rx_callback(void *data) unsigned int r_bytes; unsigned int bd_size; - status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state); + status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { imx_uart_clear_rx_errors(sport);