diff options
author | Jian Shen <shenjian15@huawei.com> | 2020-04-24 10:23:12 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-25 20:29:44 -0700 |
commit | 7d0b345156d0678fbbbf885f991c6d83f23d70f1 (patch) | |
tree | 9d4304cb3ae1c88ced63cc1bba0ad7c5b678fc2b /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | net: hns3: refactor the promisc mode setting (diff) | |
download | linux-dev-7d0b345156d0678fbbbf885f991c6d83f23d70f1.tar.xz linux-dev-7d0b345156d0678fbbbf885f991c6d83f23d70f1.zip |
net: hns3: use mutex vport_lock instead of mutex umv_lock
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: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.h')
0 files changed, 0 insertions, 0 deletions