i40e: do not bail when disabling if Tx queue disable fails
authorAnjali Singhai Jain <anjali.singhai@intel.com>
Sat, 21 Dec 2013 05:44:44 +0000 (05:44 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 11 Jan 2014 00:30:34 +0000 (16:30 -0800)
Fix a bug where the driver was erroneously exiting the driver unload
path if one part of the unload failed.  Instead of the original way
the driver should always continue when disabling and be sure to disable
all queues.

Change-ID: Ib8c81c596bc87c31d8e9ca97ebf871168475279d
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 80c83eb5c6c5a0e1c6bcb197e86528ea163fa650..65c27cb1e9ec4807b19143447975a5afb8c7968f 100644 (file)
@@ -3113,7 +3113,7 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)
  **/
 int i40e_vsi_control_rings(struct i40e_vsi *vsi, bool request)
 {
-       int ret;
+       int ret = 0;
 
        /* do rx first for enable and last for disable */
        if (request) {
@@ -3122,10 +3122,9 @@ int i40e_vsi_control_rings(struct i40e_vsi *vsi, bool request)
                        return ret;
                ret = i40e_vsi_control_tx(vsi, request);
        } else {
-               ret = i40e_vsi_control_tx(vsi, request);
-               if (ret)
-                       return ret;
-               ret = i40e_vsi_control_rx(vsi, request);
+               /* Ignore return value, we need to shutdown whatever we can */
+               i40e_vsi_control_tx(vsi, request);
+               i40e_vsi_control_rx(vsi, request);
        }
 
        return ret;