summary'>refs'>logtreecommitdiff'>stats
path: '>root//'>sys-kernel/boest-v4.17.15//0005-x86-pci-add-support-for-pci-rev-net.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/boest-v4.17.15/0005-x86-pci-add-support-for-pci-rev-net.patch')
-rw-rw-r--r--sys-kernel/boest-v4.17.15/0005-x86-pci-add-support-for-pci-rev-net.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/sys-kernel/boest-v4.17.15/0005-x86-pci-add-support-for-pci-rev-net.patch b/sys-kernel/boest-v4.17.15/0005-x86-pci-add-support-for-pci-rev-net.patch
new file mode 100644
index 00000000..c5d839ee
--- /dev/null
+++ b/sys-kernel/boest-v4.17.15/0005-x86-pci-add-support-for-pci-rev-net.patch
@@ -0,0 +1,75 @@
+From 39d964a5e5c5876cac9706d00d9a3898cee36593 Mon Sep 17 00:00:00 2001
+From: Willy Tarreau <w@1wt.eu>
+Date: Wed, 2 Feb 2011 12:40:44 +0100
+Subject: [PATCH 05/16] x86/pci: add support for pci=rev-net
+
+Scan network devices in the opposite order on each bus if pci=rev-net is found.
+
+Reviewed-by: Bertrand Jacquin <bertrand@jacquin.bzh>
+Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh>
+---
+ arch/x86/include/asm/pci_x86.h | 1 +
+ arch/x86/pci/common.c | 5 +++++
+ drivers/pci/probe.c | 7 ++++++-
+ 3 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
+index 959d618dbb17..a9eb23ac5692 100644
+--- a/arch/x86/include/asm/pci_x86.h
++++ b/arch/x86/include/asm/pci_x86.h
+@@ -39,6 +39,7 @@ do { \
+ #define PCI_ROOT_NO_CRS 0x100000
+ #define PCI_NOASSIGN_BARS 0x200000
+ #define PCI_BIG_ROOT_WINDOW 0x400000
++#define PCI_REV_NETWORK 0x800000
+
+ extern unsigned int pci_probe;
+ extern unsigned long pirq_table_addr;
+diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
+index 563049c483a1..ca7de5f27a7c 100644
+--- a/arch/x86/pci/common.c
++++ b/arch/x86/pci/common.c
+@@ -19,6 +19,8 @@
+ #include <asm/pci_x86.h>
+ #include <asm/setup.h>
+
++extern int pci_reverse_net;
++
+ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
+ PCI_PROBE_MMCONF;
+
+@@ -605,6 +607,9 @@ char *__init pcibios_setup(char *str)
+ } else if (!strcmp(str, "routeirq")) {
+ pci_routeirq = 1;
+ return NULL;
++ } else if (!strcmp(str, "rev-net")) {
++ pci_reverse_net = 1;
++ return NULL;
+ } else if (!strcmp(str, "skip_isa_align")) {
+ pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
+ return NULL;
+diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
+index d21686ad3ce5..f4c7032209ed 100644
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -87,6 +87,8 @@ int no_pci_devices(void)
+ }
+ EXPORT_SYMBOL(no_pci_devices);
+
++int pci_reverse_net;
++
+ /*
+ * PCI Bus Class
+ */
+@@ -959,7 +961,10 @@ struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
+ child = pci_alloc_child_bus(parent, dev, busnr);
+ if (child) {
+ down_write(&pci_bus_sem);
+- list_add_tail(&child->node, &parent->children);
++ if (pci_reverse_net && (dev->class >> 8) == PCI_CLASS_NETWORK_ETHERNET)
++ list_add(&child->node, &parent->children);
++ else
++ list_add_tail(&child->node, &parent->children);
+ up_write(&pci_bus_sem);
+ }
+ return child;