i40e: loopback info and set loopback fix

Add information about current loopback mode to data returned from
get_link_info function. Minor fix in set_loopback function and
update in loopback types enum.

Change-Id: I9d1c540a84ab18eef5ea6429be6331f33fc06aca
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@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>
This commit is contained in:
Kamil Krawczyk 2013-11-20 10:03:07 +00:00 committed by Jeff Kirsher
parent b03aaa9c73
commit 639dc3777f
3 changed files with 6 additions and 4 deletions

View File

@ -562,6 +562,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info = resp->an_info;
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp->loopback;
if (resp->command_flags & cpu_to_le16(I40E_AQ_LSE_ENABLE))
hw_link_info->lse_enable = true;

View File

@ -31,10 +31,10 @@
#include "i40e_type.h"
enum i40e_lb_mode {
I40E_LB_MODE_NONE = 0,
I40E_LB_MODE_PHY_LOCAL,
I40E_LB_MODE_PHY_REMOTE,
I40E_LB_MODE_MAC_LOCAL,
I40E_LB_MODE_NONE = 0x0,
I40E_LB_MODE_PHY_LOCAL = I40E_AQ_LB_PHY_LOCAL,
I40E_LB_MODE_PHY_REMOTE = I40E_AQ_LB_PHY_REMOTE,
I40E_LB_MODE_MAC_LOCAL = I40E_AQ_LB_MAC_LOCAL,
};
struct i40e_diag_reg_test_info {

View File

@ -172,6 +172,7 @@ struct i40e_link_status {
u8 link_info;
u8 an_info;
u8 ext_info;
u8 loopback;
/* is Link Status Event notification to SW enabled */
bool lse_enable;
};