diff options
author | Hugo Villeneuve <hvilleneuve@dimonoff.com> | 2024-01-16 16:30:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-27 19:09:10 -0800 |
commit | b35f8dbbce818b02c730dc85133dc7754266e084 (patch) | |
tree | 9329f4af1293169cc9760f5b2604e3dc803e4f18 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |
parent | 8afa6c6decea37e7cb473d2c60473f37f46cea35 (diff) |
serial: max310x: prevent infinite while() loop in port startup
If there is a problem after resetting a port, the do/while() loop that
checks the default value of DIVLSB register may run forever and spam the
I2C bus.
Add a delay before each read of DIVLSB, and a maximum number of tries to
prevent that situation from happening.
Also fail probe if port reset is unsuccessful.
Fixes: 10d8b34a4217 ("serial: max310x: Driver rework")
Cc: stable@vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20240116213001.3691629-5-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
0 files changed, 0 insertions, 0 deletions