From patchwork Wed May 19 00:07:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 12265811 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=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 581A2C43470 for ; Wed, 19 May 2021 00:09:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D77786135B for ; Wed, 19 May 2021 00:09:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D77786135B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=oRvXX0yqK58aKfQhqC8ScIXqzQst50mTnh4asRuGLYY=; b=pMC+Tl4p9iD5GhZlSMYzvoqh3Z RmaA/gJTGrktUSbLo/Roe1c/0aToY6gmFuK9XoBgrbsJ/jzs2kIYtu7AkGf0ocTfV7IjNqfDOXGko 5z01xdrNSN29lPtYlTpAmOCDjC1LadwpQyz9g+C6v3R32jqKDlQ8NoY1PQnZnTcp0WtvF4/+FNtTZ ALsO2OchRA5iGuzJeOmVSueUYv77ATSuckkS9cYwYl5hmck4yEbyplEP87FIZonZNHrD5SZ/Xhywe VUKg+nD3Dd5bzGE6qU7ac6knZjrzR0QbdhLNPVsWVlYDIJiTIxvHbw0PZ8Wq1dgEkfZtKlxU1EKEY 5HFuaV2A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj9kI-002EFi-C7; Wed, 19 May 2021 00:07:31 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj9kF-002EFZ-1n for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 00:07:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=kIJvSpFWD6QHDHPhzb9ntcgPgn4w/LCFBFJ9RCTjTi4=; b=Ho1vagr8OGVDc75Ult5RJ2Jd62 FTegcoBgG0IW+0+8I7j259mwvGt3Tey/FQ70j9jjY2RRvZWnOTPUZUDyGmzgZDOZ1GGhA5yb/vZFN 8b/+7jb1bVzXq9+DrwOetvivE63JPEoNpdnwgx6GQIRg3cedHBmT+3wUIpmmWtaIARnsbrQqg+ey2 rTy57IbP3Aard7CNdcroagt0OrW8+G3+qliZ4HWARA9U1ssSfGLq9kq97hrgcznVhDZgf1SpRouuK lFXgw4TGhAKapwHyI6Fgwf7BIvAqJYC4g8e/zTU0skD4W0qwVWgfRthkm+PBbF3eWqnGPpz3m6aqy 3Ok6RPjw==; Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj9kC-00F2J4-B4 for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 00:07:25 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 6FA455805F7; Tue, 18 May 2021 20:07:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 18 May 2021 20:07:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=kIJvSpFWD6QHDHPhzb9ntcgPgn 4w/LCFBFJ9RCTjTi4=; b=TIoHkM0sHSsjducPcvC1Ss4gb/P7sKBK6ZOfm8TTtc d0Yz4mjGZdZWjlJBvIFYU8Zty0FCMcs7Scjz3M1BqUcLdLxZt5Cf9L8ZuyAOJ98q AOWnPF3cNzVPcmcPccvfGbJgJBpBpGqcduyVkQ4xq6azYznWRNpO4NuqYa3LmFXB IXyTghSN8PGvupj16+PzLFuA9a1M966seYeG6N4AAJY/64FtqxOLeel8FOtUSILP gbvxbk/LjuU7FDxbl2r0Q0VQ393NavsbdQKKsZkrQnKq6yK3lKxEwtjJAs9lH7F/ OqKgRhkRvc2JuOSjQZCkJJ7cCKxPK9Y5TnhMrAZZvPQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=kIJvSpFWD6QHDHPhz b9ntcgPgn4w/LCFBFJ9RCTjTi4=; b=Uuf834IhHqMCxkknLbgFvWhJg98elUBWc y76VXgu0cBj7bSApJojkBQ6tXG13hGvHkzvMJxW0uSdKG9iozyt71z73R/Z48sev CSeJallINraOnhkLw7HGmtPx9DLEadhOijl6gxKmYmQpg1Ule1Nea+CO/JyaPS3o yhg2JrSYjUpJFit7X61q20weLLokZ41X2J/1QpsZ3zW36b2tgm23Tkm1GrkgrehV vFJKXiniWI03Uez6TbhxVEWzWW05t4ksc9RbJXeoHgLQ3HBUxNk6/C1vUE1Nd2Fc 5DI5PL63nj5Id0l1tuwHNjniTyb2n1rhBF7EEbRbf+TxY1gcDT4bA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeikedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegrjhdr ihgurdgruheqnecuggftrfgrthhtvghrnhepieetheduveelhfdvvdejleeuhfelteevhe ffgfeitdefgeekjeefieevgfehhefgnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghen ucfkphepvddtfedrheejrddvudehrdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruh X-ME-Proxy: Received: from mistburn.lan (203-57-215-8.dyn.iinet.net.au [203.57.215.8]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 May 2021 20:07:17 -0400 (EDT) From: Andrew Jeffery To: linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, joel@jms.id.au, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, jenmin_yuan@aspeedtech.com, ryan_chen@aspeedtech.com, miltonm@us.ibm.com Subject: [PATCH v2 0/2] serial: 8250: Mitigate Tx stall risk for Aspeed VUARTs Date: Wed, 19 May 2021 09:37:02 +0930 Message-Id: <20210519000704.3661773-1-andrew@aj.id.au> 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-20210518_170724_472736_F6D25E76 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, Briefly, the series works around a hardware race condition in the Tx path for Aspeed virtual UARTs. A write burst to THR on the APB interface may provoke a transfer stall where LSR[DR] on the LPC interface remains clear despite the presence of data in the Rx FIFO. For the work-around patch, v2 addresses the request for a comment about the use of serial_in(): https://lore.kernel.org/lkml/d7918dcf-b938-498c-a012-3d93a748431b@www.fastmail.com/T/#md75702fbc3704bd4b375f1251a1415bcddea26a3 The second patch addresses the request for use of BIT() instead of an explicit shift by converting all of the UART_{CAP,BUG}_* macros. Please review! Andrew Andrew Jeffery (2): serial: 8250: Add UART_BUG_TXRACE workaround for Aspeed VUART serial: 8250: Use BIT(x) for UART_{CAP,BUG}_* drivers/tty/serial/8250/8250.h | 32 +++++++++++---------- drivers/tty/serial/8250/8250_aspeed_vuart.c | 1 + drivers/tty/serial/8250/8250_port.c | 10 +++++++ 3 files changed, 28 insertions(+), 15 deletions(-)