]> www.infradead.org Git - users/dwmw2/linux.git/commit
mlxsw: pci: Arm CQ doorbell regardless of number of completions
authorAmit Cohen <amcohen@nvidia.com>
Tue, 2 Apr 2024 13:54:17 +0000 (15:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Apr 2024 02:50:39 +0000 (19:50 -0700)
commit38b124cb4ee5d3567cd138af33bbd6fefbfdb703
tree4111a39347e7d58c4bb3a6953cacb2916cb6032a
parentfb29028ae7181fbe268d94f6b69d172da4e3640f
mlxsw: pci: Arm CQ doorbell regardless of number of completions

Currently, as part of mlxsw_pci_cq_tasklet(), we check if any item
was handled, and only in such case we arm doorbell. This is unlikely case,
as we schedule tasklet only for CQs that we get an event for them, which
means that they contain completions to handle. Remove this check, which
is supposed to be true always, and even if it is false, it is not a mistake
to ring the doorbell. We can warn on such case, but it is not really worth
to add a check which will be run for each CQ handling when we do not expect
to reach it and it does not point to logic error that should be handled.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/f8efa481bfe7bebb9f93bb803f44ab7da77f53e6.1712062203.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/pci.c