Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3892271pxv; Mon, 28 Jun 2021 15:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl0ymV+7o7klKkDegVDTbkF7Pim6L9FiNXZ+frPGGzjBf0pSFjE5Gfx2pcNDMWDzbcKEv9 X-Received: by 2002:a6b:8e4c:: with SMTP id q73mr1454968iod.39.1624920872612; Mon, 28 Jun 2021 15:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624920872; cv=none; d=google.com; s=arc-20160816; b=ThERC2TLIOCH+IDrZaBAbJ5JXv4NWw1HozklJPI+bD2S+YqKqIxb9Nio+VbhSP7NKc xZaz3db6+4fYes2XLjvTxC4t/rw57/ktp8OmpsANoLyVgTDDHUTquiAd86k0M9tVKrKa QxvRnCsFHwlZ91dxPcqhiiSUDtEIUMFTHvvgfoR7JEfgXrsuyhNtZLClIo15Wm6e94dC yL6Z7QlV1TwdRqbT2+242W0Vt0fOG7YnmDgElJEkr/s5ZgrJDMKvLc6C+LqHBylaaljq AQ58/dBlvqFD3rvPedeZq5cthmhfkdVCdyvWio2ODqq81TOBmDpnc24DSJ3QB69fI879 s78A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gKgux0mmfJjK398JDHww18GgI+PWZ0FpHVNEc9UPfuA=; b=M5zkRu/vnV9aE/sfOUAw8BtnAnMRQUaD6oIAuudO5rMCFcBafbrqgevoDRMc+47bJs HbCCHoaSUp9PnG+TrpSVuyT86kYLZ+Yh3cQRrvdIWAjPqgVdH/RLTm1F2VIFfRHOg8TI F0Y1b85OHbgpDQJAG4+S0ljug7C75Urf05IoKkOWv+113MzsJRRwm+4BmFgA/mbO5GqI dVPoNPYnx/2E+lChlFTHN5CZLjFF5EOfpnznIF17bMJwbbzpxABPxYkpYO31bqmsyMcR EBQZxRg1XJAxJq1pF9WbDXeVD0tQcdApndAuckXaj2z6AadS7+lYQYI4vtrEyLWFFAEp q+jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d8bSuqMa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si18402203ioa.74.2021.06.28.15.54.20; Mon, 28 Jun 2021 15:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d8bSuqMa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238739AbhF1PaP (ORCPT + 99 others); Mon, 28 Jun 2021 11:30:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:39832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237232AbhF1PF1 (ORCPT ); Mon, 28 Jun 2021 11:05:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E3D561C93; Mon, 28 Jun 2021 14:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891407; bh=N0KB+j/5MHXPBDOXieO7igeQjIyk5FpsLSOt5rjYaC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8bSuqMaJNMoTVVOk6RfaI8PrVTK/RLRx9NMGb/CVGApFDSrMkhYTxU8+e0FiIt7d ABBGxmkKEx1n0hJLiLCkOnkZ4ectJP4T+M8svH62V16vrxnefD0xb9RwUkLb6RZmz2 JAwBFmLnVX2qqBG2sjRqpdd2KNjrcaiV+L1WXj30bOa5xH99tNUTQs9pF9IZO9GGtW Tv9fJzuHNPEG+3JTTgiRQK9E3+vN207kCeyQiTcHJwBfW5uAhIpnyPzL2UvI+9tEcQ aziGmhFT218m5Ra6I5I9vEGuYQYiA81msZOWi+ImcQEB8THTvVR3fxKB9Kr7UyvX76 JlAuQgaFWpKJA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shanker Donthineni , Bjorn Helgaas , Sinan Kaya , Greg Kroah-Hartman Subject: [PATCH 4.4 34/57] PCI: Mark some NVIDIA GPUs to avoid bus reset Date: Mon, 28 Jun 2021 10:42:33 -0400 Message-Id: <20210628144256.34524-35-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144256.34524-1-sashal@kernel.org> References: <20210628144256.34524-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:42+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shanker Donthineni commit 4c207e7121fa92b66bf1896bf8ccb9edfb0f9731 upstream. Some NVIDIA GPU devices do not work with SBR. Triggering SBR leaves the device inoperable for the current system boot. It requires a system hard-reboot to get the GPU device back to normal operating condition post-SBR. For the affected devices, enable NO_BUS_RESET quirk to avoid the issue. This issue will be fixed in the next generation of hardware. Link: https://lore.kernel.org/r/20210608054857.18963-8-ameynarkhede03@gmail.com Signed-off-by: Shanker Donthineni Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index d6199776c0f6..e65eec0644a7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3144,6 +3144,18 @@ static void quirk_no_bus_reset(struct pci_dev *dev) dev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET; } +/* + * Some NVIDIA GPU devices do not work with bus reset, SBR needs to be + * prevented for those affected devices. + */ +static void quirk_nvidia_no_bus_reset(struct pci_dev *dev) +{ + if ((dev->device & 0xffc0) == 0x2340) + quirk_no_bus_reset(dev); +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, + quirk_nvidia_no_bus_reset); + /* * Some Atheros AR9xxx and QCA988x chips do not behave after a bus reset. * The device will throw a Link Down error on AER-capable systems and -- 2.30.2