smcibdev 410 net/smc/af_smc.c link->smcibdev->mac[link->ibport - 1], smcibdev 1029 net/smc/af_smc.c link->smcibdev->mac[link->ibport - 1], smcibdev 506 net/smc/smc_clc.c memcpy(&cclc.lcl.mac, &link->smcibdev->mac[link->ibport - 1], smcibdev 578 net/smc/smc_clc.c memcpy(&aclc.lcl.mac, link->smcibdev->mac[link->ibport - 1], smcibdev 248 net/smc/smc_core.c lnk->smcibdev = ini->ib_dev; smcibdev 257 net/smc/smc_core.c rc = smc_ib_determine_gid(lnk->smcibdev, lnk->ibport, smcibdev 373 net/smc/smc_core.c smc_ib_buf_unmap_sg(lnk->smcibdev, buf_desc, smcibdev 376 net/smc/smc_core.c smc_ib_buf_unmap_sg(lnk->smcibdev, buf_desc, smcibdev 443 net/smc/smc_core.c put_device(&lgr->lnk[SMC_SINGLE_LINK].smcibdev->ibdev->dev); smcibdev 501 net/smc/smc_core.c void smc_port_terminate(struct smc_ib_device *smcibdev, u8 ibport) smcibdev 508 net/smc/smc_core.c lgr->lnk[SMC_SINGLE_LINK].smcibdev == smcibdev && smcibdev 774 net/smc/smc_core.c rc = smc_ib_buf_map_sg(lnk->smcibdev, buf_desc, smcibdev 916 net/smc/smc_core.c smc_ib_sync_sg_for_cpu(lgr->lnk[SMC_SINGLE_LINK].smcibdev, smcibdev 926 net/smc/smc_core.c smc_ib_sync_sg_for_device(lgr->lnk[SMC_SINGLE_LINK].smcibdev, smcibdev 936 net/smc/smc_core.c smc_ib_sync_sg_for_cpu(lgr->lnk[SMC_SINGLE_LINK].smcibdev, smcibdev 946 net/smc/smc_core.c smc_ib_sync_sg_for_device(lgr->lnk[SMC_SINGLE_LINK].smcibdev, smcibdev 74 net/smc/smc_core.h struct smc_ib_device *smcibdev; /* ib-device */ smcibdev 289 net/smc/smc_core.h void smc_port_terminate(struct smc_ib_device *smcibdev, u8 ibport); smcibdev 159 net/smc/smc_diag.c smc->conn.lgr->lnk[0].smcibdev->ibdev->name, smcibdev 160 net/smc/smc_diag.c sizeof(smc->conn.lgr->lnk[0].smcibdev->ibdev->name)); smcibdev 127 net/smc/smc_ib.c rc = ib_req_notify_cq(lnk->smcibdev->roce_cq_recv, smcibdev 146 net/smc/smc_ib.c static int smc_ib_fill_mac(struct smc_ib_device *smcibdev, u8 ibport) smcibdev 151 net/smc/smc_ib.c attr = rdma_get_gid_attr(smcibdev->ibdev, ibport, 0); smcibdev 155 net/smc/smc_ib.c rc = rdma_read_gid_l2_fields(attr, NULL, smcibdev->mac[ibport - 1]); smcibdev 165 net/smc/smc_ib.c static inline void smc_ib_define_local_systemid(struct smc_ib_device *smcibdev, smcibdev 168 net/smc/smc_ib.c memcpy(&local_systemid[2], &smcibdev->mac[ibport - 1], smcibdev 169 net/smc/smc_ib.c sizeof(smcibdev->mac[ibport - 1])); smcibdev 173 net/smc/smc_ib.c bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport) smcibdev 175 net/smc/smc_ib.c return smcibdev->pattr[ibport - 1].state == IB_PORT_ACTIVE; smcibdev 179 net/smc/smc_ib.c int smc_ib_determine_gid(struct smc_ib_device *smcibdev, u8 ibport, smcibdev 186 net/smc/smc_ib.c for (i = 0; i < smcibdev->pattr[ibport - 1].gid_tbl_len; i++) { smcibdev 187 net/smc/smc_ib.c attr = rdma_get_gid_attr(smcibdev->ibdev, ibport, i); smcibdev 212 net/smc/smc_ib.c static int smc_ib_remember_port_attr(struct smc_ib_device *smcibdev, u8 ibport) smcibdev 216 net/smc/smc_ib.c memset(&smcibdev->pattr[ibport - 1], 0, smcibdev 217 net/smc/smc_ib.c sizeof(smcibdev->pattr[ibport - 1])); smcibdev 218 net/smc/smc_ib.c rc = ib_query_port(smcibdev->ibdev, ibport, smcibdev 219 net/smc/smc_ib.c &smcibdev->pattr[ibport - 1]); smcibdev 223 net/smc/smc_ib.c rc = smc_ib_fill_mac(smcibdev, ibport); smcibdev 228 net/smc/smc_ib.c smc_ib_port_active(smcibdev, ibport)) smcibdev 230 net/smc/smc_ib.c smc_ib_define_local_systemid(smcibdev, ibport); smcibdev 238 net/smc/smc_ib.c struct smc_ib_device *smcibdev = container_of( smcibdev 242 net/smc/smc_ib.c for_each_set_bit(port_idx, &smcibdev->port_event_mask, SMC_MAX_PORTS) { smcibdev 243 net/smc/smc_ib.c smc_ib_remember_port_attr(smcibdev, port_idx + 1); smcibdev 244 net/smc/smc_ib.c clear_bit(port_idx, &smcibdev->port_event_mask); smcibdev 245 net/smc/smc_ib.c if (!smc_ib_port_active(smcibdev, port_idx + 1)) smcibdev 246 net/smc/smc_ib.c smc_port_terminate(smcibdev, port_idx + 1); smcibdev 254 net/smc/smc_ib.c struct smc_ib_device *smcibdev; smcibdev 257 net/smc/smc_ib.c smcibdev = container_of(handler, struct smc_ib_device, event_handler); smcibdev 263 net/smc/smc_ib.c set_bit(port_idx, &smcibdev->port_event_mask); smcibdev 264 net/smc/smc_ib.c schedule_work(&smcibdev->port_event_work); smcibdev 271 net/smc/smc_ib.c set_bit(port_idx, &smcibdev->port_event_mask); smcibdev 272 net/smc/smc_ib.c schedule_work(&smcibdev->port_event_work); smcibdev 291 net/smc/smc_ib.c lnk->roce_pd = ib_alloc_pd(lnk->smcibdev->ibdev, 0); smcibdev 301 net/smc/smc_ib.c struct smc_ib_device *smcibdev = lnk->smcibdev; smcibdev 309 net/smc/smc_ib.c set_bit(port_idx, &smcibdev->port_event_mask); smcibdev 310 net/smc/smc_ib.c schedule_work(&smcibdev->port_event_work); smcibdev 331 net/smc/smc_ib.c .send_cq = lnk->smcibdev->roce_cq_send, smcibdev 332 net/smc/smc_ib.c .recv_cq = lnk->smcibdev->roce_cq_recv, smcibdev 400 net/smc/smc_ib.c void smc_ib_sync_sg_for_cpu(struct smc_ib_device *smcibdev, smcibdev 412 net/smc/smc_ib.c ib_dma_sync_single_for_cpu(smcibdev->ibdev, smcibdev 420 net/smc/smc_ib.c void smc_ib_sync_sg_for_device(struct smc_ib_device *smcibdev, smcibdev 432 net/smc/smc_ib.c ib_dma_sync_single_for_device(smcibdev->ibdev, smcibdev 440 net/smc/smc_ib.c int smc_ib_buf_map_sg(struct smc_ib_device *smcibdev, smcibdev 446 net/smc/smc_ib.c mapped_nents = ib_dma_map_sg(smcibdev->ibdev, smcibdev 456 net/smc/smc_ib.c void smc_ib_buf_unmap_sg(struct smc_ib_device *smcibdev, smcibdev 463 net/smc/smc_ib.c ib_dma_unmap_sg(smcibdev->ibdev, smcibdev 470 net/smc/smc_ib.c long smc_ib_setup_per_ibdev(struct smc_ib_device *smcibdev) smcibdev 482 net/smc/smc_ib.c smcibdev->roce_cq_send = ib_create_cq(smcibdev->ibdev, smcibdev 484 net/smc/smc_ib.c smcibdev, &cqattr); smcibdev 485 net/smc/smc_ib.c rc = PTR_ERR_OR_ZERO(smcibdev->roce_cq_send); smcibdev 486 net/smc/smc_ib.c if (IS_ERR(smcibdev->roce_cq_send)) { smcibdev 487 net/smc/smc_ib.c smcibdev->roce_cq_send = NULL; smcibdev 490 net/smc/smc_ib.c smcibdev->roce_cq_recv = ib_create_cq(smcibdev->ibdev, smcibdev 492 net/smc/smc_ib.c smcibdev, &cqattr); smcibdev 493 net/smc/smc_ib.c rc = PTR_ERR_OR_ZERO(smcibdev->roce_cq_recv); smcibdev 494 net/smc/smc_ib.c if (IS_ERR(smcibdev->roce_cq_recv)) { smcibdev 495 net/smc/smc_ib.c smcibdev->roce_cq_recv = NULL; smcibdev 498 net/smc/smc_ib.c smc_wr_add_dev(smcibdev); smcibdev 499 net/smc/smc_ib.c smcibdev->initialized = 1; smcibdev 503 net/smc/smc_ib.c ib_destroy_cq(smcibdev->roce_cq_send); smcibdev 507 net/smc/smc_ib.c static void smc_ib_cleanup_per_ibdev(struct smc_ib_device *smcibdev) smcibdev 509 net/smc/smc_ib.c if (!smcibdev->initialized) smcibdev 511 net/smc/smc_ib.c smcibdev->initialized = 0; smcibdev 512 net/smc/smc_ib.c smc_wr_remove_dev(smcibdev); smcibdev 513 net/smc/smc_ib.c ib_destroy_cq(smcibdev->roce_cq_recv); smcibdev 514 net/smc/smc_ib.c ib_destroy_cq(smcibdev->roce_cq_send); smcibdev 522 net/smc/smc_ib.c struct smc_ib_device *smcibdev; smcibdev 529 net/smc/smc_ib.c smcibdev = kzalloc(sizeof(*smcibdev), GFP_KERNEL); smcibdev 530 net/smc/smc_ib.c if (!smcibdev) smcibdev 533 net/smc/smc_ib.c smcibdev->ibdev = ibdev; smcibdev 534 net/smc/smc_ib.c INIT_WORK(&smcibdev->port_event_work, smc_ib_port_event_work); smcibdev 537 net/smc/smc_ib.c list_add_tail(&smcibdev->list, &smc_ib_devices.list); smcibdev 539 net/smc/smc_ib.c ib_set_client_data(ibdev, &smc_ib_client, smcibdev); smcibdev 540 net/smc/smc_ib.c INIT_IB_EVENT_HANDLER(&smcibdev->event_handler, smcibdev->ibdev, smcibdev 542 net/smc/smc_ib.c ib_register_event_handler(&smcibdev->event_handler); smcibdev 545 net/smc/smc_ib.c port_cnt = smcibdev->ibdev->phys_port_cnt; smcibdev 549 net/smc/smc_ib.c set_bit(i, &smcibdev->port_event_mask); smcibdev 552 net/smc/smc_ib.c smcibdev->pnetid[i]); smcibdev 554 net/smc/smc_ib.c schedule_work(&smcibdev->port_event_work); smcibdev 560 net/smc/smc_ib.c struct smc_ib_device *smcibdev; smcibdev 562 net/smc/smc_ib.c smcibdev = ib_get_client_data(ibdev, &smc_ib_client); smcibdev 563 net/smc/smc_ib.c if (!smcibdev || smcibdev->ibdev != ibdev) smcibdev 567 net/smc/smc_ib.c list_del_init(&smcibdev->list); /* remove from smc_ib_devices */ smcibdev 569 net/smc/smc_ib.c smc_ib_cleanup_per_ibdev(smcibdev); smcibdev 570 net/smc/smc_ib.c ib_unregister_event_handler(&smcibdev->event_handler); smcibdev 571 net/smc/smc_ib.c cancel_work_sync(&smcibdev->port_event_work); smcibdev 572 net/smc/smc_ib.c kfree(smcibdev); smcibdev 57 net/smc/smc_ib.h bool smc_ib_port_active(struct smc_ib_device *smcibdev, u8 ibport); smcibdev 58 net/smc/smc_ib.h int smc_ib_buf_map_sg(struct smc_ib_device *smcibdev, smcibdev 61 net/smc/smc_ib.h void smc_ib_buf_unmap_sg(struct smc_ib_device *smcibdev, smcibdev 71 net/smc/smc_ib.h long smc_ib_setup_per_ibdev(struct smc_ib_device *smcibdev); smcibdev 75 net/smc/smc_ib.h void smc_ib_sync_sg_for_cpu(struct smc_ib_device *smcibdev, smcibdev 78 net/smc/smc_ib.h void smc_ib_sync_sg_for_device(struct smc_ib_device *smcibdev, smcibdev 81 net/smc/smc_ib.h int smc_ib_determine_gid(struct smc_ib_device *smcibdev, u8 ibport, smcibdev 205 net/smc/smc_llc.c memcpy(confllc->sender_mac, link->smcibdev->mac[link->ibport - 1], smcibdev 447 net/smc/smc_llc.c link->smcibdev->mac[link->ibport - 1], smcibdev 452 net/smc/smc_llc.c link->smcibdev->mac[link->ibport - 1], smcibdev 66 net/smc/smc_pnet.c struct smc_ib_device *smcibdev; smcibdev 200 net/smc/smc_pnet.c if (new_pnetelem->smcibdev) { smcibdev 201 net/smc/smc_pnet.c struct smc_ib_device *ib_dev = new_pnetelem->smcibdev; smcibdev 362 net/smc/smc_pnet.c pnetelem->smcibdev = smc_pnet_find_ib(ibname); smcibdev 364 net/smc/smc_pnet.c if (!pnetelem->smcibdev && !pnetelem->smcd_dev) smcibdev 366 net/smc/smc_pnet.c if (pnetelem->smcibdev) { smcibdev 396 net/smc/smc_pnet.c if (pnetelem->smcibdev) { smcibdev 398 net/smc/smc_pnet.c dev_name(pnetelem->smcibdev->ibdev->dev.parent)) || smcibdev 523 net/smc/smc_pnet.c tmp_entry.smcibdev = ibdev; smcibdev 244 net/smc/smc_wr.c ib_req_notify_cq(link->smcibdev->roce_cq_send, smcibdev 260 net/smc/smc_wr.c ib_req_notify_cq(link->smcibdev->roce_cq_send, smcibdev 516 net/smc/smc_wr.c if (!lnk->smcibdev) smcibdev 518 net/smc/smc_wr.c ibdev = lnk->smcibdev->ibdev; smcibdev 630 net/smc/smc_wr.c void smc_wr_remove_dev(struct smc_ib_device *smcibdev) smcibdev 632 net/smc/smc_wr.c tasklet_kill(&smcibdev->recv_tasklet); smcibdev 633 net/smc/smc_wr.c tasklet_kill(&smcibdev->send_tasklet); smcibdev 636 net/smc/smc_wr.c void smc_wr_add_dev(struct smc_ib_device *smcibdev) smcibdev 638 net/smc/smc_wr.c tasklet_init(&smcibdev->recv_tasklet, smc_wr_rx_tasklet_fn, smcibdev 639 net/smc/smc_wr.c (unsigned long)smcibdev); smcibdev 640 net/smc/smc_wr.c tasklet_init(&smcibdev->send_tasklet, smc_wr_tx_tasklet_fn, smcibdev 641 net/smc/smc_wr.c (unsigned long)smcibdev); smcibdev 646 net/smc/smc_wr.c struct ib_device *ibdev = lnk->smcibdev->ibdev; smcibdev 83 net/smc/smc_wr.h void smc_wr_remove_dev(struct smc_ib_device *smcibdev); smcibdev 84 net/smc/smc_wr.h void smc_wr_add_dev(struct smc_ib_device *smcibdev);