From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DC3844AB62; Tue, 21 Jul 2026 21:18:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784668698; cv=none; b=nhiNsCZ0Zo7AZ5pW1cYE2U0uIVXR+urWo/q525ENHe75o2pjFkKFqt0FmOy1xTENcDnFqXcZdMiZQWlcTUNJUgILgxO3zhqg59MIdvfcVCQq8z9vJm6bM8r9n7Cr1FLYbAMEWhUmToZXuJeIyASoAAhaXTLnae6arnLgXpsCaTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784668698; c=relaxed/simple; bh=eyk8B9UY+NvCOTYWafk7tXOX2epMc9CVVRYzeDoCRKo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JoRlTxtJD58fwzj5tSVCq7ML25CcZH469pZHuQl5XB444U/2LgWAj7pwo1B1lfD3bbM06GZxlNbEuDWJWR3GV2urFys2Cts4gjPcIb8vTaW94BWzBE1F20hVjGKacF6HSMGdK+je5xC8JG3NnUIz1lA5v0T3UUsu9bf439WWV3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fQasnnJh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fQasnnJh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F337B1F000E9; Tue, 21 Jul 2026 21:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784668697; bh=+n82MbYaYPUMieuPpQz39TXeT8DKeeCKohqU+dXYqB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fQasnnJhOKGHqOkdl6tTRJ2U4EDxao1tDEpn0o1ayfGoCvv3zPEbbAtOrgZMDbKPV F1GFuNEEjqOUAcAJPV3bHIdzD1Nu97kpombCu79Rx6CnQvmQ79t9RjToeUZj8SHznZ I8N9QHPgyR6e6g/G8pCGxb0tFNVhBI3lWsgguep8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Matthias Feser , Moteen Shah Subject: [PATCH 6.1 0273/1067] serial: 8250_omap: clear rx_running on zero-length DMA completes Date: Tue, 21 Jul 2026 17:14:34 +0200 Message-ID: <20260721152430.701701309@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152424.521567757@linuxfoundation.org> References: <20260721152424.521567757@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthias Feser commit 061b627ba534230a18ec4d7251562af12325d06a upstream. On AM33xx RX DMA only triggers when the FIFO reaches the configured threshold (typically 48 bytes). For smaller bursts no DMA request is issued and the FIFO is drained by RX timeout. In this case __dma_rx_do_complete() can legitimately see count == 0. The current code exits early in this case and does not clear dma->rx_running, leaving the DMA state inconsistent. This can prevent RX DMA from restarting and may cause omap_8250_rx_dma_flush() to fail, marking DMA as broken. Fix this by clearing dma->rx_running once the DMA transfer has completed or been terminated, even if no data was transferred. Fixes: a5fd8945a478 ("serial: 8250: 8250_omap.c: Clear DMA RX running status only after DMA termination is done") Cc: stable Signed-off-by: Matthias Feser Reviewed-by: Moteen Shah Link: https://patch.msgid.link/BE3P281MB55155F2F5795E411F5A65282EE0B2@BE3P281MB5515.DEUP281.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -864,11 +864,12 @@ static void __dma_rx_do_complete(struct dev_err(p->port.dev, "teardown incomplete\n"); } } + + dma->rx_running = 0; if (!count) goto out; ret = tty_insert_flip_string(tty_port, dma->rx_buf, count); - dma->rx_running = 0; p->port.icount.rx += ret; p->port.icount.buf_overrun += count - ret; out: