Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315163
b: refs/heads/master
c: 7aeb215
h: refs/heads/master
i:
  315161: 9086521
  315159: 833d4c9
v: v3
  • Loading branch information
Padmanabh Ratnakar authored and David S. Miller committed Jul 12, 2012
1 parent 757dc60 commit 9c986c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c871c5f29315aaf27acf6ceed7a69f9069049639
refs/heads/master: 7aeb21564332bcf0dacc198e4f795e8e5e347126
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/emulex/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ struct be_adapter {
u32 max_pmac_cnt; /* Max secondary UC MACs programmable */
u32 uc_macs; /* Count of secondary UC MAC programmed */
u32 msg_enable;
int be_get_temp_freq;
};

#define be_physfn(adapter) (!adapter->virtfn)
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/net/ethernet/emulex/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include "be.h"
#include "be_cmds.h"

/* Must be a power of 2 or else MODULO will BUG_ON */
static int be_get_temp_freq = 64;

static inline void *embedded_payload(struct be_mcc_wrb *wrb)
{
return wrb->payload.embedded_payload;
Expand Down Expand Up @@ -115,7 +112,7 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
}
} else {
if (opcode == OPCODE_COMMON_GET_CNTL_ADDITIONAL_ATTRIBUTES)
be_get_temp_freq = 0;
adapter->be_get_temp_freq = 0;

if (compl_status == MCC_STATUS_NOT_SUPPORTED ||
compl_status == MCC_STATUS_ILLEGAL_REQUEST)
Expand Down Expand Up @@ -1206,9 +1203,6 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd)
struct be_cmd_req_hdr *hdr;
int status = 0;

if (MODULO(adapter->work_counter, be_get_temp_freq) == 0)
be_cmd_get_die_temperature(adapter);

spin_lock_bh(&adapter->mcc_lock);

wrb = wrb_from_mccq(adapter);
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3567,6 +3567,9 @@ static int be_get_initial_config(struct be_adapter *adapter)
if (be_is_wol_supported(adapter))
adapter->wol = true;

/* Must be a power of 2 or else MODULO will BUG_ON */
adapter->be_get_temp_freq = 64;

level = be_get_fw_log_level(adapter);
adapter->msg_enable = level <= FW_LOG_LEVEL_DEFAULT ? NETIF_MSG_HW : 0;

Expand Down Expand Up @@ -3747,6 +3750,9 @@ static void be_worker(struct work_struct *work)
be_cmd_get_stats(adapter, &adapter->stats_cmd);
}

if (MODULO(adapter->work_counter, adapter->be_get_temp_freq) == 0)
be_cmd_get_die_temperature(adapter);

for_all_rx_queues(adapter, rxo, i) {
if (rxo->rx_post_starved) {
rxo->rx_post_starved = false;
Expand Down

0 comments on commit 9c986c9

Please sign in to comment.