ixgbe: Correct thermal sensor event check

The thermal sensor event logic is messed up, because it can execute
the code when there is no thermal event. The current logic is that
it will exit when !capable && !event whereas it really should exit
when !capable || !event. For one thing, it means that the service
task is doing too much work. It probably has some other symptoms as
well. So, correct the logic, simplifying to only execute when there
is a thermal event. The capable check is redundant.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Mark Rustad 2017-04-25 13:55:25 -07:00 committed by Jeff Kirsher
parent e6b41c8881
commit 22cb4fff3d
1 changed files with 1 additions and 2 deletions

View File

@ -2639,8 +2639,7 @@ static void ixgbe_check_overtemp_subtask(struct ixgbe_adapter *adapter)
if (test_bit(__IXGBE_DOWN, &adapter->state)) if (test_bit(__IXGBE_DOWN, &adapter->state))
return; return;
if (!(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) && if (!(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_EVENT))
!(adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_EVENT))
return; return;
adapter->flags2 &= ~IXGBE_FLAG2_TEMP_SENSOR_EVENT; adapter->flags2 &= ~IXGBE_FLAG2_TEMP_SENSOR_EVENT;