]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Fix for not setting rx private buffer size to zero
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 20 Sep 2017 10:52:53 +0000 (18:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 23:15:39 +0000 (16:15 -0700)
commit486aaa966c86458307d747f6ab02caf6668a158e
tree637a7811b0c13b8c45cd6ec9336fe119b27dae9e
parent9279c686275c6f6815136952dc24d1178e304a20
net: hns3: Fix for not setting rx private buffer size to zero

When rx private buffer is disabled, there may be some case that
the rx private buffer is not set to zero, which may cause buffer
allocation process to fail.
This patch fixes this problem by setting priv->enable to 0 and
priv->buf_size to zero when rx private buffer is disabled.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c