Commit 52da5c11 authored by John Allen's avatar John Allen Committed by David S. Miller

ibmvnic: Convert vnic server reported statistics to cpu endian

The vnic server reports the statistics buffer in big endian format and must
be converted to cpu endian in order to be displayed correctly on little
endian lpars.
Signed-off-by: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3d52b594
...@@ -1807,7 +1807,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, ...@@ -1807,7 +1807,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev,
wait_for_completion(&adapter->stats_done); wait_for_completion(&adapter->stats_done);
for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++) for (i = 0; i < ARRAY_SIZE(ibmvnic_stats); i++)
data[i] = IBMVNIC_GET_STAT(adapter, ibmvnic_stats[i].offset); data[i] = be64_to_cpu(IBMVNIC_GET_STAT(adapter,
ibmvnic_stats[i].offset));
for (j = 0; j < adapter->req_tx_queues; j++) { for (j = 0; j < adapter->req_tx_queues; j++) {
data[i] = adapter->tx_stats_buffers[j].packets; data[i] = adapter->tx_stats_buffers[j].packets;
......
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