aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek/r8169.c
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2019-03-21 11:28:43 +0800
committerDavid S. Miller <davem@davemloft.net>2019-03-21 13:59:24 -0700
commit5f543a54eec08228ab0cc0a49cf5d79dd32c9e5e (patch)
tree8766e7d7a2619c06d7e81391db73b02f9db2c2ab /drivers/net/ethernet/realtek/r8169.c
parentrhashtable: Still do rehash when we get EEXIST (diff)
downloadlinux-dev-5f543a54eec08228ab0cc0a49cf5d79dd32c9e5e.tar.xz
linux-dev-5f543a54eec08228ab0cc0a49cf5d79dd32c9e5e.zip
net: hns3: fix for not calculating tx bd num correctly
When there is only one byte in a frag, the current calculation using "(size + HNS3_MAX_BD_SIZE - 1) >> HNS3_MAX_BD_SIZE_OFFSET" will return zero, because HNS3_MAX_BD_SIZE is 65535 and HNS3_MAX_BD_SIZE_OFFSET is 16. So it will cause tx error when a frag's size is one byte. This patch fixes it by using DIV_ROUND_UP. Fixes: 3fe13ed95dd3 ("net: hns3: avoid mult + div op in critical data path") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek/r8169.c')
0 files changed, 0 insertions, 0 deletions