Lines Matching refs:ntb_epc
143 struct epf_ntb_epc *ntb_epc; in epf_ntb_link_up() local
152 ntb_epc = ntb->epc[type]; in epf_ntb_link_up()
153 epc = ntb_epc->epc; in epf_ntb_link_up()
154 func_no = ntb_epc->func_no; in epf_ntb_link_up()
155 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_link_up()
156 is_msix = ntb_epc->is_msix; in epf_ntb_link_up()
157 ctrl = ntb_epc->reg; in epf_ntb_link_up()
238 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_configure_mw() local
248 ntb_epc = ntb->epc[type]; in epf_ntb_configure_mw()
249 epc = ntb_epc->epc; in epf_ntb_configure_mw()
256 ctrl = ntb_epc->reg; in epf_ntb_configure_mw()
271 func_no = ntb_epc->func_no; in epf_ntb_configure_mw()
272 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_configure_mw()
297 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_teardown_mw() local
305 ntb_epc = ntb->epc[type]; in epf_ntb_teardown_mw()
306 epc = ntb_epc->epc; in epf_ntb_teardown_mw()
313 ctrl = ntb_epc->reg; in epf_ntb_teardown_mw()
316 func_no = ntb_epc->func_no; in epf_ntb_teardown_mw()
317 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_teardown_mw()
386 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_configure_msi() local
396 ntb_epc = ntb->epc[type]; in epf_ntb_configure_msi()
397 epc = ntb_epc->epc; in epf_ntb_configure_msi()
406 func_no = ntb_epc->func_no; in epf_ntb_configure_msi()
407 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_configure_msi()
492 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_configure_msix() local
505 ntb_epc = ntb->epc[type]; in epf_ntb_configure_msix()
506 epc = ntb_epc->epc; in epf_ntb_configure_msix()
508 epf_bar = &ntb_epc->epf_bar[ntb_epc->msix_bar]; in epf_ntb_configure_msix()
509 msix_tbl = epf_bar->addr + ntb_epc->msix_table_offset; in epf_ntb_configure_msix()
516 epc_features = ntb_epc->epc_features; in epf_ntb_configure_msix()
519 func_no = ntb_epc->func_no; in epf_ntb_configure_msix()
520 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_configure_msix()
538 ntb_epc->is_msix = true; in epf_ntb_configure_msix()
558 struct epf_ntb_epc *ntb_epc; in epf_ntb_configure_db() local
565 ntb_epc = ntb->epc[type]; in epf_ntb_configure_db()
566 epc = ntb_epc->epc; in epf_ntb_configure_db()
591 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_teardown_db() local
598 ntb_epc = ntb->epc[type]; in epf_ntb_teardown_db()
599 epc = ntb_epc->epc; in epf_ntb_teardown_db()
605 func_no = ntb_epc->func_no; in epf_ntb_teardown_db()
606 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_teardown_db()
623 struct epf_ntb_epc *ntb_epc; in epf_ntb_cmd_handler() local
632 ntb_epc = container_of(work, struct epf_ntb_epc, cmd_handler.work); in epf_ntb_cmd_handler()
633 ctrl = ntb_epc->reg; in epf_ntb_cmd_handler()
642 ctrl = ntb_epc->reg; in epf_ntb_cmd_handler()
643 type = ntb_epc->type; in epf_ntb_cmd_handler()
644 ntb = ntb_epc->epf_ntb; in epf_ntb_cmd_handler()
673 ntb_epc->linkup = true; in epf_ntb_cmd_handler()
686 ntb_epc->linkup = false; in epf_ntb_cmd_handler()
700 queue_delayed_work(kpcintb_workqueue, &ntb_epc->cmd_handler, in epf_ntb_cmd_handler()
734 static void epf_ntb_peer_spad_bar_clear(struct epf_ntb_epc *ntb_epc) in epf_ntb_peer_spad_bar_clear() argument
741 epc = ntb_epc->epc; in epf_ntb_peer_spad_bar_clear()
742 func_no = ntb_epc->func_no; in epf_ntb_peer_spad_bar_clear()
743 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_peer_spad_bar_clear()
744 barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD]; in epf_ntb_peer_spad_bar_clear()
745 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_peer_spad_bar_clear()
782 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_peer_spad_bar_set() local
797 ntb_epc = ntb->epc[type]; in epf_ntb_peer_spad_bar_set()
798 barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD]; in epf_ntb_peer_spad_bar_set()
799 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_peer_spad_bar_set()
800 func_no = ntb_epc->func_no; in epf_ntb_peer_spad_bar_set()
801 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_peer_spad_bar_set()
802 epc = ntb_epc->epc; in epf_ntb_peer_spad_bar_set()
850 static void epf_ntb_config_sspad_bar_clear(struct epf_ntb_epc *ntb_epc) in epf_ntb_config_sspad_bar_clear() argument
857 epc = ntb_epc->epc; in epf_ntb_config_sspad_bar_clear()
858 func_no = ntb_epc->func_no; in epf_ntb_config_sspad_bar_clear()
859 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_config_sspad_bar_clear()
860 barno = ntb_epc->epf_ntb_bar[BAR_CONFIG]; in epf_ntb_config_sspad_bar_clear()
861 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_config_sspad_bar_clear()
895 static int epf_ntb_config_sspad_bar_set(struct epf_ntb_epc *ntb_epc) in epf_ntb_config_sspad_bar_set() argument
905 ntb = ntb_epc->epf_ntb; in epf_ntb_config_sspad_bar_set()
908 epc = ntb_epc->epc; in epf_ntb_config_sspad_bar_set()
909 func_no = ntb_epc->func_no; in epf_ntb_config_sspad_bar_set()
910 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_config_sspad_bar_set()
911 barno = ntb_epc->epf_ntb_bar[BAR_CONFIG]; in epf_ntb_config_sspad_bar_set()
912 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_config_sspad_bar_set()
917 pci_epc_interface_string(ntb_epc->type)); in epf_ntb_config_sspad_bar_set()
951 struct epf_ntb_epc *ntb_epc; in epf_ntb_config_spad_bar_free() local
957 ntb_epc = ntb->epc[type]; in epf_ntb_config_spad_bar_free()
958 barno = ntb_epc->epf_ntb_bar[BAR_CONFIG]; in epf_ntb_config_spad_bar_free()
959 if (ntb_epc->reg) in epf_ntb_config_spad_bar_free()
960 pci_epf_free_space(epf, ntb_epc->reg, barno, type); in epf_ntb_config_spad_bar_free()
997 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_config_spad_bar_alloc() local
1011 ntb_epc = ntb->epc[type]; in epf_ntb_config_spad_bar_alloc()
1013 epc_features = ntb_epc->epc_features; in epf_ntb_config_spad_bar_alloc()
1014 barno = ntb_epc->epf_ntb_bar[BAR_CONFIG]; in epf_ntb_config_spad_bar_alloc()
1020 peer_barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD]; in epf_ntb_config_spad_bar_alloc()
1036 ntb_epc->msix_table_offset = ctrl_size; in epf_ntb_config_spad_bar_alloc()
1037 ntb_epc->msix_bar = barno; in epf_ntb_config_spad_bar_alloc()
1077 ntb_epc->reg = base; in epf_ntb_config_spad_bar_alloc()
1079 ctrl = ntb_epc->reg; in epf_ntb_config_spad_bar_alloc()
1084 ntb_epc->spad_size = spad_size; in epf_ntb_config_spad_bar_alloc()
1158 static void epf_ntb_free_peer_mem(struct epf_ntb_epc *ntb_epc) in epf_ntb_free_peer_mem() argument
1168 epc = ntb_epc->epc; in epf_ntb_free_peer_mem()
1171 barno = ntb_epc->epf_ntb_bar[bar]; in epf_ntb_free_peer_mem()
1172 mw_addr = ntb_epc->mw_addr[barno]; in epf_ntb_free_peer_mem()
1173 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_free_peer_mem()
1178 ntb_epc->mw_addr[barno] = NULL; in epf_ntb_free_peer_mem()
1223 static void epf_ntb_db_mw_bar_clear(struct epf_ntb_epc *ntb_epc) in epf_ntb_db_mw_bar_clear() argument
1231 epc = ntb_epc->epc; in epf_ntb_db_mw_bar_clear()
1233 func_no = ntb_epc->func_no; in epf_ntb_db_mw_bar_clear()
1234 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_db_mw_bar_clear()
1237 barno = ntb_epc->epf_ntb_bar[bar]; in epf_ntb_db_mw_bar_clear()
1238 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_db_mw_bar_clear()
1255 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_db_mw_bar_cleanup() local
1257 ntb_epc = ntb->epc[type]; in epf_ntb_db_mw_bar_cleanup()
1260 epf_ntb_db_mw_bar_clear(ntb_epc); in epf_ntb_db_mw_bar_cleanup()
1277 struct epf_ntb_epc *ntb_epc; in epf_ntb_configure_interrupt() local
1284 ntb_epc = ntb->epc[type]; in epf_ntb_configure_interrupt()
1287 epc_features = ntb_epc->epc_features; in epf_ntb_configure_interrupt()
1296 func_no = ntb_epc->func_no; in epf_ntb_configure_interrupt()
1297 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_configure_interrupt()
1306 epc = ntb_epc->epc; in epf_ntb_configure_interrupt()
1319 ntb_epc->msix_bar, in epf_ntb_configure_interrupt()
1320 ntb_epc->msix_table_offset); in epf_ntb_configure_interrupt()
1377 struct epf_ntb_epc *ntb_epc, in epf_ntb_alloc_peer_mem() argument
1390 epc_features = ntb_epc->epc_features; in epf_ntb_alloc_peer_mem()
1409 barno = ntb_epc->epf_ntb_bar[bar]; in epf_ntb_alloc_peer_mem()
1410 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_alloc_peer_mem()
1411 ntb_epc->mw_addr[barno] = mw_addr; in epf_ntb_alloc_peer_mem()
1433 struct epf_ntb_epc *peer_ntb_epc, *ntb_epc; in epf_ntb_db_mw_bar_init() local
1446 ntb_epc = ntb->epc[type]; in epf_ntb_db_mw_bar_init()
1450 epc_features = ntb_epc->epc_features; in epf_ntb_db_mw_bar_init()
1452 func_no = ntb_epc->func_no; in epf_ntb_db_mw_bar_init()
1453 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_db_mw_bar_init()
1454 epc = ntb_epc->epc; in epf_ntb_db_mw_bar_init()
1463 ctrl = ntb_epc->reg; in epf_ntb_db_mw_bar_init()
1470 ret = epf_ntb_alloc_peer_mem(dev, ntb_epc, bar, in epf_ntb_db_mw_bar_init()
1478 barno = ntb_epc->epf_ntb_bar[bar]; in epf_ntb_db_mw_bar_init()
1479 epf_bar = &ntb_epc->epf_bar[barno]; in epf_ntb_db_mw_bar_init()
1508 struct epf_ntb_epc *ntb_epc; in epf_ntb_epc_destroy_interface() local
1516 ntb_epc = ntb->epc[type]; in epf_ntb_epc_destroy_interface()
1517 if (!ntb_epc) in epf_ntb_epc_destroy_interface()
1519 epc = ntb_epc->epc; in epf_ntb_epc_destroy_interface()
1552 struct epf_ntb_epc *ntb_epc; in epf_ntb_epc_create_interface() local
1559 ntb_epc = devm_kzalloc(dev, sizeof(*ntb_epc), GFP_KERNEL); in epf_ntb_epc_create_interface()
1560 if (!ntb_epc) in epf_ntb_epc_create_interface()
1573 ntb_epc->linkup = false; in epf_ntb_epc_create_interface()
1574 ntb_epc->epc = epc; in epf_ntb_epc_create_interface()
1575 ntb_epc->func_no = func_no; in epf_ntb_epc_create_interface()
1576 ntb_epc->vfunc_no = vfunc_no; in epf_ntb_epc_create_interface()
1577 ntb_epc->type = type; in epf_ntb_epc_create_interface()
1578 ntb_epc->epf_bar = epf_bar; in epf_ntb_epc_create_interface()
1579 ntb_epc->epf_ntb = ntb; in epf_ntb_epc_create_interface()
1584 ntb_epc->epc_features = epc_features; in epf_ntb_epc_create_interface()
1586 ntb->epc[type] = ntb_epc; in epf_ntb_epc_create_interface()
1643 struct epf_ntb_epc *ntb_epc; in epf_ntb_init_epc_bar_interface() local
1651 ntb_epc = ntb->epc[type]; in epf_ntb_init_epc_bar_interface()
1654 epc_features = ntb_epc->epc_features; in epf_ntb_init_epc_bar_interface()
1664 ntb_epc->epf_ntb_bar[bar] = barno; in epf_ntb_init_epc_bar_interface()
1674 ntb_epc->epf_ntb_bar[bar] = barno; in epf_ntb_init_epc_bar_interface()
1720 struct epf_ntb_epc *ntb_epc; in epf_ntb_epc_init_interface() local
1727 ntb_epc = ntb->epc[type]; in epf_ntb_epc_init_interface()
1730 epc = ntb_epc->epc; in epf_ntb_epc_init_interface()
1731 func_no = ntb_epc->func_no; in epf_ntb_epc_init_interface()
1732 vfunc_no = ntb_epc->vfunc_no; in epf_ntb_epc_init_interface()
1798 struct epf_ntb_epc *ntb_epc; in epf_ntb_epc_cleanup_interface() local
1803 ntb_epc = ntb->epc[type]; in epf_ntb_epc_cleanup_interface()
1804 cancel_delayed_work(&ntb_epc->cmd_handler); in epf_ntb_epc_cleanup_interface()
1806 epf_ntb_peer_spad_bar_clear(ntb_epc); in epf_ntb_epc_cleanup_interface()
1807 epf_ntb_config_sspad_bar_clear(ntb_epc); in epf_ntb_epc_cleanup_interface()