From patchwork Fri Sep 12 18:04:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 4897301 Return-Path: X-Original-To: patchwork-linux-acpi@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 39AA6BEEA5 for ; Fri, 12 Sep 2014 18:05:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0730120200 for ; Fri, 12 Sep 2014 18:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 295072024C for ; Fri, 12 Sep 2014 18:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752526AbaILSEZ (ORCPT ); Fri, 12 Sep 2014 14:04:25 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:61863 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbaILSES (ORCPT ); Fri, 12 Sep 2014 14:04:18 -0400 Received: by mail-ie0-f176.google.com with SMTP id ar1so1405157iec.21 for ; Fri, 12 Sep 2014 11:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=FRATfe6sT6kR5evtyPOswNplOao9F3448lKLsfMbYZc=; b=o5Lsf2hng8mq6t0B45i+atlm8tX0gc0KN4q44pBfITtzcPcIFNq4Yf680bXW/G+ft+ m1oD/fseVYicHdFUANAv+0puN1r9WkHQpWUg5O0B70rAMqjG7yTXb0mCiD/jlLqrXe7r DCV/qTxVOthf7pzgWLNfQcjSpA9LNINrv7r2UJUjpkKpnx+jLXnx1HCKU7rPoTNR8Fg2 /cqxy2LY5g1uLPO87fJUg63r6BudiGRNmTTI5wvH234Y8XJj4K5jFTppjvW/UbINsZsg BAw1+kvA59wD0ot8mWCenHURsidt5qX9HAcEQA361HFZaV94FGyjlEY//GfK4xgJXBEl FFSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=FRATfe6sT6kR5evtyPOswNplOao9F3448lKLsfMbYZc=; b=llZjcWRys2r05c+Lfxwsa9Keb1gpExg4uX9XDPaxe8iCulXrJ7udV0lARQrBpRdIsf wydckuBlxkc4rJflWXaSO2vdPkQtC/cSJ5tHQeAX5VbAcCSgsPFRyroIIgZ9ZDWRgpBd LgBMrFNvtO4J07UX81RHo+KFMq0PJ+MxjGy0EjKY+nZtB4TGMblNpPOqQUNP3mFX7cwG GnMoogTo3JBwblALsnBYsanCpUa4uN2JZq1Omg11+d4jtQ+85XDg84G5MhdXPFJO2k2M Xv0IqZm1I9WJyU/IDdpFUNuIBS5PzcZHzRdEwdp1hZEjZWAT7nZZnBNMhYHIXGd9c0NK Jtjg== X-Gm-Message-State: ALoCoQmvHkk/0UWKh47KBoXtFOEwyQ1iO5urMq6Nyc38PVRfzdkqS+S205+vt//sUSpcWMHvhIYM X-Received: by 10.42.247.18 with SMTP id ma18mr11016371icb.27.1410545057422; Fri, 12 Sep 2014 11:04:17 -0700 (PDT) Received: from localhost ([172.16.49.108]) by mx.google.com with ESMTPSA id z5sm2075585igl.21.2014.09.12.11.04.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 11:04:16 -0700 (PDT) Subject: [PATCH v1 13/13] PCI: Configure *all* devices, not just hot-added ones To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Rajat Jain , Linus Torvalds , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu Date: Fri, 12 Sep 2014 12:04:16 -0600 Message-ID: <20140912180415.1630.57583.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20140912180141.1630.17120.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20140912180141.1630.17120.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, 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 There's not really a good way to determine whether firmware has already configured a device with _HPP/_HPX settings. On legacy systems, the BIOS has probably configured everything, but on UEFI systems it is not required to do so. Per the PCI Firmware Specification, rev 3.1, sec 3.5, if PCI_COMMAND_IO or PCI_COMMAND_MEMORY is set, we can assume firmware has set the corresponding BARs and maybe we can assume it has configured the rest of the device. And if a bridge has PCI_COMMAND_PARITY or PCI_COMMAND_SERR set, we can assume firmware has configured the bridge. But we can't tell much about devices without BARs. I think it should be safe to apply _HPP and _HPX settings anyway, even if firmware has already configured the device, so configure everything we find. Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 3 --- 1 file changed, 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" 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/pci/probe.c b/drivers/pci/probe.c index cb411fbb6435..290c657da0b9 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1358,9 +1358,6 @@ static void pci_configure_device(struct pci_dev *dev) struct hotplug_params hpp; int ret; - if (system_state == SYSTEM_BOOTING) - return; - memset(&hpp, 0, sizeof(hpp)); ret = pci_get_hp_params(dev, &hpp); if (ret)