From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C37B0BA4C for ; Tue, 7 Mar 2023 19:00:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15C60C433EF; Tue, 7 Mar 2023 19:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678215658; bh=onVm3xFumLM2yGt4WSQ4p84IkZi2wcbDHfrOK3XGPCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zsEWcVPQQYgah3v2G6Xb0AtGRX9JAxa1qoRDD14NHVKRRBQcBuAGkmQiTjGwXfMa+ dsNPvRyF3oL4t3Lt8TebOJfnE9P7AmGUdSfX9SGezFnQJMxCOJWUjU4HVsSS0ybtKZ 6tjYmEFH0IvjHsY1oThpt7NcMkmBO7mZY5uTl/gM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bartosz Golaszewski , Konrad Dybcio , Sasha Levin Subject: [PATCH 5.15 300/567] tty: serial: qcom-geni-serial: stop operations in progress at shutdown Date: Tue, 7 Mar 2023 18:00:36 +0100 Message-Id: <20230307165918.863769089@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307165905.838066027@linuxfoundation.org> References: <20230307165905.838066027@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Bartosz Golaszewski [ Upstream commit d8aca2f96813d51df574a811eda9a2cbed00f261 ] We don't stop transmissions in progress at shutdown. This is fine with FIFO SE mode but with DMA (support for which we'll introduce later) it causes trouble so fix it now. Fixes: e83766334f96 ("tty: serial: qcom_geni_serial: No need to stop tx/rx on UART shutdown") Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20221229155030.418800-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/qcom_geni_serial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index ce1c81731a2a8..e5ca3c3c27d21 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -893,6 +893,8 @@ static int setup_fifos(struct qcom_geni_serial_port *port) static void qcom_geni_serial_shutdown(struct uart_port *uport) { disable_irq(uport->irq); + qcom_geni_serial_stop_tx(uport); + qcom_geni_serial_stop_rx(uport); } static int qcom_geni_serial_port_setup(struct uart_port *uport) -- 2.39.2