Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d04be142 authored by Logan Gunthorpe's avatar Logan Gunthorpe Committed by Jon Mason
Browse files

ntb_hw_switchtec: Force down the link before initializing



If one host crashes and soft reboots, the other host may not see a
link down event. Then when the crashed host comes back up, the
surviving host may not know the link was reset and the NTB clients
may not work without being reset.

To solve this, we send a LINK_FORCE_DOWN message to each peer every
time we come up, before we register the NTB device. If a surviving
host still thinks the link is up it will take it down immediately.
In this way, once the crashed host comes up fully, it will send a
regular link up event as per usual and the link will be properly
restarted.

While we are in the area, this also fixes the MSG_LINK_UP message that
was in the link down function that was reported by Doug Meyers.

Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Reported-by: default avatarThanhTuThai <cruisethai@gmail.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 270d32e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment