From mboxrd@z Thu Jan 1 00:00:00 1970 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 15CF9C4332F for ; Fri, 4 Nov 2022 14:44:55 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kzXJQG3aDhbyzJMzYNzm66CybWbvmZdCE/gVzoZDb8M=; b=GhPJTO6d1KcZ5v OKjtnITrPS3MI7NP2HNAR3YPf9hvVYA142DzrkfqdT6399fjOPE81Do4g0E8VRWitIFxd04hRyey0 F5k4aly1SiGnB9MTKeynQ8ukJzEOgufXakoGfoT6ipPUMoy0yIkLSke3YCfZ0i9CPPcJghdAhLUn+ Pq0gABZgGfSI4RsdSmjZemMxcqHrm8vWHK4HTb02lJ3EKlDTZyASUfjqNnX1OdEQBwn24yMGX8csy uiChbbFmOx1H+bONX4JB6d90wEKDs0KolQjKiUKfWSrDmyDVOebYDX97Pk+ihcJDUJY9Jebmlh/Uu Piqo3kusvfUIXYfvFVmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqxvD-00448d-EE; Fri, 04 Nov 2022 14:43:51 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqxv9-00447P-G4 for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 14:43:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DFEB4B82E2E; Fri, 4 Nov 2022 14:43:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18450C433C1; Fri, 4 Nov 2022 14:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667573024; bh=UBbkqkVceLOOAXfkK0cOsW2bKaYhwR/pDIEt/9iU3Sw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SML8AXMir9D9NFZrj5BLUfryJLJoZlXJLzxsPjgDTtfXha9tKT+ZNezKaXvoWRB30 8b6BJBtm1hyNNU90UxQ4Wpz/Der716VtsAAuPjeM8FD5vepwjpPH6QV9LuA+RGqSrI UHxphMk9rFS9C6O8Sddr8XPbcUF6lZmOKNcoa3sfdmfK/ZsyDT6mWRRpGH8Pazhrh2 cImPlnuijV+Ac9AtSCPShqkoadseh37DBVi+b+syszZ9HWsa2s1LnlDYgkMkkhKGKu yBgOQGlwM6jV9E1Jh/cSFEa/cOEILR2eSiptQQfod224Y4sDWbR5jyXu1pPt6dUDW8 PBT+AcjxpUyNw== Date: Fri, 4 Nov 2022 20:13:40 +0530 From: Vinod Koul To: Amelie Delaunay Cc: Maxime Coquelin , Alexandre Torgue , dmaengine@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: stm32-dma: fix potential race between pause and resume Message-ID: References: <20221024083611.132588-1-amelie.delaunay@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221024083611.132588-1-amelie.delaunay@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221104_074347_712306_E5AAC1EF X-CRM114-Status: GOOD ( 11.92 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 24-10-22, 10:36, Amelie Delaunay wrote: > When disabling dma channel, a TCF flag is set and as TCIE is enabled, an > interrupt is raised. > On a busy system, the interrupt may have latency and the user can ask for > dmaengine_resume while stm32-dma driver has not yet managed the complete > pause (backup of registers to restore state in resume). > To avoid such a case, instead of waiting the interrupt to backup the > registers, do it just after disabling the channel and discard Transfer > Complete interrupt in case the channel is paused. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel