]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Use variable timeout for EMAD retries
authorIdo Schimmel <idosch@nvidia.com>
Tue, 17 Nov 2020 17:33:52 +0000 (19:33 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:07:00 +0000 (11:07 -0800)
commit937e93a7a743c1068b3516d2148ebe34ea55c215
tree1bbd0f3e23b03326453d93ba3d00f7dd5e8442f7
parentec5c91055248f1195ab4281e47ffdfb4e4609078
mlxsw: core: Use variable timeout for EMAD retries

The driver sends Ethernet Management Datagram (EMAD) packets to the
device for configuration purposes and waits for up to 200ms for a reply.
A request is retried up to 5 times.

When the system is under heavy load, replies are not always processed in
time and EMAD transactions fail.

Make the process more robust to such delays by using exponential
backoff. First wait for up to 200ms, then retransmit and wait for up to
400ms and so on.

Fixes: dc2a2de75cfa ("mlxsw: core: Introduce support for asynchronous EMAD register access")
Reported-by: Denis Yulevich <denisyu@nvidia.com>
Tested-by: Denis Yulevich <denisyu@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core.c