Re: [PATCH v3] USB: serial: ftdi_sio: fix setting latency for unprivileged users

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

 



On Monday  8 May 2017, at 17:38, Johan Hovold wrote:
> You can read (and also change) the latency-timer value used through
> sysfs:
> 
> 	# cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer 
> 	16
> 
> if that's what you needed? But unless you change it, you can infer the
> value to be either 16 (default) or 1 depending on if ASYNC_LOW_LATENCY
> is set as indicated by TIOCGSERIAL.

Yes, but the sysfs path has a lots a drawbacks:

 - 666 permissions by default, so unprivileged users cannot change it
 - if ASYNC_LOW_LATENCY is not set, the current latency value cannot
   be infered (it could have been changed from the default, by e.g. a
   udev rule).
 - I don't know any way to guess the sysfs path from a tty device
   path, at least not without requiring a lot of extra dependencies
   and very linux-specific code. This is all the more complex if you
   consider that the tty path can either be a pty, a ftdi_sio tty or
   anything else provided that isatty(3) returns 1 ...
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux