提交 d515d0ff 编写于 作者: H Haiyang Zhang 提交者: Greg Kroah-Hartman

staging: hv: remove the carrier status check from netvsc_open()

Checking carrier status in netvsc_open() is not necessary.
Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 657d1b0d
TODO:
- audit the network driver
- checking for carrier inside open is wrong, network device API
confusion??
- audit the scsi driver
Please send patches for this code to Greg Kroah-Hartman <gregkh@suse.de>,
......
......@@ -69,20 +69,15 @@ static int netvsc_open(struct net_device *net)
struct hv_device *device_obj = net_device_ctx->device_ctx;
int ret = 0;
if (netif_carrier_ok(net)) {
/* Open up the device */
ret = rndis_filter_open(device_obj);
if (ret != 0) {
netdev_err(net, "unable to open device (ret %d).\n",
ret);
return ret;
}
netif_start_queue(net);
} else {
netdev_err(net, "unable to open device...link is down.\n");
/* Open up the device */
ret = rndis_filter_open(device_obj);
if (ret != 0) {
netdev_err(net, "unable to open device (ret %d).\n", ret);
return ret;
}
netif_start_queue(net);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册