Home
last modified time | relevance | path

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

/linux/drivers/thunderbolt/
H A Dnhi.c58 bit += ring->nhi->hop_count; in ring_interrupt_index()
62 static void nhi_mask_interrupt(struct tb_nhi *nhi, int mask, int ring) in nhi_mask_interrupt() argument
64 if (nhi->quirks & QUIRK_AUTO_CLEAR_INT) { in nhi_mask_interrupt()
67 val = ioread32(nhi->iobase + REG_RING_INTERRUPT_BASE + ring); in nhi_mask_interrupt()
68 iowrite32(val & ~mask, nhi->iobase + REG_RING_INTERRUPT_BASE + ring); in nhi_mask_interrupt()
70 iowrite32(mask, nhi->iobase + REG_RING_INTERRUPT_MASK_CLEAR_BASE + ring); in nhi_mask_interrupt()
74 static void nhi_clear_interrupt(struct tb_nhi *nhi, int ring) in nhi_clear_interrupt() argument
76 if (nhi->quirks & QUIRK_AUTO_CLEAR_INT) in nhi_clear_interrupt()
77 ioread32(nhi->iobase + REG_RING_NOTIFY_BASE + ring); in nhi_clear_interrupt()
79 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 Dicm.c375 static bool icm_firmware_running(const struct tb_nhi *nhi) in icm_firmware_running() argument
379 val = ioread32(nhi->iobase + REG_FW_STS); in icm_firmware_running()
473 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0); in icm_fr_save_devices()
626 nhi_mailbox_cmd(tb->nhi, cmd, 1); in icm_fr_disconnect_xdomain_paths()
628 nhi_mailbox_cmd(tb->nhi, cmd, 2); in icm_fr_disconnect_xdomain_paths()
1466 if (icm_firmware_running(tb->nhi)) in icm_ar_is_supported()
1475 upstream_port = get_upstream_port(tb->nhi->pdev); in icm_ar_is_supported()
1499 struct tb_nhi *nhi = tb->nhi; in icm_ar_get_mode() local
1504 val = ioread32(nhi->iobase + REG_FW_STS); in icm_ar_get_mode()
1511 dev_err(&nhi->pdev->dev, "ICM firmware not authenticated\n"); in icm_ar_get_mode()
[all …]
H A Dctl.c40 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)
653 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, int index, int timeout_msec, in tb_ctl_alloc() argument
661 ctl->nhi = nhi; in tb_ctl_alloc()
669 ctl->frame_pool = dma_pool_create("thunderbolt_ctl", &nhi->pdev->dev, in tb_ctl_alloc()
[all …]
H A Dtb.h727 #define tb_err(tb, fmt, arg...) dev_err(&(tb)->nhi->pdev->dev, fmt, ## arg)
728 #define tb_WARN(tb, fmt, arg...) dev_WARN(&(tb)->nhi->pdev->dev, fmt, ## arg)
729 #define tb_warn(tb, fmt, arg...) dev_warn(&(tb)->nhi->pdev->dev, fmt, ## arg)
730 #define tb_info(tb, fmt, arg...) dev_info(&(tb)->nhi->pdev->dev, fmt, ## arg)
731 #define tb_dbg(tb, fmt, arg...) dev_dbg(&(tb)->nhi->pdev->dev, fmt, ## arg)
759 struct tb *icm_probe(struct tb_nhi *nhi);
760 struct tb *tb_probe(struct tb_nhi *nhi);
772 struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize);
1507 bool tb_acpi_add_links(struct tb_nhi *nhi);
1520 static inline bool tb_acpi_add_links(struct tb_nhi *nhi) { return false; } in tb_acpi_add_links() argument
H A Ddomain.c259 return sysfs_emit(buf, "%d\n", tb->nhi->iommu_dma_protection); in iommu_dma_protection_show()
374 struct tb *tb_domain_alloc(struct tb_nhi *nhi, int timeout_msec, size_t privsize) in tb_domain_alloc() argument
390 tb->nhi = nhi; in tb_domain_alloc()
401 tb->ctl = tb_ctl_alloc(nhi, tb->index, timeout_msec, tb_domain_event_cb, tb); in tb_domain_alloc()
405 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.c3305 static bool tb_apple_add_links(struct tb_nhi *nhi) in tb_apple_add_links() argument
3313 switch (nhi->pdev->device) { in tb_apple_add_links()
3323 upstream = pci_upstream_bridge(nhi->pdev); in tb_apple_add_links()
3350 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_apple_add_links()
3354 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_apple_add_links()
3358 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_apple_add_links()
3366 struct tb *tb_probe(struct tb_nhi *nhi) in tb_probe() argument
3371 tb = tb_domain_alloc(nhi, TB_TIMEOUT, sizeof(*tcm)); in tb_probe()
3395 if (!tb_apple_add_links(nhi) && !tb_acpi_add_links(nhi)) in tb_probe()
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 Dtunnel.c1874 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, in tb_tunnel_alloc_dma() argument
1900 tunnel->src_port = nhi; in tb_tunnel_alloc_dma()
1904 credits = min_not_zero(dma_credits, nhi->sw->max_dma_credits); in tb_tunnel_alloc_dma()
1907 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, in tb_tunnel_alloc_dma()
1919 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, in tb_tunnel_alloc_dma()
H A Deeprom.c468 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.h289 const struct nh_info *nhi; in nexthop_is_fdb()
291 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_fdb()
292 return nhi->fdb_nh; in nexthop_is_fdb()
356 struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); in nexthop_mpath_fill_node()
357 struct fib_nh_common *nhc = &nhi->fib_nhc; in nexthop_mpath_fill_node()
370 const struct nh_info *nhi; in nexthop_is_blackhole()
382 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_blackhole()
383 return nhi->reject_nh;
388 struct nh_info *nhi; in nexthop_path_fib_result()
392 nhi in nexthop_path_fib_result()
287 const struct nh_info *nhi; nexthop_is_fdb() local
354 struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); nexthop_mpath_fill_node() local
368 const struct nh_info *nhi; nexthop_is_blackhole() local
386 struct nh_info *nhi; nexthop_path_fib_result() local
398 struct nh_info *nhi; nexthop_fib_nhc() local
425 struct nh_info *nhi; nexthop_get_nhc_lookup() local
454 struct nh_info *nhi; nexthop_uses_dev() local
512 struct nh_info *nhi; nexthop_fib6_nh() local
541 struct nh_info *nhi; nexthop_path_fib6_result() local
561 struct nh_info *nhi = rcu_dereference_rtnl(nh->nh_info); nexthop_get_family() local
569 struct nh_info *nhi = rcu_dereference_rtnl(nh->nh_info); nexthop_fdb_nhc() local
577 struct nh_info *nhi; nexthop_path_fdb_result() local
[all...]
/linux/drivers/net/thunderbolt/
H A Dmain.c932 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags); in tbnet_open()
951 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags, in tbnet_open()