aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be_cmds.c
diff options
context:
space:
mode:
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>2012-07-11 23:56:46 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-12 11:16:46 -0400
commit7aeb21564332bcf0dacc198e4f795e8e5e347126 (patch)
tree74e299206e509655bfe8debe41f1f8868e0f57a2 /drivers/net/ethernet/emulex/benet/be_cmds.c
parentc871c5f29315aaf27acf6ceed7a69f9069049639 (diff)
be2net : Fix die temperature stat for Lancer
Query die temperature stat for Lancer to report it correctly in ethtool. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.c')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_cmds.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 5eab791b7162..d75c9fb9a188 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -19,9 +19,6 @@
19#include "be.h" 19#include "be.h"
20#include "be_cmds.h" 20#include "be_cmds.h"
21 21
22/* Must be a power of 2 or else MODULO will BUG_ON */
23static int be_get_temp_freq = 64;
24
25static inline void *embedded_payload(struct be_mcc_wrb *wrb) 22static inline void *embedded_payload(struct be_mcc_wrb *wrb)
26{ 23{
27 return wrb->payload.embedded_payload; 24 return wrb->payload.embedded_payload;
@@ -115,7 +112,7 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
115 } 112 }
116 } else { 113 } else {
117 if (opcode == OPCODE_COMMON_GET_CNTL_ADDITIONAL_ATTRIBUTES) 114 if (opcode == OPCODE_COMMON_GET_CNTL_ADDITIONAL_ATTRIBUTES)
118 be_get_temp_freq = 0; 115 adapter->be_get_temp_freq = 0;
119 116
120 if (compl_status == MCC_STATUS_NOT_SUPPORTED || 117 if (compl_status == MCC_STATUS_NOT_SUPPORTED ||
121 compl_status == MCC_STATUS_ILLEGAL_REQUEST) 118 compl_status == MCC_STATUS_ILLEGAL_REQUEST)
@@ -1206,9 +1203,6 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
1206 struct be_cmd_req_hdr *hdr; 1203 struct be_cmd_req_hdr *hdr;
1207 int status = 0; 1204 int status = 0;
1208 1205
1209 if (MODULO(adapter->work_counter, be_get_temp_freq) == 0)
1210 be_cmd_get_die_temperature(adapter);
1211
1212 spin_lock_bh(&adapter->mcc_lock); 1206 spin_lock_bh(&adapter->mcc_lock);
1213 1207
1214 wrb = wrb_from_mccq(adapter); 1208 wrb = wrb_from_mccq(adapter);