be2net: perform temperature query in adapter regardless of its interface state
The be2net driver performs fw temperature queries on be_worker() routine, which is executed each second for each be_adapter. There is a frequency threshold to avoid fw query to happens at each call to be_worker(); instead, currently a fw query occurs once in 64 runs of the procedure. Nevertheless, this fw temperature query is invoked only for adapters which interface is up, so we can see I/O errors on read of hwmon counters from userspace (from tools like lm-sensors) in case we have adapters' functions which interface is down. This patch moves the fw query code to be invoked even if interface is down. No functional changes were introduced. Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Acked-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
4ac36a4ada
Коммит
d3480615cf
|
@ -5077,6 +5077,10 @@ static void be_worker(struct work_struct *work)
|
||||||
struct be_rx_obj *rxo;
|
struct be_rx_obj *rxo;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (be_physfn(adapter) &&
|
||||||
|
MODULO(adapter->work_counter, adapter->be_get_temp_freq) == 0)
|
||||||
|
be_cmd_get_die_temperature(adapter);
|
||||||
|
|
||||||
/* when interrupts are not yet enabled, just reap any pending
|
/* when interrupts are not yet enabled, just reap any pending
|
||||||
* mcc completions
|
* mcc completions
|
||||||
*/
|
*/
|
||||||
|
@ -5095,10 +5099,6 @@ static void be_worker(struct work_struct *work)
|
||||||
be_cmd_get_stats(adapter, &adapter->stats_cmd);
|
be_cmd_get_stats(adapter, &adapter->stats_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (be_physfn(adapter) &&
|
|
||||||
MODULO(adapter->work_counter, adapter->be_get_temp_freq) == 0)
|
|
||||||
be_cmd_get_die_temperature(adapter);
|
|
||||||
|
|
||||||
for_all_rx_queues(adapter, rxo, i) {
|
for_all_rx_queues(adapter, rxo, i) {
|
||||||
/* Replenish RX-queues starved due to memory
|
/* Replenish RX-queues starved due to memory
|
||||||
* allocation failures.
|
* allocation failures.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче