Re: [PATCH v3 6/7] USB: serial: ftdi_sio: Fix custom_divisor for TIOCGSERIAL and c_*speed for TCGETS2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 24, 2022 at 12:27:17PM +0200, Pali Rohár wrote:
> When ASYNC_SPD_CUST is used, update custom_divisor field for TIOCGSERIAL
> and c_*speed fields for TCGETS2 so that they correspond to the newly set
> baud rate value.
> 
> So userspace TCGETS2 ioctls in new c_*speed fields will see the true baud
> rate that is being used.
> 
> This is needed for switching userspace applications to use TCGETS2 API as
> currently new c_*speed fields does not report correct values. Without this
> change userspace applications still have to use old deprecated TIOCGSERIAL
> to retrieve current baud rate.

Still no. Not happening.

We should not try to determine the rates used when setting (hardware)
divisors directly through the deprecated SPD_CUST hack. Serial core
does not do so for a reason, including that you can set 38400 once and
then fiddle around with setserial all you want without the magic value
changing.

USB serial regressed at one point by starting to report back the rate it
would try to set. I left it in place because it took a fair while before
anyone noticed and no one should be using this interface anyway.

But if you try to generalise this, I'd rather fix that bug or just rip
this out completely.

Johan



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux