/openbmc/linux/drivers/thunderbolt/ |
H A D | nhi.c | 461 struct tb_nhi *nhi = ring->nhi; in ring_request_msix() local 596 ring->nhi = nhi; in tb_ring_alloc() 968 struct tb_nhi *nhi = tb->nhi; in __nhi_suspend_noirq() local 1048 struct tb_nhi *nhi = tb->nhi; in nhi_resume_noirq() local 1098 struct tb_nhi *nhi = tb->nhi; in nhi_runtime_suspend() local 1117 struct tb_nhi *nhi = tb->nhi; in nhi_runtime_resume() local 1150 devm_free_irq(&nhi->pdev->dev, nhi->pdev->irq, nhi); in nhi_shutdown() 1156 nhi->ops->shutdown(nhi); in nhi_shutdown() 1389 if (nhi->ops && nhi->ops->init) { in nhi_probe() 1390 res = nhi->ops->init(nhi); in nhi_probe() [all …]
|
H A D | nhi_ops.c | 27 struct tb *tb = pci_get_drvdata(nhi->pdev); in icl_nhi_is_device_connected() 124 struct tb *tb = pci_get_drvdata(nhi->pdev); in icl_nhi_suspend() 127 if (icl_nhi_is_device_connected(nhi)) in icl_nhi_suspend() 142 return icl_nhi_force_power(nhi, false); in icl_nhi_suspend() 147 struct tb *tb = pci_get_drvdata(nhi->pdev); in icl_nhi_suspend_noirq() 151 return icl_nhi_suspend(nhi); in icl_nhi_suspend_noirq() 157 icl_nhi_lc_mailbox_cmd(nhi, cmd); in icl_nhi_suspend_noirq() 161 static int icl_nhi_resume(struct tb_nhi *nhi) in icl_nhi_resume() argument 165 ret = icl_nhi_force_power(nhi, true); in icl_nhi_resume() 169 icl_nhi_set_ltr(nhi); in icl_nhi_resume() [all …]
|
H A D | nhi.h | 30 int nhi_mailbox_cmd(struct tb_nhi *nhi, enum nhi_mailbox_cmd cmd, u32 data); 31 enum nhi_fw_mode nhi_mailbox_mode(struct tb_nhi *nhi); 43 int (*init)(struct tb_nhi *nhi); 44 int (*suspend_noirq)(struct tb_nhi *nhi, bool wakeup); 45 int (*resume_noirq)(struct tb_nhi *nhi); 46 int (*runtime_suspend)(struct tb_nhi *nhi); 47 int (*runtime_resume)(struct tb_nhi *nhi); 48 void (*shutdown)(struct tb_nhi *nhi);
|
H A D | acpi.c | 19 struct tb_nhi *nhi = data; in tb_acpi_add_link() local 31 if (dev_fwnode(&nhi->pdev->dev) != fwnode) in tb_acpi_add_link() 80 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link() 85 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link() 89 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link() 111 bool tb_acpi_add_links(struct tb_nhi *nhi) in tb_acpi_add_links() argument 116 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links() 124 tb_acpi_add_link, NULL, nhi, (void **)&ret); in tb_acpi_add_links() 126 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n"); in tb_acpi_add_links() 323 struct tb_nhi *nhi = sw->tb->nhi; in tb_acpi_switch_find_companion() local [all …]
|
H A D | nhi_regs.h | 85 #define RING_NOTIFY_REG_COUNT(nhi) ((31 + 3 * nhi->hop_count) / 32) argument 94 #define RING_INTERRUPT_REG_COUNT(nhi) ((31 + 2 * nhi->hop_count) / 32) argument
|
H A D | icm.c | 603 nhi_mailbox_cmd(tb->nhi, cmd, 1); in icm_fr_disconnect_xdomain_paths() 605 nhi_mailbox_cmd(tb->nhi, cmd, 2); in icm_fr_disconnect_xdomain_paths() 1435 if (icm_firmware_running(tb->nhi)) in icm_ar_is_supported() 1468 struct tb_nhi *nhi = tb->nhi; in icm_ar_get_mode() local 1484 return nhi_mailbox_mode(nhi); in icm_ar_get_mode() 1646 struct tb_nhi *nhi = tb->nhi; in icm_icl_set_uuid() local 1819 if (icm_firmware_running(nhi)) in icm_firmware_start() 1824 ret = icm_firmware_reset(tb, nhi); in icm_firmware_start() 1912 struct tb_nhi *nhi = tb->nhi; in icm_firmware_init() local 2087 if (tb->nhi->going_away) in icm_complete() [all …]
|
H A D | ctl.c | 37 struct tb_nhi *nhi; member 54 dev_WARN(&(ctl)->nhi->pdev->dev, format, ## arg) 57 dev_err(&(ctl)->nhi->pdev->dev, format, ## arg) 60 dev_warn(&(ctl)->nhi->pdev->dev, format, ## arg) 63 dev_info(&(ctl)->nhi->pdev->dev, format, ## arg) 66 dev_dbg(&(ctl)->nhi->pdev->dev, format, ## arg) 625 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int timeout_msec, event_cb cb, in tb_ctl_alloc() argument 632 ctl->nhi = nhi; in tb_ctl_alloc() 639 ctl->frame_pool = dma_pool_create("thunderbolt_ctl", &nhi->pdev->dev, in tb_ctl_alloc() 644 ctl->tx = tb_ring_alloc_tx(nhi, 0, 10, RING_FLAG_NO_SUSPEND); in tb_ctl_alloc() [all …]
|
H A D | test.c | 1791 struct tb_port *nhi, *port; in tb_test_tunnel_dma() local 1807 nhi = &host->ports[7]; in tb_test_tunnel_dma() 1834 struct tb_port *nhi, *port; in tb_test_tunnel_dma_rx() local 1850 nhi = &host->ports[7]; in tb_test_tunnel_dma_rx() 1887 nhi = &host->ports[7]; in tb_test_tunnel_dma_tx() 1934 nhi = &host->ports[7]; in tb_test_tunnel_dma_chain() 1979 nhi = &host->ports[7]; in tb_test_tunnel_dma_match() 2259 nhi = &host->ports[7]; in tb_test_credit_alloc_dma() 2295 nhi = &host->ports[7]; in tb_test_credit_alloc_dma_multiple() 2523 nhi = &host->ports[7]; in TB_TEST_DMA_TUNNEL1() [all …]
|
H A D | tb.h | 687 #define tb_err(tb, fmt, arg...) dev_err(&(tb)->nhi->pdev->dev, fmt, ## arg) 688 #define tb_WARN(tb, fmt, arg...) dev_WARN(&(tb)->nhi->pdev->dev, fmt, ## arg) 689 #define tb_warn(tb, fmt, arg...) dev_warn(&(tb)->nhi->pdev->dev, fmt, ## arg) 690 #define tb_info(tb, fmt, arg...) dev_info(&(tb)->nhi->pdev->dev, fmt, ## arg) 691 #define tb_dbg(tb, fmt, arg...) dev_dbg(&(tb)->nhi->pdev->dev, fmt, ## arg) 719 struct tb *icm_probe(struct tb_nhi *nhi); 720 struct tb *tb_probe(struct tb_nhi *nhi); 732 struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize); 1384 bool tb_acpi_add_links(struct tb_nhi *nhi); 1397 static inline bool tb_acpi_add_links(struct tb_nhi *nhi) { return false; } in tb_acpi_add_links() argument
|
H A D | domain.c | 258 return sysfs_emit(buf, "%d\n", tb->nhi->iommu_dma_protection); in iommu_dma_protection_show() 373 struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize) in tb_domain_alloc() argument 389 tb->nhi = nhi; in tb_domain_alloc() 400 tb->ctl = tb_ctl_alloc(nhi, timeout_msec, tb_domain_event_cb, tb); in tb_domain_alloc() 404 tb->dev.parent = &nhi->pdev->dev; in tb_domain_alloc()
|
H A D | Makefile | 3 thunderbolt-objs := nhi.o nhi_ops.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o
|
H A D | tb.c | 2930 static bool tb_apple_add_links(struct tb_nhi *nhi) in tb_apple_add_links() argument 2938 switch (nhi->pdev->device) { in tb_apple_add_links() 2948 upstream = pci_upstream_bridge(nhi->pdev); in tb_apple_add_links() 2975 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_apple_add_links() 2979 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_apple_add_links() 2983 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_apple_add_links() 2991 struct tb *tb_probe(struct tb_nhi *nhi) in tb_probe() argument 2996 tb = tb_domain_alloc(nhi, TB_TIMEOUT, sizeof(*tcm)); in tb_probe() 3020 if (!tb_apple_add_links(nhi) && !tb_acpi_add_links(nhi)) in tb_probe()
|
H A D | ctl.h | 24 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int timeout_msec, event_cb cb,
|
H A D | tunnel.h | 90 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi,
|
H A D | tunnel.c | 1637 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, in tb_tunnel_alloc_dma() argument 1663 tunnel->src_port = nhi; in tb_tunnel_alloc_dma() 1667 credits = min_not_zero(dma_credits, nhi->sw->max_dma_credits); in tb_tunnel_alloc_dma() 1670 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, in tb_tunnel_alloc_dma() 1682 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, in tb_tunnel_alloc_dma()
|
H A D | dma_test.c | 152 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, DMA_TEST_TX_RING_SIZE, in dma_test_start_rings() 175 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, DMA_TEST_RX_RING_SIZE, in dma_test_start_rings()
|
H A D | eeprom.c | 443 struct device *dev = &sw->tb->nhi->pdev->dev; in tb_drom_copy_efi()
|
H A D | switch.c | 221 root_port = pcie_find_root_port(sw->tb->nhi->pdev); in nvm_authenticate_start_dma_port() 230 root_port = pcie_find_root_port(sw->tb->nhi->pdev); in nvm_authenticate_complete_dma_port()
|
/openbmc/linux/include/net/ |
H A D | nexthop.h | 260 return nhi->fdb_nh; in nexthop_is_fdb() 356 struct nh_info *nhi; in nexthop_path_fib_result() local 368 struct nh_info *nhi; in nexthop_fib_nhc() local 385 return &nhi->fib_nhc; in nexthop_fib_nhc() 395 struct nh_info *nhi; in nexthop_get_nhc_lookup() local 424 struct nh_info *nhi; in nexthop_uses_dev() local 482 struct nh_info *nhi; in nexthop_fib6_nh() local 511 struct nh_info *nhi; in nexthop_path_fib6_result() local 516 if (nhi->reject_nh) { in nexthop_path_fib6_result() 533 return nhi->family; in nexthop_get_family() [all …]
|
/openbmc/linux/net/ipv4/ |
H A D | nexthop.c | 137 struct nh_info *nhi; in nh_notifier_mpath_info_init() local 143 nhi); in nh_notifier_mpath_info_init() 169 struct nh_info *nhi; in nh_notifier_res_table_info_init() local 174 nhi); in nh_notifier_res_table_info_init() 502 kfree(nhi); in nexthop_free_single() 2553 if (nhi->fdb_nh) in nh_create_ipv4() 2615 nhi = kzalloc(sizeof(*nhi), GFP_KERNEL); in nexthop_create() 2616 if (!nhi) { in nexthop_create() 2629 nhi->fdb_nh = 1; in nexthop_create() 2646 kfree(nhi); in nexthop_create() [all …]
|
/openbmc/linux/include/linux/ |
H A D | thunderbolt.h | 78 struct tb_nhi *nhi; member 534 struct tb_nhi *nhi; member 607 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size, 609 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size, 675 return &ring->nhi->pdev->dev; in tb_ring_dma_device()
|
/openbmc/linux/drivers/net/thunderbolt/ |
H A D | main.c | 927 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, in tbnet_open() 952 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags, in tbnet_open()
|