From: John Allen Date: Wed, 2 Aug 2017 21:45:28 +0000 (-0500) Subject: ibmvnic: Convert vnic server reported statistics to cpu endian X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52da5c114a884f8245dca5d3a69e1f45c759ba31;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: John Allen Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index b45ade6123a4..ea0ff2841a1f 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1807,7 +1807,8 @@ static void ibmvnic_get_ethtool_stats(struct net_device *dev, wait_for_completion(&adapter->stats_done); 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++) { data[i] = adapter->tx_stats_buffers[j].packets;