From patchwork Fri Sep 7 21:28:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 182449 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1C9FB2C0094 for ; Sat, 8 Sep 2012 07:22:52 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757137Ab2IGVWN (ORCPT ); Fri, 7 Sep 2012 17:22:13 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:42872 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756662Ab2IGVWM (ORCPT ); Fri, 7 Sep 2012 17:22:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id BEFB61DD826; Fri, 7 Sep 2012 23:25:21 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11416-10; Fri, 7 Sep 2012 23:25:11 +0200 (CEST) Received: from ferrari.rjw.lan (89-67-90-11.dynamic.chello.pl [89.67.90.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id BD6BF1DD80F; Fri, 7 Sep 2012 23:25:11 +0200 (CEST) From: "Rafael J. Wysocki" To: Bjorn Helgaas Subject: [Resend][PATCH] pciehp: always implement resume Date: Fri, 7 Sep 2012 23:28:30 +0200 User-Agent: KMail/1.13.6 (Linux/3.6.0-rc3+; KDE/4.6.0; x86_64; ; ) Cc: LKML , Linux PM list , "Greg Kroah-Hartman" , Oliver Neukum , linux-pci@vger.kernel.org MIME-Version: 1.0 Message-Id: <201209072328.30553.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Oliver Neukum Subject: pciehp: always implement resume The driver by default ignores resume. On some laptops that means that interrupts are not delivered after S3. So card removals and insertions will not be handled. Requiring a forced load isn't right. Signed-off-by: Oliver Neukum Signed-off-by: Rafael J. Wysocki --- drivers/pci/hotplug/pciehp_core.c | 28 ++++++++++++++-------------- drivers/pci/hotplug/pciehp_core.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) -- 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 Index: linux/drivers/pci/hotplug/pciehp_core.c =================================================================== --- linux.orig/drivers/pci/hotplug/pciehp_core.c +++ linux/drivers/pci/hotplug/pciehp_core.c @@ -300,24 +300,24 @@ static int pciehp_suspend (struct pcie_d static int pciehp_resume (struct pcie_device *dev) { + struct controller *ctrl; + struct slot *slot; + u8 status; + dev_info(&dev->device, "%s ENTRY\n", __func__); - if (pciehp_force) { - struct controller *ctrl = get_service_data(dev); - struct slot *slot; - u8 status; + ctrl = get_service_data(dev); - /* reinitialize the chipset's event detection logic */ - pcie_enable_notification(ctrl); + /* reinitialize the chipset's event detection logic */ + pcie_enable_notification(ctrl); - slot = ctrl->slot; + slot = ctrl->slot; - /* Check if slot is occupied */ - pciehp_get_adapter_status(slot, &status); - if (status) - pciehp_enable_slot(slot); - else - pciehp_disable_slot(slot); - } + /* Check if slot is occupied */ + pciehp_get_adapter_status(slot, &status); + if (status) + pciehp_enable_slot(slot); + else + pciehp_disable_slot(slot); return 0; } #endif /* PM */