From: Johan Hovold Date: Tue, 10 Jan 2012 22:33:37 +0000 (+0100) Subject: USB: ftdi_sio: fix TIOCSSERIAL baud_base handling X-Git-Tag: v2.6.32.56~12 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d71e097d67569b483cdecec08b736e49d1df1d37;p=linux-pvops.git 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 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 5ce2cb919044..dec7c21ff885 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1351,8 +1351,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) { unlock_kernel(); return -EINVAL; }