From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.13 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387426; b=wX/NbAIC0s2hdL3AI943dErOjOoc4XiMTqdcUuXevVo7Tkok/x1EghWCYznTTj/PyTmZ TlRzu7TeQjMRoSWxXzo5lAss1vS6p0IUtUhgVFVohhPDxdbPM2/iQs2klsOU//PmYCVNR 7mvuXWuAVC/QIjAzAeaF+ALDd3I096KxK45hXXBhNorGHsBs2pRyfmwDEQWmIz3Rex9c0 j+Rhy4QFAXkbhtoubzabdvEOApzvp8zB6aYai2Z65/d/FyGXhAFQJdakA4dNoEW26eEzX MTv/wRLinBrxnKydpC5Fxd+SHzmvgPdz8cyUJSHx8OFxggLPC0SkRhyVguvYO7leKfA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387426; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=mvmS7Va9f1zi8aJkhEj3o2X8Xa90XZeRisRk1UyOs8s=; b=YDHsKsh0Cqk40PwOF3p71D7Lu0pxQ3R13LPtrYGipQZzeUKXHoZ2Vbbvkl3SqhG8+cp9 lIag0TkO490+/n6KVMqjUJ2fdoSij7EmXY9tcoA+4qRg2fEwSPBPdaIK95rY1iip4kvQL agupbQXVc0vOM/8knJY34CM11hIuoz+QLLPtQAsi6LZBBjPZgDdbi9N0wQkwboXSHEnyP YulBSRWpHLGsz+EclQ/yeQslkssnZS4ye3LlSuOborUI0CXsyOoGz7NFM1od74nL9MsYU kiFNOKcBPlWJK6DX0SOF/ehC0jpqu0CuSADEXhC5Niah92I0FtjJq+EhERDvcpfjVyA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=D9aDuzmI; arc=none smtp.remote-ip=192.198.163.13 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09E36606A322; Fri, 4 Dec 2026 12:30:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 09E36606A322 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=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=D9aDuzmI DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796387426; x=1827923426; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=mvmS7Va9f1zi8aJkhEj3o2X8Xa90XZeRisRk1UyOs8s=; b=D9aDuzmI7jOkr67gTb0N2W5Ae5vW4o7hfvJZ36//NR4a8+55bCrtuD8n Nz4/+tNSvsKWahJDtIhiqa0E9K93CFzBEnEyw7eM70q0LOOaVnAul6ou7 uBq8StbzAH8muXeJ/M9sq57yqkvgfTAxgfQnXilvtrL8Tl2RIuEwkJqir TGb95ulT+iVJh1PgQRJlzxYG8EPgY/3AVBlI1zVI3LIA1FnEm0Pf3OHHj WqYExSQObrwm7ZkoWJRfJaUr652i8KQKWmr/eomj5mZ9DplY4f3NWXjww +CozEkO6ATffUqHN2rsvEwFdfv0R9wHrdIs7pX39VBBToEQiqnjXT8nkE A==; X-CSE-ConnectionGUID: 1fCFPz6FT3qQP0e2JGHejw== X-CSE-MsgGUID: EGOK81CaQlya/Ifzgpxx8A== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5341365" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5341365" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 04:30:25 -0800 X-CSE-ConnectionGUID: N+pMHgwyTFaIhnI/2vqQ1w== X-CSE-MsgGUID: 4r50EUZfRyOVXZn/GitrZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="14076110" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa002.jf.intel.com with ESMTP; 04 Dec 2026 04:30:24 -0800 Received: by black.igk.intel.com (Postfix, from userid 1008) id 12DA198; Fri, 04 Dec 2026 13:30:23 +0100 (CET) Date: Fri, 4 Dec 2026 13:30:23 +0100 From: Heikki Krogerus To: jianfeng.gao@intel.com Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Li Yifan Subject: Re: [PATCH] usb: typec: tipd: mask interrupt across suspend to fix IRQ storm Message-ID: References: <20261201084650.3697134-1-jianfeng.gao@intel.com> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201084650.3697134-1-jianfeng.gao@intel.com> On Tue, Dec 01, 2026 at 04:46:50PM +0800, jianfeng.gao@intel.com wrote: > From: JianFeng Gao > > When tps->wakeup is false, tps6598x_suspend() left the IRQ enabled because > disable_irq() was gated inside the "if (tps->wakeup)" branch. > > During hibernation the parent I2C (designware) adapter suspends right > after the child's freeze callback, so with the IRQ still enabled and the > type-C line still asserted, tps6598x_interrupt() keeps re-firing. Its > register reads now fail with -ESHUTDOWN, the handler bails with > event1/event2 == 0 and returns IRQ_NONE, so the line is never acked and > the handler loops, flooding the log with "failed to read ..." errors > until the noirq phase finally masks interrupts. > > Mask the interrupt unconditionally in suspend and re-enable it in resume, > keeping enable_irq()/disable_irq() balanced. The wake-source arming stays > conditional on tps->wakeup. > > Fixes: 481735d64794 ("usb: typec: tipd: Support wakeup") > Cc: stable@vger.kernel.org > Co-developed-by: Li Yifan > Signed-off-by: Li Yifan > Signed-off-by: JianFeng Gao > Tested-by: Munirah Izyani Mohammad Amin > Acked-by: Heikki Krogerus > --- Where is the changelog? This should be v6 or v7. Thanks, > drivers/usb/typec/tipd/core.c | 18 ++++++++++++++---- > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c > index 02539378ffed..aba000a36a06 100644 > --- a/drivers/usb/typec/tipd/core.c > +++ b/drivers/usb/typec/tipd/core.c > @@ -1973,12 +1973,19 @@ static int __maybe_unused tps6598x_suspend(struct device *dev) > struct i2c_client *client = to_i2c_client(dev); > struct tps6598x *tps = i2c_get_clientdata(client); > > - if (tps->wakeup) { > + /* > + * Mask the interrupt before the parent I2C controller is suspended: > + * otherwise a still-asserted level IRQ keeps re-entering the handler, > + * whose register reads then fail with -ESHUTDOWN, producing an > + * interrupt storm until the noirq phase globally disables interrupts. > + */ > + if (client->irq) > disable_irq(client->irq); > + > + if (tps->wakeup) > enable_irq_wake(client->irq); > - } else if (tps->reset) { > + else if (tps->reset) > gpiod_set_value_cansleep(tps->reset, 1); > - } > > if (!client->irq) > cancel_delayed_work_sync(&tps->wq_poll); > @@ -2004,12 +2011,15 @@ static int __maybe_unused tps6598x_resume(struct device *dev) > > if (tps->wakeup) { > disable_irq_wake(client->irq); > - enable_irq(client->irq); > } else if (tps->reset) { > gpiod_set_value_cansleep(tps->reset, 0); > msleep(TPS_SETUP_MS); > } > > + /* Balance the unconditional disable_irq() in tps6598x_suspend() */ > + if (client->irq) > + enable_irq(client->irq); > + > if (!client->irq) > queue_delayed_work(system_power_efficient_wq, &tps->wq_poll, > msecs_to_jiffies(POLL_INTERVAL)); > -- > 2.34.1 -- heikki