[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <n0nkVtqY6EGqUjpCbbDoUDPXNp4OYV5ylxThOVO8GMZauTuBZdXEqQVK73km-Jg2By_XlSB6GMmYa_plyzPgbIO6BovdNEhwtiHosAHy2Lk=@pm.me>
Date: Tue, 16 Apr 2024 19:40:40 +0000
From: Michael Pratt <mcpratt@...me>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby <jirislaby@...nel.org>, Wander Lairson Costa <wander@...hat.com>, Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, Vamshi Gajjela <vamshigajjela@...gle.com>
Subject: Re: [PATCH v2 2/3] serial: 8250: Store whether fifo device is enabled
Hi Andy,
On Tuesday, April 16th, 2024 at 15:18, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
>
>
> On Tue, Apr 16, 2024 at 07:09:52PM +0000, Michael Pratt wrote:
>
> > On Tuesday, April 16th, 2024 at 14:55, Andy Shevchenko andriy.shevchenko@...ux.intel.com wrote:
>
> > > > @@ -3392,6 +3392,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
> > >
> > > > + up->fifo_enable = use_fifo;
> > >
> > > 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?
> >
> > 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.
>
>
> 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 port.
>
> > If you're suggesting that these checks are moved out of this function somewhere else,
> > I would probably agree with that, but let's save that idea for the future...
>
>
> Not really (again, IIUC above), as console can be not enabled, and hence
> serial8250_console_write() never been called and you will have false impression
> 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... and 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...
>
> --
> With Best Regards,
> Andy Shevchenko
--
MCP
Powered by blists - more mailing lists