From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E9BA63D0CA; Tue, 16 Jan 2024 20:00:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705435258; cv=none; b=rJUZSrE/GI98QyH94XdXl8yZ44MSEaGX7ECPEY7yTkVxsARvdeRiTmbiwPRicLQiz+NeT7ruGlJyKj3l7yT3i3QYFrXH9t6QDtUP4oYn2ZeAV4a1JxZWAq5ufC1lfRrQmu6ZTdVG0v6V9vi3rDD0claxH+NB55Lc+EafHl0eikc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705435258; c=relaxed/simple; bh=BRHB2NsMttGU+W685Dr6zrlACychZzJewRDjmmvXORY=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version:X-stable: X-Patchwork-Hint:X-stable-base:Content-Transfer-Encoding; b=HR+sPcxysOYnbJyGTzdhphEBGdQRm1cBn+Sj6RStyQe+6/uxhPIXkBu3Q6J2uK/3xsVc3swkiSRt/RnBdteETT8FZQw2Er4Jgo9rDgZJApn9+5umZJmfO599omLM+PzqC4RKr4beeSWf7c7LvR2HWrF7xYono3hjHRFfR5kesTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aViSAJM6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aViSAJM6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD026C43399; Tue, 16 Jan 2024 20:00:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705435257; bh=BRHB2NsMttGU+W685Dr6zrlACychZzJewRDjmmvXORY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aViSAJM6nBySZw9ZXw0wJFfmnhTaxdBhY4PsrY3ww+bdktDO6wzODUXPUAuSPEMh+ jQA3UVckhlC5ef2IoFkpWjT7AbBZ2who6yRgWzBa2inayR58rQzP2jxEa40LYh6CIb l/P4IovLj5ytW6o5oN5IdDzcZ0w1mPtQtrJr2mX8pdpFSY2gNsyxcwXhiPd+r0gOAz 3D1xlC5Foqe7s17yx6WaxpxxvXjrEHBUZo4jB6KfSpYKX+gh3IMYYwovX0pKHPqjWR HqMDXUPEwLwg4Q2jk+W4gSsRkqPlri04AKrHTCwcA4zh5bK4kdev708QzZDfnoLiyY 0jzgG20nS6qGg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ido Schimmel , Bjorn Helgaas , Petr Machata , "David S . Miller" , Sasha Levin , linux-pci@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 05/44] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Tue, 16 Jan 2024 14:59:34 -0500 Message-ID: <20240116200044.258335-5-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116200044.258335-1-sashal@kernel.org> References: <20240116200044.258335-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.208 Content-Transfer-Encoding: 8bit From: Ido Schimmel [ Upstream commit 3ed48c80b28d8dcd584d6ddaf00c75b7673e1a05 ] Spectrum-{1,2,3,4} devices report that a D3hot->D0 transition causes a reset (i.e., they advertise NoSoftRst-). However, this transition does not have any effect on the device: It continues to be operational and network ports remain up. Advertising this support makes it seem as if a PM reset is viable for these devices. Mark it as unavailable to skip it when testing reset methods. Before: # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method pm bus After: # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method bus Signed-off-by: Ido Schimmel Acked-by: Bjorn Helgaas Signed-off-by: Petr Machata Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 158ff4331a14..8e76b683baee 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3638,6 +3638,19 @@ static void quirk_no_pm_reset(struct pci_dev *dev) DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_ATI, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA, 8, quirk_no_pm_reset); +/* + * Spectrum-{1,2,3,4} devices report that a D3hot->D0 transition causes a reset + * (i.e., they advertise NoSoftRst-). However, this transition does not have + * any effect on the device: It continues to be operational and network ports + * remain up. Advertising this support makes it seem as if a PM reset is viable + * for these devices. Mark it as unavailable to skip it when testing reset + * methods. + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcb84, quirk_no_pm_reset); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf6c, quirk_no_pm_reset); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf70, quirk_no_pm_reset); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf80, quirk_no_pm_reset); + /* * Thunderbolt controllers with broken MSI hotplug signaling: * Entire 1st generation (Light Ridge, Eagle Ridge, Light Peak) and part -- 2.43.0