i40e: Issue a PF reset if Tx queue disable timeout
authorParikh, Neerav <neerav.parikh@intel.com>
Sat, 21 Feb 2015 06:43:55 +0000 (06:43 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 26 Feb 2015 12:54:00 +0000 (04:54 -0800)
As part of DCB reconfiguration flow if the Tx queue disable times out
then issue a PF reset to do some level of recovery.

Change-ID: I7550021c55bff355351c0365e61e1f05fcaff46d
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index bd4494d727a6efda6558bcffbe4cd4557d818959..9751465f29c71ab2c28a6a2ac57787ba4e92328a 100644 (file)
@@ -5266,8 +5266,14 @@ static int i40e_handle_lldp_event(struct i40e_pf *pf,
 
        /* Wait for the PF's Tx queues to be disabled */
        ret = i40e_pf_wait_txq_disabled(pf);
-       if (!ret)
+       if (ret) {
+               /* Schedule PF reset to recover */
+               set_bit(__I40E_PF_RESET_REQUESTED, &pf->state);
+               i40e_service_event_schedule(pf);
+       } else {
                i40e_pf_unquiesce_all_vsi(pf);
+       }
+
 exit:
        return ret;
 }