From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Marian Rotariu <marian.c.rotariu@gmail.com>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
javier.carrasco@wolfvision.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tipd: don't send GAID when probe fails in APP mode
Date: Wed, 12 Aug 2026 11:02:23 +0200 [thread overview]
Message-ID: <anw2n_2shZSin9NS@black.igk.intel.com> (raw)
In-Reply-To: <20260806085302.1307606-1-marian.c.rotariu@gmail.com>
On Thu, Aug 06, 2026 at 11:53:02AM +0300, Marian Rotariu wrote:
> When probe fails after the chip was already in APP mode (booted from
> EEPROM), the err_reset_controller path unconditionally calls
> tps->data->reset(), which for tps25750 sends the GAID 4CC command.
> GAID transitions the chip from APP back to PTCH, causing a second
> probe attempt that sees PTCH mode and tries to load the firmware from
> /lib/firmware, instead of reading the EEPROM as it should.
>
> The err_reset_controller path can be triggered by -EPROBE_DEFER from
> the probe sequence. GAID should only be sent when the controller
> actually loaded firmware at probe time.
>
> The abnormal behavior was seen on a tps25751d that has an EEPROM
> connected to it.
>
> Fixes: d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data")
> Signed-off-by: Marian Rotariu <marian.c.rotariu@gmail.com>
This needs the CC stable tag.
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tipd/core.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 522f56742aa9..c2b235f3c225 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1783,6 +1783,7 @@ static int tps6598x_probe(struct i2c_client *client)
> const struct tipd_data *data;
> struct tps6598x *tps;
> struct fwnode_handle *fwnode;
> + bool patch_loaded = false;
> u32 status;
> u32 vid = 0;
> int ret;
> @@ -1838,6 +1839,7 @@ static int tps6598x_probe(struct i2c_client *client)
> return ret;
>
> if (ret == TPS_MODE_PTCH) {
> + patch_loaded = true;
> ret = tps->data->init(tps);
> if (ret)
> return ret;
> @@ -1928,7 +1930,8 @@ static int tps6598x_probe(struct i2c_client *client)
> tps6598x_write64(tps, TPS_REG_INT_MASK1, 0);
> err_reset_controller:
> /* Reset PD controller to remove any applied patch */
> - tps->data->reset(tps);
> + if (patch_loaded)
> + tps->data->reset(tps);
>
> return ret;
> }
> --
> 2.53.0
--
heikki
prev parent reply other threads:[~2026-08-12 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 8:53 [PATCH] usb: typec: tipd: don't send GAID when probe fails in APP mode Marian Rotariu
2026-08-12 9:02 ` Heikki Krogerus [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=anw2n_2shZSin9NS@black.igk.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=javier.carrasco@wolfvision.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marian.c.rotariu@gmail.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