Updated from Linux LTS 3.10.23 to 3.10.24
This commit is contained in:
@@ -2131,6 +2131,20 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
||||
termios->c_cflag |= CRTSCTS;
|
||||
}
|
||||
|
||||
/*
|
||||
* All FTDI UART chips are limited to CS7/8. We won't pretend to
|
||||
* support CS5/6 and revert the CSIZE setting instead.
|
||||
*/
|
||||
if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) {
|
||||
dev_warn(ddev, "requested CSIZE setting not supported\n");
|
||||
|
||||
termios->c_cflag &= ~CSIZE;
|
||||
if (old_termios)
|
||||
termios->c_cflag |= old_termios->c_cflag & CSIZE;
|
||||
else
|
||||
termios->c_cflag |= CS8;
|
||||
}
|
||||
|
||||
cflag = termios->c_cflag;
|
||||
|
||||
if (!old_termios)
|
||||
@@ -2167,19 +2181,16 @@ no_skip:
|
||||
} else {
|
||||
urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE;
|
||||
}
|
||||
if (cflag & CSIZE) {
|
||||
switch (cflag & CSIZE) {
|
||||
case CS7:
|
||||
urb_value |= 7;
|
||||
dev_dbg(ddev, "Setting CS7\n");
|
||||
break;
|
||||
case CS8:
|
||||
urb_value |= 8;
|
||||
dev_dbg(ddev, "Setting CS8\n");
|
||||
break;
|
||||
default:
|
||||
dev_err(ddev, "CSIZE was set but not CS7-CS8\n");
|
||||
}
|
||||
switch (cflag & CSIZE) {
|
||||
case CS7:
|
||||
urb_value |= 7;
|
||||
dev_dbg(ddev, "Setting CS7\n");
|
||||
break;
|
||||
default:
|
||||
case CS8:
|
||||
urb_value |= 8;
|
||||
dev_dbg(ddev, "Setting CS8\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* This is needed by the break command since it uses the same command
|
||||
|
||||
Reference in New Issue
Block a user