From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FE45C169C4 for ; Mon, 11 Feb 2019 15:20:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 510CF21B26 for ; Mon, 11 Feb 2019 15:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549898442; bh=EdXY1uLI4dW3dw0YR1z9kWZ2gvElT1bTn0dPRjlFZCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Nu63s9eSbpaYyCCfRYLYuJYLKnzYOi0fG/B28KqU4hhtDb5OzpwixbmX8DR2TSF9A 11NcHxUUhEFl3Bo08pUCPvWQmm0GMkjKFfvYFg4BFwDzKaD1PDMyeIONSMXe/7qUKM UgnkkngiUmjEVCzQOQzvWlAYxLj5QwPQr/kAjJpI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390927AbfBKPFJ (ORCPT ); Mon, 11 Feb 2019 10:05:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:54336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390919AbfBKPFG (ORCPT ); Mon, 11 Feb 2019 10:05:06 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F01F7222AD; Mon, 11 Feb 2019 15:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897505; bh=EdXY1uLI4dW3dw0YR1z9kWZ2gvElT1bTn0dPRjlFZCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EUyoWlTGZGXSWnvjmHD5Zjla5/xx7yPD/LK9JzM2gz4I/+IyHiN4UdvOBZisj8Cmv CWkrek4hUV+kZRPG+Xl4im6b7x8x/kJbCIj/u7tQ6RuZb64XQs1n/jLva6u2/nbsVm sneYwWYEv9RUAiBhWSaGEvSQtiUPliRQBRATm+B4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Andy Duan , Fabio Estevam , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Sasha Levin Subject: [PATCH 4.9 012/137] serial: fsl_lpuart: clear parity enable bit when disable parity Date: Mon, 11 Feb 2019 15:18:13 +0100 Message-Id: <20190211141813.142149179@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141811.964925535@linuxfoundation.org> References: <20190211141811.964925535@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 e2ec04904f54..5c471c3481bd 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1344,6 +1344,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 */ @@ -1487,6 +1489,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