From b118b72db6781dd18c9a86dc747b1420e9fa1c74 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Mon, 6 Jun 2011 15:49:36 -0700 Subject: [PATCH] --- yaml --- r: 259444 b: refs/heads/master c: 3e1edf6a6c0c4140bb6c22fe880d924f4d10b164 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/storvsc_drv.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6a56925c3056..1dfe64ebe6e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 604a1eb0eb67c38e29f9efd8d20668904f93b50c +refs/heads/master: 3e1edf6a6c0c4140bb6c22fe880d924f4d10b164 diff --git a/trunk/drivers/staging/hv/storvsc_drv.c b/trunk/drivers/staging/hv/storvsc_drv.c index 53e9ebd9c07f..2c6d2f24b3c2 100644 --- a/trunk/drivers/staging/hv/storvsc_drv.c +++ b/trunk/drivers/staging/hv/storvsc_drv.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -723,6 +724,27 @@ static struct hv_driver storvsc_drv = { .remove = storvsc_remove, }; +/* + * We use a DMI table to determine if we should autoload this driver This is + * needed by distro tools to determine if the hyperv drivers should be + * installed and/or configured. We don't do anything else with the table, but + * it needs to be present. + */ + +static const struct dmi_system_id __initconst +hv_stor_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_stor_dmi_table); + static int __init storvsc_drv_init(void) { int ret;