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 89601140787; Tue, 16 Jan 2024 19:55:31 +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=1705434932; cv=none; b=qFdC0nChdoJRiM+AHR6/kumxHaVJoZC5TnC4igzpcrku6ku17reVP0ydn2BfEvggPKT/YQl1ZFCLYCkFv351SF/6XZQxhz4tRrqGwBiQdDPwjNrekGiJ699y2z/1RD0UqCn669Bl2U4/EnLcJGpF1edhe/CEo7Q0rr9s51AN9TA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705434932; c=relaxed/simple; bh=6rpedz0sikIfqLByregZQ38NZVaslYEyzWaofq5LrVw=; 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=t7npdBhw/3v3yR2qpVoihEs8THgYtGdUeVZs6eyhIwfosph8TdZpa2QIEli815gtnyGhHSY1m6CMb8F/SDnsocCtQ6uvnfmEOERZvj15YBSpyX7aKEGB8MBC68EN/W7gGFChot3cuuOUH8EbeyrmVjZm/k6lum7NL3uG4yXJUbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sNOFic5d; 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="sNOFic5d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EC9FC433C7; Tue, 16 Jan 2024 19:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705434931; bh=6rpedz0sikIfqLByregZQ38NZVaslYEyzWaofq5LrVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNOFic5dXaWy/m+W6A7BK3mvoRNSVdTQJUV6faYR3oBlLo99ah9eP6LgtOhDgqmga iec3IKy6+I/34dXo2uzWRQCObrPlgj7G5bJ+FFxe4fpMzPTexpPXzEi+ZZj2E5g+Di kNm2STJ2JMhRoM34Kq74bnhgi7GTwiUgqNlTL0iKOEVjYwBt6wtuVKdGcPTsG7fCIB 5wx/zYo7ZdfbMcu8DJ5Un6TNB1nazXle+3Jn8tK1oYfv2AvtxZHQT2gg/Z6VviNwEY qrnq+bzG2wRYEyg/PfEzZ3ofjbzKHA1DVNwG7TMsXcyEdCeAqpLk0U5C50d+VogmeC Q9dtZDpsFb2jg== 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 6.1 09/68] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Tue, 16 Jan 2024 14:53:08 -0500 Message-ID: <20240116195511.255854-9-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116195511.255854-1-sashal@kernel.org> References: <20240116195511.255854-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.73 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 c132839d99dc..017d469f6ebc 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3691,6 +3691,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