From patchwork Tue Feb 24 20:12:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 5875141 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EE0609F37F for ; Tue, 24 Feb 2015 20:13:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3606820256 for ; Tue, 24 Feb 2015 20:13:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56ECB20259 for ; Tue, 24 Feb 2015 20:13:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbbBXUMx (ORCPT ); Tue, 24 Feb 2015 15:12:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56093 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752851AbbBXUMv (ORCPT ); Tue, 24 Feb 2015 15:12:51 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1OKCfqo000822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Feb 2015 15:12:41 -0500 Received: from gimli.home (ovpn-113-210.phx2.redhat.com [10.3.113.210]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1OKCegn026576; Tue, 24 Feb 2015 15:12:40 -0500 Subject: [PATCH 2/2] nouveau/radeon: Un-ignore hotplug on resume From: Alex Williamson To: bhelgaas@google.com, linux-pci@vger.kernel.org, airlied@linux.ie, alexander.deucher@amd.com, dri-devel@lists.freedesktop.org Cc: alex.williamson@redhat.com, linux-kernel@vger.kernel.org Date: Tue, 24 Feb 2015 13:12:40 -0700 Message-ID: <20150224201240.14443.6308.stgit@gimli.home> In-Reply-To: <20150224200603.14443.68971.stgit@gimli.home> References: <20150224200603.14443.68971.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit b440bde74f04 enabled drivers to be able to set an ignore hotplug flag on the device and used it in the suspend routine for nouveau and radeon to prevent hotplug when the device is powered off. However, there was no undo function provided, so once set, the ignore hotplug flag lives on for the life of the pci_dev. I think the intention was only to ignore hotplug across the power event for the device, so we should be able to clear the flag on resume. Signed-off-by: Alex Williamson --- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + drivers/gpu/drm/radeon/radeon_drv.c | 1 + 2 files changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 8763deb..b168c3a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -749,6 +749,7 @@ nouveau_pmops_runtime_resume(struct device *dev) return -EINVAL; pci_set_power_state(pdev, PCI_D0); + pci_unignore_hotplug(pdev); pci_restore_state(pdev); ret = pci_enable_device(pdev); if (ret) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 5d684be..1c7c79b 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -472,6 +472,7 @@ static int radeon_pmops_runtime_resume(struct device *dev) drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; pci_set_power_state(pdev, PCI_D0); + pci_unignore_hotplug(pdev); pci_restore_state(pdev); ret = pci_enable_device(pdev); if (ret)