Thread (4 messages) 4 messages, 2 authors, 2021-03-03

mcp251x hangs during ifup

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-03-01 19:52:15
Subsystem: can network drivers, the rest · Maintainers: Marc Kleine-Budde, Vincent Mailhol, Linus Torvalds

Hello,

in the armbian forum a problem with the mcp215x was reported:

https://forum.armbian.com/topic/14909-orange-pi-mcp2515-ip-up-freezes/

In the last comment (Posted Saturday at 10:05 PM) Aleksey posted a
mcp251x.c with a workaround. After cleanup the diff looks like this:
diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index f69fb4238a65..6d5fcf5a19a2 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -1221,7 +1221,7 @@ static int mcp251x_open(struct net_device *net)
        INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
        INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);
-       ret = mcp251x_hw_wake(spi);
+       ret = mcp251x_hw_reset(spi);
        if (ret)
                goto out_free_wq;
        ret = mcp251x_setup(net, spi);
Vincent, it seems the gpio support has broken the driver on some
platforms. Do you have an idea?

Is RUNTIME_PM support now mandatory? So that mcp251x_can_suspend() and
mcp251x_can_resume() are now always called, does the driver break if
those functions are not compiled into the kernel?

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help