Re: ttyACM: disabled by hub (EMI?), re-enabling... Causes garbage chars & disconnect

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

 



On Mon, 2020-06-08 at 11:13 +0200, Oliver Neukum wrote:
> 
> Am Freitag, den 05.06.2020, 10:09 +0000 schrieb Joakim Tjernlund:
> 
> > I can see that when I open the tty, a USB read is performed and then echoed back.
> > Should an open really do that?
> 
> Yes. The tty interface does not pass read(2) down to the driver.
> 
> > If so, an flag to open(2), telling it to drop the input buffer would be really handy.
> 
> That actually looks like an unavoidable race condition to me.
> How would you tell the difference between old data and newly
> arriving data?

Most terminal programs I use tries to empty the read queue after open, just to avoid
old garbage så I don't see a problem here. It it up to the terminal app.
Maybe one could use O_DIRECT for this purpose ?

   Jocke




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

  Powered by Linux