Message ID | 20221129110012.224685-12-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp264516wrr; Tue, 29 Nov 2022 03:03:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qFxjGKd/Cs8AxJRacRheaw1B6XUKai4/OeoZBI3cr2r1h+7xnfsjS6h61ES2sfCh/siPA X-Received: by 2002:a17:906:9c8a:b0:7bf:6698:d444 with SMTP id fj10-20020a1709069c8a00b007bf6698d444mr9132429ejc.548.1669719780601; Tue, 29 Nov 2022 03:03:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669719780; cv=none; d=google.com; s=arc-20160816; b=FlrEX/72qX3vAupsKbuAohr3f2GT7e18j2gkymJeak6ifKpq2xmVnwoIlREyI0ooqH Sw7Lw43hpyTRwfAkeJMAuurojvvIqDw+uFa/xJCvotoo3a0iCLSgfJmAhn5vrgpAx3M2 yiLCxNZ2u/moB7mJTgYnEK2TbY1Ur3sqZ2BC7cDsyEr3Q1CL9ndGTVlnQpv+ac5bZmDP U4uMPGiUWRRrrUaGn2R+vQ7Cjyi9Ci/FxTYDUjjIaGZKer0zGOOsnJa9TWCnlW02OhRX fGhVnCaw8Dn0KNEwXZetnr1aom1k6e6tqLASvpUDo5Kf4tavex+LdySpFBt2fZRJ+4v4 M4jQ== 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=1ae8HveYcHh2T2XBLR+r4ZEzx3jbK8wRJY72T1zrZRE=; b=LBXtSUvYHx9ia/duarYn8Aczn0eHLmSagGIIl37HYOAE5AG9xjt+HVEQphUdUFbfL6 eiRHUJBngIW18NW3BXEJX90iUXyPt0QlQmO9QEs4LCyjUaQbDHgOkGm/oKPQpFqaruiP sc6gaa0aSQCrAMrxeHXVPipYts5lUgi5l60lKhssR6BTtA7UQ3tpfS9vXA/L3kDLvvBf +zdSQVgdyvdfXb/fVK0PXDkwYCk3huqhrSNveP9l0gemAiUXAe4HjMrTLdeLqVtsTQlP r4qSTG7bPucr94jxC0eOYasztkNV7YMBIyruvplubGcrZtx+mGNDBTHSD6CK/kN2lFJG ZIbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=zs9qEIDK; 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 dn2-20020a17090794c200b007803e371aedsi633908ejc.161.2022.11.29.03.02.35; Tue, 29 Nov 2022 03:03:00 -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=zs9qEIDK; 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 S232816AbiK2LBX (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Tue, 29 Nov 2022 06:01:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232616AbiK2LAg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 29 Nov 2022 06:00:36 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0143A60E9B for <linux-kernel@vger.kernel.org>; Tue, 29 Nov 2022 03:00:29 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id x17so21448180wrn.6 for <linux-kernel@vger.kernel.org>; Tue, 29 Nov 2022 03:00:28 -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=1ae8HveYcHh2T2XBLR+r4ZEzx3jbK8wRJY72T1zrZRE=; b=zs9qEIDKNQLt9OsNEzm5stFfcAJFZLYlEZ6yB4ivjkdmPKQCfM208NpOyM5sF1X/65 rkry25ss/0gHV7zvrsIYPEoQMfWKM9/GjyqepT0GCr9OinpKLi3RXHdCouq02kJz3nup Cfljw853Y67vwVD2kx6zJBEBv4MyaMiLkHLKzSzZ6z7bMhqG+udc8BPVSnNyfFF9d55f IRwmEyLUnuY/jrylBUVV1GVeiMek7y4DYyDYYcoblDmUc1oi6KOH2olozbXCtP/GN+Kl KCDU/t5slqAEmpCQXY02o+RtwebcbZzke/bhnWdHBgFTOATqxWUfJMvwAX/Xm35TqSaQ MZyQ== 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=1ae8HveYcHh2T2XBLR+r4ZEzx3jbK8wRJY72T1zrZRE=; b=IJr5F3GywUJxJ9VQwGoNp5WCiMsHBIERu2xJcxQPlXXv5w4f9PwcHQgbPtvzZyWzCh XpgNyOe5G7VSrWmIqoJ4Zn2cvO0U3xhyd+Wb1NepRmniBzBgXClrgQ3WBNAALzEjVJ9V rxYwqh++ilnDl+LbTINrSMcNN8TKTWHS0fjbbkILVv0atFPf0fW0HkdV+Il6xOMQLnv3 d8IaG6zT5T8aTTTlGj+GhaS4eiKTqfuZtTj92gemz888MNaUAa8/iWrWG9EeR/kI2OIz nV4Iga5RDGpkZYAQVUIXaY+WWC1SGFKoFbSQicvqLB8A8k5jIC0Qz+YLOHYbUh8yl+8t crDg== X-Gm-Message-State: ANoB5pkFTKd+0G+IOZBnLNwfr0qIxGhLTBDpua3RtOr30938IWo7jYB0 bdXAt+pkDp7WqZzTg91a9vPpkQ== X-Received: by 2002:a5d:42d0:0:b0:241:d8e2:868d with SMTP id t16-20020a5d42d0000000b00241d8e2868dmr26645126wrr.671.1669719628529; Tue, 29 Nov 2022 03:00:28 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6b19:1d8e:fbca:fd02]) by smtp.gmail.com with ESMTPSA id q19-20020a1cf313000000b003a3170a7af9sm1617658wmq.4.2022.11.29.03.00.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 03:00:28 -0800 (PST) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Vinod Koul <vkoul@kernel.org>, Alex Elder <elder@kernel.org>, =?utf-8?q?Ilp?= =?utf-8?q?o_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Konrad Dybcio <konrad.dybcio@linaro.org> Subject: [PATCH v4 11/13] tty: serial: qcom-geni-serial: stop operations in progress at shutdown Date: Tue, 29 Nov 2022 12:00:10 +0100 Message-Id: <20221129110012.224685-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221129110012.224685-1-brgl@bgdev.pl> References: <20221129110012.224685-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750828088717256256?= X-GMAIL-MSGID: =?utf-8?q?1750828088717256256?= |
Series |
serial: qcom-geni-serial: implement support for SE DMA
|
|
Commit Message
Bartosz Golaszewski
Nov. 29, 2022, 11 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 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 <bartosz.golaszewski@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> --- drivers/tty/serial/qcom_geni_serial.c | 3 +++ 1 file changed, 3 insertions(+)
Comments
On 29. 11. 22, 12:00, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > 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 <bartosz.golaszewski@linaro.org> > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > 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 fe15fc0e1345..c0270eec2a66 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -864,6 +864,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); I'm just asking without actually looking into the code: cannot the interrupt reschedule/restart the above? thanks,
On Wed, Nov 30, 2022 at 10:37 AM Jiri Slaby <jirislaby@kernel.org> wrote: > > On 29. 11. 22, 12:00, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > 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 <bartosz.golaszewski@linaro.org> > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > --- > > 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 fe15fc0e1345..c0270eec2a66 100644 > > --- a/drivers/tty/serial/qcom_geni_serial.c > > +++ b/drivers/tty/serial/qcom_geni_serial.c > > @@ -864,6 +864,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); > > I'm just asking without actually looking into the code: cannot the > interrupt reschedule/restart the above? > It can actually, good catch, thanks. Bart
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index fe15fc0e1345..c0270eec2a66 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -864,6 +864,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); }