Lines Matching refs:smcibdev
73 atomic_inc(&lnk->smcibdev->lnk_cnt_by_port[lnk->ibport - 1]); in smc_ibdev_cnt_inc()
78 atomic_dec(&lnk->smcibdev->lnk_cnt_by_port[lnk->ibport - 1]); in smc_ibdev_cnt_dec()
730 struct smc_ib_device *smcibdev = link->smcibdev; in smcr_copy_dev_info_to_link() local
733 smcibdev->ibdev->name); in smcr_copy_dev_info_to_link()
734 link->ndev_ifidx = smcibdev->ndev_ifidx[link->ibport - 1]; in smcr_copy_dev_info_to_link()
740 struct smc_ib_device *smcibdev; in smcr_link_init() local
745 lnk->smcibdev = ini->smcrv2.ib_dev_v2; in smcr_link_init()
748 lnk->smcibdev = ini->ib_dev; in smcr_link_init()
751 get_device(&lnk->smcibdev->ibdev->dev); in smcr_link_init()
752 atomic_inc(&lnk->smcibdev->lnk_cnt); in smcr_link_init()
755 lnk->path_mtu = lnk->smcibdev->pattr[lnk->ibport - 1].active_mtu; in smcr_link_init()
766 if (!lnk->smcibdev->initialized) { in smcr_link_init()
767 rc = (int)smc_ib_setup_per_ibdev(lnk->smcibdev); in smcr_link_init()
774 rc = smc_ib_determine_gid(lnk->smcibdev, lnk->ibport, in smcr_link_init()
808 put_device(&lnk->smcibdev->ibdev->dev); in smcr_link_init()
809 smcibdev = lnk->smcibdev; in smcr_link_init()
812 if (!atomic_dec_return(&smcibdev->lnk_cnt)) in smcr_link_init()
813 wake_up(&smcibdev->lnks_deleted); in smcr_link_init()
911 lgr->net = smc_ib_net(lnk->smcibdev); in smc_lgr_create()
1033 if (is_dev_err && from_lnk->smcibdev == lgr->lnk[i].smcibdev && in smc_switch_conns()
1249 struct smc_ib_device *smcibdev; in __smcr_link_clear() local
1253 put_device(&lnk->smcibdev->ibdev->dev); in __smcr_link_clear()
1254 smcibdev = lnk->smcibdev; in __smcr_link_clear()
1257 if (!atomic_dec_return(&smcibdev->lnk_cnt)) in __smcr_link_clear()
1258 wake_up(&smcibdev->lnks_deleted); in __smcr_link_clear()
1554 void smc_smcr_terminate_all(struct smc_ib_device *smcibdev) in smc_smcr_terminate_all() argument
1561 if (!smcibdev) { in smc_smcr_terminate_all()
1568 if (lgr->lnk[i].smcibdev == smcibdev) in smc_smcr_terminate_all()
1581 if (smcibdev) { in smc_smcr_terminate_all()
1582 if (atomic_read(&smcibdev->lnk_cnt)) in smc_smcr_terminate_all()
1583 wait_event(smcibdev->lnks_deleted, in smc_smcr_terminate_all()
1584 !atomic_read(&smcibdev->lnk_cnt)); in smc_smcr_terminate_all()
1648 void smcr_port_add(struct smc_ib_device *smcibdev, u8 ibport) in smcr_port_add() argument
1655 if (strncmp(smcibdev->pnetid[ibport - 1], lgr->pnet_id, in smcr_port_add()
1659 !rdma_dev_access_netns(smcibdev->ibdev, lgr->net)) in smcr_port_add()
1730 void smcr_port_err(struct smc_ib_device *smcibdev, u8 ibport) in smcr_port_err() argument
1736 if (strncmp(smcibdev->pnetid[ibport - 1], lgr->pnet_id, in smcr_port_err()
1745 lnk->smcibdev == smcibdev && lnk->ibport == ibport) in smcr_port_err()
1833 if (!rdma_dev_access_netns(lnk->smcibdev->ibdev, net)) in smcr_lgr_match()
2559 struct smc_ib_device *smcibdev; in smc_core_going_away() local
2563 list_for_each_entry(smcibdev, &smc_ib_devices.list, list) { in smc_core_going_away()
2567 set_bit(i, smcibdev->ports_going_away); in smc_core_going_away()