[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsRAnWgsoSHmrFE5@hovoldconsulting.com>
Date: Tue, 20 Aug 2024 09:07:09 +0200
From: Johan Hovold <johan@...nel.org>
To: Bjorn Andersson <quic_bjorande@...cinc.com>
Cc: Sebastian Reichel <sre@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Neil Armstrong <neil.armstrong@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>,
Chris Lew <quic_clew@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Stephen Boyd <swboyd@...omium.org>,
Amit Pundir <amit.pundir@...aro.org>, linux-arm-msm@...r.kernel.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2 3/3] soc: qcom: pmic_glink: Actually communicate with
remote goes down
On Mon, Aug 19, 2024 at 01:07:47PM -0700, Bjorn Andersson wrote:
> When the pmic_glink state is UP and we either receive a protection-
> domain (PD) notification indicating that the PD is going down, or that
> the whole remoteproc is going down, it's expected that the pmic_glink
> client instances are notified that their function has gone DOWN.
>
> This is not what the code does, which results in the client state either
> not updating, or being wrong in many cases. So let's fix the conditions.
> @@ -191,7 +191,7 @@ static void pmic_glink_state_notify_clients(struct pmic_glink *pg)
> if (pg->pdr_state == SERVREG_SERVICE_STATE_UP && pg->ept)
> new_state = SERVREG_SERVICE_STATE_UP;
> } else {
> - if (pg->pdr_state == SERVREG_SERVICE_STATE_UP && pg->ept)
> + if (pg->pdr_state == SERVREG_SERVICE_STATE_DOWN || !pg->ept)
> new_state = SERVREG_SERVICE_STATE_DOWN;
> }
I guess you could drop the outer conditional
if (pg->client_state != SERVREG_SERVICE_STATE_UP) {
} else {
}
here to make this a bit more readable, but that's for a separate patch.
Reviewed-by: Johan Hovold <johan+linaro@...nel.org>
Johan
Powered by blists - more mailing lists