Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp305564ybi; Thu, 1 Aug 2019 19:29:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAsqiaDASU7Y2vplKVsqd7yRe4H1WLLEJ/w25ZZKPoBJHX72g32Fyb+dGAPSChoJ86YqlN X-Received: by 2002:a37:6555:: with SMTP id z82mr86163479qkb.319.1564712981255; Thu, 01 Aug 2019 19:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564712981; cv=none; d=google.com; s=arc-20160816; b=Vsw2/x7JOf784vP6lqVuPyK22nBG4OPu125SIizVwR6vgSKFADnP7Pt1gV+hU1NNz7 nYrqxuL48BstDVXfoxlSFCWY0VzgjuXO2qp079pQcAyfGZFX/FTd4mzSXbgb7R+ynwkD BTq4Jr4TpX3ExtZFwYEllK96TMHPWwUMImWDs8bC/OnLqvsTWFuCDO+BlamprzaTtLTK B0q93tDRn/67/+97+DmsTDysOKR2D/Ni+RV0fen+hCAlKK13RJSY3Pep79tp+5NI/k46 qEwQzcc9VN61g4CdNan1XGtHPxldfmONDvDzaOuwa+xDASKG+7qWyJX7x9iSU6EPgPiL kCQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EX8X4lO7aSaVB1FpMoDQxncs8FMEtYzW491XME/gSYQ=; b=EZ4Zxgtf2PBv4TY4vJgeV9FIhurAlmkvWz4nBQm7Ba4DEu46KXc3drec52I/eCd7/Y Did+M+WwTPlWwL7TT5LAnHM0uVZUvJigfHbL1IDg4B3wNw1D4Sm2BgRzowehGQCMrPJT 0DjdMTE7pb0o+c2nGJw2ZBDALaKcjiCQMBtLJ/DRey2sYIjWkLnUhUCtMsUy1xhVdyr2 sOw1+ZAI424KXvFi2AIoMpspZWN7UyycT8ui7Ye6whQTuJl/3m2LnXynTHiohrcyS1pn CavQ1SgN2T76uAdw+Xtf0bGOiqBWwoy8YZ9j1Bj11CVF5yzEZgDHD6upg4N5zlhDrVRI sL4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uTv0KihH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y42si47329512qta.344.2019.08.01.19.29.27; Thu, 01 Aug 2019 19:29:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uTv0KihH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2403816AbfHAXpx (ORCPT + 99 others); Thu, 1 Aug 2019 19:45:53 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:33194 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390427AbfHAXpt (ORCPT ); Thu, 1 Aug 2019 19:45:49 -0400 Received: by mail-vs1-f67.google.com with SMTP id m8so50205075vsj.0; Thu, 01 Aug 2019 16:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EX8X4lO7aSaVB1FpMoDQxncs8FMEtYzW491XME/gSYQ=; b=uTv0KihHzXdFtzn+LjPKqpsUXs5DAkUGjm8wB/wmTC2piN3+7ufjR8Gkc2bMAmuhEI Cfx9ohunWZK6FdjhCn5oMZdAn8IvFR0ngPfc9C56hc4J/sBdN2+Z/eb/iVB3u4+FYP++ YZ0+8RE6Yij1Ht1M96t+C0aZmGOrrttpUJXmGZy19FeYx8UbMgHxSP2DV6dJf6N+WJ7Z hTo0z0PRLdZon5magUgEiwBnhaqI8d/vqLa0UNKFOlQlB4A5ZG8TH25VKQLfVXYIPoh5 n+GVUoIfKxa6cvwwL4jiGFJNjvgehcO+pqA6bGwtSZrSNeRxy99oUKMOWvARbKnRGuNl glQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EX8X4lO7aSaVB1FpMoDQxncs8FMEtYzW491XME/gSYQ=; b=eMIRxZ7qBb/WaQWXgTA8jDhbF22kAohEnMsmkGE1s6Mo2oacECpbHx3M2Jx5vKb6tQ pcowMEilY9JRslicvdR050Pud7tCoWFC34FzV8tTV1qMG/UJYYaHHeenL/xejSZZtEw3 drgqVps4xs7VSs19HhNfMFf/z7F2TYsfI5z2IlwDuS3nQwN8jNDI434OaJWViGpq5VAE AblrRdk6pniMGtvoXNKADsxA6zryA1cOmjEWOYIIzzz8LIqd2HrAMpHyRA3w3Kt2dXni ADsciyHhKsoezkbwuBL9mmoqxdiZ5LtenkDZQtU3upQYJW/c/9X51P7t6Y+xpERsUKPd 1ETA== X-Gm-Message-State: APjAAAWOj68pHqP2oxNY8LhfT3Hi/I1fbZo1A+bvd1xLlGf4aDNrxVKS FDJVuhEk9wSDEgi5+tTlWqGP93UqAV4hsA+RCpg= X-Received: by 2002:a67:fd91:: with SMTP id k17mr84874201vsq.121.1564703147897; Thu, 01 Aug 2019 16:45:47 -0700 (PDT) MIME-Version: 1.0 References: <20190801220117.14952-1-lyude@redhat.com> In-Reply-To: <20190801220117.14952-1-lyude@redhat.com> From: Ben Skeggs Date: Fri, 2 Aug 2019 09:45:36 +1000 Message-ID: Subject: Re: [Nouveau] [PATCH] PCI: Use pci_reset_bus() in quirk_reset_lenovo_thinkpad_50_nvgpu() To: Lyude Paul Cc: ML nouveau , linux-pci@vger.kernel.org, Lukas Wunner , Aaron Plattner , Maik Freudenberg , linux-kernel@vger.kernel.org, Daniel Drake , Bjorn Helgaas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Aug 2019 at 08:01, Lyude Paul wrote: > > Since quirk_nvidia_hda() was added there's now two nvidia device > functions on any laptops with nvidia GPUs: the HDA controller, and the > GPU itself. Unfortunately this has the sideaffect of breaking > quirk_reset_lenovo_thinkpad_50_nvgpu() since pci_reset_function() was > using pci_parent_bus_reset() to reset the GPU's respective PCI bus, and > pci_parent_bus_reset() does not work on busses which have more then a > single device function present. > > So, fix this by simply calling pci_reset_bus() instead which properly > resets the GPU bus and all device functions under it, including both the > GPU and the HDA controller. > > Fixes: b516ea586d71 ("PCI: Enable NVIDIA HDA controllers") > Cc: Lukas Wunner > Cc: Daniel Drake > Cc: Bjorn Helgaas > Cc: Aaron Plattner > Cc: Peter Wu > Cc: Ilia Mirkin > Cc: Karol Herbst > Cc: Maik Freudenberg > Cc: linux-pci@vger.kernel.org > Signed-off-by: Lyude Paul Acked-by: Ben Skeggs > --- > drivers/pci/quirks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 208aacf39329..44c4ae1abd00 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -5256,7 +5256,7 @@ static void quirk_reset_lenovo_thinkpad_p50_nvgpu(struct pci_dev *pdev) > */ > if (ioread32(map + 0x2240c) & 0x2) { > pci_info(pdev, FW_BUG "GPU left initialized by EFI, resetting\n"); > - ret = pci_reset_function(pdev); > + ret = pci_reset_bus(pdev); > if (ret < 0) > pci_err(pdev, "Failed to reset GPU: %d\n", ret); > } > -- > 2.21.0 > > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau