Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions ntb_hw_switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,16 +524,10 @@ 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,
Expand Down Expand Up @@ -1483,10 +1477,13 @@ static void switchtec_ntb_deinit_db_msg_irq(struct switchtec_ntb *sndev)

static int switchtec_ntb_reinit_peer(struct switchtec_ntb *sndev)
{
dev_info(&sndev->stdev->dev, "peer reinitialized\n");
switchtec_ntb_deinit_shared_mw(sndev);
switchtec_ntb_init_mw(sndev);
return switchtec_ntb_init_shared_mw(sndev);
int rc;

dev_info(&sndev->stdev->dev, "reinitialize shared memory window\n");
rc = config_rsvd_lut_win(sndev, sndev->mmio_peer_ctrl, 0,
sndev->self_partition,
sndev->self_shared_dma);
return rc;
}

static int switchtec_ntb_add(struct device *dev,
Expand Down