From patchwork Wed Aug 1 13:29:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 1264291 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 98B0BDF215 for ; Wed, 1 Aug 2012 13:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632Ab2HANal (ORCPT ); Wed, 1 Aug 2012 09:30:41 -0400 Received: from smtp-out003.kontent.com ([81.88.40.217]:53677 "EHLO smtp-out003.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285Ab2HANal (ORCPT ); Wed, 1 Aug 2012 09:30:41 -0400 Received: from localhost.localdomain (p4FFB1AD4.dip.t-dialin.net [79.251.26.212]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: neukum_org@smtp-out003.kontent.com) by smtp-out003.kontent.com (Postfix) with ESMTPSA id C57A5400035C; Wed, 1 Aug 2012 15:30:39 +0200 (CEST) From: Oliver Neukum To: rjw@sisk.pl, linux-pm@vger.kernel.org Cc: Oliver Neukum , Oliver Neukum Subject: [PATCH] pciehp: always implement resume Date: Wed, 1 Aug 2012 15:29:38 +0200 Message-Id: <1343827778-26092-1-git-send-email-oliver@neukum.org> X-Mailer: git-send-email 1.7.7 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 Reviewed-by: Rafael J. Wysocki --- drivers/pci/hotplug/pciehp_core.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 365c6b9..916bf4f 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -300,24 +300,24 @@ static int pciehp_suspend (struct pcie_device *dev) 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 */