lnk               202 arch/mips/pci/pci-xlr.c 	struct pci_dev *lnk;
lnk               208 arch/mips/pci/pci-xlr.c 	lnk = xls_get_pcie_link(dev);
lnk               209 arch/mips/pci/pci-xlr.c 	if (lnk == NULL)
lnk               212 arch/mips/pci/pci-xlr.c 	link = PCI_SLOT(lnk->devfn);
lnk               224 arch/mips/pci/pci-xlr.c 	struct pci_dev *lnk;
lnk               236 arch/mips/pci/pci-xlr.c 	lnk = xls_get_pcie_link(dev);
lnk               237 arch/mips/pci/pci-xlr.c 	if (lnk == NULL)
lnk               240 arch/mips/pci/pci-xlr.c 	pci_read_config_word(lnk, 0x50 + PCI_MSI_FLAGS, &val);
lnk               243 arch/mips/pci/pci-xlr.c 		pci_write_config_word(lnk, 0x50 + PCI_MSI_FLAGS, val);
lnk                70 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c 	int lnk[2], sor[2], m, s;
lnk                75 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c 			lnk[s] = (data & 0x00000010) >> 4;
lnk                79 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c 			*link |= lnk[s];
lnk                84 drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c 		if (sor[0] != sor[1] || WARN_ON(lnk[0] || !lnk[1]))
lnk              3202 drivers/net/ethernet/myricom/myri10ge/myri10ge.c 		u16 lnk;
lnk              3204 drivers/net/ethernet/myricom/myri10ge/myri10ge.c 		pcie_capability_read_word(mgp->pdev, PCI_EXP_LNKSTA, &lnk);
lnk              3205 drivers/net/ethernet/myricom/myri10ge/myri10ge.c 		link_width = (lnk >> 4) & 0x3f;
lnk               756 drivers/net/ethernet/neterion/vxge/vxge-config.c 	u16 lnk;
lnk               759 drivers/net/ethernet/neterion/vxge/vxge-config.c 	pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnk);
lnk               761 drivers/net/ethernet/neterion/vxge/vxge-config.c 	if ((lnk & PCI_EXP_LNKSTA_CLS) != 1)
lnk               764 drivers/net/ethernet/neterion/vxge/vxge-config.c 	switch ((lnk & PCI_EXP_LNKSTA_NLW) >> 4) {
lnk              1976 drivers/net/ethernet/neterion/vxge/vxge-config.c 	u16 lnk;
lnk              1978 drivers/net/ethernet/neterion/vxge/vxge-config.c 	pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnk);
lnk              1979 drivers/net/ethernet/neterion/vxge/vxge-config.c 	return (lnk & VXGE_HW_PCI_EXP_LNKCAP_LNK_WIDTH) >> 4;
lnk              1654 drivers/net/wireless/ti/wl12xx/main.c 				 struct wl1271_link *lnk)
lnk              1663 drivers/net/wireless/ti/wl12xx/main.c 	return lnk->allocated_pkts < thold;
lnk              1667 drivers/net/wireless/ti/wl12xx/main.c 				struct wl1271_link *lnk)
lnk              1649 drivers/net/wireless/ti/wl18xx/main.c 				 struct wl1271_link *lnk)
lnk              1672 drivers/net/wireless/ti/wl18xx/main.c 	return lnk->allocated_pkts < thold;
lnk              1676 drivers/net/wireless/ti/wl18xx/main.c 				struct wl1271_link *lnk)
lnk              1696 drivers/net/wireless/ti/wl18xx/main.c 	return lnk->allocated_pkts < thold;
lnk               137 drivers/net/wireless/ti/wlcore/event.c 		struct wl1271_link *lnk;
lnk               140 drivers/net/wireless/ti/wlcore/event.c 			lnk = &wl->links[hlid];
lnk               141 drivers/net/wireless/ti/wlcore/event.c 			if (!lnk->ba_bitmap)
lnk               145 drivers/net/wireless/ti/wlcore/event.c 						     lnk->ba_bitmap,
lnk               146 drivers/net/wireless/ti/wlcore/event.c 						     lnk->addr);
lnk               255 drivers/net/wireless/ti/wlcore/hw_ops.h 			struct wl1271_link *lnk)
lnk               260 drivers/net/wireless/ti/wlcore/hw_ops.h 	return wl->ops->lnk_high_prio(wl, hlid, lnk);
lnk               265 drivers/net/wireless/ti/wlcore/hw_ops.h 		       struct wl1271_link *lnk)
lnk               270 drivers/net/wireless/ti/wlcore/hw_ops.h 	return wl->ops->lnk_low_prio(wl, hlid, lnk);
lnk               394 drivers/net/wireless/ti/wlcore/main.c 	struct wl1271_link *lnk;
lnk               423 drivers/net/wireless/ti/wlcore/main.c 		lnk = &wl->links[i];
lnk               427 drivers/net/wireless/ti/wlcore/main.c 		       lnk->prev_freed_pkts) & 0xff;
lnk               432 drivers/net/wireless/ti/wlcore/main.c 		lnk->allocated_pkts -= diff;
lnk               433 drivers/net/wireless/ti/wlcore/main.c 		lnk->prev_freed_pkts = status->counters.tx_lnk_free_pkts[i];
lnk               436 drivers/net/wireless/ti/wlcore/main.c 		lnk->total_freed_pkts += diff;
lnk                84 drivers/net/wireless/ti/wlcore/ps.c 	struct wl1271_link *lnk = &wl->links[hlid];
lnk                89 drivers/net/wireless/ti/wlcore/ps.c 		while ((skb = skb_dequeue(&lnk->tx_queue[i]))) {
lnk               105 drivers/net/wireless/ti/wlcore/ps.c 		if (lnk->wlvif)
lnk               106 drivers/net/wireless/ti/wlcore/ps.c 			lnk->wlvif->tx_queue_count[i] -= filtered[i];
lnk               508 drivers/net/wireless/ti/wlcore/tx.c 					  struct wl1271_link *lnk, u8 q)
lnk               513 drivers/net/wireless/ti/wlcore/tx.c 	skb = skb_dequeue(&lnk->tx_queue[q]);
lnk               518 drivers/net/wireless/ti/wlcore/tx.c 		if (lnk->wlvif) {
lnk               519 drivers/net/wireless/ti/wlcore/tx.c 			WARN_ON_ONCE(lnk->wlvif->tx_queue_count[q] <= 0);
lnk               520 drivers/net/wireless/ti/wlcore/tx.c 			lnk->wlvif->tx_queue_count[q]--;
lnk               532 drivers/net/wireless/ti/wlcore/tx.c 	struct wl1271_link *lnk = &wl->links[hlid];
lnk               534 drivers/net/wireless/ti/wlcore/tx.c 	if (!wlcore_hw_lnk_high_prio(wl, hlid, lnk)) {
lnk               536 drivers/net/wireless/ti/wlcore/tx.c 		    !skb_queue_empty(&lnk->tx_queue[ac]) &&
lnk               537 drivers/net/wireless/ti/wlcore/tx.c 		    wlcore_hw_lnk_low_prio(wl, hlid, lnk))
lnk               544 drivers/net/wireless/ti/wlcore/tx.c 	return wlcore_lnk_dequeue(wl, lnk, ac);
lnk               642 drivers/net/wireless/ti/wlcore/tx.c 		struct wl1271_link *lnk = &wl->links[low_prio_hlid];
lnk               643 drivers/net/wireless/ti/wlcore/tx.c 		skb = wlcore_lnk_dequeue(wl, lnk, ac);
lnk               649 drivers/net/wireless/ti/wlcore/tx.c 		wl->last_wlvif = lnk->wlvif;
lnk               650 drivers/net/wireless/ti/wlcore/tx.c 		if (lnk->wlvif)
lnk               651 drivers/net/wireless/ti/wlcore/tx.c 			lnk->wlvif->last_tx_hlid = low_prio_hlid;
lnk              1025 drivers/net/wireless/ti/wlcore/tx.c 	struct wl1271_link *lnk = &wl->links[hlid];
lnk              1029 drivers/net/wireless/ti/wlcore/tx.c 		while ((skb = skb_dequeue(&lnk->tx_queue[i]))) {
lnk              1046 drivers/net/wireless/ti/wlcore/tx.c 		if (lnk->wlvif)
lnk              1047 drivers/net/wireless/ti/wlcore/tx.c 			lnk->wlvif->tx_queue_count[i] -= total[i];
lnk               105 drivers/net/wireless/ti/wlcore/wlcore.h 			      struct wl1271_link *lnk);
lnk               107 drivers/net/wireless/ti/wlcore/wlcore.h 			     struct wl1271_link *lnk);
lnk              2515 drivers/scsi/qla2xxx/qla_nx.c 	uint16_t      lnk;
lnk              2545 drivers/scsi/qla2xxx/qla_nx.c 	pcie_capability_read_word(ha->pdev, PCI_EXP_LNKSTA, &lnk);
lnk              2546 drivers/scsi/qla2xxx/qla_nx.c 	ha->link_width = (lnk >> 4) & 0x3f;
lnk              1752 drivers/scsi/qla4xxx/ql4_nx.c 	uint16_t lnk;
lnk              1775 drivers/scsi/qla4xxx/ql4_nx.c 	pcie_capability_read_word(ha->pdev, PCI_EXP_LNKSTA, &lnk);
lnk              1776 drivers/scsi/qla4xxx/ql4_nx.c 	ha->link_width = (lnk >> 4) & 0x3f;
lnk               754 fs/btrfs/send.c 		     struct fs_path *path, struct fs_path *lnk)
lnk               759 fs/btrfs/send.c 	btrfs_debug(fs_info, "send_link %s -> %s", path->start, lnk->start);
lnk               766 fs/btrfs/send.c 	TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, lnk);
lnk               136 fs/erofs/inode.c 	char *lnk;
lnk               145 fs/erofs/inode.c 	lnk = kmalloc(inode->i_size + 1, GFP_KERNEL);
lnk               146 fs/erofs/inode.c 	if (!lnk)
lnk               152 fs/erofs/inode.c 		kfree(lnk);
lnk               160 fs/erofs/inode.c 	memcpy(lnk, data + m_pofs, inode->i_size);
lnk               161 fs/erofs/inode.c 	lnk[inode->i_size] = '\0';
lnk               163 fs/erofs/inode.c 	inode->i_link = lnk;
lnk                99 fs/qnx4/namei.c 	struct qnx4_link_info *lnk;
lnk               109 fs/qnx4/namei.c 		lnk = (struct qnx4_link_info *) de;
lnk               110 fs/qnx4/namei.c 		ino = (le32_to_cpu(lnk->dl_inode_blk) - 1) *
lnk               112 fs/qnx4/namei.c 		    lnk->dl_inode_ndx;
lnk                95 include/uapi/linux/smc_diag.h 	struct smc_diag_linkinfo	lnk[1];
lnk               221 net/ipv6/mcast.c 	struct ipv6_mc_socklist __rcu **lnk;
lnk               229 net/ipv6/mcast.c 	for (lnk = &np->ipv6_mc_list;
lnk               230 net/ipv6/mcast.c 	     (mc_lst = rtnl_dereference(*lnk)) != NULL;
lnk               231 net/ipv6/mcast.c 	      lnk = &mc_lst->next) {
lnk               236 net/ipv6/mcast.c 			*lnk = mc_lst->next;
lnk               367 net/smc/af_smc.c 	link = &lgr->lnk[SMC_SINGLE_LINK];
lnk               607 net/smc/af_smc.c 	link = &smc->conn.lgr->lnk[SMC_SINGLE_LINK];
lnk              1002 net/smc/af_smc.c 	link = &lgr->lnk[SMC_SINGLE_LINK];
lnk              1187 net/smc/af_smc.c 	struct smc_link *link = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK];
lnk              1203 net/smc/af_smc.c 	struct smc_link *link = &new_smc->conn.lgr->lnk[SMC_SINGLE_LINK];
lnk                60 net/smc/smc_cdc.c 	struct smc_link *link = &conn->lgr->lnk[SMC_SINGLE_LINK];
lnk                98 net/smc/smc_cdc.c 	link = &conn->lgr->lnk[SMC_SINGLE_LINK];
lnk               165 net/smc/smc_cdc.c 	struct smc_link *link = &conn->lgr->lnk[SMC_SINGLE_LINK];
lnk               498 net/smc/smc_clc.c 		link = &conn->lgr->lnk[SMC_SINGLE_LINK];
lnk               574 net/smc/smc_clc.c 		link = &conn->lgr->lnk[SMC_SINGLE_LINK];
lnk               143 net/smc/smc_core.c static int smc_link_send_delete(struct smc_link *lnk)
lnk               145 net/smc/smc_core.c 	if (lnk->state == SMC_LNK_ACTIVE &&
lnk               146 net/smc/smc_core.c 	    !smc_llc_send_delete_link(lnk, SMC_LLC_REQ, true)) {
lnk               147 net/smc/smc_core.c 		smc_llc_link_deleting(lnk);
lnk               175 net/smc/smc_core.c 		struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk               178 net/smc/smc_core.c 		if (lnk->state == SMC_LNK_ACTIVE &&
lnk               179 net/smc/smc_core.c 		    !smc_link_send_delete(lnk)) {
lnk               187 net/smc/smc_core.c 		struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk               189 net/smc/smc_core.c 		if (!lgr->is_smcd && lnk->state != SMC_LNK_INACTIVE)
lnk               190 net/smc/smc_core.c 			smc_llc_link_inactive(lnk);
lnk               201 net/smc/smc_core.c 	struct smc_link *lnk;
lnk               244 net/smc/smc_core.c 		lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk               246 net/smc/smc_core.c 		lnk->state = SMC_LNK_ACTIVATING;
lnk               247 net/smc/smc_core.c 		lnk->link_id = SMC_SINGLE_LINK;
lnk               248 net/smc/smc_core.c 		lnk->smcibdev = ini->ib_dev;
lnk               249 net/smc/smc_core.c 		lnk->ibport = ini->ib_port;
lnk               250 net/smc/smc_core.c 		lnk->path_mtu =
lnk               255 net/smc/smc_core.c 		lnk->psn_initial = rndvec[0] + (rndvec[1] << 8) +
lnk               257 net/smc/smc_core.c 		rc = smc_ib_determine_gid(lnk->smcibdev, lnk->ibport,
lnk               258 net/smc/smc_core.c 					  ini->vlan_id, lnk->gid,
lnk               259 net/smc/smc_core.c 					  &lnk->sgid_index);
lnk               262 net/smc/smc_core.c 		rc = smc_llc_link_init(lnk);
lnk               265 net/smc/smc_core.c 		rc = smc_wr_alloc_link_mem(lnk);
lnk               268 net/smc/smc_core.c 		rc = smc_ib_create_protection_domain(lnk);
lnk               271 net/smc/smc_core.c 		rc = smc_ib_create_queue_pair(lnk);
lnk               274 net/smc/smc_core.c 		rc = smc_wr_create_link(lnk);
lnk               285 net/smc/smc_core.c 	smc_ib_destroy_queue_pair(lnk);
lnk               287 net/smc/smc_core.c 	smc_ib_dealloc_protection_domain(lnk);
lnk               289 net/smc/smc_core.c 	smc_wr_free_link_mem(lnk);
lnk               291 net/smc/smc_core.c 	smc_llc_link_clear(lnk);
lnk               317 net/smc/smc_core.c 						&lgr->lnk[SMC_SINGLE_LINK],
lnk               353 net/smc/smc_core.c static void smc_link_clear(struct smc_link *lnk)
lnk               355 net/smc/smc_core.c 	lnk->peer_qpn = 0;
lnk               356 net/smc/smc_core.c 	smc_llc_link_clear(lnk);
lnk               357 net/smc/smc_core.c 	smc_ib_modify_qp_reset(lnk);
lnk               358 net/smc/smc_core.c 	smc_wr_free_link(lnk);
lnk               359 net/smc/smc_core.c 	smc_ib_destroy_queue_pair(lnk);
lnk               360 net/smc/smc_core.c 	smc_ib_dealloc_protection_domain(lnk);
lnk               361 net/smc/smc_core.c 	smc_wr_free_link_mem(lnk);
lnk               367 net/smc/smc_core.c 	struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk               373 net/smc/smc_core.c 		smc_ib_buf_unmap_sg(lnk->smcibdev, buf_desc,
lnk               376 net/smc/smc_core.c 		smc_ib_buf_unmap_sg(lnk->smcibdev, buf_desc,
lnk               442 net/smc/smc_core.c 		smc_link_clear(&lgr->lnk[SMC_SINGLE_LINK]);
lnk               443 net/smc/smc_core.c 		put_device(&lgr->lnk[SMC_SINGLE_LINK].smcibdev->ibdev->dev);
lnk               470 net/smc/smc_core.c 		smc_llc_link_inactive(&lgr->lnk[SMC_SINGLE_LINK]);
lnk               489 net/smc/smc_core.c 		wake_up(&lgr->lnk[SMC_SINGLE_LINK].wr_reg_wait);
lnk               508 net/smc/smc_core.c 		    lgr->lnk[SMC_SINGLE_LINK].smcibdev == smcibdev &&
lnk               509 net/smc/smc_core.c 		    lgr->lnk[SMC_SINGLE_LINK].ibport == ibport)
lnk               596 net/smc/smc_core.c 		!memcmp(lgr->lnk[SMC_SINGLE_LINK].peer_gid, &lcl->gid,
lnk               598 net/smc/smc_core.c 		!memcmp(lgr->lnk[SMC_SINGLE_LINK].peer_mac, lcl->mac,
lnk               602 net/smc/smc_core.c 		 lgr->lnk[SMC_SINGLE_LINK].peer_qpn == clcqpn);
lnk               743 net/smc/smc_core.c 	struct smc_link *lnk;
lnk               763 net/smc/smc_core.c 	lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk               774 net/smc/smc_core.c 	rc = smc_ib_buf_map_sg(lnk->smcibdev, buf_desc,
lnk               784 net/smc/smc_core.c 		rc = smc_ib_get_memory_region(lnk->roce_pd,
lnk               916 net/smc/smc_core.c 	smc_ib_sync_sg_for_cpu(lgr->lnk[SMC_SINGLE_LINK].smcibdev,
lnk               926 net/smc/smc_core.c 	smc_ib_sync_sg_for_device(lgr->lnk[SMC_SINGLE_LINK].smcibdev,
lnk               936 net/smc/smc_core.c 	smc_ib_sync_sg_for_cpu(lgr->lnk[SMC_SINGLE_LINK].smcibdev,
lnk               946 net/smc/smc_core.c 	smc_ib_sync_sg_for_device(lgr->lnk[SMC_SINGLE_LINK].smcibdev,
lnk              1048 net/smc/smc_core.c 			struct smc_link *lnk = &lgr->lnk[SMC_SINGLE_LINK];
lnk              1050 net/smc/smc_core.c 			if (lnk->state == SMC_LNK_ACTIVE)
lnk              1051 net/smc/smc_core.c 				smc_llc_send_delete_link(lnk, SMC_LLC_REQ,
lnk              1053 net/smc/smc_core.c 			smc_llc_link_inactive(lnk);
lnk               213 net/smc/smc_core.h 			struct smc_link		lnk[SMC_LINKS_PER_LGR_MAX];
lnk               312 net/smc/smc_core.h 	return container_of(link, struct smc_link_group, lnk[SMC_SINGLE_LINK]);
lnk               154 net/smc/smc_diag.c 			.lnk[0].ibport = smc->conn.lgr->lnk[0].ibport,
lnk               155 net/smc/smc_diag.c 			.lnk[0].link_id = smc->conn.lgr->lnk[0].link_id,
lnk               158 net/smc/smc_diag.c 		memcpy(linfo.lnk[0].ibname,
lnk               159 net/smc/smc_diag.c 		       smc->conn.lgr->lnk[0].smcibdev->ibdev->name,
lnk               160 net/smc/smc_diag.c 		       sizeof(smc->conn.lgr->lnk[0].smcibdev->ibdev->name));
lnk               161 net/smc/smc_diag.c 		smc_gid_be16_convert(linfo.lnk[0].gid,
lnk               162 net/smc/smc_diag.c 				     smc->conn.lgr->lnk[0].gid);
lnk               163 net/smc/smc_diag.c 		smc_gid_be16_convert(linfo.lnk[0].peer_gid,
lnk               164 net/smc/smc_diag.c 				     smc->conn.lgr->lnk[0].peer_gid);
lnk                45 net/smc/smc_ib.c static int smc_ib_modify_qp_init(struct smc_link *lnk)
lnk                52 net/smc/smc_ib.c 	qp_attr.port_num = lnk->ibport;
lnk                55 net/smc/smc_ib.c 	return ib_modify_qp(lnk->roce_qp, &qp_attr,
lnk                60 net/smc/smc_ib.c static int smc_ib_modify_qp_rtr(struct smc_link *lnk)
lnk                69 net/smc/smc_ib.c 	qp_attr.path_mtu = min(lnk->path_mtu, lnk->peer_mtu);
lnk                71 net/smc/smc_ib.c 	rdma_ah_set_port_num(&qp_attr.ah_attr, lnk->ibport);
lnk                72 net/smc/smc_ib.c 	rdma_ah_set_grh(&qp_attr.ah_attr, NULL, 0, lnk->sgid_index, 1, 0);
lnk                73 net/smc/smc_ib.c 	rdma_ah_set_dgid_raw(&qp_attr.ah_attr, lnk->peer_gid);
lnk                74 net/smc/smc_ib.c 	memcpy(&qp_attr.ah_attr.roce.dmac, lnk->peer_mac,
lnk                75 net/smc/smc_ib.c 	       sizeof(lnk->peer_mac));
lnk                76 net/smc/smc_ib.c 	qp_attr.dest_qp_num = lnk->peer_qpn;
lnk                77 net/smc/smc_ib.c 	qp_attr.rq_psn = lnk->peer_psn; /* starting receive packet seq # */
lnk                83 net/smc/smc_ib.c 	return ib_modify_qp(lnk->roce_qp, &qp_attr, qp_attr_mask);
lnk                86 net/smc/smc_ib.c int smc_ib_modify_qp_rts(struct smc_link *lnk)
lnk                95 net/smc/smc_ib.c 	qp_attr.sq_psn = lnk->psn_initial;	/* starting send packet seq # */
lnk                99 net/smc/smc_ib.c 	return ib_modify_qp(lnk->roce_qp, &qp_attr,
lnk               105 net/smc/smc_ib.c int smc_ib_modify_qp_reset(struct smc_link *lnk)
lnk               111 net/smc/smc_ib.c 	return ib_modify_qp(lnk->roce_qp, &qp_attr, IB_QP_STATE);
lnk               114 net/smc/smc_ib.c int smc_ib_ready_link(struct smc_link *lnk)
lnk               116 net/smc/smc_ib.c 	struct smc_link_group *lgr = smc_get_lgr(lnk);
lnk               119 net/smc/smc_ib.c 	rc = smc_ib_modify_qp_init(lnk);
lnk               123 net/smc/smc_ib.c 	rc = smc_ib_modify_qp_rtr(lnk);
lnk               126 net/smc/smc_ib.c 	smc_wr_remember_qp_attr(lnk);
lnk               127 net/smc/smc_ib.c 	rc = ib_req_notify_cq(lnk->smcibdev->roce_cq_recv,
lnk               131 net/smc/smc_ib.c 	rc = smc_wr_rx_post_init(lnk);
lnk               134 net/smc/smc_ib.c 	smc_wr_remember_qp_attr(lnk);
lnk               137 net/smc/smc_ib.c 		rc = smc_ib_modify_qp_rts(lnk);
lnk               140 net/smc/smc_ib.c 		smc_wr_remember_qp_attr(lnk);
lnk               280 net/smc/smc_ib.c void smc_ib_dealloc_protection_domain(struct smc_link *lnk)
lnk               282 net/smc/smc_ib.c 	if (lnk->roce_pd)
lnk               283 net/smc/smc_ib.c 		ib_dealloc_pd(lnk->roce_pd);
lnk               284 net/smc/smc_ib.c 	lnk->roce_pd = NULL;
lnk               287 net/smc/smc_ib.c int smc_ib_create_protection_domain(struct smc_link *lnk)
lnk               291 net/smc/smc_ib.c 	lnk->roce_pd = ib_alloc_pd(lnk->smcibdev->ibdev, 0);
lnk               292 net/smc/smc_ib.c 	rc = PTR_ERR_OR_ZERO(lnk->roce_pd);
lnk               293 net/smc/smc_ib.c 	if (IS_ERR(lnk->roce_pd))
lnk               294 net/smc/smc_ib.c 		lnk->roce_pd = NULL;
lnk               300 net/smc/smc_ib.c 	struct smc_link *lnk = (struct smc_link *)priv;
lnk               301 net/smc/smc_ib.c 	struct smc_ib_device *smcibdev = lnk->smcibdev;
lnk               318 net/smc/smc_ib.c void smc_ib_destroy_queue_pair(struct smc_link *lnk)
lnk               320 net/smc/smc_ib.c 	if (lnk->roce_qp)
lnk               321 net/smc/smc_ib.c 		ib_destroy_qp(lnk->roce_qp);
lnk               322 net/smc/smc_ib.c 	lnk->roce_qp = NULL;
lnk               326 net/smc/smc_ib.c int smc_ib_create_queue_pair(struct smc_link *lnk)
lnk               330 net/smc/smc_ib.c 		.qp_context = lnk,
lnk               331 net/smc/smc_ib.c 		.send_cq = lnk->smcibdev->roce_cq_send,
lnk               332 net/smc/smc_ib.c 		.recv_cq = lnk->smcibdev->roce_cq_recv,
lnk               348 net/smc/smc_ib.c 	lnk->roce_qp = ib_create_qp(lnk->roce_pd, &qp_attr);
lnk               349 net/smc/smc_ib.c 	rc = PTR_ERR_OR_ZERO(lnk->roce_qp);
lnk               350 net/smc/smc_ib.c 	if (IS_ERR(lnk->roce_qp))
lnk               351 net/smc/smc_ib.c 		lnk->roce_qp = NULL;
lnk               353 net/smc/smc_ib.c 		smc_wr_remember_qp_attr(lnk);
lnk                64 net/smc/smc_ib.h void smc_ib_dealloc_protection_domain(struct smc_link *lnk);
lnk                65 net/smc/smc_ib.h int smc_ib_create_protection_domain(struct smc_link *lnk);
lnk                66 net/smc/smc_ib.h void smc_ib_destroy_queue_pair(struct smc_link *lnk);
lnk                67 net/smc/smc_ib.h int smc_ib_create_queue_pair(struct smc_link *lnk);
lnk                68 net/smc/smc_ib.h int smc_ib_ready_link(struct smc_link *lnk);
lnk                69 net/smc/smc_ib.h int smc_ib_modify_qp_rts(struct smc_link *lnk);
lnk                70 net/smc/smc_ib.h int smc_ib_modify_qp_reset(struct smc_link *lnk);
lnk                39 net/smc/smc_llc.h int smc_llc_send_confirm_link(struct smc_link *lnk,
lnk               274 net/smc/smc_tx.c 	link = &lgr->lnk[SMC_SINGLE_LINK];
lnk               510 net/smc/smc_tx.c 			smc_wr_tx_put_slot(&conn->lgr->lnk[SMC_SINGLE_LINK],
lnk               430 net/smc/smc_wr.c void smc_wr_remember_qp_attr(struct smc_link *lnk)
lnk               432 net/smc/smc_wr.c 	struct ib_qp_attr *attr = &lnk->qp_attr;
lnk               437 net/smc/smc_wr.c 	ib_query_qp(lnk->roce_qp, attr,
lnk               457 net/smc/smc_wr.c 	lnk->wr_tx_cnt = min_t(size_t, SMC_WR_BUF_CNT,
lnk               458 net/smc/smc_wr.c 			       lnk->qp_attr.cap.max_send_wr);
lnk               459 net/smc/smc_wr.c 	lnk->wr_rx_cnt = min_t(size_t, SMC_WR_BUF_CNT * 3,
lnk               460 net/smc/smc_wr.c 			       lnk->qp_attr.cap.max_recv_wr);
lnk               463 net/smc/smc_wr.c static void smc_wr_init_sge(struct smc_link *lnk)
lnk               467 net/smc/smc_wr.c 	for (i = 0; i < lnk->wr_tx_cnt; i++) {
lnk               468 net/smc/smc_wr.c 		lnk->wr_tx_sges[i].addr =
lnk               469 net/smc/smc_wr.c 			lnk->wr_tx_dma_addr + i * SMC_WR_BUF_SIZE;
lnk               470 net/smc/smc_wr.c 		lnk->wr_tx_sges[i].length = SMC_WR_TX_SIZE;
lnk               471 net/smc/smc_wr.c 		lnk->wr_tx_sges[i].lkey = lnk->roce_pd->local_dma_lkey;
lnk               472 net/smc/smc_wr.c 		lnk->wr_tx_rdma_sges[i].tx_rdma_sge[0].wr_tx_rdma_sge[0].lkey =
lnk               473 net/smc/smc_wr.c 			lnk->roce_pd->local_dma_lkey;
lnk               474 net/smc/smc_wr.c 		lnk->wr_tx_rdma_sges[i].tx_rdma_sge[0].wr_tx_rdma_sge[1].lkey =
lnk               475 net/smc/smc_wr.c 			lnk->roce_pd->local_dma_lkey;
lnk               476 net/smc/smc_wr.c 		lnk->wr_tx_rdma_sges[i].tx_rdma_sge[1].wr_tx_rdma_sge[0].lkey =
lnk               477 net/smc/smc_wr.c 			lnk->roce_pd->local_dma_lkey;
lnk               478 net/smc/smc_wr.c 		lnk->wr_tx_rdma_sges[i].tx_rdma_sge[1].wr_tx_rdma_sge[1].lkey =
lnk               479 net/smc/smc_wr.c 			lnk->roce_pd->local_dma_lkey;
lnk               480 net/smc/smc_wr.c 		lnk->wr_tx_ibs[i].next = NULL;
lnk               481 net/smc/smc_wr.c 		lnk->wr_tx_ibs[i].sg_list = &lnk->wr_tx_sges[i];
lnk               482 net/smc/smc_wr.c 		lnk->wr_tx_ibs[i].num_sge = 1;
lnk               483 net/smc/smc_wr.c 		lnk->wr_tx_ibs[i].opcode = IB_WR_SEND;
lnk               484 net/smc/smc_wr.c 		lnk->wr_tx_ibs[i].send_flags =
lnk               486 net/smc/smc_wr.c 		lnk->wr_tx_rdmas[i].wr_tx_rdma[0].wr.opcode = IB_WR_RDMA_WRITE;
lnk               487 net/smc/smc_wr.c 		lnk->wr_tx_rdmas[i].wr_tx_rdma[1].wr.opcode = IB_WR_RDMA_WRITE;
lnk               488 net/smc/smc_wr.c 		lnk->wr_tx_rdmas[i].wr_tx_rdma[0].wr.sg_list =
lnk               489 net/smc/smc_wr.c 			lnk->wr_tx_rdma_sges[i].tx_rdma_sge[0].wr_tx_rdma_sge;
lnk               490 net/smc/smc_wr.c 		lnk->wr_tx_rdmas[i].wr_tx_rdma[1].wr.sg_list =
lnk               491 net/smc/smc_wr.c 			lnk->wr_tx_rdma_sges[i].tx_rdma_sge[1].wr_tx_rdma_sge;
lnk               493 net/smc/smc_wr.c 	for (i = 0; i < lnk->wr_rx_cnt; i++) {
lnk               494 net/smc/smc_wr.c 		lnk->wr_rx_sges[i].addr =
lnk               495 net/smc/smc_wr.c 			lnk->wr_rx_dma_addr + i * SMC_WR_BUF_SIZE;
lnk               496 net/smc/smc_wr.c 		lnk->wr_rx_sges[i].length = SMC_WR_BUF_SIZE;
lnk               497 net/smc/smc_wr.c 		lnk->wr_rx_sges[i].lkey = lnk->roce_pd->local_dma_lkey;
lnk               498 net/smc/smc_wr.c 		lnk->wr_rx_ibs[i].next = NULL;
lnk               499 net/smc/smc_wr.c 		lnk->wr_rx_ibs[i].sg_list = &lnk->wr_rx_sges[i];
lnk               500 net/smc/smc_wr.c 		lnk->wr_rx_ibs[i].num_sge = 1;
lnk               502 net/smc/smc_wr.c 	lnk->wr_reg.wr.next = NULL;
lnk               503 net/smc/smc_wr.c 	lnk->wr_reg.wr.num_sge = 0;
lnk               504 net/smc/smc_wr.c 	lnk->wr_reg.wr.send_flags = IB_SEND_SIGNALED;
lnk               505 net/smc/smc_wr.c 	lnk->wr_reg.wr.opcode = IB_WR_REG_MR;
lnk               506 net/smc/smc_wr.c 	lnk->wr_reg.access = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE;
lnk               509 net/smc/smc_wr.c void smc_wr_free_link(struct smc_link *lnk)
lnk               513 net/smc/smc_wr.c 	memset(lnk->wr_tx_mask, 0,
lnk               514 net/smc/smc_wr.c 	       BITS_TO_LONGS(SMC_WR_BUF_CNT) * sizeof(*lnk->wr_tx_mask));
lnk               516 net/smc/smc_wr.c 	if (!lnk->smcibdev)
lnk               518 net/smc/smc_wr.c 	ibdev = lnk->smcibdev->ibdev;
lnk               520 net/smc/smc_wr.c 	if (lnk->wr_rx_dma_addr) {
lnk               521 net/smc/smc_wr.c 		ib_dma_unmap_single(ibdev, lnk->wr_rx_dma_addr,
lnk               522 net/smc/smc_wr.c 				    SMC_WR_BUF_SIZE * lnk->wr_rx_cnt,
lnk               524 net/smc/smc_wr.c 		lnk->wr_rx_dma_addr = 0;
lnk               526 net/smc/smc_wr.c 	if (lnk->wr_tx_dma_addr) {
lnk               527 net/smc/smc_wr.c 		ib_dma_unmap_single(ibdev, lnk->wr_tx_dma_addr,
lnk               528 net/smc/smc_wr.c 				    SMC_WR_BUF_SIZE * lnk->wr_tx_cnt,
lnk               530 net/smc/smc_wr.c 		lnk->wr_tx_dma_addr = 0;
lnk               534 net/smc/smc_wr.c void smc_wr_free_link_mem(struct smc_link *lnk)
lnk               536 net/smc/smc_wr.c 	kfree(lnk->wr_tx_pends);
lnk               537 net/smc/smc_wr.c 	lnk->wr_tx_pends = NULL;
lnk               538 net/smc/smc_wr.c 	kfree(lnk->wr_tx_mask);
lnk               539 net/smc/smc_wr.c 	lnk->wr_tx_mask = NULL;
lnk               540 net/smc/smc_wr.c 	kfree(lnk->wr_tx_sges);
lnk               541 net/smc/smc_wr.c 	lnk->wr_tx_sges = NULL;
lnk               542 net/smc/smc_wr.c 	kfree(lnk->wr_tx_rdma_sges);
lnk               543 net/smc/smc_wr.c 	lnk->wr_tx_rdma_sges = NULL;
lnk               544 net/smc/smc_wr.c 	kfree(lnk->wr_rx_sges);
lnk               545 net/smc/smc_wr.c 	lnk->wr_rx_sges = NULL;
lnk               546 net/smc/smc_wr.c 	kfree(lnk->wr_tx_rdmas);
lnk               547 net/smc/smc_wr.c 	lnk->wr_tx_rdmas = NULL;
lnk               548 net/smc/smc_wr.c 	kfree(lnk->wr_rx_ibs);
lnk               549 net/smc/smc_wr.c 	lnk->wr_rx_ibs = NULL;
lnk               550 net/smc/smc_wr.c 	kfree(lnk->wr_tx_ibs);
lnk               551 net/smc/smc_wr.c 	lnk->wr_tx_ibs = NULL;
lnk               552 net/smc/smc_wr.c 	kfree(lnk->wr_tx_bufs);
lnk               553 net/smc/smc_wr.c 	lnk->wr_tx_bufs = NULL;
lnk               554 net/smc/smc_wr.c 	kfree(lnk->wr_rx_bufs);
lnk               555 net/smc/smc_wr.c 	lnk->wr_rx_bufs = NULL;
lnk               644 net/smc/smc_wr.c int smc_wr_create_link(struct smc_link *lnk)
lnk               646 net/smc/smc_wr.c 	struct ib_device *ibdev = lnk->smcibdev->ibdev;
lnk               649 net/smc/smc_wr.c 	smc_wr_tx_set_wr_id(&lnk->wr_tx_id, 0);
lnk               650 net/smc/smc_wr.c 	lnk->wr_rx_id = 0;
lnk               651 net/smc/smc_wr.c 	lnk->wr_rx_dma_addr = ib_dma_map_single(
lnk               652 net/smc/smc_wr.c 		ibdev, lnk->wr_rx_bufs,	SMC_WR_BUF_SIZE * lnk->wr_rx_cnt,
lnk               654 net/smc/smc_wr.c 	if (ib_dma_mapping_error(ibdev, lnk->wr_rx_dma_addr)) {
lnk               655 net/smc/smc_wr.c 		lnk->wr_rx_dma_addr = 0;
lnk               659 net/smc/smc_wr.c 	lnk->wr_tx_dma_addr = ib_dma_map_single(
lnk               660 net/smc/smc_wr.c 		ibdev, lnk->wr_tx_bufs,	SMC_WR_BUF_SIZE * lnk->wr_tx_cnt,
lnk               662 net/smc/smc_wr.c 	if (ib_dma_mapping_error(ibdev, lnk->wr_tx_dma_addr)) {
lnk               666 net/smc/smc_wr.c 	smc_wr_init_sge(lnk);
lnk               667 net/smc/smc_wr.c 	memset(lnk->wr_tx_mask, 0,
lnk               668 net/smc/smc_wr.c 	       BITS_TO_LONGS(SMC_WR_BUF_CNT) * sizeof(*lnk->wr_tx_mask));
lnk               669 net/smc/smc_wr.c 	init_waitqueue_head(&lnk->wr_tx_wait);
lnk               670 net/smc/smc_wr.c 	init_waitqueue_head(&lnk->wr_reg_wait);
lnk               674 net/smc/smc_wr.c 	ib_dma_unmap_single(ibdev, lnk->wr_rx_dma_addr,
lnk               675 net/smc/smc_wr.c 			    SMC_WR_BUF_SIZE * lnk->wr_rx_cnt,
lnk               677 net/smc/smc_wr.c 	lnk->wr_rx_dma_addr = 0;
lnk                78 net/smc/smc_wr.h int smc_wr_create_link(struct smc_link *lnk);
lnk                79 net/smc/smc_wr.h int smc_wr_alloc_link_mem(struct smc_link *lnk);
lnk                80 net/smc/smc_wr.h void smc_wr_free_link(struct smc_link *lnk);
lnk                81 net/smc/smc_wr.h void smc_wr_free_link_mem(struct smc_link *lnk);
lnk                82 net/smc/smc_wr.h void smc_wr_remember_qp_attr(struct smc_link *lnk);
lnk                95 net/smc/smc_wr.h void smc_wr_tx_dismiss_slots(struct smc_link *lnk, u8 wr_rx_hdr_type,