[PATCH] NTB: ntb_transport: Mark the transport link down on cleanup
Koichiro Den <[email protected]> Fri, 17 Jul 2026 15:12:23 +0900
| Newsgroups | dev.linux.lists.ntb,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Before the NTB hardware and transport drivers were split,
ntb_transport_link_cleanup() changed the transport link state to down on
the first cleanup and cancelled pending link work on repeated cleanup.
The conversion to struct ntb_transport_ctx retained the repeated-cleanup
branch but dropped the state transition. Once a link has come up,
nt->link_is_up consequently remains true across link-down cleanup, allowing
QP cleanup workers to retry the handshake against a peer that is down.
Restore the missing transition.
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Koichiro Den <[email protected]>
---
drivers/ntb/ntb_transport.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index f59f926d4bfa..5b9fccd1383d 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -974,6 +974,8 @@ static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt)
if (!nt->link_is_up)
cancel_delayed_work_sync(&nt->link_work);
+ else
+ nt->link_is_up = false;
for (i = 0; i < nt->mw_count; i++)
ntb_free_mw(nt, i);
--
2.51.0