i40e: loopback info and set loopback fix
authorKamil Krawczyk <kamil.krawczyk@intel.com>
Wed, 20 Nov 2013 10:03:07 +0000 (10:03 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 10 Dec 2013 09:27:30 +0000 (01:27 -0800)
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>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_diag.h
drivers/net/ethernet/intel/i40e/i40e_type.h

index 0b52fbc7d56de605d39e72dff85092011f3166a4..e526d40e9cf81ee11ae1dc46645e0560dec8cccb 100644 (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;
index 3d98277f45268afd00457fa63c758ea225bd077b..d1fc68cd6c942b3e4f84302d71415b2e13132aa0 100644 (file)
 #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 {
index 88b37e07b255338dfe7af2d28c115c3cf7097411..8ae64457026348deb5ac8aa3efdcad35abe09d3c 100644 (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;
 };