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 0832553816; Wed, 21 Feb 2024 13:34:25 +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=1708522465; cv=none; b=X+uoINYcpJ+BVDCsjyloqGyBKm4ATzJYmvpGxnCu7gdWiOMKGADGMcXFhsTJlkl+eDRGmnM76zY/O7lBc4Yc0VY8FveKSZW3SwPvMCaksVMnwbm1rXlfYoLQolZqkuRKI30LEc5Ha35FpPq4IHH99nKJzNAyi77jU99LnmXFphw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708522465; c=relaxed/simple; bh=P5XnySyWwXRi7dxy3tDbD4P1Vrj1/z0xrExLDg1vrlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BVBvelP3N9dkr+lChZ6+WzMvUeFgK+96c5SI8D99AFtW5r7uKC1qE5vsBmnJrCNh2An7V2NYn3HUEE9gNQq5Lp9VB/p9Nrq78IQ5Tkk/VxKzj1QpFcYL7DcVAd2Ngg3jqu/7uBg6XfSJwme6702+0VquBahcZ66uL8Fy49HbI0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YiSz1Exi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YiSz1Exi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 847B7C43390; Wed, 21 Feb 2024 13:34:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708522464; bh=P5XnySyWwXRi7dxy3tDbD4P1Vrj1/z0xrExLDg1vrlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YiSz1ExiRK+QEezgMFXEW86d5/BB/85Nc6rI1cTrmpnrJOgiQkMawJ1ri+uQiiU1B BBMFRAKpKUe/FjvNFhOrI/haoaVMFKVXvfLT7Z1NWGWuDNIN/hrV6+3/a3BN84zHo6 mcSD8b0jD+/+HxQUP0LbdOpuEYaeIqMFcx/8adn8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ido Schimmel , Bjorn Helgaas , Petr Machata , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 170/476] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Wed, 21 Feb 2024 14:03:41 +0100 Message-ID: <20240221130014.203643541@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221130007.738356493@linuxfoundation.org> References: <20240221130007.738356493@linuxfoundation.org> User-Agent: quilt/0.67 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: 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 626d9ed733f1..be43ea2a15e7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3666,6 +3666,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