aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/serial/digi_acceleport.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index dab2e66d111d..ae410c4678ea 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -973,6 +973,8 @@ static void digi_set_termios(struct usb_serial_port *port,
973 } 973 }
974 } 974 }
975 /* set parity */ 975 /* set parity */
976 tty->termios->c_cflag &= ~CMSPAR;
977
976 if ((cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD))) { 978 if ((cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD))) {
977 if (cflag&PARENB) { 979 if (cflag&PARENB) {
978 if (cflag&PARODD) 980 if (cflag&PARODD)
@@ -1054,15 +1056,15 @@ static void digi_set_termios(struct usb_serial_port *port,
1054 } 1056 }
1055 1057
1056 /* set output flow control */ 1058 /* set output flow control */
1057 if ((iflag&IXON) != (old_iflag&IXON) 1059 if ((iflag & IXON) != (old_iflag & IXON)
1058 || (cflag&CRTSCTS) != (old_cflag&CRTSCTS)) { 1060 || (cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
1059 arg = 0; 1061 arg = 0;
1060 if (iflag&IXON) 1062 if (iflag & IXON)
1061 arg |= DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF; 1063 arg |= DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;
1062 else 1064 else
1063 arg &= ~DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF; 1065 arg &= ~DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;
1064 1066
1065 if (cflag&CRTSCTS) { 1067 if (cflag & CRTSCTS) {
1066 arg |= DIGI_OUTPUT_FLOW_CONTROL_CTS; 1068 arg |= DIGI_OUTPUT_FLOW_CONTROL_CTS;
1067 } else { 1069 } else {
1068 arg &= ~DIGI_OUTPUT_FLOW_CONTROL_CTS; 1070 arg &= ~DIGI_OUTPUT_FLOW_CONTROL_CTS;
@@ -1076,8 +1078,8 @@ static void digi_set_termios(struct usb_serial_port *port,
1076 } 1078 }
1077 1079
1078 /* set receive enable/disable */ 1080 /* set receive enable/disable */
1079 if ((cflag&CREAD) != (old_cflag&CREAD)) { 1081 if ((cflag & CREAD) != (old_cflag & CREAD)) {
1080 if (cflag&CREAD) 1082 if (cflag & CREAD)
1081 arg = DIGI_ENABLE; 1083 arg = DIGI_ENABLE;
1082 else 1084 else
1083 arg = DIGI_DISABLE; 1085 arg = DIGI_DISABLE;
@@ -1089,7 +1091,7 @@ static void digi_set_termios(struct usb_serial_port *port,
1089 } 1091 }
1090 if ((ret = digi_write_oob_command(port, buf, i, 1)) != 0) 1092 if ((ret = digi_write_oob_command(port, buf, i, 1)) != 0)
1091 dbg("digi_set_termios: write oob failed, ret=%d", ret); 1093 dbg("digi_set_termios: write oob failed, ret=%d", ret);
1092 1094 tty_encode_baud_rate(tty, baud, baud);
1093} 1095}
1094 1096
1095 1097