8c91c608 | 09-Apr-2024 |
Shay Drory <shayd@nvidia.com> |
net/mlx5: Register devlink first under devlink lock
[ Upstream commit c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8 ]
In case device is having a non fatal FW error during probe, the driver will report t
net/mlx5: Register devlink first under devlink lock
[ Upstream commit c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8 ]
In case device is having a non fatal FW error during probe, the driver will report the error to user via devlink. This will trigger a WARN_ON, since mlx5 is calling devlink_register() last. In order to avoid the WARN_ON[1], change mlx5 to invoke devl_register() first under devlink lock.
[1] WARNING: CPU: 5 PID: 227 at net/devlink/health.c:483 devlink_recover_notify.constprop.0+0xb8/0xc0 CPU: 5 PID: 227 Comm: kworker/u16:3 Not tainted 6.4.0-rc5_for_upstream_min_debug_2023_06_12_12_38 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5_health0000:08:00.0 mlx5_fw_reporter_err_work [mlx5_core] RIP: 0010:devlink_recover_notify.constprop.0+0xb8/0xc0 Call Trace: <TASK> ? __warn+0x79/0x120 ? devlink_recover_notify.constprop.0+0xb8/0xc0 ? report_bug+0x17c/0x190 ? handle_bug+0x3c/0x60 ? exc_invalid_op+0x14/0x70 ? asm_exc_invalid_op+0x16/0x20 ? devlink_recover_notify.constprop.0+0xb8/0xc0 devlink_health_report+0x4a/0x1c0 mlx5_fw_reporter_err_work+0xa4/0xd0 [mlx5_core] process_one_work+0x1bb/0x3c0 ? process_one_work+0x3c0/0x3c0 worker_thread+0x4d/0x3c0 ? process_one_work+0x3c0/0x3c0 kthread+0xc6/0xf0 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 </TASK>
Fixes: cf530217408e ("devlink: Notify users when objects are accessible") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/20240409190820.227554-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
36e5a0ef | 30-Jun-2023 |
Jiri Pirko <jiri@nvidia.com> |
net/mlx5: Fix error message in mlx5_sf_dev_state_change_handler()
sw_function_id contains sfnum, so fix the error message to name the value properly.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Rev
net/mlx5: Fix error message in mlx5_sf_dev_state_change_handler()
sw_function_id contains sfnum, so fix the error message to name the value properly.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
show more ...
|
b63f8bde | 30-Jun-2023 |
Jiri Pirko <jiri@nvidia.com> |
net/mlx5: Remove redundant check of mlx5_vhca_event_supported()
Since mlx5_vhca_event_supported() is called in mlx5_sf_dev_supported(), remove the redundant call.
Signed-off-by: Jiri Pirko <jiri@nv
net/mlx5: Remove redundant check of mlx5_vhca_event_supported()
Since mlx5_vhca_event_supported() is called in mlx5_sf_dev_supported(), remove the redundant call.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
show more ...
|
88074d81 | 30-Jun-2023 |
Jiri Pirko <jiri@nvidia.com> |
net/mlx5: Use mlx5_sf_start_function_id() helper instead of directly calling MLX5_CAP_GEN()
There is a helper called mlx5_sf_start_function_id() that wraps up a query to get base SF function id. Use
net/mlx5: Use mlx5_sf_start_function_id() helper instead of directly calling MLX5_CAP_GEN()
There is a helper called mlx5_sf_start_function_id() that wraps up a query to get base SF function id. Use that instead of calling MLX5_CAP_GEN() directly.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
show more ...
|
ae80d7a0 | 30-Jun-2023 |
Jiri Pirko <jiri@nvidia.com> |
net/mlx5: Remove redundant SF supported check from mlx5_sf_hw_table_init()
Since mlx5_sf_supported() check is done as a first thing in mlx5_sf_max_functions(), remove the redundant check.
Signed-of
net/mlx5: Remove redundant SF supported check from mlx5_sf_hw_table_init()
Since mlx5_sf_supported() check is done as a first thing in mlx5_sf_max_functions(), remove the redundant check.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
show more ...
|
5ff9424e | 31-May-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: bring port new reply back
In the offending fixes commit I mistakenly removed the reply message of the port new command. I was under impression it is a new port notification, partly due to t
devlink: bring port new reply back
In the offending fixes commit I mistakenly removed the reply message of the port new command. I was under impression it is a new port notification, partly due to the "notify" in the name of the helper function. Bring the code sending reply with new port message back, this time putting it directly to devlink_nl_cmd_port_new_doit()
Fixes: c496daeb8630 ("devlink: remove duplicate port notification") Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230531142025.2605001-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
9277649c | 23-May-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: pass devlink_port pointer to ops->port_del() instead of index
Historically there was a reason why port_dev() along with for example port_split() did get port_index instead of the devlink_po
devlink: pass devlink_port pointer to ops->port_del() instead of index
Historically there was a reason why port_dev() along with for example port_split() did get port_index instead of the devlink_port pointer. With the locking changes that were done which ensured devlink instance mutex is hold for every command, the port ops could get devlink_port pointer directly. Change the forgotten port_dev() op to be as others and pass devlink_port pointer instead of port_index.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|