From nobody Fri Oct 2 02:30:47 2026 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABD6841B8DC for ; Thu, 6 Aug 2026 08:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786006414; cv=none; b=lCoh9kBSJWq1Pf+0F0az8eTkhAlf3J9YYwLb9oYVtpG0UzANdFdcvRP9q4fKSUhLAu6rQcJvddjwskol2BFwi+r6vbMDWgghH1eotU9FFvXjlHYoANAVct9Ka3+stWCakKz67jB43gJeSZtLozghTtgsiF704U95pKfxKhknAd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786006414; c=relaxed/simple; bh=t3hfI3vt/EVN9rJvF36LzJL52/0eOpYB71LQKs6WXUg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X8p74Dp0qRj8fg0pwDur15kmZS+bHzj0W+kgcnukeTjNLKOhrs5CBqawUsPcnBSfuk2HTHW9fse2s4DNE496HH9Tz9EP8k7k3jv/nAasgXpau5zROlYdeMagQGjJA4KEKKF7jVVhNgQDzFmXOabyVEWOKdidy1R4Ph2bNnrrzY4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BtbbP0Ea; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BtbbP0Ea" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-47fecbb7000so998621f8f.2 for ; Thu, 06 Aug 2026 01:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786006409; x=1786611209; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=C5L9sRSU4M7dAv92Jk3PRfyBZXvNn6RHGjwcKX82Y5s=; b=BtbbP0Ea1iWg5P3+Me6GZe7g6LGv/NlOGB4wN7/qsCengcZzI/efpDQ+fXGmVDi4/A oXUmKmDtnuxyKPg9cFHbTwbmH7YCs6oHqB4gaG/f07rk2bW+4XgD1xeNvxhlZsvu9yR3 dYUyEIhqGqhDaSl1A4KWAYcF2sZVNJ22nnZjzcQ7mkgDn3kensz7RwLGNRh+/SiXu/8J fvhgip1UoFC9SHULaLScZKKaWr/xjlVUDofLo60g/M12NFqCYcuUkrUVPG9tUTyVw5Nx K75sfvYFQtwGgoG4X0Yl2wKTwkuNsQVxHn6tR/Frrcpz1HedZWCrpqPixvSXmoQ4spcI lmTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786006409; x=1786611209; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=C5L9sRSU4M7dAv92Jk3PRfyBZXvNn6RHGjwcKX82Y5s=; b=ecfjndmj3BU1aNiuGUpfIi7aec6eWjCMyVhJAdIKSrCNut9whE5J2v6GAGzZ4+V/vo VeFTioqzwgSek5E7bOxySHrQDuQcTFz+tmaWaGdI45op63GJ/GN82f4nDky1pu1yLJkl bKDs7S33hbFB4a0r/0p3NiDbEW0jJPpccf1ngh7gM7tKow6hJfqLmLG6n8x7P0mI86o4 2m3Ay9lw8ycnFyIzzbh6q9WWbKaQMCZhrX0eEiEseU3lrXkiA5WnMGtjlM6GCk3Q0rEM bJiV8FzOvZj4yiztfHLAXkEyif1vLz+4Es3CGY0f7MIPIqKHkdc9OCGXxn3JsoT79xCN gN7g== X-Forwarded-Encrypted: i=1; AHgh+Rozz6v0+8dcwILmO6g8KJOIMHOnmwTA4A3l1Nm15uaLOp3E5kWqY+Id3K/rIdNPSKw+2cjqU+xf0UqlgYQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwT8MRI7zWV5wHzgqy4P4yzpHWZet9Opj+CGOuXchpi0DPa+rn3 9f4Oleqk8QJEb4t2z1/KO8qCqjQjBgNuqmx6lmUzz9YoC0UjQmFyb0S/ X-Gm-Gg: AR+sD10a74Kd7hQEjAzezMop9Wg6d7lOvbHPQDVeswkRYhMVvi6QcBpSLtgF1uyoIbq 98PO3+sdV4S7xFJ7bXNnSc2iibY0yivFOieuT8qBe0Mf+c/U7dptgfjy7lDU6ssVQqlILDGmdM6 2P6gY7bk9iht+ZLrHiDuCHfM5O+F4Rt39u5xMgQODUQFTbpFewthmalb/nKB2qXR5cf7Xwz5mDt hAUsMXWQsI9A6TU5O3nb6vWlYoziOoCST1q8VVvkAEQIBNoSqXnUAeZeAQdCQZP/MsH+swX6ioE 97YyARoV1iqpCG3zZy9knqNAz/lmZzu1R7bhPtxrRCoO6IH8EsipYn5ctxNykptrqTNqSUnqKtQ jLpbCzcJsmz8pj5SABEymuW0ZeFL+KxHhMgsBEmANNJ9Uih3sltyBXqjciN1u9ZRjFivtZ24GKu IljwZGaCWw8EBLmqghjkwG+cG1J6aFQl1SG3rDBf9Kjz+clEXxM5pX5r359NXIVQZvNqUsXiK2e sSCnn2V X-Received: by 2002:a05:6000:29ce:b0:47f:7c4c:8144 with SMTP id ffacd0b85a97d-47fec523d1fmr15852949f8f.10.1786006408706; Thu, 06 Aug 2026 01:53:28 -0700 (PDT) Received: from LW-1H861937ND ([82.77.119.60]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47ff7b285b1sm5142674f8f.31.2026.08.06.01.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 01:53:28 -0700 (PDT) From: Marian Rotariu To: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org Cc: gregkh@linuxfoundation.org, javier.carrasco@wolfvision.net, linux-kernel@vger.kernel.org, Marian Rotariu Subject: [PATCH] usb: typec: tipd: don't send GAID when probe fails in APP mode Date: Thu, 6 Aug 2026 11:53:02 +0300 Message-ID: <20260806085302.1307606-1-marian.c.rotariu@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 tip= d_data") Signed-off-by: Marian Rotariu Reviewed-by: Heikki Krogerus --- 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 =3D false; u32 status; u32 vid =3D 0; int ret; @@ -1838,6 +1839,7 @@ static int tps6598x_probe(struct i2c_client *client) return ret; =20 if (ret =3D=3D TPS_MODE_PTCH) { + patch_loaded =3D true; ret =3D 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); =20 return ret; } --=20 2.53.0