Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp41676rdb; Tue, 16 Jan 2024 14:22:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjryendGnG2Pf/ArZZGnIUmVHDQ/fYJxt92uGxzvQ4FbwjJAtIaLchSZtOxG9dTTnHmvCS X-Received: by 2002:a17:902:c101:b0:1d0:6ffd:6108 with SMTP id 1-20020a170902c10100b001d06ffd6108mr8865430pli.42.1705443720187; Tue, 16 Jan 2024 14:22:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705443720; cv=pass; d=google.com; s=arc-20160816; b=jGu1zACLHeaSpVfKJ1uUoPA5nt3VvnnwU1NML8skOD2UtQUgRjmF1vUR/P6WEgbixa CERFX48qFlbkeF1Jlt1hZZTV90dtYYLSw/FF3Y9x2790V1xBWwqWu1l6J3fTJgAjVU8r EbalL1pYDSAcYgF+GU8SJru6lr8SL8+oSEQ93w2My1d6CflB4FCD32MkHDcV0EhshUx3 bETP7vCRFcXi+4hrO8iOeoIb73qGIHlVmNByN+h4TVFv7UNq3AsVd3AE7oFshDk0VFbY rkVI8dkOSxN8q59KfAps4bm2p9yDmyiSTPjGuRSc11G5VheEBpiXDU8BFpxXH9ekL9NG eGmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+HPDsJxW/FfbGiOlY8vGr1JM0FEbciamntHKfvfHhgk=; fh=jxVCPPFdpfL8yZlTj6XAyHDuFnqcOQ5lhBTbwczSeU4=; b=orm0uxwI01fF99iOZ97ydBelfbCb/DjqLHHP6tWBsCnj0pEQXxcGLZUWj40CQJHYAq KQEg5kErVBKhYnWDGS0B1Et5/puas50+0StZA5O/hbYfBqzs+S/YAH+qfHgd1x+DIZiD 6Yq2KgCgHwjjE7hM44ZG7QZH6/oiRtGLbDx0CvOdM6b0EkvpTsFb4H5Xdx4LxwVM9FjH v3CvuxqgAonS1SGeBUqBdweEaDTnsPAtewxaWP3aon+00Bm39t7wxg0Zy+4W86ZGzU1E JuLNkexvgU+VDZFdu+hyCpO8bhZi86TbGbTR0f92VGnaQ82bfcYekdrGehe9ZoXN/RrZ b+tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ba9zuh/v"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f9-20020a170902e98900b001d40906a0d5si11992332plb.502.2024.01.16.14.21.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:22:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ba9zuh/v"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0B7F8B283AA for ; Tue, 16 Jan 2024 22:00:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC0394BA93; Tue, 16 Jan 2024 20:04:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ba9zuh/v" 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 DF9B7482C5; Tue, 16 Jan 2024 20:04:37 +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=1705435478; cv=none; b=V1CHm84qFSJw+QvyyShUv69fzX665tzOEwWzyBFwDgxIGs6kvke6O4L1iPbBhiGtyZT8LZuhTI29rPs/zNEbB/jFGcDepXAMVwjnW7b6HrJP1DSHA+6sOC0/a5fDEqyc/NlDH/0udvyjmzhf/vQdcoNHF9irwDO7ZiigJaLMsic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705435478; c=relaxed/simple; bh=/XUfUpi9n3LrTFV0Z/ODZdOg843j9KGrHYVK8NlAFLg=; 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=Li7tSe3tRP4IKx6ZU37P5H21jlPo+aqYDK0Va7AA2IW/UJ9ld0lyYgtdaLo9FD/rWJycnNHlJuHrAyI7WbizvpQcgmsaH3BD5NhPrTF7/rerbAS7FL2A5tJWX5nF2NWXdBJYelXk4kV2XxF/0uYQ+tWU08V+R6PgE2YVdBkNSEo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ba9zuh/v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBC9AC43394; Tue, 16 Jan 2024 20:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705435477; bh=/XUfUpi9n3LrTFV0Z/ODZdOg843j9KGrHYVK8NlAFLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ba9zuh/vvLu+o+GZttyt9K5MuBn90uc7W8sMqm4WXDUa+5q3o1QrJARpeYObYdC7k UwhJ8yADsgNPZ3NdQQZl9Yvuh2twc69PJsXwdk41h1zWy4kO2duGEHx9gjQ3aPgF8B Kc+tAxQOYcy6YRp5QWxeh8EYm0hi3Q6Knd8Uo3Z3/Cr39vqErOqcRlpI/Gw1eDj1VU 64e8fruG9DhtwSl+YlY5RNIzoxjZNqsXAOpUk8XvNfQJ8BWzZCjVw5tcnd4cG+yBEU 5YdCaQ4gKyK5rHVRH2Y+LYDdwhg+Qj++gsapTbG153KQ6kXohKYBl45L5QMVfchL9C q0T0VQRuektwA== 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 4.19 02/22] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Date: Tue, 16 Jan 2024 15:03:56 -0500 Message-ID: <20240116200432.260016-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116200432.260016-1-sashal@kernel.org> References: <20240116200432.260016-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 4.19.305 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 3a165710fbb8..af56cb396626 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3532,6 +3532,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