Home
last modified time | relevance | path

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

/linux/drivers/thunderbolt/
H A Dnhi.c57 bit += ring->nhi->hop_count; in ring_interrupt_index()
61 static void nhi_mask_interrupt(struct tb_nhi *nhi, int mask, int ring) in nhi_mask_interrupt() argument
63 if (nhi->quirks & QUIRK_AUTO_CLEAR_INT) { in nhi_mask_interrupt()
66 val = ioread32(nhi->iobase + REG_RING_INTERRUPT_BASE + ring); in nhi_mask_interrupt()
67 iowrite32(val & ~mask, nhi->iobase + REG_RING_INTERRUPT_BASE + ring); in nhi_mask_interrupt()
69 iowrite32(mask, nhi->iobase + REG_RING_INTERRUPT_MASK_CLEAR_BASE + ring); in nhi_mask_interrupt()
73 static void nhi_clear_interrupt(struct tb_nhi *nhi, int ring) in nhi_clear_interrupt() argument
75 if (nhi->quirks & QUIRK_AUTO_CLEAR_INT) in nhi_clear_interrupt()
76 ioread32(nhi->iobase + REG_RING_NOTIFY_BASE + ring); in nhi_clear_interrupt()
78 iowrite32(~0, nhi->iobase + REG_RING_INT_CLEAR + ring); in nhi_clear_interrupt()
[all …]
H A 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 …]
H A 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);
H A Dacpi.c19 struct tb_nhi *nhi = data; in tb_acpi_add_link() local
31 if (dev_fwnode(&nhi->pdev->dev) != fwnode) in tb_acpi_add_link()
60 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link()
65 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link()
69 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link()
91 bool tb_acpi_add_links(struct tb_nhi *nhi) in tb_acpi_add_links() argument
96 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links()
104 tb_acpi_add_link, NULL, nhi, (void **)&ret); in tb_acpi_add_links()
106 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n"); in tb_acpi_add_links()
303 struct tb_nhi *nhi = sw->tb->nhi; in tb_acpi_switch_find_companion() local
[all …]
H A Dnhi_regs.h85 #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 Dctl.c26 * @nhi: Pointer to the NHI structure
40 struct tb_nhi *nhi; member
59 dev_WARN(&(ctl)->nhi->pdev->dev, format, ## arg)
62 dev_err(&(ctl)->nhi->pdev->dev, format, ## arg)
65 dev_warn(&(ctl)->nhi->pdev->dev, format, ## arg)
68 dev_info(&(ctl)->nhi->pdev->dev, format, ## arg)
71 dev_dbg(&(ctl)->nhi->pdev->dev, format, ## arg)
74 dev_dbg_once(&(ctl)->nhi->pdev->dev, format, ## arg)
631 * @nhi: Pointer to NHI
641 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, in in tb_ctl_alloc()
638 tb_ctl_alloc(struct tb_nhi * nhi,int index,int timeout_msec,event_cb cb,void * cb_data) tb_ctl_alloc() argument
[all...]
H A Dtest.c1791 struct tb_port *nhi, *port; in tb_test_tunnel_dma() local
1807 nhi = &host->ports[7]; in tb_test_tunnel_dma()
1810 tunnel = tb_tunnel_alloc_dma(NULL, nhi, port, 8, 1, 8, 1); in tb_test_tunnel_dma()
1813 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, nhi); in tb_test_tunnel_dma()
1820 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[0]->hops[0].out_port, nhi); in tb_test_tunnel_dma()
1824 KUNIT_EXPECT_PTR_EQ(test, tunnel->paths[1]->hops[0].in_port, nhi); 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()
1853 tunnel = tb_tunnel_alloc_dma(NULL, nhi, port, -1, -1, 15, 2); in tb_test_tunnel_dma_rx()
1856 KUNIT_EXPECT_PTR_EQ(test, tunnel->src_port, nhi); in tb_test_tunnel_dma_rx()
1871 struct tb_port *nhi, *port; tb_test_tunnel_dma_tx() local
1909 struct tb_port *nhi, *port; tb_test_tunnel_dma_chain() local
1974 struct tb_port *nhi, *port; tb_test_tunnel_dma_match() local
2252 struct tb_port *nhi, *port; tb_test_credit_alloc_dma() local
2289 struct tb_port *nhi, *port; tb_test_credit_alloc_dma_multiple() local
2519 struct tb_port *nhi, *port; TB_TEST_DMA_TUNNEL1() local
2549 struct tb_port *nhi, *port; TB_TEST_DMA_TUNNEL2() local
[all...]
H A 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, tb->index, timeout_msec, tb_domain_event_cb, tb); in tb_domain_alloc()
404 tb->dev.parent = &nhi->pdev->dev; in tb_domain_alloc()
H A DMakefile4 thunderbolt-objs := nhi.o nhi_ops.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o
H A Dtb.c3269 static bool tb_apple_add_links(struct tb_nhi *nhi) in tb_apple_add_links() argument
3277 switch (nhi->pdev->device) { in tb_apple_add_links()
3287 upstream = pci_upstream_bridge(nhi->pdev); in tb_apple_add_links()
3314 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_apple_add_links()
3318 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_apple_add_links()
3322 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_apple_add_links()
3330 struct tb *tb_probe(struct tb_nhi *nhi) in tb_probe() argument
3335 tb = tb_domain_alloc(nhi, TB_TIMEOUT, sizeof(*tcm)); in tb_probe()
3359 if (!tb_apple_add_links(nhi) && !tb_acpi_add_links(nhi)) in tb_probe()
H A Dctl.h15 #include "nhi.h"
24 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int index, int timeout_msec,
H A Dtunnel.h123 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, in tb_tunnel_is_pci()
H A 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()
H A Deeprom.c466 struct device *dev = &sw->tb->nhi->pdev->dev; in tb_drom_copy_efi()
H A Dswitch.c221 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()
/linux/include/net/
H A Dnexthop.h287 const struct nh_info *nhi; in nexthop_is_fdb() local
289 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_fdb()
290 return nhi->fdb_nh; in nexthop_is_fdb()
354 struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); in nexthop_mpath_fill_node() local
355 struct fib_nh_common *nhc = &nhi->fib_nhc; in nexthop_mpath_fill_node()
368 const struct nh_info *nhi; in nexthop_is_blackhole() local
380 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_blackhole()
381 return nhi->reject_nh; in nexthop_is_blackhole()
386 struct nh_info *nhi; in nexthop_path_fib_result() local
390 nhi = rcu_dereference(nh->nh_info); in nexthop_path_fib_result()
[all …]
/linux/net/ipv4/
H A Dnexthop.c98 const struct nh_info *nhi) in __nh_notifier_single_info_init() argument
100 nh_info->dev = nhi->fib_nhc.nhc_dev; in __nh_notifier_single_info_init()
101 nh_info->gw_family = nhi->fib_nhc.nhc_gw_family; in __nh_notifier_single_info_init()
103 nh_info->ipv4 = nhi->fib_nhc.nhc_gw.ipv4; in __nh_notifier_single_info_init()
105 nh_info->ipv6 = nhi->fib_nhc.nhc_gw.ipv6; in __nh_notifier_single_info_init()
107 nh_info->id = nhi->nh_parent->id; in __nh_notifier_single_info_init()
108 nh_info->is_reject = nhi->reject_nh; in __nh_notifier_single_info_init()
109 nh_info->is_fdb = nhi->fdb_nh; in __nh_notifier_single_info_init()
110 nh_info->has_encap = !!nhi->fib_nhc.nhc_lwtstate; in __nh_notifier_single_info_init()
116 struct nh_info *nhi = rtnl_dereference(nh->nh_info); in nh_notifier_single_info_init() local
[all …]
/linux/include/linux/
H A Dthunderbolt.h64 * @nhi: Pointer to the NHI structure
77 struct tb_nhi *nhi;
508 * nhi->lock.
509 * @nhi: Pointer to the native host controller interface
533 struct tb_nhi *nhi;
606 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size,
608 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size,
674 return &ring->nhi->pdev->dev; in tb_ring_dma_device()
78 struct tb_nhi *nhi; global() member
534 struct tb_nhi *nhi; global() member
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_router.c5650 int nhi; in mlxsw_sp_nexthop_obj_mp_hw_stats_get() local
5652 for (nhi = 0; nhi < info->num_nh; nhi++) { in mlxsw_sp_nexthop_obj_mp_hw_stats_get()
5653 struct mlxsw_sp_nexthop *nh = &nhgi->nexthops[nhi]; in mlxsw_sp_nexthop_obj_mp_hw_stats_get()
5661 nh_grp_hw_stats_report_delta(info, nhi, packets); in mlxsw_sp_nexthop_obj_mp_hw_stats_get()
5670 int nhi = -1; in mlxsw_sp_nexthop_obj_res_hw_stats_get() local
5678 if (nhi == -1 || info->stats[nhi].id != nh->id) { in mlxsw_sp_nexthop_obj_res_hw_stats_get()
5679 for (nhi = 0; nhi < info->num_nh; nhi++) in mlxsw_sp_nexthop_obj_res_hw_stats_get()
5680 if (info->stats[nhi].id == nh->id) in mlxsw_sp_nexthop_obj_res_hw_stats_get()
5682 if (WARN_ON_ONCE(nhi == info->num_nh)) { in mlxsw_sp_nexthop_obj_res_hw_stats_get()
5683 nhi = -1; in mlxsw_sp_nexthop_obj_res_hw_stats_get()
[all …]
/linux/drivers/net/thunderbolt/
H A Dmain.c927 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()