Message ID | 20210219174736.1022-10-erwan.leray@foss.st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=I5U8=HV=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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04EF6C433E0 for <linux-arm-kernel@archiver.kernel.org>; Fri, 19 Feb 2021 17:51:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B2FD964E86 for <linux-arm-kernel@archiver.kernel.org>; Fri, 19 Feb 2021 17:51:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2FD964E86 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=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=cpOXsFuM1c00s4q4CfaQrwlMD8UQ0TMAhVWcyPo01gE=; b=RTTr4JeZyrJt6o+SJ5Wk9Vlk6 UY2Q7b73Vo2APsupsuCkd1FQKrhX92WqKhMrGSETnsuJFVrEdId+ICY9k5y35tqN0c3JkKHRfubqA o4R5wonRzNrs7Lh7985dlEgF/1QUfIlXX29VUt4xwu0cjhTEWfyh2mUibMGnVySJLci36ebCXGGF/ lWpM5kdF7zHNofaEhbmK6rImOo9Hiob57pmdDL+7ASavWY/AjE+X9IQOzfkjW96bpKgpGiw4Yiqwv 4Km+Y1WYNuNPnJo36x8vp5RVibohqbsMdgY+hzaXdap6PfNqOG+LIdvl2/vdjKucVKBQjzq/T1FBa 3LPMUZJvA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lD9tK-0003lP-OT; Fri, 19 Feb 2021 17:48:34 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lD9sc-0003aF-Ta for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2021 17:47:54 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11JHgIIp007922; Fri, 19 Feb 2021 18:47:49 +0100 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-type; s=selector1; bh=5rp77KHJSkNMbv0vgfogbMZVaU4FQ9C+i/WQz+Fhcx4=; b=lAqovFkUlFhM8LXmuGOJXGZhS8AE8h+0lpnosaJOv5T3dDoO6JMTU6O97ikVYkvExVX9 YXuSzSPJc/oMQmsqW8Oq5f1+Q/b2OUAZPXliePb7Jspb2BCXogcOomia5fFHIeCzNwlo eU+PT0abuczU/aiAEstdYykJZKjjeoINfyJtv9+TsKiDlZ5EU8nkaWlLX60xM5TLShft j6o+jsn0EUZnii6bPqufLDQzPbSaixFVUuXdJQJymwqeauiVf/Mcw6Hw17v9T+HtWirJ KZv/GPRyySuzjEpvpJV1Cb+iVcL4jf+UyTF4irnxJNS4yVH+I3QMWRHXUr1wRYIUtbky FA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36sqadhax8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Feb 2021 18:47:49 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E922010002A; Fri, 19 Feb 2021 18:47:48 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DD8EB25F3FC; Fri, 19 Feb 2021 18:47:48 +0100 (CET) Received: from localhost (10.75.127.47) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 19 Feb 2021 18:47:48 +0100 From: Erwan Le Ray <erwan.leray@foss.st.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jslaby@suse.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com> Subject: [PATCH 09/13] serial: stm32: call stm32_transmit_chars locked Date: Fri, 19 Feb 2021 18:47:32 +0100 Message-ID: <20210219174736.1022-10-erwan.leray@foss.st.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219174736.1022-1-erwan.leray@foss.st.com> References: <20210219174736.1022-1-erwan.leray@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-19_08:2021-02-18, 2021-02-19 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210219_124751_227963_97D9E3F4 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 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> Cc: Valentin Caron <valentin.caron@foss.st.com>, Erwan Le Ray <erwan.leray@foss.st.com>, linux-kernel@vger.kernel.org, Fabrice Gasnier <fabrice.gasnier@foss.st.com>, linux-serial@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org 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 |
stm32 usart various fixes
|
expand
|
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 7da16d468b84..bdd7ca490021 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -291,13 +291,16 @@ static void stm32_usart_tx_dma_complete(void *arg) struct uart_port *port = arg; struct stm32_port *stm32port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32port->info->ofs; + unsigned long flags; dmaengine_terminate_async(stm32port->tx_ch); stm32_usart_clr_bits(port, ofs->cr3, USART_CR3_DMAT); stm32port->tx_dma_busy = false; /* Let's see if we have pending data to send */ + spin_lock_irqsave(&port->lock, flags); stm32_usart_transmit_chars(port); + spin_unlock_irqrestore(&port->lock, flags); } static void stm32_usart_tx_interrupt_enable(struct uart_port *port)