• Jack Morgenstein's avatar
    net/mlx4_core: Fix init_port mask state for slaves · 8bac9ede
    Jack Morgenstein authored
    In function mlx4_INIT_PORT_wrapper, the port state mask for the
    slave is only set if we are invoking the INIT_PORT fw command.
    
    However, the reference count for the (initialized) port is
    incremented anyway.
    
    This creates a problem in that when we have multiple slaves,
    then the CLOSE_PORT command will never be invoked. The
    reason is that in the CLOSE_PORT wrapper, if the port-state
    mask is zero for the slave (which it is), the wrapper returns
    without doing anything. The only slave which will not return
    immediately in the CLOSE_PORT wrapper is that slave for which
    INIT_PORT was invoked.
    
    The fix is to not have the port-state mask setting depend
    on the logic for calling the INIT_PORT fw command.
    Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8bac9ede
fw.c 43.6 KB