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 855FC7E78B; Wed, 21 Feb 2024 14:01:23 +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=1708524083; cv=none; b=vDmxsnrXFPcUPZK/2b6Hj/39EWbVIFwAt+h7Z6ERzwKkmi6SjxqZIDehsnPFAqhkCCX+uvfBRz7vjkofCeXd3PDXXEub6t/kLXcpL7MNXlDsITuTNt/08xFeALYGNB+p1DszaYKYfMx6DuNmgcdBDJYK0hiosbPqiWGVZ+VvkEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708524083; c=relaxed/simple; bh=jHpLPBb92nknLmwE1M4KOit/WzkpWPEaNOB1sF/EgpM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d94IHyjIKF0s7il+hi+Xs4+QwmZGgtuMYPcdIIg4fzZuPuHhCJPYL8McqGUK6knxWFok9IMS+OvFgUgTb5GOZtQuazCUtNaiNlBZkbUABwkstUPrxJcYn5G40k3TcqSTs+sq27yYhGLZxD2MUURyylfCWej0HGlKfAe+SLAL8QE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=evi6CMxc; 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="evi6CMxc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13A70C433F1; Wed, 21 Feb 2024 14:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708524083; bh=jHpLPBb92nknLmwE1M4KOit/WzkpWPEaNOB1sF/EgpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=evi6CMxc6Tx3McwGReBflLX8zRGVakmvKClPyIevH4f46pe4xPdoFUxpbRbzUHAPH Sx08KEc+Gd32AAmh1Q9IlfH78prXSzmew/ezjtcAcCvfGFUh7sAI9zF/kDRbWv1h1D 7CIRss2buN0pUbxhhdyYtHx60hvqHiiKAkUsOBZc= 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.10 141/379] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Wed, 21 Feb 2024 14:05:20 +0100 Message-ID: <20240221125959.098084418@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125954.917878865@linuxfoundation.org> References: <20240221125954.917878865@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.10-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 21661feeeeb6..03a30734cdc6 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