Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197414
b: refs/heads/master
c: 06e719d
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 14, 2010
1 parent 89f4d80 commit b7483fd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94c1f90bb0bac8c2b75569a247b89145022c4c24
refs/heads/master: 06e719d80ff900973cddffa84fc2d7620c69a236
26 changes: 26 additions & 0 deletions trunk/drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <linux/skbuff.h>
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/dmi.h>
#include <linux/pci.h>
#include <net/arp.h>
#include <net/route.h>
#include <net/sock.h>
Expand Down Expand Up @@ -551,13 +553,30 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
return ret;
}

static const struct dmi_system_id __initconst
hv_netvsc_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_netvsc_dmi_table);

static int __init netvsc_init(void)
{
int ret;

DPRINT_ENTER(NETVSC_DRV);
DPRINT_INFO(NETVSC_DRV, "Netvsc initializing....");

if (!dmi_check_system(hv_netvsc_dmi_table))
return -ENODEV;

ret = netvsc_drv_init(NetVscInitialize);

DPRINT_EXIT(NETVSC_DRV);
Expand All @@ -572,6 +591,13 @@ static void __exit netvsc_exit(void)
DPRINT_EXIT(NETVSC_DRV);
}

static const struct pci_device_id __initconst
hv_netvsc_pci_table[] __maybe_unused = {
{ PCI_DEVICE(0x1414, 0x5353) }, /* VGA compatible controller */
{ 0 }
};
MODULE_DEVICE_TABLE(pci, hv_netvsc_pci_table);

MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION);
MODULE_DESCRIPTION("Microsoft Hyper-V network driver");
Expand Down

0 comments on commit b7483fd

Please sign in to comment.