]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for mailbox message truncated problem
authorFuyun Liang <liangfuyun1@huawei.com>
Fri, 6 Jul 2018 10:27:59 +0000 (11:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 02:13:06 +0000 (11:13 +0900)
commit1b2033c416ce518b1acb8f5c80836924450f1eed
treeef50f70b2eb62fb6e0d989cf1ae5fc9d091a0791
parent8eebde7f9c2d5cc960510cbe62fd5fb67bed4001
net: hns3: Fix for mailbox message truncated problem

The payload of mailbox message is 16 byte and the value of
HCLGE_MBX_MAX_ARQ_MSG_SIZE is 8. A message truncated problem will
happen when mailbox message is converted to ARQ message. This patch
replaces HCLGE_MBX_MAX_ARQ_MSG_SIZE with the size of ARQ message in
hclgevf_mbx_handler to fix this problem.

Fixes: 1db7e16c8323 ("net: hns3: Add mailbox support to VF driver")
Signed-off-by: Fuyun Liang <liangfuyun1@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>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c