From patchwork Thu Apr 30 16:21:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6305571 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 067509F1C2 for ; Thu, 30 Apr 2015 16:22:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BBB4201EF for ; Thu, 30 Apr 2015 16:22:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4698B20131 for ; Thu, 30 Apr 2015 16:22:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbbD3QWt (ORCPT ); Thu, 30 Apr 2015 12:22:49 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37727 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbbD3QVn (ORCPT ); Thu, 30 Apr 2015 12:21:43 -0400 Received: from ayla.of.borg ([84.193.93.87]) by albert.telenet-ops.be with bizsmtp id NGMe1q00a1t5w8s06GMeRr; Thu, 30 Apr 2015 18:21:40 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1YnrDW-0004uW-7F; Thu, 30 Apr 2015 18:21:38 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1YnrDX-0003LU-OW; Thu, 30 Apr 2015 18:21:39 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby Cc: Magnus Damm , Simon Horman , Nobuhiro Iwamatsu , Yoshinori Sato , linux-serial@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 09/13] serial: sh-sci: Don't set SCLSR bits in the SCxSR error mask Date: Thu, 30 Apr 2015 18:21:33 +0200 Message-Id: <1430410897-12770-10-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430410897-12770-1-git-send-email-geert+renesas@glider.be> References: <1430410897-12770-1-git-send-email-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/tty/serial/sh-sci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index b636c53a1e5b3866..c3e884dd925f43a4 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -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;