Skip to content

Commit 3359564

Browse files
Ganji Aravinddavem330
authored andcommitted
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: 7235ffa ("cxgb4: add loopback ethtool self-test") Signed-off-by: Ganji Aravind <[email protected]> Reviewed-by: Jesse Brandeburg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ab97a28 commit 3359564

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/chelsio/cxgb4

1 file changed

+2
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/sge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,8 +2553,8 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev)
25532553

25542554
pkt_len = ETH_HLEN + sizeof(CXGB4_SELFTEST_LB_STR);
25552555

2556-
flits = DIV_ROUND_UP(pkt_len + sizeof(struct cpl_tx_pkt) +
2557-
sizeof(*wr), sizeof(__be64));
2556+
flits = DIV_ROUND_UP(pkt_len + sizeof(*cpl) + sizeof(*wr),
2557+
sizeof(__be64));
25582558
ndesc = flits_to_desc(flits);
25592559

25602560
lb = &pi->ethtool_lb;

0 commit comments

Comments
 (0)