mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Sumit Garg <sumit.garg@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, andersson@kernel.org,
	konradybcio@kernel.org, abelvesa@kernel.org, mani@kernel.org,
	linux-kernel@vger.kernel.org,
	Sumit Garg <sumit.garg@oss.qualcomm.com>
Subject: Re: [PATCH] soc: qcom: ice: Avoid probe deferring for un-supported ICE feature
Date: Fri, 30 Jan 2026 12:55:53 +0100	[thread overview]
Message-ID: <2697d1e1-8421-46aa-b58f-10608a2bea2c@oss.qualcomm.com> (raw)
In-Reply-To: <aXyXtK10_t-OBOxn@sumit-xelite>

On 1/30/26 12:36 PM, Sumit Garg wrote:
> On Fri, Jan 30, 2026 at 10:59:18AM +0100, Konrad Dybcio wrote:
>> On 1/30/26 10:52 AM, Sumit Garg wrote:
>>> On Fri, Jan 30, 2026 at 10:34:26AM +0100, Konrad Dybcio wrote:
>>>> On 1/30/26 10:11 AM, Sumit Garg wrote:
>>>>> From: Sumit Garg <sumit.garg@oss.qualcomm.com>

[...]

>>> Since qcom,ufs depends on qcom,ice via a phandle, so isn't the probe
>>> orderering automatically taken care off? Or that isn't the case here?
>>
>> No, that's guaranteed by devlink only with certain properties.
> 
> Okay I see. The other alternate solution I can come up is following to
> keep the deferred probing intact. Let me know your thoughts on this:
> 
> diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
> index ab9586b8caf5..76bf9f94fbaf 100644
> --- a/drivers/soc/qcom/ice.c
> +++ b/drivers/soc/qcom/ice.c
> @@ -559,7 +559,7 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
> 
>         if (!qcom_scm_ice_available()) {
>                 dev_warn(dev, "ICE SCM interface not found\n");
> -               return NULL;
> +               return ERR_PTR(-ENODEV);
>         }
> 
>         engine = devm_kzalloc(dev, sizeof(*engine), GFP_KERNEL);
> @@ -648,11 +648,14 @@ static struct qcom_ice *of_qcom_ice_get(struct device *dev)
>         }
> 
>         ice = platform_get_drvdata(pdev);
> -       if (!ice) {
> +       if (IS_ERR_OR_NULL(ice)) {
>                 dev_err(dev, "Cannot get ice instance from %s\n",
>                         dev_name(&pdev->dev));
>                 platform_device_put(pdev);
> -               return NULL;
> +               if (PTR_ERR(ice) == -ENODEV)
> +                       return NULL;
> +               else
> +                       return ERR_PTR(-EPROBE_DEFER);
>         }
> 
>         link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
> @@ -726,7 +729,7 @@ static int qcom_ice_probe(struct platform_device *pdev)
>         }
> 
>         engine = qcom_ice_create(&pdev->dev, base);
> -       if (IS_ERR(engine))
> +       if (IS_ERR(engine) && PTR_ERR(engine) != -ENODEV)
>                 return PTR_ERR(engine);
> 
>         platform_set_drvdata(pdev, engine);

This looks more robust. Although the UFS and MMC drivers today check
for EOPNOTSUPP, so perhaps throwing that would be even better

> 
>> In this case though, I think it could make sense to add it to the
>> "suppliers" list in drivers/of/property.c.
>>
>> I don't know if vendors adding their custom properties there is a
>> pattern that +Rob will be happy about though..
> 
> Not sure if that's a shorter path as I would like to see fix for this
> issue backported as well.
> 
> Aside, not sure how much stable ICE feature itself is as I got following
> crash with QLI boot firmware on Kodiak:
> 
> [    5.172970] SError Interrupt on CPU6, code 0x00000000be000000 -- SError
> [    5.172986] CPU: 6 UID: 0 PID: 241 Comm: (udev-worker) Tainted: G   M                6.19.0-rc5-next-20260115-gc1a0fee87a05 #9 PREEMPT 
> [    5.172996] Tainted: [M]=MACHINE_CHECK
> [    5.172999] Hardware name: Qualcomm Technologies, Inc. Robotics RB3gen2 (DT)
> [    5.173003] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [    5.173010] pc : qcom_ice_create.part.0+0x6c/0x24c [qcom_ice]
> [    5.173024] lr : qcom_ice_create.part.0+0xe4/0x24c [qcom_ice]

Could you please decode the pc value with ./scripts/faddr2line?
My compiler produces different output

./scripts/faddr2line vmlinux(or path to .ko) <symbol_name>

Konrad

  reply	other threads:[~2026-01-30 11:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30  9:11 Sumit Garg
2026-01-30  9:34 ` Konrad Dybcio
2026-01-30  9:52   ` Sumit Garg
2026-01-30  9:59     ` Konrad Dybcio
2026-01-30 11:36       ` Sumit Garg
2026-01-30 11:55         ` Konrad Dybcio [this message]
2026-01-30 12:29           ` Sumit Garg
2026-01-30 12:36             ` Konrad Dybcio
2026-02-02  8:32               ` Sumit Garg
2026-02-02 10:51                 ` Manivannan Sadhasivam
2026-02-02 10:55       ` Manivannan Sadhasivam

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=2697d1e1-8421-46aa-b58f-10608a2bea2c@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sumit.garg@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    /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®