public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Cc: "Timo Schlüßler" <schluessler@krause.de>,
	ukrfoil@gmail.com, linux-can <linux-can@vger.kernel.org>
Subject: Re: mcp251x hangs during ifup
Date: Tue, 2 Mar 2021 08:19:01 +0100	[thread overview]
Message-ID: <20210302071901.ptwvejkedascbdsv@pengutronix.de> (raw)
In-Reply-To: <CAMZ6RqKfXR9cHxjvnPwxjWHWEuxYNV9V4qLSd0ZQGP0JOMKX0w@mail.gmail.com>

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

On 02.03.2021 10:40:21, Vincent MAILHOL wrote:
> On Tue. 2 Mar 2021 at 01:58, Marc Kleine-Budde <mkl@pengutronix.de> wrote:
> >
> > 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?
> 
> This mcp251x_hw_wake() function was introduced in below commit:
> 8ce8c0abcba3 ("can: mcp251x: only reset hardware as required")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8ce8c0abcba314e1fe954a1840f6568bf5aef2ef
> 
> The GPIO support was then introduced later on in below commit:
> 2d52dabbef60 ("can: mcp251x: add GPIO support")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d52dabbef60da91b72617519495fe77b621e6b8
> 
> I am adding Timo to the loop. He is the author of the two commits above.
> I think he will be of better support than me here :)

Of course I wanted to add Timo, thanks. I think I've picked your e-mail,
as you've done the newest change on the driver after me :)

Sorry for the noise.

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 --]

  reply	other threads:[~2021-03-03  0:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210302071901.ptwvejkedascbdsv@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=schluessler@krause.de \
    --cc=ukrfoil@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox