/* This function is made to be called by ethtool and by the driver when it needs to update EITR registers at runtime. Hardware specific quirks/differences are taken care of here.  */
void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
/* This function is made to be called by ethtool and by the driver when it needs to update EITR registers at runtime. Hardware specific quirks/differences are taken care of here.  */
void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)
{
	struct ixgbe_adapter *adapter = q_vector->adapter;
	struct ixgbe_hw *hw = &adapter->hw;
	int v_idx = q_vector->v_idx;
	u32 itr_reg = EITR_INTS_PER_SEC_TO_REG(q_vector->eitr);
	if (adapter->hw.mac.type == ixgbe_mac_82598EB) {
		itr_reg |= (itr_reg << 16);
	} else if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
		itr_reg |= IXGBE_EITR_CNT_WDIS;
	}
	IXGBE_WRITE_REG(hw, IXGBE_EITR(v_idx), itr_reg);
}