From patchwork Thu Nov 25 09:00:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12693605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2BE51C433EF for ; Thu, 25 Nov 2021 09:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=KjwcXgIqegJuYIJAzqmh95ggcz9S0fPS1vDLpHUAZtQ=; b=xRIelM5i9WedH3 zQKuopSX+OcIge16nw2unw/DhF7Iq56WPsxTrC+GmDZev4BGJVB/ICKPJw/JfnyAZVeL0S4B1jH2N CQTYpnr4D6jv/gNjdm2AWN6rW0EK/CPbeJFyHZ//woS+Pgf6tQd/Aoh017ByatB0cyd3tNjHulee6 LEQmfkpEeE+iD6dbkwBVWnTTpYJV7VaNQ8KLlrrGPk69tOl5XsBgNB24XnHTjsvXXlLgl4H6+diFT XWAmfFEEupSp9pJj2EmHGIQrp6G0f1BOjv/xli6MvLbcDfwW514zTRsnibdWbC/au/DTtoiFbIZ6J sN6ejrdcWMeXjD3daHrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqAcS-006nUC-2P; Thu, 25 Nov 2021 09:00:40 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqAcN-006nSt-DF for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 09:00:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637830835; x=1669366835; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yntWQq2s6rENg52cXI2UmyUNFuqMzu+tM7bIw/XQ7wA=; b=dqPBBK3HxdCvePpuaAUfh5Q5sMdrakqdXlPfoRuaT+Rl6WCxkwUUZGb8 c1TGYtcQ4Bhfemf4EWNpjjW7cXUHPxbwHVcKkfwhOlKMnkkzOkVPy49sV LGwEHq8MZVQF/uFdKtKrCcl7AEvL7iSOs6BdR5dNz7PJ2148RBqSciOdS JlBa7IDEPxnZo9UTZvdYqH08uGRLW0r2FyCwg/BV8YZDCg91vgJRF8mfQ a8aoXnAZOyxcUgYciAyBEYOugEk5u+plQYNbWNSG+8W69ygaV/AlqavpA d+KQxAqYr7Xje+ZbqAWqWZOXVksA3XMpRS2EjIlLy658E/Q/09VPD3qMC A==; IronPort-SDR: H4eKI2SZC2nbwsnpXCQzQ1Rndu2kSZ5psdi64tcWeGFA4k6DWjrSmRXFB+Vcl5LMF9TWz4FE2t 1hgro89K5rEjiFa/AvvlUOXNXSzKWX7w8z1VSjxXXIfB+oDL11owqRZm3ppCwnzXEpr5GYlHgV Sc/EfZZCWCPJlHSr1ZDVU3YesAFV9j95n/vDTxLr+3bvXtW8snPxdZxFT93IS7ukAKJP5aCdyc LGDX96PjXgy55gIEmfVLc5fyY71mTuSUVyd+L0NeImY7Jxz4tTj2b8u0an1aS/BNFkdwcxG5H5 U8E6G/IpBOjstFwqYYO3yOTB X-IronPort-AV: E=Sophos;i="5.87,262,1631602800"; d="scan'208";a="137700169" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Nov 2021 02:00:32 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Thu, 25 Nov 2021 02:00:32 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 25 Nov 2021 02:00:29 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH v2 00/13] dmaengine: at_xdmac: Various fixes Date: Thu, 25 Nov 2021 11:00:15 +0200 Message-ID: <20211125090028.786832-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_010035_582602_67999BD1 X-CRM114-Status: GOOD ( 12.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, Tudor Ambarus , mripard@kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Bugs identified when debugging a hang encountered when operating an octal DTR SPI NOR memory. The culprit was the flash, not the DMA driver, so all these bugs are not experienced in real life, they are all theoretical fixes. Nevertheless the bugs are there and I think they should be squashed. If all of you consider that all these are worthy to be applied, I would suggest that all the patches to be taken via an immutable branch of the DMA tree. The serial patches depend on the first patch in the series. The DMA transactions are no longer started at tx_submit() level, but at device_issue_pending() level, as the DMA API requires. The atmel serial driver wrongly assumed that the DMA transactions are started at tx_submit() level and never called dma_async_issue_pending(). Applying first patch, but not the atmel_serial patches will break atmel_serial when using DMA. Tested the serial with DMA on sama5d2_xplained. Tested QSPI with DMA on sama7g5ek. All went well. v2: - drop local chan_rx local variable in patch 3/13, focus just on fixes for now. - collect Richard's Acked-by tag. - add details in the cover letter about what tests were performed. Tudor Ambarus (13): dmaengine: at_xdmac: Don't start transactions at tx_submit level tty: serial: atmel: Check return code of dmaengine_submit() tty: serial: atmel: Call dma_async_issue_pending() dmaengine: at_xdmac: Start transfer for cyclic channels in issue_pending dmaengine: at_xdmac: Print debug message after realeasing the lock dmaengine: at_xdmac: Fix concurrency over chan's completed_cookie dmaengine: at_xdmac: Fix race for the tx desc callback dmaengine: at_xdmac: Move the free desc to the tail of the desc list dmaengine: at_xdmac: Fix concurrency over xfers_list dmaengine: at_xdmac: Remove a level of indentation in at_xdmac_advance_work() dmaengine: at_xdmac: Fix lld view setting dmaengine: at_xdmac: Fix at_xdmac_lld struct definition dmaengine: at_xdmac: Fix race over irq_status drivers/dma/at_xdmac.c | 186 ++++++++++++++---------------- drivers/tty/serial/atmel_serial.c | 14 +++ 2 files changed, 101 insertions(+), 99 deletions(-)