From patchwork Wed Feb 10 14:50:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan_Hargrave@Dell.com X-Patchwork-Id: 8272571 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C0C7BEEE5 for ; Wed, 10 Feb 2016 15:00:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A38E9203E1 for ; Wed, 10 Feb 2016 15:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C0AC2037F for ; Wed, 10 Feb 2016 15:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbcBJPAR (ORCPT ); Wed, 10 Feb 2016 10:00:17 -0500 Received: from ausc60pc101.us.dell.com ([143.166.85.206]:16032 "EHLO ausc60pc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbcBJPAP convert rfc822-to-8bit (ORCPT ); Wed, 10 Feb 2016 10:00:15 -0500 X-Greylist: delayed 577 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Feb 2016 10:00:15 EST DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:CC:Subject: Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader:x-originating-ip: Content-Type:Content-Transfer-Encoding:MIME-Version: Return-Path; b=dJFoAaIcOpWBUXvGosKT82ug0/YUdBbxVRPm3hAao05LRztGfKlUqzuB 2ISvbcY3xpR32/XMFxUulDbvFzxKx5exo0vFoKwe4a1iqwgsd8ZBkbZNL tnEcPtmtc6SeaHeuSACKMeNI52GkzAtT5cMhNCpVu8At/VWOFLJSITiGU U=; DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1455116415; x=1486652415; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0MnYjsQz7Tfqbdv3La3VFDiXT5eGR5CpPZy65A27JUI=; b=ibuzDaFEzDZmF+ZgPjCilUMMo7mMslbLN0W2HbtmdbN7S5ecgkOhkt3C ZSue1sOw/cFcy5Ji27aidPjc8lOHsFs+4OYa+sP+03rff6GwrfpE9i6PJ RyLI7fLUJZvM+AkUG9CUlO8B3sKPetJp7e9GDiK0PSO4kuJKdoFF4q2mm M=; X-LoopCount0: from 10.175.216.251 X-IronPort-AV: E=Sophos;i="5.22,426,1449554400"; d="scan'208";a="896189431" From: To: CC: Subject: [PATCH] Create pci slot files for SMBIOS Type 9 entries Thread-Topic: [PATCH] Create pci slot files for SMBIOS Type 9 entries Thread-Index: AQHRY40ebmBEO4IVqkOlr5wKeQ4iOp8lXX5q Date: Wed, 10 Feb 2016 14:50:34 +0000 Message-ID: <1455115834664.14871@Dell.com> References: <1448678755-14779-1-git-send-email-jordan_hargrave@dell.com>, <1455058433803.44638@Dell.com> In-Reply-To: <1455058433803.44638@Dell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.178.128.193] MIME-Version: 1.0 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.0 required=5.0 tests=BAYES_00,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 The following diff builds on the "[PATCHv3] Save SMBIOS Type 9 System Slots" This will create a /sys/bus/pci/slots/XXX file for each Type 9 entry. This will be used for systemd enumeration of NICs. Signed-off-by: Jordan Hargrave --- arch/x86/pci/common.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) -- 1.7.1 -- 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/arch/x86/pci/common.c b/arch/x86/pci/common.c index eccd4d9..fc5bc49 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -173,6 +173,23 @@ void pcibios_fixup_bus(struct pci_bus *b) void pcibios_add_bus(struct pci_bus *bus) { + const struct dmi_device *dmi; + struct dmi_dev_onboard *dslot; + + dmi = NULL; + while ((dmi = dmi_find_device(DMI_DEV_TYPE_DEV_SLOT, + NULL, dmi)) != NULL) { + dslot = dmi->device_data; + if (dslot->segment == pci_domain_nr(bus) && + dslot->bus == bus->number) { + dev_info(&bus->dev, "Found SMBIOS Slot %s\n", + dslot->dev.name); + pci_create_slot(bus, dslot->devfn, + dslot->dev.name, + NULL); + } + } + acpi_pci_add_bus(bus); }