]> asedeno.scripts.mit.edu Git - linux.git/commit
net: hns3: modify enet reinitialization interface
authorHuazhong Tan <tanhuazhong@huawei.com>
Fri, 18 Jan 2019 08:13:03 +0000 (16:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 23:10:21 +0000 (15:10 -0800)
commit2c9dd668914bb9813b83bc62c28ebfe53e205525
tree543b06747aea1ba62085ae9913c686ae35dbf130
parent51a5365c2b21da5b19b4905a1214cd20c32fbf6c
net: hns3: modify enet reinitialization interface

hns3_reset_notify_init_enet and hns3_reset_notify_uninit_enet are the
reinitialization interface that will be called when the device reset,
the number of TC changed, or the queue length changed. So these two
function should call hns3_get_ring_config() and hns3_put_ring_config()
to allocate and free memory for the ring with the correct number.

Also this patch fixes a double free problem when
hns3_reset_notify_uninit_enet calling hns3_nic_dealloc_vector_data

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c