net/mlx4_en: Do not query stats when device port is down
authorJack Morgenstein <jackm@dev.mellanox.com>
Tue, 25 Jun 2013 09:09:30 +0000 (12:09 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jun 2013 23:29:38 +0000 (16:29 -0700)
commit6123db2ec529f1d1865298388e129a6aad2fae17
treef6f6cbb7824d5b05a548cced4ef8173fe407d6cd
parent8850494a33cc67bbf31d2e3ce630d0f4e14efa56
net/mlx4_en: Do not query stats when device port is down

There are no counters allocated to the eth device when the port is down, so
this query is meaningless at that time.

It also leads to querying incorrect counters (since the counter_index is not
valid when the device port is down).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c