From nobody Tue Sep 29 02:34:31 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 3FACB443AAF for ; Thu, 13 Aug 2026 09:43:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786614182; cv=none; b=ua9H0UU+p1pBT1g527aBAz9RwIRCTkjJPw0RrUADQLgbJOce8UdR60Gurw5+H2mvZmFcLNvfQXMSeVe5Uq8IrRQ2a+yCY357Rkpkzz0NPUmqP7SDdNykH0NcHlvuBqZ+UR6Z56zmMtEQx6aO3cnvQDkzz5TKryZfLqxjlXJV1IE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786614182; c=relaxed/simple; bh=kxznEwWSWeLwBy4WcmW9aaOKCiueS1kXCDEWn8ogGb0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Mu6J9CjNyKuG+LTbCm9bdCwdFMBRZXxDHFlwwYgdyjgr1GfNEUp495PefwelLoku91T144Nbw4uAMc1bnpfLWriv7CvDCCtnn7loB4FNdsV7BeEnmS+aZAtc3rHengfS4Tm0qITLFhohpC4bhqAF62BqrqM0ugoyv5q9MqSAAJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imd-tec.com; spf=pass smtp.mailfrom=imd-tec.com; dkim=pass (2048-bit key) header.d=imd-tec.com header.i=@imd-tec.com header.b=Ws5h6jfR; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imd-tec.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=imd-tec.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=imd-tec.com header.i=@imd-tec.com header.b="Ws5h6jfR" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4994c49f588so7243685e9.0 for ; Thu, 13 Aug 2026 02:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imd-tec.com; s=google; t=1786614179; x=1787218979; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=PJ/Vk0IqUKoQaaPNgJ0QAJec1n39bTY+37UOcsvpPhw=; b=Ws5h6jfRPzaOij9MiWRPjOwgNArQ9Ig/bigY+IK28UypBFKg4OEI46bZh3XXdkgv/C v/aI7nUQWxAi7eQ0/ChJeKHBp0DgvIdvkZ6bnCdOfvnY0gXkhQ/9WUX4tG4Ha0RmJYBo 1cCyjONmkEb4Jo+euG7ayOeFbN8odVNmGbYeMX4idsGxNm+VHg/CcKTyeMaWWuOoVXH+ SEHsjayd+2kkkAfpBCLUxqHPAgnFoRL9bKxM3Yb3oGdYvbgKmr1ndnOWSlK6BnA37qpd fyoY0xvXVGoSve8uK+cOtuNc9kXV/inZRiyBAV/Y/5YXP6nex9MBHvozRBkeEhgXHLEa uqhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786614179; x=1787218979; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=PJ/Vk0IqUKoQaaPNgJ0QAJec1n39bTY+37UOcsvpPhw=; b=UFEBvC/ycwOb0PKGR5c5RCCTlOPQSBhBw7r0AZuTnA5YEqC8laZ3DYEd8znCZIGYR2 HuqECUQyjiNp02gwzVz3k+vbsInpGxzhPO+jnUs7lI0JLd69ufzMkwBXzojkFR7E7q0E HxN7sy3IXw4r7x9lFS7ij2+l+Y6sYdZ9YE6qWXA3013rGvZgeo3V7py9c+pAAWxSeerG tR5uUK3KQL+N3ku1yujemcTBLDfDEK41L7t0OHxNJ5qbEjywZxa+oQQAme4AZEsUOMve VAvZ/7tQBkUxEGRe0GKvO1Stq4TuVuRaGBqJ7m0E2IO70K5MB7vPZ5acve+0OnpjLsSu V/jQ== X-Forwarded-Encrypted: i=1; AHgh+RpfudiYbzmLp8KZcRN332pfYCUAqI11fOFLkRK7bIQ1esqSglqgiSoqymMXpuDGxNfANppDAI8hZPujDrU=@vger.kernel.org X-Gm-Message-State: AOJu0YykWjkj1Dhacwh/+tEyJkLnyY7MzVY/nXhHyHWY/I+N2pCcglUq 1UibymfW72+LQ9IvGQBWA0V9Wwm70rJbnYLGW4fGibpBEJl/+6wpO3fEIUrlaRFmlxiI992r62f 6iWcuxqI= X-Gm-Gg: AR+sD11bBB4QMgSuIKQUraBwFQcrD8bv/tJb1sU6POLauZT6bYwZqYEcxszP/9R7ujG f65M1+Zy1CnD3yl1lalIOSgy4NjkKdE0st2alGdqAhZGrxuWcW2pXV+DJInCNlsIRR2q7k7eRKS gsLRW6xUrdBdXR7CkyVeLiqOUnO03k2SNmWuga677hSSgHwSD+Me7p9MnEP70kDZCFQzTBp/0Q8 yC/m6pxhb4+RtUgdnAmOwYDkg9+ccC2rI5me2YllpUVNUhQqngcZD13oUEcdveBUwa/0uw5uiyO S8euzdP3A40+rtUnCFHLy01y+p5z8H5hJ3m2UspX3slxZCFYcoriQCw2qth/1/6Gsj/fvEaPOP3 /XPIOv+/sMfIO4EREOw05KX1/wI+y1BDzXy8KC1qtlKxTsAG/bo57WuCd0+HsUxnVUZLn2tDUbI C3Otp8kAIuqY+NuirpTnidVYiZlVDLQcG/aqgtdm/Ocp9JR62LkT3xz3uO/VCTX9g41SnMvF1xA 45bN+An1aYKHXeh6flEfYu/6RrATL0w4BHrzHtxR2HHZnO22rNs6uTZmig= X-Received: by 2002:a05:600c:19c8:b0:495:69eb:27d3 with SMTP id 5b1f17b1804b1-4998220c7bbmr36330555e9.8.1786614179547; Thu, 13 Aug 2026 02:42:59 -0700 (PDT) Received: from [127.0.1.1] ([2a00:23c6:273c:cd01:b4ff:a571:9037:93]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499820c2897sm93117405e9.0.2026.08.13.02.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2026 02:42:59 -0700 (PDT) From: William Bright Date: Thu, 13 Aug 2026 10:38:40 +0100 Subject: [PATCH] usb: typec: ucsi: Handle connectors already attached at init Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260813-ucsi-cold-v1-1-72896abf51c5@imd-tec.com> X-B4-Tracking: v=1; b=H4sIAJ+QfWoC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDC0Nj3dLk4kzd5PycFN0kY9NUQ0NLS8Mk82QloPqCotS0zAqwWdGxEH5 xaVJWanIJyACl2loAVWW7eW0AAAA= To: Heikki Krogerus , Greg Kroah-Hartman , "Christian A. Ehrhardt" Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, William Bright X-Mailer: b4 0.13.0 After a cold boot the PPM may already have a partner attached without a pending connector change to report. On a CYPD6125 the CCI register reads back 0 in ucsi_init(), so ucsi_connector_change() is never called and the Type-C mux is left unconfigured for the already-attached port. Fix this by additionally checking the connector status of every connector and call ucsi_connector_change() for connectors that are already attached. Whilst also continuing to call ucsi_connector_change() for connectors that report a change via the CCI register. Fixes: ce4c8d21054a ("usb: typec: ucsi: Fix connector check on init") Signed-off-by: William Bright Reviewed-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index ecbda2a3783c..740ae4a14f7f 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -2136,8 +2136,11 @@ static int ucsi_init(struct ucsi *ucsi) mutex_unlock(&ucsi->ppm_lock); if (ret) return ret; - if (UCSI_CCI_CONNECTOR(cci)) - ucsi_connector_change(ucsi, UCSI_CCI_CONNECTOR(cci)); + + for (i =3D 0; i < ucsi->cap.num_connectors; i++) + if (UCSI_CONSTAT(&connector[i], CONNECTED) || + UCSI_CCI_CONNECTOR(cci) =3D=3D i + 1) + ucsi_connector_change(ucsi, i + 1); =20 return 0; =20 --- base-commit: 55431f6adac42f818a0c76594ce2c6c02fe1034d change-id: 20260813-ucsi-cold-b35e11991b7c Best regards, --=20 William Bright