netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: netdev@vger.kernel.org, Joakim Zhang <qiangqing.zhang@nxp.com>,
	linux-can@vger.kernel.org, kernel@pengutronix.de,
	kuba@kernel.org, davem@davemloft.net
Subject: Re: [BUG] Re: [net 3/6] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode
Date: Wed, 17 Mar 2021 09:18:31 +0100	[thread overview]
Message-ID: <20210317081831.osalrszbje4oofoh@pengutronix.de> (raw)
In-Reply-To: <65137c60-4fbe-6772-6d48-ac360930f62b@pengutronix.de>

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

On 16.03.2021 17:00:25, Ahmad Fatoum wrote:
> > --- a/drivers/net/can/flexcan.c
> > +++ b/drivers/net/can/flexcan.c
> > @@ -1480,10 +1480,13 @@ static int flexcan_chip_start(struct net_device *dev)
> >  
> >  	flexcan_set_bittiming(dev);
> >  
> > +	/* set freeze, halt */
> > +	err = flexcan_chip_freeze(priv);
> > +	if (err)
> > +		goto out_chip_disable;
> 
> With v5.12-rc3, both my FlexCAN controllers on an i.MX6Q now divide by zero
> on probe because priv->can.bittiming.bitrate == 0 inside of flexcan_chip_freeze.
> 
> Reverting this patch fixes it.

A fix for this in on its way to net/master:

https://lore.kernel.org/linux-can/20210316082104.4027260-6-mkl@pengutronix.de/

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-17  8:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 11:20 pull-request: can 2021-03-01 Marc Kleine-Budde
2021-03-01 11:20 ` [net 1/6] can: flexcan: assert FRZ bit in flexcan_chip_freeze() Marc Kleine-Budde
2021-03-01 11:20 ` [net 2/6] can: flexcan: enable RX FIFO after FRZ/HALT valid Marc Kleine-Budde
2021-03-01 11:20 ` [net 3/6] can: flexcan: invoke flexcan_chip_freeze() to enter freeze mode Marc Kleine-Budde
2021-03-16 16:00   ` [BUG] " Ahmad Fatoum
2021-03-17  8:18     ` Marc Kleine-Budde [this message]
2021-03-17 11:49       ` Marc Kleine-Budde
2021-03-18  9:23         ` Ahmad Fatoum
2021-03-01 11:20 ` [net 4/6] can: mcp251xfd: revert "can: mcp251xfd: add BQL support" Marc Kleine-Budde
2021-03-01 11:20 ` [net 5/6] can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership Marc Kleine-Budde
2021-03-01 11:21 ` [net 6/6] can: tcan4x5x: tcan4x5x_init(): fix initialization - clear MRAM before entering Normal Mode 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=20210317081831.osalrszbje4oofoh@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.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;
as well as URLs for NNTP newsgroup(s).