linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
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>,
	Douglas Anderson <dianders@chromium.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, stable@vger.kernel.org,
	Aniket Randive <quic_arandive@quicinc.com>
Subject: Re: [PATCH v2 1/7] serial: qcom-geni: fix premature receiver enable
Date: Wed, 9 Oct 2024 15:43:47 +0200	[thread overview]
Message-ID: <ZwaIk5MlqL3AL_qQ@hovoldconsulting.com> (raw)
In-Reply-To: <b7c9b01a-3bf7-44f2-be8d-24ef5f3fce74@quicinc.com>

On Tue, Oct 01, 2024 at 07:20:36PM +0530, Mukesh Kumar Savaliya wrote:
> Thanks Johan for the fixes.

Thanks for taking a look.

> On 10/1/2024 6:20 PM, Johan Hovold wrote:
> > The receiver should not be enabled until the port is opened so drop the
> > bogus call to start rx from the setup code which is shared with the
> > console implementation.
> > 
> > This was added for some confused implementation of hibernation support,
> > but the receiver must not be started unconditionally as the port may not
> > have been open when hibernating the system.
> > 
> > Fixes: 35781d8356a2 ("tty: serial: qcom-geni-serial: Add support for Hibernation feature")
> > Cc:stable@vger.kernel.org	# 6.2
> > Cc: Aniket Randive<quic_arandive@quicinc.com>
> > Signed-off-by: Johan Hovold<johan+linaro@kernel.org>

> > @@ -1152,7 +1152,6 @@ static int qcom_geni_serial_port_setup(struct uart_port *uport)
> >   			       false, true, true);
> >   	geni_se_init(&port->se, UART_RX_WM, port->rx_fifo_depth - 2);
> >   	geni_se_select_mode(&port->se, port->dev_data->mode);
> > -	qcom_geni_serial_start_rx(uport);

> Does it mean hibernation will break now ? Not sure if its tested with 
> hibernation. I can see this call was added to port_setup specifically 
> for hibernation but now after removing it, where is it getting fixed ?
> I think RX will not be initialized after hibernation.

Correct. As I alluded to in the commit message this "hibernation
support" is quite broken already, but I was trying to avoid spending
more time on this driver than I already have and just look the other way
for the time being.

Note that rx is enabled by the serial core resume code, but then this
hibernation hack added a call to the setup the port after resuming it,
which would disable rx again were it not for this random call to
start rx, which should never have been added here in the first place.

But as these platforms do not support hibernation in mainline, and the
code broken anyway, I'll just rip it all out for v3.

Johan

  parent reply	other threads:[~2024-10-09 13:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 12:50 [PATCH v2 0/7] serial: qcom-geni: fix receiver enable 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 [this message]
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
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=ZwaIk5MlqL3AL_qQ@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andersson@kernel.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=quic_arandive@quicinc.com \
    --cc=quic_msavaliy@quicinc.com \
    --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;
as well as URLs for NNTP newsgroup(s).