[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jkrkp74jgjg6d63ro4inl7ily4p6s35hmhpxeroyzue3o55tto@sgl2b4uv6ysv>
Date: Tue, 10 Feb 2026 17:49:49 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Cc: manivannan.sadhasivam@....qualcomm.com,
Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konradybcio@...nel.org>,
Abel Vesa <abel.vesa@...aro.org>, Adrian Hunter <adrian.hunter@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>, "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>, linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-scsi@...r.kernel.org,
Sumit Garg <sumit.garg@....qualcomm.com>, stable@...r.kernel.org, Abel Vesa <abel.vesa@....qualcomm.com>
Subject: Re: [PATCH v2 1/4] soc: qcom: ice: Remove platform_driver support
and expose as a pure library
On Tue, Feb 10, 2026 at 10:39:54AM +0100, Konrad Dybcio wrote:
> On 2/10/26 7:56 AM, Manivannan Sadhasivam via B4 Relay wrote:
> > From: Manivannan Sadhasivam <manivannan.sadhasivam@....qualcomm.com>
> >
> > The current platform driver design causes probe ordering races with
> > consumers (UFS, eMMC) due to ICE's dependency on SCM firmware calls. If ICE
> > probe fails (missing ICE SCM or DT registers), devm_of_qcom_ice_get() loops
> > with -EPROBE_DEFER, leaving consumers non-functional even when ICE should
> > be gracefully disabled. devm_of_qcom_ice_get() cannot know if the ICE
> > driver probe has failed due to above reasons or it is waiting for the SCM
> > driver.
>
> [...]
>
> > -static void qcom_ice_put(const struct qcom_ice *ice)
> > +static void qcom_ice_put(struct kref *kref)
> > {
> > - struct platform_device *pdev = to_platform_device(ice->dev);
> > -
> > - if (!platform_get_resource_byname(pdev, IORESOURCE_MEM, "ice"))
> > - platform_device_put(pdev);
> > + platform_device_put(to_platform_device(ice_handle->dev));
> > + ice_handle = NULL;
> > }
> >
> > static void devm_of_qcom_ice_put(struct device *dev, void *res)
> > {
> > - qcom_ice_put(*(struct qcom_ice **)res);
> > + const struct qcom_ice *ice = *(struct qcom_ice **)res;
> > + struct platform_device *pdev = to_platform_device(ice->dev);
> > +
> > + if (!platform_get_resource_byname(pdev, IORESOURCE_MEM, "ice"))
> > + kref_put(&ice_handle->refcount, qcom_ice_put);
>
> IIUC this makes the refcount go down only in the legacy DT case - why?
>
It is the other way around, no? Absence of 'ice' reg range in the consumer node
means it is using *new* binding.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists