[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z63Bk6sgQryG1pFK@smile.fi.intel.com>
Date: Thu, 13 Feb 2025 11:55:31 +0200
From: "andriy.shevchenko@...ux.intel.com" <andriy.shevchenko@...ux.intel.com>
To: Kartik Rajput <kkartik@...dia.com>
Cc: Jon Hunter <jonathanh@...dia.com>, "robh@...nel.org" <robh@...nel.org>,
"robert.marko@...tura.hr" <robert.marko@...tura.hr>,
"arnd@...nel.org" <arnd@...nel.org>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"geert+renesas@...der.be" <geert+renesas@...der.be>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"jirislaby@...nel.org" <jirislaby@...nel.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"hvilleneuve@...onoff.com" <hvilleneuve@...onoff.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"schnelle@...ux.ibm.com" <schnelle@...ux.ibm.com>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] serial: tegra-utc: Add driver for Tegra UART
Trace Controller (UTC)
On Thu, Feb 13, 2025 at 09:05:36AM +0000, Kartik Rajput wrote:
> On Wed, 2025-02-12 at 17:09 +0200, Andy Shevchenko wrote:
> > On Wed, Feb 12, 2025 at 04:11:32PM +0530, Kartik Rajput wrote:
...
> > > + for (i = 0; i < len; i++) {
> > > + if (!nbcon_enter_unsafe(wctxt))
> > > + break;
> > > +
> > > + read_poll_timeout_atomic(tegra_utc_tx_readl, val,
> > > !(val & TEGRA_UTC_FIFO_FULL),
> > > + 0, USEC_PER_SEC, false, tup,
> > > TEGRA_UTC_FIFO_STATUS);
> >
> > No error check?
>
> I'm not sure about this. The case where the TX FIFO doesn't clear up,
> even after polling for 1 second, is highly unlikely, especially since
> there's no flow control involved here. Even if that did happen, writing
> to the TX FIFO should just result in an overflow, which is probably
> acceptable in this scenario.
Perhaps a warning (debug?) message in such a case?
> > > + uart_console_write(&tup->port, wctxt->outbuf + i, 1,
> > > tegra_utc_console_putchar);
> > > +
> > > + if (!nbcon_exit_unsafe(wctxt))
> > > + break;
> > > + }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists