提交 33595642 编写于 作者: G Ganji Aravind 提交者: David S. Miller

cxgb4: Fix work request size calculation for loopback test

Work request used for sending loopback packet needs to add
the firmware work request only once. So, fix by using
correct structure size.

Fixes: 7235ffae ("cxgb4: add loopback ethtool self-test")
Signed-off-by: NGanji Aravind <ganji.aravind@chelsio.com>
Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ab97a289
......@@ -2553,8 +2553,8 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev)
pkt_len = ETH_HLEN + sizeof(CXGB4_SELFTEST_LB_STR);
flits = DIV_ROUND_UP(pkt_len + sizeof(struct cpl_tx_pkt) +
sizeof(*wr), sizeof(__be64));
flits = DIV_ROUND_UP(pkt_len + sizeof(*cpl) + sizeof(*wr),
sizeof(__be64));
ndesc = flits_to_desc(flits);
lb = &pi->ethtool_lb;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册