lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.9 033/156] mlxsw: reg: Fix SPVMLR max record count
    Date
    From: Jiri Pirko <jiri@mellanox.com>

    [ Upstream commit e9093b1183bbac462d2caef3eac165778c0b1bf1 ]

    The num_rec field is 8 bit, so the maximal count number is 255.
    This fixes vlans learning not being enabled for wider ranges than 255.

    Fixes: a4feea74cd7a ("mlxsw: reg: Add Switch Port VLAN MAC Learning register definition")
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
    Reviewed-by: Ido Schimmel <idosch@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    ---
    drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
    index cb6f82d27297..a01e6c0d0cd1 100644
    --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
    +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
    @@ -1757,7 +1757,7 @@ static inline void mlxsw_reg_sfmr_pack(char *payload,
    #define MLXSW_REG_SPVMLR_ID 0x2020
    #define MLXSW_REG_SPVMLR_BASE_LEN 0x04 /* base length, without records */
    #define MLXSW_REG_SPVMLR_REC_LEN 0x04 /* record length */
    -#define MLXSW_REG_SPVMLR_REC_MAX_COUNT 256
    +#define MLXSW_REG_SPVMLR_REC_MAX_COUNT 255
    #define MLXSW_REG_SPVMLR_LEN (MLXSW_REG_SPVMLR_BASE_LEN + \
    MLXSW_REG_SPVMLR_REC_LEN * \
    MLXSW_REG_SPVMLR_REC_MAX_COUNT)
    --
    2.11.0
    \
     
     \ /
      Last update: 2017-12-07 18:40    [W:4.088 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site