Example #1
0
bool igb_thermal_present(struct igb_adapter *adapter)
{
	s32 status;
	struct e1000_hw *hw;

	if (adapter == NULL)
		return false;
	hw = &adapter->hw;

	/*
	 * Only set I2C bit-bang mode if an external thermal sensor is
	 * supported on this device.
	 */
	if (adapter->ets) {
		status = e1000_set_i2c_bb(hw);
		if (status != E1000_SUCCESS)
			return false;
	}

	status = hw->mac.ops.init_thermal_sensor_thresh(hw);
	if (status != E1000_SUCCESS)
		return false;

	return true;
}
Example #2
0
bool igb_thermal_present(struct igb_adapter *adapter)
{
	s32 status;
	struct e1000_hw *hw;

	if (adapter == NULL)
		return false;
	hw = &adapter->hw;

	status = e1000_set_i2c_bb(hw);
	if (status != E1000_SUCCESS)
		return false;

	status = hw->mac.ops.init_thermal_sensor_thresh(hw);
	if (status != E1000_SUCCESS)
		return false;
	
	return true;
}
Example #3
0
bool igb_thermal_present(struct kobject *kobj)
{
	s32 status;
	struct igb_adapter *adapter = igb_get_adapter(kobj);

	if (adapter == NULL)
		return false;

	/*
	 * Only set I2C bit-bang mode if an external thermal sensor is
	 * supported on this device.
	 */
	if (adapter->ets) {
		status = e1000_set_i2c_bb(&(adapter->hw));
		if (status != E1000_SUCCESS)
			return false;
	}

	status = e1000_init_thermal_sensor_thresh(&(adapter->hw));
	if (status != E1000_SUCCESS)
		return false; 

	return true;
}