From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 33D3E43CEC7; Tue, 16 Jun 2026 18:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781634592; cv=none; b=tJGJH5WMITvTlC0ndA+scy45fuuIizuOorICvYLIbzxVuVW6jN+qFdCQic95AnLljwVTTVpiQDeGj8j98AEww9/GwRoc7FjtrZy+hkmPhL1bIX+M0suqKTs+DqktvpJwNGWyBZmH/4sgYw3pma+LIPX8Dq1BPnWhg3oUf5rpPus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781634592; c=relaxed/simple; bh=g6d5gk032qqSvfV0BTK8sFJhg80vXmKS6IGoFUUeMqI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uNDS+sElMAmQ9/3I93PHFFot5oJg7OR04Wdzuxxt85iDilgzduxL4e49YZgIW05QiIT8HkjZourKPSsgdjc3QbzZQ2NSw7mEHIBw25O2sOYuBYt8ytbGfg71N16qcWjJCci6bKT+7Cp2DvSOP1xGakDfS2ex51V9hwrGAI1zNVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jlRpnfr4; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jlRpnfr4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 095351F000E9; Tue, 16 Jun 2026 18:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781634591; bh=8zPRM29QWPF35KzS1T2t5l0XVVaU05vy0Hsgzlkght0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jlRpnfr4l81tFl6WwHIidA26i8hQDJ0mCRvRT/DvLeZPJQkf7+irmNv3TEItdUYM5 a6e7EBbjiU4F4bvWoOCzDFifURITM2dORXBSStLdpPMcfJ1p0kPyf8OU8vJqhg4FC9 aglSQhIOvEIjT/PbHYqyeOzyy0EojFvimH0atuQ0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Fedor Pchelkin , Ping-Ke Shih , Sasha Levin Subject: [PATCH 5.15 261/411] wifi: rtw88: check for PCI upstream bridge existence Date: Tue, 16 Jun 2026 20:28:19 +0530 Message-ID: <20260616145114.902077275@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fedor Pchelkin [ Upstream commit eb101d2abdcccb514ca4fccd3b278dd8267374f6 ] pci_upstream_bridge() returns NULL if the device is on a root bus. If 8821CE is installed in the system with such a PCI topology, the probing routine will crash. This has probably been unnoticed as 8821CE is mostly supplied in laptops where there is a PCI-to-PCI bridge located upstream from the device. However the card might be installed on a system with different configuration. Check if the bridge does exist for the specific workaround to be applied. Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool. Fixes: 24f5e38a13b5 ("rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260220094730.49791-1-pchelkin@ispras.ru Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/realtek/rtw88/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/wireless/realtek/rtw88/pci.c +++ b/drivers/net/wireless/realtek/rtw88/pci.c @@ -1766,7 +1766,8 @@ int rtw_pci_probe(struct pci_dev *pdev, } /* Disable PCIe ASPM L1 while doing NAPI poll for 8821CE */ - if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL) + if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && + bridge && bridge->vendor == PCI_VENDOR_ID_INTEL) rtwpci->rx_no_aspm = true; rtw_pci_phy_cfg(rtwdev);