# Re: \[BUG\] Re: \[net 3/6\] can: flexcan: invoke flexcan\_chip\_freeze() to enter freeze mode

- From: Marc Kleine-Budde \<mkl@pengutronix.de\>
- Date: 2021-03-17 08:19:30 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/03/9355609
- Thread: https://ratatoskr.run/netdev/2021/03/9355441/t.md

```text
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 |
```

## Attachments

- [signature.asc](https://ratatoskr.run/netdev/2021/03/9355609/attachment/0) (application/pgp-signature, 488 bytes)
