On Fri, Apr 28, 2017 at 11:27:20AM +0200, Anthony Mallet wrote: > 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. Thanks for reporting this. > 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. Actually that commit did enable non-privileged users to set the flag, but it would not take effect until next open. A later commit then broke this behaviour, but no one has noticed for about seven years. > 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) Yes, this looks like the right fix. Are you going to submit this as a proper patch that we can apply? Let us know if you have any questions. Thanks, Johan -- 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