Commit d51ebd33 authored by Padmanabh Ratnakar's avatar Padmanabh Ratnakar Committed by David S. Miller

be2net: Fix Lancer statistics

Fix port num sent in command to get stats. Also skip unnecessary
parsing of stats for Lancer.
Signed-off-by: default avatarPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af311fe3
...@@ -1221,7 +1221,7 @@ int lancer_cmd_get_pport_stats(struct be_adapter *adapter, ...@@ -1221,7 +1221,7 @@ int lancer_cmd_get_pport_stats(struct be_adapter *adapter,
OPCODE_ETH_GET_PPORT_STATS, nonemb_cmd->size, wrb, OPCODE_ETH_GET_PPORT_STATS, nonemb_cmd->size, wrb,
nonemb_cmd); nonemb_cmd);
req->cmd_params.params.pport_num = cpu_to_le16(adapter->port_num); req->cmd_params.params.pport_num = cpu_to_le16(adapter->hba_port_num);
req->cmd_params.params.reset_stats = 0; req->cmd_params.params.reset_stats = 0;
be_mcc_notify(adapter); be_mcc_notify(adapter);
......
...@@ -421,6 +421,9 @@ void be_parse_stats(struct be_adapter *adapter) ...@@ -421,6 +421,9 @@ void be_parse_stats(struct be_adapter *adapter)
populate_be2_stats(adapter); populate_be2_stats(adapter);
} }
if (lancer_chip(adapter))
goto done;
/* as erx_v1 is longer than v0, ok to use v1 defn for v0 access */ /* as erx_v1 is longer than v0, ok to use v1 defn for v0 access */
for_all_rx_queues(adapter, rxo, i) { for_all_rx_queues(adapter, rxo, i) {
/* below erx HW counter can actually wrap around after /* below erx HW counter can actually wrap around after
...@@ -429,6 +432,8 @@ void be_parse_stats(struct be_adapter *adapter) ...@@ -429,6 +432,8 @@ void be_parse_stats(struct be_adapter *adapter)
accumulate_16bit_val(&rx_stats(rxo)->rx_drops_no_frags, accumulate_16bit_val(&rx_stats(rxo)->rx_drops_no_frags,
(u16)erx->rx_drops_no_fragments[rxo->q.id]); (u16)erx->rx_drops_no_fragments[rxo->q.id]);
} }
done:
return;
} }
static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev, static struct rtnl_link_stats64 *be_get_stats64(struct net_device *netdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment