Message ID | 20240225151426.1342285-2-jonas.gorski@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1619361dyb; Sun, 25 Feb 2024 07:15:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXtWfJnnxA8LdAiZ7yBGBvPCY7B54fa3vMv5P9j1PR2a0NLZc2S3uvxyUcqr1G8AXAxrJylQi/gLcKDiacmQOhCgN+IEQ== X-Google-Smtp-Source: AGHT+IFQAqx1qJsJv1vQSEbX6dny56JbKyRJgu2lKp1RqBwGW5pEEgyaKCikzSvIwPo/7CdusyHe X-Received: by 2002:a17:906:4c55:b0:a43:34ef:6752 with SMTP id d21-20020a1709064c5500b00a4334ef6752mr837451ejw.32.1708874110024; Sun, 25 Feb 2024 07:15:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708874110; cv=pass; d=google.com; s=arc-20160816; b=OBPPBpJFKfEKueQIFQLI9/3zY9uS7P8LJcDZzbY9ziLkpJG0HeW0x54+AUI3uOhx32 Xr8vVaLBOTqio6Py8g7eJ1UPmn4LmB9tBnr95QOKTQ5UP73MyhOJHlYnMpPcwm3sVxKR SZKYRWLDO1dkaMAc+OL0WwqsZgu5+M/ymLC5XrlmAfmQl8onhwjUIDUBWxHg3ydzVNbe qrFdQ6aZf70GbZ9jjVgtodJY+yeo1R6gtGochVBoO0sfHHwHU6FUYh6uk8jt6du+TgfQ zBkvnsEGoAySuBu5A7SZWBRSjwPXwi2uLH7RJEnXrjBI3gOeurz2R4tWasUN1BmTxty3 6LaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2cKFGsI4XaMR+5dCCv63udFhft6EyPcLc+uriJaHY5I=; fh=5tY5KQ2/MV5kpr/qPWNWRWqXyYi+1RFAjZc0nEP50aI=; b=zjm4m/A4bYuY03G8EjFZie1eS+DjaLQ8sWQqpzeB4zfRySI1+ew+WjD3owviofo3Al GO6/wCe13Yee8RgFZCyy9wYSq0N3aODXF+2NRz2qKIpzbRMUNKbr3S94QJl73RSkd+Wb 7WBk25Uh2X/FLKpxy5GV8+6aQoDVuGIPxl9l/5DchExX6/LXjOoLd4hph3IGu/L3Se+G Qr1eQHIX5Rt7bqEJwkcFDAnBkG+cGbkPIDn+3fIIk5QgA3otCPgZCdu87hBamDDznGQG kuln0zowY9nMNwYomYdRapOaHIRtN/c4iH0nTnln4Kful976z51hw5f7ftYa6r2/dh8v eo7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XVJebiD7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m10-20020a170906580a00b00a3eb3e3d3e3si1305082ejq.1046.2024.02.25.07.15.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 07:15:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XVJebiD7; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80127-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 770781F21881 for <ouuuleilei@gmail.com>; Sun, 25 Feb 2024 15:15:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A22A13FFC; Sun, 25 Feb 2024 15:14:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XVJebiD7" Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 754E91401C; Sun, 25 Feb 2024 15:14:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708874081; cv=none; b=GQ/FSUCnnh2vhMM7G12q+vXbjua5Z8QbxmkLwLpEGjER2NB9MFs1vcmTwharFMM4sHIh/XSymvAdl7KEXRxd5thKPrKOmWoZ4US0Z8jaGJgZls2m98tnwvBmbdR9VVSpueisj9LfoXpxkRVEYWqC5iqNtlsjBGbsQCgUqFEEbQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708874081; c=relaxed/simple; bh=vIKsCCNlA2ZnRDQ7xikBE41S9NfcNPFJ+Cbs46XztqI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZENuaMqGzWov/Br7eMVyA4jwE8PHy5L2+4YgHuPUV0CzRhqks1Ir52lNCd2DKX9RwiDYzIBfNI2AQS81dPVwUnie/FHt2QRdQUnEJPj9w4/oX/vTFmWeF8TqhIiZqHOEsfjwj4JV/cV15qiXtZmmDc58bV6eGsD9541GcdGFfkg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XVJebiD7; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-512f5484a37so1008275e87.3; Sun, 25 Feb 2024 07:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708874078; x=1709478878; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2cKFGsI4XaMR+5dCCv63udFhft6EyPcLc+uriJaHY5I=; b=XVJebiD7gImTK7SWDWL9v/+e/XbP5aRrhrAW8n3gkZvkCYklukgyeznp7iMVgBqnrX 4k4O1zGikO2JpIr2JXJ6ncabFH7C0EEnj/QRpkFAA1i2NxdlE4sH+5eckssFeyeKaqNw mF8xfOf/Q89LCYPN/LQEtecDknfgQU0UMCflXUYjPAG1aPKdUKqdlb1isTbPyo02TBK9 ZugY/gBfC6RcpIk1JinYFM8vwUwFRZ5+4zkBPIG9EfTSkFbd9XqpKjQZCj7Tg4XVuuFA hZbUbF0K78yYlXK6f918DxIHIdVIb2VAbkY+/rLRX9wcbgvWUimqDADx3jDfuHpeyTHn g7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708874078; x=1709478878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2cKFGsI4XaMR+5dCCv63udFhft6EyPcLc+uriJaHY5I=; b=O32xYAjOFSLRVGHQxTCS/Yb8Zw9lS01uAjAl/8tPc90TB0bZUKh7uXI4L2BJ186Xt+ /MF5xZDABrR3/4RgW+2hVw268PNyaPQwzooEvai0ipw1gFRbpChkl1A9QJD4XexdOdHl EkJ7z//gXqIMrY/hJGZXfm6CYr7kruOdpRCcXK6S0LXnVYq+HeB4U+IC9otbNd/r891t VAEOGQ1nKS9+bXi3mRTD4Up9yuIkkP8PKyV3NS692OmJi5PqP/4zB64mmFyyYAwwvvDl Rs4VYPRIc9abH/Qusw3QeSODjeOcrloDQB9gdG0/tAyviNAn9c5wLp7aqAVoRSH4ReIT H1tA== X-Forwarded-Encrypted: i=1; AJvYcCW5QKAGK9gC5gVPyDsYZbRH0wrFDYtxbcoKIqmxr0hk8Px+ThI1p/wybLwrT0XJlm6YpmB1PrYwwz3LY0YEnKcCQIqc9co4VsXHovYk X-Gm-Message-State: AOJu0YwYpadJQO7V6o3hhp5tMEq8xAUzS8MXeQsvEiz8pIcE9WqPS5x8 5xWJeElxrxk2RqOeQB43AKST0ivi3oLjn/8q8O8abTtLVIjiarwfoY2RbJw0 X-Received: by 2002:a05:6512:3052:b0:512:fd90:b4dc with SMTP id b18-20020a056512305200b00512fd90b4dcmr503220lfb.33.1708874077559; Sun, 25 Feb 2024 07:14:37 -0800 (PST) Received: from localhost (dslb-002-205-020-122.002.205.pools.vodafone-ip.de. [2.205.20.122]) by smtp.gmail.com with ESMTPSA id ga13-20020a170906b84d00b00a3d5efc65e0sm1556313ejb.91.2024.02.25.07.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 07:14:36 -0800 (PST) From: Jonas Gorski <jonas.gorski@gmail.com> To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Florian Fainelli <florian.fainelli@broadcom.com> Subject: [PATCH 2/2] serial: bcm63xx-uart: fix tx after conversion to uart_port_tx_limited() Date: Sun, 25 Feb 2024 16:14:26 +0100 Message-Id: <20240225151426.1342285-2-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240225151426.1342285-1-jonas.gorski@gmail.com> References: <20240225151426.1342285-1-jonas.gorski@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791884379000522822 X-GMAIL-MSGID: 1791884379000522822 |
Series |
[1/2] serial: core: introduce uart_port_tx_limited_flags()
|
|
Commit Message
Jonas Gorski
Feb. 25, 2024, 3:14 p.m. UTC
When bcm63xx-uart was converted to uart_port_tx_limited(), it implicitly
added a call to stop_tx(). This causes garbage to be put out on the
serial console. To fix this, pass UART_TX_NOSTOP in flags, and manually
call stop_tx() ourselves analogue to how a similar issue was fixed in
commit 7be50f2e8f20 ("serial: mxs-auart: fix tx").
Fixes: d11cc8c3c4b6 ("tty: serial: use uart_port_tx_limited()")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
drivers/tty/serial/bcm63xx_uart.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Comments
On Sun, Feb 25, 2024 at 04:14:26PM +0100, Jonas Gorski wrote: > When bcm63xx-uart was converted to uart_port_tx_limited(), it implicitly > added a call to stop_tx(). This causes garbage to be put out on the > serial console. To fix this, pass UART_TX_NOSTOP in flags, and manually > call stop_tx() ourselves analogue to how a similar issue was fixed in > commit 7be50f2e8f20 ("serial: mxs-auart: fix tx"). > > Fixes: d11cc8c3c4b6 ("tty: serial: use uart_port_tx_limited()") > Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> > --- > drivers/tty/serial/bcm63xx_uart.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c > index a3cefa153456..259fe5895032 100644 > --- a/drivers/tty/serial/bcm63xx_uart.c > +++ b/drivers/tty/serial/bcm63xx_uart.c > @@ -309,8 +309,8 @@ static void bcm_uart_do_tx(struct uart_port *port) > > val = bcm_uart_readl(port, UART_MCTL_REG); > val = (val & UART_MCTL_TXFIFOFILL_MASK) >> UART_MCTL_TXFIFOFILL_SHIFT; > - > - pending = uart_port_tx_limited(port, ch, port->fifosize - val, > + pending = uart_port_tx_limited_flags(port, ch, UART_TX_NOSTOP, > + port->fifosize - val, > true, > bcm_uart_writel(port, ch, UART_FIFO_REG), > ({})); > @@ -321,6 +321,9 @@ static void bcm_uart_do_tx(struct uart_port *port) > val = bcm_uart_readl(port, UART_IR_REG); > val &= ~UART_TX_INT_MASK; > bcm_uart_writel(port, val, UART_IR_REG); > + > + if (uart_tx_stopped(port)) > + bcm_uart_stop_tx(port); > } > > /* > -- > 2.34.1 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index a3cefa153456..259fe5895032 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -309,8 +309,8 @@ static void bcm_uart_do_tx(struct uart_port *port) val = bcm_uart_readl(port, UART_MCTL_REG); val = (val & UART_MCTL_TXFIFOFILL_MASK) >> UART_MCTL_TXFIFOFILL_SHIFT; - - pending = uart_port_tx_limited(port, ch, port->fifosize - val, + pending = uart_port_tx_limited_flags(port, ch, UART_TX_NOSTOP, + port->fifosize - val, true, bcm_uart_writel(port, ch, UART_FIFO_REG), ({})); @@ -321,6 +321,9 @@ static void bcm_uart_do_tx(struct uart_port *port) val = bcm_uart_readl(port, UART_IR_REG); val &= ~UART_TX_INT_MASK; bcm_uart_writel(port, val, UART_IR_REG); + + if (uart_tx_stopped(port)) + bcm_uart_stop_tx(port); } /*