net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero
authorXi Wang <wangxi11@huawei.com>
Tue, 14 Aug 2018 16:13:13 +0000 (17:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:45:29 +0000 (09:45 +0200)
commita77439e5fb28b8396eaec38f24d373393d65e95b
tree692efad5df3cfe6c01f715df931b3928e551a8bc
parentc16a0727c71a3e05e6b9fdaac759d76c79375215
net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero

[ Upstream commit 6c39d5278e62956238a681e4cfc69fae5507fc57 ]

According to the functional specification of hardware, the first
descriptor of response from command 'lookup vlan talbe' is not valid.
Currently, the first descriptor is parsed as normal value, which will
cause an expected error.

This patch fixes this problem by skipping the first descriptor.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c