diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-01-10 23:33:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-03 09:21:56 -0800 |
commit | 3393e255e6e0120b1f88d666c1b36b165f97467c (patch) | |
tree | 7d25795385aae605a4f8beb4078e58236ed5cdb5 | |
parent | ac13bcf69a18216ccf547306e284ce51c76bbb82 (diff) | |
download | lwn-3393e255e6e0120b1f88d666c1b36b165f97467c.tar.gz lwn-3393e255e6e0120b1f88d666c1b36b165f97467c.zip |
USB: ftdi_sio: fix TIOCSSERIAL baud_base handling
commit eb833a9e0972f60beb4ab8104ad7ef6bf30f02fc upstream.
Return EINVAL if new baud_base does not match the current one.
The baud_base is device specific and can not be changed. This restores
the old (pre-2005) behaviour which was changed due to a
misunderstanding regarding this fact (see
https://lkml.org/lkml/2005/1/20/84).
Reported-by: Torbjörn Lofterud <torbjorn@pi.nxs.se>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index ff3db5d056a5..6a034b31e967 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1333,8 +1333,7 @@ static int set_serial_info(struct tty_struct *tty, goto check_and_exit; } - if ((new_serial.baud_base != priv->baud_base) && - (new_serial.baud_base < 9600)) { + if (new_serial.baud_base != priv->baud_base) { mutex_unlock(&priv->cfg_lock); return -EINVAL; } |