Patch "net/mlx5: Handle fw tracer change ownership event based on MTRC" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net/mlx5: Handle fw tracer change ownership event based on MTRC

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5-handle-fw-tracer-change-ownership-event-bas.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0a483eabb058a193184d5b8047a57ef6e2b11c58
Author: Maher Sanalla <msanalla@xxxxxxxxxx>
Date:   Wed Sep 6 21:48:30 2023 +0300

    net/mlx5: Handle fw tracer change ownership event based on MTRC
    
    [ Upstream commit 92fd39634541eb0a11bf1bafbc8ba92d6ddb8dba ]
    
    Currently, whenever fw issues a change ownership event, the PF that owns
    the fw tracer drops its ownership directly and the other PFs try to pick
    up the ownership via what MTRC register suggests.
    
    In some cases, driver releases the ownership of the tracer and reacquires
    it later on. Whenever the driver releases ownership of the tracer, fw
    issues a change ownership event. This event can be delayed and come after
    driver has reacquired ownership of the tracer. Thus the late event will
    trigger the tracer owner PF to release the ownership again and lead to a
    scenario where no PF is owning the tracer.
    
    To prevent the scenario described above, when handling a change
    ownership event, do not drop ownership of the tracer directly, instead
    read the fw MTRC register to retrieve the up-to-date owner of the tracer
    and set it accordingly in driver level.
    
    Fixes: f53aaa31cce7 ("net/mlx5: FW tracer, implement tracer logic")
    Signed-off-by: Maher Sanalla <msanalla@xxxxxxxxxx>
    Reviewed-by: Shay Drory <shayd@xxxxxxxxxx>
    Signed-off-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
index 5273644fb2bf9..86088ccab23aa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
@@ -821,7 +821,7 @@ static void mlx5_fw_tracer_ownership_change(struct work_struct *work)
 
 	mlx5_core_dbg(tracer->dev, "FWTracer: ownership changed, current=(%d)\n", tracer->owner);
 	if (tracer->owner) {
-		tracer->owner = false;
+		mlx5_fw_tracer_ownership_acquire(tracer);
 		return;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux