From patchwork Tue May 17 11:07:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 12852297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4AEFC433F5 for ; Tue, 17 May 2022 11:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zAV6a8Xwxs+fksOtT/KDYzMFDgg+iNqNpsMlW7jI86c=; b=ZHOUeX8kn/1chJ vCpYys2gsku0cM81GNO3x7FzeN45lcbjBtqfhY/+IeyOdikWcrQis55e8H2I6cjczW60+iX3OZDr9 3qrLlEpakgZBHwjwWurF8YAglZRE1sqEjqypmzo1jsm0OW7C16nmcKr51jzCr1hw92o7vnCCpr4Ce PQBVVOdX4h2RyLIsu7pTQ4vL9o5XfcM3FY2wPpail9OPkSMxhPS/4irs7ur7g9LOJRVuUHZUHJzBr l/ka2gBIcp3F7qrYsvwwsT9I20TsE+gyTj/2p/F/QxGAE1tLf7h4w34uqzgePQ9i4ixTAQkzwzF4Y C9+IJSNBu6D73210rofw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqv3f-00DHOW-9R; Tue, 17 May 2022 11:08:07 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqv3c-00DHH8-HO for linux-riscv@lists.infradead.org; Tue, 17 May 2022 11:08:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652785684; x=1684321684; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4a5Pg6xld+sAqm+8eEi4A+uUzEUIc3jgurKLQWcWFCY=; b=C4wfyTt0MbWyw3Uc8W4FQMEaf8mbpJKHPvAOsxqbRiDmbiDU9HwE2VFB g/Qr1YtRqtoAnMnil0Eu4PHzouezagjy7EIj6pss7kFijw19mFkKV1C0R FncuAzrm26fH5YKHKeNfxJWRE5LnEyOub16za8f13XJKukUCQyQHKZiie LrkpL4cr4bbja6r/7D8OXpcVHzUuVRhz1tWjqeWNKiDpWMp0tb20hJKDR FbzTpmAMWAY1R0gt9CpdUGeXKW4my/F/hLgpnt23hJZuiPNlI0O7bGfaC Uvt7xvPPEGDFajTdGrq3+friIgLyPp3H596Qbol2O4hB9wR/vG7Xm5xqq g==; X-IronPort-AV: E=McAfee;i="6400,9594,10349"; a="296422422" X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="296422422" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 04:07:52 -0700 X-IronPort-AV: E=Sophos;i="5.91,232,1647327600"; d="scan'208";a="568830858" Received: from mtarral-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.52.88]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 04:07:50 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 0/9] tty/serial: Termios flag fixes Date: Tue, 17 May 2022 14:07:28 +0300 Message-Id: <20220517110737.37148-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220517_040804_663290_FA0D505B X-CRM114-Status: UNSURE ( 8.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Here are a few termios flag fixes, mostly CSIZE but a few other flags as well. The fixed flags returned to userspace should now match to what the driver is using. Incorrect CSIZE also causes a miscalculation of timeout in serial core (but it might not be a huge problem being just a handwavy long timeout). Ilpo Järvinen (9): serial: uartline: Fix BRKINT clearing serial: digicolor-usart: Don't allow CS5-6 serial: rda-uart: Don't allow CS5-6 serial: txx9: Don't allow CS5-6 serial: sh-sci: Don't allow CS5-6 serial: sifive: Sanitize CSIZE and c_iflag serial: st-asc: Sanitize CSIZE and correct PARENB for CS7 serial: stm32-usart: Correct CSIZE, bits, and parity pcmcia: synclink_cs: Don't allow CS5-6 drivers/char/pcmcia/synclink_cs.c | 6 +++++- drivers/tty/serial/digicolor-usart.c | 2 ++ drivers/tty/serial/rda-uart.c | 2 ++ drivers/tty/serial/serial_txx9.c | 2 ++ drivers/tty/serial/sh-sci.c | 6 +++++- drivers/tty/serial/sifive.c | 6 +++++- drivers/tty/serial/st-asc.c | 4 ++++ drivers/tty/serial/stm32-usart.c | 15 ++++++++++++--- drivers/tty/serial/uartlite.c | 3 ++- 9 files changed, 39 insertions(+), 7 deletions(-)