src/dpdk/drivers/net/e1000/base/e1000_ich8lan.c
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
{
	s32 ret_val;
	u16 reg_data = 0;

	DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan");

	if ((hw->mac.type != e1000_ich8lan) ||
	    (hw->phy.type == e1000_phy_ife))
		return;

	ret_val = e1000_read_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
					      &reg_data);
	if (ret_val)
		return;
	reg_data |= E1000_KMRNCTRLSTA_DIAG_NELPBK;
	ret_val = e1000_write_kmrn_reg_generic(hw,
					       E1000_KMRNCTRLSTA_DIAG_OFFSET,
					       reg_data);
	if (ret_val)
		return;
	reg_data &= ~E1000_KMRNCTRLSTA_DIAG_NELPBK;
	e1000_write_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
				     reg_data);
}
/**
 *  e1000_gig_downshift_workaround_ich8lan - WoL from S5 stops working
 *  @hw: pointer to the HW structure
 *
 *  Steps to take when dropping from 1Gb/s (eg. link cable removal (LSC),
 *  LPLU, Gig disable, MDIC PHY reset):
 *    1) Set Kumeran Near-end loopback
 *    2) Clear Kumeran Near-end loopback
 *  Should only be called for ICH8[m] devices with any 1G Phy.
 **/
WoL from S5 stops working
@hw: pointer to the HW structure

Steps to take when dropping from 1Gb/s ,
LPLU, Gig disable, MDIC PHY reset):
1) Set Kumeran Near-end loopback
2) Clear Kumeran Near-end loopback
Should only be called for ICH8[m] devices with any 1G Phy.
WoL from S5 stops working @hw : pointer to the HW structure Steps to take when dropping from 1Gb / s LPLU Gig disable MDIC PHY reset ) : 1 ) Set Kumeran Near - end loopback 2 ) Clear Kumeran Near - end loopback Should only be called for ICH8 [ m ] devices with any 1G Phy .
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
{
	s32 ret_val;
	u16 reg_data = 0;
	DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan");
	if ((hw->mac.type != e1000_ich8lan) ||
	    (hw->phy.type == e1000_phy_ife))
		return;
	ret_val = e1000_read_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
					      &reg_data);
	if (ret_val)
		return;
	reg_data |= E1000_KMRNCTRLSTA_DIAG_NELPBK;
	ret_val = e1000_write_kmrn_reg_generic(hw,
					       E1000_KMRNCTRLSTA_DIAG_OFFSET,
					       reg_data);
	if (ret_val)
		return;
	reg_data &= ~E1000_KMRNCTRLSTA_DIAG_NELPBK;
	e1000_write_kmrn_reg_generic(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
				     reg_data);
}
void e1000_gig_downshift_workaround_ich8lan ( struct e1000_hw * hw ) { s32 ret_val ; u16 reg_data = 0 ; DEBUGFUNC ( " " ) ; if ( ( hw -> mac . type != e1000_ich8lan ) || ( hw -> phy . type == e1000_phy_ife ) ) return ; ret_val = e1000_read_kmrn_reg_generic ( hw , E1000_KMRNCTRLSTA_DIAG_OFFSET , & reg_data ) ; if ( ret_val ) return ; reg_data |= E1000_KMRNCTRLSTA_DIAG_NELPBK ; ret_val = e1000_write_kmrn_reg_generic ( hw , E1000_KMRNCTRLSTA_DIAG_OFFSET , reg_data ) ; if ( ret_val ) return ; reg_data &= ~ E1000_KMRNCTRLSTA_DIAG_NELPBK ; e1000_write_kmrn_reg_generic ( hw , E1000_KMRNCTRLSTA_DIAG_OFFSET , reg_data ) ; }
e1000_gig_downshift_workaround_ich8lan - WoL from S5 stops working
  @hw: pointer to the HW structure
e1000_gig_downshift_workaround_ich8lan - WoL from S5 stops working @hw : pointer to the HW structure