Skip to content

Commit ec15ecd

Browse files
atenartdavem330
authored andcommitted
net: mvpp2: fix the packet size configuration for 10G
The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is defined as BIT(0). Updated its name to contains "OFFS" as in offset and fix its value using the offset value, 0. Reported-by: Stefan Chulski <[email protected]> Signed-off-by: Antoine Tenart <[email protected]> Fixes: 76eb1b1 ("net: mvpp2: set maximum packet size for 10G ports") Signed-off-by: David S. Miller <[email protected]>
1 parent 49107fc commit ec15ecd

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/marvell

1 file changed

+2
-2
lines changed

drivers/net/ethernet/marvell/mvpp2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
#define MVPP22_XLG_CTRL0_RX_FLOW_CTRL_EN BIT(7)
368368
#define MVPP22_XLG_CTRL0_MIB_CNT_DIS BIT(14)
369369
#define MVPP22_XLG_CTRL1_REG 0x104
370-
#define MVPP22_XLG_CTRL1_FRAMESIZELIMIT BIT(0)
370+
#define MVPP22_XLG_CTRL1_FRAMESIZELIMIT_OFFS 0
371371
#define MVPP22_XLG_CTRL1_FRAMESIZELIMIT_MASK 0x1fff
372372
#define MVPP22_XLG_CTRL3_REG 0x11c
373373
#define MVPP22_XLG_CTRL3_MACMODESELECT_MASK (7 << 13)
@@ -4669,7 +4669,7 @@ static inline void mvpp2_xlg_max_rx_size_set(struct mvpp2_port *port)
46694669
val = readl(port->base + MVPP22_XLG_CTRL1_REG);
46704670
val &= ~MVPP22_XLG_CTRL1_FRAMESIZELIMIT_MASK;
46714671
val |= ((port->pkt_size - MVPP2_MH_SIZE) / 2) <<
4672-
MVPP22_XLG_CTRL1_FRAMESIZELIMIT;
4672+
MVPP22_XLG_CTRL1_FRAMESIZELIMIT_OFFS;
46734673
writel(val, port->base + MVPP22_XLG_CTRL1_REG);
46744674
}
46754675

0 commit comments

Comments
 (0)