aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2012-12-04 01:03:14 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-12-07 00:38:38 -0500
commitcb6d0f5eef58cfa1a78ebcfebd3d630c31061f79 (patch)
tree6bc368de2ef7e1e11dec8af75f2efb2fb4e3d4df /drivers/net
parentf8ebc68373a891310fe64726940e245cf307d172 (diff)
ixgbe: check whether thermal sensor is enabled.
The X540's internal thermal sensor should not be enabled for all devices, but only those devices which enable it in the NVM image. It is expected that actively cooled devices will have it enabled, but passively cooled devices might not want it enabled. This is due to passively cooled devices operating very near the thermal threshold, sometimes within the margin of error of the thermal sensor. Thus these devices may not be good candidates for using the thermal sensor. This patch uses the enabled bit in the FWSM register to check whether we should be enabling the thermal sensor, and only sets the THERMAL_SENSOR_CAPABLE flag for those devices which have it enabled. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c5
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_type.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index b7bc22ba158f..fb165b6ffada 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4467,6 +4467,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
4467 struct ixgbe_hw *hw = &adapter->hw; 4467 struct ixgbe_hw *hw = &adapter->hw;
4468 struct pci_dev *pdev = adapter->pdev; 4468 struct pci_dev *pdev = adapter->pdev;
4469 unsigned int rss; 4469 unsigned int rss;
4470 u32 fwsm;
4470#ifdef CONFIG_IXGBE_DCB 4471#ifdef CONFIG_IXGBE_DCB
4471 int j; 4472 int j;
4472 struct tc_configuration *tc; 4473 struct tc_configuration *tc;
@@ -4490,7 +4491,9 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
4490 adapter->max_q_vectors = MAX_Q_VECTORS_82598; 4491 adapter->max_q_vectors = MAX_Q_VECTORS_82598;
4491 break; 4492 break;
4492 case ixgbe_mac_X540: 4493 case ixgbe_mac_X540:
4493 adapter->flags2 |= IXGBE_FLAG2_TEMP_SENSOR_CAPABLE; 4494 fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM);
4495 if (fwsm & IXGBE_FWSM_TS_ENABLED)
4496 adapter->flags2 |= IXGBE_FLAG2_TEMP_SENSOR_CAPABLE;
4494 case ixgbe_mac_82599EB: 4497 case ixgbe_mac_82599EB:
4495 adapter->max_q_vectors = MAX_Q_VECTORS_82599; 4498 adapter->max_q_vectors = MAX_Q_VECTORS_82599;
4496 adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE; 4499 adapter->flags2 |= IXGBE_FLAG2_RSC_CAPABLE;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index cab302ab296d..9cd8a13711d3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -1954,6 +1954,8 @@ enum {
1954#define IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP 0x01000000 1954#define IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP 0x01000000
1955#define IXGBE_MRQC_L3L4TXSWEN 0x00008000 1955#define IXGBE_MRQC_L3L4TXSWEN 0x00008000
1956 1956
1957#define IXGBE_FWSM_TS_ENABLED 0x1
1958
1957/* Queue Drop Enable */ 1959/* Queue Drop Enable */
1958#define IXGBE_QDE_ENABLE 0x00000001 1960#define IXGBE_QDE_ENABLE 0x00000001
1959#define IXGBE_QDE_IDX_MASK 0x00007F00 1961#define IXGBE_QDE_IDX_MASK 0x00007F00