platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors
authorLiming Sun <limings@nvidia.com>
Tue, 29 Aug 2023 17:42:59 +0000 (13:42 -0400)
committerHans de Goede <hdegoede@redhat.com>
Mon, 11 Sep 2023 11:13:01 +0000 (13:13 +0200)
commit78034cbece79c2d730ad0770b3b7f23eedbbecf5
tree046fa682f36dffe55176d20d3911034354127061
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors

This commit fixes tmfifo console stuck issue when the virtual
networking interface is in down state. In such case, the network
Rx descriptors runs out and causes the Rx network packet staying
in the head of the tmfifo thus blocking the console packets. The
fix is to drop the Rx network packet when no more Rx descriptors.
Function name mlxbf_tmfifo_release_pending_pkt() is also renamed
to mlxbf_tmfifo_release_pkt() to be more approperiate.

Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc")
Signed-off-by: Liming Sun <limings@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/8c0177dc938ae03f52ff7e0b62dbeee74b7bec09.1693322547.git.limings@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxbf-tmfifo.c