mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
net: stmmac: xgmac: Clear previous RX buffer size
When switching between buffer sizes we need to clear the previous value.
Fixes: d6ddfacd95
("net: stmmac: Add DMA related callbacks for XGMAC2")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93b5dce401
commit
11d55fd997
@ -343,6 +343,8 @@
|
||||
#define XGMAC_DMA_CH_RX_CONTROL(x) (0x00003108 + (0x80 * (x)))
|
||||
#define XGMAC_RxPBL GENMASK(21, 16)
|
||||
#define XGMAC_RxPBL_SHIFT 16
|
||||
#define XGMAC_RBSZ GENMASK(14, 1)
|
||||
#define XGMAC_RBSZ_SHIFT 1
|
||||
#define XGMAC_RXST BIT(0)
|
||||
#define XGMAC_DMA_CH_TxDESC_HADDR(x) (0x00003110 + (0x80 * (x)))
|
||||
#define XGMAC_DMA_CH_TxDESC_LADDR(x) (0x00003114 + (0x80 * (x)))
|
||||
|
@ -482,7 +482,8 @@ static void dwxgmac2_set_bfsize(void __iomem *ioaddr, int bfsize, u32 chan)
|
||||
u32 value;
|
||||
|
||||
value = readl(ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
|
||||
value |= bfsize << 1;
|
||||
value &= ~XGMAC_RBSZ;
|
||||
value |= bfsize << XGMAC_RBSZ_SHIFT;
|
||||
writel(value, ioaddr + XGMAC_DMA_CH_RX_CONTROL(chan));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user