ice: Add handler for ethtool selftest
This patch adds a handler for ethtool selftest. Selftest includes testing link, interrupts, eeprom, registers and packet loopback. Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
4b6f3ecabf
commit
0e674aeb0b
@@ -2169,6 +2169,29 @@ ice_aq_set_event_mask(struct ice_hw *hw, u8 port_num, u16 mask,
|
||||
return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_aq_set_mac_loopback
|
||||
* @hw: pointer to the HW struct
|
||||
* @ena_lpbk: Enable or Disable loopback
|
||||
* @cd: pointer to command details structure or NULL
|
||||
*
|
||||
* Enable/disable loopback on a given port
|
||||
*/
|
||||
enum ice_status
|
||||
ice_aq_set_mac_loopback(struct ice_hw *hw, bool ena_lpbk, struct ice_sq_cd *cd)
|
||||
{
|
||||
struct ice_aqc_set_mac_lb *cmd;
|
||||
struct ice_aq_desc desc;
|
||||
|
||||
cmd = &desc.params.set_mac_lb;
|
||||
|
||||
ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_mac_lb);
|
||||
if (ena_lpbk)
|
||||
cmd->lb_mode = ICE_AQ_MAC_LB_EN;
|
||||
|
||||
return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_aq_set_port_id_led
|
||||
* @pi: pointer to the port information
|
||||
|
||||
Reference in New Issue
Block a user