USB: serial: ftdi_sio: fix extreme low-latency setting

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

 



Hello,

Regarding this commit:
https://github.com/torvalds/linux/commit/c6dce262

The change breaks things badly as regular users cannot
programmatically get the previous 1ms latency setting anymore. This is
even more harmful that distributions started to include this patch,
e.g. in ubuntu 14.04.5 / 4.4.0-75-generic.

This is due to commit 557aaa7
https://github.com/torvalds/linux/commit/557aaa7ffab639d0190b935a041b16ae44606342
that silently/partially ignores the ASYNC_LOW_LATENCY flag in
set_serial_info(), without returning EPERM, although ASYNC_LOW_LATENCY
is explicitly listed in ASYNC_USR_MASK.

I guess the following patch would fix this:

--- ftdi_sio.c~	2017-04-28 11:20:30.339227000 +0200
+++ ftdi_sio.c	2017-04-28 11:20:52.647773000 +0200
@@ -1505,9 +1505,9 @@
 					(new_serial.flags & ASYNC_FLAGS));
 	priv->custom_divisor = new_serial.custom_divisor;
 
+check_and_exit:
 	write_latency_timer(port);
 
-check_and_exit:
 	if ((old_priv.flags & ASYNC_SPD_MASK) !=
 	     (priv->flags & ASYNC_SPD_MASK)) {
 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)

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

  Powered by Linux