Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3101d1fc
Commit
3101d1fc
authored
May 03, 2018
by
Saeed Mahameed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/mlx5: FW tracer, Add debug prints
Signed-off-by:
Saeed Mahameed
<
saeedm@mellanox.com
>
parent
24406953
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+11
-2
No files found.
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
View file @
3101d1fc
...
@@ -629,14 +629,14 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
...
@@ -629,14 +629,14 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
u64
block_timestamp
,
last_block_timestamp
,
tmp_trace_block
[
TRACES_PER_BLOCK
];
u64
block_timestamp
,
last_block_timestamp
,
tmp_trace_block
[
TRACES_PER_BLOCK
];
u32
block_count
,
start_offset
,
prev_start_offset
,
prev_consumer_index
;
u32
block_count
,
start_offset
,
prev_start_offset
,
prev_consumer_index
;
u32
trace_event_size
=
MLX5_ST_SZ_BYTES
(
tracer_event
);
u32
trace_event_size
=
MLX5_ST_SZ_BYTES
(
tracer_event
);
struct
mlx5_core_dev
*
dev
=
tracer
->
dev
;
struct
tracer_event
tracer_event
;
struct
tracer_event
tracer_event
;
struct
mlx5_core_dev
*
dev
;
int
i
;
int
i
;
mlx5_core_dbg
(
dev
,
"FWTracer: Handle Trace event, owner=(%d)
\n
"
,
tracer
->
owner
);
if
(
!
tracer
->
owner
)
if
(
!
tracer
->
owner
)
return
;
return
;
dev
=
tracer
->
dev
;
block_count
=
tracer
->
buff
.
size
/
TRACER_BLOCK_SIZE_BYTE
;
block_count
=
tracer
->
buff
.
size
/
TRACER_BLOCK_SIZE_BYTE
;
start_offset
=
tracer
->
buff
.
consumer_index
*
TRACER_BLOCK_SIZE_BYTE
;
start_offset
=
tracer
->
buff
.
consumer_index
*
TRACER_BLOCK_SIZE_BYTE
;
...
@@ -762,6 +762,7 @@ static int mlx5_fw_tracer_start(struct mlx5_fw_tracer *tracer)
...
@@ -762,6 +762,7 @@ static int mlx5_fw_tracer_start(struct mlx5_fw_tracer *tracer)
goto
release_ownership
;
goto
release_ownership
;
}
}
mlx5_core_dbg
(
dev
,
"FWTracer: Ownership granted and active
\n
"
);
return
0
;
return
0
;
release_ownership:
release_ownership:
...
@@ -774,6 +775,7 @@ static void mlx5_fw_tracer_ownership_change(struct work_struct *work)
...
@@ -774,6 +775,7 @@ static void mlx5_fw_tracer_ownership_change(struct work_struct *work)
struct
mlx5_fw_tracer
*
tracer
=
struct
mlx5_fw_tracer
*
tracer
=
container_of
(
work
,
struct
mlx5_fw_tracer
,
ownership_change_work
);
container_of
(
work
,
struct
mlx5_fw_tracer
,
ownership_change_work
);
mlx5_core_dbg
(
tracer
->
dev
,
"FWTracer: ownership changed, current=(%d)
\n
"
,
tracer
->
owner
);
if
(
tracer
->
owner
)
{
if
(
tracer
->
owner
)
{
tracer
->
owner
=
false
;
tracer
->
owner
=
false
;
tracer
->
buff
.
consumer_index
=
0
;
tracer
->
buff
.
consumer_index
=
0
;
...
@@ -830,6 +832,8 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
...
@@ -830,6 +832,8 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)
goto
free_log_buf
;
goto
free_log_buf
;
}
}
mlx5_core_dbg
(
dev
,
"FWTracer: Tracer created
\n
"
);
return
tracer
;
return
tracer
;
free_log_buf:
free_log_buf:
...
@@ -887,6 +891,9 @@ void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer)
...
@@ -887,6 +891,9 @@ void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer)
if
(
IS_ERR_OR_NULL
(
tracer
))
if
(
IS_ERR_OR_NULL
(
tracer
))
return
;
return
;
mlx5_core_dbg
(
tracer
->
dev
,
"FWTracer: Cleanup, is owner ? (%d)
\n
"
,
tracer
->
owner
);
cancel_work_sync
(
&
tracer
->
ownership_change_work
);
cancel_work_sync
(
&
tracer
->
ownership_change_work
);
cancel_work_sync
(
&
tracer
->
handle_traces_work
);
cancel_work_sync
(
&
tracer
->
handle_traces_work
);
...
@@ -903,6 +910,8 @@ void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer)
...
@@ -903,6 +910,8 @@ void mlx5_fw_tracer_destroy(struct mlx5_fw_tracer *tracer)
if
(
IS_ERR_OR_NULL
(
tracer
))
if
(
IS_ERR_OR_NULL
(
tracer
))
return
;
return
;
mlx5_core_dbg
(
tracer
->
dev
,
"FWTracer: Destroy
\n
"
);
cancel_work_sync
(
&
tracer
->
read_fw_strings_work
);
cancel_work_sync
(
&
tracer
->
read_fw_strings_work
);
mlx5_fw_tracer_clean_ready_list
(
tracer
);
mlx5_fw_tracer_clean_ready_list
(
tracer
);
mlx5_fw_tracer_clean_print_hash
(
tracer
);
mlx5_fw_tracer_clean_print_hash
(
tracer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment