Skip to content

Commit

Permalink
Setup crosslink before sending link force down message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kelvin-cao committed Jan 4, 2024
1 parent 4332be8 commit 44384cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ntb_hw_switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 44384cb

Please sign in to comment.