nfp: remove padding in nfp_nfdk_tx_desc
authorFei Qin <fei.qin@corigine.com>
Wed, 1 Jun 2022 08:34:49 +0000 (10:34 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 2 Jun 2022 09:08:43 +0000 (11:08 +0200)
commitc6fbbf1eae8f35e10966826960e154c9596c86dc
tree64eb99264ddb2b4a0211b6212ca1c27391f62520
parent7d8a3a477b3e25ada8dc71d22048c2ea417209a0
nfp: remove padding in nfp_nfdk_tx_desc

NFDK firmware supports 48-bit dma addressing and
parses 16 high bits of dma addresses.

In nfp_nfdk_tx_desc, dma related structure and tso
related structure are union. When "mss" be filled
with nonzero value due to enable tso, the memory used
by "padding" may be also filled. Then, firmware may
parse wrong dma addresses which causes TX watchdog
timeout problem.

This patch removes padding and unifies the dma_addr_hi
bits with the one in firmware. nfp_nfdk_tx_desc_set_dma_addr
is also added to match this change.

Fixes: c10d12e3dce8 ("nfp: add support for NFDK data path")
Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20220601083449.50556-1-simon.horman@corigine.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/netronome/nfp/nfdk/dp.c
drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h
drivers/net/ethernet/netronome/nfp/nfp_net.h