Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1763111pxb; Wed, 9 Feb 2022 04:05:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLfad9IEFoYKDcUNyI9Doz0s5tyUiyBPzwXR7h8QUbY6KOrdJ0hj2lu0v4QvVR+0tYvjy0 X-Received: by 2002:a17:906:490:: with SMTP id f16mr1730474eja.438.1644408318457; Wed, 09 Feb 2022 04:05:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644408318; cv=none; d=google.com; s=arc-20160816; b=ToteAhMd5PLHISwscQjD8Mm1BEHjXvMCp7qIsAGEElp0nW1tVlsnzezkrEAs/0newz arx5Y+H1YaugbUAhkPvwbVXSlLHxyO135kh0rPxi43iF2RsjhDsJmsG4gNf/TJk312/o 4WTKZH3e8jW+8nxh625WnioGK2SvMDdgWwM4h3fIB6qE+sVCbJk0rQEI+eGRCPHdiJ1N Li0JDW+O2+dXY4NiWYuVbNKeF4qOApw6KEymdeEtAFKeO47FuwLA/kD0/eL18uqwp2KG sl0lOvgX7GRuc7HZKOyTZkdBZqC9rmQ9RLzjoDLKYz3y2bQx+xs4PngcVi0GudN36wik mWNA== 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=MqTVO1QEM++JwfiTc8FIywtIxfVf27sozBFnPU4JxCE=; b=oulHnHSjGMg6jYAqOgggPVR5XgRI9LXJYHjFDmAbM2BFdgh0aOXed1sPZyY817U/Ir BwbmnG+cbrwemIjY/G7UsTNGC38AML02tFKqfImgfU9x74pMeT9y3Sa4+ScJ8dwOJLw0 qi6JsU5nHncysxE/l/PVMy5K5JoBkpQHzZuXe5II0SO9GZcw9IWoyrRSFm9hgV15izfg L/cymdwJBW619l/HlYmk4YwiPRNGSRBtQZP99TXf3XvGIXNtcTG7JJ4fuO5QhaM/KMzR QbxivLAS/CbtmMi4BQmQ0+/z0UUBeNm1eRMbiHsF6H6K7t5lAWkQK3Hk7Po9deelzqV5 zASg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kQophlCF; 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 fy1si2916572ejc.779.2022.02.09.04.04.53; Wed, 09 Feb 2022 04:05:18 -0800 (PST) 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=kQophlCF; 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 S1382471AbiBGLTR (ORCPT + 99 others); Mon, 7 Feb 2022 06:19:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357099AbiBGLOK (ORCPT ); Mon, 7 Feb 2022 06:14:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1325BC0401E9; Mon, 7 Feb 2022 03:14:03 -0800 (PST) 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 BE945B811A6; Mon, 7 Feb 2022 11:14:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB838C340F4; Mon, 7 Feb 2022 11:13:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644232440; bh=7oFoEPGzK+bKffKRx947QX+QkBnNxzfsNzoyMVkLe1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQophlCF9eJEyCl8ehtmXaHh6tHdJRXduzQIseF46ypKMO9LgdM1m3u+S3sTT5IXe 2YlhLDqqOoijH6kdYHRt2V9gPaFU9zHcIG/e365gK11eo6RyxhBG8i4pp1fIcwhE3x hhOP2cfOAD7poMn2XPmguqPnafgO0+eFe9+rjf2Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Erwan Le Ray , Valentin Caron Subject: [PATCH 4.19 10/86] serial: stm32: fix software flow control transfer Date: Mon, 7 Feb 2022 12:05:33 +0100 Message-Id: <20220207103757.892670659@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220207103757.550973048@linuxfoundation.org> References: <20220207103757.550973048@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valentin Caron commit 037b91ec7729524107982e36ec4b40f9b174f7a2 upstream. x_char is ignored by stm32_usart_start_tx() when xmit buffer is empty. Fix start_tx condition to allow x_char to be sent. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Cc: stable Signed-off-by: Erwan Le Ray Signed-off-by: Valentin Caron Link: https://lore.kernel.org/r/20220111164441.6178-3-valentin.caron@foss.st.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/stm32-usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -509,7 +509,7 @@ static void stm32_start_tx(struct uart_p { struct circ_buf *xmit = &port->state->xmit; - if (uart_circ_empty(xmit)) + if (uart_circ_empty(xmit) && !port->x_char) return; stm32_transmit_chars(port);