On Sun, Jul 24, 2022 at 02:59:08PM +0200, Pali Rohár wrote: > On Sunday 24 July 2022 14:54:58 Johan Hovold wrote: > > On Sun, Jul 24, 2022 at 02:33:51PM +0200, Pali Rohár wrote: > > > What is updated is the real baudrate in c_ispeed and c_ospeed > > > extensions. > > > > > > It is really wrong? I thought that c_cflag should stay unchanged at > > > B38400 when ASYNC_SPD_CUST is used. > > > > Yeah, cflags stay unchanged, but you shouldn't touch those fields when > > using the deprecated ASYNC_SPD_CUST hack. > > Hm... Why? I thought that new extended fields (c_ispeed and c_ospeed) > should contain current real speed. What is the reason that c_*speed > fields should have 38400 when ASYNC_SPD_CUST hack is set? Because we shouldn't go adding new features built around the deprecated ASYNC_SPD_CUST hack. User picks 38400, sets that flag and magic happens with some drivers for a while still while we look the other way. This is not something that we should need to care about when using the new interfaces. > > Note that this currently only works because the ftdi driver uses > > tty_get_baud_rate() instead of c_ospeed directly which is the > > recommended (new) way. > > Yes, tty_get_baud_rate() helper function is there for this purpose, > right? No. Johan