mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Johan Hovold <johan+linaro@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, stable@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2 4/7] serial: qcom-geni: fix receiver enable
Date: Wed, 9 Oct 2024 16:17:17 +0200	[thread overview]
Message-ID: <ZwaQbcuIPrR9HwKi@hovoldconsulting.com> (raw)
In-Reply-To: <CAD=FV=Vwmb8Miyca4kE1sdjMCx7LVCYqaXhLmPPqsojUHdEk-g@mail.gmail.com>

On Thu, Oct 03, 2024 at 01:10:47PM -0700, Doug Anderson wrote:
> On Tue, Oct 1, 2024 at 5:51 AM Johan Hovold <johan+linaro@kernel.org> wrote:

> > @@ -1179,6 +1179,11 @@ static int qcom_geni_serial_startup(struct uart_port *uport)
> >                 if (ret)
> >                         return ret;
> >         }
> > +
> > +       uart_port_lock_irq(uport);
> > +       qcom_geni_serial_start_rx(uport);
> > +       uart_port_unlock_irq(uport);
> 
> I _think_ you don't need the locking here. The documentation for the
> "startup" callback say:
> 
>  * Interrupts: globally disabled.

Heh, yeah, that comment dates back to 2002 and probably wasn't even
correct back then.

This function is called with the port mutex held (and interrupts
enabled), and I need to take the port lock to serialise against the
console code.

> Other than that, this looks reasonable to me. I seem to recall
> previous discussions where _someone_ was relying on the
> qcom_geni_serial_start_rx() at the end of termios for some reason
> (which always felt like a bad design), but I can't find those old
> discussions. I suspect that the fact that you've added the start_rx in
> startup() is what we needed.

Yeah, I tried to find a reason for why things were done this way, but it
was probably just copied from the vendor driver. The hardware doesn't
seem to require stopping rx in set_termios() (and tx is not stopped
anyway), which could otherwise have been a reason.

Johan

  reply	other threads:[~2024-10-09 14:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 12:50 [PATCH v2 0/7] " Johan Hovold
2024-10-01 12:50 ` [PATCH v2 1/7] serial: qcom-geni: fix premature " Johan Hovold
2024-10-01 13:50   ` Mukesh Kumar Savaliya
2024-10-02  2:07     ` Bjorn Andersson
2024-10-09 13:43     ` Johan Hovold
2024-10-03 18:29   ` Doug Anderson
2024-10-09 13:55     ` Johan Hovold
2024-10-01 12:50 ` [PATCH v2 2/7] serial: qcom-geni: fix shutdown race Johan Hovold
2024-10-01 13:36   ` Bartosz Golaszewski
2024-10-01 13:39     ` Johan Hovold
2024-10-03 18:30   ` Doug Anderson
2024-10-09 14:10     ` Johan Hovold
2024-10-10 22:30       ` Doug Anderson
2024-10-11  6:51         ` Johan Hovold
2024-10-11 14:30           ` Doug Anderson
2024-10-18  9:21             ` Johan Hovold
2024-10-01 12:50 ` [PATCH v2 3/7] serial: qcom-geni: fix dma rx cancellation Johan Hovold
2024-10-01 12:50 ` [PATCH v2 4/7] serial: qcom-geni: fix receiver enable Johan Hovold
2024-10-03 20:10   ` Doug Anderson
2024-10-09 14:17     ` Johan Hovold [this message]
2024-10-01 12:50 ` [PATCH v2 5/7] serial: qcom-geni: fix rx cancel dma status bit Johan Hovold
2024-10-03 19:55   ` Doug Anderson
2024-10-09 14:20     ` Johan Hovold
2024-10-01 12:50 ` [PATCH v2 6/7] serial: qcom-geni: drop flip buffer WARN() Johan Hovold
2024-10-03 20:06   ` Doug Anderson
2024-10-09 14:23     ` Johan Hovold
2024-10-01 12:50 ` [PATCH v2 7/7] serial: qcom-geni: drop unused receive parameter Johan Hovold
2024-10-03 20:10   ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZwaQbcuIPrR9HwKi@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®