From 9ac6b1d91b97295a633172960566070e2cd76c31 Mon Sep 17 00:00:00 2001 From: JoeyZhang-Microsemi Date: Thu, 2 Aug 2018 07:06:56 +0800 Subject: [PATCH] The link_sta is enabled by switchtec_ntb_link_enable() when loading ntb_transport module. But it will be lost when the peer sends the MSG_LINK_FORCE_DOWN. --- ntb_hw_switchtec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ntb_hw_switchtec.c b/ntb_hw_switchtec.c index d585333..f4d7252 100644 --- a/ntb_hw_switchtec.c +++ b/ntb_hw_switchtec.c @@ -502,11 +502,16 @@ static int switchtec_ntb_reinit_peer(struct switchtec_ntb *sndev); static void link_reinit_work(struct work_struct *work) { + int link_sta; struct switchtec_ntb *sndev; sndev = container_of(work, struct switchtec_ntb, link_reinit_work); + link_sta = sndev->self_shared->link_sta; + switchtec_ntb_reinit_peer(sndev); + + sndev->self_shared->link_sta = link_sta; } static void switchtec_ntb_check_link(struct switchtec_ntb *sndev,