staging: hv: remove the carrier status check from netvsc_open()
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 28 Sep 2011 20:24:15 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 30 Sep 2011 00:34:50 +0000 (17:34 -0700)
Checking carrier status in netvsc_open() is not necessary.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/TODO
drivers/staging/hv/netvsc_drv.c

index fcc57c245803500c6c47ec281c5a96c29760aa1d..ed4d63619df280f9285789656db1fd115fdc0cef 100644 (file)
@@ -1,7 +1,5 @@
 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>,
index 69c233e5fbe04e23b87134d16898ccd998b412b6..561ba58f0e1f7522492f77c0c8d9ddee49736830 100644 (file)
@@ -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;
 }