]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: pad the short frame before sending to the hardware
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 15 Jan 2020 02:46:45 +0000 (10:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2020 12:18:51 +0000 (13:18 +0100)
commitb12d8fe1fff3aa3738d5eb4837af241b54bef46f
tree0aa79ef052c017bd05b9a375ed7ca7599b850060
parentd6d5ab88b023a3aef584b2ec461a0ab4baf0f90f
net: hns3: pad the short frame before sending to the hardware

The hardware can not handle short frames below or equal to 32
bytes according to the hardware user manual, and it will trigger
a RAS error when the frame's length is below 33 bytes.

This patch pads the SKB when skb->len is below 33 bytes before
sending it to hardware.

Fixes: 327a841d1dd9 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c