Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3711339imu; Mon, 28 Jan 2019 09:26:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN7LfH92KkKgB4DnIm9HHBEmQnly/0cacJONI6UY4co/fyuAeAxfEJt8JbyEy/U7W55R5Yke X-Received: by 2002:a63:6906:: with SMTP id e6mr20247146pgc.144.1548696410096; Mon, 28 Jan 2019 09:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696410; cv=none; d=google.com; s=arc-20160816; b=WYIbemn+B6CMoqSIPJYYkN1r1cIjKt7Ux1nF3sjQbdKxS3PmvRXsekeTNsI70pwKJ1 yDVr3YS9JfXWh5VLniJ1tLuxs3xls1oy4dRA0iMKPUD9twju5N80CJhGmHU2vdjxU0Re co78Wdxbce1gtzkP6nHuPAZuLBcASdQDtukMSXBC/DrnF6rSv81I7f2aKFvfsM4m41Jx z3p3FUkmMn9CZwukHlIio2FOPNCrnG8hV4BRvFwA7OeVfi8/U3ULXgkkgsPIVczikRHH BzVF87ZrUFRaDae3ln3CqUKWtMvxJ4Yej+zC9XZwcqxSxdoj8otYCwhNE0rx1mSXytlm P4Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ySyjPYEehThsj8F3CQQ0XPgFgM1xEjNVgT8MXyVDkLY=; b=EqrELodKuEfHpT+K8rFulUSLKyHwWnRl2vfyYhmGR9z9FSuuz/Y8FWx5C30ZUUmBr5 l2zBZLokm1klWnv93fX9ZaD7H4V04pNgFT1PFQFBBw1IeJ+o/9yVCmq2zx4dn68XpjOY 00aLRVfOftE9EigyX/uQzDUe8/esd49/Qne5Hon9WBnag1e0D+Xcb8sdmrIRn1rsOwqj Oe5IjzdCN62BoLcNCEE6PP4QdHHGbRcPBIrWi4QxfXNZ22eNCil83e2MxbIsmaL5u57t NcreVjQdbfhJGy67Td/IS2JKTkEecdgcma1egxryMZA4RCDL4Lq6dEzl6AYlyQ3qstSN gUAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r8T0iCzI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si34040654pfg.254.2019.01.28.09.26.34; Mon, 28 Jan 2019 09:26:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r8T0iCzI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731024AbfA1R0c (ORCPT + 99 others); Mon, 28 Jan 2019 12:26:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:45946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730455AbfA1QAj (ORCPT ); Mon, 28 Jan 2019 11:00:39 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2FD8A21852; Mon, 28 Jan 2019 16:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691238; bh=31dtQYxl7YPEZnugumsxzpSLdIRjWjY9ctN1JJviweY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r8T0iCzIlsK/1weBGBdcUH3JPSRQFBAonbfVvkE2Tl2yXbgSS9/Mf2zsJ19swg8Sb FW+SQMVB3mRq8aCmCway0N5rW5c6tnZ8tn6TOf/Jkht/A7XIXVjTIb+V/sXbCyhk// qjz1g7cQjErMKyilj97whaFrOOaJ1/zpjMrq0Xm0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andy Duan , Lukas Wunner , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 028/258] serial: fsl_lpuart: clear parity enable bit when disable parity Date: Mon, 28 Jan 2019 10:55:34 -0500 Message-Id: <20190128155924.51521-28-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Duan [ Upstream commit 397bd9211fe014b347ca8f95a8f4e1017bac1aeb ] Current driver only enable parity enable bit and never clear it when user set the termios. The fix clear the parity enable bit when PARENB flag is not set in termios->c_cflag. Cc: Lukas Wunner Signed-off-by: Andy Duan Reviewed-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/fsl_lpuart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 3f8d1274fc85..7d030c2e42ff 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1477,6 +1477,8 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, else cr1 &= ~UARTCR1_PT; } + } else { + cr1 &= ~UARTCR1_PE; } /* ask the core to calculate the divisor */ @@ -1688,6 +1690,8 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, else ctrl &= ~UARTCTRL_PT; } + } else { + ctrl &= ~UARTCTRL_PE; } /* ask the core to calculate the divisor */ -- 2.19.1