src/dpdk/drivers/net/e1000/base/e1000_ich8lan.c
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
{
	u32 mac_reg;
	u16 i, phy_reg = 0;
	s32 ret_val;

	DEBUGFUNC("e1000_copy_rx_addrs_to_phy_ich8lan");

	ret_val = hw->phy.ops.acquire(hw);
	if (ret_val)
		return;
	ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
	if (ret_val)
		goto release;

	/* Copy both RAL/H (rar_entry_count) and SHRAL/H to PHY */
	for (i = 0; i < (hw->mac.rar_entry_count); i++) {
		mac_reg = E1000_READ_REG(hw, E1000_RAL(i));
		hw->phy.ops.write_reg_page(hw, BM_RAR_L(i),
					   (u16)(mac_reg & 0xFFFF));
		hw->phy.ops.write_reg_page(hw, BM_RAR_M(i),
					   (u16)((mac_reg >> 16) & 0xFFFF));

		mac_reg = E1000_READ_REG(hw, E1000_RAH(i));
		hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
					   (u16)(mac_reg & 0xFFFF));
		hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
					   (u16)((mac_reg & E1000_RAH_AV)
						 >> 16));
	}

	e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);

release:
	hw->phy.ops.release(hw);
}
/**
 *  e1000_copy_rx_addrs_to_phy_ich8lan - Copy Rx addresses from MAC to PHY
 *  @hw:   pointer to the HW structure
 **/
Copy Rx addresses from MAC to PHY
@hw:   pointer to the HW structure
Copy Rx addresses from MAC to PHY @hw : pointer to the HW structure
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
{
	u32 mac_reg;
	u16 i, phy_reg = 0;
	s32 ret_val;
	DEBUGFUNC("e1000_copy_rx_addrs_to_phy_ich8lan");
	ret_val = hw->phy.ops.acquire(hw);
	if (ret_val)
		return;
	ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg);
	if (ret_val)
		goto release;
	for (i = 0; i < (hw->mac.rar_entry_count); i++) {
		mac_reg = E1000_READ_REG(hw, E1000_RAL(i));
		hw->phy.ops.write_reg_page(hw, BM_RAR_L(i),
					   (u16)(mac_reg & 0xFFFF));
		hw->phy.ops.write_reg_page(hw, BM_RAR_M(i),
					   (u16)((mac_reg >> 16) & 0xFFFF));
		mac_reg = E1000_READ_REG(hw, E1000_RAH(i));
		hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
					   (u16)(mac_reg & 0xFFFF));
		hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
					   (u16)((mac_reg & E1000_RAH_AV)
						 >> 16));
	}
	e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);
release:
	hw->phy.ops.release(hw);
}
void e1000_copy_rx_addrs_to_phy_ich8lan ( struct e1000_hw * hw ) { u32 mac_reg ; u16 i , phy_reg = 0 ; s32 ret_val ; DEBUGFUNC ( " " ) ; ret_val = hw -> phy . ops . acquire ( hw ) ; if ( ret_val ) return ; ret_val = e1000_enable_phy_wakeup_reg_access_bm ( hw , & phy_reg ) ; if ( ret_val ) goto release ; for ( i = 0 ; i < ( hw -> mac . rar_entry_count ) ; i ++ ) { mac_reg = E1000_READ_REG ( hw , E1000_RAL ( i ) ) ; hw -> phy . ops . write_reg_page ( hw , BM_RAR_L ( i ) , ( u16 ) ( mac_reg & 0xFFFF ) ) ; hw -> phy . ops . write_reg_page ( hw , BM_RAR_M ( i ) , ( u16 ) ( ( mac_reg >> 16 ) & 0xFFFF ) ) ; mac_reg = E1000_READ_REG ( hw , E1000_RAH ( i ) ) ; hw -> phy . ops . write_reg_page ( hw , BM_RAR_H ( i ) , ( u16 ) ( mac_reg & 0xFFFF ) ) ; hw -> phy . ops . write_reg_page ( hw , BM_RAR_CTRL ( i ) , ( u16 ) ( ( mac_reg & E1000_RAH_AV ) >> 16 ) ) ; } e1000_disable_phy_wakeup_reg_access_bm ( hw , & phy_reg ) ; release : hw -> phy . ops . release ( hw ) ; }
e1000_copy_rx_addrs_to_phy_ich8lan - Copy Rx addresses from MAC to PHY
  @hw:   pointer to the HW structure
e1000_copy_rx_addrs_to_phy_ich8lan - Copy Rx addresses from MAC to PHY @hw : pointer to the HW structure
/* Copy both RAL/H (rar_entry_count) and SHRAL/H to PHY */