Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Caleb Connolly <caleb.connolly@linaro.org>
Subject: Re: [PATCH v2] usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration
Date: Mon, 8 Apr 2024 09:11:32 +0200	[thread overview]
Message-ID: <ZhOYpHXz6t0fkzZ2@hovoldconsulting.com> (raw)
In-Reply-To: <20240408-qc-pmic-typec-hpd-split-v2-1-1704f5321b73@linaro.org>

On Mon, Apr 08, 2024 at 04:06:40AM +0300, Dmitry Baryshkov wrote:
> If a probe function returns -EPROBE_DEFER after creating another device
> there is a change of ending up in a probe deferral loop, (see commit
> fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER").
> 
> In order to prevent such probe-defer loops caused by qcom-pmic-typec
> driver, use the API added by Johan Hovold and move HPD bridge
> registration to the end of the probe function.

You should be more specific here: which function called after
qcom_pmic_typec_probe() can trigger a probe deferral?

I doubt that applies to tcpm->port_start() and tcpm->pdphy_start() in
which case the bridge should be added before those calls unless there
are other reasons for not doing so, which then also should be mentioned.

I suspect the trouble is with tcpm_register_port(), but please spell
that out and mention in which scenarios that function may return
-EPROBE_DEFER.

Johan

  reply	other threads:[~2024-04-08  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  1:06 [PATCH v2] usb: typec: qcom-pmic-typec: split HPD bridge alloc and registration Dmitry Baryshkov
2024-04-08  7:11 ` Johan Hovold [this message]
2024-04-08 10:49   ` Dmitry Baryshkov
2024-04-08 11:44     ` Johan Hovold
2024-04-08 11:48       ` Dmitry Baryshkov
2024-04-08 12:14         ` Johan Hovold

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=ZhOYpHXz6t0fkzZ2@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=caleb.connolly@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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