From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796460704; b=rZA05vnOjhf9FErg9nkH8yvxKAodYvfPe6lJz1xRV6qY3jr6HvbPDvc8BhHxYjjZHwl/ BIhrcrQ7hGSt0S2RqEf0nDX9+I++aPMdGuNaGL5fGmyWsgrVl5ProYR83PX+DtNGpLJcb Dqvxa+ZFI0x52ZAA1WRT519lzHsZ1l26/JLFDmY/G2G1f3nKno9rxOXu/eRgPux9LGPLc 4JSG2DiD84gShXd7ufNEMhN0gM0qcL8+T+gL5qATrqHLBC2uokdTw4CQoVX9EMvaeohva AWSKFDWmZMXlvGtRtdlNmR16EbyzHZmdIhLV3Kwhor1+3tE/ipUfToFAVFh5m26ncXA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796460704; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=pI8RIghfwBi86FKG6zbhaFTRxPEwUCn/SIh1rHHYEmM=; b=xvlJRKq8OL4vMWPX85qRUIm+YL1qe1kqkdUoqCyEcBWT42UwxottYZg2E3z4JW2+rLdX 3L31A8X/ZoBzcGakHPkl7IYpNde/qdwHZxqQ/yFWMo9TVpQpt0ivrGKLZpCL636PUYBPS JHQb+0+xBDOdvW11Ek+mEQNMy7XrCtrmn8rnRW3vF6YL2TiwmGPyYhufFrAAhSCg4vc9B j8ST+1D7oF8Pr1x8oJ3b61Sqn60JUEoy94Sg/2PlzPp9McqZx8wJurKlqARFiXU4S4Y6W 0v3dN5QdFxLnvLDbgx/mPGF/0j/klwj31zIvWUnONDNLp8q96AsImQrr9cyXZmyTL5w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=T7qdQmo4; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C222606A322 for ; Sat, 5 Dec 2026 08:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=T7qdQmo4 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 275B01F00936; Sat, 5 Dec 2026 08:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796460704; bh=pI8RIghfwBi86FKG6zbhaFTRxPEwUCn/SIh1rHHYEmM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=T7qdQmo4BTO1RePhhxywSGUvhf0BLl6dazb/if2X+phoMyONG6cabwDlwj3W/6L/p DzfWQn9akcu1QMI2uSdgfOaq69qIbiK5bxLA6J8pc3G25+dL6dwxOpQUmduNcwp6T9 cQuN/2QeYux/uiaRVgIhZ+k3cWfqG2CYKvcqoUWGCy+w0LscbnvYgpZTRojOnjryQj 7byHl7PtIlxXr/8LNmAGTVr6BnaE3sFpQ8EpQC4kLaZWBDVIB+XFPU1NFPBiaVql4V g1SbR3GZ7Nle7wJwQvYljEbXJuRdCtM3vc22GdHNUzPk9ObfJRWMHHKnCOHacXcyL2 3kcdWcITqU7jw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 03/14] thunderbolt: Internalize non-MSI-X interrupt request and work in NHI core Reply-To: sashiko-reviews@lists.linux.dev To: "Chunfeng Yun" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261205083342.4009278-4-chunfeng.yun@mediatek.com> References: <20261205083342.4009278-1-chunfeng.yun@mediatek.com> <20261205083342.4009278-4-chunfeng.yun@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 08:51:43 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] thunderbolt: tb_nhi_probe() calls nhi->ops->shutdown() on IRQ request failure -- commit b4233662a9b39ef9b7a70df478f45341b9bd4eb0 Author: Chunfeng Yun thunderbolt: Internalize non-MSI-X interrupt request and work in NHI core This commit moves non-MSI-X interrupt request, ISR, and work handling from the PCI backend into the NHI core, drops the .init_interrupts callback from struct tb_nhi_ops, and stores the non-MSI-X IRQ number in struct tb_nhi. > diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c > index 0e21e7b97371e..41a6ec03c4e74 100644 > --- a/drivers/thunderbolt/nhi.c > +++ b/drivers/thunderbolt/nhi.c [ ... ] > @@ -1334,14 +1340,21 @@ int tb_nhi_probe(struct tb_nhi *nhi) > =20 > spin_lock_init(&nhi->lock); > =20 > + INIT_WORK(&nhi->interrupt_work, nhi_interrupt_work); > + > nhi_reset(nhi); > =20 > /* In case someone left them on. */ > nhi_disable_interrupts(nhi); > =20 > - res =3D nhi->ops->init_interrupts(nhi); > - if (res) > - return dev_err_probe(dev, res, "cannot enable interrupts, aborting\n"); > + if (nhi->irq > 0) { > + res =3D devm_request_irq(dev, nhi->irq, nhi_isr, IRQF_NO_SUSPEND, > + dev_name(dev), nhi); > + if (res) { > + nhi->irq =3D 0; > + goto err; > + } > + } > =20 > if (nhi->ops->init) { > res =3D nhi->ops->init(nhi); [Severity: Medium] Does jumping to err here invoke nhi->ops->shutdown() before nhi->ops->init() has run? The err label calls nhi_shutdown(), which unconditionally invokes nhi->ops->shutdown(). On Ice Lake and newer controllers (icl_nhi_ops), icl_nhi_shutdown() clears VS_CAP_22_FORCE_POWER even though .init never ran, breaking the .init/.shutdown pairing for NHI backends. Since interrupts are already disabled and no rings or backend state exist yet, returning the error directly avoids calling nhi_shutdown(). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205083342.4009= 278-1-chunfeng.yun@mediatek.com?part=3D3