Skip to content

Commit 393e0b4

Browse files
Suraj GuptaPaolo Abeni
authored andcommitted
net: xilinx: axienet: Correct BD length masks to match AXIDMA IP spec
The XAXIDMA_BD_CTRL_LENGTH_MASK and XAXIDMA_BD_STS_ACTUAL_LEN_MASK macros were defined as 0x007FFFFF (23 bits), but the AXI DMA IP product guide (PG021) specifies the buffer length field as bits 25:0 (26 bits). Update both masks to match the IP documentation. In practice this had no functional impact, since Ethernet frames are far smaller than 2^23 bytes and the extra bits were always zero, but the masks should still reflect the hardware specification. Fixes: 8a3b7a2 ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com> Reviewed-by: Sean Anderson <sean.anderson@linux.dev> Link: https://patch.msgid.link/20260327073238.134948-2-suraj.gupta2@amd.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 30fe3f5 commit 393e0b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/ethernet/xilinx/xilinx_axienet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#define XAXIDMA_BD_HAS_DRE_MASK 0xF00 /* Whether has DRE mask */
106106
#define XAXIDMA_BD_WORDLEN_MASK 0xFF /* Whether has DRE mask */
107107

108-
#define XAXIDMA_BD_CTRL_LENGTH_MASK 0x007FFFFF /* Requested len */
108+
#define XAXIDMA_BD_CTRL_LENGTH_MASK GENMASK(25, 0) /* Requested len */
109109
#define XAXIDMA_BD_CTRL_TXSOF_MASK 0x08000000 /* First tx packet */
110110
#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
111111
#define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000 /* All control bits */
@@ -130,7 +130,7 @@
130130
#define XAXIDMA_BD_CTRL_TXEOF_MASK 0x04000000 /* Last tx packet */
131131
#define XAXIDMA_BD_CTRL_ALL_MASK 0x0C000000 /* All control bits */
132132

133-
#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK 0x007FFFFF /* Actual len */
133+
#define XAXIDMA_BD_STS_ACTUAL_LEN_MASK GENMASK(25, 0) /* Actual len */
134134
#define XAXIDMA_BD_STS_COMPLETE_MASK 0x80000000 /* Completed */
135135
#define XAXIDMA_BD_STS_DEC_ERR_MASK 0x40000000 /* Decode error */
136136
#define XAXIDMA_BD_STS_SLV_ERR_MASK 0x20000000 /* Slave error */

0 commit comments

Comments
 (0)