From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9204028DF; Tue, 19 May 2026 14:22:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779200569; cv=none; b=V9TU+m/zDr5546ywqW7DNdmE1lXvsvMdH076wP65UB8gPMwdraAEe6C1M/VRT9Hk4CitzTWbd5lR3iTLyFknfqtFzJvsrOXwzcqvZIvEnCe1SQ2X2RyryVU+W49mXAIf86kke0LgE+tWQdaqfCxIDjxOwFkDnEetW7XzCSnnuzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779200569; c=relaxed/simple; bh=ZDH2zy4OHwN7Nizpqx6y/X7j1gg7jwVXN+mCsXJeu08=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e3aCTPNUnC0OfAoT5nOMWgR4GyxgW/7zShRQ0btj9XdeEWsUnT8dmU1TvIW527zzIea1UarlXRpaQGx9kH+qHQlaGonTcmjOL+k7x/kwSSIWDyzTmT0mjE13vIghJVZKKgfIBBgxl8GzJ7w1DX9Ig9mEGmbNBn0+TEUpMMaRoX8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FATT0ro3; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FATT0ro3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779200567; x=1810736567; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZDH2zy4OHwN7Nizpqx6y/X7j1gg7jwVXN+mCsXJeu08=; b=FATT0ro3i1/hOYLC8g9j12nyTXIiOQV09HzoMnqX72+AuWs+sfT+By7T XE354xKgS2s1B7HI4UyiJXgx2cKHUsRhGfXmN3wuBwYSNtdKa7Oa10483 Hkr1G8xsQKiULaKRdqbJo+iCx5zmYFORTZhzDpDGcdm7TqQicpGMZ9gGB J/h+aHgkPdI4N2N9FKbnzHomdcb47lTbhjEf7TzL1kM4I/IQENkIwkoDI +yyBF9ogOHrnp2gbT4ARnQ+WQGuenssg/XrxwEsTmk8IEyPEWMPmqj0G9 qkBpQ3baC0VXPTqL8GIVA+a0wSDbRdnx2WJgX+4OyGNEmEKhpGckpAtqN w==; X-CSE-ConnectionGUID: 282jMXQXRcKc3n3Uwymuaw== X-CSE-MsgGUID: g9qYPzCDTDyoQDPgV3mqOw== X-IronPort-AV: E=McAfee;i="6800,10657,11791"; a="67607560" X-IronPort-AV: E=Sophos;i="6.23,243,1770624000"; d="scan'208";a="67607560" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2026 07:22:46 -0700 X-CSE-ConnectionGUID: kRxkeCNiRoKMTL03z5Ft5w== X-CSE-MsgGUID: Qg9DSD8xTpGIeubzy1lHaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,243,1770624000"; d="scan'208";a="243785157" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa003.jf.intel.com with ESMTP; 19 May 2026 07:22:45 -0700 Received: by black.igk.intel.com (Postfix, from userid 1008) id E4ED395; Tue, 19 May 2026 16:22:43 +0200 (CEST) Date: Tue, 19 May 2026 17:22:32 +0300 From: Heikki Krogerus To: Myrrh Periwinkle Cc: Greg Kroah-Hartman , Sergey Senozhatsky , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/2] usb: typec: ucsi: Check if power role change actually happened before handling Message-ID: References: <20260519-ucsi-fix-2-v1-0-6f1239535187@qtmlabs.xyz> <20260519-ucsi-fix-2-v1-1-6f1239535187@qtmlabs.xyz> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 19, 2026 at 05:14:15PM +0300, Heikki Krogerus wrote: > On Tue, May 19, 2026 at 06:41:39PM +0700, Myrrh Periwinkle wrote: > > The CrOS EC may send a connector status change event with the power > > direction changed flag set even if the power direction hasn't actually > > changed after initiating a SET_PDR command internally [1]. In practice > > this happens on every system suspend due to other changes performed by > > the EC [2][3][4], causing suspend to fail. > > > > Fix this by checking if the power role change actually happened before > > handling it. > > > > [1]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=1689;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794 > > [2]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=3923;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794 > > [3]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=5094;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794 > > [4]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=2229;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794 > > > > Cc: stable@vger.kernel.org > > Fixes: 7616f006db07 ("usb: typec: ucsi: Update power_supply on power role change") > > Signed-off-by: Myrrh Periwinkle > > Reviewed-by: Heikki Krogerus Hold on. Shouldn't this actually be fixed in that EC code? thanks, -- heikki