コード例 #1
0
ファイル: igb_procfs.c プロジェクト: olgk/dpdk.org
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;
}
コード例 #2
0
ファイル: igb_procfs.c プロジェクト: AntonioSimba/PFQ
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;
}
コード例 #3
0
ファイル: igb_sysfs.c プロジェクト: alegacy/Pktgen-DPDK
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;
}