From patchwork Fri Jul 19 13:35:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 169250 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3873110ilk; Fri, 19 Jul 2019 06:35:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzful3WscUYpr+C5sPEck4CP7yd0JjmC7crJM1yFSAAokN+/UF3oB2uR1VYpHFRiT6CRglF X-Received: by 2002:a17:90a:258b:: with SMTP id k11mr55498782pje.110.1563543342236; Fri, 19 Jul 2019 06:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563543342; cv=none; d=google.com; s=arc-20160816; b=Dqc9QpdBfCHTkbYtFc04IMg1Fzn0I0XYTrZITySsQyub4FpjcDZQwt1Isok9Oqe28/ gZcAvvgad9LLu64klGVPauc/hgdYfqwuZznlzInZNWIsmHTTKKTMIqwpamOpUyO1w4sJ vzq1E3EwEFXHK087Ick+XdQwNNrSLfZUTcoRt44iQ/Cd5K4B0M0II7c/U/odxRbWp4Ns htC+OzqM6dqZUzw/cV7ny6SDBOfNPEfItX7M7suG+bCkoq4J16jm/T4nuNi31uWu8MX5 SQNNeRh4i7pciS5RAniJXESMGsYrEycW7MOovgpTcEoks5efV/IuxO086JWuJ1O3WuoI pUzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=UEQgVh/XTxo/aOdaHuE+JkfmnXIbxA1VKR7Cphd99+Y=; b=LMl2ZFy3BSoKHJNbRfbX1fMiPaulThy/KGRzBZK88L5nRwxBuDhb5D1XQcVOhWIZW2 Ek5lJ2rMHPXJ1Mena6CDw29DzKMAAHaRhd7r3Rv+AdHT2b2ahzVljz6QgI0AEGW8SipI GkRUxUS4QRAHTrvyy/7BXjXoYFNUqzJQe1/g3oXfnUZRr71Q6128LKuRA0a9T88+XH33 70QoMdSs+bXI4GGhfCdppBxvXWtD/oq28Yc0cpiqfYjOy1/Nyavh7GW2qlgW89Nm2oHE snJzcJ1IBBWYV3Kr4XNDJO4Yfven3UTQ2KhwNDcoFZ+E54ohwI8CjOLvY5e53yqWtsAH X3ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-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 n12si1905954pgi.550.2019.07.19.06.35.42; Fri, 19 Jul 2019 06:35:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727497AbfGSNfl (ORCPT + 1 other); Fri, 19 Jul 2019 09:35:41 -0400 Received: from foss.arm.com ([217.140.110.172]:43478 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728542AbfGSNfl (ORCPT ); Fri, 19 Jul 2019 09:35:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CD6E0337; Fri, 19 Jul 2019 06:35:40 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A61FC3F71A; Fri, 19 Jul 2019 06:35:39 -0700 (PDT) From: Dave Martin To: linux-serial@vger.kernel.org Cc: Russell King , Phil Elwell , Rogier Wolff , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Jiri Slaby , linux-rpi-kernel@lists.infradead.org Subject: [RFC PATCH 0/2] serial: pl011: Fix TX dropping race Date: Fri, 19 Jul 2019 14:35:23 +0100 Message-Id: <1563543325-12463-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org When serial_core pushes some new TX chars via a call to pl011_start_tx(), it can race with irqs triggered by ongoing transmission, overfilling the FIFO and causing characters to be silently dropped. This was originally reported by Phil Elwell [1], who proposed an initial fix. This series aims for a simpler and more robust solution to the problem. Any testing much appreciated! If all looks good, I can repost this on v5.3-rc1 when that arrives. As noted in the patches, I'm not sure that the second patch is necessary (or even desirable). Please test both with and without the second patch, and please comment if you have any thoughts on it :) [1] [PATCH] tty: amba-pl011: Make TX optimisation conditional http://lists.infradead.org/pipermail/linux-rpi-kernel/2019-July/008832.html Dave Martin (2): serial: pl011: Fix dropping of TX chars due to irq race serial: pl011: Don't bother pushing more TX data while TX irq is active drivers/tty/serial/amba-pl011.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.1.4