ionic: clean interrupt before enabling queue to avoid credit race
authorNeel Patel <neel.patel@amd.com>
Thu, 2 Feb 2023 21:55:35 +0000 (13:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:17:59 +0000 (19:17 +0100)
commit3cec44036f48f5ae047b17a20a5dec89c68f9603
tree675392f4a0e7ce8ec478611384c8c3a7875836e1
parentfad12afe877a15febce971dff974dc17904bae87
ionic: clean interrupt before enabling queue to avoid credit race

[ Upstream commit e8797a058466b60fc5a3291b92430c93ba90eaff ]

Clear the interrupt credits before enabling the queue rather
than after to be sure that the enabled queue starts at 0 and
that we don't wipe away possible credits after enabling the
queue.

Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
Signed-off-by: Neel Patel <neel.patel@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_lif.c