public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
* mcp251x hangs during ifup
@ 2021-03-01 16:58 Marc Kleine-Budde
  2021-03-02  1:40 ` Vincent MAILHOL
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Kleine-Budde @ 2021-03-01 16:58 UTC (permalink / raw)
  To: Vincent Mailhol; +Cc: ukrfoil, linux-can

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

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 |



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-04  0:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01 16:58 mcp251x hangs during ifup Marc Kleine-Budde
2021-03-02  1:40 ` Vincent MAILHOL
2021-03-02  7:19   ` Marc Kleine-Budde
2021-03-02  8:28     ` Schlüßler, Timo
     [not found]       ` <CACGOs=TG4jyXKHBfPGDEJp1gSA+PyNVqCM7grPGMpe9+wYDBLA@mail.gmail.com>
2021-03-03  7:26         ` Marc Kleine-Budde
     [not found]           ` <CACGOs=TJhoV99D=V-7xa8LG6Ftx8SWUO_XCHGAP3L1_UGLVm3w@mail.gmail.com>
2021-03-03  7:48             ` Marc Kleine-Budde
     [not found]               ` <CACGOs=SOxiN1PKhZvhTizH92vneKUOfjxL+9fg4-=JmHHgYtNw@mail.gmail.com>
2021-03-03  8:08                 ` Marc Kleine-Budde
     [not found]                   ` <CACGOs=SSEvb=5AG9a7dSpOuiaq-wX+FLe3NAMEtKcMFdwJx8Pw@mail.gmail.com>
2021-03-03  8:33                     ` Marc Kleine-Budde
2021-03-03  9:40                       ` Schlüßler, Timo
     [not found]                         ` <CACGOs=Ry7DtLooobKzuK7PWLOaWVnawMNTkErKC8e4OJKjNJPQ@mail.gmail.com>
2021-03-03 21:19                           ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox