[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58b74ec6-8185-42d2-ae64-c5c40c303364@quicinc.com>
Date: Wed, 23 Oct 2024 15:26:18 -0700
From: Chris Lew <quic_clew@...cinc.com>
To: Bjorn Andersson <bjorn.andersson@....qualcomm.com>,
Bjorn Andersson
<andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
"Konrad
Dybcio" <konradybcio@...nel.org>,
Johan Hovold <johan@...nel.org>
CC: <linux-arm-msm@...r.kernel.org>,
Bjorn Andersson
<quic_bjorande@...cinc.com>,
<linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<stable@...r.kernel.org>, Johan Hovold
<johan+linaro@...nel.org>
Subject: Re: [PATCH v2 2/2] soc: qcom: pmic_glink: Handle GLINK intent
allocation rejections
On 10/23/2024 10:24 AM, Bjorn Andersson wrote:
> Some versions of the pmic_glink firmware does not allow dynamic GLINK
> intent allocations, attempting to send a message before the firmware has
> allocated its receive buffers and announced these intent allocations
> will fail. When this happens something like this showns up in the log:
>
> pmic_glink_altmode.pmic_glink_altmode pmic_glink.altmode.0: failed to send altmode request: 0x10 (-125)
> pmic_glink_altmode.pmic_glink_altmode pmic_glink.altmode.0: failed to request altmode notifications: -125
> ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: failed to send UCSI read request: -125
> qcom_battmgr.pmic_glink_power_supply pmic_glink.power-supply.0: failed to request power notifications
>
> GLINK has been updated to distinguish between the cases where the remote
> is going down (-ECANCELED) and the intent allocation being rejected
> (-EAGAIN).
>
> Retry the send until intent buffers becomes available, or an actual
> error occur.
>
> To avoid infinitely waiting for the firmware in the event that this
> misbehaves and no intents arrive, an arbitrary 5 second timeout is
> used.
>
> This patch was developed with input from Chris Lew.
>
> Reported-by: Johan Hovold <johan@...nel.org>
> Closes: https://lore.kernel.org/all/Zqet8iInnDhnxkT9@hovoldconsulting.com/#t
> Cc: stable@...r.kernel.org # rpmsg: glink: Handle rejected intent request better
> Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
> Tested-by: Johan Hovold <johan+linaro@...nel.org>
> Reviewed-by: Johan Hovold <johan+linaro@...nel.org>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@....qualcomm.com>
> ---
Reviewed-by: Chris Lew <quic_clew@...cinc.com>
Powered by blists - more mailing lists