Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268133
b: refs/heads/master
c: 692e084
h: refs/heads/master
i:
  268131: 13706c7
v: v3
  • Loading branch information
Haiyang Zhang authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 41da13b commit 7df7d63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4b6a2eaf1c14810a4803d658f68614365978738
refs/heads/master: 692e084e773b76c30a3e5d823db131ed1a15924a
32 changes: 17 additions & 15 deletions trunk/drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,6 @@ static int netvsc_probe(struct hv_device *dev)
dev_set_drvdata(&dev->device, net);
INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_send_garp);

/* Notify the netvsc driver of the new device */
device_info.ring_size = ring_size;
ret = rndis_filter_device_add(dev, &device_info);
if (ret != 0) {
free_netdev(net);
dev_set_drvdata(&dev->device, NULL);
return ret;
}

netif_carrier_on(net);

memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);

net->netdev_ops = &device_ops;

/* TODO: Add GSO and Checksum offload */
Expand All @@ -372,11 +359,26 @@ static int netvsc_probe(struct hv_device *dev)

ret = register_netdev(net);
if (ret != 0) {
/* Remove the device and release the resource */
rndis_filter_device_remove(dev);
pr_err("Unable to register netdev.\n");
free_netdev(net);
goto out;
}

/* Notify the netvsc driver of the new device */
device_info.ring_size = ring_size;
ret = rndis_filter_device_add(dev, &device_info);
if (ret != 0) {
netdev_err(net, "unable to add netvsc device (ret %d)\n", ret);
unregister_netdev(net);
free_netdev(net);
dev_set_drvdata(&dev->device, NULL);
return ret;
}
memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN);

netif_carrier_on(net);

out:
return ret;
}

Expand Down

0 comments on commit 7df7d63

Please sign in to comment.