From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9C613EFFB8 for ; Wed, 17 Jun 2026 11:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781697365; cv=none; b=XSl7t7qtP597bzLtdCv/9GuSYz4aDvVhVUwA0SZSr6ODzAswvBDhbVg8M1FNGX8sskh8UtmNxFEIF1oU8Wf//Y8QHcyfZFdsxD09eKy6uHkiH4kNGHSw8qEC0x9ZvWDluE5wBG7D8JAaotbQdgaCNwIjVotNSEjLlJDI7DkkCIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781697365; c=relaxed/simple; bh=bsVKcHP12CsAygE9OlX5KbDT6c8JfJq9fzPsfTp81Og=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ENnMBECwY9UF1RMxtLhUZ+T6omgmJTwMUr2Yk1ZgAiv5RMwe8SRpBv5sO4DKymj4t01uBfegNeshbO0mPX+EdESLEprlj7YrfXOkfuMYUHkJAKMFzkiRu1ul/G6nqWjk5j0D5aHUGj+oqxAN1NUMxmEyO46+GVH3+tMx7Sot714= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=SaDKIVMA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PLIb/mna; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="SaDKIVMA"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PLIb/mna" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65H8V0rw243455 for ; Wed, 17 Jun 2026 11:55:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= SmGBvbELWd2AhWIWMgMsY6iGu2hpb1fqIaBTUXwLFCg=; b=SaDKIVMAVi4LQa/C ZmZHGrsZMRtFEtz6ozRsM+Qupz4BOADEwl/jbYblhUrwjUtfBNw3itkk1I9NK2tf zqQx8nLv1DAoz/6zT4QbKeHAZf6GkwBDTN4NTHya+0UrGQBNESHoDZbBN7xsQQJ7 eaqHaFVSOeGYmYi/iHBkJaV7ARM0+pePmoTegMzwDunX9TDkh+tPhKAeJRkygLCS N93jDCDYCgUD76lquWgtazcJAFeDFhKEyQc7n9RIeO52dz9tfex2EGTN9XqRFu1C aqVqklCz/vkh5qtXNxjuhw7lZ/ZhdzPlfN1pH6fp2xSHA6PEOaLcBK+V+QxsZK0U EDarmg== Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eueepjvqp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 17 Jun 2026 11:55:57 +0000 (GMT) Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-6c89de84f33so6148014137.0 for ; Wed, 17 Jun 2026 04:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781697357; x=1782302157; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SmGBvbELWd2AhWIWMgMsY6iGu2hpb1fqIaBTUXwLFCg=; b=PLIb/mnawOzd6SldYUfwv41+flYWNh0DlZtsFI1xo3QCalx0/BOeL0vKTWVOK+hOyx CkCBLeTwzvocAIJhie0eNEB5HHD+0x9kAk+rJHHmlY8kA3+CXJM6BaDntBvd2v/vC8E/ A0uhgihpzyJYn5BsmreiMxEQJvKr0cLjXjuEZWqmN+CBWfbafimJLYwN5uu9IR5SRzeS 9MbD5vW1h9NGMrkImCGfogR3AZT6echYUBFI5oZdaAOoeESQA3Ul17REHjICtJHoPkIy 2dx6tCH0Qz/Zf2XYXx/bBjHNdiZOInxdMQNwgHH5ve3TnmVf9W38UNrT1W73O4gwl4TE DQXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781697357; x=1782302157; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SmGBvbELWd2AhWIWMgMsY6iGu2hpb1fqIaBTUXwLFCg=; b=MUaPVU/BQDNQXEqKZy7UFJ+Qe2+a5wzjsrDvdZ617Xo53IJTN1VmR/I+flrWDMcI89 VPNziXvuwboGdfoIwDxOTVVOnotZ8BNUxhMpdnDPSGJ06dzijuklEY07ViqXZ3r+AJUh QJJhOJnP8MYwnXl0Yk5nktqCO/utGJl+99m1Y2mE+CfJji6NICs1H0E+eCeJgSeMsuPU O57eTU1cuD54eql9SJU3SFLBJgdi35DxyC6Svl59TM/2k1vYW8dhgMIiG1BtVU8yR2++ mf+BQfwqPBGr7aLu1XER65F5f3NaS/eW7zdCJat6QuQyRYEmX9SfITBSAeN0xr6bvebu rzqw== X-Forwarded-Encrypted: i=1; AFNElJ+ajBtHyv5JeY72o3UV80etz14dCaRY+60tUpvcdSoJE/Wx/jOAJ86E+6NRP+8YH8f7iHFXLyH4Xc2qu/I=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8tz1NqyCwb8XgJoWR0f+qG3Lcaw2NHAIyHnUk+D3e+CzhXeNn u+0WfcG6lXoB6bhJI5WZnjyD4ZJRFNMHPztbM1ACRIdImBA8G3ITve6yTifGZp7CBtiTz7m2wF0 nXGTBXC/h2XyR0CNytS4zADkS5vL/PeYh9n8B30s7+TnJYsqIi8gh+DuTWbSFMeMTjx0= X-Gm-Gg: AfdE7cm+u4SZd35viQ73gInu6b3yIbujRtBwFA0Nd5sETuxQ9BmkEO3hbV1o0KfsW9g JpHPdqrJBwGWzy6s4MqJz5HAgnXMLkvc7Bf1wx2LxNdz+XkfDvja2doEYlVyT1+W7zzociCChpr CtTjtcMkHRi/l6MET/edS7zSc1IjZVXvdAYtrkD0ef58OETD22J1AMo/srENKMrZt5Zi2E4Tro1 qGRPfoArZoO0wk7lDsJWHBDf6WYk3cr6MrX0cDpo7lWMO/GamRfPM/emvBIF3wi8kR11IHmNOvJ GXqUIvtzA5PP1zNyBrQbIUb4zES0+saGqmemriVB2xy7CWNapSRJZw6qMDn4+/cflUawgWarouq lj/0YojXlbxQyuySQAXS5RlR2GYbctAQmfQ+3FGAHanKLDaS7OO1udE5oWSs97g== X-Received: by 2002:a05:6102:5126:b0:631:28c1:154e with SMTP id ada2fe7eead31-7246a21458bmr1846913137.16.1781697356328; Wed, 17 Jun 2026 04:55:56 -0700 (PDT) X-Received: by 2002:a05:6102:5126:b0:631:28c1:154e with SMTP id ada2fe7eead31-7246a21458bmr1846803137.16.1781697355338; Wed, 17 Jun 2026 04:55:55 -0700 (PDT) Received: from [192.168.69.208] (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa8b423sm154442075e9.11.2026.06.17.04.55.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jun 2026 04:55:54 -0700 (PDT) Message-ID: Date: Wed, 17 Jun 2026 13:55:53 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] serial: sb1250-duart: Fix console message clobbering at channel resets Content-Language: en-US To: "Maciej W. Rozycki" , Thomas Bogendoerfer , Greg Kroah-Hartman , Jiri Slaby Cc: Elena Reshetova , David Windsor , Kees Cook , Hans Liljestrand , linux-mips@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org References: From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=AY+B2XXG c=1 sm=1 tr=0 ts=6a328b4d cx=c_pps a=N1BjEkVkxJi3uNfLdpvX3g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=VwQbUJbxAAAA:8 a=BcPKCTjPAAAA:8 a=EUspDBNiAAAA:8 a=_c3b9wjhhov0UwWOKkwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=crWF4MFLhNY0qMRaF8an:22 a=MNXww67FyIVnWKX2fotq:22 X-Proofpoint-GUID: M1X-muIwQuZTyTB1jXt4ZdMC9DckHlei X-Proofpoint-ORIG-GUID: M1X-muIwQuZTyTB1jXt4ZdMC9DckHlei X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE3MDExMyBTYWx0ZWRfX+M1e/FJ0McJC 83+sQXHZ+qkaou8msF3qTr15tudf+f0gqtZndKw8EdE6cRh7/qRggZwWCGqT3fonnVVnuPwikSe xRCT4bLlL4Bl0WEM+b/bOZMWDnWDTGEuDnViAZm9QTvc2wmSoVu9wr8KxsJCxY89sElxhSGlvGi w+uqV1CWxLhTrrbCD3mo2MpYbsmoYxrkD02z7F3x07XbMfJIDi+QAa5D7A0X0kW1NbZhMByerh3 /GvS9VDxXE44gW08fq7S2JxMLgavy/jHTnMi32dPHCv5+r9KtrK6kvBrqyT3kxmlCwNHx3PrLmk FFgPY2XMAkvgkRIyx2M0DY+arUdveoHOSAhISsn1DV24lcs13OQ5tfHwvmrOJZwkhCz2OKgTHDt etbUBlPCWMTVItRmBtCITFWBtflwPiMPDv6B/C1rOR2vuhT8breP3Z3XIY2SzvwCvs42ebT5SHQ 0bzcLHoMYoBUHsAVa8Q== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE3MDExMyBTYWx0ZWRfX2Cqg1VTsXh68 IQLaviyVDxCetycTW9Jos1EU7aXfwk0YuU/hOBCguW20GwXq55ZZy2jUzQZscYSwp6BEgqN5pq3 QMj7umIgr/Gx3MSLxpL420QDkwwfpTY= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-17_01,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 bulkscore=0 suspectscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606170113 On 25/5/26 01:12, Maciej W. Rozycki wrote: > Ensure any characters outstanding have been sent before issuing channel > resets so as to prevent messages issued to the bootconsole from getting > clobbered. > > Contrary to device documentation at the time the transmitter empty bit > is set only the transmit FIFO has been drained and there is still data > outstanding in the transmitter shift register, so wait an extra amount > of time for that register to drain too. This also prevents subsequent > messages produced to the console from getting clobbered, owing to what > seems a transmitter synchronisation issue. > > When called from sbd_serial_console_init() it is too early for fsleep() > to work and even before lpj has been calculated and therefore the delay > is actually not sufficient for the transmitter to drain and is merely a > placeholder now. This will be addressed in a follow-up change. > > Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM") > Signed-off-by: Maciej W. Rozycki > Cc: stable@vger.kernel.org # v6.5+ > --- > Changes from v1 (1/4), > : > > - Sanitise the change heading. > --- > drivers/tty/serial/sb1250-duart.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) Reviewed-by: Philippe Mathieu-Daudé