]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita5d4b4c65db8eb0ab3f54a6952c85ec5b60555a8
tree64eb99264ddb2b4a0211b6212ca1c27391f62520
parentfd6ab46ae8ce292cc7455558f30203d089853a45
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: 1cccc56ca776 ("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