From: <Jordan_Hargrave@Dell.com>
To: <jharg93@gmail.com>, <jdelvare@suse.de>,
<Jordan_Hargrave@Dell.com>, <tglx@linutronix.de>,
<bhelgaas@google.com>, <mingo@redhat.com>, <hpa@zytor.com>
Cc: <linux-kernel@vger.kernel.org>, <linxu-pci@vger.kernel.org>
Subject: [PATCH] Create pci slot files for SMBIOS Type 9 entries
Date: Tue, 9 Feb 2016 22:56:30 +0000 [thread overview]
Message-ID: <1455058433803.44638@Dell.com> (raw)
In-Reply-To: <1448678755-14779-1-git-send-email-jordan_hargrave@dell.com>
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 <Jordan_Hargrave@dell.com>
---
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
next prev parent reply other threads:[~2016-02-09 23:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-28 2:45 [PATCHv3] Save SMBIOS Type 9 System Slots during DMI Scan Jordan Hargrave
2015-11-29 14:25 ` Jean Delvare
2016-02-09 22:56 ` Jordan_Hargrave [this message]
2016-02-09 23:23 ` [PATCH] Create pci slot files for SMBIOS Type 9 entries kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455058433803.44638@Dell.com \
--to=jordan_hargrave@dell.com \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=jdelvare@suse.de \
--cc=jharg93@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linxu-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®