diff --git a/ntb_hw_switchtec.c b/ntb_hw_switchtec.c index a3a8934..3de5d55 100644 --- a/ntb_hw_switchtec.c +++ b/ntb_hw_switchtec.c @@ -1492,6 +1492,9 @@ static int switchtec_ntb_reinit_peer(struct switchtec_ntb *sndev) { int rc; + if (crosslink_is_enabled(sndev)) + return 0; + dev_info(&sndev->stdev->dev, "reinitialize shared memory window\n"); rc = config_rsvd_lut_win(sndev, sndev->mmio_peer_ctrl, 0, sndev->self_partition, diff --git a/switchtec.c b/switchtec.c index b93bbc6..0935656 100644 --- a/switchtec.c +++ b/switchtec.c @@ -1184,7 +1184,8 @@ static int mask_event(struct switchtec_dev *stdev, int eid, int idx) if (!(hdr & SWITCHTEC_EVENT_OCCURRED && hdr & SWITCHTEC_EVENT_EN_IRQ)) return 0; - if (eid == SWITCHTEC_IOCTL_EVENT_LINK_STATE) + if (eid == SWITCHTEC_IOCTL_EVENT_LINK_STATE || + eid == SWITCHTEC_IOCTL_EVENT_MRPC_COMP) return 0; dev_dbg(&stdev->dev, "%s: %d %d %x\n", __func__, eid, idx, hdr); @@ -1392,7 +1393,7 @@ static int switchtec_init_pci(struct switchtec_dev *stdev, if (!use_dma_mrpc) return 0; - if(!(ioread32(&stdev->mmio_mrpc->dma_ver)? true : false)) + if (!ioread32(&stdev->mmio_mrpc->dma_ver)) return 0; stdev->dma_mrpc = dma_zalloc_coherent(&stdev->pdev->dev, sizeof(*stdev->dma_mrpc),