OSDN Git Service

net/mlx5: cmdif, Refactor error handling and reporting of async commands
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 1 Apr 2020 05:03:00 +0000 (22:03 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Feb 2022 23:21:59 +0000 (15:21 -0800)
commit0a41527608e7f3da61e76564f5a8749a1fddc7f1
treefc7985968180241e2a52cc39fc9dd0bd6937c0b4
parent31803e59233efc838b9dcb26edea28a4b2389e97
net/mlx5: cmdif, Refactor error handling and reporting of async commands

Same as the new mlx5_cmd_do API, report all information to callers and
let them handle the error values and outbox parsing.

The user callback status "work->user_callback(status)" is now similar to
the error rc code returned from the blocking mlx5_cmd_do() version,
and now is defined as follows:

 -EREMOTEIO : Command executed by FW, outbox.status != MLX5_CMD_STAT_OK.
              Caller must check FW outbox status.
 0 : Command execution successful,  outbox.status == MLX5_CMD_STAT_OK.
 < 0 : Command couldn't execute, FW or driver induced error.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/infiniband/hw/mlx5/mr.c
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
include/linux/mlx5/driver.h