From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796115125; b=tDuKI69NVtMXpdyJ4u3GcaY8vTCS8B53rXq/IhsHE2u/SZJQLCB5FYX9puFYqq6HNc7/ jaAh0K7oOILNqEGkn39kbhMzp3/nk6kpAEu7YbMzPtiAvAiVaKm2UadoT0+Sjnr/qtoMY xBBuI4iOhdDbnRuEQ2lhCQ8NFcE07kzWYG5s/LJHdYZy0JhMd+jBCu8brenMmg9DXfTtG o8N3a5F3lWikAM2EPoBP/8ZnHPMTguoGRjfLFBn19n1R020o5f/+NYc8uiYwN+2WQRvwy fKFF/rPrsqygcBQEx1N2ulqBSUnk7DOYEKu6LWyh06i2W0dzIXPOc3WqA9I/LdJsf2w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796115125; 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:From:To:Cc:Subject: Date:Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=jQNCokqHYeBsNgLPq3LqKlmyNbk9mT0SSnjB9aym4zk=; b=Q+nW7sBC3D9YDxkBkUb3NGJyAZ2xaFkbWzuUxo5jHb3NsLp5qbvwIIKXNlHoXTS16x7N 4p6sHSz7UIH1TAYqhf2OM493V9TbCQMVkZYmIEUvxP16/KTh5oZ//cDMrzrHVy7pbV47i ef0kZ02euhH1idkUGJnaoGElZM+WkvBfxiXc+f/n42ZPygfYxm28m8JDboKoVFqIrQVTS EgrOU+rcNWLr0g7KvT4+8ALobzAcSCPf57I60nlFyqPj6i1WEZOpyrftq9x1qDC/c8sgc UntQmPrgstetvL72vRb6ekLwIVfnEdE6LsI+WII5trHkMVyxgKG4zLL7t+39OWwcHEA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hygIbZ27; arc=none smtp.remote-ip=192.198.163.18 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 EF4D6606A31A; Tue, 1 Dec 2026 08:52:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EF4D6606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=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, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hygIbZ27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796115125; x=1827651125; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jQNCokqHYeBsNgLPq3LqKlmyNbk9mT0SSnjB9aym4zk=; b=hygIbZ27SN6duuRyKOmScXABGJoSaKCcAMiW48CqyOPuyi3KIMy9AO9s 1bj1fgtoEOyQYiHVnHfXvdd2rlPTU8yoMxMrG9rtDadztGbtnFNlAwD/e WBJAECHa4JOb9rPvptNpZwE0Vx9QWXR57r0mYGKka2hshifdIz0DewGUE /H10jollGFc6fJXCxNj6H308YIo3wKfqSMkmJxMgLPWK8SaqFCAfbHIe9 SP+VNTeWBCKvkrpg5Sa3t2LtXVKJ5PVTbW4nN1FsYLVRdSFJ8XlquCD2j 3bPpLV9aAWlGtqxmLfkgusb32p6UBfpLMdNJ1mdlCSG2OvELI6nfk/Le/ g==; X-CSE-ConnectionGUID: xGuouI3ORseZejuGdjnRbg== X-CSE-MsgGUID: gvE0OeomRqGFwek6f1EbJA== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4984456" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="4984456" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 00:51:55 -0800 X-CSE-ConnectionGUID: 2+uvVGCcR5e9ysVEEi++5w== X-CSE-MsgGUID: JkaT/OJPRt6KP56vxrCJ7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="12994290" Received: from gaojianf-dev.sh.intel.com ([10.112.106.68]) by orviesa005.jf.intel.com with ESMTP; 01 Dec 2026 00:51:54 -0800 From: jianfeng.gao@intel.com To: Heikki Krogerus , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Li Yifan Subject: [PATCH] usb: typec: tipd: mask interrupt across suspend to fix IRQ storm Date: Tue, 1 Dec 2026 16:46:50 +0800 Message-Id: <20261201084650.3697134-1-jianfeng.gao@intel.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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