Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4591367pxj; Wed, 12 May 2021 08:50:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYSmHtCDviMRuzb8jDu93txF0nRi2zT8CpiZkpbGyE7J/w8UChArF1Xl4IHzeb/PZzla8w X-Received: by 2002:a05:6402:26d6:: with SMTP id x22mr18673298edd.88.1620834623199; Wed, 12 May 2021 08:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620834623; cv=none; d=google.com; s=arc-20160816; b=JUW8spROx2crPTtMzaWRTMipJgx1X1WAisz6Bryf/jMVwF/3qJPQxPbEGl6Jsmsleo s6Txa4+xLQ0aML1Uj8jVgMaxTJoK/WiDjRzOoUEOu0yGvVI5blAHDw4IZFA2BEz5SXE0 yZULLJNPLS7d/qaUHp0gt+07e98ww/0unEYZhglUU9ND3/TOZ2oCPj1S2n6MPdLxOEBm 4DlihZZ5aj2Ogp5MUwoCBbZgiGRoSu/+N2eeUug/srv2qpSztVp65l52DI+C6K4XPZ47 F5oJ1dS9++1oU+wG8q8r+6zDvPpivKS7s1FpdkzRheZnzRHfsQi18IEgcq1Q6UEAnbuR KDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3WKMrL/8RTsSrS4F7wOy49JgvgmD8CZv7wzP05q05LU=; b=FARyHC1oHUzO3pjCGdYVqhbNpa5L8QrrseqOGmw3/re7AcwJ0W5xNXIGrvEwXD6wYy EDBagOj0p5+SmVkQzZRSo4Fm/91jEi5JR56QZugArQuhIlmeZW+TTAOByED1KpufjTWd BsHOYqqdH26z7MMxXoQ9YoJgib01qHXgo8psZZznKBr6azl/X0drxCVZ7kJePYkw/m32 dm/x5lxeM8Pmz7STOAhPXG2Qsmx2Z/kfb5be/KiIkp86BpBxjSCExVf1X4PiXmGb9fry xGbpz1cOG0cBjHkAlvT9v7vYY/9IAuBDUmiY3JWhJD/wZN/mAnAXdNA7BMEChOMA+RAm J71w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ol7crF6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si267529ejj.296.2021.05.12.08.49.58; Wed, 12 May 2021 08:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ol7crF6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236216AbhELPp1 (ORCPT + 99 others); Wed, 12 May 2021 11:45:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234656AbhELPUR (ORCPT ); Wed, 12 May 2021 11:20:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3DE361444; Wed, 12 May 2021 15:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832094; bh=OHOzOBDV21nnOwDOWDSt1njwUBPU9OcEKDDqfLCjEPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ol7crF6f2r+2poLIN12rvSErsTGLfqSCBHMidQOLKBlAWD1F6EG8u+nClBR3zwh/Q 8EJ6E+uzrJagCUS5IWqx69ryNmIciLKtXvVnWOur1DDkn6y/MZ2eqieVCga7R/FO88 tWLW4sCW/xRvzxDU6MCl94E3ljlobGuDtL8ycvE8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erwan Le Ray , Sasha Levin Subject: [PATCH 5.10 138/530] serial: stm32: fix tx dma completion, release channel Date: Wed, 12 May 2021 16:44:08 +0200 Message-Id: <20210512144824.354025042@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Erwan Le Ray [ Upstream commit fb4f2e04ac13e7c400e6b86afbbd314a5a2a7e8d ] This patch add a proper release of dma channels when completing dma tx. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-9-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/stm32-usart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 44522ddc7e6d..c2d87a8a8fe5 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -291,6 +291,7 @@ static void stm32_usart_tx_dma_complete(void *arg) struct stm32_port *stm32port = to_stm32_port(port); const struct stm32_usart_offsets *ofs = &stm32port->info->ofs; + dmaengine_terminate_async(stm32port->tx_ch); stm32_usart_clr_bits(port, ofs->cr3, USART_CR3_DMAT); stm32port->tx_dma_busy = false; -- 2.30.2