From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754175AbcBIXHs (ORCPT ); Tue, 9 Feb 2016 18:07:48 -0500 Received: from ausc60pc101.us.dell.com ([143.166.85.206]:63770 "EHLO ausc60pc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbcBIXHr convert rfc822-to-8bit (ORCPT ); Tue, 9 Feb 2016 18:07:47 -0500 X-Greylist: delayed 652 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Feb 2016 18:07:47 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=CdM3Lch85935jVHEbc3SQ2ot+MfSOovrvxiGgzp5vBgV/tsSgqNEhof4 n/atqBZowdjuVheffcFU8k1nYyLshBSIb4mnqXOu+164HquLg6fwWmz/E wbq+fBrxRMhKDhqZWbFKyBP2KjhibdYXaL7P8QNNzgpb7tAGLO+4P2Q/n I=; X-LoopCount0: from 10.170.28.41 X-IronPort-AV: E=Sophos;i="5.22,423,1449554400"; d="scan'208";a="895962170" 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: AQHRY40dslGNp95D4Um7ZsDO+8vOwA== Date: Tue, 9 Feb 2016 22:56:30 +0000 Message-ID: <1455058433803.44638@Dell.com> References: <1448678755-14779-1-git-send-email-jordan_hargrave@dell.com> In-Reply-To: <1448678755-14779-1-git-send-email-jordan_hargrave@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.9.160.250] Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) 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); } -- 1.7.1