diff options
author | Fei Qin <fei.qin@corigine.com> | 2022-06-01 10:34:49 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-06-02 11:08:43 +0200 |
commit | c6fbbf1eae8f35e10966826960e154c9596c86dc (patch) | |
tree | 64eb99264ddb2b4a0211b6212ca1c27391f62520 /drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h | |
parent | 7d8a3a477b3e25ada8dc71d22048c2ea417209a0 (diff) |
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h b/drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h index c41e0975eb73..0ea51d9f2325 100644 --- a/drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h +++ b/drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h @@ -46,8 +46,7 @@ struct nfp_nfdk_tx_desc { union { struct { - u8 dma_addr_hi; /* High bits of host buf address */ - u8 padding; /* Must be zero */ + __le16 dma_addr_hi; /* High bits of host buf address */ __le16 dma_len_type; /* Length to DMA for this desc */ __le32 dma_addr_lo; /* Low 32bit of host buf addr */ }; |