Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3941831pxj; Mon, 21 Jun 2021 09:51:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3337p4W075QfOAzvlTCRANb5viN5dojXfypENVqAvg1rTu0Q7AhUUZ/1BYvfCw7mKkvVn X-Received: by 2002:a05:6402:3550:: with SMTP id f16mr23115808edd.295.1624294292512; Mon, 21 Jun 2021 09:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294292; cv=none; d=google.com; s=arc-20160816; b=EBHtneTvTUXBXI+9IvJJIqD6NubqaQpj0zLRoqR6Dwg7yUDzKfH4YjtJ2SsOzSeZ5J zrmBQUdtPKtjOCPNi4q/44j2T7xGEMxSUzZb04Cj/MXc+X0u1zAy8vVl6puyXJDfKwIs v3AlPJe1sfU5AGF4cdSHjZ4r4L8D+RQRNdsEP2H6WePE5rvR6rBNsdbdqK4VH7dM8HrU dZnPzcKikX4xsMRYn9+uiB7+MwOSD8YHoctNTWwfEY0xxr/xMRFv9UuUUuXpXM7l5/fF d2S1nhtLCh6ybFclJN53YeC0JQ6Hfs8s0xiME7wSRrAa9Uz5RFQi4oRkuSfTmkb7ZEvN 62Mw== 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=TgR41jtsOZ1A9H3gLWHgTQvm8lQlFJqp7x+F0Z4+gi4=; b=v5FmwsQwmFd3IZra/xKqZ8Jq7YzXdjl4vUiGI0rTlaoy8WIXLwm3M/sx36G7OdFaxS nMl6lOmL3BFgf88jgk90Ecc5GFXSP4vFqiQPLdDZRdziiqcn6YC6Ml4Kqj/8PIsBm7k9 CHF5J0lFRJu3YrmSf1+lColF3zls8QENds2Xquta/eGjDra3Cn0ewsq/w6UucNgxjNVu NrYyG2fV0nMkTJcGPcYUMB4eC20rc1el2YCA2SNPKmXThqUyvoDmJGLnNGKlj/J/hAfA 2s3k27UiFjL9+mKRUfZ7k+KiX3n7Sa5L1D9A3gwUTMM6iBzL1RXuwMwx24BSEzSjqAf1 6R1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=v4GVMsMD; 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 u19si11540891edo.383.2021.06.21.09.51.10; Mon, 21 Jun 2021 09:51: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=@linuxfoundation.org header.s=korg header.b=v4GVMsMD; 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 S233681AbhFUQuL (ORCPT + 99 others); Mon, 21 Jun 2021 12:50:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:37532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233991AbhFUQp6 (ORCPT ); Mon, 21 Jun 2021 12:45:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D86C613DA; Mon, 21 Jun 2021 16:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293181; bh=9Hs8Ac4kEOJDnw/JkalO14BdZmrVh6ZQLX+GmNViZ+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v4GVMsMDcoofv3cbdJ2cudTqXRpfdyFa2IJyU27zmecFYJfygBRgVa/QqeXmRbJzD gBxnu7nj1LjpRRar1hyggwbbS2CpDB3nN6kC3Q5Ga0TgWC6UTQzFKt3WTy6zqF9FlD bYBdZYizdgkO9J36AVyqlivbuoq7x7/MBmXHPAbY= 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.12 127/178] PCI: Mark some NVIDIA GPUs to avoid bus reset Date: Mon, 21 Jun 2021 18:15:41 +0200 Message-Id: <20210621154927.103033215@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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 @@ -3559,6 +3559,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