diff options
author | Angelo Dureghello <angelo@kernel-space.org> | 2021-03-16 02:15:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-10 14:01:58 +0300 |
commit | caf172d1d9c735d1e386df77263ce1bb3888203b (patch) | |
tree | f1ed9576b70af34dfda0c97b6aa178a9fd49a0cc /drivers/char/genrtc.c | |
parent | 485ff03ae96816b2f98ab3bc824fbf112528d071 (diff) | |
download | linux-caf172d1d9c735d1e386df77263ce1bb3888203b.tar.xz |
can: flexcan: flexcan_chip_freeze(): fix chip freeze for missing bitrate
commit 47c5e474bc1e1061fb037d13b5000b38967eb070 upstream.
For cases when flexcan is built-in, bitrate is still not set at
registering. So flexcan_chip_freeze() generates:
[ 1.860000] *** ZERO DIVIDE *** FORMAT=4
[ 1.860000] Current process id is 1
[ 1.860000] BAD KERNEL TRAP: 00000000
[ 1.860000] PC: [<402e70c8>] flexcan_chip_freeze+0x1a/0xa8
To allow chip freeze, using an hardcoded timeout when bitrate is still
not set.
Fixes: ec15e27cc890 ("can: flexcan: enable RX FIFO after FRZ/HALT valid")
Link: https://lore.kernel.org/r/20210315231510.650593-1-angelo@kernel-space.org
Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
[mkl: use if instead of ? operator]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Koen Vandeputte <koen.vandeputte@citymesh.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/genrtc.c')
0 files changed, 0 insertions, 0 deletions