Home
last modified time | relevance | path

Searched refs:nhi (Results 1 – 22 of 22) sorted by relevance

/linux-6.1.9/drivers/thunderbolt/
Dnhi.c53 bit += ring->nhi->hop_count; in ring_interrupt_index()
78 index = ring->hop + ring->nhi->hop_count; in ring_interrupt_active()
80 if (ring->nhi->quirks & QUIRK_AUTO_CLEAR_INT) { in ring_interrupt_active()
86 misc = ioread32(ring->nhi->iobase + REG_DMA_MISC); in ring_interrupt_active()
89 iowrite32(misc, ring->nhi->iobase + REG_DMA_MISC); in ring_interrupt_active()
93 ivr_base = ring->nhi->iobase + REG_INT_VEC_ALLOC_BASE; in ring_interrupt_active()
103 old = ioread32(ring->nhi->iobase + reg); in ring_interrupt_active()
109 dev_dbg(&ring->nhi->pdev->dev, in ring_interrupt_active()
114 dev_WARN(&ring->nhi->pdev->dev, in ring_interrupt_active()
118 iowrite32(new, ring->nhi->iobase + reg); in ring_interrupt_active()
[all …]
Dnhi_ops.c25 static bool icl_nhi_is_device_connected(struct tb_nhi *nhi) in icl_nhi_is_device_connected() argument
27 struct tb *tb = pci_get_drvdata(nhi->pdev); in icl_nhi_is_device_connected()
35 static int icl_nhi_force_power(struct tb_nhi *nhi, bool power) in icl_nhi_force_power() argument
51 pci_read_config_dword(nhi->pdev, VS_CAP_22, &vs_cap); in icl_nhi_force_power()
59 pci_write_config_dword(nhi->pdev, VS_CAP_22, vs_cap); in icl_nhi_force_power()
67 pci_read_config_dword(nhi->pdev, VS_CAP_9, &val); in icl_nhi_force_power()
79 static void icl_nhi_lc_mailbox_cmd(struct tb_nhi *nhi, enum icl_lc_mailbox_cmd cmd) in icl_nhi_lc_mailbox_cmd() argument
84 pci_write_config_dword(nhi->pdev, VS_CAP_19, data | VS_CAP_19_VALID); in icl_nhi_lc_mailbox_cmd()
87 static int icl_nhi_lc_mailbox_cmd_complete(struct tb_nhi *nhi, int timeout) in icl_nhi_lc_mailbox_cmd_complete() argument
97 pci_read_config_dword(nhi->pdev, VS_CAP_18, &data); in icl_nhi_lc_mailbox_cmd_complete()
[all …]
Dnhi.h30 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);
Dacpi.c20 struct tb_nhi *nhi = data; in tb_acpi_add_link() local
35 if (dev_fwnode(&nhi->pdev->dev) != args.fwnode) in tb_acpi_add_link()
87 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link()
92 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link()
95 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link()
115 void tb_acpi_add_links(struct tb_nhi *nhi) in tb_acpi_add_links() argument
119 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links()
127 tb_acpi_add_link, NULL, nhi, NULL); in tb_acpi_add_links()
129 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 …]
Dnhi_regs.h85 #define RING_NOTIFY_REG_COUNT(nhi) ((31 + 3 * nhi->hop_count) / 32) argument
93 #define RING_INTERRUPT_REG_COUNT(nhi) ((31 + 2 * nhi->hop_count) / 32) argument
Dicm.c374 static bool icm_firmware_running(const struct tb_nhi *nhi) in icm_firmware_running() argument
378 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_running()
451 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0); in icm_fr_save_devices()
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()
1437 if (icm_firmware_running(tb->nhi)) in icm_ar_is_supported()
1446 upstream_port = get_upstream_port(tb->nhi->pdev); in icm_ar_is_supported()
1470 struct tb_nhi *nhi = tb->nhi; in icm_ar_get_mode() local
1475 val = ioread32(nhi->iobase + REG_FW_STS); in icm_ar_get_mode()
1482 dev_err(&nhi->pdev->dev, "ICM firmware not authenticated\n"); in icm_ar_get_mode()
[all …]
Dctl.c37 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 …]
Dtest.c1709 struct tb_port *nhi, *port; in tb_test_tunnel_dma() local
1725 nhi = &host->ports[7]; in tb_test_tunnel_dma()
1728 tunnel = tb_tunnel_alloc_dma(NULL, nhi, port, 8, 1, 8, 1); in tb_test_tunnel_dma()
1731 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, nhi); in tb_test_tunnel_dma()
1738 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, nhi); in tb_test_tunnel_dma()
1742 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, nhi); in tb_test_tunnel_dma()
1752 struct tb_port *nhi, *port; in tb_test_tunnel_dma_rx() local
1768 nhi = &host->ports[7]; in tb_test_tunnel_dma_rx()
1771 tunnel = tb_tunnel_alloc_dma(NULL, nhi, port, -1, -1, 15, 2); in tb_test_tunnel_dma_rx()
1774 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, nhi); in tb_test_tunnel_dma_rx()
[all …]
Dtb.h666 #define tb_err(tb, fmt, arg...) dev_err(&(tb)->nhi->pdev->dev, fmt, ## arg)
667 #define tb_WARN(tb, fmt, arg...) dev_WARN(&(tb)->nhi->pdev->dev, fmt, ## arg)
668 #define tb_warn(tb, fmt, arg...) dev_warn(&(tb)->nhi->pdev->dev, fmt, ## arg)
669 #define tb_info(tb, fmt, arg...) dev_info(&(tb)->nhi->pdev->dev, fmt, ## arg)
670 #define tb_dbg(tb, fmt, arg...) dev_dbg(&(tb)->nhi->pdev->dev, fmt, ## arg)
698 struct tb *icm_probe(struct tb_nhi *nhi);
699 struct tb *tb_probe(struct tb_nhi *nhi);
711 struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize);
1263 void tb_acpi_add_links(struct tb_nhi *nhi);
1276 static inline void tb_acpi_add_links(struct tb_nhi *nhi) { } in tb_acpi_add_links() argument
Ddomain.c258 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()
Dtb.c1744 static void tb_apple_add_links(struct tb_nhi *nhi) in tb_apple_add_links() argument
1751 switch (nhi->pdev->device) { in tb_apple_add_links()
1761 upstream = pci_upstream_bridge(nhi->pdev); in tb_apple_add_links()
1787 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_apple_add_links()
1791 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_apple_add_links()
1794 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_apple_add_links()
1800 struct tb *tb_probe(struct tb_nhi *nhi) in tb_probe() argument
1805 tb = tb_domain_alloc(nhi, TB_TIMEOUT, sizeof(*tcm)); in tb_probe()
1823 tb_apple_add_links(nhi); in tb_probe()
1824 tb_acpi_add_links(nhi); in tb_probe()
DMakefile3 thunderbolt-objs := nhi.o nhi_ops.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o
Dtunnel.h76 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi,
Dctl.h24 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int timeout_msec, event_cb cb,
Dtunnel.c1077 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, in tb_tunnel_alloc_dma() argument
1099 tunnel->src_port = nhi; in tb_tunnel_alloc_dma()
1103 credits = min_not_zero(TB_DMA_CREDITS, nhi->sw->max_dma_credits); in tb_tunnel_alloc_dma()
1106 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, in tb_tunnel_alloc_dma()
1118 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, in tb_tunnel_alloc_dma()
Ddma_test.c152 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()
Deeprom.c443 struct device *dev = &sw->tb->nhi->pdev->dev; in tb_drom_copy_efi()
Dswitch.c224 root_port = pcie_find_root_port(sw->tb->nhi->pdev); in nvm_authenticate_start_dma_port()
233 root_port = pcie_find_root_port(sw->tb->nhi->pdev); in nvm_authenticate_complete_dma_port()
/linux-6.1.9/include/net/
Dnexthop.h257 const struct nh_info *nhi; in nexthop_is_fdb() local
259 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_fdb()
260 return nhi->fdb_nh; in nexthop_is_fdb()
324 struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); in nexthop_mpath_fill_node() local
325 struct fib_nh_common *nhc = &nhi->fib_nhc; in nexthop_mpath_fill_node()
338 const struct nh_info *nhi; in nexthop_is_blackhole() local
350 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_blackhole()
351 return nhi->reject_nh; in nexthop_is_blackhole()
356 struct nh_info *nhi; in nexthop_path_fib_result() local
360 nhi = rcu_dereference(nh->nh_info); in nexthop_path_fib_result()
[all …]
/linux-6.1.9/net/ipv4/
Dnexthop.c86 const struct nh_info *nhi) in __nh_notifier_single_info_init() argument
88 nh_info->dev = nhi->fib_nhc.nhc_dev; in __nh_notifier_single_info_init()
89 nh_info->gw_family = nhi->fib_nhc.nhc_gw_family; in __nh_notifier_single_info_init()
91 nh_info->ipv4 = nhi->fib_nhc.nhc_gw.ipv4; in __nh_notifier_single_info_init()
93 nh_info->ipv6 = nhi->fib_nhc.nhc_gw.ipv6; in __nh_notifier_single_info_init()
95 nh_info->is_reject = nhi->reject_nh; in __nh_notifier_single_info_init()
96 nh_info->is_fdb = nhi->fdb_nh; in __nh_notifier_single_info_init()
97 nh_info->has_encap = !!nhi->fib_nhc.nhc_lwtstate; in __nh_notifier_single_info_init()
103 struct nh_info *nhi = rtnl_dereference(nh->nh_info); in nh_notifier_single_info_init() local
110 __nh_notifier_single_info_init(info->nh, nhi); in nh_notifier_single_info_init()
[all …]
/linux-6.1.9/include/linux/
Dthunderbolt.h78 struct tb_nhi *nhi; member
520 struct tb_nhi *nhi; member
593 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size,
595 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size,
661 return &ring->nhi->pdev->dev; in tb_ring_dma_device()
/linux-6.1.9/drivers/net/
Dthunderbolt.c887 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, in tbnet_open()
912 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags, in tbnet_open()