From patchwork Tue Nov 16 11:20:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12692737 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1B6BC433EF for ; Tue, 16 Nov 2021 11:22: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 70D8F61994 for ; Tue, 16 Nov 2021 11:22:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 70D8F61994 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=1P+QtLpebdEkEKX4tXdvofypaQXJ+Nrgz452C95gGBs=; b=t1KLQG1rOM+0mD S2vGceIklgmetuxMd1TryzzRFm5VGlQ5ib7UPbhaH94pnSiJwkD4RQ7Wr5925531lBNEIF0xQvMYT IVU0et9rK4hqof3UPJBtT1dv4M4gwCsyRNAcljefRFM3M8R2O/us91CChruJLm8inrMnT+p7VnDyo PjC8qHakso5tOwWuOk+n/TsVfOUwsXOR2P7QTY6XLvTMUGWwcRwfsMiTUAY35oafVeRja0erzo5X+ ouFF+rBaq7Zb0dwND9587h6Cdtjw31r6iVbQAigiFA9+PgDKyWMnGblNCWt3gmp1zRZhI9xU+8PrH XSKKb+Z0aQBM7nh1TCVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmwWC-001Nzt-4I; Tue, 16 Nov 2021 11:20:53 +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 1mmwW3-001NyU-Qq for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:20:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637061643; x=1668597643; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=KKV9s2wWkbYBXwDnRmwrOzmBUy6suQwiKl818kfU+yE=; b=tmwhAdef1W7o8UyhCYUm/L1rUu6mQC9FyyNLLAbhJoYL2ZQK4W3JeaDx IOzZnFb+gssy2kTn5LOorRuMMhSd9pvmvQQ1SP1Q+ctG1BlxtWX/7OGe/ Wt+Myt4JEVDwRALT+yrid3IGGN6E8qZxhmVCqEIHdA0rd8Z+nm882X2aw Kn3DiE20blNXhkkpENO5B2D30yAGp79E+kYC+syFt7hwsrZjj5L60MgsK baw/j+OEf/L13LzijBcAqfB3o3r5a8KxWgwnznu8nQ5BibpwWkMBklo6b Jv/pSFX4/LmIlDBRaZbC0hhb8jVjxNtG1trrGFLdRVmhw6XZ+j73HM5z8 g==; IronPort-SDR: gXYL1uHOLXxJlFcZvXDh8U9aCbGTlv/vXAryWf3uO6qgFykYyfoQJ0kOO/6ptI2VHoVoElUvNr rjN4+QFzkWOzBtiWYoHATAWdmdU6Bvk1SQZ0nC8E6OVa3ELBWDeW6O+chcwfrLNPdjF4nG5nrF XRhMRR0gOCi3ocTTias5v8+149/YmVIgO2mloXSUv+gQqozLaoF5CWhy67qLKOwA2kIo5JIWh7 nDpyHit0Vh6fyFDyQ80e3BabYVWO9YphmOMdxl1fXyMMgpTJ93ZF+Kw0eACb2lyOwOleKPK0WF 7pKvtWHZ9bcNgJFzkHDvkbFF X-IronPort-AV: E=Sophos;i="5.87,239,1631602800"; d="scan'208";a="136715909" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Nov 2021 04:20:41 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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; Tue, 16 Nov 2021 04:20:41 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 16 Nov 2021 04:20:38 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH 00/13] dmaengine: at_xdmac: Various fixes Date: Tue, 16 Nov 2021 13:20:23 +0200 Message-ID: <20211116112036.96349-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-20211116_032043_993583_1AA09D20 X-CRM114-Status: GOOD ( 11.33 ) 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. 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 | 30 +++-- 2 files changed, 110 insertions(+), 106 deletions(-)