Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2011-07-15 10:14:30 +0200
committerOlaf Hering <ohering@suse.de>2011-07-15 10:14:30 +0200
commitf2f7449c2204402641dca79b3960ee753de9e7d0 (patch)
tree46adca7f2462436ae5b0ebf809708fd03deece68
parent27de2982bbaa5f07c66e6b527fef77ca4822972f (diff)
hv: only load the driver in a hyper-v guest (bnc#704957).
-rw-r--r--patches.suse/staging-hv-vmbus-init-on-dmi-match.patch47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.suse/staging-hv-vmbus-init-on-dmi-match.patch b/patches.suse/staging-hv-vmbus-init-on-dmi-match.patch
new file mode 100644
index 0000000000..aaa550f1fe
--- /dev/null
+++ b/patches.suse/staging-hv-vmbus-init-on-dmi-match.patch
@@ -0,0 +1,47 @@
+From: <ohering@suse.de>
+Subject: hv: only load the driver in a hyper-v guest
+References: bnc#704957
+Patch-mainline: obsolete
+
+---
+ drivers/staging/hv/vmbus_drv.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/drivers/staging/hv/vmbus_drv.c
++++ b/drivers/staging/hv/vmbus_drv.c
+@@ -32,6 +32,7 @@
+ #include <linux/dmi.h>
+ #include <linux/slab.h>
+ #include <linux/acpi.h>
++#include <linux/dmi.h>
+ #include <acpi/acpi_bus.h>
+ #include <linux/completion.h>
+
+@@ -824,10 +825,27 @@ static struct pci_driver hv_bus_driver =
+ .id_table = microsoft_hv_pci_table,
+ };
+
++static const struct dmi_system_id __initconst
++hv_vmbus_dmi_table[] __maybe_unused = {
++ {
++ .ident = "Hyper-V",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
++ DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
++ },
++ },
++ { },
++};
++MODULE_DEVICE_TABLE(dmi, hv_vmbus_dmi_table);
++
+ static int __init hv_pci_init(void)
+ {
+ int ret;
+
++ if (!dmi_check_system(hv_vmbus_dmi_table))
++ return -ENODEV;
++
+ init_completion(&probe_event);
+
+ /*
diff --git a/series.conf b/series.conf
index aef6ee33bf..aa58cd72e8 100644
--- a/series.conf
+++ b/series.conf
@@ -434,6 +434,7 @@
########################################################
# Other driver fixes
########################################################
+ patches.suse/staging-hv-vmbus-init-on-dmi-match.patch
patches.fixes/parport-mutex
patches.suse/no-partition-scan