|
@@ -40,18 +40,21 @@
|
|
|
|
|
|
#include "hyperv_net.h"
|
|
#include "hyperv_net.h"
|
|
|
|
|
|
-struct net_device_context {
|
|
|
|
- /* point back to our device context */
|
|
|
|
- struct hv_device *device_ctx;
|
|
|
|
- struct delayed_work dwork;
|
|
|
|
- struct work_struct work;
|
|
|
|
-};
|
|
|
|
|
|
|
|
#define RING_SIZE_MIN 64
|
|
#define RING_SIZE_MIN 64
|
|
static int ring_size = 128;
|
|
static int ring_size = 128;
|
|
module_param(ring_size, int, S_IRUGO);
|
|
module_param(ring_size, int, S_IRUGO);
|
|
MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
|
|
MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
|
|
|
|
|
|
|
|
+static const u32 default_msg = NETIF_MSG_DRV | NETIF_MSG_PROBE |
|
|
|
|
+ NETIF_MSG_LINK | NETIF_MSG_IFUP |
|
|
|
|
+ NETIF_MSG_IFDOWN | NETIF_MSG_RX_ERR |
|
|
|
|
+ NETIF_MSG_TX_ERR;
|
|
|
|
+
|
|
|
|
+static int debug = -1;
|
|
|
|
+module_param(debug, int, S_IRUGO);
|
|
|
|
+MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
|
|
|
|
+
|
|
static void do_set_multicast(struct work_struct *w)
|
|
static void do_set_multicast(struct work_struct *w)
|
|
{
|
|
{
|
|
struct net_device_context *ndevctx =
|
|
struct net_device_context *ndevctx =
|
|
@@ -888,6 +891,11 @@ static int netvsc_probe(struct hv_device *dev,
|
|
|
|
|
|
net_device_ctx = netdev_priv(net);
|
|
net_device_ctx = netdev_priv(net);
|
|
net_device_ctx->device_ctx = dev;
|
|
net_device_ctx->device_ctx = dev;
|
|
|
|
+ net_device_ctx->msg_enable = netif_msg_init(debug, default_msg);
|
|
|
|
+ if (netif_msg_probe(net_device_ctx))
|
|
|
|
+ netdev_dbg(net, "netvsc msg_enable: %d\n",
|
|
|
|
+ net_device_ctx->msg_enable);
|
|
|
|
+
|
|
hv_set_drvdata(dev, net);
|
|
hv_set_drvdata(dev, net);
|
|
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change);
|
|
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change);
|
|
INIT_WORK(&net_device_ctx->work, do_set_multicast);
|
|
INIT_WORK(&net_device_ctx->work, do_set_multicast);
|