• Jian Shen's avatar
    net: hns3: use mutex vport_lock instead of mutex umv_lock · 7d0b3451
    Jian Shen authored
    Currently, the driver use mutex umv_lock to protect the variable
    vport->share_umv_size. And there is already a mutex vport_lock
    being defined in the driver, which is designed to protect the
    resource of vport. So we can use vport_lock instead of umv_lock.
    
    Furthermore, there is a time window for protect share_umv_size
    between checking UMV space and doing MAC configuration in the
    lin function hclge_add_uc_addr_common(). It should be extended.
    
    This patch uses mutex vport_lock intead of spin lock umv_lock to
    protect share_umv_size, and adjusts the mutex's range.
    Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7d0b3451
hclge_main.h 27.5 KB