Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3827663pxj; Mon, 7 Jun 2021 22:51:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwixS4jNSl6rmZ9Hsw5fQqecyEUl4T4VRWGqwxO+T1uZJajpYSnc/r6Hb0IaRw7b7HSTDpC X-Received: by 2002:a17:906:f285:: with SMTP id gu5mr21716267ejb.226.1623131483123; Mon, 07 Jun 2021 22:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623131483; cv=none; d=google.com; s=arc-20160816; b=RbD7jhTJHaDSGQBgR/i5MFSWik8izBt8j8qBJZ1EcF4wUiU+HD8QRfbW3E0a26luLq 2brgqsmBBcByNG4ljdky4LIMJUUcBKETQPX26UE5okOrjAOUcMo+BbWIZB0v8RLlZis4 iKooMhs5lslUvcYLt4hk6y63bq9KcYzeX/+E3WRv4CbgHEEhpslOOHQYCqfGhufi5yt1 aoAew/0tWP8jbwBjfuKMkb9LdO1wEETEgiAqaIPkW4TravbfC7kPmtY64RfZ27R/evoi 3RnrCPrQ8St74craD8bmDDhxJ3yz89wuv0GWf3lv7ErD2hbr8D4blNn7JWX7YN+BjS7n xDlA== 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=IWfL/IMqwLqFbs476iJcEczTrUNwgxx26bfBJrumYEY=; b=pfvNxKaADruZvFvIT94wRLhooDw0M/hHq9f7XViZNxOl/j/Ixon55rThaQFsJnYsAA kAYyyJGAO3Xg3YMOBCMdgswZq98MZim89EfBm3zTAnKkyoW42Vsxs9OjfG90afZwD6tP e1DilEIx6AVePsehHeNBaCybUMRncL4kQpNIRVXe+9UuWxyGrWW5spEI5YV8/qExaHWm YNF4WRspdUj35AMRcb0mgpAO09Ksn3gYPnMwAChGb7vdd1Imdz/XE8al6XE+Zbvtidnx rwsa026Ferc+dftVqfZxpihYgJwWZReuw/ufPzr9dyVD/DxSttLoIYKYb7JALEt4oXwz 8Iqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BIFHDZRQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si16245147edr.0.2021.06.07.22.50.59; Mon, 07 Jun 2021 22:51:23 -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=@gmail.com header.s=20161025 header.b=BIFHDZRQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230160AbhFHFvr (ORCPT + 99 others); Tue, 8 Jun 2021 01:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbhFHFvr (ORCPT ); Tue, 8 Jun 2021 01:51:47 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FBA4C061787; Mon, 7 Jun 2021 22:49:39 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id 5-20020a9d01050000b02903c700c45721so18139552otu.6; Mon, 07 Jun 2021 22:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IWfL/IMqwLqFbs476iJcEczTrUNwgxx26bfBJrumYEY=; b=BIFHDZRQAOBZkHnHtszMVsQSOdLNWagLf/65IQqHPPbwLYp0jyEghjUO3ktcGUgHGJ eXrxXYZq0QwIt9m8XkZDr8RMzRx+8uG75QsJdHdmMaxTNp0nbHrd9+EThzc4bs0jVM3V koNRVW4k1t/olIcnp0EWY3V4RXs1n1HYGEfauLH+uvzZm0Km55HbNMSPuwkVd4os14Bh tqHEF2yBvnKg1eQus7J6B2QerWzs0OiflYriCG2fSS+BPH24H5K5VpGEwqJ3CD7vtqFU z9ILzsNF772M8H5Vj2oMEWo1sWgUSBBy2CdfpcCVMCzlYijS4NdFMk8icgRpiyno1ki8 7H/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IWfL/IMqwLqFbs476iJcEczTrUNwgxx26bfBJrumYEY=; b=FdLNu5FHO9YL+PpsDMFleUcw/2y1Q2Rc0au+yVlYNHRQiUAHTJEDtkL2RQac+VvGMl C8WjxWWLGRD4bGfLuNiEbH2LFHTMRQv6pQCa9I9QSwVIbzVHReIFCsAgdL3OEwuONI+e JK8NYw8c35YrMv/0UxTfNHuXPvULco/FehTiJwiBRcBXp8XJwBrkwyImLmXbpDj2GCE+ XBxIpOcqSdoAxjm0AbN+6duNTDh69yGVHKpsUglHqhxGnOvOt5B6KPc3eP475Y9ffPQf Ja+Itp3Wyxyal9MXqI5u2jnPEOjXbmwSAJNGsaT8JZ4WxGIrwf8qy3yBoYt2sP3QDaea psaw== X-Gm-Message-State: AOAM530zlCWxGAXu4bhuM0DYfIcztzIdBktpxHg7lF/+kltuZrEA9jgX FarwyM867an7BxzndDVSOHM= X-Received: by 2002:a9d:4f0e:: with SMTP id d14mr6532892otl.70.1623131378699; Mon, 07 Jun 2021 22:49:38 -0700 (PDT) Received: from localhost.localdomain (static-198-54-128-46.cust.tzulo.com. [198.54.128.46]) by smtp.googlemail.com with ESMTPSA id o2sm2489730oom.26.2021.06.07.22.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 22:49:38 -0700 (PDT) From: Amey Narkhede To: Bjorn Helgaas Cc: alex.williamson@redhat.com, Raphael Norwitz , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kw@linux.com, Shanker Donthineni , Sinan Kaya , Len Brown , "Rafael J . Wysocki" Subject: [PATCH v7 7/8] PCI: Enable NO_BUS_RESET quirk for Nvidia GPUs Date: Tue, 8 Jun 2021 11:18:56 +0530 Message-Id: <20210608054857.18963-8-ameynarkhede03@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608054857.18963-1-ameynarkhede03@gmail.com> References: <20210608054857.18963-1-ameynarkhede03@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shanker Donthineni On select platforms, some Nvidia GPU devices do not work with SBR. Triggering SBR would leave 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 fix the issue. This issue will be fixed in the next generation of hardware. Signed-off-by: Shanker Donthineni Reviewed-by: Sinan Kaya --- drivers/pci/quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e86cf4a3b..45a8c3caa 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3546,6 +3546,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.31.1