lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 065/312] mlxsw: Treat local port 64 as valid
    Date
    From: Ido Schimmel <idosch@mellanox.com>

    commit 1e5ad30c649a82a062ce79a87c1296e6c6f328c2 upstream.

    MLXSW_PORT_MAX_PORTS represents the maximum number of local ports, which
    is 65 for both ASICs (SwitchX-2 and Spectrum) supported by this driver.

    Fixes: 93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core")
    Signed-off-by: Ido Schimmel <idosch@mellanox.com>
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/ethernet/mellanox/mlxsw/port.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/ethernet/mellanox/mlxsw/port.h
    +++ b/drivers/net/ethernet/mellanox/mlxsw/port.h
    @@ -49,7 +49,7 @@
    #define MLXSW_PORT_MID 0xd000

    #define MLXSW_PORT_MAX_PHY_PORTS 0x40
    -#define MLXSW_PORT_MAX_PORTS MLXSW_PORT_MAX_PHY_PORTS
    +#define MLXSW_PORT_MAX_PORTS (MLXSW_PORT_MAX_PHY_PORTS + 1)

    #define MLXSW_PORT_DEVID_BITS_OFFSET 10
    #define MLXSW_PORT_PHY_BITS_OFFSET 4

    \
     
     \ /
      Last update: 2020-05-08 15:40    [W:4.019 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site