]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 12:18:39 +0000 (14:18 +0200)
commit5da3cedc57376b07dd0392435e143028c0629004
tree765b1ef352f068543944448eaedff63af0b43fc9
parent79fa1b6af1223ccdba7c31392c216d7a77d69256
net: hns3: Fix for mailbox message truncated problem

BugLink: https://bugs.launchpad.net/bugs/1787477
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: b11a0bb231f3 ("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>
(cherry picked from commit ead5bd4d35c0a14d5ce1474177718c678dff5205)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c