mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
net: stmmac: dwmac4: Fix the MTL_OP_MODE_*_MASK operation
In order to mask off the bits, we need to use the '~' operator to invert all the bits of _MASK and clear them. Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241107063637.2122726-3-leyfoon.tan@starfivetech.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
6d4a34fe42
commit
3fccba8fdc
@@ -274,7 +274,7 @@ static void dwmac4_dma_rx_chan_op_mode(struct stmmac_priv *priv,
|
||||
} else {
|
||||
pr_debug("GMAC: disable RX SF mode (threshold %d)\n", mode);
|
||||
mtl_rx_op &= ~MTL_OP_MODE_RSF;
|
||||
mtl_rx_op &= MTL_OP_MODE_RTC_MASK;
|
||||
mtl_rx_op &= ~MTL_OP_MODE_RTC_MASK;
|
||||
if (mode <= 32)
|
||||
mtl_rx_op |= MTL_OP_MODE_RTC_32;
|
||||
else if (mode <= 64)
|
||||
@@ -343,7 +343,7 @@ static void dwmac4_dma_tx_chan_op_mode(struct stmmac_priv *priv,
|
||||
} else {
|
||||
pr_debug("GMAC: disabling TX SF (threshold %d)\n", mode);
|
||||
mtl_tx_op &= ~MTL_OP_MODE_TSF;
|
||||
mtl_tx_op &= MTL_OP_MODE_TTC_MASK;
|
||||
mtl_tx_op &= ~MTL_OP_MODE_TTC_MASK;
|
||||
/* Set the transmit threshold */
|
||||
if (mode <= 32)
|
||||
mtl_tx_op |= MTL_OP_MODE_TTC_32;
|
||||
|
||||
Reference in New Issue
Block a user