i40e: check_recovery_mode had wrong if statement
authorAdrian Podlawski <adrian.podlawski@intel.com>
Tue, 23 Jul 2019 10:01:35 +0000 (06:01 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 22 Aug 2019 20:24:13 +0000 (13:24 -0700)
commitd4256c8e9a7fab6e6c5cc3aa52ef7d2ff543b1ff
treec9936cbe23f816a2bb574bba9c020a070931290b
parentd802c760ab87bc0d98e7517b766cf1b9f186fe65
i40e: check_recovery_mode had wrong if statement

Function check_recovery_mode had wrong if statement.
Now we check proper FWS1B register values, which are responsible for
the recovery mode. Recovery mode has 4 values for x710 and 2 for x722.
That's why we need 6 different flags which are defined in the code.
Now in the if statement, we recognize type of mac address
and register value.
Without those changes driver could show wrong state.

Signed-off-by: Adrian Podlawski <adrian.podlawski@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_register.h