OSDN Git Service

net: hns3: fix the bug when reuse command description in hclge_add_mac_vlan_tbl
authorLipeng <lipeng321@huawei.com>
Tue, 24 Oct 2017 13:02:12 +0000 (21:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 08:25:35 +0000 (17:25 +0900)
commitc3b6f755fdcd2c0d8342c01e630741928a7c62ab
tree0a09afef2d8dc0cd0905c3cdc531d56824462614
parenta17dcf3f0124698d1120da71574bf4c339e5a368
net: hns3: fix the bug when reuse command description in hclge_add_mac_vlan_tbl

When reusing a command description read from HW, driver should set
IN_VLD bit, WR bit and NO_INTR bit. If IN_VLD bit and NO_INTR bit
are not set, the command fails and driver prints error message:

[  135.261284] hns3 0000:7d:00.0: cmdq execute failed for get_mac_vlan_cmd_status,status=2.
[  135.270983] hns3 0000:7d:00.0: add mac addr failed for cmd_send, ret =-5.

This patch fixes the bug.
Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support)

Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c