linux_dsm_epyc7002/drivers/net/can
Joakim Zhang 247e5356a7 can: flexcan: fix timeout when set small bitrate
Current we can meet timeout issue when setting a small bitrate like
10000 as follows on i.MX6UL EVK board (ipg clock = 66MHZ, per clock =
30MHZ):

| root@imx6ul7d:~# ip link set can0 up type can bitrate 10000

A link change request failed with some changes committed already.
Interface can0 may have been left with an inconsistent configuration,
please check.

| RTNETLINK answers: Connection timed out

It is caused by calling of flexcan_chip_unfreeze() timeout.

Originally the code is using usleep_range(10, 20) for unfreeze
operation, but the patch (8badd65 can: flexcan: avoid calling
usleep_range from interrupt context) changed it into udelay(10) which is
only a half delay of before, there're also some other delay changes.

After double to FLEXCAN_TIMEOUT_US to 100 can fix the issue.

Meanwhile, Rasmus Villemoes reported that even with a timeout of 100,
flexcan_probe() fails on the MPC8309, which requires a value of at least
140 to work reliably. 250 works for everyone.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-06-07 23:03:53 +02:00
..
c_can treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cc770 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ifi_canfd treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
m_can treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mscan treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
peak_canfd treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
rcar can: rcar: add SPDX identifiers to Kconfig and Makefile 2018-11-28 16:19:53 +01:00
sja1000 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
softing treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
spi treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
usb can: usb: Kconfig: Remove duplicate menu entry 2019-06-07 23:03:53 +02:00
at91_can.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 198 2019-05-30 11:29:22 -07:00
dev.c can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by removing it 2019-01-22 11:18:34 +01:00
flexcan.c can: flexcan: fix timeout when set small bitrate 2019-06-07 23:03:53 +02:00
grcan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
janz-ican3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
led.c can: add combined rx/tx LED trigger support 2015-03-22 23:50:11 +01:00
Makefile can: remove bfin_can driver 2018-03-26 15:57:02 +02:00
pch_can.c can: fix assignment of error location in CAN error messages 2015-11-23 09:37:34 +01:00
rx-offload.c can: rx-offload: rename can_rx_offload_irq_queue_err_skb() to can_rx_offload_queue_tail() 2018-11-09 17:33:32 +01:00
slcan.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sun4i_can.c can: sun4i: fix sun4ican_start_xmit()'s return type 2018-07-27 10:40:16 +02:00
ti_hecc.c can: ti_hecc: Fix napi poll return value for repoll 2017-12-01 11:20:52 +01:00
vcan.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
vxcan.c net: Add extack argument to rtnl_create_link 2018-11-06 15:00:45 -08:00
xilinx_can.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00