From patchwork Mon Aug 17 07:22:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 7023741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0B08C05AC for ; Mon, 17 Aug 2015 07:25:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C7BD204E7 for ; Mon, 17 Aug 2015 07:25:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E90C205DC for ; Mon, 17 Aug 2015 07:25:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZRElC-00082W-Q0; Mon, 17 Aug 2015 07:23:10 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZREl9-0007t5-Rj for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2015 07:23:08 +0000 Received: by wicja10 with SMTP id ja10so62830824wic.1 for ; Mon, 17 Aug 2015 00:22:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=pgGI6dgh6h5X5n+xOqrw8ROvWtIua59VH93/f6tPcGo=; b=TtMROodUC8gmCwPc90sDCZ4ADXgIMQaBpc+LjD38q5ENhLK6ciy0OMfpmbP06MN1yc n35RVjvcblXXD/3zVuysuU086TWcAXYjW1RXdCSXNqUDR9YovK7j5gLvfkMoxTUAvhPb SETXVAAJL7BlLU7XFkl5/YowKia8m+/Urgn/Y1W2lHHXvrzgGOiXY17T4UgYm0uZjmnz KakfOv9O4B4aPVlUREtCWH05EG5DwLPUZNOd0Zk8c7RMWl3S2zjrEcZDpt+ZzrV0And7 EydfEzD8vM7N6CN/7NHqdKXRRpQ77Fo+tMrwIQuVj82Al2g5Xxb4xC2YNC42M0E/xgeL +64Q== X-Gm-Message-State: ALoCoQmotjyl9EJMct09c+wX08OY4yBASMt+AE/pjpIBjTeucIy8bNX4dK/4FI8yeWzqoDL6PKJt X-Received: by 10.180.188.49 with SMTP id fx17mr31384051wic.74.1439796165635; Mon, 17 Aug 2015 00:22:45 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id kb1sm20496301wjc.24.2015.08.17.00.22.44 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 17 Aug 2015 00:22:44 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity Date: Mon, 17 Aug 2015 09:22:31 +0200 Message-Id: <5b154ba97bcd79e49e2131152eb2fc1761594a6c.1439796149.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.3.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150817_002308_140373_CDF0686B X-CRM114-Status: GOOD ( 10.57 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anirudha Sarangi , Jiri Slaby , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , linux-serial@vger.kernel.org, Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Anirudha Sarangi Existing set_termios does not handle the option for enabling odd parity. This patch fixes it. Signed-off-by: Anirudha Sarangi Signed-off-by: Michal Simek --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 009e0dbc12d2..a3020344ac9d 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -723,7 +723,7 @@ static void cdns_uart_set_termios(struct uart_port *port, else cval |= CDNS_UART_MR_STOPMODE_1_BIT; /* 1 STOP bit */ - if (termios->c_cflag & PARENB) { + if ((termios->c_cflag & PARENB) || (termios->c_cflag & PARODD)) { /* Mark or Space parity */ if (termios->c_cflag & CMSPAR) { if (termios->c_cflag & PARODD)