Skip to contentSkip to conversation

can: mcp251x: not correct register address

PATCH Applied Tomas Krcka 2 participants 2 messages May 30, 2015 – Jun 9, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 can: mcp251x: not correct register address

v2: fix of corrupted patch

This patch corrects addresses of acceptance filters.
These registers are not in use, but values should be correct. Tested with MCP2515 and am3352 and also checked datasheets for MCP2515 and MCP2510.

---
 drivers/net/can/spi/mcp251x.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/net/can/spi/mcp251x.c +5 -4
index bf63fee..c1a95a3 100644
@@ -190,10 +190,11 @@
 #define RXBEID0_OFF 4
 #define RXBDLC_OFF  5
 #define RXBDAT_OFF  6
-#define RXFSIDH(n) ((n) * 4)
-#define RXFSIDL(n) ((n) * 4 + 1)
-#define RXFEID8(n) ((n) * 4 + 2)
-#define RXFEID0(n) ((n) * 4 + 3)
+#define RXFSID(n) ((n < 3) ? 0 : 4)
+#define RXFSIDH(n) ((n) * 4 + RXFSID(n))
+#define RXFSIDL(n) ((n) * 4 + 1 + RXFSID(n))
+#define RXFEID8(n) ((n) * 4 + 2 + RXFSID(n))
+#define RXFEID0(n) ((n) * 4 + 3 + RXFSID(n))
 #define RXMSIDH(n) ((n) * 4 + 0x20)
 #define RXMSIDL(n) ((n) * 4 + 0x21)
 #define RXMEID8(n) ((n) * 4 + 0x22)
Signature · 1 line
1.7.5.4
maintainer Applied
#1 lore raw
Quoted 8 lines · Tomas Krcka

v2: fix of corrupted patch

This patch corrects addresses of acceptance filters.
These registers are not in use, but values should be correct. Tested with MCP2515 and am3352 and also checked datasheets for MCP2515 and MCP2510.

Applied to can-next.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |