Skip to content

Commit b34228f

Browse files
committed
Update link status when enabling link
When enabling link, the crosslink may not be properly configured or the peer switch may not be probed/initialized by the driver. Call switchtec_ntb_link_status_update() to try to configure it before sending the link up message to peer. If the peer switch is probed/initialized when enabling the link, the call to switchtec_ntb_link_status_update() will make the crosslink configured, then the link up message will be able to be sent to the peer switch. Otherwise we will need to wait for the peer driver to come up and bring up the link.
1 parent 4cb436b commit b34228f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ntb_hw_switchtec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ static int switchtec_ntb_link_enable(struct ntb_dev *ntb,
863863
dev_dbg(&sndev->stdev->dev, "enabling link\n");
864864

865865
sndev->self_shared->link_sta = 1;
866+
switchtec_ntb_link_status_update(sndev);
867+
866868
switchtec_ntb_send_msg(sndev, LINK_MESSAGE, MSG_LINK_UP);
867869

868870
return 0;

0 commit comments

Comments
 (0)