static int snb_link_is_up(struct intel_ntb_dev *ndev)
{
+ if (ndev->ntb.topo == NTB_TOPO_SEC)
+ return 1;
+
return NTB_LNK_STA_ACTIVE(ndev->lnk_sta);
}
static int snb_init_ntb(struct intel_ntb_dev *ndev)
{
int rc;
+ u32 ntb_ctl;
if (ndev->bar4_split)
ndev->mw_count = HSX_SPLIT_BAR_MW_COUNT;
dev_err(ndev_dev(ndev), "NTB Primary config disabled\n");
return -EINVAL;
}
+
+ /* enable link to allow secondary side device to appear */
+ ntb_ctl = ioread32(ndev->self_mmio + ndev->reg->ntb_ctl);
+ ntb_ctl &= ~NTB_CTL_DISABLE;
+ iowrite32(ntb_ctl, ndev->self_mmio + ndev->reg->ntb_ctl);
+
/* use half the spads for the peer */
ndev->spad_count >>= 1;
ndev->self_reg = &snb_pri_reg;