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 CFAAEC468BD for ; Fri, 7 Jun 2019 15:40:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F13920840 for ; Fri, 7 Jun 2019 15:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922039; bh=45gD81aEuc2GoekQ+XhrD7Viw1/b8XnxKzkW+pKl7Rw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=m7SMB04fBepxeADaLuwilU/AkoQnZvPpRmQrg3L2jYgubeieXF9rGt/D8bdps/LvE yer4n6ELj1uPEcIMjtM3X+3bWyUZ73slBSXHTnIM/LEjRFUFV841RKScPRRgb/vn5S JY+7OqWXYcWvMRYQi1r0mvv8VNz6IPcC3ynntm9c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730100AbfFGPkj (ORCPT ); Fri, 7 Jun 2019 11:40:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:49866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730060AbfFGPke (ORCPT ); Fri, 7 Jun 2019 11:40:34 -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 0323F212F5; Fri, 7 Jun 2019 15:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922034; bh=45gD81aEuc2GoekQ+XhrD7Viw1/b8XnxKzkW+pKl7Rw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0S+pQoaGW7mE/7nRxy6EuFTKvBGJy2SyxDqaFAIEm1MHiD+0LiTDg7eYzIkj6Gj7M ifBZR5UR3CvdAmAC98MmLmscFpE2haKtIClwr5o2sBoUHRjmqtX4ayxXC6hWbp6pMA EA9p+Ox4DllgNkNXNndgEJVki1Cq4v9mCjlgQpmA= 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 4.14 13/69] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT Date: Fri, 7 Jun 2019 17:38:54 +0200 Message-Id: <20190607153849.924720306@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.271562617@linuxfoundation.org> References: <20190607153848.271562617@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 @@ -624,7 +624,7 @@ static uint64_t _mv88e6xxx_get_ethtool_s err = mv88e6xxx_port_read(chip, port, s->reg + 1, ®); if (err) return UINT64_MAX; - high = reg; + low |= ((u32)reg) << 16; } break; case STATS_TYPE_BANK1: