Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3596535pxv; Mon, 28 Jun 2021 08:13:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYj/kID9ySMuKjTRT+jLtTCeILn1dCuJSnbrZ0ElHCt3C70Yvi5R/Ex698gYTyBUTTmbXz X-Received: by 2002:a17:906:c799:: with SMTP id cw25mr24556001ejb.173.1624893214083; Mon, 28 Jun 2021 08:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624893214; cv=none; d=google.com; s=arc-20160816; b=AQ9i9GGATRcBQWPZauSdfGxBZS4suN/7ZB1PNTOrKBvsHhN7gG5WF7kzdyvIfZCDR3 XaJyPj9x2O0wcyHamZR2n14mPRxQDqYGe7ZjpEtc26X8omoCjY4I6fu979geXKcGGhYz GvApr1DpCec9T/5Muv0lPTGKt6HwZamtBv0ft0MA1orOIbmYgJUzI9azPMMWE42f1cpx h8WyytNWBGy7/+G4Im6rKr+JBX5dZvf4cUj4AIo79Ctpi25foagGX4dHzFO33lefnKDH ndGN3CW3fG3KtIq+RCbNZzYgP7mdrhIbRZGSPa6Npa5sCK+Wp5DjVYd0UOOP4H0RkoX3 4sOA== 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=XmYYXGgt6ZEhXAr4qV0AVMy4cI3K80fYExX4vyA9BuM=; b=xkAZ1dji6lN8+PhfNTmP6QcAq8gp1huxVV7QNLPftGWWgl8lkkP1iFqh22ldjfib1B oLKpnUqoHvHyJ9T8n90oyLrqIfD7EnxKpPNgdwq9WdY4SWjOB5D3RQfhCDnQULjrCbFd IFK3E8vdwLpyMOdbNNpQq+VSHGHS5AABSiq2s/WfTda61StzzeKz5WsRN98hQJJwDiWj MWbBTVVDyKQpiCkxVkzGphevtiLpcHWTHniju55S5Wx8kv+M/u37eILba4VCqHLvFq/I /iWF/j/+5kARBykPQiqgjRC6XDtfxJHK8ejL+Kgt4X/ab/DTMoZDS9ZjkQ+4TTc2SzGN 4CDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="p/h6WOFF"; 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 ka25si8964273ejc.354.2021.06.28.08.13.06; Mon, 28 Jun 2021 08:13:34 -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="p/h6WOFF"; 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 S237072AbhF1PM4 (ORCPT + 99 others); Mon, 28 Jun 2021 11:12:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:54532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235652AbhF1OvY (ORCPT ); Mon, 28 Jun 2021 10:51:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B38F861D30; Mon, 28 Jun 2021 14:37:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891033; bh=xpSJH4nDIUttSvl+xD2dLa8v2e9SAFLNOnEpckpYODQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p/h6WOFFwmZHKBZV/4/pjDB3hzvj3X9thGQxod08xy3SH4igf2wckrRcD+F6YvEOV ZHuJpUDqnaNPlAl9PRD05KXWoMpIkbAco2hNHH6XE2uKY3ZUXJEV3vHzNltu+ILJUh xOhCpAPF5/ppDuwaS1fSJvZSHh3YwnXGYKJOBB+6Q6lVskPh7Dm3w84gTUTtex6f6L 7xd4CuO8RxdXs98uAlYI2G1iac4A3XL4IP9VNOjPdIYh+QQCP++19Pa+q6O0ixUXca JbTPcNNu6PipmywMyReUpY7sWSyomdvt97aWycZIRqB4qkelEbfVFfY0i0JFqAb3Bk oiTxCPsiko3yg== 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.14 50/88] PCI: Mark some NVIDIA GPUs to avoid bus reset Date: Mon, 28 Jun 2021 10:35:50 -0400 Message-Id: <20210628143628.33342-51-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+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 f0cd8f7ce881..de7d65971d7f 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3389,6 +3389,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