mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Val Packett <val@packett.cool>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Abel Vesa <abel.vesa@oss.qualcomm.com>,
	 Stephan Gerhold <stephan.gerhold@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 usb4-upstream@oss.qualcomm.com,
	Raghavendra Thoorpu <rthoorpu@qti.qualcomm.com>,
	 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH] soc: qcom: pmic_glink: Avoid losing early rpmsg probe
Date: Sun, 26 Jul 2026 22:08:49 -0500	[thread overview]
Message-ID: <ambK6rb5QXB8FN6C@baldur> (raw)
In-Reply-To: <9843990f-a7cf-419c-9abc-2351aa6ca6ea@packett.cool>

On Sun, Jul 26, 2026 at 12:11:48AM -0300, Val Packett wrote:
> 
> On 7/20/26 11:39 AM, Konrad Dybcio wrote:
> > From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> > 
> > The PMIC GLINK rpmsg device can appear before the platform device has
> > finished probing. In that case pmic_glink_rpmsg_probe() sees
> > __pmic_glink as NULL and returns -ENODEV, which is treated as a fatal
> > probe failure for the rpmsg endpoint.
> > 
> > If this race is hit, pg->ept is never installed and PMIC GLINK clients
> > never receive the service-up notification. This may leave the system
> > with no Type-C functionality and without battery/power supply
> > management.
> > 
> > Return -EPROBE_DEFER when the rpmsg endpoint arrives before the platform
> > device is ready. [..]
> 
> Hm, in the Linaro tree there was this hack patch to accomplish the same
> thing differently:
> 
> https://gitlab.com/Linaro/arm64-laptops/linux/-/commit/8c309c7e852a49118ddc2ee54c3d8b7c74466f6a
> 
> that claimed that "Returning -EPROBE_DEFER from the rpmsg driver does not
> seem to work because the rpmsg core doesn't handle EPROBE_DEFER(?)"
> 
> Was that resolved or was that always wrong?
> 

Returning an error from probe of an rpmsg driver will destroy the
"endpoint", which results in the GLINK channel being closed again. (See
rpmsg_dev_probe())

This is still on the todo list to figure out how to gracefully handle.

Regards,
Bjorn

> 
> Thanks,
> ~val
> 

      reply	other threads:[~2026-07-27  3:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 14:39 Konrad Dybcio
2026-07-20 15:02 ` Dmitry Baryshkov
2026-07-26  3:11 ` Val Packett
2026-07-27  3:08   ` Bjorn Andersson [this message]

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=ambK6rb5QXB8FN6C@baldur \
    --to=andersson@kernel.org \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rthoorpu@qti.qualcomm.com \
    --cc=stephan.gerhold@linaro.org \
    --cc=usb4-upstream@oss.qualcomm.com \
    --cc=val@packett.cool \
    /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®