Re: [PATCH 10/11] tty: Add NVIDIA LSTP UART driver
From: Adrian Ambrozewicz
Date: Fri Oct 16 2026 - 04:23:58 EST
Hi Jiri,
Thanks for the review.
On 13. 10. 26, 7:49, Jiri Slaby wrote:
>> +static speed_t lstp_baud_to_speed(u32 baud)
>
> Maybe implement this in drivers/tty/tty_baudrate.c on the top of
> baud_table + baud_bits?
tty_termios_encode_baud_rate() already does that lookup on those
tables, including the sparc variant the kernel test robot tripped over
on this patch, and falls back to BOTHER for a rate without a Bxxx
constant (the posted code turns such a rate into B0). So rather than a
new helper, the next version keeps a struct ktermios for the line
settings the device reports and sets its speed with
tty_termios_encode_baud_rate(). Does that work for you, or would you
prefer a helper in tty_baudrate.c that returns only the Bxxx bits?
>> + dev_info(ch->dev, "%s: ch_%d: Started as %s\n", __func__, ch->ch_id, ch->display_name);
>
> We usually print nothing in case everything went well.
Will drop it, here and in the other LSTP drivers.
>> + tty_vhangup(tty);
>> + tty_kref_put(tty);
>
> tty_port_tty_vhangup()?
Yes, will use it.
Thanks,
Adrian