Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2683710imj; Mon, 11 Feb 2019 07:00:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IYPa5iKLURIK1rKodax5RbJnMSk0WRkCft/B9iD2+kKDQ6QK7iR0J+mh9Ycs2i/NPBz/qB+ X-Received: by 2002:a62:2a4b:: with SMTP id q72mr36749906pfq.61.1549897231970; Mon, 11 Feb 2019 07:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897231; cv=none; d=google.com; s=arc-20160816; b=A+vsNhCqja86Ab1kRC6WdjEazqjRuMtgZFZ8yyGhh3fn2XSHvVK3Bbwd39ZnQorIZW Uog6DmbKFKFEf/Tq7++Za3z7Xy13PxQcETKfSbMEoA3x/QUCNWkLwm46grgmy2XPO9vJ TWyjYYDgVcyVclput61SddZdhkKiVe9rH54T5eFgPF1/GYi2W0Wj+x++hScCp6QOnG8j SVA8/mn+WKOwHs43Eaida3OPCBvbIcYkw66oKrSEo3UXVR6FiUO07kr7LSIw86wc2BiE f87a9p8yGqFMlKpb7zm6GWJ41my5Re+575aqi1/BtlfMcB2bpLNp38u9vQLfh4GXp3BU sCxQ== 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=I7x0ZPLJt5D5j6aBIiy7tuDTn+TPx7Hh3US22oqfrl8=; b=N5gh/q9y1o4Ld8wPdYtpQZ+lubGP7usilpu9MG2SGlt33CeiWaXrgGrvB1i/Q9Z/Bi B3NKKRkyN5rODA13tKTCEf1AAer+DgtFnfMZpJThBJETCBIRiJAN+BJoCxcboIaI3xjM eeR1BnB+oeHBJfAdeTm3mvPswxAcsod4rK4d/38vMpCwYmoeCxvdlxtR+unxcyDs9Pag 97nundHh5nKSbwTqGcEHAiy0Hn8ggulZASYwX9jXpkLH9ZwYSrs37jk+WCUj38bqQCNK 5h7Slyasb/+W+EIWPgPeT4td6ti59YMziTbrY7vVM38ySK7UpsZIY8YOcy5ss2RGPimU zZiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Zy6xR/1+"; 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 g7si2278528pgd.460.2019.02.11.07.00.14; Mon, 11 Feb 2019 07:00:31 -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="Zy6xR/1+"; 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 S2389696AbfBKO6v (ORCPT + 99 others); Mon, 11 Feb 2019 09:58:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:46500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389639AbfBKO6r (ORCPT ); Mon, 11 Feb 2019 09:58:47 -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 19A0B222A6; Mon, 11 Feb 2019 14:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897126; bh=aoloXDOheKaCFBTBvO0HrFVbMYz3KQkpCXZ6D6eDmSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zy6xR/1+wfy3bMyCEo03gHpfekCW6UdI+nJOPkuadm57Gqj3EmQdwBpgwVbeM38+2 raMH+x/7n0z8/eQhKatSeC63Ael8kZ+brdhRSrye5/oTaQ6DxWQnivmGj13xzo/3CX NYlMznUULjpIkAfbwnoVOjS0nYwBUfMjYPbK17F0= 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.14 100/205] tty: serial: samsung: Properly set flags in autoCTS mode Date: Mon, 11 Feb 2019 15:18:18 +0100 Message-Id: <20190211141835.136540637@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@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.14-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 57baa84ccf86..f4b8e4e17a86 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1343,11 +1343,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