From 44384cb9ad24c96ec0ca9b6b1d015a1e82beb0d3 Mon Sep 17 00:00:00 2001 From: Kelvin Cao Date: Thu, 21 Dec 2023 13:11:02 -0800 Subject: [PATCH] Setup crosslink before sending link force down message Call switchtec_ntb_setup_crosslink() to try to setup the crosslink before sending the link force down message to peer. - If the peer switch's NT link is still up and not aware of the local driver is being reloaded, the call to switchtec_ntb_setup_crosslink() will make the local crosslink properly configured and the force link down message sent to the peer switch to bring down the link. - Otherwise, the call to switchtec_ntb_setup_crosslink() would fail and link force down message not sent to the peer switch. --- ntb_hw_switchtec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ntb_hw_switchtec.c b/ntb_hw_switchtec.c index 22c4d85..396662b 100644 --- a/ntb_hw_switchtec.c +++ b/ntb_hw_switchtec.c @@ -1988,6 +1988,7 @@ static int switchtec_ntb_add(struct device *dev, * still up. Tell them to force it down (it will go back up * once we register the ntb device). */ + switchtec_ntb_setup_crosslink(sndev); switchtec_ntb_send_msg(sndev, LINK_MESSAGE, MSG_LINK_FORCE_DOWN); rc = ntb_register_device(&sndev->ntb);