|
@@ -1303,76 +1303,6 @@ out:
|
|
|
return ret_val;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * igb_reset_adaptive - Reset Adaptive Interframe Spacing
|
|
|
- * @hw: pointer to the HW structure
|
|
|
- *
|
|
|
- * Reset the Adaptive Interframe Spacing throttle to default values.
|
|
|
- **/
|
|
|
-void igb_reset_adaptive(struct e1000_hw *hw)
|
|
|
-{
|
|
|
- struct e1000_mac_info *mac = &hw->mac;
|
|
|
-
|
|
|
- if (!mac->adaptive_ifs) {
|
|
|
- hw_dbg("Not in Adaptive IFS mode!\n");
|
|
|
- goto out;
|
|
|
- }
|
|
|
-
|
|
|
- if (!mac->ifs_params_forced) {
|
|
|
- mac->current_ifs_val = 0;
|
|
|
- mac->ifs_min_val = IFS_MIN;
|
|
|
- mac->ifs_max_val = IFS_MAX;
|
|
|
- mac->ifs_step_size = IFS_STEP;
|
|
|
- mac->ifs_ratio = IFS_RATIO;
|
|
|
- }
|
|
|
-
|
|
|
- mac->in_ifs_mode = false;
|
|
|
- wr32(E1000_AIT, 0);
|
|
|
-out:
|
|
|
- return;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * igb_update_adaptive - Update Adaptive Interframe Spacing
|
|
|
- * @hw: pointer to the HW structure
|
|
|
- *
|
|
|
- * Update the Adaptive Interframe Spacing Throttle value based on the
|
|
|
- * time between transmitted packets and time between collisions.
|
|
|
- **/
|
|
|
-void igb_update_adaptive(struct e1000_hw *hw)
|
|
|
-{
|
|
|
- struct e1000_mac_info *mac = &hw->mac;
|
|
|
-
|
|
|
- if (!mac->adaptive_ifs) {
|
|
|
- hw_dbg("Not in Adaptive IFS mode!\n");
|
|
|
- goto out;
|
|
|
- }
|
|
|
-
|
|
|
- if ((mac->collision_delta * mac->ifs_ratio) > mac->tx_packet_delta) {
|
|
|
- if (mac->tx_packet_delta > MIN_NUM_XMITS) {
|
|
|
- mac->in_ifs_mode = true;
|
|
|
- if (mac->current_ifs_val < mac->ifs_max_val) {
|
|
|
- if (!mac->current_ifs_val)
|
|
|
- mac->current_ifs_val = mac->ifs_min_val;
|
|
|
- else
|
|
|
- mac->current_ifs_val +=
|
|
|
- mac->ifs_step_size;
|
|
|
- wr32(E1000_AIT,
|
|
|
- mac->current_ifs_val);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (mac->in_ifs_mode &&
|
|
|
- (mac->tx_packet_delta <= MIN_NUM_XMITS)) {
|
|
|
- mac->current_ifs_val = 0;
|
|
|
- mac->in_ifs_mode = false;
|
|
|
- wr32(E1000_AIT, 0);
|
|
|
- }
|
|
|
- }
|
|
|
-out:
|
|
|
- return;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* igb_validate_mdi_setting - Verify MDI/MDIx settings
|
|
|
* @hw: pointer to the HW structure
|