Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2654829imj; Mon, 11 Feb 2019 06:32:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/tORMogKUIpMu15cahvz3w0ckaZc1R24uruXF2g6jrOwHZ07OrdYsEdP1mEjP2yP1eKRb X-Received: by 2002:a63:d444:: with SMTP id i4mr14991297pgj.237.1549895552419; Mon, 11 Feb 2019 06:32:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895552; cv=none; d=google.com; s=arc-20160816; b=HXwxsnse8xNxBALzdAKiSFrsQK5yaD/ckDkfIXLQJkDN3EQPtfKwnJrYaKKSekrQPn JBsZ8CwsA0JTD2HDAmqbbsGwIe6yZCVSflEbD4hkHjUQzfmsVOOgPsOCaIMk1YS/aS2e XFKWUbsIR2pE8NS9JiTUbgmvQXpQYcGmELJ5CD8tlpClfxzoLqykBV52ma/aBpmpcAqu l3A01z6VDEkhTdYP/kqHacCKPIaZJ3JIhsbGsOCvfczrt4v0sBwT2z+rujalG/tZbV26 c9dKX4NJJFh1x2YAVRsrvE5QiaMTfooZ+l6DDvYOXkz4EHUfcy553laXADkaRSGGLVdn sn4Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OrkavdHs7nA2KpipcmssrgOXu1ngmKKIynVX4KGFydU=; b=dX6GsWPv5C/2uJ6FI431Q5yToSfSHHhl3RkUXcmKS3kK8OxDU6VhSTulOG6urUhTzy d9DkwwfLVYTcZ+B2qLKx6a5FIm035+R0a/cXIV3o7fo2CDFh3VMjBAS2UVrLsEd670ah 7y0PB3e9/Dc2SJuHsNwA1gGtG3GlD/UxUxWLMvgi0kuQS1MuNHghaL/ggu0k4azd2/9k Wq6jpmpJBV2s2cPwwPyAA6LPyueITh3/6lPiD+URMyZ4a+BVoX13Hf16noULvBrA5oD8 qOlDsAfPMmvuHea4TFtQlRq+1SY3wDsoOLRwUkbWMOMiAd8gwXNyyGYfUu3F0NeDRvsN /yXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a6j5MfQE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2si5774398pgc.449.2019.02.11.06.32.15; Mon, 11 Feb 2019 06:32:32 -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=a6j5MfQE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730259AbfBKObN (ORCPT + 99 others); Mon, 11 Feb 2019 09:31:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:37920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729670AbfBKObK (ORCPT ); Mon, 11 Feb 2019 09:31:10 -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 8969C20838; Mon, 11 Feb 2019 14:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895470; bh=Enu4ctradxyBZdgzdrzNB4zd6gHjAy/IJFIWQJzxvBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6j5MfQENwa0KCLLz5T+aaLTHrELWZUwP7LDCP2qSc6NlRh52buNPLhjfXoVKWzNm tdXUXtsFtEZ2/9Th7qheijK1t376KI7Z5jZZG/wi83KkwjtbG8AYFqPn6XJqUrpQ9e kvZs516Ulqzgil+mzjMGKfeKQA/6ie39lx2d56Q8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Beomho Seo , Marek Szyprowski , Sasha Levin Subject: [PATCH 4.20 184/352] tty: serial: samsung: Properly set flags in autoCTS mode Date: Mon, 11 Feb 2019 15:16:51 +0100 Message-Id: <20190211141858.828673041@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 31e933645742ee6719d37573a27cce0761dcf92b ] Commit 391f93f2ec9f ("serial: core: Rework hw-assited flow control support") has changed the way the autoCTS mode is handled. According to that change, serial drivers which enable H/W autoCTS mode must set UPSTAT_AUTOCTS to prevent the serial core from inadvertently disabling TX. This patch adds proper handling of UPSTAT_AUTOCTS flag. Signed-off-by: Beomho Seo [mszyprow: rephrased commit message] Signed-off-by: Marek Szyprowski Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/samsung.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index da1bd4bba8a9..2a49b6d876b8 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1365,11 +1365,14 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, wr_regl(port, S3C2410_ULCON, ulcon); wr_regl(port, S3C2410_UBRDIV, quot); + port->status &= ~UPSTAT_AUTOCTS; + umcon = rd_regl(port, S3C2410_UMCON); if (termios->c_cflag & CRTSCTS) { umcon |= S3C2410_UMCOM_AFC; /* Disable RTS when RX FIFO contains 63 bytes */ umcon &= ~S3C2412_UMCON_AFC_8; + port->status = UPSTAT_AUTOCTS; } else { umcon &= ~S3C2410_UMCOM_AFC; } -- 2.19.1