* [PATCH net] be2net: perform temperature query in adapter regardless of its interface state
@ 2016-07-26 20:39 Guilherme G. Piccoli
2016-07-27 4:05 ` Sathya Perla
2016-07-27 6:20 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Guilherme G. Piccoli @ 2016-07-26 20:39 UTC (permalink / raw)
To: sathya.perla, ajit.khaparde, padmanabh.ratnakar,
sriharsha.basavapatna, somnath.kotur
Cc: netdev
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>
---
drivers/net/ethernet/emulex/benet/be_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index ed98ef1..706fdfa 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4996,6 +4996,10 @@ static void be_worker(struct work_struct *work)
struct be_rx_obj *rxo;
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
* mcc completions
*/
@@ -5014,10 +5018,6 @@ static void be_worker(struct work_struct *work)
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) {
/* Replenish RX-queues starved due to memory
* allocation failures.
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH net] be2net: perform temperature query in adapter regardless of its interface state
2016-07-26 20:39 [PATCH net] be2net: perform temperature query in adapter regardless of its interface state Guilherme G. Piccoli
@ 2016-07-27 4:05 ` Sathya Perla
2016-07-27 6:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sathya Perla @ 2016-07-27 4:05 UTC (permalink / raw)
To: Guilherme G. Piccoli, Ajit Kumar Khaparde, Sriharsha Basavapatna,
Somnath Kotur
Cc: netdev
> -----Original Message-----
> From: Guilherme G. Piccoli [mailto:gpiccoli@linux.vnet.ibm.com]
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] be2net: perform temperature query in adapter regardless of its interface state
2016-07-26 20:39 [PATCH net] be2net: perform temperature query in adapter regardless of its interface state Guilherme G. Piccoli
2016-07-27 4:05 ` Sathya Perla
@ 2016-07-27 6:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-07-27 6:20 UTC (permalink / raw)
To: gpiccoli
Cc: sathya.perla, ajit.khaparde, padmanabh.ratnakar,
sriharsha.basavapatna, somnath.kotur, netdev
From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Date: Tue, 26 Jul 2016 17:39:42 -0300
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-27 6:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-26 20:39 [PATCH net] be2net: perform temperature query in adapter regardless of its interface state Guilherme G. Piccoli
2016-07-27 4:05 ` Sathya Perla
2016-07-27 6:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox