Commit bc71e479 authored by Adam Kropelin's avatar Adam Kropelin Committed by Greg Kroah-Hartman

usb-serial: Fix edgeport regression on non-EPiC devices

Fix serious regression on non-EPiC edgeport usb-serial devices. Baud
rate and MCR/LCR registers are not being written on these models due
to apparent copy-n-paste errors introduced with EPiC support.

Failure reported by Nick Pasich <Nick@NickAndBarb.net>.
Signed-off-by: default avatarAdam Kropelin <akropel1@rochester.rr.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1060bce7
...@@ -2366,9 +2366,8 @@ static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRa ...@@ -2366,9 +2366,8 @@ static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRa
int status; int status;
unsigned char number = edge_port->port->number - edge_port->port->serial->minor; unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
if ((!edge_serial->is_epic) || if (edge_serial->is_epic &&
((edge_serial->is_epic) && !edge_serial->epic_descriptor.Supports.IOSPSetBaudRate) {
(!edge_serial->epic_descriptor.Supports.IOSPSetBaudRate))) {
dbg("SendCmdWriteBaudRate - NOT Setting baud rate for port = %d, baud = %d", dbg("SendCmdWriteBaudRate - NOT Setting baud rate for port = %d, baud = %d",
edge_port->port->number, baudRate); edge_port->port->number, baudRate);
return 0; return 0;
...@@ -2461,18 +2460,16 @@ static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 r ...@@ -2461,18 +2460,16 @@ static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 r
dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue); dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue);
if ((!edge_serial->is_epic) || if (edge_serial->is_epic &&
((edge_serial->is_epic) && !edge_serial->epic_descriptor.Supports.IOSPWriteMCR &&
(!edge_serial->epic_descriptor.Supports.IOSPWriteMCR) && regNum == MCR) {
(regNum == MCR))) {
dbg("SendCmdWriteUartReg - Not writing to MCR Register"); dbg("SendCmdWriteUartReg - Not writing to MCR Register");
return 0; return 0;
} }
if ((!edge_serial->is_epic) || if (edge_serial->is_epic &&
((edge_serial->is_epic) && !edge_serial->epic_descriptor.Supports.IOSPWriteLCR &&
(!edge_serial->epic_descriptor.Supports.IOSPWriteLCR) && regNum == LCR) {
(regNum == LCR))) {
dbg ("SendCmdWriteUartReg - Not writing to LCR Register"); dbg ("SendCmdWriteUartReg - Not writing to LCR Register");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment