From mboxrd@z Thu Jan 1 00:00:00 1970 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 26B27E7B5F9 for ; Wed, 4 Oct 2023 12:13:36 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qvz9HpvVAFVSMXBv3JiiTGTkZMq6+1hIagrV7pDtZUc=; b=OVlcfCoY1Jb9zh Yd7GDZk6wQfdAV5UjB08tjtOK24n9JhFhsUi+TDhrJ5ECTPgouaNmY9tQ27m+zFITHR29OLxNu5T3 w+VQhNIBj272yUTl7KjTPEOdCilLQbMBREoZ39cTPOYpOXzECQWquwg99ZGkgxjtHV9Xe1McTUkcL sd4RuxsMUW25V6LZA/3/pVjO9iustnds9ABevLTMVkb9ldXJAVCD7ybvW+evvBwm4MMZkPYEoAkCy /gvfQreHP80/zfovnSMwofxR09X29c4D5D+qPtvmY3YI4KvHQ12GvdBpn9vdQtXGLuuKghKec12sC YK0zJf9px+2lsn25wuKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qo0kX-00HZo7-3C; Wed, 04 Oct 2023 12:13:09 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qo0kV-00HZmN-0g for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 12:13:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 97116B818A3; Wed, 4 Oct 2023 12:13:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65BF9C433C7; Wed, 4 Oct 2023 12:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696421585; bh=Kk4cv0xkH9oZilc86UHlE6Zvb/RSMcav/ebFcJBFk0Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tr1fAs69JCHQL+EO6CQj06Lxavr7lTS0rTnd5CrdNMxnstw/2jnUO8E4o2urG0052 YO/OUciFJ1Hz6GRoJ+3P3uK2nWjKI13mGUoVC03DxYT/wON7ik+yBSUy4FJm3UZn11 ALolc2AWyGyrJSF8RZoTQfG8LcN6MEH8NLTPCBJk= Date: Wed, 4 Oct 2023 14:13:01 +0200 From: Greg KH To: Paul Geurts Cc: jirislaby@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] serial: imx: fix tx statemachine deadlock Message-ID: <2023100450-charger-disregard-9683@gregkh> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_051307_395489_E41DF799 X-CRM114-Status: GOOD ( 15.29 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 04, 2023 at 11:57:22AM +0200, Paul Geurts wrote: > When using the serial port as RS485 port, the tx statemachine is used to > control the RTS pin to drive the RS485 transceiver TX_EN pin. When the > TTY port is closed in the middle of a transmission (for instance during > userland application crash), imx_uart_shutdown disables the interface > and disables the Transmission Complete interrupt. afer that, > imx_uart_stop_tx bails on an incomplete transmission, to be retriggered > by the TC interrupt. This interrupt is disabled and therefore the tx > statemachine never transitions out of SEND. The statemachine is in > deadlock now, and the TX_EN remains low, making the interface useless. > > imx_uart_stop_tx now checks for incomplete transmission AND whether TC > interrupts are enabled before bailing to be retriggered. This makes sure > the state machine handling is reached, and is properly set to > WAIT_AFTER_SEND. > > Signed-off-by: Paul Geurts > --- > drivers/tty/serial/imx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) What commit id does this fix? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel