net: hns3: disable firmware compatible features when uninstall PF
authorGuangbin Huang <huangguangbin2@huawei.com>
Wed, 29 Sep 2021 09:35:56 +0000 (17:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Sep 2021 10:03:54 +0000 (11:03 +0100)
commit0178839ccca36dee238a57e7f4c3c252f5dbbba6
treeff458b5a6867ad002700c4c230f8dcc09b8d2aa5
parent27bf4af69fcb9845fb2f0076db5d562ec072e70f
net: hns3: disable firmware compatible features when uninstall PF

Currently, the firmware compatible features are enabled in PF driver
initialization process, but they are not disabled in PF driver
deinitialization process and firmware keeps these features in enabled
status.

In this case, if load an old PF driver (for example, in VM) which not
support the firmware compatible features, firmware will still send mailbox
message to PF when link status changed and PF will print
"un-supported mailbox message, code = 201".

To fix this problem, disable these firmware compatible features in PF
driver deinitialization process.

Fixes: ed8fb4b262ae ("net: hns3: add link change event report")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c