Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3700543imu; Mon, 28 Jan 2019 09:15:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4oPXwrd2BBuBqKo9GUjhN4kAUs/SeWP2vF/67fVxBlj7tuT7JEAZ85o9sd4Lhxflz+62ro X-Received: by 2002:a63:ff62:: with SMTP id s34mr20684887pgk.325.1548695756946; Mon, 28 Jan 2019 09:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548695756; cv=none; d=google.com; s=arc-20160816; b=XNh0yi0fdKYLwZNJgFdoFryMg7oN4Pkq4Ipjbn3oFdTdjtS3u1jE+9hjQ8C2XPVqad 290VaNLqndDMFlF8ZlGEwFLS9MSHeCszLRoBCSzGmXNw2y9HVqTXNPqKukfY7GqquoHY wakOfQaStkvDrgdoLdIfeDmiV4NoFCz3vEesxTSgHmlRfn2oCVNGCfqDA70ei4znt8O9 gC8q5vKblqZB+CFrKT/uWGZ+1oAt4OffxJlmCa6dtu6dsZ4gNqnzHulPTdaEhX+9QRbm Z/teye3gkEWuYIVLpLj6qNpQnzHjsXoOHKShmGAosVK1aIY9cI4j6B2UvsumKGE3Ghiv 476Q== 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=+igRLwFH0lQfZKLO3DZO3/ZyArvoSZxuXrmMSAh7H1A=; b=IfVpeza9OzxoPa5YWAH9WhsizMJeWC2p+gTKNA7I7SPbcThTDnUvyySQHkP0SAfZKo MSLeEExjdA2XLLweTfjxUCKBysGACDzdqfbM1565cdF1ZIi0IMtjg9ybAhmXoDLG/tgE Se15nvNXL5MVykjQZZFm5lZHer4hO+fFVRkAtekXSn4uDWyyfYT9z9QU0ZKg++4Y2O5b E1nugOXByCJ2VHZQ62Y3cg9ImPf+3NOwhX6UBGS1JuA4IShPbfP+RejopIjDlsngcPHs kgOuqlK6+HmOM9FQsf8tdS/SxGndXaU2ZJoVLb6Eol0aNXWkTe8V6y3nNUI9fkoIlf2L c3MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BwBa8VdG; 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 d7si10951579pfo.108.2019.01.28.09.15.39; Mon, 28 Jan 2019 09:15:56 -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=BwBa8VdG; 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 S1732362AbfA1RP2 (ORCPT + 99 others); Mon, 28 Jan 2019 12:15:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:57156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732146AbfA1QHG (ORCPT ); Mon, 28 Jan 2019 11:07:06 -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 E355D2171F; Mon, 28 Jan 2019 16:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691625; bh=9sg0RXQ+2peYOaaRG2FbiVcbSHHL7RYsBC+BOtfRIBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BwBa8VdGL2wzLlRc4cJY7PrRak+ON72fKhUTt0eXva5HdTXtswwUIkWlcH8RN6kPM y0VJQ3o3qu/BveJRYwDpffein34n1+344EbpIf74Si/OQO7XC6R+rlYgUi1SgBw26N TDvHGiggo9dRbaC2WBce6CyQrkQXgua/mSap1gbA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Beomho Seo , Marek Szyprowski , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 164/258] tty: serial: samsung: Properly set flags in autoCTS mode Date: Mon, 28 Jan 2019 10:57:50 -0500 Message-Id: <20190128155924.51521-164-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 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: Beomho Seo [ 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 2f8fa184aafa..c6058b52d5d5 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