diff options
author | K. Y. Srinivasan | 2011-06-07 00:49:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-06-07 22:45:48 +0200 |
commit | 3e1edf6a6c0c4140bb6c22fe880d924f4d10b164 (patch) | |
tree | 423e2d9fb3414d07930c4aea943b0bcd6ada51cb /drivers/staging/hv | |
parent | Staging: hv: vmbus: Don't free the channel when the channel is closed (diff) | |
download | kernel-qcow2-linux-3e1edf6a6c0c4140bb6c22fe880d924f4d10b164.tar.gz kernel-qcow2-linux-3e1edf6a6c0c4140bb6c22fe880d924f4d10b164.tar.xz kernel-qcow2-linux-3e1edf6a6c0c4140bb6c22fe880d924f4d10b164.zip |
Staging: hv: storvsc: Add a DMI signature to support auto-loading
To support auto-loading the storvsc driver, add a DMI signature.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 53e9ebd9c07f..2c6d2f24b3c2 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -24,6 +24,7 @@ #include <linux/module.h> #include <linux/device.h> #include <linux/blkdev.h> +#include <linux/dmi.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h> @@ -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; |