summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2019-10-01 17:57:16 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-12 11:06:09 +0100
commitd1d8bb15059078a330d724b2e19f8460103dd98c (patch)
treef38e5254d88dfeda351d51236ef0d5d8659972b9 /drivers
parentb73684a4cd1e686ba58bb99f214287ff4eb5a3c9 (diff)
can: mcp25xxfd: mcp25xxfd_can_fifo_clear(): fix fifo initialization
By masking the FIFO number in the MCP25XXFD_CAN_FLTCON macro, the mcp25xxfd_can_fifo_clear() function doesn't clear the filters at all, as the masking makes MCP25XXFD_CAN_FLTCON(32) equal MCP25XXFD_CAN_FLTCON(0). | mcp25xxfd_can_fifo_clear_regs(cpriv, MCP25XXFD_CAN_FLTCON(0), | MCP25XXFD_CAN_FLTCON(32)); Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> (cherry picked from commit 265153724aa0339bae525d22511377380fa45af5)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/spi/mcp25xxfd/mcp25xxfd_regs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_regs.h b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_regs.h
index 3767539208ca..80a166248955 100644
--- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_regs.h
+++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd_regs.h
@@ -560,7 +560,7 @@
#define MCP25XXFD_CAN_FIFOUA(x) \
MCP25XXFD_CAN_SFR_BASE(0x64 + 12 * ((x) - 1))
#define MCP25XXFD_CAN_FLTCON(x) \
- MCP25XXFD_CAN_SFR_BASE(0x1D0 + ((x) & 0x1c))
+ MCP25XXFD_CAN_SFR_BASE(0x1D0 + (x))
# define MCP25XXFD_CAN_FLTCON_SHIFT(x) (((x) & 3) * 8)
# define MCP25XXFD_CAN_FLTCON_BITS(x) MCP25XXFD_CAN_FLTCON_BITS_
# define MCP25XXFD_CAN_FLTCON_BITS_ 5