From patchwork Tue Dec 17 20:06:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajat Jain X-Patchwork-Id: 3365071 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFCF0C0D4A for ; Tue, 17 Dec 2013 20:08:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FB8D203AB for ; Tue, 17 Dec 2013 20:07:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D0A9203AA for ; Tue, 17 Dec 2013 20:07:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753739Ab3LQUG2 (ORCPT ); Tue, 17 Dec 2013 15:06:28 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:58059 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477Ab3LQUG0 (ORCPT ); Tue, 17 Dec 2013 15:06:26 -0500 Received: by mail-pd0-f171.google.com with SMTP id z10so7233557pdj.2 for ; Tue, 17 Dec 2013 12:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=RA/y59vZj12XGhLuwtgxIFBNJi3KG2PGDaXiYcvEn0A=; b=dmEZIfoZMKjWLBe/Pq7zcyA803eTZevj1CPXWmYMTUOhj8LW+DjArSSO6KqdT0OckC 21vHNcAgw+7kbbFirdRRiGp5Bq1OwZFYlP6iyehJKLJYcOx+ERD9DfxaWgs6CYAUsUwb W9UxLNbaqSUKuKRlX6JhR0wJvqiz77Chi4evbXK2JyrC71pSXu+Olk4FAVCvO4YUrc/l gDN5KkN5YiFlLMlSgOsAG8or36ud1eIF+mxYLVzOIaaYGyVi85wmeRqGkEfpYdOFDZnK mf9jTaExvcYPrmUKns0vlJfzyGPgVwIsalEvqc+dpTuIJ/SjrD9kcg/uDVuPdeMSu7rL hsfQ== X-Received: by 10.68.25.229 with SMTP id f5mr29975519pbg.6.1387310785936; Tue, 17 Dec 2013 12:06:25 -0800 (PST) Received: from [192.168.211.137] ([66.129.239.12]) by mx.google.com with ESMTPSA id fk4sm48599578pab.23.2013.12.17.12.06.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 12:06:19 -0800 (PST) Message-ID: <52B0AEAD.6050604@gmail.com> Date: Tue, 17 Dec 2013 12:06:05 -0800 From: Rajat Jain User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Bjorn Helgaas , Kenji Kaneshige , Alex Williamson , Yijing Wang , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu CC: Guenter Roeck , Rajat Jain , Rajat Jain Subject: [PATCH v3 4/8] pciehp: Don't disable the link permanently, during removal Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 We need future link up events for hot-add, thus don't disable the link permanently during device removal. Also, remove the static functions that are now left unused. Signed-off-by: Rajat Jain Signed-off-by: Guenter Roeck --- v3: no change, created by splitting the patch v2 [2/4] v2: (non existent) v1: (non existent) drivers/pci/hotplug/pciehp_hpc.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index b45b568..ab12555 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -278,11 +278,6 @@ static void pcie_wait_link_active(struct controller *ctrl) __pcie_wait_link_active(ctrl, true); } -static void pcie_wait_link_not_active(struct controller *ctrl) -{ - __pcie_wait_link_active(ctrl, false); -} - static bool pci_bus_check_dev(struct pci_bus *bus, int devfn) { u32 l; @@ -383,11 +378,6 @@ static int pciehp_link_enable(struct controller *ctrl) return __pciehp_link_set(ctrl, true); } -static int pciehp_link_disable(struct controller *ctrl) -{ - return __pciehp_link_set(ctrl, false); -} - int pciehp_get_attention_status(struct slot *slot, u8 *status) { struct controller *ctrl = slot->ctrl; @@ -620,14 +610,6 @@ int pciehp_power_off_slot(struct slot * slot) u16 cmd_mask; int retval; - /* Disable the link at first */ - pciehp_link_disable(ctrl); - /* wait the link is down */ - if (ctrl->link_active_reporting) - pcie_wait_link_not_active(ctrl); - else - msleep(1000); - slot_cmd = POWER_OFF; cmd_mask = PCI_EXP_SLTCTL_PCC; retval = pcie_write_cmd(ctrl, slot_cmd, cmd_mask);