net: hns3: fix user's coalesce configuration lost issue
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 18 May 2021 11:36:02 +0000 (19:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 May 2021 20:41:04 +0000 (13:41 -0700)
commit73a13d8dbe33e53a12400f2be0f5af169816c67f
treecf1b617b01ec54f47dd167d41e489328899ebf08
parenta289a7e5c1d49b7d47df9913c1cc81fb48fab613
net: hns3: fix user's coalesce configuration lost issue

Currently, when adaptive is on, the user's coalesce configuration
may be overwritten by the dynamic one. The reason is that user's
configurations are saved in struct hns3_enet_tqp_vector whose
value maybe changed by the dynamic algorithm. To fix it, use
struct hns3_nic_priv instead of struct hns3_enet_tqp_vector to
save and get the user's configuration.

BTW, operations of storing and restoring coalesce info in the reset
process are unnecessary now, so remove them as well.

Fixes: 434776a5fae2 ("net: hns3: add ethtool_ops.set_coalesce support to PF")
Fixes: 7e96adc46633 ("net: hns3: add ethtool_ops.get_coalesce support to PF")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c