usb-serial: Fix edgeport regression on non-EPiC devices
Subsystems (2)
PATCH 1/1 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 <[email protected]>.
--
Assuming this is a right and proper fix, it should go in the -stable tree ASAP.
drivers/usb/serial/io_edgeport.c +8 -11
@@ -2366,9 +2366,8 @@int status;unsigned char number = edge_port->port->number - edge_port->port->serial->minor; -if ((!edge_serial->is_epic) || - ((edge_serial->is_epic) && - (!edge_serial->epic_descriptor.Supports.IOSPSetBaudRate))) { +if (edge_serial->is_epic && + !edge_serial->epic_descriptor.Supports.IOSPSetBaudRate) {dbg ("SendCmdWriteBaudRate - NOT Setting baud rate for port = %d, baud = %d" , edge_port->port->number, baudRate);return 0 ;
@@ -2461,18 +2460,16 @@dbg ("%s - write to %s register 0x%02x" , (regNum ==MCR ) ?"MCR" :"LCR" , __FUNCTION__, regValue); -if ((!edge_serial->is_epic) || - ((edge_serial->is_epic) && - (!edge_serial->epic_descriptor.Supports.IOSPWriteMCR) && - (regNum ==MCR ))) { +if (edge_serial->is_epic && + !edge_serial->epic_descriptor.Supports.IOSPWriteMCR && + regNum ==MCR ) {dbg ("SendCmdWriteUartReg - Not writing to MCR Register" );return 0 ; } -if ((!edge_serial->is_epic) || - ((edge_serial->is_epic) && - (!edge_serial->epic_descriptor.Supports.IOSPWriteLCR) && - (regNum ==LCR ))) { +if (edge_serial->is_epic && + !edge_serial->epic_descriptor.Supports.IOSPWriteLCR && + regNum ==LCR ) {dbg ("SendCmdWriteUartReg - Not writing to LCR Register" );return 0 ; }
Quoted 7 lines · Adam Kropelin
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 <[email protected]>.
Signed-off-by Adam Kropelin <[email protected]>
Ugh, good catch on this one, sorry, it was my fault when I added the epic support.
I'll apply this to the proper trees now and send it onward...
thanks,
greg k-h