From patchwork Fri Nov 18 12:25:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 22305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp165824wrr; Fri, 18 Nov 2022 04:28:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf5L3amUq8LOjNIYEKwXJP82nX/ux+wgI5tbNkDUz5T0sRACFfzf4fLAnSdL8H021xZ6Fr9A X-Received: by 2002:a17:90b:3706:b0:218:8759:f15d with SMTP id mg6-20020a17090b370600b002188759f15dmr2732124pjb.135.1668774498215; Fri, 18 Nov 2022 04:28:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668774498; cv=none; d=google.com; s=arc-20160816; b=EwEwlEYnPbtry2GzfZ9AXgucmf5c/HJY00HM2XrB9wtH+O/TJUDNFLy9c3Il8dQ5Ph kb/72MWn/O+BsZSYeodkZxK0VIb4o2Ji5/5susODWPdSQi1uEs25liBuxJtUc5BtucHb KsBs+/ZCnitCoJxYUHXL010qkV4zH18tSSb7KMjXT4V8cDoCiwoBWV93WT7ChF3p4eyt Yk9gadTK5ovv3uP8YP3jkE8KGN/7IfKXNsEnTWcuRkl+AdK802LrdBUGE6nrD4kPM4s2 1yiB53xVlPhpnwsTqfixfo36C1y4RefmziKkWy27JvFSZ7FEM2VTM/fhyIvwTIee7FKW NVhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kA0mRGqH1AuIV+a1MO05ETt4x66olQAeBj4vK+Kxqj8=; b=Hr+4LwXg0ug7993XasFX9xMDkRCWiswjsVQke861GQVei5mEZuGDI6QO13En7cSKru pYG8nIF+FYSLMT+l/dHCovex8JHHwAtx6jWV9rFeU3wDhoRklEB0EjNxXAaPMkAMjPti X8uipMzOK9qPzS7Vq9QxLi2A6DvxzKlyjgUai1ZUu8x0DVdYFk29au+ENaKIWU6avjIY 4bVKJykoO1GA7uKgTCDH6+pwI/YNxvllmHXbY5Lb2nUobgucQAz5zvaoiju312NM2U9n sT7CB5StZpgpNWu0SGB9vJV9qslAFvhjVr7XtwMQdiTuKlRX+9trYKnkVcOw+2Ia6tfC dZEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=hkM7abkK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170902740c00b00186ba56bda8si3638754pll.61.2022.11.18.04.28.04; Fri, 18 Nov 2022 04:28:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=hkM7abkK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241723AbiKRM1T (ORCPT + 99 others); Fri, 18 Nov 2022 07:27:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241823AbiKRM0a (ORCPT ); Fri, 18 Nov 2022 07:26:30 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3123799E8E for ; Fri, 18 Nov 2022 04:26:14 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id o30so3531969wms.2 for ; Fri, 18 Nov 2022 04:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kA0mRGqH1AuIV+a1MO05ETt4x66olQAeBj4vK+Kxqj8=; b=hkM7abkKGR4X3yahLkJH73KCQSaV68CGuVTJlrk2TkbNfZYOmVJ7x5d/hmfeRVUw2W bMJz3Cd3zkdJzfKbE0IsupzbOrHa9Hf5Vt9tnebhKw8SGEExrrH3ReA9zMoULFmgZhRU gID8QLVEX1dQcEB3sEHWFqUNAAEH44wROl1xrg8FyQp6c3uyCsajOuW0ENscAF0EhYbo 9WLVuTAS0xAzUPIAtt6Ao5E5a2uolP+G9WfZsmcMqoigK+o1Z03FyYBjEpfec8HeLf/i pkx4tG/oe1/eipwem9b9l7nV01FDqWtyr+JaEpSAVlyC9BNcWglA7jfYEcxUJ8KAuLPk nZ6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kA0mRGqH1AuIV+a1MO05ETt4x66olQAeBj4vK+Kxqj8=; b=j8cmTG5NVqX+U/miDXG2w+JnpkkAQEooYXih9a+x5iw7w075V1rQp6Qo6SB3MzPZHv dfPJSWfwDvZza/GDpND+agjuDtYSugKevQXPtADKcpfGCgB9aIfLJ0KJ8OPP8K/W1NEf FaS2Dq1v+7MS63BnqQIrUtaqeAdQ4wiEo8anenQarWtN/oVeQTcFV5onj+pfYMkGCDCE xbtfMPPct46nouMDPxfL2PGr3TNOuhg0FHTpO7zsMqy8qgElK1nOaSPvuz4eCIUG73mA byy9CFtWSecNZtkT90KdhBCnB7iM5tPVNig+7cCJnxbhQS0EzpM6NC70g67Hf8SnuyGb P/gA== X-Gm-Message-State: ANoB5pmTCj3JvSubPiIMefPpIrSebfqwftVqxdEIPjdLqeAcSno6bURy 50svidIsBtvQuxYvTQnRtVlh6Q== X-Received: by 2002:a05:600c:18a1:b0:3cf:a9d5:36c7 with SMTP id x33-20020a05600c18a100b003cfa9d536c7mr8256862wmp.13.1668774372729; Fri, 18 Nov 2022 04:26:12 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:b10c:1279:a704:75d4]) by smtp.gmail.com with ESMTPSA id f19-20020a05600c155300b003c6f3e5ba42sm9873958wmg.46.2022.11.18.04.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 04:26:12 -0800 (PST) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Jiri Slaby , Srinivas Kandagatla , Vinod Koul , Alex Elder Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 11/15] tty: serial: qcom-geni-serial: stop operations in progress at shutdown Date: Fri, 18 Nov 2022 13:25:35 +0100 Message-Id: <20221118122539.384993-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221118122539.384993-1-brgl@bgdev.pl> References: <20221118122539.384993-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749836888015556496?= X-GMAIL-MSGID: =?utf-8?q?1749836888015556496?= From: Bartosz Golaszewski We don't stop transmissions in progress at shutdown. This is fine with FIFO SE mode but with DMA it causes trouble so fix it now. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio --- drivers/tty/serial/qcom_geni_serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 6a9f3f937f29..091b8f277a04 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -868,6 +868,9 @@ static void get_tx_fifo_size(struct qcom_geni_serial_port *port) static void qcom_geni_serial_shutdown(struct uart_port *uport) { + qcom_geni_serial_stop_tx(uport); + qcom_geni_serial_stop_rx(uport); + disable_irq(uport->irq); }