Skip to contentSkip to conversation

Patch "net/mlx5: Cancel health poll before sending panic teardown command" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Nov 21, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

net/mlx5: Cancel health poll before sending panic teardown command

to the 4.13-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-cancel-health-poll-before-sending-panic-teardown-command.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Nov 21 13:07:20 CET 2017

From: Huy Nguyen <[email protected]>
Date: Tue, 26 Sep 2017 15:11:56 -0500
Subject: net/mlx5: Cancel health poll before sending panic teardown command

From: Huy Nguyen <[email protected]>

[ Upstream commit d2aa060d40fa060e963f9a356d43481e43ba3dac ]

After the panic teardown firmware command, health_care detects the error in PCI bus and calls the mlx5_pci_err_detected. This health_care flow is no longer needed because the panic teardown firmware command will bring down the PCI bus communication with the HCA.

The solution is to cancel the health care timer and its pending workqueue request before sending panic teardown firmware command.

Kernel trace:
mlx5_core 0033:01:00.0: Shutdown was called
mlx5_core 0033:01:00.0: health_care:154:(pid 9304): handling bad device here mlx5_core 0033:01:00.0: mlx5_handle_bad_state:114:(pid 9304): NIC state 1 mlx5_core 0033:01:00.0: mlx5_pci_err_detected was called mlx5_core 0033:01:00.0: mlx5_enter_error_state:96:(pid 9304): start mlx5_3:mlx5_ib_event:3061:(pid 9304): warning: event on port 0 mlx5_core 0033:01:00.0: mlx5_enter_error_state:104:(pid 9304): end

Unable to handle kernel paging request for data at address 0x0000003f

Faulting instruction address: 0xc0080000434b8c80

Fixes 8812c24d28f4 ('net/mlx5: Add fast unload support in shutdown flow')
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    7 +++++++
 1 file changed, 7 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/main.c +7 -0
@@ -1545,9 +1545,16 @@ static int mlx5_try_fast_unload(struct m
 		return -EAGAIN;
 	}
 
+	/* Panic tear down fw command will stop the PCI bus communication
+	 * with the HCA, so the health polll is no longer needed.
+	 */
+	mlx5_drain_health_wq(dev);
+	mlx5_stop_health_poll(dev);
+
 	ret = mlx5_cmd_force_teardown_hca(dev);
 	if (ret) {
 		mlx5_core_dbg(dev, "Firmware couldn't do fast unload error: %d\n", ret);
+		mlx5_start_health_poll(dev);
 		return ret;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/net-mlx5-cancel-health-poll-before-sending-panic-teardown-command.patch