From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 458EBC04AB6 for ; Mon, 3 Jun 2019 09:17:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10A9C2518C for ; Mon, 3 Jun 2019 09:17:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559553455; bh=mJiP0iGvPk9hlL2FjCpWB9nY/cTx1gt9kGP2V+kVdYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=iitRfID49nxx1LsmRO7/FspTBrodoyH8Dvy9BU6HrcwJNxtYps0VpL3QPT0E4gHB1 PCKvVkbvbTjbJk62JZdS8aGY9n4SQkpECaOYOS2pwmUFRcrDBRPi/Qtg5BG7+yktUM LmYzwlvrbW7oNNX4JQN6L27PqT6vzzpM20YPJGO0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728323AbfFCJLM (ORCPT ); Mon, 3 Jun 2019 05:11:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:56086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728319AbfFCJLM (ORCPT ); Mon, 3 Jun 2019 05:11:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1C62E27E49; Mon, 3 Jun 2019 09:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559553071; bh=mJiP0iGvPk9hlL2FjCpWB9nY/cTx1gt9kGP2V+kVdYw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v5Kt5WMPmhiq8oJffaujylyphqxhpemaDGic1p0ZzsTC6ZkYuIKotdTq8gJ7ImtSJ 9f50lU7oOZnxPIwfz3x9W0g8LZZnt4h07xrQxwh7pDuTV5EY1IH0fdI+MTdYOpDvcp yG2878wb5ktYjPKimeEOoyRDabkuO1ggw8JQcNj4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Vivien Didelot , "David S. Miller" Subject: [PATCH 5.0 10/36] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT Date: Mon, 3 Jun 2019 11:08:58 +0200 Message-Id: <20190603090521.633921930@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190603090520.998342694@linuxfoundation.org> References: <20190603090520.998342694@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rasmus Villemoes [ Upstream commit 84b3fd1fc9592d431e23b077e692fa4e3fd0f086 ] Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends up in bits 47:32 of the return value, instead of bits 31:16 as they should. Fixes: 6e46e2d821bb ("net: dsa: mv88e6xxx: Fix u64 statistics") Signed-off-by: Rasmus Villemoes Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -892,7 +892,7 @@ static uint64_t _mv88e6xxx_get_ethtool_s err = mv88e6xxx_port_read(chip, port, s->reg + 1, ®); if (err) return U64_MAX; - high = reg; + low |= ((u32)reg) << 16; } break; case STATS_TYPE_BANK1: