From: Don Skidmore Date: Wed, 17 Aug 2011 10:15:21 +0000 (+0000) Subject: ixgbe: cleanup ixgbe_setup_gpie() for X540 X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~168 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9ea54f7664464c0edc7390ec381aabde63c40023;p=users%2Fjedix%2Flinux-maple.git ixgbe: cleanup ixgbe_setup_gpie() for X540 The X540 thermal sensor interrupt isn't a General Purpose Interrupt so doesn't need to be enabled in ixgbe_setup_gpie(). Likewise X540 doesn't use the SDP0 for thermal sensor so it doesn't need to be enabled for any device other than 82599. (cherry picked from commit f3df98ec9e8ed127456a601f99619c88e9d6017f) Signed-off-by: Don Skidmore Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 0f0477f3818c2..36e478f228b5f 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -3679,8 +3679,18 @@ static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter) } /* Enable Thermal over heat sensor interrupt */ - if (adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) - gpie |= IXGBE_SDP0_GPIEN; + if (adapter->flags2 & IXGBE_FLAG2_TEMP_SENSOR_CAPABLE) { + switch (adapter->hw.mac.type) { + case ixgbe_mac_82599EB: + gpie |= IXGBE_SDP0_GPIEN; + break; + case ixgbe_mac_X540: + gpie |= IXGBE_EIMS_TS; + break; + default: + break; + } + } /* Enable fan failure interrupt */ if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE)