1
0
Fork 0
alistair23-linux/drivers/net/can/m_can
Sean Nyekjaer 1ad3ee211d can: tcan4x5x: tcan4x5x_can_probe(): get the device out of standby before register access
commit 3069ce620d upstream.

The m_can tries to detect if Non ISO Operation is available while in
standby mode, this function results in the following error:

| tcan4x5x spi2.0 (unnamed net_device) (uninitialized): Failed to init module
| tcan4x5x spi2.0: m_can device registered (irq=84, version=32)
| tcan4x5x spi2.0 can2: TCAN4X5X successfully initialized.

When the tcan device comes out of reset it goes in standby mode. The
m_can driver tries to access the control register but fails due to the
device being in standby mode.

So this patch will put the tcan device in normal mode before the m_can
driver does the initialization.

Fixes: 5443c226ba ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14 20:08:27 +01:00
..
Kconfig can: tcan4x5x: Add tcan4x5x driver to the kernel 2019-07-24 10:31:54 +02:00
Makefile can: tcan4x5x: Add tcan4x5x driver to the kernel 2019-07-24 10:31:54 +02:00
m_can.c can: m_can: Rename m_can_priv to m_can_classdev 2019-07-24 10:31:54 +02:00
m_can.h can: m_can: Rename m_can_priv to m_can_classdev 2019-07-24 10:31:54 +02:00
m_can_platform.c can: m_can_platform: remove unnecessary m_can_class_resume() call 2019-11-22 15:34:37 +01:00
tcan4x5x.c can: tcan4x5x: tcan4x5x_can_probe(): get the device out of standby before register access 2020-01-14 20:08:27 +01:00