lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 017/135] net: dsa: mv88e6xxx: Fix u64 statistics
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Andrew Lunn <andrew@lunn.ch>

    [ Upstream commit 6e46e2d821bb22b285ae8187959096b65d063b0d ]

    The switch maintains u64 counters for the number of octets sent and
    received. These are kept as two u32's which need to be combined. Fix
    the combing, which wrongly worked on u16's.

    Fixes: 80c4627b2719 ("dsa: mv88x6xxx: Refactor getting a single statistic")
    Reported-by: Chris Healy <Chris.Healy@zii.aero>
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    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
    @@ -639,7 +639,7 @@ static uint64_t _mv88e6xxx_get_ethtool_s
    default:
    return UINT64_MAX;
    }
    - value = (((u64)high) << 16) | low;
    + value = (((u64)high) << 32) | low;
    return value;
    }


    \
     
     \ /
      Last update: 2019-03-12 18:45    [W:4.109 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site