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 EB34C171AC; Sat, 3 Feb 2024 04:12:12 +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=1706933533; cv=none; b=hTcG5Zpm8+J30i2/YapgLFA6mNUzYn4gBn+i3jZ+M0ISNvXtyBgDKd5mU8Z8fJq5uPSy8dM2NXJlA5TGPGP6ULhxOmKI1kwuuXsMuKPtqKtfMDFxHS/oDmRfS7AeOa8cfP+30y/II3freZTs15uVknnmBoKwzI4RkDhSucVYnQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933533; c=relaxed/simple; bh=FmywTrWYzZTuBKs9BmEPfW+Yn7RQwftA0j0xd0M+6N4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p5t8CEQrbNX+InvdDlro454ujQ4UycQpL/df07rgzYbTc4Lt8BXyhx9PWM+eQSmHXGmgq8EwO7/fRPob/PRVlvQJL88yIe+hOmmXcqCO9ek/Mz3CnRNxRMKKL7bPf2bkWC+3dVlffv/nzmOfPw0gvwV+AFX2uy6Xv0oPCYjXbGg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AkFG0mIR; 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="AkFG0mIR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 610FCC433F1; Sat, 3 Feb 2024 04:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933532; bh=FmywTrWYzZTuBKs9BmEPfW+Yn7RQwftA0j0xd0M+6N4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkFG0mIRFC5z0AO0Vdb3sF/SW5sN06MwlCcne4fsbpFHymc5hxaFiMQC6DDBFRau/ Z8jbNJ8XW+zK8budN3nSEwKs7m7jhEpE7xYv514QdbXnnxEpiaHSMKACUIrIU/xdfa BK+82MgbzfMuPv5/a6CFV7Erzpapf21IjUP9NX20= 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 6.6 076/322] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Fri, 2 Feb 2024 20:02:53 -0800 Message-ID: <20240203035401.622193093@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035359.041730947@linuxfoundation.org> References: <20240203035359.041730947@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 e0081914052f..8f3b91e0d264 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3786,6 +3786,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