/Linux-v5.4/drivers/thunderbolt/ |
D | nhi.c | 47 bit += ring->nhi->hop_count; in ring_interrupt_index() 72 index = ring->hop + ring->nhi->hop_count; in ring_interrupt_active() 78 misc = ioread32(ring->nhi->iobase + REG_DMA_MISC); in ring_interrupt_active() 81 iowrite32(misc, ring->nhi->iobase + REG_DMA_MISC); in ring_interrupt_active() 84 ivr_base = ring->nhi->iobase + REG_INT_VEC_ALLOC_BASE; in ring_interrupt_active() 94 old = ioread32(ring->nhi->iobase + reg); in ring_interrupt_active() 100 dev_dbg(&ring->nhi->pdev->dev, in ring_interrupt_active() 105 dev_WARN(&ring->nhi->pdev->dev, in ring_interrupt_active() 109 iowrite32(new, ring->nhi->iobase + reg); in ring_interrupt_active() 117 static void nhi_disable_interrupts(struct tb_nhi *nhi) in nhi_disable_interrupts() argument [all …]
|
D | nhi_ops.c | 25 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 …]
|
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);
|
D | nhi_regs.h | 85 #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
|
D | icm.c | 411 nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0); in icm_fr_save_devices() 559 nhi_mailbox_cmd(tb->nhi, cmd, 1); in icm_fr_disconnect_xdomain_paths() 561 nhi_mailbox_cmd(tb->nhi, cmd, 2); in icm_fr_disconnect_xdomain_paths() 1360 upstream_port = get_upstream_port(tb->nhi->pdev); in icm_ar_is_supported() 1384 struct tb_nhi *nhi = tb->nhi; in icm_ar_get_mode() local 1389 val = ioread32(nhi->iobase + REG_FW_STS); in icm_ar_get_mode() 1396 dev_err(&nhi->pdev->dev, "ICM firmware not authenticated\n"); in icm_ar_get_mode() 1400 return nhi_mailbox_mode(nhi); in icm_ar_get_mode() 1558 struct tb_nhi *nhi = tb->nhi; in icm_icl_set_uuid() local 1561 pci_read_config_dword(nhi->pdev, VS_CAP_10, &uuid[0]); in icm_icl_set_uuid() [all …]
|
D | tunnel.c | 477 static u32 tb_dma_credits(struct tb_port *nhi) in tb_dma_credits() argument 481 max_credits = (nhi->config.nfc_credits & TB_PORT_MAX_CREDITS_MASK) >> in tb_dma_credits() 488 struct tb_port *nhi = tunnel->src_port; in tb_dma_activate() local 491 credits = active ? tb_dma_credits(nhi) : 0; in tb_dma_activate() 492 return tb_port_set_initial_credits(nhi, credits); in tb_dma_activate() 526 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, in tb_tunnel_alloc_dma() argument 540 tunnel->src_port = nhi; in tb_tunnel_alloc_dma() 543 credits = tb_dma_credits(nhi); in tb_tunnel_alloc_dma() 545 path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, "DMA RX"); in tb_tunnel_alloc_dma() 554 path = tb_path_alloc(tb, nhi, transmit_ring, dst, transmit_path, 0, "DMA TX"); in tb_tunnel_alloc_dma()
|
D | ctl.c | 26 struct tb_nhi *nhi; member 42 dev_WARN(&(ctl)->nhi->pdev->dev, format, ## arg) 45 dev_err(&(ctl)->nhi->pdev->dev, format, ## arg) 48 dev_warn(&(ctl)->nhi->pdev->dev, format, ## arg) 51 dev_info(&(ctl)->nhi->pdev->dev, format, ## arg) 54 dev_dbg(&(ctl)->nhi->pdev->dev, format, ## arg) 602 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, event_cb cb, void *cb_data) in tb_ctl_alloc() argument 608 ctl->nhi = nhi; in tb_ctl_alloc() 614 ctl->frame_pool = dma_pool_create("thunderbolt_ctl", &nhi->pdev->dev, in tb_ctl_alloc() 619 ctl->tx = tb_ring_alloc_tx(nhi, 0, 10, RING_FLAG_NO_SUSPEND); in tb_ctl_alloc() [all …]
|
D | tb.h | 444 #define tb_err(tb, fmt, arg...) dev_err(&(tb)->nhi->pdev->dev, fmt, ## arg) 445 #define tb_WARN(tb, fmt, arg...) dev_WARN(&(tb)->nhi->pdev->dev, fmt, ## arg) 446 #define tb_warn(tb, fmt, arg...) dev_warn(&(tb)->nhi->pdev->dev, fmt, ## arg) 447 #define tb_info(tb, fmt, arg...) dev_info(&(tb)->nhi->pdev->dev, fmt, ## arg) 448 #define tb_dbg(tb, fmt, arg...) dev_dbg(&(tb)->nhi->pdev->dev, fmt, ## arg) 476 struct tb *icm_probe(struct tb_nhi *nhi); 477 struct tb *tb_probe(struct tb_nhi *nhi); 488 struct tb *tb_domain_alloc(struct tb_nhi *nhi, size_t privsize);
|
D | Makefile | 3 thunderbolt-objs := nhi.o nhi_ops.o ctl.o tb.o switch.o cap.o path.o tunnel.o eeprom.o
|
D | domain.c | 340 struct tb *tb_domain_alloc(struct tb_nhi *nhi, size_t privsize) in tb_domain_alloc() argument 356 tb->nhi = nhi; in tb_domain_alloc() 367 tb->dev.parent = &nhi->pdev->dev; in tb_domain_alloc() 426 tb->ctl = tb_ctl_alloc(tb->nhi, tb_domain_event_cb, tb); in tb_domain_add()
|
D | tunnel.h | 51 struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi,
|
D | ctl.h | 24 struct tb_ctl *tb_ctl_alloc(struct tb_nhi *nhi, event_cb cb, void *cb_data);
|
D | tb.c | 781 struct tb *tb_probe(struct tb_nhi *nhi) in tb_probe() argument 789 tb = tb_domain_alloc(nhi, sizeof(*tcm)); in tb_probe()
|
D | eeprom.c | 414 struct device *dev = &sw->tb->nhi->pdev->dev; in tb_drom_copy_efi()
|
D | switch.c | 1179 root_port = pci_find_pcie_root_port(sw->tb->nhi->pdev); in nvm_authenticate_start() 1188 root_port = pci_find_pcie_root_port(sw->tb->nhi->pdev); in nvm_authenticate_complete()
|
/Linux-v5.4/include/net/ |
D | nexthop.h | 172 struct nh_info *nhi = rcu_dereference_rtnl(nhe->nh_info); in nexthop_mpath_fill_node() local 173 struct fib_nh_common *nhc = &nhi->fib_nhc; in nexthop_mpath_fill_node() 186 const struct nh_info *nhi; in nexthop_is_blackhole() local 196 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_blackhole() 197 return nhi->reject_nh; in nexthop_is_blackhole() 202 struct nh_info *nhi; in nexthop_path_fib_result() local 206 nhi = rcu_dereference(nh->nh_info); in nexthop_path_fib_result() 207 res->nhc = &nhi->fib_nhc; in nexthop_path_fib_result() 214 struct nh_info *nhi; in nexthop_fib_nhc() local 225 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_fib_nhc() [all …]
|
/Linux-v5.4/net/ipv4/ |
D | nexthop.c | 48 static void nexthop_devhash_add(struct net *net, struct nh_info *nhi) in nexthop_devhash_add() argument 50 struct net_device *dev = nhi->fib_nhc.nhc_dev; in nexthop_devhash_add() 58 hlist_add_head(&nhi->dev_hash, head); in nexthop_devhash_add() 75 struct nh_info *nhi; in nexthop_free_single() local 77 nhi = rcu_dereference_raw(nh->nh_info); in nexthop_free_single() 78 switch (nhi->family) { in nexthop_free_single() 80 fib_nh_release(nh->net, &nhi->fib_nh); in nexthop_free_single() 83 ipv6_stub->fib6_nh_release(&nhi->fib6_nh); in nexthop_free_single() 86 kfree(nhi); in nexthop_free_single() 214 struct nh_info *nhi; in nh_fill_node() local [all …]
|
/Linux-v5.4/include/linux/ |
D | thunderbolt.h | 75 struct tb_nhi *nhi; member 482 struct tb_nhi *nhi; member 554 struct tb_ring *tb_ring_alloc_tx(struct tb_nhi *nhi, int hop, int size, 556 struct tb_ring *tb_ring_alloc_rx(struct tb_nhi *nhi, int hop, int size, 621 return &ring->nhi->pdev->dev; in tb_ring_dma_device()
|
/Linux-v5.4/drivers/pci/ |
D | quirks.c | 3615 struct pci_dev *nhi = NULL; in quirk_apple_wait_for_thunderbolt() local 3631 nhi = pci_get_slot(sibling->subordinate, 0x0); in quirk_apple_wait_for_thunderbolt() 3632 if (!nhi) in quirk_apple_wait_for_thunderbolt() 3634 if (nhi->vendor != PCI_VENDOR_ID_INTEL in quirk_apple_wait_for_thunderbolt() 3635 || (nhi->device != PCI_DEVICE_ID_INTEL_LIGHT_RIDGE && in quirk_apple_wait_for_thunderbolt() 3636 nhi->device != PCI_DEVICE_ID_INTEL_CACTUS_RIDGE_4C && in quirk_apple_wait_for_thunderbolt() 3637 nhi->device != PCI_DEVICE_ID_INTEL_FALCON_RIDGE_2C_NHI && in quirk_apple_wait_for_thunderbolt() 3638 nhi->device != PCI_DEVICE_ID_INTEL_FALCON_RIDGE_4C_NHI) in quirk_apple_wait_for_thunderbolt() 3639 || nhi->class != PCI_CLASS_SYSTEM_OTHER << 8) in quirk_apple_wait_for_thunderbolt() 3642 device_pm_wait_for_dev(&dev->dev, &nhi->dev); in quirk_apple_wait_for_thunderbolt() [all …]
|
/Linux-v5.4/drivers/net/ |
D | thunderbolt.c | 857 ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, in tbnet_open() 868 ring = tb_ring_alloc_rx(xd->tb->nhi, -1, TBNET_RING_SIZE, in tbnet_open()
|