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:18:58 -0800 |
commit | 38a464d3f7a94a7bd3cac9d8cd18474385e27633 (patch) | |
tree | 03513f391f48bf091163f91d4f7ca0e3fb9b228c /drivers/usb/serial | |
parent | 163071a2a0d661eb3b8abe14d892a88e6dedc77f (diff) | |
download | lwn-38a464d3f7a94a7bd3cac9d8cd18474385e27633.tar.gz lwn-38a464d3f7a94a7bd3cac9d8cd18474385e27633.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>
Diffstat (limited to 'drivers/usb/serial')
-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 b02fd5027cce..0e4b6a93493e 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1326,8 +1326,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; } |