Message ID | 20211011094259.315023-2-amelie.delaunay@foss.st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=0Wma=O7=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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 B2814C433F5 for <linux-arm-kernel@archiver.kernel.org>; Mon, 11 Oct 2021 09:46:25 +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 7F52460F92 for <linux-arm-kernel@archiver.kernel.org>; Mon, 11 Oct 2021 09:46:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F52460F92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zOYQsATZnN0B0Z95e8zwB2F7hPfMC1UqMYuSLGnBLwU=; b=LTMmLGaUn4Q2Mt apQxUOhn/y9fHiwldk4frIZx/rVdJm/62mJPrW0yeyCJbnPcgRAg3N/TjlJuC7wV/sGEfDae3JUGP 3pNNfFQ04Aei22BP9jy0A9cvijRvFgs0S5pFjgSI5Q5NM6dPI72eyB4uA1ZJT0+yTRWRy5UJW0YbR QrlxUG1XIBqnwBkapg0Tr+8HheCM+sNjZ0KY55bqHXz3Uyiy5efhhbH8p4yWdZg7PNhAcKAo9s3S+ 6eE8tLDLscLv3ZaV8AxfoLF1srdDOpSPVv5SYjM8oKYPJ7amLY49R1CKbKYFCA5MbREmNbnMTHDL4 BWtwe85yrXzIwaDxZKQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZrqH-008b5c-Rd; Mon, 11 Oct 2021 09:43:34 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZrpz-008aye-Ex for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 09:43:17 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19B80XNt014101; Mon, 11 Oct 2021 11:43:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=O0JMbw+qIeEBzzCCeApdP+Pra+K3FyzR/Sgp0B/Og3Y=; b=yJh92PjsvkcrAxXt82FJvTDRTmx2ZCBQVD/6/azsCHvrt1UFObw8R2z+rjV/ql+iuYL+ qHBK7DZZd9zlpkwSJ2QxN4XNgat++JHaLDJpIAT8Ji2q4zV7U7N5NqoJiKlcV/kJ2MLp 28+v+zdK8PuOD5GM+3UebymtJpUtMFTmil1dunvGliyykluQ2uHN9OJM85tVfkzkucNq n0Wgo6v37Cj8bTTCh62FXT3yUgo/Mn5bdhr9P+RKA48FM+36aYQOfddVWtJsHDY2rSLu vq/OwMFXP2Z9QqvztOfmJXIyoq9YbgL7smLxz8uLWzqjoXlZy7wXKuFbptBqJN6ZNMO0 BA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bmasq2mxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Oct 2021 11:43:07 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0C96010002A; Mon, 11 Oct 2021 11:43:07 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 019FB21B50C; Mon, 11 Oct 2021 11:43:07 +0200 (CEST) Received: from localhost (10.75.127.47) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 11 Oct 2021 11:43:06 +0200 From: Amelie Delaunay <amelie.delaunay@foss.st.com> To: Vinod Koul <vkoul@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com> CC: <dmaengine@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Amelie Delaunay <amelie.delaunay@foss.st.com>, Pierre-Yves Mordret <pierre-yves.mordret@foss.st.com> Subject: [PATCH 1/3] dmaengine: stm32-dma: mark pending descriptor complete in terminate_all Date: Mon, 11 Oct 2021 11:42:57 +0200 Message-ID: <20211011094259.315023-2-amelie.delaunay@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211011094259.315023-1-amelie.delaunay@foss.st.com> References: <20211011094259.315023-1-amelie.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-11_03,2021-10-07_02,2020-04-07_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_024315_859300_167222B5 X-CRM114-Status: GOOD ( 14.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
dmaengine: stm32-dma: some corner case fixes
|
expand
|
diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 9063c727962e..a5ccf3fa95e0 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -497,6 +497,7 @@ static int stm32_dma_terminate_all(struct dma_chan *c) spin_lock_irqsave(&chan->vchan.lock, flags); if (chan->desc) { + dma_cookie_complete(&chan->desc->vdesc.tx); vchan_terminate_vdesc(&chan->desc->vdesc); if (chan->busy) stm32_dma_stop(chan);
To prevent accidental repeated completion, mark pending descriptor complete in terminate_all. It can be the case when terminate_all is called while no end of transfer interrupt occurs. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> --- drivers/dma/stm32-dma.c | 1 + 1 file changed, 1 insertion(+)