Re: [PATCH v2 6/7] USB: serial: ftdi_sio: Fix custom_divisor and c_*speed for ASYNC_SPD_CUST

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

 



On Wednesday 14 September 2022 11:18:03 Johan Hovold wrote:
> On Wed, Sep 14, 2022 at 11:10:06AM +0200, Pali Rohár wrote:
> > On Wednesday 14 September 2022 10:58:48 Johan Hovold wrote:
> > > On Wed, Sep 14, 2022 at 10:48:31AM +0200, Pali Rohár wrote:
> 
> > > > Seems that you did not understand the point. So I will try to explain it
> > > > again. This is not a new feature for _old_ ASYNC_SPD_CUST. This is the
> > > > fix for the _new_ TCGETS2 API, to ensure that driver will always returns
> > > > corrects values in c_*speed fields. If driver is not going to fix this
> > > > _new_ TCGETS2 API then there is _NO_ point to use this new API in
> > > > userspace and it is better to stick with the old ASYNC_SPD_CUST. And
> > > > this is the current userspace state. So based on your input, it is the
> > > > time to deprecate TCGETS2?
> > > 
> > > Stop being silly. As I've said repeatedly, we don't care about
> > > ASYNC_SPD_CUST. Just return 38400 regardless of whatever magic happens
> > > behind the scenes with the TIOCSSERIAL ioctl.
> 
> > I'm not silly here. Look, those APIs are for userspace. And if userspace
> > application cannot use this new TCGETS2 API (for more reasons) then they
> > stick with the old one TIOCSSERIAL. And your inputs just say that it is
> > not a good idea to switch TCGETS2 as this API stay broken in some
> > drivers. Silly is the one who do not see (or do not want to see it;
> > because of own API perfectionism) the reasons why new "proposed API" is
> > still not (widely) used and applications stick with TCGETS + TIOCSSERIAL.
> > 
> > That is why I'm asking, it is time to starting deprecating TCGETS2 and
> > create for example TCGETS3? Only just few application use TCGETS2, so
> > deprecation of TCGETS2 can be done _now_ without pain as this API is not
> > widely used.
> 
> You're trying to keep the ASYNC_SPD hack alive by forcing drivers to
> take it into consideration for TCGETS2. Just stop using the former and
> switch to using BOTHER. And if something is missing in user space for
> that, then fix that.
> 
> Johan

And what is the point of switching to BOTHER/TCGETS2 if some drivers
do not return _correct_ values?



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

  Powered by Linux