serial: sh-sci: Don't set SCLSR bits in the SCxSR error mask
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 30 Apr 2015 16:21:33 +0000 (18:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 17:06:39 +0000 (19:06 +0200)
error_mask is the union of all error indicating bits in the SCxSR
register, while overrun_mask may apply to a different register (SCLSR),
depending on the SCI variant.

Hence overrun_mask should only be ORed into error_mask if it applies to
the SCxSR register.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c

index b636c53..c3e884d 100644 (file)
@@ -2323,7 +2323,8 @@ static int sci_init_single(struct platform_device *dev,
         * Make the error mask inclusive of overrun detection, if
         * supported.
         */
-       sci_port->error_mask |= sci_port->overrun_mask;
+       if (sci_port->overrun_reg == SCxSR)
+               sci_port->error_mask |= sci_port->overrun_mask;
 
        port->type              = p->type;
        port->flags             = UPF_FIXED_PORT | p->flags;