Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp193424lqb; Tue, 16 Apr 2024 12:42:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOQv8IeFVyMkDbzaB1GfI+1gJ5rFORhdG16PiWJ5j+ipzx0XgeuxO5Gumt0OStpT/DEOr9RJfalwy/7K7dt/oiN6wCBYAimdSqpfxUyw== X-Google-Smtp-Source: AGHT+IFz+1G/zWzjEfqYQxGOyharv8jGpyNpPWWEv7TyCpC+mFSYdReQPF2rERKeldoSrIOZImM0 X-Received: by 2002:a17:902:eccd:b0:1e4:3df0:38a5 with SMTP id a13-20020a170902eccd00b001e43df038a5mr13488299plh.65.1713296546756; Tue, 16 Apr 2024 12:42:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713296546; cv=pass; d=google.com; s=arc-20160816; b=vRncRhDTQhUcF2snaOm5Mo2rFVhLtdWNAwhPoDS8JJEwYeHxnX2Hy4KckE8Lg/blWK 3JortvjFtCkVDaWmH/3GnwK6R6aSJiSA6PRNDNnk6ekCrqfQnHOBknyv9cJcMzknLsr/ MKdlIoC6svgdN6qUy0tKk1lT9CcdmY9nKydUykhVHJIhnIYGRDg1afTrwm66qvFqcQCT 9yDjIxrksiRHo3SU+klfSTPoozcbq+rDQAhMIbd0ne9KCXT0U6EzvmqF1EdqOT0Xsugj 207I4zX9JDKOk+sMgUYrVMH9WHCT40z5U4dmP8la67Nh8r/lf7BWiBsKS8BYNMp7Nv1o sb3A== 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:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=iL4rWnJp0n1pRBBWexdnCQY80fm8TPTXAXJ/+V7Fk+8=; fh=IFgVgoakDO3qw9gWY07IltYmiI3jIJb9zoJI5Tu9WzY=; b=fvj6BYLT2dQKmcwR54cnDg4uG4pAn7joaSSCYaVZLWqA2DYckb8jCwpa7ofBdJp3dO IzsTVD772TzOiabZy1v3T0glPW2aM+0yJNGkxpcY0kSHKjdPgofKiAn/Xm2XvaX5qU/9 pEVa34yPEXDI7ogJBzeVx5I8KzjG6iJArJ20WoLespPM5OA9Ts9b/YO0ZV2GY3rmbAhu AicjO4ovUvyDtercxgJE7CGake9HnOCsqebEeN+MkBMBE3G1qWtV+sdc6ghE5C8Hrvqz Bt00LPhZMLKPSNlAIzht+m2MaflUCI6IcSmo5/zSAz3MXYaVMYiJBH3lkNASfPVUcYkh 0woA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail3 header.b=ocvdGf4E; arc=pass (i=1 spf=pass spfdomain=pm.me dkim=pass dkdomain=pm.me dmarc=pass fromdomain=pm.me); spf=pass (google.com: domain of linux-kernel+bounces-147481-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147481-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z9-20020a170902d54900b001e3c01dfb0fsi10138001plf.86.2024.04.16.12.42.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 12:42:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147481-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail3 header.b=ocvdGf4E; arc=pass (i=1 spf=pass spfdomain=pm.me dkim=pass dkdomain=pm.me dmarc=pass fromdomain=pm.me); spf=pass (google.com: domain of linux-kernel+bounces-147481-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147481-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C85ED282E68 for ; Tue, 16 Apr 2024 19:42:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 855541386D6; Tue, 16 Apr 2024 19:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="ocvdGf4E" Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (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 9697F132813 for ; Tue, 16 Apr 2024 19:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713296518; cv=none; b=sUYZh3Qrt448zM1wVxZE+LK3BNbjuXECdHeuaRjEtT+MMfBg7n93L/mWcEdjM3bcbNVlxSoEFT8KUla+OrrWSBcrHQ+dsB3BIHjeUM7GO7hJ6tWxElUfaCGHF/2ykU4BZ5UBJgvJbtz6TUt3gmMace0AcwhML/LP2oB1jhyVmSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713296518; c=relaxed/simple; bh=iL4rWnJp0n1pRBBWexdnCQY80fm8TPTXAXJ/+V7Fk+8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p3osAyFAv4ZjShkgI3m0lxNkuKFyKxP+3ViWVmRUpDWokiWMp0J9uPfilUUWB6/wzNm3lVhxaS3a33EkD+AHeq//nd8G6OYYTrC4wDWwWBMrj5OOXEP6uMYIeZZ5DC+TWWIUeNy2LbmUXGQDwf0w4HlvQIJkR+ByO4cXeBX1AwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=ocvdGf4E; arc=none smtp.client-ip=185.70.43.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1713296513; x=1713555713; bh=iL4rWnJp0n1pRBBWexdnCQY80fm8TPTXAXJ/+V7Fk+8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ocvdGf4EKL/4NxviAUU9FjB0BjEholGrv5bFr8U/mdC8ykKXKuMU0zCLuwjTdq31R aKjJ68wsTrL+fZfq/pYVmrR6sfFnLBMkGYNdwrwilk28UzIliisL4eape0KxoVq4e6 h0yFG3l4jjnIo6wGv8K43T9om0ArcpML+QzJyIlGlw0n4oNwChMKeYaXJaHq7Pau8i SQlOeElg1RS1DGLkUQlr4p4ynV7UNWokSQNCK1ZHf7fSsGHcuF/SO8Zfhrk5OQuxtE fqQ3WMVtPLeBWhcXd91zuLAwneV+PMRTv6hOfrbEYDHinwq+Lv78noJScICJ+SNv/t gGnTJu15BsF8Q== Date: Tue, 16 Apr 2024 19:40:40 +0000 To: Andy Shevchenko From: Michael Pratt Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Wander Lairson Costa , =?utf-8?Q?Ilpo_J=C3=A4rvinen?= , Vamshi Gajjela Subject: Re: [PATCH v2 2/3] serial: 8250: Store whether fifo device is enabled Message-ID: In-Reply-To: References: <20240416182741.22514-1-mcpratt@pm.me> <20240416182741.22514-3-mcpratt@pm.me> Feedback-ID: 27397442:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Andy, On Tuesday, April 16th, 2024 at 15:18, Andy Shevchenko wrote: >=20 >=20 > On Tue, Apr 16, 2024 at 07:09:52PM +0000, Michael Pratt wrote: >=20 > > On Tuesday, April 16th, 2024 at 14:55, Andy Shevchenko andriy.shevchenk= o@linux.intel.com wrote: >=20 > > > > @@ -3392,6 +3392,8 @@ void serial8250_console_write(struct uart_825= 0_port *up, const char *s, > > >=20 > > > > + up->fifo_enable =3D use_fifo; > > >=20 > > > This seems incorrect / not the only one place to assign this. What if= the > > > console not enabled at compile time? What if it's not enabled at boot= time? > >=20 > > This is 8250 specific, and currently, it's the only place there > > where it's decided whether or not to use the fifo device > > by checking a bunch of flags and values. >=20 >=20 > Exactly, as initial commit is related to the kernel console only. > While your code, IIUC (correct me, if I'm wrong) is for any use of the po= rt. >=20 > > If you're suggesting that these checks are moved out of this function s= omewhere else, > > I would probably agree with that, but let's save that idea for the futu= re... >=20 >=20 > Not really (again, IIUC above), as console can be not enabled, and hence > serial8250_console_write() never been called and you will have false impr= ession > that there is no FIFO in use. Ah ok, I understand now... So there are cases where the function with the checks will never be called, yet the device itself will be configured the same way and the struct member= I am adding will still be instantiated with value of 0 and never be set elsewhere... an= d because it is declared in a major struct "uart_8250_port", it appears to apply to a= larger scope compared to the way it is actually being used... (or at the very least, the name "fifo_enable" would be misleading). Thanks for pointing that out, I'll take a deeper dive into the file... >=20 > -- > With Best Regards, > Andy Shevchenko -- MCP