Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3920007pxj; Mon, 21 Jun 2021 09:23:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxchGf/bNqjcOFe+Tfd1rd873o7p12O740QenrvJpC8FqRNiqCL31hWSH1ROp4LwP/Jx6Ap X-Received: by 2002:a17:906:ae0c:: with SMTP id le12mr16383947ejb.343.1624292583310; Mon, 21 Jun 2021 09:23:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292583; cv=none; d=google.com; s=arc-20160816; b=bKPgnT0u2e1nbzkJiMRKRXN62s5ub6XdOPpCY9LPmhnvk1gktDzAbSCKwo2FpMWm4b 8ayXIX9gtPf3LzEHITQcvzePCLXT97rG77KYbU37/U6RY/Mld7S6cVJ5Ozpfm1araq5V l1SBr3K9E1Itvs4IYYbddU8Cmn+mtK6zss06M6QbgqloTkKUk5mBPyYL1Jmr4+Zue8yu kjRXyJFm1nhWsYQ7NDiwN/iGJyhyNaipsymtTJ1yq2f4Mv8wXC8LtTd34nePy5f2Gg2p fFBxQaTcXhD4xbDvbLsTJ3vxIbrTqk+uA9cUBDACWNxBUAfAaUV9ba3onsHaZGRogwtb oIiw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=diiwyhcjWcEBpapyMYNhqGx7HH+allLD/mDbYPCjC9k=; b=bfUGBmPDZr9oQuJCZ+JXy+R1lTYzJvuGec3NgZ4fYguCQcd0F5Zq90EVPDTQp9Thab Sc7TfZwvlYE+qXz3InfShQh1KIQqHoOo7RRIBdBey0a7xRYzubnIsKHkWd0rv+FCoSm0 g9B7y7+nqQZLDMp4VqENnHWQnmEtq/ot3tirsIVS1wWDLQlzWVlWYyjk261EKddrhqTi Xvy+axf1JLlUfVqnaSN17OFdbzDGCs07b8xAR7mAHF7ur6h4GDAD/oRwKdLaUqwr2pBm yfsVzm3PszOl/dbP/F67n/bM1p086cymN66XNR6h9s1+7j+dhMp4gj+HMZHsRtk77GmH PYrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vfFWODfq; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si11354872ejj.667.2021.06.21.09.22.40; Mon, 21 Jun 2021 09:23:03 -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=@linuxfoundation.org header.s=korg header.b=vfFWODfq; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbhFUQWl (ORCPT + 99 others); Mon, 21 Jun 2021 12:22:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:41468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231749AbhFUQV1 (ORCPT ); Mon, 21 Jun 2021 12:21:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 748B561358; Mon, 21 Jun 2021 16:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292353; bh=QbSCfuq9kOyKYJnxD56Mv3iLkzPvRWSKIGDJfEiNGI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vfFWODfqe7URHDYiB6/8iMFzieWZkTNKQ78BfoEZQ/MtHVtfFo+vQqtdZdrUkFY0t vcTJjm2evVcSZUaNfAbcBI4QrnZCQN2SGcbnZkZtRKej59T2DjigjdWIz0p49N62wr s2ykclB4SBP6MekQhe2jG0C7pFTMUA2ZIn5jgR7c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shanker Donthineni , Bjorn Helgaas , Sinan Kaya Subject: [PATCH 5.4 59/90] PCI: Mark some NVIDIA GPUs to avoid bus reset Date: Mon, 21 Jun 2021 18:15:34 +0200 Message-Id: <20210621154906.162764025@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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(+) --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3558,6 +3558,18 @@ static void quirk_no_bus_reset(struct pc } /* + * 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 * regardless of AER, config space of the device is never accessible again