Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3861930pxv; Mon, 28 Jun 2021 15:01:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMUKDvMd8A4P5EfwWLy+UrwiPPq5ROmd3EyQhz5N7R/6y5aJb5tqjQN91p5jJ77CCOHrMw X-Received: by 2002:a17:907:9841:: with SMTP id jj1mr26163196ejc.94.1624917704562; Mon, 28 Jun 2021 15:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624917704; cv=none; d=google.com; s=arc-20160816; b=tOwhCJjOlceC+/hgoxZg1bxs4Ogv1GKdshY2TTpSSXL2F+F9Z0HrsXXyZFZ/Wp0nko Jbaivp3wWmvh6u8JNVci1kzqxGZRg5b3yk7DnR/C6nrZZ/fbR3JjqRlLZdZkOMwz8qmw egHUep3NFEDQM9UXgqNjnX6UH3WJ6CMwck+pcIz9CHCt1AfqwYaoh2QAsbI0eQarx6WV dJlWyIJLXWLrrEzqx+OV/IRSuYU1LarerU8uTfDDSzd9XA7DihBfG1tWA0TB7H1RSff0 l2N+Vvhr/Egkwliu9pIstxkgG05MyoGljm46wrUVh5+YL7usTTW9c9n5qGOoh7bL2Wuo 9XIw== 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=hC9nYNFYbPMCpcyFDg9Y72XWHJHxLLao99ClF46ZkxA=; b=G58MygA2p5UPlATc2tpwrfhOYMqpuwtcPKiJNzQF+mpnUbqjdsolj11Fg/Pog+U9Qo gjxeC3txniZu/3OxGljT8HqjS1Yyax39x14aR34X+0QhkmWAT99HR/rAy3nSZy+Pnchk QhAJ8fXkZvFAJbAgGY4rDOj1Y4S1id+LOc77oKipwJzXpSvC4oTEK20i4PUj+ecTFa4o crV6IYK2VgmUgxYwN2cwXa5gYyefRi5nt0tAvsoE+zbEi4L9Sdhll1V2jsbNl92KEh6L BDVgSTERhmaU0BiliWCkgXpIQ6lUfLrEvvWmgFGLRMoPa+Jt+bx37UTW1xPsrwRWvhAC +M4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gz11x98o; 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 q2si16844468edb.244.2021.06.28.15.01.19; Mon, 28 Jun 2021 15:01:44 -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=Gz11x98o; 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 S232256AbhF1PWe (ORCPT + 99 others); Mon, 28 Jun 2021 11:22:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:36572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235353AbhF1O6g (ORCPT ); Mon, 28 Jun 2021 10:58:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3993861D57; Mon, 28 Jun 2021 14:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891240; bh=8hWUjLSsCuGfyAAp5KYKpJkbFgKTkR48o+/VI15TRNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gz11x98oFRI73BtU5PuWvFw9QcRNqreH8uadbupCMQokRX0cKvUmM0pFHebBDK1oG AJM2j1kjzVaiW1GZkHha2XZ5E/isXlrstuvEZYWQ8JExlz6NcT5s6+6jvlLE+z/v9p 9SHTfwNmh6DhMDT3d8sxxFvDHk85V50DNUp7sk/oYfT6Ha792T5sMOwU3YmD2E2/2Q 3yYhQfqFsw+khsRfWzkwcCkc9lQaOpaVZHYfrO/Tpi07Gz/Sk9dp7uZktj3TpKC25g 96Vi5miopCpkPsUl4m/LygpeXfosvyJAxBedf0PcmabvV4r/7kZmBCby8A3pRgKqxQ Z1CMpZ/pFnM+w== 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.9 41/71] PCI: Mark some NVIDIA GPUs to avoid bus reset Date: Mon, 28 Jun 2021 10:39:33 -0400 Message-Id: <20210628144003.34260-42-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.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.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+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 77874187f5b3..096ba11ac105 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3345,6 +3345,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