ppd 1878 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t ppd:1; ppd 1908 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t ppd:1; ppd 90 arch/x86/mm/mem_encrypt_identity.c static void __init sme_clear_pgd(struct sme_populate_pgd_data *ppd) ppd 95 arch/x86/mm/mem_encrypt_identity.c pgd_start = ppd->vaddr & PGDIR_MASK; ppd 96 arch/x86/mm/mem_encrypt_identity.c pgd_end = ppd->vaddr_end & PGDIR_MASK; ppd 100 arch/x86/mm/mem_encrypt_identity.c pgd_p = ppd->pgd + pgd_index(ppd->vaddr); ppd 105 arch/x86/mm/mem_encrypt_identity.c static pud_t __init *sme_prepare_pgd(struct sme_populate_pgd_data *ppd) ppd 112 arch/x86/mm/mem_encrypt_identity.c pgd = ppd->pgd + pgd_index(ppd->vaddr); ppd 114 arch/x86/mm/mem_encrypt_identity.c p4d = ppd->pgtable_area; ppd 116 arch/x86/mm/mem_encrypt_identity.c ppd->pgtable_area += sizeof(*p4d) * PTRS_PER_P4D; ppd 120 arch/x86/mm/mem_encrypt_identity.c p4d = p4d_offset(pgd, ppd->vaddr); ppd 122 arch/x86/mm/mem_encrypt_identity.c pud = ppd->pgtable_area; ppd 124 arch/x86/mm/mem_encrypt_identity.c ppd->pgtable_area += sizeof(*pud) * PTRS_PER_PUD; ppd 128 arch/x86/mm/mem_encrypt_identity.c pud = pud_offset(p4d, ppd->vaddr); ppd 130 arch/x86/mm/mem_encrypt_identity.c pmd = ppd->pgtable_area; ppd 132 arch/x86/mm/mem_encrypt_identity.c ppd->pgtable_area += sizeof(*pmd) * PTRS_PER_PMD; ppd 142 arch/x86/mm/mem_encrypt_identity.c static void __init sme_populate_pgd_large(struct sme_populate_pgd_data *ppd) ppd 147 arch/x86/mm/mem_encrypt_identity.c pud = sme_prepare_pgd(ppd); ppd 151 arch/x86/mm/mem_encrypt_identity.c pmd = pmd_offset(pud, ppd->vaddr); ppd 155 arch/x86/mm/mem_encrypt_identity.c set_pmd(pmd, __pmd(ppd->paddr | ppd->pmd_flags)); ppd 158 arch/x86/mm/mem_encrypt_identity.c static void __init sme_populate_pgd(struct sme_populate_pgd_data *ppd) ppd 164 arch/x86/mm/mem_encrypt_identity.c pud = sme_prepare_pgd(ppd); ppd 168 arch/x86/mm/mem_encrypt_identity.c pmd = pmd_offset(pud, ppd->vaddr); ppd 170 arch/x86/mm/mem_encrypt_identity.c pte = ppd->pgtable_area; ppd 172 arch/x86/mm/mem_encrypt_identity.c ppd->pgtable_area += sizeof(*pte) * PTRS_PER_PTE; ppd 179 arch/x86/mm/mem_encrypt_identity.c pte = pte_offset_map(pmd, ppd->vaddr); ppd 181 arch/x86/mm/mem_encrypt_identity.c set_pte(pte, __pte(ppd->paddr | ppd->pte_flags)); ppd 184 arch/x86/mm/mem_encrypt_identity.c static void __init __sme_map_range_pmd(struct sme_populate_pgd_data *ppd) ppd 186 arch/x86/mm/mem_encrypt_identity.c while (ppd->vaddr < ppd->vaddr_end) { ppd 187 arch/x86/mm/mem_encrypt_identity.c sme_populate_pgd_large(ppd); ppd 189 arch/x86/mm/mem_encrypt_identity.c ppd->vaddr += PMD_PAGE_SIZE; ppd 190 arch/x86/mm/mem_encrypt_identity.c ppd->paddr += PMD_PAGE_SIZE; ppd 194 arch/x86/mm/mem_encrypt_identity.c static void __init __sme_map_range_pte(struct sme_populate_pgd_data *ppd) ppd 196 arch/x86/mm/mem_encrypt_identity.c while (ppd->vaddr < ppd->vaddr_end) { ppd 197 arch/x86/mm/mem_encrypt_identity.c sme_populate_pgd(ppd); ppd 199 arch/x86/mm/mem_encrypt_identity.c ppd->vaddr += PAGE_SIZE; ppd 200 arch/x86/mm/mem_encrypt_identity.c ppd->paddr += PAGE_SIZE; ppd 204 arch/x86/mm/mem_encrypt_identity.c static void __init __sme_map_range(struct sme_populate_pgd_data *ppd, ppd 209 arch/x86/mm/mem_encrypt_identity.c ppd->pmd_flags = pmd_flags; ppd 210 arch/x86/mm/mem_encrypt_identity.c ppd->pte_flags = pte_flags; ppd 213 arch/x86/mm/mem_encrypt_identity.c vaddr_end = ppd->vaddr_end; ppd 216 arch/x86/mm/mem_encrypt_identity.c ppd->vaddr_end = ALIGN(ppd->vaddr, PMD_PAGE_SIZE); ppd 217 arch/x86/mm/mem_encrypt_identity.c __sme_map_range_pte(ppd); ppd 220 arch/x86/mm/mem_encrypt_identity.c ppd->vaddr_end = vaddr_end & PMD_PAGE_MASK; ppd 221 arch/x86/mm/mem_encrypt_identity.c __sme_map_range_pmd(ppd); ppd 224 arch/x86/mm/mem_encrypt_identity.c ppd->vaddr_end = vaddr_end; ppd 225 arch/x86/mm/mem_encrypt_identity.c __sme_map_range_pte(ppd); ppd 228 arch/x86/mm/mem_encrypt_identity.c static void __init sme_map_range_encrypted(struct sme_populate_pgd_data *ppd) ppd 230 arch/x86/mm/mem_encrypt_identity.c __sme_map_range(ppd, PMD_FLAGS_ENC, PTE_FLAGS_ENC); ppd 233 arch/x86/mm/mem_encrypt_identity.c static void __init sme_map_range_decrypted(struct sme_populate_pgd_data *ppd) ppd 235 arch/x86/mm/mem_encrypt_identity.c __sme_map_range(ppd, PMD_FLAGS_DEC, PTE_FLAGS_DEC); ppd 238 arch/x86/mm/mem_encrypt_identity.c static void __init sme_map_range_decrypted_wp(struct sme_populate_pgd_data *ppd) ppd 240 arch/x86/mm/mem_encrypt_identity.c __sme_map_range(ppd, PMD_FLAGS_DEC_WP, PTE_FLAGS_DEC_WP); ppd 286 arch/x86/mm/mem_encrypt_identity.c struct sme_populate_pgd_data ppd; ppd 377 arch/x86/mm/mem_encrypt_identity.c ppd.pgtable_area = (void *)execute_end; ppd 383 arch/x86/mm/mem_encrypt_identity.c ppd.pgd = (pgd_t *)native_read_cr3_pa(); ppd 384 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = workarea_start; ppd 385 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = workarea_start; ppd 386 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = workarea_end; ppd 387 arch/x86/mm/mem_encrypt_identity.c sme_map_range_decrypted(&ppd); ppd 398 arch/x86/mm/mem_encrypt_identity.c ppd.pgd = ppd.pgtable_area; ppd 399 arch/x86/mm/mem_encrypt_identity.c memset(ppd.pgd, 0, sizeof(pgd_t) * PTRS_PER_PGD); ppd 400 arch/x86/mm/mem_encrypt_identity.c ppd.pgtable_area += sizeof(pgd_t) * PTRS_PER_PGD; ppd 418 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = kernel_start; ppd 419 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = kernel_start; ppd 420 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = kernel_end; ppd 421 arch/x86/mm/mem_encrypt_identity.c sme_map_range_encrypted(&ppd); ppd 424 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = kernel_start; ppd 425 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = kernel_start + decrypted_base; ppd 426 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = kernel_end + decrypted_base; ppd 427 arch/x86/mm/mem_encrypt_identity.c sme_map_range_decrypted_wp(&ppd); ppd 431 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = initrd_start; ppd 432 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = initrd_start; ppd 433 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = initrd_end; ppd 434 arch/x86/mm/mem_encrypt_identity.c sme_map_range_encrypted(&ppd); ppd 438 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = initrd_start; ppd 439 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = initrd_start + decrypted_base; ppd 440 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = initrd_end + decrypted_base; ppd 441 arch/x86/mm/mem_encrypt_identity.c sme_map_range_decrypted_wp(&ppd); ppd 445 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = workarea_start; ppd 446 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = workarea_start; ppd 447 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = workarea_end; ppd 448 arch/x86/mm/mem_encrypt_identity.c sme_map_range_decrypted(&ppd); ppd 450 arch/x86/mm/mem_encrypt_identity.c ppd.paddr = workarea_start; ppd 451 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = workarea_start + decrypted_base; ppd 452 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = workarea_end + decrypted_base; ppd 453 arch/x86/mm/mem_encrypt_identity.c sme_map_range_decrypted(&ppd); ppd 457 arch/x86/mm/mem_encrypt_identity.c kernel_len, workarea_start, (unsigned long)ppd.pgd); ppd 462 arch/x86/mm/mem_encrypt_identity.c (unsigned long)ppd.pgd); ppd 469 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = kernel_start + decrypted_base; ppd 470 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = kernel_end + decrypted_base; ppd 471 arch/x86/mm/mem_encrypt_identity.c sme_clear_pgd(&ppd); ppd 474 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = initrd_start + decrypted_base; ppd 475 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = initrd_end + decrypted_base; ppd 476 arch/x86/mm/mem_encrypt_identity.c sme_clear_pgd(&ppd); ppd 479 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr = workarea_start + decrypted_base; ppd 480 arch/x86/mm/mem_encrypt_identity.c ppd.vaddr_end = workarea_end + decrypted_base; ppd 481 arch/x86/mm/mem_encrypt_identity.c sme_clear_pgd(&ppd); ppd 1057 drivers/infiniband/hw/hfi1/chip.c static void set_partition_keys(struct hfi1_pportdata *ppd); ppd 1059 drivers/infiniband/hw/hfi1/chip.c static const char *link_state_reason_name(struct hfi1_pportdata *ppd, ppd 1066 drivers/infiniband/hw/hfi1/chip.c static void update_statusp(struct hfi1_pportdata *ppd, u32 state); ppd 1067 drivers/infiniband/hw/hfi1/chip.c static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd, ppd 1069 drivers/infiniband/hw/hfi1/chip.c static int wait_logical_linkstate(struct hfi1_pportdata *ppd, u32 state, ppd 1071 drivers/infiniband/hw/hfi1/chip.c static void log_state_transition(struct hfi1_pportdata *ppd, u32 state); ppd 1072 drivers/infiniband/hw/hfi1/chip.c static void log_physical_state(struct hfi1_pportdata *ppd, u32 state); ppd 1073 drivers/infiniband/hw/hfi1/chip.c static int wait_physical_linkstate(struct hfi1_pportdata *ppd, u32 state, ppd 1075 drivers/infiniband/hw/hfi1/chip.c static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd, ppd 1084 drivers/infiniband/hw/hfi1/chip.c static void clear_full_mgmt_pkey(struct hfi1_pportdata *ppd); ppd 1087 drivers/infiniband/hw/hfi1/chip.c static void update_xmit_counters(struct hfi1_pportdata *ppd, u16 link_width); ppd 1499 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1503 drivers/infiniband/hw/hfi1/chip.c return read_write_csr(ppd->dd, entry->csr, mode, data); ppd 1509 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1521 drivers/infiniband/hw/hfi1/chip.c val = read_write_csr(ppd->dd, csr, mode, data); ppd 1549 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1553 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->link_downed, mode, data); ppd 1559 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1563 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->link_up, mode, data); ppd 1570 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)context; ppd 1574 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->unknown_frame_count, mode, data); ppd 1580 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)context; ppd 1585 drivers/infiniband/hw/hfi1/chip.c counter = &ppd->port_xmit_discards; ppd 1587 drivers/infiniband/hw/hfi1/chip.c counter = &ppd->port_xmit_discards_vl[vl]; ppd 1591 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, counter, mode, data); ppd 1598 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1603 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->port_xmit_constraint_errors, ppd 1610 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = context; ppd 1615 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->port_rcv_constraint_errors, ppd 4077 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)context; \ ppd 4078 drivers/infiniband/hw/hfi1/chip.c return read_write_cpu(ppd->dd, &ppd->ibport_data.rvp.z_ ##cntr, \ ppd 4079 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.cntr, vl, \ ppd 4091 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)context; \ ppd 4096 drivers/infiniband/hw/hfi1/chip.c return read_write_sw(ppd->dd, &ppd->ibport_data.rvp.n_ ##cntr, \ ppd 5574 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 5578 drivers/infiniband/hw/hfi1/chip.c ppd->port_error_action & OPA_PI_MASK_EX_BUFFER_OVERRUN) { ppd 5581 drivers/infiniband/hw/hfi1/chip.c ppd, OPA_LINKDOWN_REASON_EXCESSIVE_BUFFER_OVERRUN, 0, ppd 5583 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_bounce_work); ppd 5678 drivers/infiniband/hw/hfi1/chip.c static inline void __count_port_discards(struct hfi1_pportdata *ppd) ppd 5680 drivers/infiniband/hw/hfi1/chip.c incr_cntr64(&ppd->port_xmit_discards); ppd 5700 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 5740 drivers/infiniband/hw/hfi1/chip.c __count_port_discards(ppd); ppd 5742 drivers/infiniband/hw/hfi1/chip.c incr_cntr64(&ppd->port_xmit_discards_vl[vl]); ppd 5744 drivers/infiniband/hw/hfi1/chip.c incr_cntr64(&ppd->port_xmit_discards_vl ppd 6096 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 6101 drivers/infiniband/hw/hfi1/chip.c if (!qsfp_mod_present(ppd)) { ppd 6105 drivers/infiniband/hw/hfi1/chip.c ppd->driver_link_ready = 0; ppd 6111 drivers/infiniband/hw/hfi1/chip.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 6116 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.cache_valid = 0; ppd 6117 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.reset_needed = 0; ppd 6118 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.limiting_active = 0; ppd 6119 drivers/infiniband/hw/hfi1/chip.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, ppd 6125 drivers/infiniband/hw/hfi1/chip.c if ((ppd->offline_disabled_reason > ppd 6128 drivers/infiniband/hw/hfi1/chip.c (ppd->offline_disabled_reason == ppd 6130 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 6134 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == HLS_DN_POLL) { ppd 6141 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_down_work); ppd 6147 drivers/infiniband/hw/hfi1/chip.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 6148 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.cache_valid = 0; ppd 6149 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.cache_refresh_required = 1; ppd 6150 drivers/infiniband/hw/hfi1/chip.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, ppd 6161 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 6169 drivers/infiniband/hw/hfi1/chip.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 6170 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.check_interrupt_flags = 1; ppd 6171 drivers/infiniband/hw/hfi1/chip.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, flags); ppd 6175 drivers/infiniband/hw/hfi1/chip.c if (qsfp_mod_present(ppd)) ppd 6176 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->qsfp_info.qsfp_work); ppd 6240 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 6250 drivers/infiniband/hw/hfi1/chip.c mutex_lock(&ppd->hls_lock); ppd 6252 drivers/infiniband/hw/hfi1/chip.c while (!mutex_trylock(&ppd->hls_lock)) ppd 6257 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_DOWN) { ppd 6259 drivers/infiniband/hw/hfi1/chip.c __func__, link_state_name(ppd->host_link_state)); ppd 6276 drivers/infiniband/hw/hfi1/chip.c mutex_unlock(&ppd->hls_lock); ppd 6357 drivers/infiniband/hw/hfi1/chip.c static void handle_8051_request(struct hfi1_pportdata *ppd) ppd 6359 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 6488 drivers/infiniband/hw/hfi1/chip.c static void set_linkup_defaults(struct hfi1_pportdata *ppd) ppd 6490 drivers/infiniband/hw/hfi1/chip.c ppd->sm_trap_qp = 0x0; ppd 6491 drivers/infiniband/hw/hfi1/chip.c ppd->sa_qp = 0x1; ppd 6680 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 6682 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 6705 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & (HLS_UP_INIT | HLS_UP_ARMED)) ppd 6706 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_normal = 1; ppd 6715 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == HLS_UP_ARMED && ppd 6716 drivers/infiniband/hw/hfi1/chip.c ppd->is_active_optimize_enabled) { ppd 6717 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_normal = 1; ppd 6718 drivers/infiniband/hw/hfi1/chip.c ret = set_link_state(ppd, HLS_UP_ACTIVE); ppd 6760 drivers/infiniband/hw/hfi1/chip.c void start_freeze_handling(struct hfi1_pportdata *ppd, int flags) ppd 6762 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 6786 drivers/infiniband/hw/hfi1/chip.c hfi1_set_uevent_bits(ppd, _HFI1_EVENT_FROZEN_BIT); ppd 6794 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->hfi1_wq, &ppd->freeze_work); ppd 6893 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 6895 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 6966 drivers/infiniband/hw/hfi1/chip.c static void update_xmit_counters(struct hfi1_pportdata *ppd, u16 link_width) ppd 6973 drivers/infiniband/hw/hfi1/chip.c link_speed = get_link_speed(ppd->link_speed_active); ppd 6980 drivers/infiniband/hw/hfi1/chip.c get_xmit_wait_counters(ppd, tx_width, link_speed, i); ppd 6990 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 6992 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 6994 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_UP_INIT); ppd 7006 drivers/infiniband/hw/hfi1/chip.c set_linkup_defaults(ppd); ppd 7018 drivers/infiniband/hw/hfi1/chip.c if ((ppd->link_speed_active & ppd->link_speed_enabled) == 0) { ppd 7022 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active, ppd->link_speed_enabled); ppd 7023 drivers/infiniband/hw/hfi1/chip.c set_link_down_reason(ppd, OPA_LINKDOWN_REASON_SPEED_POLICY, 0, ppd 7025 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 7026 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 7034 drivers/infiniband/hw/hfi1/chip.c static void reset_neighbor_info(struct hfi1_pportdata *ppd) ppd 7036 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_guid = 0; ppd 7037 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_port_number = 0; ppd 7038 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_type = 0; ppd 7039 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_fm_security = 0; ppd 7120 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 7125 drivers/infiniband/hw/hfi1/chip.c if ((ppd->host_link_state & ppd 7127 drivers/infiniband/hw/hfi1/chip.c ppd->port_type == PORT_TYPE_FIXED) ppd 7128 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 7132 drivers/infiniband/hw/hfi1/chip.c was_up = !!(ppd->host_link_state & HLS_UP); ppd 7133 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 7134 drivers/infiniband/hw/hfi1/chip.c xchg(&ppd->is_link_down_queued, 0); ppd 7139 drivers/infiniband/hw/hfi1/chip.c read_link_down_reason(ppd->dd, &link_down_reason); ppd 7143 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "%sUnexpected link down\n", ppd 7151 drivers/infiniband/hw/hfi1/chip.c read_planned_down_reason_code(ppd->dd, &neigh_reason); ppd 7152 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 7158 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 7163 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "%sUnknown reason 0x%x\n", ppd 7179 drivers/infiniband/hw/hfi1/chip.c set_link_down_reason(ppd, lcl_reason, neigh_reason, 0); ppd 7182 drivers/infiniband/hw/hfi1/chip.c if (was_up && ppd->local_link_down_reason.sma == 0 && ppd 7183 drivers/infiniband/hw/hfi1/chip.c ppd->neigh_link_down_reason.sma == 0) { ppd 7184 drivers/infiniband/hw/hfi1/chip.c ppd->local_link_down_reason.sma = ppd 7185 drivers/infiniband/hw/hfi1/chip.c ppd->local_link_down_reason.latest; ppd 7186 drivers/infiniband/hw/hfi1/chip.c ppd->neigh_link_down_reason.sma = ppd 7187 drivers/infiniband/hw/hfi1/chip.c ppd->neigh_link_down_reason.latest; ppd 7190 drivers/infiniband/hw/hfi1/chip.c reset_neighbor_info(ppd); ppd 7193 drivers/infiniband/hw/hfi1/chip.c clear_rcvctrl(ppd->dd, RCV_CTRL_RCV_PORT_ENABLE_SMASK); ppd 7199 drivers/infiniband/hw/hfi1/chip.c if (ppd->port_type == PORT_TYPE_QSFP && !qsfp_mod_present(ppd)) ppd 7200 drivers/infiniband/hw/hfi1/chip.c dc_shutdown(ppd->dd); ppd 7202 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 7207 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 7213 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_UP) { ppd 7214 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 7215 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 7217 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "%s: link not up (%s), nothing to do\n", ppd 7218 drivers/infiniband/hw/hfi1/chip.c __func__, link_state_name(ppd->host_link_state)); ppd 7276 drivers/infiniband/hw/hfi1/chip.c static void clear_full_mgmt_pkey(struct hfi1_pportdata *ppd) ppd 7278 drivers/infiniband/hw/hfi1/chip.c if (ppd->pkeys[2] != 0) { ppd 7279 drivers/infiniband/hw/hfi1/chip.c ppd->pkeys[2] = 0; ppd 7280 drivers/infiniband/hw/hfi1/chip.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0); ppd 7281 drivers/infiniband/hw/hfi1/chip.c hfi1_event_pkey_change(ppd->dd, ppd->port); ppd 7418 drivers/infiniband/hw/hfi1/chip.c void get_linkup_link_widths(struct hfi1_pportdata *ppd) ppd 7423 drivers/infiniband/hw/hfi1/chip.c get_linkup_widths(ppd->dd, &tx_width, &rx_width); ppd 7426 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_active = tx_width; ppd 7428 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_tx_active = ppd->link_width_active; ppd 7429 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active = ppd->link_width_active; ppd 7431 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_enabled = ppd->link_width_downgrade_supported; ppd 7433 drivers/infiniband/hw/hfi1/chip.c ppd->current_egress_rate = active_egress_rate(ppd); ppd 7443 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 7445 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 7462 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_VERIFY_CAP); ppd 7507 drivers/infiniband/hw/hfi1/chip.c crc_mask = ppd->port_crc_mode_enabled & partner_supported_crc; ppd 7533 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = 0; /* invalid value */ ppd 7538 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = OPA_LINK_SPEED_12_5G; ppd 7541 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = OPA_LINK_SPEED_25G; ppd 7546 drivers/infiniband/hw/hfi1/chip.c u8 rate = remote_tx_rate & ppd->local_tx_rate; ppd 7549 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = OPA_LINK_SPEED_25G; ppd 7551 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = OPA_LINK_SPEED_12_5G; ppd 7553 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_speed_active == 0) { ppd 7556 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_active = OPA_LINK_SPEED_25G; ppd 7566 drivers/infiniband/hw/hfi1/chip.c ppd->port_ltp_crc_mode = cap_to_port_ltp(link_crc_mask) << 8; ppd 7568 drivers/infiniband/hw/hfi1/chip.c ppd->port_ltp_crc_mode |= ppd 7569 drivers/infiniband/hw/hfi1/chip.c cap_to_port_ltp(ppd->port_crc_mode_enabled) << 4; ppd 7571 drivers/infiniband/hw/hfi1/chip.c ppd->port_ltp_crc_mode |= lcb_to_port_ltp(crc_val); ppd 7601 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_GOING_UP); ppd 7619 drivers/infiniband/hw/hfi1/chip.c bool apply_link_downgrade_policy(struct hfi1_pportdata *ppd, ppd 7631 drivers/infiniband/hw/hfi1/chip.c mutex_lock(&ppd->hls_lock); ppd 7633 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_DOWN) { ppd 7635 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_GOING_UP) { ppd 7637 drivers/infiniband/hw/hfi1/chip.c mutex_unlock(&ppd->hls_lock); ppd 7641 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 7648 drivers/infiniband/hw/hfi1/chip.c lwde = ppd->link_width_downgrade_enabled; ppd 7651 drivers/infiniband/hw/hfi1/chip.c get_link_widths(ppd->dd, &tx, &rx); ppd 7652 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_tx_active = tx; ppd 7653 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active = rx; ppd 7656 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_width_downgrade_tx_active == 0 || ppd 7657 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active == 0) { ppd 7659 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, "Link downgrade is really a link down, ignoring\n"); ppd 7665 drivers/infiniband/hw/hfi1/chip.c if ((ppd->link_width_active != ppd 7666 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_tx_active) || ppd 7667 drivers/infiniband/hw/hfi1/chip.c (ppd->link_width_active != ppd 7668 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active)) { ppd 7669 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 7671 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 7673 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_active, ppd 7674 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_tx_active, ppd 7675 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active); ppd 7679 drivers/infiniband/hw/hfi1/chip.c } else if ((lwde & ppd->link_width_downgrade_tx_active) == 0 || ppd 7680 drivers/infiniband/hw/hfi1/chip.c (lwde & ppd->link_width_downgrade_rx_active) == 0) { ppd 7682 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 7684 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 7686 drivers/infiniband/hw/hfi1/chip.c lwde, ppd->link_width_downgrade_tx_active, ppd 7687 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active); ppd 7693 drivers/infiniband/hw/hfi1/chip.c mutex_unlock(&ppd->hls_lock); ppd 7696 drivers/infiniband/hw/hfi1/chip.c set_link_down_reason(ppd, OPA_LINKDOWN_REASON_WIDTH_POLICY, 0, ppd 7698 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 7699 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 7712 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 7715 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "8051: Link width downgrade\n"); ppd 7716 drivers/infiniband/hw/hfi1/chip.c if (apply_link_downgrade_policy(ppd, true)) ppd 7717 drivers/infiniband/hw/hfi1/chip.c update_xmit_counters(ppd, ppd->link_width_downgrade_tx_active); ppd 7752 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 7778 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state ppd 7791 drivers/infiniband/hw/hfi1/chip.c ppd->unknown_frame_count++; ppd 7817 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->sma_message_work); ppd 7822 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_up_work); ppd 7826 drivers/infiniband/hw/hfi1/chip.c handle_8051_request(ppd); ppd 7830 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_vc_work); ppd 7845 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_downgrade_work); ppd 7883 drivers/infiniband/hw/hfi1/chip.c if ((ppd->host_link_state & ppd 7885 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled == 0) { ppd 7887 drivers/infiniband/hw/hfi1/chip.c __func__, ppd->host_link_state, ppd 7888 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled); ppd 7890 drivers/infiniband/hw/hfi1/chip.c if (xchg(&ppd->is_link_down_queued, 1) == 1) ppd 7895 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_down_work); ppd 7950 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 7965 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 7967 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_downed < (u32)UINT_MAX) ppd 7968 drivers/infiniband/hw/hfi1/chip.c ppd->link_downed++; ppd 7993 drivers/infiniband/hw/hfi1/chip.c if (ppd->port_error_action & ppd 8012 drivers/infiniband/hw/hfi1/chip.c do_bounce = ppd->port_error_action & ppd 8064 drivers/infiniband/hw/hfi1/chip.c do_bounce = ppd->port_error_action & ppd 8102 drivers/infiniband/hw/hfi1/chip.c set_link_down_reason(ppd, lcl_reason, 0, lcl_reason); ppd 8103 drivers/infiniband/hw/hfi1/chip.c queue_work(ppd->link_wq, &ppd->link_bounce_work); ppd 8605 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 8608 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_UP) ppd 8611 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & (HLS_GOING_UP | HLS_GOING_OFFLINE)) { ppd 8654 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 8657 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_UP) ppd 8660 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & (HLS_GOING_UP | HLS_GOING_OFFLINE)) ppd 9303 drivers/infiniband/hw/hfi1/chip.c static int set_local_link_attributes(struct hfi1_pportdata *ppd) ppd 9305 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9316 drivers/infiniband/hw/hfi1/chip.c &rx_polarity_inversion, &ppd->local_tx_rate); ppd 9322 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_speed_enabled & OPA_LINK_SPEED_25G) ppd 9323 drivers/infiniband/hw/hfi1/chip.c ppd->local_tx_rate = 1; ppd 9325 drivers/infiniband/hw/hfi1/chip.c ppd->local_tx_rate = 0; ppd 9328 drivers/infiniband/hw/hfi1/chip.c ppd->local_tx_rate = 0; ppd 9329 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_speed_enabled & OPA_LINK_SPEED_25G) ppd 9330 drivers/infiniband/hw/hfi1/chip.c ppd->local_tx_rate |= 2; ppd 9331 drivers/infiniband/hw/hfi1/chip.c if (ppd->link_speed_enabled & OPA_LINK_SPEED_12_5G) ppd 9332 drivers/infiniband/hw/hfi1/chip.c ppd->local_tx_rate |= 1; ppd 9337 drivers/infiniband/hw/hfi1/chip.c rx_polarity_inversion, ppd->local_tx_rate); ppd 9360 drivers/infiniband/hw/hfi1/chip.c ppd->port_crc_mode_enabled); ppd 9381 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_enabled)); ppd 9402 drivers/infiniband/hw/hfi1/chip.c int start_link(struct hfi1_pportdata *ppd) ppd 9408 drivers/infiniband/hw/hfi1/chip.c tune_serdes(ppd); ppd 9410 drivers/infiniband/hw/hfi1/chip.c if (!ppd->driver_link_ready) { ppd 9411 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 9422 drivers/infiniband/hw/hfi1/chip.c clear_full_mgmt_pkey(ppd); ppd 9424 drivers/infiniband/hw/hfi1/chip.c return set_link_state(ppd, HLS_DN_POLL); ppd 9427 drivers/infiniband/hw/hfi1/chip.c static void wait_for_qsfp_init(struct hfi1_pportdata *ppd) ppd 9429 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9461 drivers/infiniband/hw/hfi1/chip.c static void set_qsfp_int_n(struct hfi1_pportdata *ppd, u8 enable) ppd 9463 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9481 drivers/infiniband/hw/hfi1/chip.c int reset_qsfp(struct hfi1_pportdata *ppd) ppd 9483 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9487 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 0); ppd 9504 drivers/infiniband/hw/hfi1/chip.c wait_for_qsfp_init(ppd); ppd 9510 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 1); ppd 9517 drivers/infiniband/hw/hfi1/chip.c return set_qsfp_tx(ppd, 0); ppd 9520 drivers/infiniband/hw/hfi1/chip.c static int handle_qsfp_error_conditions(struct hfi1_pportdata *ppd, ppd 9523 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9538 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_DOWN) ppd 9623 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 9627 drivers/infiniband/hw/hfi1/chip.c ppd = qd->ppd; ppd 9628 drivers/infiniband/hw/hfi1/chip.c dd = ppd->dd; ppd 9631 drivers/infiniband/hw/hfi1/chip.c if (!qsfp_mod_present(ppd)) ppd 9634 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == HLS_DN_DISABLE) { ppd 9635 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 9648 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 0); ppd 9650 drivers/infiniband/hw/hfi1/chip.c wait_for_qsfp_init(ppd); ppd 9656 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 1); ppd 9658 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 9664 drivers/infiniband/hw/hfi1/chip.c if (one_qsfp_read(ppd, dd->hfi1_id, 6, ppd 9673 drivers/infiniband/hw/hfi1/chip.c ppd, qsfp_interrupt_status); ppd 9674 drivers/infiniband/hw/hfi1/chip.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 9675 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.check_interrupt_flags = 0; ppd 9676 drivers/infiniband/hw/hfi1/chip.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, ppd 9684 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = dd->pport; ppd 9694 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 0); ppd 9697 drivers/infiniband/hw/hfi1/chip.c if (qsfp_mod_present(ppd)) ppd 9735 drivers/infiniband/hw/hfi1/chip.c static int test_qsfp_read(struct hfi1_pportdata *ppd) ppd 9744 drivers/infiniband/hw/hfi1/chip.c if (ppd->port_type != PORT_TYPE_QSFP || !qsfp_mod_present(ppd)) ppd 9748 drivers/infiniband/hw/hfi1/chip.c ret = one_qsfp_read(ppd, ppd->dd->hfi1_id, 2, &status, 1); ppd 9770 drivers/infiniband/hw/hfi1/chip.c static void try_start_link(struct hfi1_pportdata *ppd) ppd 9772 drivers/infiniband/hw/hfi1/chip.c if (test_qsfp_read(ppd)) { ppd 9774 drivers/infiniband/hw/hfi1/chip.c if (ppd->qsfp_retry_count >= MAX_QSFP_RETRIES) { ppd 9775 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, "QSFP not responding, giving up\n"); ppd 9778 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 9780 drivers/infiniband/hw/hfi1/chip.c (int)ppd->qsfp_retry_count); ppd 9781 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_retry_count++; ppd 9782 drivers/infiniband/hw/hfi1/chip.c queue_delayed_work(ppd->link_wq, &ppd->start_link_work, ppd 9786 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_retry_count = 0; ppd 9788 drivers/infiniband/hw/hfi1/chip.c start_link(ppd); ppd 9796 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 9798 drivers/infiniband/hw/hfi1/chip.c try_start_link(ppd); ppd 9801 drivers/infiniband/hw/hfi1/chip.c int bringup_serdes(struct hfi1_pportdata *ppd) ppd 9803 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9810 drivers/infiniband/hw/hfi1/chip.c guid = ppd->guids[HFI1_PORT_GUID_INDEX]; ppd 9813 drivers/infiniband/hw/hfi1/chip.c guid = dd->base_guid + ppd->port - 1; ppd 9814 drivers/infiniband/hw/hfi1/chip.c ppd->guids[HFI1_PORT_GUID_INDEX] = guid; ppd 9818 drivers/infiniband/hw/hfi1/chip.c ppd->linkinit_reason = OPA_LINKINIT_REASON_LINKUP; ppd 9829 drivers/infiniband/hw/hfi1/chip.c get_port_type(ppd); ppd 9830 drivers/infiniband/hw/hfi1/chip.c if (ppd->port_type == PORT_TYPE_QSFP) { ppd 9831 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 0); ppd 9832 drivers/infiniband/hw/hfi1/chip.c wait_for_qsfp_init(ppd); ppd 9833 drivers/infiniband/hw/hfi1/chip.c set_qsfp_int_n(ppd, 1); ppd 9836 drivers/infiniband/hw/hfi1/chip.c try_start_link(ppd); ppd 9840 drivers/infiniband/hw/hfi1/chip.c void hfi1_quiet_serdes(struct hfi1_pportdata *ppd) ppd 9842 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9851 drivers/infiniband/hw/hfi1/chip.c ppd->driver_link_ready = 0; ppd 9852 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled = 0; ppd 9854 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_retry_count = MAX_QSFP_RETRIES; /* prevent more retries */ ppd 9855 drivers/infiniband/hw/hfi1/chip.c flush_delayed_work(&ppd->start_link_work); ppd 9856 drivers/infiniband/hw/hfi1/chip.c cancel_delayed_work_sync(&ppd->start_link_work); ppd 9858 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 9860 drivers/infiniband/hw/hfi1/chip.c set_link_down_reason(ppd, OPA_LINKDOWN_REASON_REBOOT, 0, ppd 9862 drivers/infiniband/hw/hfi1/chip.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 9866 drivers/infiniband/hw/hfi1/chip.c cancel_work_sync(&ppd->freeze_work); ppd 9871 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 9874 drivers/infiniband/hw/hfi1/chip.c ppd = (struct hfi1_pportdata *)(dd + 1); ppd 9875 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 9876 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_acks = NULL; ppd 9877 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_qacks = NULL; ppd 9878 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_acks = alloc_percpu(u64); ppd 9879 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_qacks = alloc_percpu(u64); ppd 9880 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_delayed_comp = alloc_percpu(u64); ppd 9881 drivers/infiniband/hw/hfi1/chip.c if (!ppd->ibport_data.rvp.rc_acks || ppd 9882 drivers/infiniband/hw/hfi1/chip.c !ppd->ibport_data.rvp.rc_delayed_comp || ppd 9883 drivers/infiniband/hw/hfi1/chip.c !ppd->ibport_data.rvp.rc_qacks) ppd 9978 drivers/infiniband/hw/hfi1/chip.c int hfi1_get_ib_cfg(struct hfi1_pportdata *ppd, int which) ppd 9980 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 9985 drivers/infiniband/hw/hfi1/chip.c val = ppd->link_width_enabled; ppd 9988 drivers/infiniband/hw/hfi1/chip.c val = ppd->link_width_active; ppd 9991 drivers/infiniband/hw/hfi1/chip.c val = ppd->link_speed_enabled; ppd 9994 drivers/infiniband/hw/hfi1/chip.c val = ppd->link_speed_active; ppd 10003 drivers/infiniband/hw/hfi1/chip.c val = ppd->actual_vls_operational; ppd 10012 drivers/infiniband/hw/hfi1/chip.c val = ppd->overrun_threshold; ppd 10015 drivers/infiniband/hw/hfi1/chip.c val = ppd->phy_error_threshold; ppd 10077 drivers/infiniband/hw/hfi1/chip.c static void set_send_length(struct hfi1_pportdata *ppd) ppd 10079 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10088 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < ppd->vls_supported; i++) { ppd 10104 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < ppd->vls_supported; i++) { ppd 10123 drivers/infiniband/hw/hfi1/chip.c len1 = read_csr(ppd->dd, DCC_CFG_PORT_CONFIG); ppd 10127 drivers/infiniband/hw/hfi1/chip.c write_csr(ppd->dd, DCC_CFG_PORT_CONFIG, len1); ppd 10130 drivers/infiniband/hw/hfi1/chip.c static void set_lidlmc(struct hfi1_pportdata *ppd) ppd 10134 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10135 drivers/infiniband/hw/hfi1/chip.c u32 mask = ~((1U << ppd->lmc) - 1); ppd 10136 drivers/infiniband/hw/hfi1/chip.c u64 c1 = read_csr(ppd->dd, DCC_CFG_PORT_CONFIG1); ppd 10143 drivers/infiniband/hw/hfi1/chip.c lid = (ppd->lid >= be16_to_cpu(IB_MULTICAST_LID_BASE)) ? 0 : ppd->lid; ppd 10150 drivers/infiniband/hw/hfi1/chip.c write_csr(ppd->dd, DCC_CFG_PORT_CONFIG1, c1); ppd 10227 drivers/infiniband/hw/hfi1/chip.c static const char *state_complete_reason_code_string(struct hfi1_pportdata *ppd, ppd 10241 drivers/infiniband/hw/hfi1/chip.c static void decode_state_complete(struct hfi1_pportdata *ppd, u32 frame, ppd 10244 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10270 drivers/infiniband/hw/hfi1/chip.c reason, state_complete_reason_code_string(ppd, reason)); ppd 10279 drivers/infiniband/hw/hfi1/chip.c static void check_lni_states(struct hfi1_pportdata *ppd) ppd 10284 drivers/infiniband/hw/hfi1/chip.c read_last_local_state(ppd->dd, &last_local_state); ppd 10285 drivers/infiniband/hw/hfi1/chip.c read_last_remote_state(ppd->dd, &last_remote_state); ppd 10295 drivers/infiniband/hw/hfi1/chip.c decode_state_complete(ppd, last_local_state, "transmitted"); ppd 10296 drivers/infiniband/hw/hfi1/chip.c decode_state_complete(ppd, last_remote_state, "received"); ppd 10322 drivers/infiniband/hw/hfi1/chip.c static void force_logical_link_state_down(struct hfi1_pportdata *ppd) ppd 10324 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10353 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "logical state forced to LINK_DOWN\n"); ppd 10364 drivers/infiniband/hw/hfi1/chip.c static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason) ppd 10366 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10373 drivers/infiniband/hw/hfi1/chip.c previous_state = ppd->host_link_state; ppd 10374 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_GOING_OFFLINE; ppd 10385 drivers/infiniband/hw/hfi1/chip.c if (ppd->offline_disabled_reason == ppd 10387 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 10390 drivers/infiniband/hw/hfi1/chip.c offline_state_ret = wait_phys_link_offline_substates(ppd, 10000); ppd 10395 drivers/infiniband/hw/hfi1/chip.c if (ppd->port_type == PORT_TYPE_QSFP && ppd 10396 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.limiting_active && ppd 10397 drivers/infiniband/hw/hfi1/chip.c qsfp_mod_present(ppd)) { ppd 10402 drivers/infiniband/hw/hfi1/chip.c set_qsfp_tx(ppd, 0); ppd 10416 drivers/infiniband/hw/hfi1/chip.c ret = wait_physical_linkstate(ppd, PLS_OFFLINE, 30000); ppd 10429 drivers/infiniband/hw/hfi1/chip.c ret = wait_logical_linkstate(ppd, IB_PORT_DOWN, 1000); ppd 10431 drivers/infiniband/hw/hfi1/chip.c force_logical_link_state_down(ppd); ppd 10433 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_LINK_COOLDOWN; /* LCB access allowed */ ppd 10434 drivers/infiniband/hw/hfi1/chip.c update_statusp(ppd, IB_PORT_DOWN); ppd 10450 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_DN_OFFLINE; ppd 10460 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_DN_OFFLINE; ppd 10467 drivers/infiniband/hw/hfi1/chip.c check_lni_states(ppd); ppd 10470 drivers/infiniband/hw/hfi1/chip.c ppd->qsfp_info.reset_needed = 0; ppd 10474 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_active = 0; ppd 10475 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_tx_active = 0; ppd 10476 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_rx_active = 0; ppd 10477 drivers/infiniband/hw/hfi1/chip.c ppd->current_egress_rate = 0; ppd 10505 drivers/infiniband/hw/hfi1/chip.c static const char *link_state_reason_name(struct hfi1_pportdata *ppd, u32 state) ppd 10508 drivers/infiniband/hw/hfi1/chip.c switch (ppd->linkinit_reason) { ppd 10531 drivers/infiniband/hw/hfi1/chip.c u32 driver_pstate(struct hfi1_pportdata *ppd) ppd 10533 drivers/infiniband/hw/hfi1/chip.c switch (ppd->host_link_state) { ppd 10554 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, "invalid host_link_state 0x%x\n", ppd 10555 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state); ppd 10565 drivers/infiniband/hw/hfi1/chip.c u32 driver_lstate(struct hfi1_pportdata *ppd) ppd 10567 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state && (ppd->host_link_state & HLS_DOWN)) ppd 10570 drivers/infiniband/hw/hfi1/chip.c switch (ppd->host_link_state & HLS_UP) { ppd 10578 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, "invalid host_link_state 0x%x\n", ppd 10579 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state); ppd 10584 drivers/infiniband/hw/hfi1/chip.c void set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason, ppd 10587 drivers/infiniband/hw/hfi1/chip.c if (ppd->local_link_down_reason.latest == 0 && ppd 10588 drivers/infiniband/hw/hfi1/chip.c ppd->neigh_link_down_reason.latest == 0) { ppd 10589 drivers/infiniband/hw/hfi1/chip.c ppd->local_link_down_reason.latest = lcl_reason; ppd 10590 drivers/infiniband/hw/hfi1/chip.c ppd->neigh_link_down_reason.latest = neigh_reason; ppd 10591 drivers/infiniband/hw/hfi1/chip.c ppd->remote_link_down_reason = rem_reason; ppd 10602 drivers/infiniband/hw/hfi1/chip.c static inline bool data_vls_operational(struct hfi1_pportdata *ppd) ppd 10607 drivers/infiniband/hw/hfi1/chip.c if (!ppd->actual_vls_operational) ppd 10610 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < ppd->vls_supported; i++) { ppd 10611 drivers/infiniband/hw/hfi1/chip.c reg = read_csr(ppd->dd, SEND_CM_CREDIT_VL + (8 * i)); ppd 10612 drivers/infiniband/hw/hfi1/chip.c if ((reg && !ppd->dd->vld[i].mtu) || ppd 10613 drivers/infiniband/hw/hfi1/chip.c (!reg && ppd->dd->vld[i].mtu)) ppd 10628 drivers/infiniband/hw/hfi1/chip.c int set_link_state(struct hfi1_pportdata *ppd, u32 state) ppd 10630 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 10635 drivers/infiniband/hw/hfi1/chip.c mutex_lock(&ppd->hls_lock); ppd 10642 drivers/infiniband/hw/hfi1/chip.c poll_bounce = ppd->host_link_state == HLS_DN_POLL && ppd 10646 drivers/infiniband/hw/hfi1/chip.c link_state_name(ppd->host_link_state), ppd 10649 drivers/infiniband/hw/hfi1/chip.c link_state_reason_name(ppd, state)); ppd 10657 drivers/infiniband/hw/hfi1/chip.c ppd->is_sm_config_started = 0; ppd 10663 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == state && !poll_bounce) ppd 10668 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == HLS_DN_POLL && ppd 10678 drivers/infiniband/hw/hfi1/chip.c } else if (ppd->host_link_state != HLS_GOING_UP) { ppd 10687 drivers/infiniband/hw/hfi1/chip.c ret = wait_physical_linkstate(ppd, PLS_LINKUP, 1000); ppd 10695 drivers/infiniband/hw/hfi1/chip.c ret = wait_logical_linkstate(ppd, IB_PORT_INIT, 1000); ppd 10704 drivers/infiniband/hw/hfi1/chip.c if (ppd->linkinit_reason >= OPA_LINKINIT_REASON_CLEAR) ppd 10705 drivers/infiniband/hw/hfi1/chip.c ppd->linkinit_reason = ppd 10719 drivers/infiniband/hw/hfi1/chip.c update_xmit_counters(ppd, ppd->link_width_active); ppd 10721 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_UP_INIT; ppd 10722 drivers/infiniband/hw/hfi1/chip.c update_statusp(ppd, IB_PORT_INIT); ppd 10725 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_UP_INIT) ppd 10728 drivers/infiniband/hw/hfi1/chip.c if (!data_vls_operational(ppd)) { ppd 10737 drivers/infiniband/hw/hfi1/chip.c ret = wait_logical_linkstate(ppd, IB_PORT_ARMED, 1000); ppd 10744 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_UP_ARMED; ppd 10745 drivers/infiniband/hw/hfi1/chip.c update_statusp(ppd, IB_PORT_ARMED); ppd 10752 drivers/infiniband/hw/hfi1/chip.c ppd->neighbor_normal = 1; ppd 10755 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_UP_ARMED) ppd 10759 drivers/infiniband/hw/hfi1/chip.c ret = wait_logical_linkstate(ppd, IB_PORT_ACTIVE, 1000); ppd 10767 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_UP_ACTIVE; ppd 10768 drivers/infiniband/hw/hfi1/chip.c update_statusp(ppd, IB_PORT_ACTIVE); ppd 10772 drivers/infiniband/hw/hfi1/chip.c event.element.port_num = ppd->port; ppd 10777 drivers/infiniband/hw/hfi1/chip.c if ((ppd->host_link_state == HLS_DN_DISABLE || ppd 10778 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state == HLS_DN_OFFLINE) && ppd 10784 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_DN_OFFLINE) { ppd 10785 drivers/infiniband/hw/hfi1/chip.c u8 tmp = ppd->link_enabled; ppd 10787 drivers/infiniband/hw/hfi1/chip.c ret = goto_offline(ppd, ppd->remote_link_down_reason); ppd 10789 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled = tmp; ppd 10792 drivers/infiniband/hw/hfi1/chip.c ppd->remote_link_down_reason = 0; ppd 10794 drivers/infiniband/hw/hfi1/chip.c if (ppd->driver_link_ready) ppd 10795 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled = 1; ppd 10798 drivers/infiniband/hw/hfi1/chip.c set_all_slowpath(ppd->dd); ppd 10799 drivers/infiniband/hw/hfi1/chip.c ret = set_local_link_attributes(ppd); ppd 10803 drivers/infiniband/hw/hfi1/chip.c ppd->port_error_action = 0; ppd 10811 drivers/infiniband/hw/hfi1/chip.c ret1 = wait_phys_link_out_of_offline(ppd, ppd 10827 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_DN_POLL; ppd 10828 drivers/infiniband/hw/hfi1/chip.c ppd->offline_disabled_reason = ppd 10835 drivers/infiniband/hw/hfi1/chip.c goto_offline(ppd, 0); ppd 10837 drivers/infiniband/hw/hfi1/chip.c log_physical_state(ppd, PLS_POLLING); ppd 10841 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled = 0; ppd 10846 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_DN_OFFLINE) { ppd 10847 drivers/infiniband/hw/hfi1/chip.c ret = goto_offline(ppd, ppd->remote_link_down_reason); ppd 10850 drivers/infiniband/hw/hfi1/chip.c ppd->remote_link_down_reason = 0; ppd 10862 drivers/infiniband/hw/hfi1/chip.c ret = wait_physical_linkstate(ppd, PLS_DISABLED, 10000); ppd 10871 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_DN_DISABLE; ppd 10874 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state == HLS_DN_DISABLE) ppd 10878 drivers/infiniband/hw/hfi1/chip.c ret = goto_offline(ppd, ppd->remote_link_down_reason); ppd 10880 drivers/infiniband/hw/hfi1/chip.c ppd->remote_link_down_reason = 0; ppd 10883 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_DN_POLL) ppd 10885 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_VERIFY_CAP; ppd 10886 drivers/infiniband/hw/hfi1/chip.c log_physical_state(ppd, PLS_CONFIGPHY_VERIFYCAP); ppd 10889 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state != HLS_VERIFY_CAP) ppd 10900 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_GOING_UP; ppd 10916 drivers/infiniband/hw/hfi1/chip.c __func__, link_state_name(ppd->host_link_state), ppd 10921 drivers/infiniband/hw/hfi1/chip.c mutex_unlock(&ppd->hls_lock); ppd 10929 drivers/infiniband/hw/hfi1/chip.c int hfi1_set_ib_cfg(struct hfi1_pportdata *ppd, int which, u32 val) ppd 10936 drivers/infiniband/hw/hfi1/chip.c set_lidlmc(ppd); ppd 10946 drivers/infiniband/hw/hfi1/chip.c write_csr(ppd->dd, SEND_HIGH_PRIORITY_LIMIT, reg); ppd 10954 drivers/infiniband/hw/hfi1/chip.c if (ppd->vls_operational != val) { ppd 10955 drivers/infiniband/hw/hfi1/chip.c ppd->vls_operational = val; ppd 10956 drivers/infiniband/hw/hfi1/chip.c if (!ppd->port) ppd 10969 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_enabled = val & ppd->link_width_supported; ppd 10972 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_enabled = ppd 10973 drivers/infiniband/hw/hfi1/chip.c val & ppd->link_width_downgrade_supported; ppd 10976 drivers/infiniband/hw/hfi1/chip.c ppd->link_speed_enabled = val & ppd->link_speed_supported; ppd 10983 drivers/infiniband/hw/hfi1/chip.c ppd->overrun_threshold = val; ppd 10990 drivers/infiniband/hw/hfi1/chip.c ppd->phy_error_threshold = val; ppd 10994 drivers/infiniband/hw/hfi1/chip.c set_send_length(ppd); ppd 10999 drivers/infiniband/hw/hfi1/chip.c set_partition_keys(ppd); ppd 11004 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 11013 drivers/infiniband/hw/hfi1/chip.c static void init_vl_arb_caches(struct hfi1_pportdata *ppd) ppd 11033 drivers/infiniband/hw/hfi1/chip.c spin_lock_init(&ppd->vl_arb_cache[i].lock); ppd 11043 drivers/infiniband/hw/hfi1/chip.c vl_arb_lock_cache(struct hfi1_pportdata *ppd, int idx) ppd 11047 drivers/infiniband/hw/hfi1/chip.c spin_lock(&ppd->vl_arb_cache[idx].lock); ppd 11048 drivers/infiniband/hw/hfi1/chip.c return &ppd->vl_arb_cache[idx]; ppd 11051 drivers/infiniband/hw/hfi1/chip.c static inline void vl_arb_unlock_cache(struct hfi1_pportdata *ppd, int idx) ppd 11053 drivers/infiniband/hw/hfi1/chip.c spin_unlock(&ppd->vl_arb_cache[idx].lock); ppd 11076 drivers/infiniband/hw/hfi1/chip.c static int set_vl_weights(struct hfi1_pportdata *ppd, u32 target, ppd 11079 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 11084 drivers/infiniband/hw/hfi1/chip.c mutex_lock(&ppd->hls_lock); ppd 11086 drivers/infiniband/hw/hfi1/chip.c if (ppd->host_link_state & HLS_UP) ppd 11126 drivers/infiniband/hw/hfi1/chip.c mutex_unlock(&ppd->hls_lock); ppd 11369 drivers/infiniband/hw/hfi1/chip.c int set_buffer_control(struct hfi1_pportdata *ppd, ppd 11372 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 11542 drivers/infiniband/hw/hfi1/chip.c ppd->actual_vls_operational = vl_count; ppd 11543 drivers/infiniband/hw/hfi1/chip.c ret = sdma_map_init(dd, ppd->port - 1, vl_count ? ppd 11544 drivers/infiniband/hw/hfi1/chip.c ppd->actual_vls_operational : ppd 11545 drivers/infiniband/hw/hfi1/chip.c ppd->vls_operational, ppd 11548 drivers/infiniband/hw/hfi1/chip.c ret = pio_map_init(dd, ppd->port - 1, vl_count ? ppd 11549 drivers/infiniband/hw/hfi1/chip.c ppd->actual_vls_operational : ppd 11550 drivers/infiniband/hw/hfi1/chip.c ppd->vls_operational, NULL); ppd 11562 drivers/infiniband/hw/hfi1/chip.c int fm_get_table(struct hfi1_pportdata *ppd, int which, void *t) ppd 11575 drivers/infiniband/hw/hfi1/chip.c vlc = vl_arb_lock_cache(ppd, HI_PRIO_TABLE); ppd 11577 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, HI_PRIO_TABLE); ppd 11585 drivers/infiniband/hw/hfi1/chip.c vlc = vl_arb_lock_cache(ppd, LO_PRIO_TABLE); ppd 11587 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, LO_PRIO_TABLE); ppd 11590 drivers/infiniband/hw/hfi1/chip.c size = get_buffer_control(ppd->dd, t, NULL); ppd 11593 drivers/infiniband/hw/hfi1/chip.c size = get_sc2vlnt(ppd->dd, t); ppd 11598 drivers/infiniband/hw/hfi1/chip.c get_vlarb_preempt(ppd->dd, OPA_MAX_VLS, t); ppd 11616 drivers/infiniband/hw/hfi1/chip.c int fm_set_table(struct hfi1_pportdata *ppd, int which, void *t) ppd 11623 drivers/infiniband/hw/hfi1/chip.c vlc = vl_arb_lock_cache(ppd, HI_PRIO_TABLE); ppd 11625 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, HI_PRIO_TABLE); ppd 11629 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, HI_PRIO_TABLE); ppd 11630 drivers/infiniband/hw/hfi1/chip.c ret = set_vl_weights(ppd, SEND_HIGH_PRIORITY_LIST, ppd 11634 drivers/infiniband/hw/hfi1/chip.c vlc = vl_arb_lock_cache(ppd, LO_PRIO_TABLE); ppd 11636 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, LO_PRIO_TABLE); ppd 11640 drivers/infiniband/hw/hfi1/chip.c vl_arb_unlock_cache(ppd, LO_PRIO_TABLE); ppd 11641 drivers/infiniband/hw/hfi1/chip.c ret = set_vl_weights(ppd, SEND_LOW_PRIORITY_LIST, ppd 11645 drivers/infiniband/hw/hfi1/chip.c ret = set_buffer_control(ppd, t); ppd 11648 drivers/infiniband/hw/hfi1/chip.c set_sc2vlnt(ppd->dd, t); ppd 12138 drivers/infiniband/hw/hfi1/chip.c u32 hfi1_read_portcntrs(struct hfi1_pportdata *ppd, char **namep, u64 **cntrp) ppd 12144 drivers/infiniband/hw/hfi1/chip.c ret = ppd->dd->portcntrnameslen; ppd 12145 drivers/infiniband/hw/hfi1/chip.c *namep = ppd->dd->portcntrnames; ppd 12150 drivers/infiniband/hw/hfi1/chip.c ret = ppd->dd->nportcntrs * sizeof(u64); ppd 12151 drivers/infiniband/hw/hfi1/chip.c *cntrp = ppd->cntrs; ppd 12165 drivers/infiniband/hw/hfi1/chip.c val = entry->rw_cntr(entry, ppd, j, ppd 12172 drivers/infiniband/hw/hfi1/chip.c ppd->cntrs[entry->offset + j] = val; ppd 12175 drivers/infiniband/hw/hfi1/chip.c val = entry->rw_cntr(entry, ppd, ppd 12179 drivers/infiniband/hw/hfi1/chip.c ppd->cntrs[entry->offset] = val; ppd 12189 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 12194 drivers/infiniband/hw/hfi1/chip.c ppd = (struct hfi1_pportdata *)(dd + 1); ppd 12195 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 12196 drivers/infiniband/hw/hfi1/chip.c kfree(ppd->cntrs); ppd 12197 drivers/infiniband/hw/hfi1/chip.c kfree(ppd->scntrs); ppd 12198 drivers/infiniband/hw/hfi1/chip.c free_percpu(ppd->ibport_data.rvp.rc_acks); ppd 12199 drivers/infiniband/hw/hfi1/chip.c free_percpu(ppd->ibport_data.rvp.rc_qacks); ppd 12200 drivers/infiniband/hw/hfi1/chip.c free_percpu(ppd->ibport_data.rvp.rc_delayed_comp); ppd 12201 drivers/infiniband/hw/hfi1/chip.c ppd->cntrs = NULL; ppd 12202 drivers/infiniband/hw/hfi1/chip.c ppd->scntrs = NULL; ppd 12203 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_acks = NULL; ppd 12204 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_qacks = NULL; ppd 12205 drivers/infiniband/hw/hfi1/chip.c ppd->ibport_data.rvp.rc_delayed_comp = NULL; ppd 12334 drivers/infiniband/hw/hfi1/chip.c u64 read_port_cntr(struct hfi1_pportdata *ppd, int index, int vl) ppd 12340 drivers/infiniband/hw/hfi1/chip.c sval = ppd->scntrs + entry->offset; ppd 12345 drivers/infiniband/hw/hfi1/chip.c if ((index >= C_RCV_HDR_OVF_FIRST + ppd->dd->num_rcv_contexts) && ppd 12351 drivers/infiniband/hw/hfi1/chip.c return read_dev_port_cntr(ppd->dd, entry, sval, ppd, vl); ppd 12354 drivers/infiniband/hw/hfi1/chip.c u64 write_port_cntr(struct hfi1_pportdata *ppd, int index, int vl, u64 data) ppd 12360 drivers/infiniband/hw/hfi1/chip.c sval = ppd->scntrs + entry->offset; ppd 12365 drivers/infiniband/hw/hfi1/chip.c if ((index >= C_RCV_HDR_OVF_FIRST + ppd->dd->num_rcv_contexts) && ppd 12371 drivers/infiniband/hw/hfi1/chip.c return write_dev_port_cntr(ppd->dd, entry, sval, ppd, vl, data); ppd 12381 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 12434 drivers/infiniband/hw/hfi1/chip.c ppd = (struct hfi1_pportdata *)(dd + 1); ppd 12435 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 12440 drivers/infiniband/hw/hfi1/chip.c read_port_cntr(ppd, j, vl); ppd 12442 drivers/infiniband/hw/hfi1/chip.c read_port_cntr(ppd, j, CNTR_INVALID_VL); ppd 12484 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 12695 drivers/infiniband/hw/hfi1/chip.c ppd = (struct hfi1_pportdata *)(dd + 1); ppd 12696 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 12697 drivers/infiniband/hw/hfi1/chip.c ppd->cntrs = kcalloc(dd->nportcntrs, sizeof(u64), GFP_KERNEL); ppd 12698 drivers/infiniband/hw/hfi1/chip.c if (!ppd->cntrs) ppd 12701 drivers/infiniband/hw/hfi1/chip.c ppd->scntrs = kcalloc(dd->nportcntrs, sizeof(u64), GFP_KERNEL); ppd 12702 drivers/infiniband/hw/hfi1/chip.c if (!ppd->scntrs) ppd 12815 drivers/infiniband/hw/hfi1/chip.c static void update_statusp(struct hfi1_pportdata *ppd, u32 state) ppd 12825 drivers/infiniband/hw/hfi1/chip.c if (ppd->statusp) { ppd 12829 drivers/infiniband/hw/hfi1/chip.c *ppd->statusp &= ~(HFI1_STATUS_IB_CONF | ppd 12833 drivers/infiniband/hw/hfi1/chip.c *ppd->statusp |= HFI1_STATUS_IB_CONF; ppd 12836 drivers/infiniband/hw/hfi1/chip.c *ppd->statusp |= HFI1_STATUS_IB_READY; ppd 12840 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, "logical state changed to %s (0x%x)\n", ppd 12854 drivers/infiniband/hw/hfi1/chip.c static int wait_logical_linkstate(struct hfi1_pportdata *ppd, u32 state, ppd 12862 drivers/infiniband/hw/hfi1/chip.c new_state = chip_to_opa_lstate(ppd->dd, ppd 12863 drivers/infiniband/hw/hfi1/chip.c read_logical_state(ppd->dd)); ppd 12867 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 12878 drivers/infiniband/hw/hfi1/chip.c static void log_state_transition(struct hfi1_pportdata *ppd, u32 state) ppd 12880 drivers/infiniband/hw/hfi1/chip.c u32 ib_pstate = chip_to_opa_pstate(ppd->dd, state); ppd 12882 drivers/infiniband/hw/hfi1/chip.c dd_dev_info(ppd->dd, ppd 12891 drivers/infiniband/hw/hfi1/chip.c static void log_physical_state(struct hfi1_pportdata *ppd, u32 state) ppd 12893 drivers/infiniband/hw/hfi1/chip.c u32 read_state = read_physical_state(ppd->dd); ppd 12896 drivers/infiniband/hw/hfi1/chip.c log_state_transition(ppd, state); ppd 12898 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 12913 drivers/infiniband/hw/hfi1/chip.c static int wait_physical_linkstate(struct hfi1_pportdata *ppd, u32 state, ppd 12921 drivers/infiniband/hw/hfi1/chip.c read_state = read_physical_state(ppd->dd); ppd 12925 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 12933 drivers/infiniband/hw/hfi1/chip.c log_state_transition(ppd, state); ppd 12946 drivers/infiniband/hw/hfi1/chip.c static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd, ppd 12954 drivers/infiniband/hw/hfi1/chip.c read_state = read_physical_state(ppd->dd); ppd 12958 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 12966 drivers/infiniband/hw/hfi1/chip.c log_state_transition(ppd, read_state); ppd 12979 drivers/infiniband/hw/hfi1/chip.c static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd, ppd 12987 drivers/infiniband/hw/hfi1/chip.c read_state = read_physical_state(ppd->dd); ppd 12991 drivers/infiniband/hw/hfi1/chip.c dd_dev_err(ppd->dd, ppd 12999 drivers/infiniband/hw/hfi1/chip.c log_state_transition(ppd, read_state); ppd 13407 drivers/infiniband/hw/hfi1/chip.c static void set_partition_keys(struct hfi1_pportdata *ppd) ppd 13409 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = ppd->dd; ppd 13415 drivers/infiniband/hw/hfi1/chip.c reg |= (ppd->pkeys[i] & ppd 14020 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = &dd->pport[i]; ppd 14022 drivers/infiniband/hw/hfi1/chip.c set_partition_keys(ppd); ppd 14826 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd; ppd 14838 drivers/infiniband/hw/hfi1/chip.c ppd = dd->pport; ppd 14839 drivers/infiniband/hw/hfi1/chip.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 14842 drivers/infiniband/hw/hfi1/chip.c hfi1_init_pportdata(pdev, ppd, dd, 0, 1); ppd 14844 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_supported = ppd 14847 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_supported = ppd 14848 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_supported; ppd 14850 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_enabled = OPA_LINK_WIDTH_4X; ppd 14851 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_enabled = ppd 14852 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_supported; ppd 14862 drivers/infiniband/hw/hfi1/chip.c ppd->vls_supported = num_vls; ppd 14863 drivers/infiniband/hw/hfi1/chip.c ppd->vls_operational = ppd->vls_supported; ppd 14872 drivers/infiniband/hw/hfi1/chip.c ppd->overrun_threshold = 0x4; ppd 14873 drivers/infiniband/hw/hfi1/chip.c ppd->phy_error_threshold = 0xf; ppd 14874 drivers/infiniband/hw/hfi1/chip.c ppd->port_crc_mode_enabled = link_crc_mask; ppd 14876 drivers/infiniband/hw/hfi1/chip.c ppd->port_ltp_crc_mode = cap_to_port_ltp(link_crc_mask) << 8; ppd 14878 drivers/infiniband/hw/hfi1/chip.c ppd->port_ltp_crc_mode |= cap_to_port_ltp(link_crc_mask) << 4; ppd 14880 drivers/infiniband/hw/hfi1/chip.c ppd->host_link_state = HLS_DN_OFFLINE; ppd 14881 drivers/infiniband/hw/hfi1/chip.c init_vl_arb_caches(ppd); ppd 14936 drivers/infiniband/hw/hfi1/chip.c ppd = dd->pport; ppd 14938 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_supported = ppd 14939 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_enabled = ppd 14940 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_supported = ppd 14941 drivers/infiniband/hw/hfi1/chip.c ppd->link_width_downgrade_enabled = ppd 14949 drivers/infiniband/hw/hfi1/chip.c ppd->vls_supported = sdma_engines; ppd 14950 drivers/infiniband/hw/hfi1/chip.c ppd->vls_operational = ppd->vls_supported; ppd 15146 drivers/infiniband/hw/hfi1/chip.c static u16 delay_cycles(struct hfi1_pportdata *ppd, u32 desired_egress_rate, ppd 15150 drivers/infiniband/hw/hfi1/chip.c u32 current_egress_rate = ppd->current_egress_rate; ppd 15179 drivers/infiniband/hw/hfi1/chip.c u64 create_pbc(struct hfi1_pportdata *ppd, u64 flags, int srate_mbs, u32 vl, ppd 15185 drivers/infiniband/hw/hfi1/chip.c delay = delay_cycles(ppd, srate_mbs, dw_len); ppd 15288 drivers/infiniband/hw/hfi1/chip.c struct hfi1_pportdata *ppd = &dd->pport[0]; ppd 15297 drivers/infiniband/hw/hfi1/chip.c start_freeze_handling(ppd, FREEZE_SELF | FREEZE_ABORT); ppd 15309 drivers/infiniband/hw/hfi1/chip.c ppd->driver_link_ready = 0; ppd 15310 drivers/infiniband/hw/hfi1/chip.c ppd->link_enabled = 0; ppd 702 drivers/infiniband/hw/hfi1/chip.h u64 create_pbc(struct hfi1_pportdata *ppd, u64 flags, int srate_mbs, u32 vl, ppd 772 drivers/infiniband/hw/hfi1/chip.h void set_link_down_reason(struct hfi1_pportdata *ppd, u8 lcl_reason, ppd 784 drivers/infiniband/hw/hfi1/chip.h int reset_qsfp(struct hfi1_pportdata *ppd); ppd 786 drivers/infiniband/hw/hfi1/chip.h void start_freeze_handling(struct hfi1_pportdata *ppd, int flags); ppd 790 drivers/infiniband/hw/hfi1/chip.h int start_link(struct hfi1_pportdata *ppd); ppd 791 drivers/infiniband/hw/hfi1/chip.h int bringup_serdes(struct hfi1_pportdata *ppd); ppd 793 drivers/infiniband/hw/hfi1/chip.h bool apply_link_downgrade_policy(struct hfi1_pportdata *ppd, ppd 801 drivers/infiniband/hw/hfi1/chip.h void get_linkup_link_widths(struct hfi1_pportdata *ppd); ppd 812 drivers/infiniband/hw/hfi1/chip.h u32 driver_pstate(struct hfi1_pportdata *ppd); ppd 813 drivers/infiniband/hw/hfi1/chip.h u32 driver_lstate(struct hfi1_pportdata *ppd); ppd 829 drivers/infiniband/hw/hfi1/chip.h u64 read_port_cntr(struct hfi1_pportdata *ppd, int index, int vl); ppd 830 drivers/infiniband/hw/hfi1/chip.h u64 write_port_cntr(struct hfi1_pportdata *ppd, int index, int vl, u64 data); ppd 1423 drivers/infiniband/hw/hfi1/chip.h void hfi1_quiet_serdes(struct hfi1_pportdata *ppd); ppd 1427 drivers/infiniband/hw/hfi1/chip.h u32 hfi1_read_portcntrs(struct hfi1_pportdata *ppd, char **namep, u64 **cntrp); ppd 1428 drivers/infiniband/hw/hfi1/chip.h int hfi1_get_ib_cfg(struct hfi1_pportdata *ppd, int which); ppd 1429 drivers/infiniband/hw/hfi1/chip.h int hfi1_set_ib_cfg(struct hfi1_pportdata *ppd, int which, u32 val); ppd 519 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 522 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 523 drivers/infiniband/hw/hfi1/debugfs.c avail = hfi1_read_portcntrs(ppd, NULL, &counters); ppd 545 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 554 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 555 drivers/infiniband/hw/hfi1/debugfs.c dd = ppd->dd; ppd 594 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 602 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 603 drivers/infiniband/hw/hfi1/debugfs.c dd = ppd->dd; ppd 640 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd = private2ppd(file); ppd 664 drivers/infiniband/hw/hfi1/debugfs.c rval = read_8051_data(ppd->dd, start, end - start, ppd 680 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd = private2ppd(file); ppd 681 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_devdata *dd = ppd->dd; ppd 714 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd = private2ppd(file); ppd 715 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_devdata *dd = ppd->dd; ppd 750 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 754 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 759 drivers/infiniband/hw/hfi1/debugfs.c ret = qsfp_dump(ppd, tmp, PAGE_SIZE); ppd 770 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 777 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 791 drivers/infiniband/hw/hfi1/debugfs.c total_written = i2c_write(ppd, target, i2c_addr, offset, buff, count); ppd 824 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 831 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 845 drivers/infiniband/hw/hfi1/debugfs.c total_read = i2c_read(ppd, target, i2c_addr, offset, buff, count); ppd 884 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 892 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 898 drivers/infiniband/hw/hfi1/debugfs.c total_written = qsfp_write(ppd, target, *ppos, buff, count); ppd 931 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 941 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(file); ppd 949 drivers/infiniband/hw/hfi1/debugfs.c total_read = qsfp_read(ppd, target, *ppos, buff, count); ppd 987 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 990 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(fp); ppd 992 drivers/infiniband/hw/hfi1/debugfs.c ret = acquire_chip_resource(ppd->dd, i2c_target(target), 0); ppd 1011 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 1013 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(fp); ppd 1015 drivers/infiniband/hw/hfi1/debugfs.c release_chip_resource(ppd->dd, i2c_target(target)); ppd 1033 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 1039 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(fp); ppd 1041 drivers/infiniband/hw/hfi1/debugfs.c ret = acquire_chip_resource(ppd->dd, i2c_target(target), 0); ppd 1060 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 1062 drivers/infiniband/hw/hfi1/debugfs.c ppd = private2ppd(fp); ppd 1064 drivers/infiniband/hw/hfi1/debugfs.c release_chip_resource(ppd->dd, i2c_target(target)); ppd 1113 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd = private2ppd(file); ppd 1121 drivers/infiniband/hw/hfi1/debugfs.c exprom_wp_set(ppd->dd, false); ppd 1123 drivers/infiniband/hw/hfi1/debugfs.c exprom_wp_set(ppd->dd, true); ppd 1142 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd = private2ppd(fp); ppd 1145 drivers/infiniband/hw/hfi1/debugfs.c exprom_wp_set(ppd->dd, false); ppd 1242 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_pportdata *ppd; ppd 1275 drivers/infiniband/hw/hfi1/debugfs.c for (ppd = dd->pport, j = 0; j < dd->num_pports; j++, ppd++) ppd 1285 drivers/infiniband/hw/hfi1/debugfs.c root, ppd, &port_cntr_ops[i].ops); ppd 175 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd; ppd 184 drivers/infiniband/hw/hfi1/driver.c ppd = dd->pport + pidx; ppd 185 drivers/infiniband/hw/hfi1/driver.c if (ppd->lid && ppd->linkup) { ppd 250 drivers/infiniband/hw/hfi1/driver.c static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd, ppd 257 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 396 drivers/infiniband/hw/hfi1/driver.c process_becn(ppd, sl, rlid, lqpn, rqpn, svc_type); ppd 448 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 473 drivers/infiniband/hw/hfi1/driver.c ppd->lid; ppd 530 drivers/infiniband/hw/hfi1/driver.c process_becn(ppd, sl, rlid, lqpn, rqpn, svc_type); ppd 612 drivers/infiniband/hw/hfi1/driver.c if (rcd->ppd->cc_prescan) \ ppd 973 drivers/infiniband/hw/hfi1/driver.c struct work_struct *lsaw = &rcd->ppd->linkstate_active_work; ppd 988 drivers/infiniband/hw/hfi1/driver.c int hwstate = driver_lstate(rcd->ppd); ppd 997 drivers/infiniband/hw/hfi1/driver.c queue_work(rcd->ppd->link_wq, lsaw); ppd 1071 drivers/infiniband/hw/hfi1/driver.c if (unlikely(rcd->ppd->host_link_state == ppd 1148 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = container_of(work, struct hfi1_pportdata, ppd 1150 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 1155 drivers/infiniband/hw/hfi1/driver.c ppd->neighbor_normal = 1; ppd 1156 drivers/infiniband/hw/hfi1/driver.c set_link_state(ppd, HLS_UP_ACTIVE); ppd 1212 drivers/infiniband/hw/hfi1/driver.c int set_mtu(struct hfi1_pportdata *ppd) ppd 1214 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 1217 drivers/infiniband/hw/hfi1/driver.c ppd->ibmtu = 0; ppd 1218 drivers/infiniband/hw/hfi1/driver.c for (i = 0; i < ppd->vls_supported; i++) ppd 1219 drivers/infiniband/hw/hfi1/driver.c if (ppd->ibmtu < dd->vld[i].mtu) ppd 1220 drivers/infiniband/hw/hfi1/driver.c ppd->ibmtu = dd->vld[i].mtu; ppd 1221 drivers/infiniband/hw/hfi1/driver.c ppd->ibmaxlen = ppd->ibmtu + lrh_max_header_bytes(ppd->dd); ppd 1223 drivers/infiniband/hw/hfi1/driver.c mutex_lock(&ppd->hls_lock); ppd 1224 drivers/infiniband/hw/hfi1/driver.c if (ppd->host_link_state == HLS_UP_INIT || ppd 1225 drivers/infiniband/hw/hfi1/driver.c ppd->host_link_state == HLS_UP_ARMED || ppd 1226 drivers/infiniband/hw/hfi1/driver.c ppd->host_link_state == HLS_UP_ACTIVE) ppd 1245 drivers/infiniband/hw/hfi1/driver.c hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_MTU, 0); ppd 1251 drivers/infiniband/hw/hfi1/driver.c mutex_unlock(&ppd->hls_lock); ppd 1256 drivers/infiniband/hw/hfi1/driver.c int hfi1_set_lid(struct hfi1_pportdata *ppd, u32 lid, u8 lmc) ppd 1258 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 1260 drivers/infiniband/hw/hfi1/driver.c ppd->lid = lid; ppd 1261 drivers/infiniband/hw/hfi1/driver.c ppd->lmc = lmc; ppd 1262 drivers/infiniband/hw/hfi1/driver.c hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_LIDLMC, 0); ppd 1264 drivers/infiniband/hw/hfi1/driver.c dd_dev_info(dd, "port %u: got a lid: 0x%x\n", ppd->port, lid); ppd 1269 drivers/infiniband/hw/hfi1/driver.c void shutdown_led_override(struct hfi1_pportdata *ppd) ppd 1271 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 1279 drivers/infiniband/hw/hfi1/driver.c if (atomic_read(&ppd->led_override_timer_active)) { ppd 1280 drivers/infiniband/hw/hfi1/driver.c del_timer_sync(&ppd->led_override_timer); ppd 1281 drivers/infiniband/hw/hfi1/driver.c atomic_set(&ppd->led_override_timer_active, 0); ppd 1292 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = from_timer(ppd, t, led_override_timer); ppd 1293 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = ppd->dd; ppd 1300 drivers/infiniband/hw/hfi1/driver.c phase_idx = ppd->led_override_phase & 1; ppd 1304 drivers/infiniband/hw/hfi1/driver.c timeout = ppd->led_override_vals[phase_idx]; ppd 1307 drivers/infiniband/hw/hfi1/driver.c ppd->led_override_phase = !ppd->led_override_phase; ppd 1309 drivers/infiniband/hw/hfi1/driver.c mod_timer(&ppd->led_override_timer, jiffies + timeout); ppd 1318 drivers/infiniband/hw/hfi1/driver.c void hfi1_start_led_override(struct hfi1_pportdata *ppd, unsigned int timeon, ppd 1321 drivers/infiniband/hw/hfi1/driver.c if (!(ppd->dd->flags & HFI1_INITTED)) ppd 1325 drivers/infiniband/hw/hfi1/driver.c ppd->led_override_vals[0] = msecs_to_jiffies(timeoff); ppd 1326 drivers/infiniband/hw/hfi1/driver.c ppd->led_override_vals[1] = msecs_to_jiffies(timeon); ppd 1329 drivers/infiniband/hw/hfi1/driver.c ppd->led_override_phase = 1; ppd 1335 drivers/infiniband/hw/hfi1/driver.c if (!timer_pending(&ppd->led_override_timer)) { ppd 1336 drivers/infiniband/hw/hfi1/driver.c timer_setup(&ppd->led_override_timer, run_led_override, 0); ppd 1337 drivers/infiniband/hw/hfi1/driver.c ppd->led_override_timer.expires = jiffies + 1; ppd 1338 drivers/infiniband/hw/hfi1/driver.c add_timer(&ppd->led_override_timer); ppd 1339 drivers/infiniband/hw/hfi1/driver.c atomic_set(&ppd->led_override_timer_active, 1); ppd 1358 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd; ppd 1387 drivers/infiniband/hw/hfi1/driver.c ppd = dd->pport + pidx; ppd 1389 drivers/infiniband/hw/hfi1/driver.c shutdown_led_override(ppd); ppd 1420 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = packet->rcd->ppd; ppd 1430 drivers/infiniband/hw/hfi1/driver.c if ((packet->dlid & ~((1 << ppd->lmc) - 1)) != ppd->lid) ppd 1509 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 1510 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 1601 drivers/infiniband/hw/hfi1/driver.c rcv_hdrerr(rcd, rcd->ppd, packet); ppd 1712 drivers/infiniband/hw/hfi1/driver.c if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) ppd 1731 drivers/infiniband/hw/hfi1/driver.c if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) ppd 1495 drivers/infiniband/hw/hfi1/file_ops.c int hfi1_set_uevent_bits(struct hfi1_pportdata *ppd, const int evtbit) ppd 1498 drivers/infiniband/hw/hfi1/file_ops.c struct hfi1_devdata *dd = ppd->dd; ppd 1602 drivers/infiniband/hw/hfi1/file_ops.c struct hfi1_pportdata *ppd = uctxt->ppd; ppd 1615 drivers/infiniband/hw/hfi1/file_ops.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) ppd 1616 drivers/infiniband/hw/hfi1/file_ops.c if (pkey == ppd->pkeys[i]) ppd 1772 drivers/infiniband/hw/hfi1/firmware.c struct hfi1_pportdata *ppd = dd->pport; ppd 1784 drivers/infiniband/hw/hfi1/firmware.c if (ppd->config_from_scratch) ppd 1945 drivers/infiniband/hw/hfi1/firmware.c struct hfi1_pportdata *ppd = dd->pport; ppd 1946 drivers/infiniband/hw/hfi1/firmware.c u8 *cache = ppd->qsfp_info.cache; ppd 1952 drivers/infiniband/hw/hfi1/firmware.c *data = ppd->max_power_class; ppd 1954 drivers/infiniband/hw/hfi1/firmware.c *data = ppd->default_atten; ppd 1958 drivers/infiniband/hw/hfi1/firmware.c *data = ppd->port_type; ppd 1960 drivers/infiniband/hw/hfi1/firmware.c *data = ppd->local_atten; ppd 1962 drivers/infiniband/hw/hfi1/firmware.c *data = ppd->remote_atten; ppd 1966 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_CDR_APPLY_SMASK) >> ppd 1969 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_EMP_APPLY_SMASK) >> ppd 1972 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_AMP_APPLY_SMASK) >> ppd 1975 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_CDR_SMASK) >> ppd 1978 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_EMP_SMASK) >> ppd 1981 drivers/infiniband/hw/hfi1/firmware.c *data = (ppd->rx_preset & QSFP_RX_AMP_SMASK) >> ppd 1986 drivers/infiniband/hw/hfi1/firmware.c tx_preset = ppd->tx_preset_eq; ppd 1988 drivers/infiniband/hw/hfi1/firmware.c tx_preset = ppd->tx_preset_noeq; ppd 2087 drivers/infiniband/hw/hfi1/firmware.c struct hfi1_pportdata *ppd = dd->pport; ppd 2094 drivers/infiniband/hw/hfi1/firmware.c if (ppd->config_from_scratch) { ppd 215 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd; ppd 737 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd; /* read-only */ ppd 1485 drivers/infiniband/hw/hfi1/hfi.h int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa, ppd 1488 drivers/infiniband/hw/hfi1/hfi.h void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd, ppd 1558 drivers/infiniband/hw/hfi1/hfi.h static inline u32 active_egress_rate(struct hfi1_pportdata *ppd) ppd 1560 drivers/infiniband/hw/hfi1/hfi.h u16 link_speed = ppd->link_speed_active; ppd 1561 drivers/infiniband/hw/hfi1/hfi.h u16 link_width = ppd->link_width_active; ppd 1614 drivers/infiniband/hw/hfi1/hfi.h void set_link_ipg(struct hfi1_pportdata *ppd); ppd 1615 drivers/infiniband/hw/hfi1/hfi.h void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn, ppd 1628 drivers/infiniband/hw/hfi1/hfi.h int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey, ppd 1693 drivers/infiniband/hw/hfi1/hfi.h static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey) ppd 1698 drivers/infiniband/hw/hfi1/hfi.h if (ingress_pkey_matches_entry(pkey, ppd->pkeys[i])) ppd 1709 drivers/infiniband/hw/hfi1/hfi.h static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey, ppd 1712 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_devdata *dd = ppd->dd; ppd 1714 drivers/infiniband/hw/hfi1/hfi.h incr_cntr64(&ppd->port_rcv_constraint_errors); ppd 1730 drivers/infiniband/hw/hfi1/hfi.h static inline int ingress_pkey_check(struct hfi1_pportdata *ppd, u16 pkey, ppd 1733 drivers/infiniband/hw/hfi1/hfi.h if (!(force) && !(ppd->part_enforce & HFI1_PART_ENFORCE_IN)) ppd 1745 drivers/infiniband/hw/hfi1/hfi.h if (ingress_pkey_matches_entry(pkey, ppd->pkeys[idx])) ppd 1749 drivers/infiniband/hw/hfi1/hfi.h if (!ingress_pkey_table_search(ppd, pkey)) ppd 1753 drivers/infiniband/hw/hfi1/hfi.h ingress_pkey_table_fail(ppd, pkey, slid); ppd 1763 drivers/infiniband/hw/hfi1/hfi.h static inline int rcv_pkey_check(struct hfi1_pportdata *ppd, u16 pkey, ppd 1766 drivers/infiniband/hw/hfi1/hfi.h if (!(ppd->part_enforce & HFI1_PART_ENFORCE_IN)) ppd 1775 drivers/infiniband/hw/hfi1/hfi.h ingress_pkey_table_fail(ppd, pkey, slid); ppd 1805 drivers/infiniband/hw/hfi1/hfi.h int set_mtu(struct hfi1_pportdata *ppd); ppd 1807 drivers/infiniband/hw/hfi1/hfi.h int hfi1_set_lid(struct hfi1_pportdata *ppd, u32 lid, u8 lmc); ppd 1809 drivers/infiniband/hw/hfi1/hfi.h int hfi1_set_uevent_bits(struct hfi1_pportdata *ppd, const int evtbit); ppd 1812 drivers/infiniband/hw/hfi1/hfi.h int fm_get_table(struct hfi1_pportdata *ppd, int which, void *t); ppd 1813 drivers/infiniband/hw/hfi1/hfi.h int fm_set_table(struct hfi1_pportdata *ppd, int which, void *t); ppd 1820 drivers/infiniband/hw/hfi1/hfi.h int set_buffer_control(struct hfi1_pportdata *ppd, struct buffer_control *bc); ppd 1822 drivers/infiniband/hw/hfi1/hfi.h static inline struct hfi1_devdata *dd_from_ppd(struct hfi1_pportdata *ppd) ppd 1824 drivers/infiniband/hw/hfi1/hfi.h return ppd->dd; ppd 1858 drivers/infiniband/hw/hfi1/hfi.h return &rcd->ppd->ibport_data; ppd 1903 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1906 drivers/infiniband/hw/hfi1/hfi.h if (index >= ARRAY_SIZE(ppd->pkeys)) ppd 1909 drivers/infiniband/hw/hfi1/hfi.h ret = ppd->pkeys[index]; ppd 1919 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1922 drivers/infiniband/hw/hfi1/hfi.h return cpu_to_be64(ppd->guids[index]); ppd 1928 drivers/infiniband/hw/hfi1/hfi.h static inline struct cc_state *get_cc_state(struct hfi1_pportdata *ppd) ppd 1930 drivers/infiniband/hw/hfi1/hfi.h return rcu_dereference(ppd->cc_state); ppd 1937 drivers/infiniband/hw/hfi1/hfi.h struct cc_state *get_cc_state_protected(struct hfi1_pportdata *ppd) ppd 1939 drivers/infiniband/hw/hfi1/hfi.h return rcu_dereference_protected(ppd->cc_state, ppd 1940 drivers/infiniband/hw/hfi1/hfi.h lockdep_is_held(&ppd->cc_state_lock)); ppd 1972 drivers/infiniband/hw/hfi1/hfi.h void hfi1_start_led_override(struct hfi1_pportdata *ppd, unsigned int timeon, ppd 1974 drivers/infiniband/hw/hfi1/hfi.h void shutdown_led_override(struct hfi1_pportdata *ppd); ppd 2052 drivers/infiniband/hw/hfi1/hfi.h int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len); ppd 2263 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd; ppd 2270 drivers/infiniband/hw/hfi1/hfi.h ppd = (struct hfi1_pportdata *)(dd + 1); ppd 2271 drivers/infiniband/hw/hfi1/hfi.h for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 2272 drivers/infiniband/hw/hfi1/hfi.h ppd->ibport_data.rvp.z_rc_acks = ppd 2273 drivers/infiniband/hw/hfi1/hfi.h get_all_cpu_total(ppd->ibport_data.rvp.rc_acks); ppd 2274 drivers/infiniband/hw/hfi1/hfi.h ppd->ibport_data.rvp.z_rc_qacks = ppd 2275 drivers/infiniband/hw/hfi1/hfi.h get_all_cpu_total(ppd->ibport_data.rvp.rc_qacks); ppd 2314 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd; ppd 2323 drivers/infiniband/hw/hfi1/hfi.h ppd = ppd_from_ibp(ibp); ppd 2325 drivers/infiniband/hw/hfi1/hfi.h (ppd->lid >= be16_to_cpu(IB_MULTICAST_LID_BASE))) && ppd 2456 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_ibport *ibp = &packet->rcd->ppd->ibport_data; ppd 2457 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 2479 drivers/infiniband/hw/hfi1/hfi.h cpu_to_be64(ppd->guids[HFI1_PORT_GUID_INDEX]); ppd 130 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd) ppd 138 drivers/infiniband/hw/hfi1/init.c ret = hfi1_create_ctxtdata(ppd, dd->node, &rcd); ppd 344 drivers/infiniband/hw/hfi1/init.c int hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, int numa, ppd 347 drivers/infiniband/hw/hfi1/init.c struct hfi1_devdata *dd = ppd->dd; ppd 371 drivers/infiniband/hw/hfi1/init.c rcd->ppd = ppd; ppd 537 drivers/infiniband/hw/hfi1/init.c void set_link_ipg(struct hfi1_pportdata *ppd) ppd 539 drivers/infiniband/hw/hfi1/init.c struct hfi1_devdata *dd = ppd->dd; ppd 552 drivers/infiniband/hw/hfi1/init.c cc_state = get_cc_state(ppd); ppd 563 drivers/infiniband/hw/hfi1/init.c u16 ccti = ppd->cca_timer[i].ccti; ppd 577 drivers/infiniband/hw/hfi1/init.c current_egress_rate = active_egress_rate(ppd); ppd 579 drivers/infiniband/hw/hfi1/init.c max_pkt_time = egress_cycles(ppd->ibmaxlen, current_egress_rate); ppd 592 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 600 drivers/infiniband/hw/hfi1/init.c ppd = cca_timer->ppd; ppd 605 drivers/infiniband/hw/hfi1/init.c cc_state = get_cc_state(ppd); ppd 621 drivers/infiniband/hw/hfi1/init.c spin_lock_irqsave(&ppd->cca_timer_lock, flags); ppd 625 drivers/infiniband/hw/hfi1/init.c set_link_ipg(ppd); ppd 635 drivers/infiniband/hw/hfi1/init.c spin_unlock_irqrestore(&ppd->cca_timer_lock, flags); ppd 643 drivers/infiniband/hw/hfi1/init.c void hfi1_init_pportdata(struct pci_dev *pdev, struct hfi1_pportdata *ppd, ppd 650 drivers/infiniband/hw/hfi1/init.c ppd->dd = dd; ppd 651 drivers/infiniband/hw/hfi1/init.c ppd->hw_pidx = hw_pidx; ppd 652 drivers/infiniband/hw/hfi1/init.c ppd->port = port; /* IB port number, not index */ ppd 653 drivers/infiniband/hw/hfi1/init.c ppd->prev_link_width = LINK_WIDTH_DEFAULT; ppd 659 drivers/infiniband/hw/hfi1/init.c ppd->port_vl_xmit_wait_last[i] = 0; ppd 660 drivers/infiniband/hw/hfi1/init.c ppd->vl_xmit_flit_cnt[i] = 0; ppd 665 drivers/infiniband/hw/hfi1/init.c ppd->pkeys[default_pkey_idx] = DEFAULT_P_KEY; ppd 666 drivers/infiniband/hw/hfi1/init.c ppd->part_enforce |= HFI1_PART_ENFORCE_IN; ppd 671 drivers/infiniband/hw/hfi1/init.c ppd->pkeys[!default_pkey_idx] = 0x8001; ppd 674 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->link_vc_work, handle_verify_cap); ppd 675 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->link_up_work, handle_link_up); ppd 676 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->link_down_work, handle_link_down); ppd 677 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->freeze_work, handle_freeze); ppd 678 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->link_downgrade_work, handle_link_downgrade); ppd 679 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->sma_message_work, handle_sma_message); ppd 680 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->link_bounce_work, handle_link_bounce); ppd 681 drivers/infiniband/hw/hfi1/init.c INIT_DELAYED_WORK(&ppd->start_link_work, handle_start_link); ppd 682 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->linkstate_active_work, receive_interrupt_work); ppd 683 drivers/infiniband/hw/hfi1/init.c INIT_WORK(&ppd->qsfp_info.qsfp_work, qsfp_event); ppd 685 drivers/infiniband/hw/hfi1/init.c mutex_init(&ppd->hls_lock); ppd 686 drivers/infiniband/hw/hfi1/init.c spin_lock_init(&ppd->qsfp_info.qsfp_lock); ppd 688 drivers/infiniband/hw/hfi1/init.c ppd->qsfp_info.ppd = ppd; ppd 689 drivers/infiniband/hw/hfi1/init.c ppd->sm_trap_qp = 0x0; ppd 690 drivers/infiniband/hw/hfi1/init.c ppd->sa_qp = 0x1; ppd 692 drivers/infiniband/hw/hfi1/init.c ppd->hfi1_wq = NULL; ppd 694 drivers/infiniband/hw/hfi1/init.c spin_lock_init(&ppd->cca_timer_lock); ppd 697 drivers/infiniband/hw/hfi1/init.c hrtimer_init(&ppd->cca_timer[i].hrtimer, CLOCK_MONOTONIC, ppd 699 drivers/infiniband/hw/hfi1/init.c ppd->cca_timer[i].ppd = ppd; ppd 700 drivers/infiniband/hw/hfi1/init.c ppd->cca_timer[i].sl = i; ppd 701 drivers/infiniband/hw/hfi1/init.c ppd->cca_timer[i].ccti = 0; ppd 702 drivers/infiniband/hw/hfi1/init.c ppd->cca_timer[i].hrtimer.function = cca_timer_fn; ppd 705 drivers/infiniband/hw/hfi1/init.c ppd->cc_max_table_entries = IB_CC_TABLE_CAP_DEFAULT; ppd 707 drivers/infiniband/hw/hfi1/init.c spin_lock_init(&ppd->cc_state_lock); ppd 708 drivers/infiniband/hw/hfi1/init.c spin_lock_init(&ppd->cc_log_lock); ppd 710 drivers/infiniband/hw/hfi1/init.c RCU_INIT_POINTER(ppd->cc_state, cc_state); ppd 800 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 803 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 804 drivers/infiniband/hw/hfi1/init.c if (!ppd->hfi1_wq) { ppd 805 drivers/infiniband/hw/hfi1/init.c ppd->hfi1_wq = ppd 812 drivers/infiniband/hw/hfi1/init.c if (!ppd->hfi1_wq) ppd 815 drivers/infiniband/hw/hfi1/init.c if (!ppd->link_wq) { ppd 820 drivers/infiniband/hw/hfi1/init.c ppd->link_wq = ppd 826 drivers/infiniband/hw/hfi1/init.c if (!ppd->link_wq) ppd 834 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 835 drivers/infiniband/hw/hfi1/init.c if (ppd->hfi1_wq) { ppd 836 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->hfi1_wq); ppd 837 drivers/infiniband/hw/hfi1/init.c ppd->hfi1_wq = NULL; ppd 839 drivers/infiniband/hw/hfi1/init.c if (ppd->link_wq) { ppd 840 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->link_wq); ppd 841 drivers/infiniband/hw/hfi1/init.c ppd->link_wq = NULL; ppd 885 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 903 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 904 drivers/infiniband/hw/hfi1/init.c ppd->linkup = 0; ppd 968 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 971 drivers/infiniband/hw/hfi1/init.c ppd->statusp = &dd->status->port; ppd 973 drivers/infiniband/hw/hfi1/init.c set_mtu(ppd); ppd 994 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1000 drivers/infiniband/hw/hfi1/init.c lastfail = bringup_serdes(ppd); ppd 1004 drivers/infiniband/hw/hfi1/init.c ppd->port); ppd 1010 drivers/infiniband/hw/hfi1/init.c if (ppd->statusp) ppd 1011 drivers/infiniband/hw/hfi1/init.c *ppd->statusp |= HFI1_STATUS_CHIP_PRESENT | ppd 1013 drivers/infiniband/hw/hfi1/init.c if (!ppd->link_speed_enabled) ppd 1033 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 1037 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1038 drivers/infiniband/hw/hfi1/init.c if (ppd->led_override_timer.function) { ppd 1039 drivers/infiniband/hw/hfi1/init.c del_timer_sync(&ppd->led_override_timer); ppd 1040 drivers/infiniband/hw/hfi1/init.c atomic_set(&ppd->led_override_timer_active, 0); ppd 1056 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 1066 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1068 drivers/infiniband/hw/hfi1/init.c ppd->linkup = 0; ppd 1069 drivers/infiniband/hw/hfi1/init.c if (ppd->statusp) ppd 1070 drivers/infiniband/hw/hfi1/init.c *ppd->statusp &= ~(HFI1_STATUS_IB_CONF | ppd 1080 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1105 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1113 drivers/infiniband/hw/hfi1/init.c shutdown_led_override(ppd); ppd 1119 drivers/infiniband/hw/hfi1/init.c hfi1_quiet_serdes(ppd); ppd 1121 drivers/infiniband/hw/hfi1/init.c if (ppd->hfi1_wq) { ppd 1122 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->hfi1_wq); ppd 1123 drivers/infiniband/hw/hfi1/init.c ppd->hfi1_wq = NULL; ppd 1125 drivers/infiniband/hw/hfi1/init.c if (ppd->link_wq) { ppd 1126 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->link_wq); ppd 1127 drivers/infiniband/hw/hfi1/init.c ppd->link_wq = NULL; ppd 1373 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 1375 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1377 drivers/infiniband/hw/hfi1/init.c set_link_state(ppd, HLS_DN_DISABLE); ppd 1379 drivers/infiniband/hw/hfi1/init.c if (ppd->statusp) ppd 1380 drivers/infiniband/hw/hfi1/init.c *ppd->statusp &= ~HFI1_STATUS_IB_READY; ppd 1538 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd = &dd->pport[pidx]; ppd 1542 drivers/infiniband/hw/hfi1/init.c if (ppd->statusp) ppd 1543 drivers/infiniband/hw/hfi1/init.c *ppd->statusp &= ~HFI1_STATUS_CHIP_PRESENT; ppd 1546 drivers/infiniband/hw/hfi1/init.c hrtimer_cancel(&ppd->cca_timer[i].hrtimer); ppd 1548 drivers/infiniband/hw/hfi1/init.c spin_lock(&ppd->cc_state_lock); ppd 1549 drivers/infiniband/hw/hfi1/init.c cc_state = get_cc_state_protected(ppd); ppd 1550 drivers/infiniband/hw/hfi1/init.c RCU_INIT_POINTER(ppd->cc_state, NULL); ppd 1551 drivers/infiniband/hw/hfi1/init.c spin_unlock(&ppd->cc_state_lock); ppd 1641 drivers/infiniband/hw/hfi1/init.c struct hfi1_pportdata *ppd; ppd 1750 drivers/infiniband/hw/hfi1/init.c ppd = dd->pport + pidx; ppd 1751 drivers/infiniband/hw/hfi1/init.c if (ppd->hfi1_wq) { ppd 1752 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->hfi1_wq); ppd 1753 drivers/infiniband/hw/hfi1/init.c ppd->hfi1_wq = NULL; ppd 1755 drivers/infiniband/hw/hfi1/init.c if (ppd->link_wq) { ppd 1756 drivers/infiniband/hw/hfi1/init.c destroy_workqueue(ppd->link_wq); ppd 1757 drivers/infiniband/hw/hfi1/init.c ppd->link_wq = NULL; ppd 58 drivers/infiniband/hw/hfi1/intr.c static void set_mgmt_allowed(struct hfi1_pportdata *ppd) ppd 61 drivers/infiniband/hw/hfi1/intr.c struct hfi1_devdata *dd = ppd->dd; ppd 63 drivers/infiniband/hw/hfi1/intr.c if (ppd->neighbor_type == NEIGHBOR_TYPE_HFI) { ppd 64 drivers/infiniband/hw/hfi1/intr.c ppd->mgmt_allowed = 1; ppd 67 drivers/infiniband/hw/hfi1/intr.c ppd->mgmt_allowed = (frame >> MGMT_ALLOWED_SHIFT) ppd 79 drivers/infiniband/hw/hfi1/intr.c static void add_full_mgmt_pkey(struct hfi1_pportdata *ppd) ppd 81 drivers/infiniband/hw/hfi1/intr.c struct hfi1_devdata *dd = ppd->dd; ppd 84 drivers/infiniband/hw/hfi1/intr.c if (!((ppd->pkeys[2] == 0) || (ppd->pkeys[2] == FULL_MGMT_P_KEY))) ppd 86 drivers/infiniband/hw/hfi1/intr.c __func__, ppd->pkeys[2], FULL_MGMT_P_KEY); ppd 87 drivers/infiniband/hw/hfi1/intr.c ppd->pkeys[2] = FULL_MGMT_P_KEY; ppd 88 drivers/infiniband/hw/hfi1/intr.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0); ppd 89 drivers/infiniband/hw/hfi1/intr.c hfi1_event_pkey_change(ppd->dd, ppd->port); ppd 123 drivers/infiniband/hw/hfi1/intr.c static void signal_ib_event(struct hfi1_pportdata *ppd, enum ib_event_type ev) ppd 126 drivers/infiniband/hw/hfi1/intr.c struct hfi1_devdata *dd = ppd->dd; ppd 136 drivers/infiniband/hw/hfi1/intr.c event.element.port_num = ppd->port; ppd 154 drivers/infiniband/hw/hfi1/intr.c struct hfi1_pportdata *ppd = &dd->pport[0]; ppd 157 drivers/infiniband/hw/hfi1/intr.c if (!(ppd->linkup ^ !!linkup)) ppd 181 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_guid = ppd 183 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_type = ppd 186 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_port_number = ppd 189 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_fm_security = ppd 194 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_guid, ppd->neighbor_type, ppd 195 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_port_number); ppd 204 drivers/infiniband/hw/hfi1/intr.c set_mgmt_allowed(ppd); ppd 206 drivers/infiniband/hw/hfi1/intr.c if (ppd->mgmt_allowed) ppd 207 drivers/infiniband/hw/hfi1/intr.c add_full_mgmt_pkey(ppd); ppd 210 drivers/infiniband/hw/hfi1/intr.c ppd->linkup = 1; ppd 211 drivers/infiniband/hw/hfi1/intr.c ppd->offline_disabled_reason = ppd 215 drivers/infiniband/hw/hfi1/intr.c get_linkup_link_widths(ppd); ppd 219 drivers/infiniband/hw/hfi1/intr.c ppd->linkup = 0; ppd 222 drivers/infiniband/hw/hfi1/intr.c ppd->actual_vls_operational = 0; ppd 226 drivers/infiniband/hw/hfi1/intr.c start_freeze_handling(ppd, FREEZE_SELF | FREEZE_LINK_DOWN); ppd 230 drivers/infiniband/hw/hfi1/intr.c hfi1_set_uevent_bits(ppd, _HFI1_EVENT_LINKDOWN_BIT); ppd 233 drivers/infiniband/hw/hfi1/intr.c ppd->neighbor_normal = 0; ppd 236 drivers/infiniband/hw/hfi1/intr.c signal_ib_event(ppd, ev); ppd 103 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 105 drivers/infiniband/hw/hfi1/mad.c if (pkey_idx < ARRAY_SIZE(ppd->pkeys)) ppd 106 drivers/infiniband/hw/hfi1/mad.c return ppd->pkeys[pkey_idx]; ppd 298 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 299 drivers/infiniband/hw/hfi1/mad.c struct hfi1_devdata *dd = dd_from_ppd(ppd); ppd 300 drivers/infiniband/hw/hfi1/mad.c u8 port_num = ppd->port; ppd 677 drivers/infiniband/hw/hfi1/mad.c static void set_link_width_enabled(struct hfi1_pportdata *ppd, u32 w) ppd 679 drivers/infiniband/hw/hfi1/mad.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_LWID_ENB, w); ppd 682 drivers/infiniband/hw/hfi1/mad.c static void set_link_width_downgrade_enabled(struct hfi1_pportdata *ppd, u32 w) ppd 684 drivers/infiniband/hw/hfi1/mad.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_LWID_DG_ENB, w); ppd 687 drivers/infiniband/hw/hfi1/mad.c static void set_link_speed_enabled(struct hfi1_pportdata *ppd, u32 s) ppd 689 drivers/infiniband/hw/hfi1/mad.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_SPD_ENB, s); ppd 802 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 821 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 822 drivers/infiniband/hw/hfi1/mad.c ibp = &ppd->ibport_data; ppd 824 drivers/infiniband/hw/hfi1/mad.c if (ppd->vls_supported / 2 > ARRAY_SIZE(pi->neigh_mtu.pvlx_to_mtu) || ppd 825 drivers/infiniband/hw/hfi1/mad.c ppd->vls_supported > ARRAY_SIZE(dd->vld)) { ppd 830 drivers/infiniband/hw/hfi1/mad.c pi->lid = cpu_to_be32(ppd->lid); ppd 842 drivers/infiniband/hw/hfi1/mad.c pi->sm_trap_qp = cpu_to_be32(ppd->sm_trap_qp); ppd 843 drivers/infiniband/hw/hfi1/mad.c pi->sa_qp = cpu_to_be32(ppd->sa_qp); ppd 845 drivers/infiniband/hw/hfi1/mad.c pi->link_width.enabled = cpu_to_be16(ppd->link_width_enabled); ppd 846 drivers/infiniband/hw/hfi1/mad.c pi->link_width.supported = cpu_to_be16(ppd->link_width_supported); ppd 847 drivers/infiniband/hw/hfi1/mad.c pi->link_width.active = cpu_to_be16(ppd->link_width_active); ppd 850 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_supported); ppd 852 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_enabled); ppd 854 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_tx_active); ppd 856 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_rx_active); ppd 858 drivers/infiniband/hw/hfi1/mad.c pi->link_speed.supported = cpu_to_be16(ppd->link_speed_supported); ppd 859 drivers/infiniband/hw/hfi1/mad.c pi->link_speed.active = cpu_to_be16(ppd->link_speed_active); ppd 860 drivers/infiniband/hw/hfi1/mad.c pi->link_speed.enabled = cpu_to_be16(ppd->link_speed_enabled); ppd 862 drivers/infiniband/hw/hfi1/mad.c state = driver_lstate(ppd); ppd 865 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started = 1; ppd 867 drivers/infiniband/hw/hfi1/mad.c pi->port_phys_conf = (ppd->port_type & 0xf); ppd 869 drivers/infiniband/hw/hfi1/mad.c pi->port_states.ledenable_offlinereason = ppd->neighbor_normal << 4; ppd 871 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started << 5; ppd 878 drivers/infiniband/hw/hfi1/mad.c is_beaconing_active = !!atomic_read(&ppd->led_override_timer_active); ppd 881 drivers/infiniband/hw/hfi1/mad.c ppd->offline_disabled_reason; ppd 884 drivers/infiniband/hw/hfi1/mad.c (driver_pstate(ppd) << 4) | state; ppd 886 drivers/infiniband/hw/hfi1/mad.c pi->mkeyprotect_lmc = (ibp->rvp.mkeyprot << 6) | ppd->lmc; ppd 889 drivers/infiniband/hw/hfi1/mad.c for (i = 0; i < ppd->vls_supported; i++) { ppd 900 drivers/infiniband/hw/hfi1/mad.c pi->operational_vls = hfi1_get_ib_cfg(ppd, HFI1_IB_CFG_OP_VLS); ppd 902 drivers/infiniband/hw/hfi1/mad.c (ppd->linkinit_reason & OPA_PI_MASK_LINKINIT_REASON); ppd 903 drivers/infiniband/hw/hfi1/mad.c if (ppd->part_enforce & HFI1_PART_ENFORCE_IN) ppd 905 drivers/infiniband/hw/hfi1/mad.c if (ppd->part_enforce & HFI1_PART_ENFORCE_OUT) ppd 912 drivers/infiniband/hw/hfi1/mad.c pi->vl.cap = ppd->vls_supported; ppd 914 drivers/infiniband/hw/hfi1/mad.c pi->vl.arb_high_cap = (u8)hfi1_get_ib_cfg(ppd, HFI1_IB_CFG_VL_HIGH_CAP); ppd 915 drivers/infiniband/hw/hfi1/mad.c pi->vl.arb_low_cap = (u8)hfi1_get_ib_cfg(ppd, HFI1_IB_CFG_VL_LOW_CAP); ppd 923 drivers/infiniband/hw/hfi1/mad.c pi->port_ltp_crc_mode = cpu_to_be16(ppd->port_ltp_crc_mode); ppd 926 drivers/infiniband/hw/hfi1/mad.c ppd->is_active_optimize_enabled ? ppd 951 drivers/infiniband/hw/hfi1/mad.c pi->link_down_reason = ppd->local_link_down_reason.sma; ppd 952 drivers/infiniband/hw/hfi1/mad.c pi->neigh_link_down_reason = ppd->neigh_link_down_reason.sma; ppd 953 drivers/infiniband/hw/hfi1/mad.c pi->port_error_action = cpu_to_be32(ppd->port_error_action); ppd 964 drivers/infiniband/hw/hfi1/mad.c pi->neigh_node_guid = cpu_to_be64(ppd->neighbor_guid); ppd 965 drivers/infiniband/hw/hfi1/mad.c pi->neigh_port_num = ppd->neighbor_port_number; ppd 967 drivers/infiniband/hw/hfi1/mad.c (ppd->neighbor_type & OPA_PI_MASK_NEIGH_NODE_TYPE) | ppd 968 drivers/infiniband/hw/hfi1/mad.c (ppd->mgmt_allowed ? OPA_PI_MASK_NEIGH_MGMT_ALLOWED : 0) | ppd 969 drivers/infiniband/hw/hfi1/mad.c (ppd->neighbor_fm_security ? ppd 1014 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = dd->pport + port - 1; ppd 1016 drivers/infiniband/hw/hfi1/mad.c memcpy(pkeys, ppd->pkeys, sizeof(ppd->pkeys)); ppd 1192 drivers/infiniband/hw/hfi1/mad.c static int port_states_transition_allowed(struct hfi1_pportdata *ppd, ppd 1195 drivers/infiniband/hw/hfi1/mad.c u32 physical_old = driver_pstate(ppd); ppd 1196 drivers/infiniband/hw/hfi1/mad.c u32 logical_old = driver_lstate(ppd); ppd 1240 drivers/infiniband/hw/hfi1/mad.c static int set_port_states(struct hfi1_pportdata *ppd, struct opa_smp *smp, ppd 1243 drivers/infiniband/hw/hfi1/mad.c struct hfi1_devdata *dd = ppd->dd; ppd 1247 drivers/infiniband/hw/hfi1/mad.c ret = port_states_transition_allowed(ppd, logical_state, phys_state); ppd 1281 drivers/infiniband/hw/hfi1/mad.c set_link_down_reason(ppd, OPA_LINKDOWN_REASON_FM_BOUNCE, ppd 1301 drivers/infiniband/hw/hfi1/mad.c set_link_state(ppd, HLS_DN_OFFLINE); ppd 1302 drivers/infiniband/hw/hfi1/mad.c start_link(ppd); ppd 1304 drivers/infiniband/hw/hfi1/mad.c set_link_state(ppd, link_state); ppd 1307 drivers/infiniband/hw/hfi1/mad.c (ppd->offline_disabled_reason > ppd 1309 drivers/infiniband/hw/hfi1/mad.c ppd->offline_disabled_reason == ppd 1311 drivers/infiniband/hw/hfi1/mad.c ppd->offline_disabled_reason = ppd 1321 drivers/infiniband/hw/hfi1/mad.c ret = set_link_state(ppd, HLS_UP_ARMED); ppd 1326 drivers/infiniband/hw/hfi1/mad.c if (ppd->neighbor_normal) { ppd 1327 drivers/infiniband/hw/hfi1/mad.c ret = set_link_state(ppd, HLS_UP_ACTIVE); ppd 1358 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 1400 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 1401 drivers/infiniband/hw/hfi1/mad.c ibp = &ppd->ibport_data; ppd 1405 drivers/infiniband/hw/hfi1/mad.c ls_old = driver_lstate(ppd); ppd 1421 drivers/infiniband/hw/hfi1/mad.c } else if (ppd->lid != lid || ppd 1422 drivers/infiniband/hw/hfi1/mad.c ppd->lmc != (pi->mkeyprotect_lmc & OPA_PI_MASK_LMC)) { ppd 1423 drivers/infiniband/hw/hfi1/mad.c if (ppd->lid != lid) ppd 1424 drivers/infiniband/hw/hfi1/mad.c hfi1_set_uevent_bits(ppd, _HFI1_EVENT_LID_CHANGE_BIT); ppd 1425 drivers/infiniband/hw/hfi1/mad.c if (ppd->lmc != (pi->mkeyprotect_lmc & OPA_PI_MASK_LMC)) ppd 1426 drivers/infiniband/hw/hfi1/mad.c hfi1_set_uevent_bits(ppd, _HFI1_EVENT_LMC_CHANGE_BIT); ppd 1427 drivers/infiniband/hw/hfi1/mad.c hfi1_set_lid(ppd, lid, pi->mkeyprotect_lmc & OPA_PI_MASK_LMC); ppd 1435 drivers/infiniband/hw/hfi1/mad.c ppd->guids[HFI1_PORT_GUID_INDEX + 1] = ppd 1444 drivers/infiniband/hw/hfi1/mad.c ppd->linkinit_reason = ppd 1472 drivers/infiniband/hw/hfi1/mad.c ppd->local_link_down_reason.sma = 0; ppd 1473 drivers/infiniband/hw/hfi1/mad.c ppd->local_link_down_reason.latest = 0; ppd 1477 drivers/infiniband/hw/hfi1/mad.c ppd->neigh_link_down_reason.sma = 0; ppd 1478 drivers/infiniband/hw/hfi1/mad.c ppd->neigh_link_down_reason.latest = 0; ppd 1481 drivers/infiniband/hw/hfi1/mad.c ppd->sm_trap_qp = be32_to_cpu(pi->sm_trap_qp); ppd 1482 drivers/infiniband/hw/hfi1/mad.c ppd->sa_qp = be32_to_cpu(pi->sa_qp); ppd 1484 drivers/infiniband/hw/hfi1/mad.c ppd->port_error_action = be32_to_cpu(pi->port_error_action); ppd 1489 drivers/infiniband/hw/hfi1/mad.c set_link_width_enabled(ppd, ppd->link_width_supported); ppd 1490 drivers/infiniband/hw/hfi1/mad.c else if ((lwe & ~ppd->link_width_supported) == 0) ppd 1491 drivers/infiniband/hw/hfi1/mad.c set_link_width_enabled(ppd, lwe); ppd 1499 drivers/infiniband/hw/hfi1/mad.c set_link_width_downgrade_enabled(ppd, ppd 1500 drivers/infiniband/hw/hfi1/mad.c ppd-> ppd 1503 drivers/infiniband/hw/hfi1/mad.c } else if ((lwe & ~ppd->link_width_downgrade_supported) == 0) { ppd 1505 drivers/infiniband/hw/hfi1/mad.c if (lwe != ppd->link_width_downgrade_enabled) { ppd 1506 drivers/infiniband/hw/hfi1/mad.c set_link_width_downgrade_enabled(ppd, lwe); ppd 1515 drivers/infiniband/hw/hfi1/mad.c set_link_speed_enabled(ppd, lse); ppd 1523 drivers/infiniband/hw/hfi1/mad.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_VL_HIGH_LIMIT, ppd 1526 drivers/infiniband/hw/hfi1/mad.c if (ppd->vls_supported / 2 > ARRAY_SIZE(pi->neigh_mtu.pvlx_to_mtu) || ppd 1527 drivers/infiniband/hw/hfi1/mad.c ppd->vls_supported > ARRAY_SIZE(dd->vld)) { ppd 1531 drivers/infiniband/hw/hfi1/mad.c for (i = 0; i < ppd->vls_supported; i++) { ppd 1567 drivers/infiniband/hw/hfi1/mad.c set_mtu(ppd); ppd 1572 drivers/infiniband/hw/hfi1/mad.c if (vls > ppd->vls_supported) { ppd 1577 drivers/infiniband/hw/hfi1/mad.c if (hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_OP_VLS, ppd 1600 drivers/infiniband/hw/hfi1/mad.c ppd->port_crc_mode_enabled = port_ltp_to_cap(crc_enabled); ppd 1602 drivers/infiniband/hw/hfi1/mad.c ppd->is_active_optimize_enabled = ppd 1614 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started = 1; ppd 1616 drivers/infiniband/hw/hfi1/mad.c if (ppd->is_sm_config_started == 0) { ppd 1637 drivers/infiniband/hw/hfi1/mad.c ret = set_port_states(ppd, smp, ls_new, ps_new, local_mad); ppd 1655 drivers/infiniband/hw/hfi1/mad.c apply_link_downgrade_policy(ppd, 0); ppd 1672 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 1683 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 1687 drivers/infiniband/hw/hfi1/mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 1697 drivers/infiniband/hw/hfi1/mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 1699 drivers/infiniband/hw/hfi1/mad.c u16 okey = ppd->pkeys[i]; ppd 1708 drivers/infiniband/hw/hfi1/mad.c ppd->pkeys[i] = key; ppd 1713 drivers/infiniband/hw/hfi1/mad.c (void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0); ppd 1953 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 1969 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 1970 drivers/infiniband/hw/hfi1/mad.c lstate = driver_lstate(ppd); ppd 1993 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2002 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 2004 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_SC2VLNT, vp); ppd 2018 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2029 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 2030 drivers/infiniband/hw/hfi1/mad.c lstate = driver_lstate(ppd); ppd 2036 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 2038 drivers/infiniband/hw/hfi1/mad.c fm_set_table(ppd, FM_TBL_SC2VLNT, vp); ppd 2052 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2061 drivers/infiniband/hw/hfi1/mad.c ppd = ppd_from_ibp(ibp); ppd 2063 drivers/infiniband/hw/hfi1/mad.c lstate = driver_lstate(ppd); ppd 2066 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started = 1; ppd 2068 drivers/infiniband/hw/hfi1/mad.c psi->port_states.ledenable_offlinereason = ppd->neighbor_normal << 4; ppd 2070 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started << 5; ppd 2072 drivers/infiniband/hw/hfi1/mad.c ppd->offline_disabled_reason; ppd 2075 drivers/infiniband/hw/hfi1/mad.c (driver_pstate(ppd) << 4) | (lstate & 0xf); ppd 2077 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_tx_active); ppd 2079 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->link_width_downgrade_rx_active); ppd 2095 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2105 drivers/infiniband/hw/hfi1/mad.c ppd = ppd_from_ibp(ibp); ppd 2107 drivers/infiniband/hw/hfi1/mad.c ls_old = driver_lstate(ppd); ppd 2115 drivers/infiniband/hw/hfi1/mad.c ppd->is_sm_config_started = 1; ppd 2117 drivers/infiniband/hw/hfi1/mad.c if (ppd->is_sm_config_started == 0) { ppd 2125 drivers/infiniband/hw/hfi1/mad.c ret = set_port_states(ppd, smp, ls_new, ps_new, local_mad); ppd 2192 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2201 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 2202 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_BUFFER_CONTROL, p); ppd 2216 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 2223 drivers/infiniband/hw/hfi1/mad.c ppd = dd->pport + (port - 1); ppd 2225 drivers/infiniband/hw/hfi1/mad.c if (fm_set_table(ppd, FM_TBL_BUFFER_CONTROL, p) < 0) { ppd 2238 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(to_iport(ibdev, port)); ppd 2251 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_VL_LOW_ARB, p); ppd 2254 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_VL_HIGH_ARB, p); ppd 2257 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_VL_PREEMPT_ELEMS, p); ppd 2260 drivers/infiniband/hw/hfi1/mad.c fm_get_table(ppd, FM_TBL_VL_PREEMPT_MATRIX, p); ppd 2280 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(to_iport(ibdev, port)); ppd 2293 drivers/infiniband/hw/hfi1/mad.c (void)fm_set_table(ppd, FM_TBL_VL_LOW_ARB, p); ppd 2296 drivers/infiniband/hw/hfi1/mad.c (void)fm_set_table(ppd, FM_TBL_VL_HIGH_ARB, p); ppd 2627 drivers/infiniband/hw/hfi1/mad.c static void a0_portstatus(struct hfi1_pportdata *ppd, ppd 2630 drivers/infiniband/hw/hfi1/mad.c if (!is_bx(ppd->dd)) { ppd 2637 drivers/infiniband/hw/hfi1/mad.c read_port_cntr(ppd, C_TX_WAIT_VL, ppd 2693 drivers/infiniband/hw/hfi1/mad.c u64 get_xmit_wait_counters(struct hfi1_pportdata *ppd, ppd 2704 drivers/infiniband/hw/hfi1/mad.c read_port_cntr(ppd, C_TX_WAIT_VL, vl); ppd 2707 drivers/infiniband/hw/hfi1/mad.c read_port_cntr(ppd, C_TX_WAIT, CNTR_INVALID_VL); ppd 2711 drivers/infiniband/hw/hfi1/mad.c ppd->port_vl_xmit_wait_last[vl]; ppd 2714 drivers/infiniband/hw/hfi1/mad.c ppd->prev_link_width, ppd 2717 drivers/infiniband/hw/hfi1/mad.c ppd->vl_xmit_flit_cnt[vl] += delta_vl_xmit_wait; ppd 2718 drivers/infiniband/hw/hfi1/mad.c ppd->port_vl_xmit_wait_last[vl] = port_vl_xmit_wait_curr; ppd 2719 drivers/infiniband/hw/hfi1/mad.c ppd->prev_link_width = link_width; ppd 2721 drivers/infiniband/hw/hfi1/mad.c return ppd->vl_xmit_flit_cnt[vl]; ppd 2740 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 2767 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_RCV_CSTR_ERR, ppd 2792 drivers/infiniband/hw/hfi1/mad.c tx_link_width(ppd->link_width_downgrade_tx_active); ppd 2793 drivers/infiniband/hw/hfi1/mad.c link_speed = get_link_speed(ppd->link_speed_active); ppd 2795 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(get_xmit_wait_counters(ppd, link_width, ppd 2802 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD, ppd 2805 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_CSTR_ERR, ppd 2829 drivers/infiniband/hw/hfi1/mad.c rsp->link_downed = cpu_to_be32(read_port_cntr(ppd, C_SW_LINK_DOWN, ppd 2854 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_TX_FLIT_VL, ppd 2858 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_TX_PKT_VL, ppd 2865 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(get_xmit_wait_counters(ppd, link_width, ppd 2878 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD_VL, ppd 2884 drivers/infiniband/hw/hfi1/mad.c a0_portstatus(ppd, rsp); ppd 2897 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 2900 drivers/infiniband/hw/hfi1/mad.c error_counter_summary += read_port_cntr(ppd, C_SW_RCV_CSTR_ERR, ppd 2903 drivers/infiniband/hw/hfi1/mad.c error_counter_summary += read_port_cntr(ppd, C_SW_XMIT_DSCD, ppd 2905 drivers/infiniband/hw/hfi1/mad.c error_counter_summary += read_port_cntr(ppd, C_SW_XMIT_CSTR_ERR, ppd 2922 drivers/infiniband/hw/hfi1/mad.c error_counter_summary += read_port_cntr(ppd, C_SW_LINK_DOWN, ppd 2931 drivers/infiniband/hw/hfi1/mad.c static void a0_datacounters(struct hfi1_pportdata *ppd, struct _port_dctrs *rsp) ppd 2933 drivers/infiniband/hw/hfi1/mad.c if (!is_bx(ppd->dd)) { ppd 2940 drivers/infiniband/hw/hfi1/mad.c read_port_cntr(ppd, C_TX_WAIT_VL, ppd 2983 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3050 drivers/infiniband/hw/hfi1/mad.c tx_link_width(ppd->link_width_downgrade_tx_active); ppd 3051 drivers/infiniband/hw/hfi1/mad.c link_speed = get_link_speed(ppd->link_speed_active); ppd 3053 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(get_xmit_wait_counters(ppd, link_width, ppd 3074 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_TX_FLIT_VL, ppd 3082 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_TX_PKT_VL, ppd 3094 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(get_xmit_wait_counters(ppd, link_width, ppd 3118 drivers/infiniband/hw/hfi1/mad.c a0_datacounters(ppd, rsp); ppd 3160 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3172 drivers/infiniband/hw/hfi1/mad.c rsp->link_downed = cpu_to_be32(read_port_cntr(ppd, C_SW_LINK_DOWN, ppd 3181 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD, ppd 3184 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_CSTR_ERR, ppd 3187 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_RCV_CSTR_ERR, ppd 3209 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd; ppd 3250 drivers/infiniband/hw/hfi1/mad.c ppd = ppd_from_ibp(ibp); ppd 3274 drivers/infiniband/hw/hfi1/mad.c cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD_VL, ppd 3478 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3514 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_TX_WAIT, CNTR_INVALID_VL, 0); ppd 3515 drivers/infiniband/hw/hfi1/mad.c ppd->port_vl_xmit_wait_last[C_VL_COUNT] = 0; ppd 3516 drivers/infiniband/hw/hfi1/mad.c ppd->vl_xmit_flit_cnt[C_VL_COUNT] = 0; ppd 3538 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_SW_RCV_CSTR_ERR, CNTR_INVALID_VL, 0); ppd 3542 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_SW_XMIT_DSCD, CNTR_INVALID_VL, 0); ppd 3545 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_SW_XMIT_CSTR_ERR, CNTR_INVALID_VL, 0); ppd 3571 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_SW_LINK_DOWN, CNTR_INVALID_VL, 0); ppd 3578 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_TX_FLIT_VL, idx_from_vl(vl), 0); ppd 3584 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_TX_PKT_VL, idx_from_vl(vl), 0); ppd 3590 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_TX_WAIT_VL, idx_from_vl(vl), 0); ppd 3591 drivers/infiniband/hw/hfi1/mad.c ppd->port_vl_xmit_wait_last[idx_from_vl(vl)] = 0; ppd 3592 drivers/infiniband/hw/hfi1/mad.c ppd->vl_xmit_flit_cnt[idx_from_vl(vl)] = 0; ppd 3612 drivers/infiniband/hw/hfi1/mad.c write_port_cntr(ppd, C_SW_XMIT_DSCD_VL, ppd 3712 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3720 drivers/infiniband/hw/hfi1/mad.c p->control_table_cap = ppd->cc_max_table_entries; ppd 3737 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3748 drivers/infiniband/hw/hfi1/mad.c cc_state = get_cc_state(ppd); ppd 3778 drivers/infiniband/hw/hfi1/mad.c static void apply_cc_state(struct hfi1_pportdata *ppd) ppd 3790 drivers/infiniband/hw/hfi1/mad.c spin_lock(&ppd->cc_state_lock); ppd 3792 drivers/infiniband/hw/hfi1/mad.c old_cc_state = get_cc_state_protected(ppd); ppd 3795 drivers/infiniband/hw/hfi1/mad.c spin_unlock(&ppd->cc_state_lock); ppd 3802 drivers/infiniband/hw/hfi1/mad.c if (ppd->total_cct_entry) ppd 3803 drivers/infiniband/hw/hfi1/mad.c new_cc_state->cct.ccti_limit = ppd->total_cct_entry - 1; ppd 3807 drivers/infiniband/hw/hfi1/mad.c memcpy(new_cc_state->cct.entries, ppd->ccti_entries, ppd 3808 drivers/infiniband/hw/hfi1/mad.c ppd->total_cct_entry * sizeof(struct ib_cc_table_entry)); ppd 3811 drivers/infiniband/hw/hfi1/mad.c new_cc_state->cong_setting.control_map = ppd->cc_sl_control_map; ppd 3812 drivers/infiniband/hw/hfi1/mad.c memcpy(new_cc_state->cong_setting.entries, ppd->congestion_entries, ppd 3815 drivers/infiniband/hw/hfi1/mad.c rcu_assign_pointer(ppd->cc_state, new_cc_state); ppd 3817 drivers/infiniband/hw/hfi1/mad.c spin_unlock(&ppd->cc_state_lock); ppd 3829 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3842 drivers/infiniband/hw/hfi1/mad.c spin_lock(&ppd->cc_state_lock); ppd 3843 drivers/infiniband/hw/hfi1/mad.c ppd->cc_sl_control_map = be32_to_cpu(p->control_map); ppd 3845 drivers/infiniband/hw/hfi1/mad.c entries = ppd->congestion_entries; ppd 3853 drivers/infiniband/hw/hfi1/mad.c spin_unlock(&ppd->cc_state_lock); ppd 3856 drivers/infiniband/hw/hfi1/mad.c apply_cc_state(ppd); ppd 3867 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3877 drivers/infiniband/hw/hfi1/mad.c spin_lock_irq(&ppd->cc_log_lock); ppd 3882 drivers/infiniband/hw/hfi1/mad.c cpu_to_be16(ppd->threshold_event_counter); ppd 3884 drivers/infiniband/hw/hfi1/mad.c ppd->threshold_cong_event_map, ppd 3891 drivers/infiniband/hw/hfi1/mad.c &ppd->cc_events[ppd->cc_mad_idx++]; ppd 3892 drivers/infiniband/hw/hfi1/mad.c if (ppd->cc_mad_idx == OPA_CONG_LOG_ELEMS) ppd 3893 drivers/infiniband/hw/hfi1/mad.c ppd->cc_mad_idx = 0; ppd 3916 drivers/infiniband/hw/hfi1/mad.c memset(ppd->threshold_cong_event_map, 0x0, ppd 3917 drivers/infiniband/hw/hfi1/mad.c sizeof(ppd->threshold_cong_event_map)); ppd 3918 drivers/infiniband/hw/hfi1/mad.c ppd->threshold_event_counter = 0; ppd 3920 drivers/infiniband/hw/hfi1/mad.c spin_unlock_irq(&ppd->cc_log_lock); ppd 3935 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3946 drivers/infiniband/hw/hfi1/mad.c start_block + n_blocks > ppd->cc_max_table_entries) { ppd 3953 drivers/infiniband/hw/hfi1/mad.c cc_state = get_cc_state(ppd); ppd 3986 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 3997 drivers/infiniband/hw/hfi1/mad.c start_block + n_blocks > ppd->cc_max_table_entries) { ppd 4017 drivers/infiniband/hw/hfi1/mad.c spin_lock(&ppd->cc_state_lock); ppd 4018 drivers/infiniband/hw/hfi1/mad.c ppd->total_cct_entry = ccti_limit + 1; ppd 4019 drivers/infiniband/hw/hfi1/mad.c entries = ppd->ccti_entries; ppd 4022 drivers/infiniband/hw/hfi1/mad.c spin_unlock(&ppd->cc_state_lock); ppd 4025 drivers/infiniband/hw/hfi1/mad.c apply_cc_state(ppd); ppd 4044 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = dd->pport; ppd 4060 drivers/infiniband/hw/hfi1/mad.c is_beaconing_active = !!atomic_read(&ppd->led_override_timer_active); ppd 4383 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 4385 drivers/infiniband/hw/hfi1/mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); ++i) ppd 4386 drivers/infiniband/hw/hfi1/mad.c if (ppd->pkeys[i] == FULL_MGMT_P_KEY) ppd 4399 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 4408 drivers/infiniband/hw/hfi1/mad.c return (in_wc->slid == ppd->lid); ppd 4424 drivers/infiniband/hw/hfi1/mad.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 4427 drivers/infiniband/hw/hfi1/mad.c if (in_wc->pkey_index >= ARRAY_SIZE(ppd->pkeys)) ppd 4430 drivers/infiniband/hw/hfi1/mad.c pkey = ppd->pkeys[in_wc->pkey_index]; ppd 4451 drivers/infiniband/hw/hfi1/mad.c ingress_pkey_table_fail(ppd, pkey, in_wc->slid); ppd 442 drivers/infiniband/hw/hfi1/mad.h u64 get_xmit_wait_counters(struct hfi1_pportdata *ppd, u16 link_width, ppd 2020 drivers/infiniband/hw/hfi1/pio.c struct hfi1_pportdata *ppd = dd->pport; ppd 2084 drivers/infiniband/hw/hfi1/pio.c if (pio_map_init(dd, ppd->port - 1, num_vls, NULL)) ppd 103 drivers/infiniband/hw/hfi1/platform.c struct hfi1_pportdata *ppd = dd->pport; ppd 111 drivers/infiniband/hw/hfi1/platform.c ppd->port_type = temp_dest >> ppd 118 drivers/infiniband/hw/hfi1/platform.c ppd->local_atten = temp_dest >> ppd 125 drivers/infiniband/hw/hfi1/platform.c ppd->remote_atten = temp_dest >> ppd 132 drivers/infiniband/hw/hfi1/platform.c ppd->default_atten = temp_dest >> ppd 139 drivers/infiniband/hw/hfi1/platform.c ppd->tx_preset_eq = (temp_scratch & TX_EQ_SMASK) >> TX_EQ_SHIFT; ppd 140 drivers/infiniband/hw/hfi1/platform.c ppd->tx_preset_noeq = (temp_scratch & TX_NO_EQ_SMASK) >> TX_NO_EQ_SHIFT; ppd 141 drivers/infiniband/hw/hfi1/platform.c ppd->rx_preset = (temp_scratch & RX_SMASK) >> RX_SHIFT; ppd 143 drivers/infiniband/hw/hfi1/platform.c ppd->max_power_class = (temp_scratch & QSFP_MAX_POWER_SMASK) >> ppd 146 drivers/infiniband/hw/hfi1/platform.c ppd->config_from_scratch = true; ppd 205 drivers/infiniband/hw/hfi1/platform.c void get_port_type(struct hfi1_pportdata *ppd) ppd 210 drivers/infiniband/hw/hfi1/platform.c ret = get_platform_config_field(ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 214 drivers/infiniband/hw/hfi1/platform.c ppd->port_type = PORT_TYPE_UNKNOWN; ppd 217 drivers/infiniband/hw/hfi1/platform.c ppd->port_type = temp; ppd 220 drivers/infiniband/hw/hfi1/platform.c int set_qsfp_tx(struct hfi1_pportdata *ppd, int on) ppd 225 drivers/infiniband/hw/hfi1/platform.c ret = qsfp_write(ppd, ppd->dd->hfi1_id, QSFP_TX_CTRL_BYTE_OFFS, ppd 235 drivers/infiniband/hw/hfi1/platform.c static int qual_power(struct hfi1_pportdata *ppd) ppd 238 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 242 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_SYSTEM_TABLE, 0, ppd 250 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 253 drivers/infiniband/hw/hfi1/platform.c if (ppd->offline_disabled_reason == ppd 256 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 264 drivers/infiniband/hw/hfi1/platform.c static int qual_bitrate(struct hfi1_pportdata *ppd) ppd 266 drivers/infiniband/hw/hfi1/platform.c u16 lss = ppd->link_speed_supported, lse = ppd->link_speed_enabled; ppd 267 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 271 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 276 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 279 drivers/infiniband/hw/hfi1/platform.c if (ppd->offline_disabled_reason == ppd 282 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 290 drivers/infiniband/hw/hfi1/platform.c static int set_qsfp_high_power(struct hfi1_pportdata *ppd) ppd 293 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 304 drivers/infiniband/hw/hfi1/platform.c ret = qsfp_write(ppd, ppd->dd->hfi1_id, ppd 312 drivers/infiniband/hw/hfi1/platform.c ret = qsfp_write(ppd, ppd->dd->hfi1_id, ppd 325 drivers/infiniband/hw/hfi1/platform.c static void apply_rx_cdr(struct hfi1_pportdata *ppd, ppd 330 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 347 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_RX_PRESET_TABLE, ppd 353 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 359 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_RX_PRESET_TABLE, ppd 376 drivers/infiniband/hw/hfi1/platform.c static void apply_tx_cdr(struct hfi1_pportdata *ppd, ppd 381 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 398 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 404 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 410 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 427 drivers/infiniband/hw/hfi1/platform.c struct hfi1_pportdata *ppd, u32 rx_preset_index, ppd 430 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 433 drivers/infiniband/hw/hfi1/platform.c apply_rx_cdr(ppd, rx_preset_index, &cdr_ctrl_byte); ppd 435 drivers/infiniband/hw/hfi1/platform.c apply_tx_cdr(ppd, tx_preset_index, &cdr_ctrl_byte); ppd 437 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, QSFP_CDR_CTRL_BYTE_OFFS, ppd 441 drivers/infiniband/hw/hfi1/platform.c static void apply_tx_eq_auto(struct hfi1_pportdata *ppd) ppd 443 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 451 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 241, &tx_eq, 1); ppd 454 drivers/infiniband/hw/hfi1/platform.c static void apply_tx_eq_prog(struct hfi1_pportdata *ppd, u32 tx_preset_index) ppd 456 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 464 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_TX_PRESET_TABLE, ppd 469 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 475 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_TX_PRESET_TABLE, ppd 481 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 486 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 494 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 234, &tx_eq, 1); ppd 495 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 235, &tx_eq, 1); ppd 498 drivers/infiniband/hw/hfi1/platform.c static void apply_rx_eq_emp(struct hfi1_pportdata *ppd, u32 rx_preset_index) ppd 501 drivers/infiniband/hw/hfi1/platform.c u8 rx_eq, *cache = ppd->qsfp_info.cache; ppd 506 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_RX_PRESET_TABLE, ppd 512 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 518 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_RX_PRESET_TABLE, ppd 524 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 529 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 538 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 236, &rx_eq, 1); ppd 539 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 237, &rx_eq, 1); ppd 542 drivers/infiniband/hw/hfi1/platform.c static void apply_eq_settings(struct hfi1_pportdata *ppd, ppd 545 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 549 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 555 drivers/infiniband/hw/hfi1/platform.c apply_tx_eq_auto(ppd); ppd 557 drivers/infiniband/hw/hfi1/platform.c apply_tx_eq_prog(ppd, tx_preset_index); ppd 559 drivers/infiniband/hw/hfi1/platform.c apply_rx_eq_emp(ppd, rx_preset_index); ppd 563 drivers/infiniband/hw/hfi1/platform.c struct hfi1_pportdata *ppd, u32 rx_preset_index, ppd 567 drivers/infiniband/hw/hfi1/platform.c u8 rx_amp = 0, i = 0, preferred = 0, *cache = ppd->qsfp_info.cache; ppd 571 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 577 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 583 drivers/infiniband/hw/hfi1/platform.c get_platform_config_field(ppd->dd, ppd 590 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 595 drivers/infiniband/hw/hfi1/platform.c get_platform_config_field(ppd->dd, ppd 601 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 619 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, "No supported RX AMP, not applying\n"); ppd 623 drivers/infiniband/hw/hfi1/platform.c dd_dev_info(ppd->dd, ppd 627 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 238, &rx_amp, 1); ppd 628 drivers/infiniband/hw/hfi1/platform.c qsfp_write(ppd, ppd->dd->hfi1_id, (256 * 3) + 239, &rx_amp, 1); ppd 633 drivers/infiniband/hw/hfi1/platform.c static void apply_tx_lanes(struct hfi1_pportdata *ppd, u8 field_id, ppd 640 drivers/infiniband/hw/hfi1/platform.c ret = load_8051_config(ppd->dd, field_id, i, config_data); ppd 643 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 660 drivers/infiniband/hw/hfi1/platform.c static u8 aoc_low_power_setting(struct hfi1_pportdata *ppd) ppd 662 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 666 drivers/infiniband/hw/hfi1/platform.c if (ppd->port_type != PORT_TYPE_QSFP) ppd 683 drivers/infiniband/hw/hfi1/platform.c struct hfi1_pportdata *ppd, u32 tx_preset_index, ppd 689 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 692 drivers/infiniband/hw/hfi1/platform.c read_8051_config(ppd->dd, LINK_TUNING_PARAMETERS, GENERAL_CONFIG, ppd 696 drivers/infiniband/hw/hfi1/platform.c ret = load_8051_config(ppd->dd, LINK_TUNING_PARAMETERS, GENERAL_CONFIG, ppd 699 drivers/infiniband/hw/hfi1/platform.c dd_dev_err(ppd->dd, "%s: Failed to set tuning method\n", ppd 704 drivers/infiniband/hw/hfi1/platform.c apply_tx_lanes(ppd, CHANNEL_LOSS_SETTINGS, config_data, ppd 708 drivers/infiniband/hw/hfi1/platform.c if (ppd->qsfp_info.cache_valid) { ppd 714 drivers/infiniband/hw/hfi1/platform.c ret = read_8051_config(ppd->dd, DC_HOST_COMM_SETTINGS, ppd 719 drivers/infiniband/hw/hfi1/platform.c ret = load_8051_config(ppd->dd, DC_HOST_COMM_SETTINGS, ppd 722 drivers/infiniband/hw/hfi1/platform.c dd_dev_err(ppd->dd, ppd 728 drivers/infiniband/hw/hfi1/platform.c if (ppd->port_type == PORT_TYPE_QSFP && limiting_active) ppd 729 drivers/infiniband/hw/hfi1/platform.c dd_dev_err(ppd->dd, "%s: Invalid Tx preset index\n", ppd 736 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_TX_PRESET_TABLE, tx_preset_index, ppd 741 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_TX_PRESET_TABLE, ppd 746 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_TX_PRESET_TABLE, ppd 760 drivers/infiniband/hw/hfi1/platform.c (aoc_low_power_setting(ppd) << 24); ppd 762 drivers/infiniband/hw/hfi1/platform.c apply_tx_lanes(ppd, TX_EQ_SETTINGS, config_data, ppd 767 drivers/infiniband/hw/hfi1/platform.c static int tune_active_qsfp(struct hfi1_pportdata *ppd, u32 *ptr_tx_preset, ppd 771 drivers/infiniband/hw/hfi1/platform.c u16 lss = ppd->link_speed_supported, lse = ppd->link_speed_enabled; ppd 772 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 774 drivers/infiniband/hw/hfi1/platform.c ppd->qsfp_info.limiting_active = 1; ppd 776 drivers/infiniband/hw/hfi1/platform.c ret = set_qsfp_tx(ppd, 0); ppd 780 drivers/infiniband/hw/hfi1/platform.c ret = qual_power(ppd); ppd 784 drivers/infiniband/hw/hfi1/platform.c ret = qual_bitrate(ppd); ppd 793 drivers/infiniband/hw/hfi1/platform.c if (ppd->qsfp_info.reset_needed) { ppd 794 drivers/infiniband/hw/hfi1/platform.c ret = reset_qsfp(ppd); ppd 797 drivers/infiniband/hw/hfi1/platform.c refresh_qsfp_cache(ppd, &ppd->qsfp_info); ppd 799 drivers/infiniband/hw/hfi1/platform.c ppd->qsfp_info.reset_needed = 1; ppd 802 drivers/infiniband/hw/hfi1/platform.c ret = set_qsfp_high_power(ppd); ppd 808 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 818 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 829 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 838 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 842 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 845 drivers/infiniband/hw/hfi1/platform.c apply_cdr_settings(ppd, *ptr_rx_preset, *ptr_tx_preset); ppd 847 drivers/infiniband/hw/hfi1/platform.c apply_eq_settings(ppd, *ptr_rx_preset, *ptr_tx_preset); ppd 849 drivers/infiniband/hw/hfi1/platform.c apply_rx_amplitude_settings(ppd, *ptr_rx_preset, *ptr_tx_preset); ppd 851 drivers/infiniband/hw/hfi1/platform.c ret = set_qsfp_tx(ppd, 1); ppd 856 drivers/infiniband/hw/hfi1/platform.c static int tune_qsfp(struct hfi1_pportdata *ppd, ppd 861 drivers/infiniband/hw/hfi1/platform.c u16 lss = ppd->link_speed_supported, lse = ppd->link_speed_enabled; ppd 863 drivers/infiniband/hw/hfi1/platform.c u8 *cache = ppd->qsfp_info.cache; ppd 868 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 884 drivers/infiniband/hw/hfi1/platform.c ppd->dd, ppd 893 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 905 drivers/infiniband/hw/hfi1/platform.c ret = tune_active_qsfp(ppd, ptr_tx_preset, ptr_rx_preset, ppd 915 drivers/infiniband/hw/hfi1/platform.c dd_dev_warn(ppd->dd, "%s: Unknown/unsupported cable\n", ppd 928 drivers/infiniband/hw/hfi1/platform.c void tune_serdes(struct hfi1_pportdata *ppd) ppd 935 drivers/infiniband/hw/hfi1/platform.c struct hfi1_devdata *dd = ppd->dd; ppd 941 drivers/infiniband/hw/hfi1/platform.c ppd->link_enabled = 1; ppd 943 drivers/infiniband/hw/hfi1/platform.c ppd->driver_link_ready = 0; ppd 944 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = HFI1_ODR_MASK(OPA_LINKDOWN_REASON_NONE); ppd 948 drivers/infiniband/hw/hfi1/platform.c ppd->dd->icode == ICODE_FUNCTIONAL_SIMULATOR) { ppd 949 drivers/infiniband/hw/hfi1/platform.c ppd->driver_link_ready = 1; ppd 951 drivers/infiniband/hw/hfi1/platform.c if (qsfp_mod_present(ppd)) { ppd 952 drivers/infiniband/hw/hfi1/platform.c ret = acquire_chip_resource(ppd->dd, ppd 953 drivers/infiniband/hw/hfi1/platform.c qsfp_resource(ppd->dd), ppd 956 drivers/infiniband/hw/hfi1/platform.c dd_dev_err(ppd->dd, "%s: hfi%d: cannot lock i2c chain\n", ppd 957 drivers/infiniband/hw/hfi1/platform.c __func__, (int)ppd->dd->hfi1_id); ppd 961 drivers/infiniband/hw/hfi1/platform.c refresh_qsfp_cache(ppd, &ppd->qsfp_info); ppd 962 drivers/infiniband/hw/hfi1/platform.c release_chip_resource(ppd->dd, qsfp_resource(ppd->dd)); ppd 968 drivers/infiniband/hw/hfi1/platform.c switch (ppd->port_type) { ppd 970 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 978 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 982 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 990 drivers/infiniband/hw/hfi1/platform.c if (qsfp_mod_present(ppd)) { ppd 996 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 1001 drivers/infiniband/hw/hfi1/platform.c ppd->dd, PLATFORM_CONFIG_PORT_TABLE, 0, ppd 1009 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 1015 drivers/infiniband/hw/hfi1/platform.c if (qsfp_mod_present(ppd)) { ppd 1016 drivers/infiniband/hw/hfi1/platform.c ret = acquire_chip_resource(ppd->dd, ppd 1017 drivers/infiniband/hw/hfi1/platform.c qsfp_resource(ppd->dd), ppd 1020 drivers/infiniband/hw/hfi1/platform.c dd_dev_err(ppd->dd, "%s: hfi%d: cannot lock i2c chain\n", ppd 1021 drivers/infiniband/hw/hfi1/platform.c __func__, (int)ppd->dd->hfi1_id); ppd 1024 drivers/infiniband/hw/hfi1/platform.c refresh_qsfp_cache(ppd, &ppd->qsfp_info); ppd 1026 drivers/infiniband/hw/hfi1/platform.c if (ppd->qsfp_info.cache_valid) { ppd 1027 drivers/infiniband/hw/hfi1/platform.c ret = tune_qsfp(ppd, ppd 1037 drivers/infiniband/hw/hfi1/platform.c refresh_qsfp_cache(ppd, &ppd->qsfp_info); ppd 1039 drivers/infiniband/hw/hfi1/platform.c ppd->qsfp_info.limiting_active; ppd 1046 drivers/infiniband/hw/hfi1/platform.c release_chip_resource(ppd->dd, qsfp_resource(ppd->dd)); ppd 1050 drivers/infiniband/hw/hfi1/platform.c ppd->offline_disabled_reason = ppd 1057 drivers/infiniband/hw/hfi1/platform.c dd_dev_warn(ppd->dd, "%s: Unknown port type\n", __func__); ppd 1058 drivers/infiniband/hw/hfi1/platform.c ppd->port_type = PORT_TYPE_UNKNOWN; ppd 1066 drivers/infiniband/hw/hfi1/platform.c if (ppd->offline_disabled_reason == ppd 1068 drivers/infiniband/hw/hfi1/platform.c apply_tunings(ppd, tx_preset_index, tuning_method, ppd 1072 drivers/infiniband/hw/hfi1/platform.c ppd->driver_link_ready = 1; ppd 1076 drivers/infiniband/hw/hfi1/platform.c ppd->driver_link_ready = 0; ppd 408 drivers/infiniband/hw/hfi1/platform.h void get_port_type(struct hfi1_pportdata *ppd); ppd 409 drivers/infiniband/hw/hfi1/platform.h int set_qsfp_tx(struct hfi1_pportdata *ppd, int on); ppd 410 drivers/infiniband/hw/hfi1/platform.h void tune_serdes(struct hfi1_pportdata *ppd); ppd 260 drivers/infiniband/hw/hfi1/qp.c struct hfi1_pportdata *ppd; ppd 274 drivers/infiniband/hw/hfi1/qp.c ppd = ppd_from_ibp(ibp); ppd 275 drivers/infiniband/hw/hfi1/qp.c priv->hdr_type = hfi1_get_hdr_type(ppd->lid, &qp->remote_ah_attr); ppd 323 drivers/infiniband/hw/hfi1/qp.c struct hfi1_pportdata *ppd; ppd 344 drivers/infiniband/hw/hfi1/qp.c ppd = ppd_from_ibp(ibp); ppd 345 drivers/infiniband/hw/hfi1/qp.c dd = dd_from_ppd(ppd); ppd 383 drivers/infiniband/hw/hfi1/qp.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 386 drivers/infiniband/hw/hfi1/qp.c return iowait_schedule(&priv->s_iowait, ppd->hfi1_wq, ppd 937 drivers/infiniband/hw/hfi1/qp.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 940 drivers/infiniband/hw/hfi1/qp.c if (qp->port_num != ppd->port || ppd 973 drivers/infiniband/hw/hfi1/qp.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 974 drivers/infiniband/hw/hfi1/qp.c struct hfi1_ibdev *dev = &ppd->dd->verbs_dev; ppd 316 drivers/infiniband/hw/hfi1/qsfp.c static int __i2c_write(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, ppd 319 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_devdata *dd = ppd->dd; ppd 335 drivers/infiniband/hw/hfi1/qsfp.c int i2c_write(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, int offset, ppd 340 drivers/infiniband/hw/hfi1/qsfp.c if (!check_chip_resource(ppd->dd, i2c_target(target), __func__)) ppd 343 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_write(ppd, target, i2c_addr, offset, bp, len); ppd 355 drivers/infiniband/hw/hfi1/qsfp.c static int __i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, ppd 358 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_devdata *dd = ppd->dd; ppd 374 drivers/infiniband/hw/hfi1/qsfp.c int i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, int offset, ppd 379 drivers/infiniband/hw/hfi1/qsfp.c if (!check_chip_resource(ppd->dd, i2c_target(target), __func__)) ppd 382 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_read(ppd, target, i2c_addr, offset, bp, len); ppd 397 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 406 drivers/infiniband/hw/hfi1/qsfp.c if (!check_chip_resource(ppd->dd, i2c_target(target), __func__)) ppd 416 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_write(ppd, target, QSFP_DEV | QSFP_OFFSET_SIZE, ppd 421 drivers/infiniband/hw/hfi1/qsfp.c hfi1_dev_porterr(ppd->dd, ppd->port, ppd 433 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_write(ppd, target, QSFP_DEV | QSFP_OFFSET_SIZE, ppd 453 drivers/infiniband/hw/hfi1/qsfp.c int one_qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 456 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_devdata *dd = ppd->dd; ppd 463 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_write(ppd, target, addr, bp, len); ppd 477 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 486 drivers/infiniband/hw/hfi1/qsfp.c if (!check_chip_resource(ppd->dd, i2c_target(target), __func__)) ppd 495 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_write(ppd, target, QSFP_DEV | QSFP_OFFSET_SIZE, ppd 500 drivers/infiniband/hw/hfi1/qsfp.c hfi1_dev_porterr(ppd->dd, ppd->port, ppd 512 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_read(ppd, target, QSFP_DEV | QSFP_OFFSET_SIZE, ppd 530 drivers/infiniband/hw/hfi1/qsfp.c int one_qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 533 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_devdata *dd = ppd->dd; ppd 540 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, addr, bp, len); ppd 558 drivers/infiniband/hw/hfi1/qsfp.c int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp) ppd 560 drivers/infiniband/hw/hfi1/qsfp.c u32 target = ppd->dd->hfi1_id; ppd 567 drivers/infiniband/hw/hfi1/qsfp.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 568 drivers/infiniband/hw/hfi1/qsfp.c ppd->qsfp_info.cache_valid = 0; ppd 569 drivers/infiniband/hw/hfi1/qsfp.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, flags); ppd 571 drivers/infiniband/hw/hfi1/qsfp.c if (!qsfp_mod_present(ppd)) { ppd 576 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 0, cache, QSFP_PAGESIZE); ppd 578 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, ppd 589 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 384, cache + 256, 128); ppd 591 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 594 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 640, cache + 384, 128); ppd 596 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 599 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 896, cache + 512, 128); ppd 601 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 606 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 640, cache + 384, 128); ppd 608 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 611 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 896, cache + 512, 128); ppd 613 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 618 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 384, cache + 256, 128); ppd 620 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 623 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 896, cache + 512, 128); ppd 625 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 630 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, 896, cache + 512, 128); ppd 632 drivers/infiniband/hw/hfi1/qsfp.c dd_dev_info(ppd->dd, "%s failed\n", __func__); ppd 638 drivers/infiniband/hw/hfi1/qsfp.c spin_lock_irqsave(&ppd->qsfp_info.qsfp_lock, flags); ppd 639 drivers/infiniband/hw/hfi1/qsfp.c ppd->qsfp_info.cache_valid = 1; ppd 640 drivers/infiniband/hw/hfi1/qsfp.c ppd->qsfp_info.cache_refresh_required = 0; ppd 641 drivers/infiniband/hw/hfi1/qsfp.c spin_unlock_irqrestore(&ppd->qsfp_info.qsfp_lock, flags); ppd 683 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_mod_present(struct hfi1_pportdata *ppd) ppd 685 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_devdata *dd = ppd->dd; ppd 710 drivers/infiniband/hw/hfi1/qsfp.c struct hfi1_pportdata *ppd; ppd 721 drivers/infiniband/hw/hfi1/qsfp.c ppd = dd->pport + (port_num - 1); ppd 722 drivers/infiniband/hw/hfi1/qsfp.c if (!qsfp_mod_present(ppd)) { ppd 727 drivers/infiniband/hw/hfi1/qsfp.c if (!ppd->qsfp_info.cache_valid) { ppd 739 drivers/infiniband/hw/hfi1/qsfp.c memcpy(data, &ppd->qsfp_info.cache[addr], (len - excess_len)); ppd 744 drivers/infiniband/hw/hfi1/qsfp.c memcpy(data, &ppd->qsfp_info.cache[addr], len); ppd 766 drivers/infiniband/hw/hfi1/qsfp.c ret = one_qsfp_read(ppd, dd->hfi1_id, addr, data + offset, len); ppd 790 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_dump(struct hfi1_pportdata *ppd, char *buf, int len) ppd 792 drivers/infiniband/hw/hfi1/qsfp.c u8 *cache = &ppd->qsfp_info.cache[0]; ppd 805 drivers/infiniband/hw/hfi1/qsfp.c if (ppd->qsfp_info.cache_valid) { ppd 213 drivers/infiniband/hw/hfi1/qsfp.h struct hfi1_pportdata *ppd; ppd 225 drivers/infiniband/hw/hfi1/qsfp.h int refresh_qsfp_cache(struct hfi1_pportdata *ppd, ppd 228 drivers/infiniband/hw/hfi1/qsfp.h int qsfp_mod_present(struct hfi1_pportdata *ppd); ppd 232 drivers/infiniband/hw/hfi1/qsfp.h int i2c_write(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, ppd 234 drivers/infiniband/hw/hfi1/qsfp.h int i2c_read(struct hfi1_pportdata *ppd, u32 target, int i2c_addr, ppd 236 drivers/infiniband/hw/hfi1/qsfp.h int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 238 drivers/infiniband/hw/hfi1/qsfp.h int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 240 drivers/infiniband/hw/hfi1/qsfp.h int one_qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 242 drivers/infiniband/hw/hfi1/qsfp.h int one_qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, ppd 1269 drivers/infiniband/hw/hfi1/rc.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1300 drivers/infiniband/hw/hfi1/rc.c ppd->lid | rdma_ah_get_path_bits(&qp->remote_ah_attr)); ppd 1322 drivers/infiniband/hw/hfi1/rc.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1354 drivers/infiniband/hw/hfi1/rc.c hfi1_make_16b_hdr(hdr, ppd->lid | ppd 1356 drivers/infiniband/hw/hfi1/rc.c ((1 << ppd->lmc) - 1)), ppd 1393 drivers/infiniband/hw/hfi1/rc.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1418 drivers/infiniband/hw/hfi1/rc.c if (driver_lstate(ppd) != IB_PORT_ACTIVE) ppd 1426 drivers/infiniband/hw/hfi1/rc.c pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, ppd 1427 drivers/infiniband/hw/hfi1/rc.c sc_to_vlt(ppd->dd, sc5), plen); ppd 1443 drivers/infiniband/hw/hfi1/rc.c ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc, ppd 1889 drivers/infiniband/hw/hfi1/rc.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 1896 drivers/infiniband/hw/hfi1/rc.c if (ppd->dd->flags & HFI1_HAS_SEND_DMA) { ppd 2714 drivers/infiniband/hw/hfi1/rc.c static void log_cca_event(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, ppd 2723 drivers/infiniband/hw/hfi1/rc.c spin_lock_irqsave(&ppd->cc_log_lock, flags); ppd 2725 drivers/infiniband/hw/hfi1/rc.c ppd->threshold_cong_event_map[sl / 8] |= 1 << (sl % 8); ppd 2726 drivers/infiniband/hw/hfi1/rc.c ppd->threshold_event_counter++; ppd 2728 drivers/infiniband/hw/hfi1/rc.c cc_event = &ppd->cc_events[ppd->cc_log_idx++]; ppd 2729 drivers/infiniband/hw/hfi1/rc.c if (ppd->cc_log_idx == OPA_CONG_LOG_ELEMS) ppd 2730 drivers/infiniband/hw/hfi1/rc.c ppd->cc_log_idx = 0; ppd 2739 drivers/infiniband/hw/hfi1/rc.c spin_unlock_irqrestore(&ppd->cc_log_lock, flags); ppd 2742 drivers/infiniband/hw/hfi1/rc.c void process_becn(struct hfi1_pportdata *ppd, u8 sl, u32 rlid, u32 lqpn, ppd 2754 drivers/infiniband/hw/hfi1/rc.c cc_state = get_cc_state(ppd); ppd 2770 drivers/infiniband/hw/hfi1/rc.c spin_lock_irqsave(&ppd->cca_timer_lock, flags); ppd 2772 drivers/infiniband/hw/hfi1/rc.c cca_timer = &ppd->cca_timer[sl]; ppd 2778 drivers/infiniband/hw/hfi1/rc.c set_link_ipg(ppd); ppd 2791 drivers/infiniband/hw/hfi1/rc.c spin_unlock_irqrestore(&ppd->cca_timer_lock, flags); ppd 2794 drivers/infiniband/hw/hfi1/rc.c log_cca_event(ppd, sl, rlid, lqpn, rqpn, svc_type); ppd 280 drivers/infiniband/hw/hfi1/ruc.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 331 drivers/infiniband/hw/hfi1/ruc.c if (!ppd->lid) ppd 334 drivers/infiniband/hw/hfi1/ruc.c slid = ppd->lid | ppd 336 drivers/infiniband/hw/hfi1/ruc.c ((1 << ppd->lmc) - 1)); ppd 477 drivers/infiniband/hw/hfi1/ruc.c workqueue_congested(ps->cpu, ps->ppd->hfi1_wq)) { ppd 498 drivers/infiniband/hw/hfi1/ruc.c this_cpu_inc(*ps->ppd->dd->send_schedule); ppd 504 drivers/infiniband/hw/hfi1/ruc.c this_cpu_inc(*ps->ppd->dd->send_schedule); ppd 542 drivers/infiniband/hw/hfi1/ruc.c ps.ppd = ppd_from_ibp(ps.ibp); ppd 551 drivers/infiniband/hw/hfi1/ruc.c ~((1 << ps.ppd->lmc) - 1)) == ppd 552 drivers/infiniband/hw/hfi1/ruc.c ps.ppd->lid)) { ppd 561 drivers/infiniband/hw/hfi1/ruc.c ~((1 << ps.ppd->lmc) - 1)) == ppd 562 drivers/infiniband/hw/hfi1/ruc.c ps.ppd->lid)) { ppd 589 drivers/infiniband/hw/hfi1/ruc.c cpumask_first(cpumask_of_node(ps.ppd->dd->node)); ppd 1365 drivers/infiniband/hw/hfi1/sdma.c struct hfi1_pportdata *ppd = dd->pport + port; ppd 1419 drivers/infiniband/hw/hfi1/sdma.c sde->ppd = ppd; ppd 1519 drivers/infiniband/hw/hfi1/sdma.c ret = sdma_map_init(dd, port, ppd->vls_operational, NULL); ppd 314 drivers/infiniband/hw/hfi1/sdma.h struct hfi1_pportdata *ppd; ppd 923 drivers/infiniband/hw/hfi1/sdma.h struct hfi1_pportdata *ppd = sde->dd->pport; ppd 925 drivers/infiniband/hw/hfi1/sdma.h iowait_schedule(wait, ppd->hfi1_wq, sde->cpu); ppd 65 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 69 drivers/infiniband/hw/hfi1/sysfs.c ret = ppd->total_cct_entry * sizeof(struct ib_cc_table_entry_shadow) ppd 82 drivers/infiniband/hw/hfi1/sysfs.c cc_state = get_cc_state(ppd); ppd 114 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 129 drivers/infiniband/hw/hfi1/sysfs.c cc_state = get_cc_state(ppd); ppd 152 drivers/infiniband/hw/hfi1/sysfs.c static ssize_t cc_prescan_show(struct hfi1_pportdata *ppd, char *buf) ppd 154 drivers/infiniband/hw/hfi1/sysfs.c return sprintf(buf, "%s\n", ppd->cc_prescan ? "on" : "off"); ppd 157 drivers/infiniband/hw/hfi1/sysfs.c static ssize_t cc_prescan_store(struct hfi1_pportdata *ppd, const char *buf, ppd 161 drivers/infiniband/hw/hfi1/sysfs.c ppd->cc_prescan = true; ppd 163 drivers/infiniband/hw/hfi1/sysfs.c ppd->cc_prescan = false; ppd 176 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 179 drivers/infiniband/hw/hfi1/sysfs.c return port_attr->show(ppd, buf); ppd 187 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 190 drivers/infiniband/hw/hfi1/sysfs.c return port_attr->store(ppd, buf, count); ppd 295 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 297 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_devdata *dd = ppd->dd; ppd 400 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 402 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 474 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd = ppd 476 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_devdata *dd = ppd->dd; ppd 659 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd; ppd 669 drivers/infiniband/hw/hfi1/sysfs.c ppd = &dd->pport[port_num - 1]; ppd 671 drivers/infiniband/hw/hfi1/sysfs.c ret = kobject_init_and_add(&ppd->sc2vl_kobj, &hfi1_sc2vl_ktype, kobj, ppd 683 drivers/infiniband/hw/hfi1/sysfs.c kobject_uevent(&ppd->sc2vl_kobj, KOBJ_ADD); ppd 685 drivers/infiniband/hw/hfi1/sysfs.c ret = kobject_init_and_add(&ppd->sl2sc_kobj, &hfi1_sl2sc_ktype, kobj, ppd 693 drivers/infiniband/hw/hfi1/sysfs.c kobject_uevent(&ppd->sl2sc_kobj, KOBJ_ADD); ppd 695 drivers/infiniband/hw/hfi1/sysfs.c ret = kobject_init_and_add(&ppd->vl2mtu_kobj, &hfi1_vl2mtu_ktype, kobj, ppd 703 drivers/infiniband/hw/hfi1/sysfs.c kobject_uevent(&ppd->vl2mtu_kobj, KOBJ_ADD); ppd 705 drivers/infiniband/hw/hfi1/sysfs.c ret = kobject_init_and_add(&ppd->pport_cc_kobj, &port_cc_ktype, ppd 714 drivers/infiniband/hw/hfi1/sysfs.c kobject_uevent(&ppd->pport_cc_kobj, KOBJ_ADD); ppd 716 drivers/infiniband/hw/hfi1/sysfs.c ret = sysfs_create_bin_file(&ppd->pport_cc_kobj, &cc_setting_bin_attr); ppd 724 drivers/infiniband/hw/hfi1/sysfs.c ret = sysfs_create_bin_file(&ppd->pport_cc_kobj, &cc_table_bin_attr); ppd 739 drivers/infiniband/hw/hfi1/sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, ppd 742 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->pport_cc_kobj); ppd 744 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->vl2mtu_kobj); ppd 746 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->sl2sc_kobj); ppd 748 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->sc2vl_kobj); ppd 875 drivers/infiniband/hw/hfi1/sysfs.c struct hfi1_pportdata *ppd; ppd 883 drivers/infiniband/hw/hfi1/sysfs.c ppd = &dd->pport[i]; ppd 885 drivers/infiniband/hw/hfi1/sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, ppd 887 drivers/infiniband/hw/hfi1/sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, ppd 889 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->pport_cc_kobj); ppd 890 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->vl2mtu_kobj); ppd 891 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->sl2sc_kobj); ppd 892 drivers/infiniband/hw/hfi1/sysfs.c kobject_put(&ppd->sc2vl_kobj); ppd 610 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd; ppd 619 drivers/infiniband/hw/hfi1/tid_rdma.c ppd = ppd_from_ibp(ibp); ppd 625 drivers/infiniband/hw/hfi1/tid_rdma.c ppd->hfi1_wq, ppd 2653 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 2654 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = ppd->dd; ppd 2838 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd, ppd 2841 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 2842 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = ppd->dd; ppd 3276 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd = qpriv->rcd->ppd; ppd 3278 drivers/infiniband/hw/hfi1/tid_rdma.c if ((rdma_ah_get_dlid(&qp->remote_ah_attr) & ~((1 << ppd->lmc) - 1)) == ppd 3279 drivers/infiniband/hw/hfi1/tid_rdma.c ppd->lid) ppd 3420 drivers/infiniband/hw/hfi1/tid_rdma.c bytes_per_us = active_egress_rate(qpriv->rcd->ppd) / 8; ppd 5343 drivers/infiniband/hw/hfi1/tid_rdma.c ps.ppd = ppd_from_ibp(ps.ibp); ppd 5363 drivers/infiniband/hw/hfi1/tid_rdma.c cpumask_first(cpumask_of_node(ps.ppd->dd->node)); ppd 5408 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 5411 drivers/infiniband/hw/hfi1/tid_rdma.c return iowait_tid_schedule(&priv->s_iowait, ppd->hfi1_wq, ppd 256 drivers/infiniband/hw/hfi1/tid_rdma.h struct hfi1_pportdata *ppd, ppd 114 drivers/infiniband/hw/hfi1/trace_misc.h TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->ppd->dd) ppd 122 drivers/infiniband/hw/hfi1/trace_misc.h TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->ppd->dd); ppd 76 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd; ppd 109 drivers/infiniband/hw/hfi1/ud.c ppd = ppd_from_ibp(ibp); ppd 117 drivers/infiniband/hw/hfi1/ud.c slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & ppd 118 drivers/infiniband/hw/hfi1/ud.c ((1 << ppd->lmc) - 1)); ppd 119 drivers/infiniband/hw/hfi1/ud.c if (unlikely(ingress_pkey_check(ppd, pkey, sc5, ppd 210 drivers/infiniband/hw/hfi1/ud.c cpu_to_be64(ppd->guids[HFI1_PORT_GUID_INDEX]); ppd 249 drivers/infiniband/hw/hfi1/ud.c wc.slid = (ppd->lid | (rdma_ah_get_path_bits(ah_attr) & ppd 250 drivers/infiniband/hw/hfi1/ud.c ((1 << ppd->lmc) - 1))) & U16_MAX; ppd 255 drivers/infiniband/hw/hfi1/ud.c wc.dlid_path_bits = rdma_ah_get_dlid(ah_attr) & ((1 << ppd->lmc) - 1); ppd 313 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd; ppd 318 drivers/infiniband/hw/hfi1/ud.c ppd = ppd_from_ibp(ibp); ppd 355 drivers/infiniband/hw/hfi1/ud.c u16 lid = (u16)ppd->lid; ppd 359 drivers/infiniband/hw/hfi1/ud.c ((1 << ppd->lmc) - 1); ppd 380 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd; ppd 390 drivers/infiniband/hw/hfi1/ud.c ppd = ppd_from_ibp(ibp); ppd 422 drivers/infiniband/hw/hfi1/ud.c dd_dev_warn(ppd->dd, "Bad sgid_index. sgid_index: %d\n", ppd 445 drivers/infiniband/hw/hfi1/ud.c if (!ppd->lid) ppd 448 drivers/infiniband/hw/hfi1/ud.c slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & ppd 449 drivers/infiniband/hw/hfi1/ud.c ((1 << ppd->lmc) - 1)); ppd 480 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd; ppd 517 drivers/infiniband/hw/hfi1/ud.c ppd = ppd_from_ibp(ibp); ppd 519 drivers/infiniband/hw/hfi1/ud.c priv->hdr_type = hfi1_get_hdr_type(ppd->lid, ah_attr); ppd 522 drivers/infiniband/hw/hfi1/ud.c lid = rdma_ah_get_dlid(ah_attr) & ~((1 << ppd->lmc) - 1); ppd 524 drivers/infiniband/hw/hfi1/ud.c ((lid == ppd->lid) || ppd 598 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 604 drivers/infiniband/hw/hfi1/ud.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); ++i) { ppd 606 drivers/infiniband/hw/hfi1/ud.c if (ppd->pkeys[i] == pkey) ppd 608 drivers/infiniband/hw/hfi1/ud.c if (ppd->pkeys[i] == LIM_MGMT_P_KEY) ppd 622 drivers/infiniband/hw/hfi1/ud.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); ++i) ppd 623 drivers/infiniband/hw/hfi1/ud.c if ((ppd->pkeys[i] & 0x7fff) == pkey) ppd 644 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 682 drivers/infiniband/hw/hfi1/ud.c vl = sc_to_vlt(ppd->dd, sc5); ppd 683 drivers/infiniband/hw/hfi1/ud.c pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen); ppd 687 drivers/infiniband/hw/hfi1/ud.c trace_pio_output_ibhdr(ppd->dd, &hdr, sc5); ppd 688 drivers/infiniband/hw/hfi1/ud.c ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc, ppd 706 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 737 drivers/infiniband/hw/hfi1/ud.c vl = sc_to_vlt(ppd->dd, sc5); ppd 738 drivers/infiniband/hw/hfi1/ud.c pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen); ppd 742 drivers/infiniband/hw/hfi1/ud.c trace_pio_output_ibhdr(ppd->dd, &hdr, sc5); ppd 743 drivers/infiniband/hw/hfi1/ud.c ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc, ppd 770 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 779 drivers/infiniband/hw/hfi1/ud.c if (rcv_pkey_check(ppd, pkey, sc5, slid)) ppd 789 drivers/infiniband/hw/hfi1/ud.c ingress_pkey_table_fail(ppd, pkey, slid); ppd 822 drivers/infiniband/hw/hfi1/ud.c ingress_pkey_table_fail(ppd, pkey, slid); ppd 835 drivers/infiniband/hw/hfi1/ud.c ingress_pkey_table_fail(ppd, pkey, slid); ppd 862 drivers/infiniband/hw/hfi1/ud.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 920 drivers/infiniband/hw/hfi1/ud.c if (unlikely(rcv_pkey_check(ppd, pkey, sc5, slid))) { ppd 1041 drivers/infiniband/hw/hfi1/ud.c struct hfi1_devdata *dd = ppd->dd; ppd 373 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 374 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 375 drivers/infiniband/hw/hfi1/verbs.c struct rvt_dev_info *rdi = &ppd->dd->verbs_dev.rdi; ppd 427 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 428 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 429 drivers/infiniband/hw/hfi1/verbs.c struct rvt_dev_info *rdi = &ppd->dd->verbs_dev.rdi; ppd 479 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 489 drivers/infiniband/hw/hfi1/verbs.c return ingress_pkey_check(ppd, pkey, packet->sc, ppd 499 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; ppd 501 drivers/infiniband/hw/hfi1/verbs.c struct rvt_dev_info *rdi = &ppd->dd->verbs_dev.rdi; ppd 847 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = ps->ppd; ppd 876 drivers/infiniband/hw/hfi1/verbs.c pbc = create_pbc(ppd, ppd 987 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = ps->ppd; ppd 1033 drivers/infiniband/hw/hfi1/verbs.c pbc = create_pbc(ppd, pbc, qp->srate_mbps, vl, plen); ppd 1075 drivers/infiniband/hw/hfi1/verbs.c pio_copy(ppd->dd, pbuf, pbc, hdr, hdrwords); ppd 1091 drivers/infiniband/hw/hfi1/verbs.c seg_pio_copy_mid(pbuf, ppd->dd->sdma_pad_dma, ppd 1157 drivers/infiniband/hw/hfi1/verbs.c int egress_pkey_check(struct hfi1_pportdata *ppd, u32 slid, u16 pkey, ppd 1164 drivers/infiniband/hw/hfi1/verbs.c if (!(ppd->part_enforce & HFI1_PART_ENFORCE_OUT)) ppd 1180 drivers/infiniband/hw/hfi1/verbs.c egress_pkey_matches_entry(pkey, ppd->pkeys[s_pkey_index])) { ppd 1185 drivers/infiniband/hw/hfi1/verbs.c if (egress_pkey_matches_entry(pkey, ppd->pkeys[i])) ppd 1195 drivers/infiniband/hw/hfi1/verbs.c incr_cntr64(&ppd->port_xmit_constraint_errors); ppd 1196 drivers/infiniband/hw/hfi1/verbs.c dd = ppd->dd; ppd 1415 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = &dd->pport[port_num - 1]; ppd 1416 drivers/infiniband/hw/hfi1/verbs.c u32 lid = ppd->lid; ppd 1420 drivers/infiniband/hw/hfi1/verbs.c props->lmc = ppd->lmc; ppd 1422 drivers/infiniband/hw/hfi1/verbs.c props->state = driver_lstate(ppd); ppd 1423 drivers/infiniband/hw/hfi1/verbs.c props->phys_state = driver_pstate(ppd); ppd 1425 drivers/infiniband/hw/hfi1/verbs.c props->active_width = (u8)opa_width_to_ib(ppd->link_width_active); ppd 1427 drivers/infiniband/hw/hfi1/verbs.c props->active_speed = (u8)opa_speed_to_ib(ppd->link_speed_active); ppd 1428 drivers/infiniband/hw/hfi1/verbs.c props->max_vl_num = ppd->vls_supported; ppd 1440 drivers/infiniband/hw/hfi1/verbs.c props->active_mtu = !valid_ib_mtu(ppd->ibmtu) ? props->max_mtu : ppd 1441 drivers/infiniband/hw/hfi1/verbs.c mtu_to_enum(ppd->ibmtu, IB_MTU_4096); ppd 1490 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = &dd->pport[port_num - 1]; ppd 1493 drivers/infiniband/hw/hfi1/verbs.c set_link_down_reason(ppd, OPA_LINKDOWN_REASON_UNKNOWN, 0, ppd 1495 drivers/infiniband/hw/hfi1/verbs.c ret = set_link_state(ppd, HLS_DN_DOWNDEF); ppd 1524 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd; ppd 1535 drivers/infiniband/hw/hfi1/verbs.c ppd = ppd_from_ibp(ibp); ppd 1536 drivers/infiniband/hw/hfi1/verbs.c dd = dd_from_ppd(ppd); ppd 1554 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd; ppd 1565 drivers/infiniband/hw/hfi1/verbs.c ppd = ppd_from_ibp(ibp); ppd 1569 drivers/infiniband/hw/hfi1/verbs.c dd = dd_from_ppd(ppd); ppd 1584 drivers/infiniband/hw/hfi1/verbs.c static void init_ibport(struct hfi1_pportdata *ppd) ppd 1586 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 1807 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = dd->pport; ppd 1808 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = &ppd->ibport_data; ppd 1813 drivers/infiniband/hw/hfi1/verbs.c init_ibport(ppd + i); ppd 1921 drivers/infiniband/hw/hfi1/verbs.c ppd = dd->pport; ppd 1922 drivers/infiniband/hw/hfi1/verbs.c for (i = 0; i < dd->num_pports; i++, ppd++) ppd 1924 drivers/infiniband/hw/hfi1/verbs.c &ppd->ibport_data.rvp, ppd 1926 drivers/infiniband/hw/hfi1/verbs.c ppd->pkeys); ppd 1977 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); ppd 2009 drivers/infiniband/hw/hfi1/verbs.c process_becn(ppd, sl, rlid, lqpn, rqpn, svc_type); ppd 235 drivers/infiniband/hw/hfi1/verbs.h struct hfi1_pportdata *ppd; ppd 205 drivers/infiniband/hw/qib/qib.h struct qib_pportdata *ppd; ppd 1183 drivers/infiniband/hw/qib/qib.h static inline struct qib_devdata *dd_from_ppd(struct qib_pportdata *ppd) ppd 1185 drivers/infiniband/hw/qib/qib.h return ppd->dd; ppd 1292 drivers/infiniband/hw/qib/qib.h void qib_set_led_override(struct qib_pportdata *ppd, unsigned int val); ppd 1306 drivers/infiniband/hw/qib/qib.h static inline int qib_sdma_empty(const struct qib_pportdata *ppd) ppd 1308 drivers/infiniband/hw/qib/qib.h return ppd->sdma_descq_added == ppd->sdma_descq_removed; ppd 1312 drivers/infiniband/hw/qib/qib.h static inline u16 qib_sdma_descq_freecnt(const struct qib_pportdata *ppd) ppd 1314 drivers/infiniband/hw/qib/qib.h return ppd->sdma_descq_cnt - ppd 1315 drivers/infiniband/hw/qib/qib.h (ppd->sdma_descq_added - ppd->sdma_descq_removed) - 1; ppd 1318 drivers/infiniband/hw/qib/qib.h static inline int __qib_sdma_running(struct qib_pportdata *ppd) ppd 1320 drivers/infiniband/hw/qib/qib.h return ppd->sdma_state.current_state == qib_sdma_state_s99_running; ppd 1323 drivers/infiniband/hw/qib/qib.h void dump_sdma_state(struct qib_pportdata *ppd); ppd 1402 drivers/infiniband/hw/qib/qib.h extern int qib_qsfp_dump(struct qib_pportdata *ppd, char *buf, int len); ppd 556 drivers/infiniband/hw/qib/qib_diag.c struct qib_pportdata *ppd; ppd 594 drivers/infiniband/hw/qib/qib_diag.c ppd = &dd->pport[dp.port - 1]; ppd 603 drivers/infiniband/hw/qib/qib_diag.c if (dp.len > ppd->ibmaxlen - maxlen_reserve) { ppd 628 drivers/infiniband/hw/qib/qib_diag.c piobuf = dd->f_getsendbuf(ppd, dp.pbc_wd, &pbufn); ppd 96 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd; ppd 105 drivers/infiniband/hw/qib/qib_driver.c ppd = dd->pport + pidx; ppd 106 drivers/infiniband/hw/qib/qib_driver.c if (ppd->lid && (ppd->lflags & (QIBL_LINKINIT | ppd 128 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd; ppd 136 drivers/infiniband/hw/qib/qib_driver.c ppd = dd->pport + pidx; ppd 137 drivers/infiniband/hw/qib/qib_driver.c if (ppd->lid && (ppd->lflags & (QIBL_LINKINIT | ppd 164 drivers/infiniband/hw/qib/qib_driver.c int qib_wait_linkstate(struct qib_pportdata *ppd, u32 state, int msecs) ppd 169 drivers/infiniband/hw/qib/qib_driver.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 170 drivers/infiniband/hw/qib/qib_driver.c if (ppd->state_wanted) { ppd 171 drivers/infiniband/hw/qib/qib_driver.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 175 drivers/infiniband/hw/qib/qib_driver.c ppd->state_wanted = state; ppd 176 drivers/infiniband/hw/qib/qib_driver.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 177 drivers/infiniband/hw/qib/qib_driver.c wait_event_interruptible_timeout(ppd->state_wait, ppd 178 drivers/infiniband/hw/qib/qib_driver.c (ppd->lflags & state), ppd 180 drivers/infiniband/hw/qib/qib_driver.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 181 drivers/infiniband/hw/qib/qib_driver.c ppd->state_wanted = 0; ppd 182 drivers/infiniband/hw/qib/qib_driver.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 184 drivers/infiniband/hw/qib/qib_driver.c if (!(ppd->lflags & state)) ppd 192 drivers/infiniband/hw/qib/qib_driver.c int qib_set_linkstate(struct qib_pportdata *ppd, u8 newstate) ppd 196 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = ppd->dd; ppd 201 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 208 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 215 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 222 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 229 drivers/infiniband/hw/qib/qib_driver.c if (ppd->lflags & QIBL_LINKARMED) { ppd 233 drivers/infiniband/hw/qib/qib_driver.c if (!(ppd->lflags & (QIBL_LINKINIT | QIBL_LINKACTIVE))) { ppd 243 drivers/infiniband/hw/qib/qib_driver.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 244 drivers/infiniband/hw/qib/qib_driver.c ppd->lflags &= ~QIBL_LINKV; ppd 245 drivers/infiniband/hw/qib/qib_driver.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 246 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 252 drivers/infiniband/hw/qib/qib_driver.c if (ppd->lflags & QIBL_LINKACTIVE) { ppd 256 drivers/infiniband/hw/qib/qib_driver.c if (!(ppd->lflags & QIBL_LINKARMED)) { ppd 260 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LSTATE, ppd 269 drivers/infiniband/hw/qib/qib_driver.c ret = qib_wait_linkstate(ppd, lstate, 10); ppd 291 drivers/infiniband/hw/qib/qib_driver.c static u32 qib_rcv_hdrerr(struct qib_ctxtdata *rcd, struct qib_pportdata *ppd, ppd 303 drivers/infiniband/hw/qib/qib_driver.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 304 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = ppd->dd; ppd 320 drivers/infiniband/hw/qib/qib_driver.c lid &= ~((1 << ppd->lmc) - 1); ppd 321 drivers/infiniband/hw/qib/qib_driver.c if (unlikely(lid != ppd->lid)) ppd 443 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd = rcd->ppd; ppd 508 drivers/infiniband/hw/qib/qib_driver.c crcs += qib_rcv_hdrerr(rcd, ppd, rcd->ctxt, eflags, l, ppd 598 drivers/infiniband/hw/qib/qib_driver.c int qib_set_mtu(struct qib_pportdata *ppd, u16 arg) ppd 614 drivers/infiniband/hw/qib/qib_driver.c piosize = ppd->ibmaxlen; ppd 615 drivers/infiniband/hw/qib/qib_driver.c ppd->ibmtu = arg; ppd 619 drivers/infiniband/hw/qib/qib_driver.c if (piosize != ppd->init_ibmaxlen) { ppd 620 drivers/infiniband/hw/qib/qib_driver.c if (arg > piosize && arg <= ppd->init_ibmaxlen) ppd 621 drivers/infiniband/hw/qib/qib_driver.c piosize = ppd->init_ibmaxlen - 2 * sizeof(u32); ppd 622 drivers/infiniband/hw/qib/qib_driver.c ppd->ibmaxlen = piosize; ppd 624 drivers/infiniband/hw/qib/qib_driver.c } else if ((arg + QIB_PIO_MAXIBHDR) != ppd->ibmaxlen) { ppd 626 drivers/infiniband/hw/qib/qib_driver.c ppd->ibmaxlen = piosize; ppd 629 drivers/infiniband/hw/qib/qib_driver.c ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_MTU, 0); ppd 637 drivers/infiniband/hw/qib/qib_driver.c int qib_set_lid(struct qib_pportdata *ppd, u32 lid, u8 lmc) ppd 639 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = ppd->dd; ppd 641 drivers/infiniband/hw/qib/qib_driver.c ppd->lid = lid; ppd 642 drivers/infiniband/hw/qib/qib_driver.c ppd->lmc = lmc; ppd 644 drivers/infiniband/hw/qib/qib_driver.c dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LIDLMC, ppd 648 drivers/infiniband/hw/qib/qib_driver.c dd->unit, ppd->port, lid); ppd 667 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd = from_timer(ppd, t, ppd 669 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = ppd->dd; ppd 676 drivers/infiniband/hw/qib/qib_driver.c ph_idx = ppd->led_override_phase++ & 1; ppd 677 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override = ppd->led_override_vals[ph_idx]; ppd 678 drivers/infiniband/hw/qib/qib_driver.c timeoff = ppd->led_override_timeoff; ppd 680 drivers/infiniband/hw/qib/qib_driver.c dd->f_setextled(ppd, 1); ppd 685 drivers/infiniband/hw/qib/qib_driver.c if (ppd->led_override_vals[0] || ppd->led_override_vals[1]) ppd 686 drivers/infiniband/hw/qib/qib_driver.c mod_timer(&ppd->led_override_timer, jiffies + timeoff); ppd 689 drivers/infiniband/hw/qib/qib_driver.c void qib_set_led_override(struct qib_pportdata *ppd, unsigned int val) ppd 691 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = ppd->dd; ppd 703 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_vals[0] = val & 0xF; ppd 704 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_vals[1] = (val >> 4) & 0xF; ppd 708 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_vals[0] = val & 0xF; ppd 709 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_vals[1] = val & 0xF; ppd 711 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_timeoff = timeoff; ppd 717 drivers/infiniband/hw/qib/qib_driver.c if (atomic_inc_return(&ppd->led_override_timer_active) == 1) { ppd 719 drivers/infiniband/hw/qib/qib_driver.c timer_setup(&ppd->led_override_timer, qib_run_led_override, 0); ppd 720 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override_timer.expires = jiffies + 1; ppd 721 drivers/infiniband/hw/qib/qib_driver.c add_timer(&ppd->led_override_timer); ppd 723 drivers/infiniband/hw/qib/qib_driver.c if (ppd->led_override_vals[0] || ppd->led_override_vals[1]) ppd 724 drivers/infiniband/hw/qib/qib_driver.c mod_timer(&ppd->led_override_timer, jiffies + 1); ppd 725 drivers/infiniband/hw/qib/qib_driver.c atomic_dec(&ppd->led_override_timer_active); ppd 742 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd; ppd 773 drivers/infiniband/hw/qib/qib_driver.c ppd = dd->pport + pidx; ppd 774 drivers/infiniband/hw/qib/qib_driver.c if (atomic_read(&ppd->led_override_timer_active)) { ppd 776 drivers/infiniband/hw/qib/qib_driver.c del_timer_sync(&ppd->led_override_timer); ppd 777 drivers/infiniband/hw/qib/qib_driver.c atomic_set(&ppd->led_override_timer_active, 0); ppd 781 drivers/infiniband/hw/qib/qib_driver.c ppd->led_override = LED_OVER_BOTH_OFF; ppd 782 drivers/infiniband/hw/qib/qib_driver.c dd->f_setextled(ppd, 0); ppd 784 drivers/infiniband/hw/qib/qib_driver.c qib_teardown_sdma(ppd); ppd 105 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; ppd 161 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_port = ppd->port; ppd 191 drivers/infiniband/hw/qib/qib_file_ops.c (char *) ppd->statusp - ppd 241 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_mtu = ppd->ibmaxlen; /* maxlen, not ibmtu */ ppd 574 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; ppd 602 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 603 drivers/infiniband/hw/qib/qib_file_ops.c if (!ppd->pkeys[i]) { ppd 607 drivers/infiniband/hw/qib/qib_file_ops.c if (ppd->pkeys[i] == key) { ppd 608 drivers/infiniband/hw/qib/qib_file_ops.c atomic_t *pkrefs = &ppd->pkeyrefs[i]; ppd 620 drivers/infiniband/hw/qib/qib_file_ops.c if ((ppd->pkeys[i] & 0x7FFF) == lkey) ppd 630 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 631 drivers/infiniband/hw/qib/qib_file_ops.c if (!ppd->pkeys[i] && ppd 632 drivers/infiniband/hw/qib/qib_file_ops.c atomic_inc_return(&ppd->pkeyrefs[i]) == 1) { ppd 634 drivers/infiniband/hw/qib/qib_file_ops.c ppd->pkeys[i] = key; ppd 635 drivers/infiniband/hw/qib/qib_file_ops.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PKEYS, 0); ppd 675 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, rcvctrl_op, rcd->ctxt); ppd 685 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; ppd 690 drivers/infiniband/hw/qib/qib_file_ops.c for (j = 0; j < ARRAY_SIZE(ppd->pkeys); j++) { ppd 692 drivers/infiniband/hw/qib/qib_file_ops.c if ((ppd->pkeys[j] & 0x7fff) != ppd 695 drivers/infiniband/hw/qib/qib_file_ops.c if (atomic_dec_and_test(&ppd->pkeyrefs[j])) { ppd 696 drivers/infiniband/hw/qib/qib_file_ops.c ppd->pkeys[j] = 0; ppd 704 drivers/infiniband/hw/qib/qib_file_ops.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PKEYS, 0); ppd 1115 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_INTRAVAIL_ENB, rcd->ctxt); ppd 1284 drivers/infiniband/hw/qib/qib_file_ops.c static int setup_ctxt(struct qib_pportdata *ppd, int ctxt, ppd 1288 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = ppd->dd; ppd 1300 drivers/infiniband/hw/qib/qib_file_ops.c rcd = qib_create_ctxtdata(ppd, ctxt, numa_id); ppd 1342 drivers/infiniband/hw/qib/qib_file_ops.c static inline int usable(struct qib_pportdata *ppd) ppd 1344 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = ppd->dd; ppd 1346 drivers/infiniband/hw/qib/qib_file_ops.c return dd && (dd->flags & QIB_PRESENT) && dd->kregbase && ppd->lid && ppd 1347 drivers/infiniband/hw/qib/qib_file_ops.c (ppd->lflags & QIBL_LINKACTIVE); ppd 1357 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = NULL; ppd 1365 drivers/infiniband/hw/qib/qib_file_ops.c ppd = dd->pport + port - 1; ppd 1374 drivers/infiniband/hw/qib/qib_file_ops.c if (!ppd) { ppd 1378 drivers/infiniband/hw/qib/qib_file_ops.c ppd = dd->pport + pidx; ppd 1380 drivers/infiniband/hw/qib/qib_file_ops.c for (pidx = 0; pidx < dd->num_pports && !ppd; ppd 1383 drivers/infiniband/hw/qib/qib_file_ops.c ppd = dd->pport + pidx; ppd 1386 drivers/infiniband/hw/qib/qib_file_ops.c ret = ppd ? setup_ctxt(ppd, ctxt, fp, uinfo) : -ENETDOWN; ppd 1743 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_CTXT_ENB | QIB_RCVCTRL_TIDFLOW_ENB, ppd 1815 drivers/infiniband/hw/qib/qib_file_ops.c qib_user_sdma_queue_drain(rcd->ppd, fd->pq); ppd 1853 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_CTXT_DIS | ppd 1890 drivers/infiniband/hw/qib/qib_file_ops.c info.port = rcd->ppd->port; ppd 1920 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_sdma_get_complete(struct qib_pportdata *ppd, ppd 1930 drivers/infiniband/hw/qib/qib_file_ops.c err = qib_user_sdma_make_progress(ppd, pq); ppd 1945 drivers/infiniband/hw/qib/qib_file_ops.c if (!usable(rcd->ppd)) { ppd 1964 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; !usable(rcd->ppd) && i < 300; i++) ppd 1976 drivers/infiniband/hw/qib/qib_file_ops.c int qib_set_uevent_bits(struct qib_pportdata *ppd, const int evtbit) ppd 1983 drivers/infiniband/hw/qib/qib_file_ops.c spin_lock_irqsave(&ppd->dd->uctxt_lock, flags); ppd 1984 drivers/infiniband/hw/qib/qib_file_ops.c for (ctxt = ppd->dd->first_user_ctxt; ctxt < ppd->dd->cfgctxts; ppd 1986 drivers/infiniband/hw/qib/qib_file_ops.c rcd = ppd->dd->rcd[ctxt]; ppd 2002 drivers/infiniband/hw/qib/qib_file_ops.c spin_unlock_irqrestore(&ppd->dd->uctxt_lock, flags); ppd 2223 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_sdma_get_complete(rcd->ppd, ppd 49 drivers/infiniband/hw/qib/qib_iba6120.c static void sendctrl_6120_mod(struct qib_pportdata *ppd, u32 op); ppd 268 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd; ppd 962 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_disarm_6120_senderrbufs(struct qib_pportdata *ppd) ppd 965 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 1002 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd = dd->pport; ppd 1019 drivers/infiniband/hw/qib/qib_iba6120.c qib_disarm_6120_senderrbufs(ppd); ppd 1021 drivers/infiniband/hw/qib/qib_iba6120.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1032 drivers/infiniband/hw/qib/qib_iba6120.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1082 drivers/infiniband/hw/qib/qib_iba6120.c qib_handle_e_ibstatuschanged(ppd, ibcs); ppd 1095 drivers/infiniband/hw/qib/qib_iba6120.c qib_dev_porterr(dd, ppd->port, "%s error\n", msg); ppd 1097 drivers/infiniband/hw/qib/qib_iba6120.c if (ppd->state_wanted & ppd->lflags) ppd 1098 drivers/infiniband/hw/qib/qib_iba6120.c wake_up_interruptible(&ppd->state_wait); ppd 1190 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_set_ib_6120_lstate(struct qib_pportdata *ppd, u16 linkcmd, ppd 1194 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 1202 drivers/infiniband/hw/qib/qib_iba6120.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 1203 drivers/infiniband/hw/qib/qib_iba6120.c ppd->lflags |= QIBL_IB_LINK_DISABLED; ppd 1204 drivers/infiniband/hw/qib/qib_iba6120.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 1211 drivers/infiniband/hw/qib/qib_iba6120.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 1212 drivers/infiniband/hw/qib/qib_iba6120.c ppd->lflags &= ~QIBL_IB_LINK_DISABLED; ppd 1213 drivers/infiniband/hw/qib/qib_iba6120.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 1228 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_bringup_serdes(struct qib_pportdata *ppd) ppd 1230 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 1260 drivers/infiniband/hw/qib/qib_iba6120.c ibc |= ((u64)(ppd->ibmaxlen >> 2) + 1) << SYM_LSB(IBCCtrl, MaxPktLen); ppd 1323 drivers/infiniband/hw/qib/qib_iba6120.c if (SYM_FIELD(val, XGXSCfg, polarity_inv) != ppd->rx_pol_inv) { ppd 1326 drivers/infiniband/hw/qib/qib_iba6120.c val |= (u64)ppd->rx_pol_inv << SYM_LSB(XGXSCfg, polarity_inv); ppd 1342 drivers/infiniband/hw/qib/qib_iba6120.c ppd->guid = dd->base_guid; ppd 1368 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_6120_quiet_serdes(struct qib_pportdata *ppd) ppd 1370 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 1373 drivers/infiniband/hw/qib/qib_iba6120.c qib_set_ib_6120_lstate(ppd, 0, QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); ppd 1436 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_6120_setup_setextled(struct qib_pportdata *ppd, u32 on) ppd 1440 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 1450 drivers/infiniband/hw/qib/qib_iba6120.c if (ppd->led_override) { ppd 1451 drivers/infiniband/hw/qib/qib_iba6120.c ltst = (ppd->led_override & QIB_LED_PHYS) ? ppd 1453 drivers/infiniband/hw/qib/qib_iba6120.c lst = (ppd->led_override & QIB_LED_LOG) ? ppd 2094 drivers/infiniband/hw/qib/qib_iba6120.c static void rcvctrl_6120_mod(struct qib_pportdata *ppd, unsigned int op, ppd 2097 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 2196 drivers/infiniband/hw/qib/qib_iba6120.c static void sendctrl_6120_mod(struct qib_pportdata *ppd, u32 op) ppd 2198 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 2277 drivers/infiniband/hw/qib/qib_iba6120.c static u64 qib_portcntr_6120(struct qib_pportdata *ppd, u32 reg) ppd 2280 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 2321 drivers/infiniband/hw/qib/qib_iba6120.c qib_devinfo(ppd->dd->pcidev, ppd 2553 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd = &dd->pport[port]; ppd 2565 drivers/infiniband/hw/qib/qib_iba6120.c *cntr++ = qib_portcntr_6120(ppd, ppd 2623 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd = dd->pport; ppd 2640 drivers/infiniband/hw/qib/qib_iba6120.c traffic_wds = qib_portcntr_6120(ppd, cr_wordsend) + ppd 2641 drivers/infiniband/hw/qib/qib_iba6120.c qib_portcntr_6120(ppd, cr_wordrcv); ppd 2664 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_6120_xgxs_reset(struct qib_pportdata *ppd) ppd 2667 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 2680 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_get_ib_cfg(struct qib_pportdata *ppd, int which) ppd 2686 drivers/infiniband/hw/qib/qib_iba6120.c ret = ppd->link_width_active; ppd 2690 drivers/infiniband/hw/qib/qib_iba6120.c ret = ppd->link_speed_active; ppd 2694 drivers/infiniband/hw/qib/qib_iba6120.c ret = ppd->link_width_enabled; ppd 2698 drivers/infiniband/hw/qib/qib_iba6120.c ret = ppd->link_speed_enabled; ppd 2702 drivers/infiniband/hw/qib/qib_iba6120.c ret = ppd->vls_operational; ppd 2714 drivers/infiniband/hw/qib/qib_iba6120.c ret = SYM_FIELD(ppd->dd->cspec->ibcctrl, IBCCtrl, ppd 2719 drivers/infiniband/hw/qib/qib_iba6120.c ret = SYM_FIELD(ppd->dd->cspec->ibcctrl, IBCCtrl, ppd 2725 drivers/infiniband/hw/qib/qib_iba6120.c ret = (ppd->dd->cspec->ibcctrl & ppd 2748 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val) ppd 2750 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 2757 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_width_enabled = val; ppd 2761 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_speed_enabled = val; ppd 2791 drivers/infiniband/hw/qib/qib_iba6120.c val64 = (u64) ppd->pkeys[0] | ((u64) ppd->pkeys[1] << 16) | ppd 2792 drivers/infiniband/hw/qib/qib_iba6120.c ((u64) ppd->pkeys[2] << 32) | ppd 2793 drivers/infiniband/hw/qib/qib_iba6120.c ((u64) ppd->pkeys[3] << 48); ppd 2817 drivers/infiniband/hw/qib/qib_iba6120.c val = (ppd->ibmaxlen >> 2) + 1; ppd 2874 drivers/infiniband/hw/qib/qib_iba6120.c qib_set_ib_6120_lstate(ppd, lcmd, licmd); ppd 2888 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_set_loopback(struct qib_pportdata *ppd, const char *what) ppd 2893 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibcctrl |= SYM_MASK(IBCCtrl, Loopback); ppd 2894 drivers/infiniband/hw/qib/qib_iba6120.c qib_devinfo(ppd->dd->pcidev, "Enabling IB%u:%u IBC loopback\n", ppd 2895 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->unit, ppd->port); ppd 2897 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibcctrl &= ~SYM_MASK(IBCCtrl, Loopback); ppd 2898 drivers/infiniband/hw/qib/qib_iba6120.c qib_devinfo(ppd->dd->pcidev, ppd 2900 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->unit, ppd->port); ppd 2904 drivers/infiniband/hw/qib/qib_iba6120.c qib_write_kreg(ppd->dd, kr_ibcctrl, ppd->dd->cspec->ibcctrl); ppd 2905 drivers/infiniband/hw/qib/qib_iba6120.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 2913 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd = cs->ppd; ppd 2914 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 2920 drivers/infiniband/hw/qib/qib_iba6120.c qib_snapshot_counters(ppd, &cs->sword, &cs->rword, ppd 2928 drivers/infiniband/hw/qib/qib_iba6120.c qib_snapshot_counters(ppd, &ta, &tb, &tc, &td, &te); ppd 2942 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_set_cntr_6120_sample(struct qib_pportdata *ppd, u32 intv, ppd 2945 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_chip_specific *cs = ppd->dd->cspec; ppd 2952 drivers/infiniband/hw/qib/qib_iba6120.c qib_snapshot_counters(ppd, &cs->sword, &cs->rword, ppd 2996 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_ib_updown(struct qib_pportdata *ppd, int ibup, u64 ibcs) ppd 3000 drivers/infiniband/hw/qib/qib_iba6120.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3001 drivers/infiniband/hw/qib/qib_iba6120.c ppd->lflags &= ~QIBL_IB_FORCE_NOTIFY; ppd 3002 drivers/infiniband/hw/qib/qib_iba6120.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 3005 drivers/infiniband/hw/qib/qib_iba6120.c if (ppd->dd->cspec->ibdeltainprog) { ppd 3006 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibdeltainprog = 0; ppd 3007 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibsymdelta += ppd 3008 drivers/infiniband/hw/qib/qib_iba6120.c read_6120_creg32(ppd->dd, cr_ibsymbolerr) - ppd 3009 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibsymsnap; ppd 3010 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->iblnkerrdelta += ppd 3011 drivers/infiniband/hw/qib/qib_iba6120.c read_6120_creg32(ppd->dd, cr_iblinkerrrecov) - ppd 3012 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->iblnkerrsnap; ppd 3014 drivers/infiniband/hw/qib/qib_iba6120.c qib_hol_init(ppd); ppd 3016 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->lli_counter = 0; ppd 3017 drivers/infiniband/hw/qib/qib_iba6120.c if (!ppd->dd->cspec->ibdeltainprog) { ppd 3018 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibdeltainprog = 1; ppd 3019 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->ibsymsnap = ppd 3020 drivers/infiniband/hw/qib/qib_iba6120.c read_6120_creg32(ppd->dd, cr_ibsymbolerr); ppd 3021 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->cspec->iblnkerrsnap = ppd 3022 drivers/infiniband/hw/qib/qib_iba6120.c read_6120_creg32(ppd->dd, cr_iblinkerrrecov); ppd 3024 drivers/infiniband/hw/qib/qib_iba6120.c qib_hol_down(ppd); ppd 3027 drivers/infiniband/hw/qib/qib_iba6120.c qib_6120_setup_setextled(ppd, ibup); ppd 3170 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_pportdata *ppd; ppd 3173 drivers/infiniband/hw/qib/qib_iba6120.c ppd = (struct qib_pportdata *)(dd + 1); ppd 3174 drivers/infiniband/hw/qib/qib_iba6120.c dd->pport = ppd; ppd 3177 drivers/infiniband/hw/qib/qib_iba6120.c dd->cspec = (struct qib_chip_specific *)(ppd + dd->num_pports); ppd 3178 drivers/infiniband/hw/qib/qib_iba6120.c dd->cspec->ppd = ppd; ppd 3179 drivers/infiniband/hw/qib/qib_iba6120.c ppd->cpspec = NULL; /* not used in this chip */ ppd 3216 drivers/infiniband/hw/qib/qib_iba6120.c ret = qib_init_pportdata(ppd, dd, 0, 1); ppd 3219 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_width_supported = IB_WIDTH_1X | IB_WIDTH_4X; ppd 3220 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_speed_supported = QIB_IB_SDR; ppd 3221 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_width_enabled = IB_WIDTH_4X; ppd 3222 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_speed_enabled = ppd->link_speed_supported; ppd 3224 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_width_active = ppd->link_width_enabled; ppd 3225 drivers/infiniband/hw/qib/qib_iba6120.c ppd->link_speed_active = ppd->link_speed_enabled; ppd 3226 drivers/infiniband/hw/qib/qib_iba6120.c ppd->vls_supported = IB_VL_VL0; ppd 3227 drivers/infiniband/hw/qib/qib_iba6120.c ppd->vls_operational = ppd->vls_supported; ppd 3299 drivers/infiniband/hw/qib/qib_iba6120.c static u32 __iomem *get_6120_link_buf(struct qib_pportdata *ppd, u32 *bnum) ppd 3302 drivers/infiniband/hw/qib/qib_iba6120.c u32 lbuf = ppd->dd->piobcnt2k + ppd->dd->piobcnt4k - 1; ppd 3308 drivers/infiniband/hw/qib/qib_iba6120.c sendctrl_6120_mod(ppd->dd->pport, QIB_SENDCTRL_AVAIL_BLIP); ppd 3309 drivers/infiniband/hw/qib/qib_iba6120.c qib_read_kreg64(ppd->dd, kr_scratch); /* extra chip flush */ ppd 3310 drivers/infiniband/hw/qib/qib_iba6120.c buf = qib_getsendbuf_range(ppd->dd, bnum, lbuf, lbuf); ppd 3314 drivers/infiniband/hw/qib/qib_iba6120.c sendctrl_6120_mod(ppd, QIB_SENDCTRL_DISARM_ALL | QIB_SENDCTRL_FLUSH | ppd 3316 drivers/infiniband/hw/qib/qib_iba6120.c ppd->dd->upd_pio_shadow = 1; /* update our idea of what's busy */ ppd 3317 drivers/infiniband/hw/qib/qib_iba6120.c qib_read_kreg64(ppd->dd, kr_scratch); /* extra chip flush */ ppd 3318 drivers/infiniband/hw/qib/qib_iba6120.c buf = qib_getsendbuf_range(ppd->dd, bnum, lbuf, lbuf); ppd 3323 drivers/infiniband/hw/qib/qib_iba6120.c static u32 __iomem *qib_6120_getsendbuf(struct qib_pportdata *ppd, u64 pbc, ppd 3327 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_devdata *dd = ppd->dd; ppd 3331 drivers/infiniband/hw/qib/qib_iba6120.c !(ppd->lflags & (QIBL_IB_AUTONEG_INPROG | QIBL_LINKACTIVE))) ppd 3332 drivers/infiniband/hw/qib/qib_iba6120.c buf = get_6120_link_buf(ppd, pbufnum); ppd 3346 drivers/infiniband/hw/qib/qib_iba6120.c static int init_sdma_6120_regs(struct qib_pportdata *ppd) ppd 3351 drivers/infiniband/hw/qib/qib_iba6120.c static u16 qib_sdma_6120_gethead(struct qib_pportdata *ppd) ppd 3356 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_sdma_6120_busy(struct qib_pportdata *ppd) ppd 3361 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_sdma_update_6120_tail(struct qib_pportdata *ppd, u16 tail) ppd 3365 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_6120_sdma_sendctrl(struct qib_pportdata *ppd, unsigned op) ppd 3369 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_sdma_set_6120_desc_cnt(struct qib_pportdata *ppd, unsigned cnt) ppd 3377 drivers/infiniband/hw/qib/qib_iba6120.c static u32 qib_6120_setpbc_control(struct qib_pportdata *ppd, u32 plen, ppd 52 drivers/infiniband/hw/qib/qib_iba7220.c static void sendctrl_7220_mod(struct qib_pportdata *ppd, u32 op); ppd 751 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_disarm_7220_senderrbufs(struct qib_pportdata *ppd) ppd 754 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 779 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_sdma_sendctrl(struct qib_pportdata *ppd, unsigned op) ppd 781 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 811 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_decode_7220_sdma_errs(struct qib_pportdata *ppd, ppd 857 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_sdma_hw_clean_up(struct qib_pportdata *ppd) ppd 860 drivers/infiniband/hw/qib/qib_iba7220.c sendctrl_7220_mod(ppd, QIB_SENDCTRL_DISARM_ALL | QIB_SENDCTRL_FLUSH | ppd 862 drivers/infiniband/hw/qib/qib_iba7220.c ppd->dd->upd_pio_shadow = 1; /* update our idea of what's busy */ ppd 865 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_sdma_7220_setlengen(struct qib_pportdata *ppd) ppd 872 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_senddmalengen, ppd->sdma_descq_cnt); ppd 873 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_senddmalengen, ppd 874 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_descq_cnt | ppd 878 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_sdma_hw_start_up(struct qib_pportdata *ppd) ppd 880 drivers/infiniband/hw/qib/qib_iba7220.c qib_sdma_7220_setlengen(ppd); ppd 881 drivers/infiniband/hw/qib/qib_iba7220.c qib_sdma_update_7220_tail(ppd, 0); /* Set SendDmaTail */ ppd 882 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_head_dma[0] = 0; ppd 897 drivers/infiniband/hw/qib/qib_iba7220.c static void sdma_7220_errors(struct qib_pportdata *ppd, u64 errs) ppd 900 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 906 drivers/infiniband/hw/qib/qib_iba7220.c qib_decode_7220_sdma_errs(ppd, errs, msg, ppd 908 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 917 drivers/infiniband/hw/qib/qib_iba7220.c qib_dev_err(ppd->dd, ppd 919 drivers/infiniband/hw/qib/qib_iba7220.c ppd->dd->unit, ppd->port, sbuf[2], sbuf[1], ppd 924 drivers/infiniband/hw/qib/qib_iba7220.c qib_dev_err(dd, "IB%u:%u SDmaUnexpData\n", ppd->dd->unit, ppd 925 drivers/infiniband/hw/qib/qib_iba7220.c ppd->port); ppd 927 drivers/infiniband/hw/qib/qib_iba7220.c switch (ppd->sdma_state.current_state) { ppd 946 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, ppd 956 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, ppd 961 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1049 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd = &cpspec->pportdata; ppd 1051 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_timer.expires = 0; ppd 1052 drivers/infiniband/hw/qib/qib_iba7220.c qib_set_ib_7220_lstate(ppd, QLOGIC_IB_IBCC_LINKCMD_DOWN, ppd 1056 drivers/infiniband/hw/qib/qib_iba7220.c static void handle_7220_chase(struct qib_pportdata *ppd, u64 ibcst) ppd 1075 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->chase_end && ppd 1076 drivers/infiniband/hw/qib/qib_iba7220.c time_after(tnow, ppd->cpspec->chase_end)) { ppd 1077 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_end = 0; ppd 1078 drivers/infiniband/hw/qib/qib_iba7220.c qib_set_ib_7220_lstate(ppd, ppd 1081 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_timer.expires = jiffies + ppd 1083 drivers/infiniband/hw/qib/qib_iba7220.c add_timer(&ppd->cpspec->chase_timer); ppd 1084 drivers/infiniband/hw/qib/qib_iba7220.c } else if (!ppd->cpspec->chase_end) ppd 1085 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME; ppd 1089 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_end = 0; ppd 1099 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd = dd->pport; ppd 1111 drivers/infiniband/hw/qib/qib_iba7220.c sdma_7220_errors(ppd, errs); ppd 1119 drivers/infiniband/hw/qib/qib_iba7220.c qib_disarm_7220_senderrbufs(ppd); ppd 1121 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1132 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1171 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 1172 drivers/infiniband/hw/qib/qib_iba7220.c handle_7220_chase(ppd, ibcs); ppd 1175 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_active = ppd 1178 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_active = ppd 1191 drivers/infiniband/hw/qib/qib_iba7220.c qib_handle_e_ibstatuschanged(ppd, ibcs); ppd 1204 drivers/infiniband/hw/qib/qib_iba7220.c qib_dev_porterr(dd, ppd->port, "%s error\n", msg); ppd 1206 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->state_wanted & ppd->lflags) ppd 1207 drivers/infiniband/hw/qib/qib_iba7220.c wake_up_interruptible(&ppd->state_wait); ppd 1485 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_set_ib_7220_lstate(struct qib_pportdata *ppd, u16 linkcmd, ppd 1489 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 1497 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 1498 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags |= QIBL_IB_LINK_DISABLED; ppd 1499 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 1506 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 1507 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_LINK_DISABLED; ppd 1508 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 1514 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl | mod_wd); ppd 1530 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_bringup_serdes(struct qib_pportdata *ppd) ppd 1532 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 1541 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog = 1; ppd 1542 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibsymsnap = read_7220_creg32(dd, cr_ibsymbolerr); ppd 1543 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->iblnkerrsnap = ppd 1565 drivers/infiniband/hw/qib/qib_iba7220.c ibc |= ((u64)(ppd->ibmaxlen >> 2) + 1) << SYM_LSB(IBCCtrl, MaxPktLen); ppd 1566 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl = ibc; /* without linkcmd or linkinitcmd! */ ppd 1569 drivers/infiniband/hw/qib/qib_iba7220.c val = ppd->cpspec->ibcctrl | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << ppd 1573 drivers/infiniband/hw/qib/qib_iba7220.c if (!ppd->cpspec->ibcddrctrl) { ppd 1575 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl = qib_read_kreg64(dd, kr_ibcddrctrl); ppd 1577 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->link_speed_enabled == (QIB_IB_SDR | QIB_IB_DDR)) ppd 1578 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 1582 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 1583 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_enabled == QIB_IB_DDR ? ppd 1585 drivers/infiniband/hw/qib/qib_iba7220.c if ((ppd->link_width_enabled & (IB_WIDTH_1X | IB_WIDTH_4X)) == ppd 1587 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= IBA7220_IBC_WIDTH_AUTONEG; ppd 1589 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 1590 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_enabled == IB_WIDTH_4X ? ppd 1595 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 1597 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 1601 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= IBA7220_IBC_LANE_REV_SUPPORTED; ppd 1606 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); ppd 1627 drivers/infiniband/hw/qib/qib_iba7220.c if (!ppd->guid) ppd 1628 drivers/infiniband/hw/qib/qib_iba7220.c ppd->guid = dd->base_guid; ppd 1629 drivers/infiniband/hw/qib/qib_iba7220.c guid = be64_to_cpu(ppd->guid); ppd 1646 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_quiet_serdes(struct qib_pportdata *ppd) ppd 1649 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 1657 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_end = 0; ppd 1658 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->chase_timer.function) /* if initted */ ppd 1659 drivers/infiniband/hw/qib/qib_iba7220.c del_timer_sync(&ppd->cpspec->chase_timer); ppd 1661 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta || ppd 1662 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog) { ppd 1670 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) { ppd 1672 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->ibdeltainprog) ppd 1673 drivers/infiniband/hw/qib/qib_iba7220.c val -= val - ppd->cpspec->ibsymsnap; ppd 1674 drivers/infiniband/hw/qib/qib_iba7220.c val -= ppd->cpspec->ibsymdelta; ppd 1677 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) { ppd 1679 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->ibdeltainprog) ppd 1680 drivers/infiniband/hw/qib/qib_iba7220.c val -= val - ppd->cpspec->iblnkerrsnap; ppd 1681 drivers/infiniband/hw/qib/qib_iba7220.c val -= ppd->cpspec->iblnkerrdelta; ppd 1688 drivers/infiniband/hw/qib/qib_iba7220.c qib_set_ib_7220_lstate(ppd, 0, QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); ppd 1690 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 1691 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_AUTONEG_INPROG; ppd 1692 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 1693 drivers/infiniband/hw/qib/qib_iba7220.c wake_up(&ppd->cpspec->autoneg_wait); ppd 1694 drivers/infiniband/hw/qib/qib_iba7220.c cancel_delayed_work_sync(&ppd->cpspec->autoneg_work); ppd 1696 drivers/infiniband/hw/qib/qib_iba7220.c shutdown_7220_relock_poll(ppd->dd); ppd 1697 drivers/infiniband/hw/qib/qib_iba7220.c val = qib_read_kreg64(ppd->dd, kr_xgxs_cfg); ppd 1699 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_xgxs_cfg, val); ppd 1725 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_setup_7220_setextled(struct qib_pportdata *ppd, u32 on) ppd 1727 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 1738 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->led_override) { ppd 1739 drivers/infiniband/hw/qib/qib_iba7220.c ltst = (ppd->led_override & QIB_LED_PHYS) ? ppd 1741 drivers/infiniband/hw/qib/qib_iba7220.c lst = (ppd->led_override & QIB_LED_LOG) ? ppd 1793 drivers/infiniband/hw/qib/qib_iba7220.c static void sdma_7220_intr(struct qib_pportdata *ppd, u64 istat) ppd 1797 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1799 drivers/infiniband/hw/qib/qib_iba7220.c switch (ppd->sdma_state.current_state) { ppd 1804 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, qib_sdma_event_e20_hw_started); ppd 1817 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, qib_sdma_event_e60_hw_halted); ppd 1822 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_intr(ppd); ppd 1825 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 2318 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_get_ib_cfg(struct qib_pportdata *ppd, int which) ppd 2325 drivers/infiniband/hw/qib/qib_iba7220.c ret = ppd->link_width_enabled; ppd 2329 drivers/infiniband/hw/qib/qib_iba7220.c ret = ppd->link_width_active; ppd 2333 drivers/infiniband/hw/qib/qib_iba7220.c ret = ppd->link_speed_enabled; ppd 2337 drivers/infiniband/hw/qib/qib_iba7220.c ret = ppd->link_speed_active; ppd 2351 drivers/infiniband/hw/qib/qib_iba7220.c ret = qib_read_kreg64(ppd->dd, kr_ibcddrstatus) ppd 2356 drivers/infiniband/hw/qib/qib_iba7220.c ret = ppd->vls_operational; ppd 2368 drivers/infiniband/hw/qib/qib_iba7220.c ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, ppd 2373 drivers/infiniband/hw/qib/qib_iba7220.c ret = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, ppd 2379 drivers/infiniband/hw/qib/qib_iba7220.c ret = (ppd->cpspec->ibcctrl & ppd 2394 drivers/infiniband/hw/qib/qib_iba7220.c ret = (ppd->link_speed_active == QIB_IB_DDR); ppd 2401 drivers/infiniband/hw/qib/qib_iba7220.c ret = (int)((ppd->cpspec->ibcddrctrl >> lsb) & maskr); ppd 2406 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val) ppd 2408 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 2431 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_enabled = val; ppd 2432 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_LINKDOWN)) ppd 2459 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_enabled = val; ppd 2460 drivers/infiniband/hw/qib/qib_iba7220.c if ((ppd->cpspec->ibcddrctrl & IBA7220_IBC_IBTA_1_2_MASK) && ppd 2463 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_LINKDOWN)) ppd 2477 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2478 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_AUTONEG_FAILED; ppd 2479 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2501 drivers/infiniband/hw/qib/qib_iba7220.c maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, ppd 2504 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl &= ppd 2506 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl |= (u64) val << ppd 2508 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); ppd 2514 drivers/infiniband/hw/qib/qib_iba7220.c maskr = SYM_FIELD(ppd->cpspec->ibcctrl, IBCCtrl, ppd 2517 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl &= ppd 2519 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl |= (u64) val << ppd 2521 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); ppd 2527 drivers/infiniband/hw/qib/qib_iba7220.c maskr = (u64) ppd->pkeys[0] | ((u64) ppd->pkeys[1] << 16) | ppd 2528 drivers/infiniband/hw/qib/qib_iba7220.c ((u64) ppd->pkeys[2] << 32) | ppd 2529 drivers/infiniband/hw/qib/qib_iba7220.c ((u64) ppd->pkeys[3] << 48); ppd 2536 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl &= ppd 2539 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl |= ppd 2541 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); ppd 2553 drivers/infiniband/hw/qib/qib_iba7220.c val = (ppd->ibmaxlen >> 2) + 1; ppd 2554 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, MaxPktLen); ppd 2555 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl |= (u64)val << SYM_LSB(IBCCtrl, MaxPktLen); ppd 2556 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcctrl, ppd->cpspec->ibcctrl); ppd 2564 drivers/infiniband/hw/qib/qib_iba7220.c if (!ppd->cpspec->ibdeltainprog && ppd 2566 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog = 1; ppd 2567 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibsymsnap = ppd 2569 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->iblnkerrsnap = ppd 2602 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_end = 0; ppd 2607 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->chase_timer.expires) { ppd 2608 drivers/infiniband/hw/qib/qib_iba7220.c del_timer_sync(&ppd->cpspec->chase_timer); ppd 2609 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->chase_timer.expires = 0; ppd 2619 drivers/infiniband/hw/qib/qib_iba7220.c qib_set_ib_7220_lstate(ppd, lcmd, licmd); ppd 2623 drivers/infiniband/hw/qib/qib_iba7220.c tmp = (ppd->cpspec->ibcddrctrl >> lsb) & maskr; ppd 2630 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->link_width_enabled-1 != tmp) { ppd 2631 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl &= ~(maskr << lsb); ppd 2632 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 2633 drivers/infiniband/hw/qib/qib_iba7220.c (((u64)(ppd->link_width_enabled-1) & maskr) << ppd 2636 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl); ppd 2638 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2639 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags |= QIBL_IB_FORCE_NOTIFY; ppd 2640 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2657 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl &= ~(maskr << lsb); ppd 2658 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= (((u64) val & maskr) << lsb); ppd 2659 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); ppd 2662 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2663 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags |= QIBL_IB_FORCE_NOTIFY; ppd 2664 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2670 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_set_loopback(struct qib_pportdata *ppd, const char *what) ppd 2676 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl |= SYM_MASK(IBCCtrl, Loopback); ppd 2678 drivers/infiniband/hw/qib/qib_iba7220.c qib_devinfo(ppd->dd->pcidev, "Enabling IB%u:%u IBC loopback\n", ppd 2679 drivers/infiniband/hw/qib/qib_iba7220.c ppd->dd->unit, ppd->port); ppd 2681 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcctrl &= ~SYM_MASK(IBCCtrl, Loopback); ppd 2684 drivers/infiniband/hw/qib/qib_iba7220.c qib_devinfo(ppd->dd->pcidev, ppd 2686 drivers/infiniband/hw/qib/qib_iba7220.c ppd->dd->unit, ppd->port); ppd 2690 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_ibcctrl, ppd->cpspec->ibcctrl); ppd 2691 drivers/infiniband/hw/qib/qib_iba7220.c ddr = ppd->cpspec->ibcddrctrl & ~(IBA7220_IBC_HRTBT_MASK ppd 2693 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl = ddr | val; ppd 2694 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_ibcddrctrl, ppd 2695 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl); ppd 2696 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 2728 drivers/infiniband/hw/qib/qib_iba7220.c static void rcvctrl_7220_mod(struct qib_pportdata *ppd, unsigned int op, ppd 2731 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 2815 drivers/infiniband/hw/qib/qib_iba7220.c static void sendctrl_7220_mod(struct qib_pportdata *ppd, u32 op) ppd 2817 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 2902 drivers/infiniband/hw/qib/qib_iba7220.c static u64 qib_portcntr_7220(struct qib_pportdata *ppd, u32 reg) ppd 2905 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 2946 drivers/infiniband/hw/qib/qib_iba7220.c qib_devinfo(ppd->dd->pcidev, ppd 2973 drivers/infiniband/hw/qib/qib_iba7220.c ret -= ret - ppd->cpspec->ibsymsnap; ppd 2977 drivers/infiniband/hw/qib/qib_iba7220.c ret -= ret - ppd->cpspec->iblnkerrsnap; ppd 3209 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd = &dd->pport[port]; ppd 3221 drivers/infiniband/hw/qib/qib_iba7220.c *cntr++ = qib_portcntr_7220(ppd, ppd 3244 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd = dd->pport; ppd 3261 drivers/infiniband/hw/qib/qib_iba7220.c traffic_wds = qib_portcntr_7220(ppd, cr_wordsend) + ppd 3262 drivers/infiniband/hw/qib/qib_iba7220.c qib_portcntr_7220(ppd, cr_wordrcv); ppd 3296 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_xgxs_reset(struct qib_pportdata *ppd) ppd 3299 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 3327 drivers/infiniband/hw/qib/qib_iba7220.c static u32 __iomem *get_7220_link_buf(struct qib_pportdata *ppd, u32 *bnum) ppd 3330 drivers/infiniband/hw/qib/qib_iba7220.c u32 lbuf = ppd->dd->cspec->lastbuf_for_pio; ppd 3338 drivers/infiniband/hw/qib/qib_iba7220.c sendctrl_7220_mod(ppd->dd->pport, QIB_SENDCTRL_AVAIL_BLIP); ppd 3339 drivers/infiniband/hw/qib/qib_iba7220.c qib_read_kreg64(ppd->dd, kr_scratch); /* extra chip flush */ ppd 3340 drivers/infiniband/hw/qib/qib_iba7220.c buf = qib_getsendbuf_range(ppd->dd, bnum, lbuf, lbuf); ppd 3344 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 3345 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->sdma_state.current_state == qib_sdma_state_s20_idle && ppd 3346 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_state.current_state != qib_sdma_state_s00_hw_down) { ppd 3347 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, qib_sdma_event_e00_go_hw_down); ppd 3351 drivers/infiniband/hw/qib/qib_iba7220.c qib_7220_sdma_hw_clean_up(ppd); ppd 3353 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 3356 drivers/infiniband/hw/qib/qib_iba7220.c qib_read_kreg64(ppd->dd, kr_scratch); /* extra chip flush */ ppd 3357 drivers/infiniband/hw/qib/qib_iba7220.c buf = qib_getsendbuf_range(ppd->dd, bnum, lbuf, lbuf); ppd 3371 drivers/infiniband/hw/qib/qib_iba7220.c static void autoneg_7220_sendpkt(struct qib_pportdata *ppd, u32 *hdr, ppd 3378 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 3383 drivers/infiniband/hw/qib/qib_iba7220.c while (!(piobuf = get_7220_link_buf(ppd, &pnum))) { ppd 3406 drivers/infiniband/hw/qib/qib_iba7220.c static void autoneg_7220_send(struct qib_pportdata *ppd, int which) ppd 3408 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 3442 drivers/infiniband/hw/qib/qib_iba7220.c autoneg_7220_sendpkt(ppd, hdr, dcnt, data); ppd 3445 drivers/infiniband/hw/qib/qib_iba7220.c autoneg_7220_sendpkt(ppd, hdr, dcnt, data); ppd 3464 drivers/infiniband/hw/qib/qib_iba7220.c static void set_7220_ibspeed_fast(struct qib_pportdata *ppd, u32 speed) ppd 3466 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl &= ~(IBA7220_IBC_SPEED_AUTONEG_MASK | ppd 3470 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= IBA7220_IBC_SPEED_AUTONEG_MASK | ppd 3473 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= speed == QIB_IB_DDR ? ppd 3476 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_ibcddrctrl, ppd->cpspec->ibcddrctrl); ppd 3477 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 3486 drivers/infiniband/hw/qib/qib_iba7220.c static void try_7220_autoneg(struct qib_pportdata *ppd) ppd 3495 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_ncmodectrl, 0x3b9dc07); ppd 3497 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3498 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags |= QIBL_IB_AUTONEG_INPROG; ppd 3499 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 3500 drivers/infiniband/hw/qib/qib_iba7220.c autoneg_7220_send(ppd, 0); ppd 3501 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, QIB_IB_DDR); ppd 3503 drivers/infiniband/hw/qib/qib_iba7220.c toggle_7220_rclkrls(ppd->dd); ppd 3505 drivers/infiniband/hw/qib/qib_iba7220.c queue_delayed_work(ib_wq, &ppd->cpspec->autoneg_work, ppd 3515 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd; ppd 3520 drivers/infiniband/hw/qib/qib_iba7220.c ppd = &container_of(work, struct qib_chippport_specific, ppd 3522 drivers/infiniband/hw/qib/qib_iba7220.c dd = ppd->dd; ppd 3529 drivers/infiniband/hw/qib/qib_iba7220.c if (SYM_FIELD(ppd->lastibcstat, IBCStatus, LinkTrainingState) ppd 3531 drivers/infiniband/hw/qib/qib_iba7220.c qib_set_linkstate(ppd, QIB_IB_LINKDOWN_DISABLE); ppd 3537 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 3541 drivers/infiniband/hw/qib/qib_iba7220.c if (wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 3542 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 3549 drivers/infiniband/hw/qib/qib_iba7220.c if (wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 3550 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 3554 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, QIB_IB_SDR); ppd 3561 drivers/infiniband/hw/qib/qib_iba7220.c wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 3562 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 3565 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->lflags & QIBL_IB_AUTONEG_INPROG) { ppd 3566 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3567 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_AUTONEG_INPROG; ppd 3569 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags |= QIBL_IB_AUTONEG_FAILED; ppd 3572 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 3573 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, ppd->link_speed_enabled); ppd 3608 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_ib_updown(struct qib_pportdata *ppd, int ibup, u64 ibcs) ppd 3611 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 3614 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3615 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_FORCE_NOTIFY; ppd 3616 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 3624 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & (QIBL_IB_AUTONEG_FAILED | ppd 3626 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, ppd->link_speed_enabled); ppd 3627 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) { ppd 3629 drivers/infiniband/hw/qib/qib_iba7220.c qib_cancel_sends(ppd); /* initial disarm, etc. */ ppd 3630 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 3631 drivers/infiniband/hw/qib/qib_iba7220.c if (__qib_sdma_running(ppd)) ppd 3632 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, ppd 3634 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 3640 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & (QIBL_IB_AUTONEG_FAILED | ppd 3642 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_active == QIB_IB_SDR && ppd 3643 drivers/infiniband/hw/qib/qib_iba7220.c (ppd->link_speed_enabled & (QIB_IB_DDR | QIB_IB_SDR)) == ppd 3648 drivers/infiniband/hw/qib/qib_iba7220.c if (!ppd->cpspec->ibdeltainprog) { ppd 3649 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog = 1; ppd 3650 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibsymsnap = read_7220_creg32(dd, ppd 3652 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->iblnkerrsnap = read_7220_creg32(dd, ppd 3655 drivers/infiniband/hw/qib/qib_iba7220.c try_7220_autoneg(ppd); ppd 3657 drivers/infiniband/hw/qib/qib_iba7220.c } else if ((ppd->lflags & QIBL_IB_AUTONEG_INPROG) && ppd 3658 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_active == QIB_IB_SDR) { ppd 3659 drivers/infiniband/hw/qib/qib_iba7220.c autoneg_7220_send(ppd, 1); ppd 3660 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, QIB_IB_DDR); ppd 3665 drivers/infiniband/hw/qib/qib_iba7220.c if ((ppd->lflags & QIBL_IB_AUTONEG_INPROG) && ppd 3666 drivers/infiniband/hw/qib/qib_iba7220.c (ppd->link_speed_active & QIB_IB_DDR)) { ppd 3667 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3668 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~(QIBL_IB_AUTONEG_INPROG | ppd 3670 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, ppd 3674 drivers/infiniband/hw/qib/qib_iba7220.c set_7220_ibspeed_fast(ppd, ppd 3675 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_enabled); ppd 3676 drivers/infiniband/hw/qib/qib_iba7220.c wake_up(&ppd->cpspec->autoneg_wait); ppd 3678 drivers/infiniband/hw/qib/qib_iba7220.c } else if (ppd->lflags & QIBL_IB_AUTONEG_FAILED) { ppd 3685 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3686 drivers/infiniband/hw/qib/qib_iba7220.c ppd->lflags &= ~QIBL_IB_AUTONEG_FAILED; ppd 3687 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->lflags_lock, ppd 3689 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibcddrctrl |= ppd 3696 drivers/infiniband/hw/qib/qib_iba7220.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 3700 drivers/infiniband/hw/qib/qib_iba7220.c ppd->delay_mult = rate_to_delay ppd 3705 drivers/infiniband/hw/qib/qib_iba7220.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 3711 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->sdma_state.current_state != ppd 3713 drivers/infiniband/hw/qib/qib_iba7220.c __qib_sdma_process_event(ppd, ppd 3715 drivers/infiniband/hw/qib/qib_iba7220.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 3720 drivers/infiniband/hw/qib/qib_iba7220.c if (ppd->cpspec->ibdeltainprog) { ppd 3721 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog = 0; ppd 3722 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibsymdelta += read_7220_creg32(ppd->dd, ppd 3723 drivers/infiniband/hw/qib/qib_iba7220.c cr_ibsymbolerr) - ppd->cpspec->ibsymsnap; ppd 3724 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->iblnkerrdelta += read_7220_creg32(ppd->dd, ppd 3725 drivers/infiniband/hw/qib/qib_iba7220.c cr_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap; ppd 3728 drivers/infiniband/hw/qib/qib_iba7220.c !ppd->cpspec->ibdeltainprog && ppd 3729 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) { ppd 3730 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibdeltainprog = 1; ppd 3731 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->ibsymsnap = read_7220_creg32(ppd->dd, ppd 3733 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->iblnkerrsnap = read_7220_creg32(ppd->dd, ppd 3738 drivers/infiniband/hw/qib/qib_iba7220.c qib_setup_7220_setextled(ppd, ibup); ppd 3958 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_pportdata *ppd; ppd 3963 drivers/infiniband/hw/qib/qib_iba7220.c ppd = &cpspec->pportdata; ppd 3964 drivers/infiniband/hw/qib/qib_iba7220.c dd->pport = ppd; ppd 3969 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec = cpspec; ppd 4010 drivers/infiniband/hw/qib/qib_iba7220.c ret = qib_init_pportdata(ppd, dd, 0, 1); ppd 4013 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_supported = IB_WIDTH_1X | IB_WIDTH_4X; ppd 4014 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_supported = QIB_IB_SDR | QIB_IB_DDR; ppd 4016 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_enabled = ppd->link_width_supported; ppd 4017 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_enabled = ppd->link_speed_supported; ppd 4022 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_width_active = IB_WIDTH_4X; ppd 4023 drivers/infiniband/hw/qib/qib_iba7220.c ppd->link_speed_active = QIB_IB_SDR; ppd 4024 drivers/infiniband/hw/qib/qib_iba7220.c ppd->delay_mult = rate_to_delay[0][1]; ppd 4025 drivers/infiniband/hw/qib/qib_iba7220.c ppd->vls_supported = IB_VL_VL0; ppd 4026 drivers/infiniband/hw/qib/qib_iba7220.c ppd->vls_operational = ppd->vls_supported; ppd 4031 drivers/infiniband/hw/qib/qib_iba7220.c timer_setup(&ppd->cpspec->chase_timer, reenable_7220_chase, 0); ppd 4133 drivers/infiniband/hw/qib/qib_iba7220.c static u32 __iomem *qib_7220_getsendbuf(struct qib_pportdata *ppd, u64 pbc, ppd 4137 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 4141 drivers/infiniband/hw/qib/qib_iba7220.c !(ppd->lflags & (QIBL_IB_AUTONEG_INPROG | QIBL_LINKACTIVE))) ppd 4142 drivers/infiniband/hw/qib/qib_iba7220.c buf = get_7220_link_buf(ppd, pbufnum); ppd 4156 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_set_cntr_7220_sample(struct qib_pportdata *ppd, u32 intv, ppd 4159 drivers/infiniband/hw/qib/qib_iba7220.c write_7220_creg(ppd->dd, cr_psinterval, intv); ppd 4160 drivers/infiniband/hw/qib/qib_iba7220.c write_7220_creg(ppd->dd, cr_psstart, start); ppd 4170 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_sdma_update_7220_tail(struct qib_pportdata *ppd, u16 tail) ppd 4174 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_descq_tail = tail; ppd 4175 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(ppd->dd, kr_senddmatail, tail); ppd 4178 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_sdma_set_7220_desc_cnt(struct qib_pportdata *ppd, unsigned cnt) ppd 4222 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_sdma_init_early(struct qib_pportdata *ppd) ppd 4224 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_state.set_state_action = sdma_7220_action_table; ppd 4227 drivers/infiniband/hw/qib/qib_iba7220.c static int init_sdma_7220_regs(struct qib_pportdata *ppd) ppd 4229 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 4234 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_senddmabase, ppd->sdma_descq_phys); ppd 4235 drivers/infiniband/hw/qib/qib_iba7220.c qib_sdma_7220_setlengen(ppd); ppd 4236 drivers/infiniband/hw/qib/qib_iba7220.c qib_sdma_update_7220_tail(ppd, 0); /* Set SendDmaTail */ ppd 4238 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_kreg(dd, kr_senddmaheadaddr, ppd->sdma_head_phys); ppd 4257 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_state.first_sendbuf = i; ppd 4258 drivers/infiniband/hw/qib/qib_iba7220.c ppd->sdma_state.last_sendbuf = n; ppd 4264 drivers/infiniband/hw/qib/qib_iba7220.c static u16 qib_sdma_7220_gethead(struct qib_pportdata *ppd) ppd 4266 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_devdata *dd = ppd->dd; ppd 4274 drivers/infiniband/hw/qib/qib_iba7220.c use_dmahead = __qib_sdma_running(ppd) && ppd 4278 drivers/infiniband/hw/qib/qib_iba7220.c (u16)le64_to_cpu(*ppd->sdma_head_dma) : ppd 4281 drivers/infiniband/hw/qib/qib_iba7220.c swhead = ppd->sdma_descq_head; ppd 4282 drivers/infiniband/hw/qib/qib_iba7220.c swtail = ppd->sdma_descq_tail; ppd 4283 drivers/infiniband/hw/qib/qib_iba7220.c cnt = ppd->sdma_descq_cnt; ppd 4310 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_sdma_7220_busy(struct qib_pportdata *ppd) ppd 4312 drivers/infiniband/hw/qib/qib_iba7220.c u64 hwstatus = qib_read_kreg64(ppd->dd, kr_senddmastatus); ppd 4328 drivers/infiniband/hw/qib/qib_iba7220.c static u32 qib_7220_setpbc_control(struct qib_pportdata *ppd, u32 plen, ppd 4331 drivers/infiniband/hw/qib/qib_iba7220.c u8 snd_mult = ppd->delay_mult; ppd 4333 drivers/infiniband/hw/qib/qib_iba7220.c u32 ret = ppd->cpspec->last_delay_mult; ppd 4335 drivers/infiniband/hw/qib/qib_iba7220.c ppd->cpspec->last_delay_mult = (rcv_mult > snd_mult) ? ppd 63 drivers/infiniband/hw/qib/qib_iba7322.c static void sendctrl_7322_mod(struct qib_pportdata *ppd, u32 op); ppd 74 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_set_ib_7322_lstate(struct qib_pportdata *ppd, u16 linkcmd, ppd 626 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 870 drivers/infiniband/hw/qib/qib_iba7322.c static inline u64 qib_read_kreg_port(const struct qib_pportdata *ppd, ppd 873 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->kpregbase || !(ppd->dd->flags & QIB_PRESENT)) ppd 875 drivers/infiniband/hw/qib/qib_iba7322.c return readq(&ppd->cpspec->kpregbase[regno]); ppd 878 drivers/infiniband/hw/qib/qib_iba7322.c static inline void qib_write_kreg_port(const struct qib_pportdata *ppd, ppd 881 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec && ppd->dd && ppd->cpspec->kpregbase && ppd 882 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->dd->flags & QIB_PRESENT)) ppd 883 drivers/infiniband/hw/qib/qib_iba7322.c writeq(value, &ppd->cpspec->kpregbase[regno]); ppd 918 drivers/infiniband/hw/qib/qib_iba7322.c static inline void write_7322_creg_port(const struct qib_pportdata *ppd, ppd 921 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec && ppd->cpspec->cpregbase && ppd 922 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->dd->flags & QIB_PRESENT)) ppd 923 drivers/infiniband/hw/qib/qib_iba7322.c writeq(value, &ppd->cpspec->cpregbase[regno]); ppd 926 drivers/infiniband/hw/qib/qib_iba7322.c static inline u64 read_7322_creg_port(const struct qib_pportdata *ppd, ppd 929 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec || !ppd->cpspec->cpregbase || ppd 930 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->dd->flags & QIB_PRESENT)) ppd 932 drivers/infiniband/hw/qib/qib_iba7322.c return readq(&ppd->cpspec->cpregbase[regno]); ppd 935 drivers/infiniband/hw/qib/qib_iba7322.c static inline u32 read_7322_creg32_port(const struct qib_pportdata *ppd, ppd 938 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec || !ppd->cpspec->cpregbase || ppd 939 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->dd->flags & QIB_PRESENT)) ppd 941 drivers/infiniband/hw/qib/qib_iba7322.c return readl(&ppd->cpspec->cpregbase[regno]); ppd 1339 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_disarm_7322_senderrbufs(struct qib_pportdata *ppd) ppd 1341 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 1416 drivers/infiniband/hw/qib/qib_iba7322.c static void flush_fifo(struct qib_pportdata *ppd) ppd 1418 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 1442 drivers/infiniband/hw/qib/qib_iba7322.c (((u64)ppd->hw_pidx) << (PBC_PORT_SEL_LSB + 32)) | ppd 1444 drivers/infiniband/hw/qib/qib_iba7322.c piobuf = qib_7322_getsendbuf(ppd, pbc, &bufn); ppd 1463 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_sdma_sendctrl(struct qib_pportdata *ppd, unsigned op) ppd 1465 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 1497 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl &= ~SYM_MASK(SendCtrl_0, SendEnable); ppd 1498 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd->p_sendctrl); ppd 1502 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl |= set_sendctrl; ppd 1503 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl &= ~clr_sendctrl; ppd 1506 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd 1507 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl | ppd 1510 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd->p_sendctrl); ppd 1514 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl |= SYM_MASK(SendCtrl_0, SendEnable); ppd 1515 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd->p_sendctrl); ppd 1521 drivers/infiniband/hw/qib/qib_iba7322.c if ((op & QIB_SDMA_SENDCTRL_OP_DRAIN) && ppd->dd->cspec->r1) ppd 1522 drivers/infiniband/hw/qib/qib_iba7322.c flush_fifo(ppd); ppd 1525 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_sdma_hw_clean_up(struct qib_pportdata *ppd) ppd 1527 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, qib_sdma_event_e50_hw_cleaned); ppd 1530 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_sdma_7322_setlengen(struct qib_pportdata *ppd) ppd 1537 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmalengen, ppd->sdma_descq_cnt); ppd 1538 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmalengen, ppd 1539 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_descq_cnt | ppd 1546 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_sdma_update_7322_tail(struct qib_pportdata *ppd, u16 tail) ppd 1550 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_descq_tail = tail; ppd 1551 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmatail, tail); ppd 1557 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_sdma_hw_start_up(struct qib_pportdata *ppd) ppd 1565 drivers/infiniband/hw/qib/qib_iba7322.c sendctrl_7322_mod(ppd, QIB_SENDCTRL_FLUSH); ppd 1567 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_7322_setlengen(ppd); ppd 1568 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_update_7322_tail(ppd, 0); /* Set SendDmaTail */ ppd 1569 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_head_dma[0] = 0; ppd 1570 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_sdma_sendctrl(ppd, ppd 1571 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_state.current_op | QIB_SDMA_SENDCTRL_OP_CLEANUP); ppd 1586 drivers/infiniband/hw/qib/qib_iba7322.c static void sdma_7322_p_errors(struct qib_pportdata *ppd, u64 errs) ppd 1589 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 1592 drivers/infiniband/hw/qib/qib_iba7322.c err_decode(ppd->cpspec->sdmamsgbuf, sizeof(ppd->cpspec->sdmamsgbuf), ppd 1597 drivers/infiniband/hw/qib/qib_iba7322.c ppd->port); ppd 1599 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1603 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(dd, ppd->port, ppd 1605 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_state_names[ppd->sdma_state.current_state], ppd 1606 drivers/infiniband/hw/qib/qib_iba7322.c errs, ppd->cpspec->sdmamsgbuf); ppd 1607 drivers/infiniband/hw/qib/qib_iba7322.c dump_sdma_7322_state(ppd); ppd 1610 drivers/infiniband/hw/qib/qib_iba7322.c switch (ppd->sdma_state.current_state) { ppd 1616 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, ppd 1628 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, ppd 1634 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, ppd 1639 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, qib_sdma_event_e7322_err_halted); ppd 1640 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, qib_sdma_event_e60_hw_halted); ppd 1644 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1747 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = cp->ppd; ppd 1749 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_timer.expires = 0; ppd 1750 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, QLOGIC_IB_IBCC_LINKCMD_DOWN, ppd 1754 drivers/infiniband/hw/qib/qib_iba7322.c static void disable_chase(struct qib_pportdata *ppd, unsigned long tnow, ppd 1757 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_end = 0; ppd 1762 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, QLOGIC_IB_IBCC_LINKCMD_DOWN, ppd 1764 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_timer.expires = jiffies + QIB_CHASE_DIS_TIME; ppd 1765 drivers/infiniband/hw/qib/qib_iba7322.c add_timer(&ppd->cpspec->chase_timer); ppd 1768 drivers/infiniband/hw/qib/qib_iba7322.c static void handle_serdes_issues(struct qib_pportdata *ppd, u64 ibcst) ppd 1787 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->chase_end && ppd 1788 drivers/infiniband/hw/qib/qib_iba7322.c time_after(tnow, ppd->cpspec->chase_end)) ppd 1789 drivers/infiniband/hw/qib/qib_iba7322.c disable_chase(ppd, tnow, ibclt); ppd 1790 drivers/infiniband/hw/qib/qib_iba7322.c else if (!ppd->cpspec->chase_end) ppd 1791 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_end = tnow + QIB_CHASE_TIME; ppd 1794 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_end = 0; ppd 1802 drivers/infiniband/hw/qib/qib_iba7322.c force_h1(ppd); ppd 1803 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_reforce = 1; ppd 1804 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1) ppd 1805 drivers/infiniband/hw/qib/qib_iba7322.c serdes_7322_los_enable(ppd, 0); ppd 1806 drivers/infiniband/hw/qib/qib_iba7322.c } else if (ppd->cpspec->qdr_reforce && ppd 1811 drivers/infiniband/hw/qib/qib_iba7322.c force_h1(ppd); ppd 1813 drivers/infiniband/hw/qib/qib_iba7322.c if ((IS_QMH(ppd->dd) || IS_QME(ppd->dd)) && ppd 1814 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_enabled == QIB_IB_QDR && ppd 1819 drivers/infiniband/hw/qib/qib_iba7322.c adj_tx_serdes(ppd); ppd 1823 drivers/infiniband/hw/qib/qib_iba7322.c u8 pibclt = (u8)SYM_FIELD(ppd->lastibcstat, IBCStatusA_0, ppd 1825 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1 && ppd 1833 drivers/infiniband/hw/qib/qib_iba7322.c serdes_7322_los_enable(ppd, 1); ppd 1834 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->qdr_dfe_on && ppd 1836 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_on = 1; ppd 1837 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_time = 0; ppd 1839 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(2), ppd 1840 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->cspec->r1 ? ppd 1845 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port, ibclt); ppd 1857 drivers/infiniband/hw/qib/qib_iba7322.c static noinline void handle_7322_p_errors(struct qib_pportdata *ppd) ppd 1861 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 1866 drivers/infiniband/hw/qib/qib_iba7322.c check_7322_rxe_status(ppd); ppd 1868 drivers/infiniband/hw/qib/qib_iba7322.c errs = qib_read_kreg_port(ppd, krp_errstatus); ppd 1872 drivers/infiniband/hw/qib/qib_iba7322.c ppd->port); ppd 1878 drivers/infiniband/hw/qib/qib_iba7322.c msg = ppd->cpspec->epmsgbuf; ppd 1882 drivers/infiniband/hw/qib/qib_iba7322.c err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), ppd 1885 drivers/infiniband/hw/qib/qib_iba7322.c snprintf(msg, sizeof(ppd->cpspec->epmsgbuf), ppd 1887 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(dd, ppd->port, ppd 1897 drivers/infiniband/hw/qib/qib_iba7322.c symptom = qib_read_kreg_port(ppd, krp_sendhdrsymptom); ppd 1898 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendhdrsymptom, 0); ppd 1899 drivers/infiniband/hw/qib/qib_iba7322.c err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), symptom, ppd 1907 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1915 drivers/infiniband/hw/qib/qib_iba7322.c err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), ppd 1921 drivers/infiniband/hw/qib/qib_iba7322.c qib_disarm_7322_senderrbufs(ppd); ppd 1923 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 1931 drivers/infiniband/hw/qib/qib_iba7322.c err_decode(msg, sizeof(ppd->cpspec->epmsgbuf), errs, ppd 1937 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_errclear, errs); ppd 1951 drivers/infiniband/hw/qib/qib_iba7322.c sdma_7322_p_errors(ppd, errs); ppd 1957 drivers/infiniband/hw/qib/qib_iba7322.c ibcs = qib_read_kreg_port(ppd, krp_ibcstatus_a); ppd 1960 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 1961 drivers/infiniband/hw/qib/qib_iba7322.c handle_serdes_issues(ppd, ibcs); ppd 1962 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->cpspec->ibcctrl_a & ppd 1969 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= ppd 1971 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 1972 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 1976 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_active = ppd 1979 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active = (ibcs & SYM_MASK(IBCStatusA_0, ppd 1984 drivers/infiniband/hw/qib/qib_iba7322.c if ((ppd->lflags & QIBL_IB_LINK_DISABLED) && ltstate != ppd 1986 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, ppd 2001 drivers/infiniband/hw/qib/qib_iba7322.c qib_handle_e_ibstatuschanged(ppd, ibcs); ppd 2004 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(dd, ppd->port, "%s error\n", msg); ppd 2006 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->state_wanted & ppd->lflags) ppd 2007 drivers/infiniband/hw/qib/qib_iba7322.c wake_up_interruptible(&ppd->state_wait); ppd 2169 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = dd->pport; ppd 2171 drivers/infiniband/hw/qib/qib_iba7322.c for (; pidx < dd->num_pports; ++pidx, ppd++) { ppd 2180 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 2181 drivers/infiniband/hw/qib/qib_iba7322.c dump_sdma_7322_state(ppd); ppd 2182 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 2259 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_set_ib_7322_lstate(struct qib_pportdata *ppd, u16 linkcmd, ppd 2263 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2274 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 2275 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2276 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags |= QIBL_IB_LINK_DISABLED; ppd 2277 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2284 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2285 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_LINK_DISABLED; ppd 2286 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2291 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ppd 2298 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a | ppd 2316 drivers/infiniband/hw/qib/qib_iba7322.c static void set_vls(struct qib_pportdata *ppd) ppd 2319 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2322 drivers/infiniband/hw/qib/qib_iba7322.c numvls = qib_num_vls(ppd->vls_operational); ppd 2334 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rxcreditvl15, (u64) cred_vl); ppd 2337 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rxcreditvl0, cred_vl + vl0extra); ppd 2339 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rxcreditvl0 + i, cred_vl); ppd 2341 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rxcreditvl0 + i, 0); ppd 2344 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_ibsdtestiftx); ppd 2346 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibsdtestiftx, val); ppd 2349 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibsdtestiftx, val); ppd 2352 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_rxcreditvl0 + i); ppd 2353 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_rxcreditvl15); ppd 2356 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a = (ppd->cpspec->ibcctrl_a & ppd 2359 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); ppd 2367 drivers/infiniband/hw/qib/qib_iba7322.c static int serdes_7322_init(struct qib_pportdata *ppd); ppd 2373 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_bringup_serdes(struct qib_pportdata *ppd) ppd 2375 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2386 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); ppd 2387 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); ppd 2391 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_tx_deemph_override, ppd 2396 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog = 1; ppd 2397 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, ppd 2399 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, ppd 2419 drivers/infiniband/hw/qib/qib_iba7322.c ibc |= ((u64)(ppd->ibmaxlen >> 2) + 1) << ppd 2421 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a = ibc; /* without linkcmd or linkinitcmd! */ ppd 2427 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 2429 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->ibcctrl_b) { ppd 2430 drivers/infiniband/hw/qib/qib_iba7322.c unsigned lse = ppd->link_speed_enabled; ppd 2436 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b = qib_read_kreg_port(ppd, ppd 2438 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b &= ~(IBA7322_IBC_SPEED_QDR | ppd 2444 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= ppd 2449 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= (lse == QIB_IB_QDR) ? ppd 2455 drivers/infiniband/hw/qib/qib_iba7322.c if ((ppd->link_width_enabled & (IB_WIDTH_1X | IB_WIDTH_4X)) == ppd 2457 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= IBA7322_IBC_WIDTH_AUTONEG; ppd 2459 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= ppd 2460 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_enabled == IB_WIDTH_4X ? ppd 2465 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= (IBA7322_IBC_RXPOL_MASK | ppd 2468 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); ppd 2471 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_ibcctrl_c); ppd 2474 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_c, val); ppd 2476 drivers/infiniband/hw/qib/qib_iba7322.c serdes_7322_init(ppd); ppd 2478 drivers/infiniband/hw/qib/qib_iba7322.c guid = be64_to_cpu(ppd->guid); ppd 2481 drivers/infiniband/hw/qib/qib_iba7322.c guid = be64_to_cpu(dd->base_guid) + ppd->port - 1; ppd 2482 drivers/infiniband/hw/qib/qib_iba7322.c ppd->guid = cpu_to_be64(guid); ppd 2485 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_hrtbt_guid, guid); ppd 2490 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, IBLinkEn); ppd 2491 drivers/infiniband/hw/qib/qib_iba7322.c set_vls(ppd); ppd 2494 drivers/infiniband/hw/qib/qib_iba7322.c val = ppd->cpspec->ibcctrl_a | (QLOGIC_IB_IBCC_LINKINITCMD_DISABLE << ppd 2496 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, val); ppd 2499 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a = val & ~SYM_MASK(IBCCtrlA_0, LinkInitCmd); ppd 2503 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl |= SYM_MASK(RcvCtrl_0, RcvIBPortEnable); ppd 2504 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvctrl, ppd->p_rcvctrl); ppd 2508 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_errmask); ppd 2509 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_errmask, ppd 2521 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_mini_quiet_serdes(struct qib_pportdata *ppd) ppd 2526 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, QLOGIC_IB_IBCC_LINKINITCMD_DISABLE); ppd 2528 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 2529 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_AUTONEG_INPROG; ppd 2530 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 2531 drivers/infiniband/hw/qib/qib_iba7322.c wake_up(&ppd->cpspec->autoneg_wait); ppd 2532 drivers/infiniband/hw/qib/qib_iba7322.c cancel_delayed_work_sync(&ppd->cpspec->autoneg_work); ppd 2533 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1) ppd 2534 drivers/infiniband/hw/qib/qib_iba7322.c cancel_delayed_work_sync(&ppd->cpspec->ipg_work); ppd 2536 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_end = 0; ppd 2537 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->chase_timer.function) /* if initted */ ppd 2538 drivers/infiniband/hw/qib/qib_iba7322.c del_timer_sync(&ppd->cpspec->chase_timer); ppd 2547 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, IBLinkEn); ppd 2548 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 2554 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibsymdelta || ppd->cpspec->iblnkerrdelta || ppd 2555 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog || ppd->cpspec->iblnkdowndelta) { ppd 2556 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2564 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibsymdelta || ppd->cpspec->ibdeltainprog) { ppd 2565 drivers/infiniband/hw/qib/qib_iba7322.c val = read_7322_creg32_port(ppd, crp_ibsymbolerr); ppd 2566 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibdeltainprog) ppd 2567 drivers/infiniband/hw/qib/qib_iba7322.c val -= val - ppd->cpspec->ibsymsnap; ppd 2568 drivers/infiniband/hw/qib/qib_iba7322.c val -= ppd->cpspec->ibsymdelta; ppd 2569 drivers/infiniband/hw/qib/qib_iba7322.c write_7322_creg_port(ppd, crp_ibsymbolerr, val); ppd 2571 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->iblnkerrdelta || ppd->cpspec->ibdeltainprog) { ppd 2572 drivers/infiniband/hw/qib/qib_iba7322.c val = read_7322_creg32_port(ppd, crp_iblinkerrrecov); ppd 2573 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibdeltainprog) ppd 2574 drivers/infiniband/hw/qib/qib_iba7322.c val -= val - ppd->cpspec->iblnkerrsnap; ppd 2575 drivers/infiniband/hw/qib/qib_iba7322.c val -= ppd->cpspec->iblnkerrdelta; ppd 2576 drivers/infiniband/hw/qib/qib_iba7322.c write_7322_creg_port(ppd, crp_iblinkerrrecov, val); ppd 2578 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->iblnkdowndelta) { ppd 2579 drivers/infiniband/hw/qib/qib_iba7322.c val = read_7322_creg32_port(ppd, crp_iblinkdown); ppd 2580 drivers/infiniband/hw/qib/qib_iba7322.c val += ppd->cpspec->iblnkdowndelta; ppd 2581 drivers/infiniband/hw/qib/qib_iba7322.c write_7322_creg_port(ppd, crp_iblinkdown, val); ppd 2615 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_setup_7322_setextled(struct qib_pportdata *ppd, u32 on) ppd 2617 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2630 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->led_override) { ppd 2631 drivers/infiniband/hw/qib/qib_iba7322.c grn = (ppd->led_override & QIB_LED_PHYS); ppd 2632 drivers/infiniband/hw/qib/qib_iba7322.c yel = (ppd->led_override & QIB_LED_LOG); ppd 2634 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_ibcstatus_a); ppd 2644 drivers/infiniband/hw/qib/qib_iba7322.c extctl = dd->cspec->extctrl & (ppd->port == 1 ? ppd 2647 drivers/infiniband/hw/qib/qib_iba7322.c extctl |= ppd->port == 1 ? ExtLED_IB1_GRN : ExtLED_IB2_GRN; ppd 2657 drivers/infiniband/hw/qib/qib_iba7322.c extctl |= ppd->port == 1 ? ExtLED_IB1_YEL : ExtLED_IB2_YEL; ppd 2663 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvpktledcnt, ledblink); ppd 2718 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_update_sdma_dca(struct qib_pportdata *ppd, int cpu) ppd 2720 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 2722 drivers/infiniband/hw/qib/qib_iba7322.c unsigned pidx = ppd->port - 1; ppd 2728 drivers/infiniband/hw/qib/qib_iba7322.c cspec->dca_rcvhdr_ctrl[4] &= ~(ppd->hw_pidx ? ppd 2733 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->hw_pidx ? ppd 2737 drivers/infiniband/hw/qib/qib_iba7322.c "sdma %d cpu %d dca %llx\n", ppd->hw_pidx, cpu, ppd 2741 drivers/infiniband/hw/qib/qib_iba7322.c cspec->dca_ctrl |= ppd->hw_pidx ? ppd 2799 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = (struct qib_pportdata *)n->arg; ppd 2801 drivers/infiniband/hw/qib/qib_iba7322.c qib_update_sdma_dca(ppd, cpu); ppd 2816 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = (struct qib_pportdata *)n->arg; ppd 2818 drivers/infiniband/hw/qib/qib_iba7322.c dd = ppd->dd; ppd 2979 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 2986 drivers/infiniband/hw/qib/qib_iba7322.c ppd = dd->pport + pidx; ppd 2987 drivers/infiniband/hw/qib/qib_iba7322.c mask <<= (QSFP_GPIO_PORT2_SHIFT * ppd->hw_pidx); ppd 2991 drivers/infiniband/hw/qib/qib_iba7322.c qd = &ppd->cpspec->qsfp_data; ppd 3030 drivers/infiniband/hw/qib/qib_iba7322.c handle_7322_p_errors(dd->rcd[0]->ppd); ppd 3032 drivers/infiniband/hw/qib/qib_iba7322.c handle_7322_p_errors(dd->rcd[1]->ppd); ppd 3220 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = data; ppd 3221 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 3235 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(dd, kr_intclear, ppd->hw_pidx ? ppd 3237 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_intr(ppd); ppd 3247 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = data; ppd 3248 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 3262 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(dd, kr_intclear, ppd->hw_pidx ? ppd 3264 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_intr(ppd); ppd 3274 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = data; ppd 3275 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 3289 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(dd, kr_intclear, ppd->hw_pidx ? ppd 3292 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_intr(ppd); ppd 3302 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = data; ppd 3303 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 3317 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(dd, kr_intclear, ppd->hw_pidx ? ppd 3320 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_process_event(ppd, qib_sdma_event_e20_hw_started); ppd 3747 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = &dd->pport[i]; ppd 3749 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 3750 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags |= QIBL_IB_FORCE_NOTIFY; ppd 3751 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_AUTONEG_FAILED; ppd 3752 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 3963 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_get_ib_cfg(struct qib_pportdata *ppd, int which) ppd 3972 drivers/infiniband/hw/qib/qib_iba7322.c ret = ppd->link_width_enabled; ppd 3976 drivers/infiniband/hw/qib/qib_iba7322.c ret = ppd->link_width_active; ppd 3980 drivers/infiniband/hw/qib/qib_iba7322.c ret = ppd->link_speed_enabled; ppd 3984 drivers/infiniband/hw/qib/qib_iba7322.c ret = ppd->link_speed_active; ppd 3998 drivers/infiniband/hw/qib/qib_iba7322.c ret = qib_read_kreg_port(ppd, krp_ibcstatus_b) & ppd 4003 drivers/infiniband/hw/qib/qib_iba7322.c ret = ppd->vls_operational; ppd 4015 drivers/infiniband/hw/qib/qib_iba7322.c ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, ppd 4020 drivers/infiniband/hw/qib/qib_iba7322.c ret = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, ppd 4026 drivers/infiniband/hw/qib/qib_iba7322.c ret = (ppd->cpspec->ibcctrl_a & ppd 4041 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->link_speed_active == QIB_IB_QDR) ppd 4043 drivers/infiniband/hw/qib/qib_iba7322.c else if (ppd->link_speed_active == QIB_IB_DDR) ppd 4053 drivers/infiniband/hw/qib/qib_iba7322.c ret = (int)((ppd->cpspec->ibcctrl_b >> lsb) & maskr); ppd 4066 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_set_ib_cfg(struct qib_pportdata *ppd, int which, u32 val) ppd 4068 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 4089 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendslid, ppd 4091 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendslidmask, ppd 4096 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_enabled = val; ppd 4116 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_enabled = val; ppd 4124 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 4125 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_AUTONEG_FAILED; ppd 4126 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 4144 drivers/infiniband/hw/qib/qib_iba7322.c maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, ppd 4147 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ppd 4149 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= (u64) val << ppd 4151 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 4152 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 4158 drivers/infiniband/hw/qib/qib_iba7322.c maskr = SYM_FIELD(ppd->cpspec->ibcctrl_a, IBCCtrlA_0, ppd 4161 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ppd 4163 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= (u64) val << ppd 4165 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 4166 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 4172 drivers/infiniband/hw/qib/qib_iba7322.c maskr = (u64) ppd->pkeys[0] | ((u64) ppd->pkeys[1] << 16) | ppd 4173 drivers/infiniband/hw/qib/qib_iba7322.c ((u64) ppd->pkeys[2] << 32) | ppd 4174 drivers/infiniband/hw/qib/qib_iba7322.c ((u64) ppd->pkeys[3] << 48); ppd 4175 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_partitionkey, maskr); ppd 4181 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ppd 4184 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= ppd 4186 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); ppd 4198 drivers/infiniband/hw/qib/qib_iba7322.c val = (ppd->ibmaxlen >> 2) + 1; ppd 4199 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, MaxPktLen); ppd 4200 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= (u64)val << ppd 4202 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 4203 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 4211 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfusesnap = 1; ppd 4212 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, ppd 4214 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->ibdeltainprog && ppd 4216 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog = 1; ppd 4217 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymsnap = ppd 4218 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, ppd 4220 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrsnap = ppd 4221 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, ppd 4228 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibmalfusesnap) { ppd 4229 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfusesnap = 0; ppd 4230 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfdelta += ppd 4231 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, ppd 4233 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfsnap; ppd 4261 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_end = 0; ppd 4266 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->chase_timer.expires) { ppd 4267 drivers/infiniband/hw/qib/qib_iba7322.c del_timer_sync(&ppd->cpspec->chase_timer); ppd 4268 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->chase_timer.expires = 0; ppd 4278 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, lcmd, licmd); ppd 4282 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->vls_operational != val) { ppd 4283 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_operational = val; ppd 4284 drivers/infiniband/hw/qib/qib_iba7322.c set_vls(ppd); ppd 4289 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_highprio_limit, val); ppd 4303 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1) { ppd 4304 drivers/infiniband/hw/qib/qib_iba7322.c cancel_delayed_work(&ppd->cpspec->ipg_work); ppd 4305 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ipg_tries = 0; ppd 4313 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b &= ~(maskr << lsb); ppd 4314 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= (((u64) val & maskr) << lsb); ppd 4315 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); ppd 4321 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_set_loopback(struct qib_pportdata *ppd, const char *what) ppd 4328 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a |= SYM_MASK(IBCCtrlA_0, ppd 4331 drivers/infiniband/hw/qib/qib_iba7322.c qib_devinfo(ppd->dd->pcidev, "Enabling IB%u:%u IBC loopback\n", ppd 4332 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port); ppd 4334 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ~SYM_MASK(IBCCtrlA_0, ppd 4338 drivers/infiniband/hw/qib/qib_iba7322.c qib_devinfo(ppd->dd->pcidev, ppd 4340 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port); ppd 4344 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 4345 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 4346 drivers/infiniband/hw/qib/qib_iba7322.c ctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_HRTBT_MASK ppd 4348 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b = ctrlb | val; ppd 4349 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd 4350 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b); ppd 4351 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 4356 drivers/infiniband/hw/qib/qib_iba7322.c static void get_vl_weights(struct qib_pportdata *ppd, unsigned regno, ppd 4362 drivers/infiniband/hw/qib/qib_iba7322.c u32 val = qib_read_kreg_port(ppd, regno); ppd 4371 drivers/infiniband/hw/qib/qib_iba7322.c static void set_vl_weights(struct qib_pportdata *ppd, unsigned regno, ppd 4383 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, regno, val); ppd 4385 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->p_sendctrl & SYM_MASK(SendCtrl_0, IBVLArbiterEn))) { ppd 4386 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 4390 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl |= SYM_MASK(SendCtrl_0, IBVLArbiterEn); ppd 4391 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd->p_sendctrl); ppd 4397 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_get_ib_table(struct qib_pportdata *ppd, int which, void *t) ppd 4401 drivers/infiniband/hw/qib/qib_iba7322.c get_vl_weights(ppd, krp_highprio_0, t); ppd 4405 drivers/infiniband/hw/qib/qib_iba7322.c get_vl_weights(ppd, krp_lowprio_0, t); ppd 4414 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_set_ib_table(struct qib_pportdata *ppd, int which, void *t) ppd 4418 drivers/infiniband/hw/qib/qib_iba7322.c set_vl_weights(ppd, krp_highprio_0, t); ppd 4422 drivers/infiniband/hw/qib/qib_iba7322.c set_vl_weights(ppd, krp_lowprio_0, t); ppd 4481 drivers/infiniband/hw/qib/qib_iba7322.c static void rcvctrl_7322_mod(struct qib_pportdata *ppd, unsigned int op, ppd 4484 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 4500 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl &= ~SYM_MASK(RcvCtrl_0, RcvPartitionKeyDisable); ppd 4502 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl |= SYM_MASK(RcvCtrl_0, RcvPartitionKeyDisable); ppd 4511 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl |= ppd 4525 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl &= ppd 4543 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvctrl, ppd->p_rcvctrl); ppd 4621 drivers/infiniband/hw/qib/qib_iba7322.c static void sendctrl_7322_mod(struct qib_pportdata *ppd, u32 op) ppd 4623 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 4642 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl &= ~SYM_MASK(SendCtrl_0, SendEnable); ppd 4644 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl |= SYM_MASK(SendCtrl_0, SendEnable); ppd 4665 drivers/infiniband/hw/qib/qib_iba7322.c u64 tmp_ppd_sendctrl = ppd->p_sendctrl; ppd 4675 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, tmp_ppd_sendctrl); ppd 4695 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendctrl, ppd->p_sendctrl); ppd 4731 drivers/infiniband/hw/qib/qib_iba7322.c static u64 qib_portcntr_7322(struct qib_pportdata *ppd, u32 reg) ppd 4733 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 4781 drivers/infiniband/hw/qib/qib_iba7322.c qib_devinfo(ppd->dd->pcidev, ppd 4795 drivers/infiniband/hw/qib/qib_iba7322.c if (!rcd || rcd->ppd != ppd) ppd 4810 drivers/infiniband/hw/qib/qib_iba7322.c ret = qib_read_kreg_port(ppd, creg); ppd 4819 drivers/infiniband/hw/qib/qib_iba7322.c ret = read_7322_creg_port(ppd, creg); ppd 4821 drivers/infiniband/hw/qib/qib_iba7322.c ret = read_7322_creg32_port(ppd, creg); ppd 4823 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibdeltainprog) ppd 4824 drivers/infiniband/hw/qib/qib_iba7322.c ret -= ret - ppd->cpspec->ibsymsnap; ppd 4825 drivers/infiniband/hw/qib/qib_iba7322.c ret -= ppd->cpspec->ibsymdelta; ppd 4827 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibdeltainprog) ppd 4828 drivers/infiniband/hw/qib/qib_iba7322.c ret -= ret - ppd->cpspec->iblnkerrsnap; ppd 4829 drivers/infiniband/hw/qib/qib_iba7322.c ret -= ppd->cpspec->iblnkerrdelta; ppd 4831 drivers/infiniband/hw/qib/qib_iba7322.c ret -= ppd->cpspec->ibmalfdelta; ppd 4833 drivers/infiniband/hw/qib/qib_iba7322.c ret += ppd->cpspec->iblnkdowndelta; ppd 5070 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = &dd->pport[port]; ppd 5071 drivers/infiniband/hw/qib/qib_iba7322.c u64 *cntr = ppd->cpspec->portcntrs; ppd 5083 drivers/infiniband/hw/qib/qib_iba7322.c *cntr++ = qib_portcntr_7322(ppd, ppd 5087 drivers/infiniband/hw/qib/qib_iba7322.c *cntr++ = read_7322_creg_port(ppd, ppd 5091 drivers/infiniband/hw/qib/qib_iba7322.c *cntr++ = read_7322_creg32_port(ppd, ppd 5113 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 5119 drivers/infiniband/hw/qib/qib_iba7322.c ppd = dd->pport + pidx; ppd 5126 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->link_speed_supported || !(dd->flags & QIB_INITTED) ppd 5135 drivers/infiniband/hw/qib/qib_iba7322.c traffic_wds = qib_portcntr_7322(ppd, QIBPORTCNTR_WORDRCV) + ppd 5136 drivers/infiniband/hw/qib/qib_iba7322.c qib_portcntr_7322(ppd, QIBPORTCNTR_WORDSEND); ppd 5137 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->dd->eep_st_lock, flags); ppd 5138 drivers/infiniband/hw/qib/qib_iba7322.c traffic_wds -= ppd->dd->traffic_wds; ppd 5139 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->traffic_wds += traffic_wds; ppd 5140 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->dd->eep_st_lock, flags); ppd 5141 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->qdr_dfe_on && (ppd->link_speed_active & ppd 5143 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->lflags & (QIBL_LINKINIT | QIBL_LINKARMED | ppd 5145 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_time && ppd 5146 drivers/infiniband/hw/qib/qib_iba7322.c time_is_before_jiffies(ppd->cpspec->qdr_dfe_time)) { ppd 5147 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_on = 0; ppd 5149 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(2), ppd 5150 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->cspec->r1 ? ppd 5153 drivers/infiniband/hw/qib/qib_iba7322.c force_h1(ppd); ppd 5185 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_mini_pcs_reset(struct qib_pportdata *ppd) ppd 5188 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 5193 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_ib_pcsconfig); ppd 5196 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 5197 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a & ppd 5200 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ib_pcsconfig, val | reset_bits); ppd 5202 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ib_pcsconfig, val & ~reset_bits); ppd 5203 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a); ppd 5218 drivers/infiniband/hw/qib/qib_iba7322.c static void autoneg_7322_sendpkt(struct qib_pportdata *ppd, u32 *hdr, ppd 5225 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 5229 drivers/infiniband/hw/qib/qib_iba7322.c control = qib_7322_setpbc_control(ppd, len, 0, 15); ppd 5231 drivers/infiniband/hw/qib/qib_iba7322.c while (!(piobuf = qib_7322_getsendbuf(ppd, pbc, &pnum))) { ppd 5257 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_autoneg_7322_send(struct qib_pportdata *ppd, int which) ppd 5259 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 5293 drivers/infiniband/hw/qib/qib_iba7322.c autoneg_7322_sendpkt(ppd, hdr, dcnt, data); ppd 5296 drivers/infiniband/hw/qib/qib_iba7322.c autoneg_7322_sendpkt(ppd, hdr, dcnt, data); ppd 5315 drivers/infiniband/hw/qib/qib_iba7322.c static void set_7322_ibspeed_fast(struct qib_pportdata *ppd, u32 speed) ppd 5319 drivers/infiniband/hw/qib/qib_iba7322.c newctrlb = ppd->cpspec->ibcctrl_b & ~(IBA7322_IBC_SPEED_MASK | ppd 5333 drivers/infiniband/hw/qib/qib_iba7322.c if (newctrlb == ppd->cpspec->ibcctrl_b) ppd 5336 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b = newctrlb; ppd 5337 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_b, ppd->cpspec->ibcctrl_b); ppd 5338 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 5347 drivers/infiniband/hw/qib/qib_iba7322.c static void try_7322_autoneg(struct qib_pportdata *ppd) ppd 5351 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5352 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags |= QIBL_IB_AUTONEG_INPROG; ppd 5353 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5354 drivers/infiniband/hw/qib/qib_iba7322.c qib_autoneg_7322_send(ppd, 0); ppd 5355 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, QIB_IB_DDR); ppd 5356 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 5358 drivers/infiniband/hw/qib/qib_iba7322.c queue_delayed_work(ib_wq, &ppd->cpspec->autoneg_work, ppd 5368 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 5372 drivers/infiniband/hw/qib/qib_iba7322.c ppd = container_of(work, struct qib_chippport_specific, ppd 5373 drivers/infiniband/hw/qib/qib_iba7322.c autoneg_work.work)->ppd; ppd 5380 drivers/infiniband/hw/qib/qib_iba7322.c if (SYM_FIELD(ppd->lastibcstat, IBCStatusA_0, LinkState) ppd 5382 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_linkstate(ppd, QIB_IB_LINKDOWN_DISABLE); ppd 5388 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 5392 drivers/infiniband/hw/qib/qib_iba7322.c if (wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 5393 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 5396 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 5399 drivers/infiniband/hw/qib/qib_iba7322.c if (wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 5400 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 5403 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 5405 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, QIB_IB_SDR); ppd 5411 drivers/infiniband/hw/qib/qib_iba7322.c wait_event_timeout(ppd->cpspec->autoneg_wait, ppd 5412 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG), ppd 5415 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->lflags & QIBL_IB_AUTONEG_INPROG) { ppd 5416 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5417 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_AUTONEG_INPROG; ppd 5418 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->autoneg_tries == AUTONEG_TRIES) { ppd 5419 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags |= QIBL_IB_AUTONEG_FAILED; ppd 5420 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->autoneg_tries = 0; ppd 5422 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5423 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, ppd->link_speed_enabled); ppd 5431 drivers/infiniband/hw/qib/qib_iba7322.c static void try_7322_ipg(struct qib_pportdata *ppd) ppd 5433 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 5480 drivers/infiniband/hw/qib/qib_iba7322.c delay = 2 << ppd->cpspec->ipg_tries; ppd 5481 drivers/infiniband/hw/qib/qib_iba7322.c queue_delayed_work(ib_wq, &ppd->cpspec->ipg_work, ppd 5491 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 5493 drivers/infiniband/hw/qib/qib_iba7322.c ppd = container_of(work, struct qib_chippport_specific, ppd 5494 drivers/infiniband/hw/qib/qib_iba7322.c ipg_work.work)->ppd; ppd 5495 drivers/infiniband/hw/qib/qib_iba7322.c if ((ppd->lflags & (QIBL_LINKINIT | QIBL_LINKARMED | QIBL_LINKACTIVE)) ppd 5496 drivers/infiniband/hw/qib/qib_iba7322.c && ++ppd->cpspec->ipg_tries <= 10) ppd 5497 drivers/infiniband/hw/qib/qib_iba7322.c try_7322_ipg(ppd); ppd 5531 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_ib_updown(struct qib_pportdata *ppd, int ibup, u64 ibcs) ppd 5537 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5538 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_FORCE_NOTIFY; ppd 5539 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5543 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active = QIB_IB_QDR; ppd 5546 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active = QIB_IB_DDR; ppd 5549 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active = QIB_IB_SDR; ppd 5553 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_active = IB_WIDTH_4X; ppd 5556 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_active = IB_WIDTH_1X; ppd 5557 drivers/infiniband/hw/qib/qib_iba7322.c ppd->delay_mult = ib_rate_to_delay[mult_to_ib_rate(mult)]; ppd 5564 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ipg_tries = 0; ppd 5565 drivers/infiniband/hw/qib/qib_iba7322.c clr = qib_read_kreg_port(ppd, krp_ibcstatus_b) & ppd 5569 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcstatus_b, clr); ppd 5570 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->lflags & (QIBL_IB_AUTONEG_FAILED | ppd 5572 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, ppd->link_speed_enabled); ppd 5573 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) { ppd 5575 drivers/infiniband/hw/qib/qib_iba7322.c &ppd->cpspec->qsfp_data; ppd 5577 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_tx_deemph_override, ppd 5580 drivers/infiniband/hw/qib/qib_iba7322.c qib_cancel_sends(ppd); ppd 5582 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 5585 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->flags & QIB_HAS_QSFP) { ppd 5589 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 5590 drivers/infiniband/hw/qib/qib_iba7322.c if (__qib_sdma_running(ppd)) ppd 5591 drivers/infiniband/hw/qib/qib_iba7322.c __qib_sdma_process_event(ppd, ppd 5593 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 5595 drivers/infiniband/hw/qib/qib_iba7322.c clr = read_7322_creg32_port(ppd, crp_iblinkdown); ppd 5596 drivers/infiniband/hw/qib/qib_iba7322.c if (clr == ppd->cpspec->iblnkdownsnap) ppd 5597 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkdowndelta++; ppd 5600 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & (QIBL_IB_AUTONEG_FAILED | ppd 5602 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active == QIB_IB_SDR && ppd 5603 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->link_speed_enabled & QIB_IB_DDR) ppd 5604 drivers/infiniband/hw/qib/qib_iba7322.c && ppd->cpspec->autoneg_tries < AUTONEG_TRIES) { ppd 5606 drivers/infiniband/hw/qib/qib_iba7322.c ++ppd->cpspec->autoneg_tries; ppd 5607 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->ibdeltainprog) { ppd 5608 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog = 1; ppd 5609 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymdelta += ppd 5610 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, ppd 5612 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymsnap; ppd 5613 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrdelta += ppd 5614 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, ppd 5616 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrsnap; ppd 5618 drivers/infiniband/hw/qib/qib_iba7322.c try_7322_autoneg(ppd); ppd 5620 drivers/infiniband/hw/qib/qib_iba7322.c } else if ((ppd->lflags & QIBL_IB_AUTONEG_INPROG) && ppd 5621 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active == QIB_IB_SDR) { ppd 5622 drivers/infiniband/hw/qib/qib_iba7322.c qib_autoneg_7322_send(ppd, 1); ppd 5623 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, QIB_IB_DDR); ppd 5624 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_mini_pcs_reset(ppd); ppd 5627 drivers/infiniband/hw/qib/qib_iba7322.c } else if ((ppd->lflags & QIBL_IB_AUTONEG_INPROG) && ppd 5628 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->link_speed_active & QIB_IB_DDR)) { ppd 5629 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5630 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~(QIBL_IB_AUTONEG_INPROG | ppd 5632 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5633 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->autoneg_tries = 0; ppd 5635 drivers/infiniband/hw/qib/qib_iba7322.c set_7322_ibspeed_fast(ppd, ppd->link_speed_enabled); ppd 5636 drivers/infiniband/hw/qib/qib_iba7322.c wake_up(&ppd->cpspec->autoneg_wait); ppd 5638 drivers/infiniband/hw/qib/qib_iba7322.c } else if (ppd->lflags & QIBL_IB_AUTONEG_FAILED) { ppd 5645 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5646 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_IB_AUTONEG_FAILED; ppd 5647 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5648 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_b |= IBA7322_IBC_IBTA_1_2_MASK; ppd 5651 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) { ppd 5653 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1 && ppd->cpspec->ipg_tries <= 10) ppd 5654 drivers/infiniband/hw/qib/qib_iba7322.c try_7322_ipg(ppd); ppd 5655 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->recovery_init) ppd 5656 drivers/infiniband/hw/qib/qib_iba7322.c setup_7322_link_recovery(ppd, 0); ppd 5657 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_time = jiffies + ppd 5660 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfusesnap = 0; ppd 5661 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibmalfsnap = read_7322_creg32_port(ppd, ppd 5665 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkdownsnap = ppd 5666 drivers/infiniband/hw/qib/qib_iba7322.c read_7322_creg32_port(ppd, crp_iblinkdown); ppd 5667 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->cpspec->ibdeltainprog) { ppd 5668 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog = 0; ppd 5669 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymdelta += read_7322_creg32_port(ppd, ppd 5670 drivers/infiniband/hw/qib/qib_iba7322.c crp_ibsymbolerr) - ppd->cpspec->ibsymsnap; ppd 5671 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrdelta += read_7322_creg32_port(ppd, ppd 5672 drivers/infiniband/hw/qib/qib_iba7322.c crp_iblinkerrrecov) - ppd->cpspec->iblnkerrsnap; ppd 5675 drivers/infiniband/hw/qib/qib_iba7322.c !ppd->cpspec->ibdeltainprog && ppd 5676 drivers/infiniband/hw/qib/qib_iba7322.c !(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) { ppd 5677 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibdeltainprog = 1; ppd 5678 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd, ppd 5680 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->iblnkerrsnap = read_7322_creg32_port(ppd, ppd 5685 drivers/infiniband/hw/qib/qib_iba7322.c qib_setup_7322_setextled(ppd, ibup); ppd 5844 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = NULL; ppd 5857 drivers/infiniband/hw/qib/qib_iba7322.c ppd = dd->pport + pidx; ppd 5858 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->kpregbase) ppd 5861 drivers/infiniband/hw/qib/qib_iba7322.c psptr = ppd->cpspec->kpregbase + krp_sendctrl; ppd 5869 drivers/infiniband/hw/qib/qib_iba7322.c ppd = NULL; ppd 5879 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd || (mask & all_bits) != all_bits) { ppd 5904 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd) { ppd 5905 drivers/infiniband/hw/qib/qib_iba7322.c sval = ppd->p_sendctrl & ~mask; ppd 5907 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl = sval; ppd 5933 drivers/infiniband/hw/qib/qib_iba7322.c static void init_txdds_table(struct qib_pportdata *ppd, int override); ppd 5938 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 5945 drivers/infiniband/hw/qib/qib_iba7322.c ppd = qd->ppd; ppd 5952 drivers/infiniband/hw/qib/qib_iba7322.c if (!qib_qsfp_mod_present(ppd)) { ppd 5953 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qsfp_data.modpresent = 0; ppd 5955 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, ppd 5957 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 5958 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags &= ~QIBL_LINKV; ppd 5959 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 5972 drivers/infiniband/hw/qib/qib_iba7322.c ret = qib_refresh_qsfp_cache(ppd, &qd->cache); ppd 5980 drivers/infiniband/hw/qib/qib_iba7322.c if (!ret && !ppd->dd->cspec->r1) { ppd 5990 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7)); ppd 5997 drivers/infiniband/hw/qib/qib_iba7322.c init_txdds_table(ppd, 0); ppd 6002 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->cpspec->qsfp_data.modpresent && ppd 6003 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->lflags & (QIBL_LINKV | QIBL_IB_LINK_DISABLED))) { ppd 6004 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qsfp_data.modpresent = 1; ppd 6005 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, ppd 6007 drivers/infiniband/hw/qib/qib_iba7322.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 6008 drivers/infiniband/hw/qib/qib_iba7322.c ppd->lflags |= QIBL_LINKV; ppd 6009 drivers/infiniband/hw/qib/qib_iba7322.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 6018 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_init_7322_qsfp(struct qib_pportdata *ppd) ppd 6021 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_qsfp_data *qd = &ppd->cpspec->qsfp_data; ppd 6022 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 6025 drivers/infiniband/hw/qib/qib_iba7322.c mod_prs_bit <<= (QSFP_GPIO_PORT2_SHIFT * ppd->hw_pidx); ppd 6026 drivers/infiniband/hw/qib/qib_iba7322.c qd->ppd = ppd; ppd 6105 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = &dd->pport[pidx]; ppd 6107 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->port != port || !ppd->link_speed_supported) ppd 6109 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->no_eep = val; ppd 6111 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->h1_val = h1; ppd 6113 drivers/infiniband/hw/qib/qib_iba7322.c init_txdds_table(ppd, 1); ppd 6118 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, ppd 6203 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = dd->pport + n; ppd 6205 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmaprioritythld, ppd 6209 drivers/infiniband/hw/qib/qib_iba7322.c qib_init_7322_qsfp(ppd); ppd 6231 drivers/infiniband/hw/qib/qib_iba7322.c static void write_7322_init_portregs(struct qib_pportdata *ppd) ppd 6236 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->link_speed_supported) { ppd 6239 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rxcreditvl0 + i, 0); ppd 6240 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_b, 0); ppd 6241 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 6249 drivers/infiniband/hw/qib/qib_iba7322.c val = qib_read_kreg_port(ppd, krp_ibsdtestiftx); ppd 6251 drivers/infiniband/hw/qib/qib_iba7322.c val |= (u64)(ppd->vls_supported - 1) << ppd 6253 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibsdtestiftx, val); ppd 6255 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvbthqp, QIB_KD_QP); ppd 6258 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_sendcheckcontrol, IBA7322_SENDCHK_PKEY | ppd 6262 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ncmodectrl, ppd 6269 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask0, 0); ppd 6270 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask1, 0); ppd 6271 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask2, 0); ppd 6272 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1) ppd 6273 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_sendctrl |= SYM_MASK(SendCtrl_0, ForceCreditUpToDate); ppd 6285 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 6300 drivers/infiniband/hw/qib/qib_iba7322.c ppd = &dd->pport[pidx]; ppd 6304 drivers/infiniband/hw/qib/qib_iba7322.c ppd->p_rcvctrl |= SYM_MASK(RcvCtrl_0, RcvQPMapEnable); ppd 6322 drivers/infiniband/hw/qib/qib_iba7322.c ctxt = ppd->hw_pidx; ppd 6326 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, regno, val); ppd 6331 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, regno, val); ppd 6369 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd; ppd 6376 drivers/infiniband/hw/qib/qib_iba7322.c ppd = (struct qib_pportdata *)(dd + 1); ppd 6377 drivers/infiniband/hw/qib/qib_iba7322.c dd->pport = ppd; ppd 6378 drivers/infiniband/hw/qib/qib_iba7322.c ppd[0].dd = dd; ppd 6379 drivers/infiniband/hw/qib/qib_iba7322.c ppd[1].dd = dd; ppd 6381 drivers/infiniband/hw/qib/qib_iba7322.c dd->cspec = (struct qib_chip_specific *)(ppd + 2); ppd 6383 drivers/infiniband/hw/qib/qib_iba7322.c ppd[0].cpspec = (struct qib_chippport_specific *)(dd->cspec + 1); ppd 6384 drivers/infiniband/hw/qib/qib_iba7322.c ppd[1].cpspec = &ppd[0].cpspec[1]; ppd 6385 drivers/infiniband/hw/qib/qib_iba7322.c ppd[0].cpspec->ppd = &ppd[0]; /* for autoneg_7322_work() */ ppd 6386 drivers/infiniband/hw/qib/qib_iba7322.c ppd[1].cpspec->ppd = &ppd[1]; /* for autoneg_7322_work() */ ppd 6428 drivers/infiniband/hw/qib/qib_iba7322.c ppd = dd->pport; ppd 6466 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_chippport_specific *cp = ppd->cpspec; ppd 6468 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_supported = features & PORT_SPD_CAP; ppd 6470 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->link_speed_supported) { ppd 6475 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvctrl, 0); ppd 6476 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, 0); ppd 6477 drivers/infiniband/hw/qib/qib_iba7322.c ppd[0] = ppd[1]; ppd 6491 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_rcvctrl, 0); ppd 6492 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, 0); ppd 6509 drivers/infiniband/hw/qib/qib_iba7322.c ret = qib_init_pportdata(ppd, dd, pidx, dd->num_pports); ppd 6515 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_supported = IB_WIDTH_1X | IB_WIDTH_4X; ppd 6516 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_enabled = IB_WIDTH_4X; ppd 6517 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_enabled = ppd->link_speed_supported; ppd 6522 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_width_active = IB_WIDTH_4X; ppd 6523 drivers/infiniband/hw/qib/qib_iba7322.c ppd->link_speed_active = QIB_IB_SDR; ppd 6524 drivers/infiniband/hw/qib/qib_iba7322.c ppd->delay_mult = ib_rate_to_delay[IB_RATE_10_GBPS]; ppd 6527 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_supported = IB_VL_VL0; ppd 6530 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_supported = IB_VL_VL0_1; ppd 6539 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_supported = IB_VL_VL0_3; ppd 6543 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_supported = IB_VL_VL0_7; ppd 6548 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_supported = IB_VL_VL0_3; ppd 6553 drivers/infiniband/hw/qib/qib_iba7322.c ppd->vls_operational = ppd->vls_supported; ppd 6558 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1) ppd 6570 drivers/infiniband/hw/qib/qib_iba7322.c dd->unit, ppd->port); ppd 6576 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->no_eep = IS_QMH(dd) ? ppd 6583 drivers/infiniband/hw/qib/qib_iba7322.c write_7322_init_portregs(ppd); ppd 6587 drivers/infiniband/hw/qib/qib_iba7322.c ppd++; ppd 6706 drivers/infiniband/hw/qib/qib_iba7322.c static u32 __iomem *qib_7322_getsendbuf(struct qib_pportdata *ppd, u64 pbc, ppd 6710 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 6714 drivers/infiniband/hw/qib/qib_iba7322.c first = dd->piobcnt2k + dd->piobcnt4k + ppd->hw_pidx; ppd 6726 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_set_cntr_7322_sample(struct qib_pportdata *ppd, u32 intv, ppd 6729 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_psinterval, intv); ppd 6730 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_psstart, start); ppd 6736 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_sdma_set_7322_desc_cnt(struct qib_pportdata *ppd, unsigned cnt) ppd 6738 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmadesccnt, cnt); ppd 6744 drivers/infiniband/hw/qib/qib_iba7322.c static void dump_sdma_7322_state(struct qib_pportdata *ppd) ppd 6748 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmastatus); ppd 6749 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6752 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_sendctrl); ppd 6753 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6756 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmabase); ppd 6757 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6760 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmabufmask0); ppd 6761 drivers/infiniband/hw/qib/qib_iba7322.c reg1 = qib_read_kreg_port(ppd, krp_senddmabufmask1); ppd 6762 drivers/infiniband/hw/qib/qib_iba7322.c reg2 = qib_read_kreg_port(ppd, krp_senddmabufmask2); ppd 6763 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6768 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmabuf_use0); ppd 6769 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabuf_use0, reg); ppd 6770 drivers/infiniband/hw/qib/qib_iba7322.c reg1 = qib_read_kreg_port(ppd, krp_senddmabuf_use1); ppd 6771 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabuf_use0, reg1); ppd 6772 drivers/infiniband/hw/qib/qib_iba7322.c reg2 = qib_read_kreg_port(ppd, krp_senddmabuf_use2); ppd 6773 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabuf_use0, reg2); ppd 6775 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6778 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmabuf_use0); ppd 6779 drivers/infiniband/hw/qib/qib_iba7322.c reg1 = qib_read_kreg_port(ppd, krp_senddmabuf_use1); ppd 6780 drivers/infiniband/hw/qib/qib_iba7322.c reg2 = qib_read_kreg_port(ppd, krp_senddmabuf_use2); ppd 6782 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6786 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmatail); ppd 6787 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6790 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmahead); ppd 6791 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6794 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmaheadaddr); ppd 6795 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6798 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmalengen); ppd 6799 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6802 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmadesccnt); ppd 6803 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6806 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmaidlecnt); ppd 6807 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6810 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmaprioritythld); ppd 6811 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6814 drivers/infiniband/hw/qib/qib_iba7322.c reg = qib_read_kreg_port(ppd, krp_senddmareloadcnt); ppd 6815 drivers/infiniband/hw/qib/qib_iba7322.c qib_dev_porterr(ppd->dd, ppd->port, ppd 6818 drivers/infiniband/hw/qib/qib_iba7322.c dump_sdma_state(ppd); ppd 6868 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_sdma_init_early(struct qib_pportdata *ppd) ppd 6870 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_state.set_state_action = sdma_7322_action_table; ppd 6873 drivers/infiniband/hw/qib/qib_iba7322.c static int init_sdma_7322_regs(struct qib_pportdata *ppd) ppd 6875 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 6880 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabase, ppd->sdma_descq_phys); ppd 6881 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_7322_setlengen(ppd); ppd 6882 drivers/infiniband/hw/qib/qib_iba7322.c qib_sdma_update_7322_tail(ppd, 0); /* Set SendDmaTail */ ppd 6883 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmareloadcnt, sdma_idle_cnt); ppd 6884 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmadesccnt, 0); ppd 6885 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmaheadaddr, ppd->sdma_head_phys); ppd 6892 drivers/infiniband/hw/qib/qib_iba7322.c ((dd->num_pports == 1 || ppd->port == 2) ? n : ppd 6896 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_state.first_sendbuf = erstbuf; ppd 6897 drivers/infiniband/hw/qib/qib_iba7322.c ppd->sdma_state.last_sendbuf = lastbuf; ppd 6904 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask0, senddmabufmask[0]); ppd 6905 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask1, senddmabufmask[1]); ppd 6906 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_senddmabufmask2, senddmabufmask[2]); ppd 6911 drivers/infiniband/hw/qib/qib_iba7322.c static u16 qib_sdma_7322_gethead(struct qib_pportdata *ppd) ppd 6913 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 6921 drivers/infiniband/hw/qib/qib_iba7322.c use_dmahead = __qib_sdma_running(ppd) && ppd 6925 drivers/infiniband/hw/qib/qib_iba7322.c (u16) le64_to_cpu(*ppd->sdma_head_dma) : ppd 6926 drivers/infiniband/hw/qib/qib_iba7322.c (u16) qib_read_kreg_port(ppd, krp_senddmahead); ppd 6928 drivers/infiniband/hw/qib/qib_iba7322.c swhead = ppd->sdma_descq_head; ppd 6929 drivers/infiniband/hw/qib/qib_iba7322.c swtail = ppd->sdma_descq_tail; ppd 6930 drivers/infiniband/hw/qib/qib_iba7322.c cnt = ppd->sdma_descq_cnt; ppd 6956 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_sdma_7322_busy(struct qib_pportdata *ppd) ppd 6958 drivers/infiniband/hw/qib/qib_iba7322.c u64 hwstatus = qib_read_kreg_port(ppd, krp_senddmastatus); ppd 6972 drivers/infiniband/hw/qib/qib_iba7322.c static u32 qib_7322_setpbc_control(struct qib_pportdata *ppd, u32 plen, ppd 6975 drivers/infiniband/hw/qib/qib_iba7322.c u8 snd_mult = ppd->delay_mult; ppd 6986 drivers/infiniband/hw/qib/qib_iba7322.c ret |= ((u32)(ppd->hw_pidx)) << PBC_PORT_SEL_LSB; ppd 7345 drivers/infiniband/hw/qib/qib_iba7322.c static void set_txdds(struct qib_pportdata *ppd, int ridx, ppd 7348 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 7359 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->hw_pidx) ppd 7368 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(ppd->dd, kr_scratch, 0); ppd 7616 drivers/infiniband/hw/qib/qib_iba7322.c static void find_best_ent(struct qib_pportdata *ppd, ppd 7621 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_qsfp_cache *qd = &ppd->cpspec->qsfp_data.cache; ppd 7641 drivers/infiniband/hw/qib/qib_iba7322.c *sdr_dds = txdds_sdr + ppd->dd->board_atten; ppd 7642 drivers/infiniband/hw/qib/qib_iba7322.c *ddr_dds = txdds_ddr + ppd->dd->board_atten; ppd 7643 drivers/infiniband/hw/qib/qib_iba7322.c *qdr_dds = txdds_qdr + ppd->dd->board_atten; ppd 7653 drivers/infiniband/hw/qib/qib_iba7322.c } else if (ppd->cpspec->no_eep < TXDDS_TABLE_SZ) { ppd 7660 drivers/infiniband/hw/qib/qib_iba7322.c idx = ppd->cpspec->no_eep; ppd 7664 drivers/infiniband/hw/qib/qib_iba7322.c } else if (ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)) { ppd 7666 drivers/infiniband/hw/qib/qib_iba7322.c idx = ppd->cpspec->no_eep - TXDDS_TABLE_SZ; ppd 7670 drivers/infiniband/hw/qib/qib_iba7322.c } else if ((IS_QME(ppd->dd) || IS_QMH(ppd->dd)) && ppd 7671 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ + ppd 7673 drivers/infiniband/hw/qib/qib_iba7322.c idx = ppd->cpspec->no_eep - (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ); ppd 7675 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port, idx); ppd 7687 drivers/infiniband/hw/qib/qib_iba7322.c static void init_txdds_table(struct qib_pportdata *ppd, int override) ppd 7694 drivers/infiniband/hw/qib/qib_iba7322.c find_best_ent(ppd, &sdr_dds, &ddr_dds, &qdr_dds, override); ppd 7697 drivers/infiniband/hw/qib/qib_iba7322.c if (!(ppd->dd->flags & QIB_HAS_QSFP) || override) ppd 7701 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, 0, sdr_dds); ppd 7702 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, TXDDS_TABLE_SZ, ddr_dds); ppd 7703 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, 2 * TXDDS_TABLE_SZ, qdr_dds); ppd 7704 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->lflags & (QIBL_LINKINIT | QIBL_LINKARMED | ppd 7706 drivers/infiniband/hw/qib/qib_iba7322.c dds = (struct txdds_ent *)(ppd->link_speed_active == ppd 7708 drivers/infiniband/hw/qib/qib_iba7322.c (ppd->link_speed_active == ppd 7710 drivers/infiniband/hw/qib/qib_iba7322.c write_tx_serdes_param(ppd, dds); ppd 7715 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, idx, single_ent ? sdr_dds : txdds_sdr + idx); ppd 7716 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, idx + TXDDS_TABLE_SZ, ppd 7718 drivers/infiniband/hw/qib/qib_iba7322.c set_txdds(ppd, idx + 2 * TXDDS_TABLE_SZ, ppd 7808 drivers/infiniband/hw/qib/qib_iba7322.c static void ibsd_wr_allchans(struct qib_pportdata *ppd, int addr, unsigned data, ppd 7811 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 7815 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr, ppd 7817 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), addr, ppd 7822 drivers/infiniband/hw/qib/qib_iba7322.c static void serdes_7322_los_enable(struct qib_pportdata *ppd, int enable) ppd 7824 drivers/infiniband/hw/qib/qib_iba7322.c u64 data = qib_read_kreg_port(ppd, krp_serdesctrl); ppd 7829 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port); ppd 7833 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->unit, ppd->port); ppd 7836 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_serdesctrl, data); ppd 7839 drivers/infiniband/hw/qib/qib_iba7322.c static int serdes_7322_init(struct qib_pportdata *ppd) ppd 7843 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->dd->cspec->r1) ppd 7844 drivers/infiniband/hw/qib/qib_iba7322.c ret = serdes_7322_init_old(ppd); ppd 7846 drivers/infiniband/hw/qib/qib_iba7322.c ret = serdes_7322_init_new(ppd); ppd 7850 drivers/infiniband/hw/qib/qib_iba7322.c static int serdes_7322_init_old(struct qib_pportdata *ppd) ppd 7858 drivers/infiniband/hw/qib/qib_iba7322.c init_txdds_table(ppd, 0); ppd 7861 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_tx_deemph_override, ppd 7867 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, 0, BMASK(11, 9)); ppd 7870 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 11, (1 << 11), BMASK(12, 11)); ppd 7872 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (1 << 6), (1 << 6)); ppd 7875 drivers/infiniband/hw/qib/qib_iba7322.c le_val = IS_QME(ppd->dd) ? LE2_QME : LE2_DEFAULT; ppd 7876 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (le_val << 7), BMASK(9, 7)); ppd 7879 drivers/infiniband/hw/qib/qib_iba7322.c le_val = IS_QME(ppd->dd) ? 0 : 1; ppd 7880 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (le_val << 5), (1 << 5)); ppd 7883 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 0 << 14, 1 << 14); ppd 7886 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 5, (0 << 8), BMASK(9, 8)); ppd 7890 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 5, 8 << 11, BMASK(14, 11)); ppd 7891 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 7, 8 << 4, BMASK(7, 4)); ppd 7892 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 8, 8 << 11, BMASK(14, 11)); ppd 7893 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 8 << 4, BMASK(7, 4)); ppd 7896 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 6, 4 << 0, BMASK(3, 0)); ppd 7897 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 7, 4 << 8, BMASK(11, 8)); ppd 7898 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 9, 4 << 0, BMASK(3, 0)); ppd 7899 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 4 << 8, BMASK(11, 8)); ppd 7902 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 9, 1 << 15, 1 << 15); ppd 7905 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 14, (1 << 3), BMASK(5, 3)); /* QDR */ ppd 7906 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 20, (2 << 10), BMASK(12, 10)); /* DDR */ ppd 7907 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 20, (4 << 13), BMASK(15, 13)); /* SDR */ ppd 7909 drivers/infiniband/hw/qib/qib_iba7322.c serdes_7322_los_enable(ppd, 1); ppd 7912 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 9, 0 << 15, 1 << 15); ppd 7915 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 16, 0 << 0, BMASK(1, 0)); ppd 7918 drivers/infiniband/hw/qib/qib_iba7322.c le_val = (ppd->dd->cspec->r1 || IS_QME(ppd->dd)) ? 0xb6c0 : 0x6bac; ppd 7919 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 21, le_val, 0xfffe); ppd 7925 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(0), 0ULL); ppd 7926 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(1), 0ULL); ppd 7927 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(2), ppd 7928 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->cspec->r1 ? ppd 7930 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_on = 1; ppd 7933 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 38, 0 << 10, 1 << 10); ppd 7936 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 1 << 4, 1 << 4); ppd 7938 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1) { ppd 7939 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 1 << 12, 1 << 12); ppd 7940 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 2 << 8, 0x0f << 8); ppd 7944 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, 15 << 5, BMASK(8, 5)); ppd 7949 drivers/infiniband/hw/qib/qib_iba7322.c static int serdes_7322_init_new(struct qib_pportdata *ppd) ppd 7956 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 0 << 14, 1 << 14); ppd 7959 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_tx_deemph_override, ppd 7966 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 1, 0, BMASK(9, 1)); ppd 7968 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, 0, BMASK(5, 5)); ppd 7970 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 1, 0, BMASK(15, 15)); ppd 7972 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, 0, BMASK(6, 6)); ppd 7974 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 5, 0, BMASK(0, 0)); ppd 7976 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 0, BMASK(12, 12)); ppd 7978 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, 0, BMASK(3, 3)); ppd 7980 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, 0, BMASK(4, 4)); ppd 7982 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, 0, BMASK(13, 13)); ppd 7984 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 4, 0, BMASK(10, 10)); ppd 7986 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 0, BMASK(4, 4)); ppd 7988 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, (1 << 15), BMASK(15, 15)); ppd 7990 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 5, 0, BMASK(9, 8)); ppd 7992 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, (1 << 5), BMASK(5, 5)); ppd 7994 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, (4 << 12), BMASK(14, 12)); ppd 7996 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 16, 0, BMASK(1, 0)); ppd 7998 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1) { ppd 7999 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 1 << 12, BMASK(12, 12)); ppd 8000 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, 2 << 8, BMASK(11, 8)); ppd 8002 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 19, (3 << 11), BMASK(13, 11)); ppd 8013 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 0, 0, BMASK(15, 13)); ppd 8016 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 0, (1 << 14), BMASK(14, 14)); ppd 8019 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 0, (1 << 13), BMASK(13, 13)); ppd 8024 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 5, 8 << 11, BMASK(14, 11)); ppd 8025 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 7, 8 << 4, BMASK(7, 4)); ppd 8026 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 8, 8 << 11, BMASK(14, 11)); ppd 8027 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 8 << 4, BMASK(7, 4)); ppd 8030 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 6, 4 << 0, BMASK(3, 0)); ppd 8031 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 7, 4 << 8, BMASK(11, 8)); ppd 8032 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 9, 4 << 0, BMASK(3, 0)); ppd 8033 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 10, 4 << 8, BMASK(11, 8)); ppd 8036 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), 5, 9, 1 << 15, 1 << 15); ppd 8039 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 14, (1 << 3), BMASK(5, 3)); /* QDR */ ppd 8040 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 20, (2 << 10), BMASK(12, 10)); /* DDR */ ppd 8041 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 20, (4 << 13), BMASK(15, 13)); /* SDR */ ppd 8044 drivers/infiniband/hw/qib/qib_iba7322.c serdes_7322_los_enable(ppd, 1); ppd 8046 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 38, 0 << 10, 1 << 10); ppd 8050 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 15, 1, BMASK(0, 0)); ppd 8052 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, (1 << 4), BMASK(4, 4)); ppd 8055 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 4, (1 << 10), BMASK(10, 10)); ppd 8060 drivers/infiniband/hw/qib/qib_iba7322.c rxcaldone = ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), ppd 8070 drivers/infiniband/hw/qib/qib_iba7322.c IBSD(ppd->hw_pidx), chan_done); ppd 8073 drivers/infiniband/hw/qib/qib_iba7322.c rxcaldone = ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), ppd 8078 drivers/infiniband/hw/qib/qib_iba7322.c IBSD(ppd->hw_pidx), chan); ppd 8083 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 4, 0, BMASK(10, 10)); ppd 8088 drivers/infiniband/hw/qib/qib_iba7322.c le_val = IS_QME(ppd->dd) ? LE2_QME : LE2_DEFAULT; ppd 8089 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (le_val << 7), BMASK(9, 7)); ppd 8091 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 3, (7 << 5), BMASK(7, 5)); ppd 8093 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (1 << 6), BMASK(6, 6)); ppd 8096 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 1, 1, BMASK(9, 1)); ppd 8098 drivers/infiniband/hw/qib/qib_iba7322.c le_val = (ppd->dd->cspec->r1 || IS_QME(ppd->dd)) ? 0xb6c0 : 0x6bac; ppd 8099 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 21, le_val, 0xfffe); ppd 8101 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 5, 0, BMASK(0, 0)); ppd 8104 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, (15 << 5), BMASK(8, 5)); ppd 8106 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, (1 << 4), BMASK(4, 4)); ppd 8108 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, 0, BMASK(11, 9)); ppd 8110 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 2, (1 << 3), BMASK(3, 3)); ppd 8116 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(0), 0ULL); ppd 8117 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(1), 0ULL); ppd 8118 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_static_adapt_dis(2), ppd 8119 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->cspec->r1 ? ppd 8121 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_dfe_on = 1; ppd 8123 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 13, (0 << 5), (1 << 5)); ppd 8125 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 1, (0 << 15), BMASK(15, 15)); ppd 8128 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, (1 << 12), BMASK(12, 12)); ppd 8130 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, (1 << 13), BMASK(13, 13)); ppd 8132 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 11, (1 << 11), BMASK(12, 11)); ppd 8134 drivers/infiniband/hw/qib/qib_iba7322.c ibsd_wr_allchans(ppd, 12, (3 << 2), BMASK(3, 2)); ppd 8140 drivers/infiniband/hw/qib/qib_iba7322.c init_txdds_table(ppd, 0); ppd 8147 drivers/infiniband/hw/qib/qib_iba7322.c static void set_man_code(struct qib_pportdata *ppd, int chan, int code) ppd 8149 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8153 drivers/infiniband/hw/qib/qib_iba7322.c static void set_man_mode_h1(struct qib_pportdata *ppd, int chan, ppd 8157 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8160 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8165 drivers/infiniband/hw/qib/qib_iba7322.c static void clock_man(struct qib_pportdata *ppd, int chan) ppd 8167 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8169 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8171 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8173 drivers/infiniband/hw/qib/qib_iba7322.c ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), (chan + (chan >> 1)), ppd 8182 drivers/infiniband/hw/qib/qib_iba7322.c static void write_tx_serdes_param(struct qib_pportdata *ppd, ppd 8187 drivers/infiniband/hw/qib/qib_iba7322.c deemph = qib_read_kreg_port(ppd, krp_tx_deemph_override); ppd 8208 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_tx_deemph_override, deemph); ppd 8216 drivers/infiniband/hw/qib/qib_iba7322.c static void adj_tx_serdes(struct qib_pportdata *ppd) ppd 8221 drivers/infiniband/hw/qib/qib_iba7322.c find_best_ent(ppd, &sdr_dds, &ddr_dds, &qdr_dds, 1); ppd 8222 drivers/infiniband/hw/qib/qib_iba7322.c dds = (struct txdds_ent *)(ppd->link_speed_active == QIB_IB_QDR ? ppd 8223 drivers/infiniband/hw/qib/qib_iba7322.c qdr_dds : (ppd->link_speed_active == QIB_IB_DDR ? ppd 8225 drivers/infiniband/hw/qib/qib_iba7322.c write_tx_serdes_param(ppd, dds); ppd 8229 drivers/infiniband/hw/qib/qib_iba7322.c static void force_h1(struct qib_pportdata *ppd) ppd 8233 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->qdr_reforce = 0; ppd 8234 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1) ppd 8238 drivers/infiniband/hw/qib/qib_iba7322.c set_man_mode_h1(ppd, chan, 1, 0); ppd 8239 drivers/infiniband/hw/qib/qib_iba7322.c set_man_code(ppd, chan, ppd->cpspec->h1_val); ppd 8240 drivers/infiniband/hw/qib/qib_iba7322.c clock_man(ppd, chan); ppd 8241 drivers/infiniband/hw/qib/qib_iba7322.c set_man_mode_h1(ppd, chan, 0, 0); ppd 8430 drivers/infiniband/hw/qib/qib_iba7322.c static void setup_7322_link_recovery(struct qib_pportdata *ppd, u32 both) ppd 8433 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 8435 drivers/infiniband/hw/qib/qib_iba7322.c if (!ppd->dd->cspec->r1) ppd 8439 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->recovery_init = 1; ppd 8442 drivers/infiniband/hw/qib/qib_iba7322.c portsel = ppd->port == 1 ? portsel_port1 : portsel_port2; ppd 8464 drivers/infiniband/hw/qib/qib_iba7322.c static void check_7322_rxe_status(struct qib_pportdata *ppd) ppd 8466 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = ppd->dd; ppd 8482 drivers/infiniband/hw/qib/qib_iba7322.c ppd->dd->cspec->stay_in_freeze = 1; ppd 8483 drivers/infiniband/hw/qib/qib_iba7322.c qib_7322_set_intr_state(ppd->dd, 0); ppd 8489 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(ppd->dd, kr_hwerrclear, ppd 8496 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->link_speed_supported) { ppd 8497 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a &= ppd 8499 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd 8500 drivers/infiniband/hw/qib/qib_iba7322.c ppd->cpspec->ibcctrl_a); ppd 8502 drivers/infiniband/hw/qib/qib_iba7322.c if (ppd->lflags & QIBL_IB_LINK_DISABLED) ppd 8503 drivers/infiniband/hw/qib/qib_iba7322.c qib_set_ib_7322_lstate(ppd, 0, ppd 140 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 146 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + (i % dd->num_pports); ppd 148 drivers/infiniband/hw/qib/qib_init.c rcd = qib_create_ctxtdata(ppd, i, dd->assigned_node_id); ppd 165 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *qib_create_ctxtdata(struct qib_pportdata *ppd, u32 ctxt, ppd 168 drivers/infiniband/hw/qib/qib_init.c struct qib_devdata *dd = ppd->dd; ppd 175 drivers/infiniband/hw/qib/qib_init.c rcd->ppd = ppd; ppd 220 drivers/infiniband/hw/qib/qib_init.c int qib_init_pportdata(struct qib_pportdata *ppd, struct qib_devdata *dd, ppd 225 drivers/infiniband/hw/qib/qib_init.c ppd->dd = dd; ppd 226 drivers/infiniband/hw/qib/qib_init.c ppd->hw_pidx = hw_pidx; ppd 227 drivers/infiniband/hw/qib/qib_init.c ppd->port = port; /* IB port number, not index */ ppd 229 drivers/infiniband/hw/qib/qib_init.c spin_lock_init(&ppd->sdma_lock); ppd 230 drivers/infiniband/hw/qib/qib_init.c spin_lock_init(&ppd->lflags_lock); ppd 231 drivers/infiniband/hw/qib/qib_init.c spin_lock_init(&ppd->cc_shadow_lock); ppd 232 drivers/infiniband/hw/qib/qib_init.c init_waitqueue_head(&ppd->state_wait); ppd 234 drivers/infiniband/hw/qib/qib_init.c timer_setup(&ppd->symerr_clear_timer, qib_clear_symerror_on_linkup, 0); ppd 236 drivers/infiniband/hw/qib/qib_init.c ppd->qib_wq = NULL; ppd 237 drivers/infiniband/hw/qib/qib_init.c ppd->ibport_data.pmastats = ppd 239 drivers/infiniband/hw/qib/qib_init.c if (!ppd->ibport_data.pmastats) ppd 241 drivers/infiniband/hw/qib/qib_init.c ppd->ibport_data.rvp.rc_acks = alloc_percpu(u64); ppd 242 drivers/infiniband/hw/qib/qib_init.c ppd->ibport_data.rvp.rc_qacks = alloc_percpu(u64); ppd 243 drivers/infiniband/hw/qib/qib_init.c ppd->ibport_data.rvp.rc_delayed_comp = alloc_percpu(u64); ppd 244 drivers/infiniband/hw/qib/qib_init.c if (!(ppd->ibport_data.rvp.rc_acks) || ppd 245 drivers/infiniband/hw/qib/qib_init.c !(ppd->ibport_data.rvp.rc_qacks) || ppd 246 drivers/infiniband/hw/qib/qib_init.c !(ppd->ibport_data.rvp.rc_delayed_comp)) ppd 252 drivers/infiniband/hw/qib/qib_init.c ppd->cc_supported_table_entries = min(max_t(int, qib_cc_table_size, ppd 255 drivers/infiniband/hw/qib/qib_init.c ppd->cc_max_table_entries = ppd 256 drivers/infiniband/hw/qib/qib_init.c ppd->cc_supported_table_entries/IB_CCT_ENTRIES; ppd 260 drivers/infiniband/hw/qib/qib_init.c ppd->ccti_entries = kzalloc(size, GFP_KERNEL); ppd 261 drivers/infiniband/hw/qib/qib_init.c if (!ppd->ccti_entries) ppd 265 drivers/infiniband/hw/qib/qib_init.c ppd->congestion_entries = kzalloc(size, GFP_KERNEL); ppd 266 drivers/infiniband/hw/qib/qib_init.c if (!ppd->congestion_entries) ppd 270 drivers/infiniband/hw/qib/qib_init.c ppd->ccti_entries_shadow = kzalloc(size, GFP_KERNEL); ppd 271 drivers/infiniband/hw/qib/qib_init.c if (!ppd->ccti_entries_shadow) ppd 275 drivers/infiniband/hw/qib/qib_init.c ppd->congestion_entries_shadow = kzalloc(size, GFP_KERNEL); ppd 276 drivers/infiniband/hw/qib/qib_init.c if (!ppd->congestion_entries_shadow) ppd 282 drivers/infiniband/hw/qib/qib_init.c kfree(ppd->ccti_entries_shadow); ppd 283 drivers/infiniband/hw/qib/qib_init.c ppd->ccti_entries_shadow = NULL; ppd 285 drivers/infiniband/hw/qib/qib_init.c kfree(ppd->congestion_entries); ppd 286 drivers/infiniband/hw/qib/qib_init.c ppd->congestion_entries = NULL; ppd 288 drivers/infiniband/hw/qib/qib_init.c kfree(ppd->ccti_entries); ppd 289 drivers/infiniband/hw/qib/qib_init.c ppd->ccti_entries = NULL; ppd 490 drivers/infiniband/hw/qib/qib_init.c dd->f_rcvctrl(rcd->ppd, rcvmask, i); ppd 579 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 582 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 583 drivers/infiniband/hw/qib/qib_init.c if (!ppd->qib_wq) { ppd 588 drivers/infiniband/hw/qib/qib_init.c ppd->qib_wq = alloc_ordered_workqueue(wq_name, ppd 590 drivers/infiniband/hw/qib/qib_init.c if (!ppd->qib_wq) ppd 599 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 600 drivers/infiniband/hw/qib/qib_init.c if (ppd->qib_wq) { ppd 601 drivers/infiniband/hw/qib/qib_init.c destroy_workqueue(ppd->qib_wq); ppd 602 drivers/infiniband/hw/qib/qib_init.c ppd->qib_wq = NULL; ppd 608 drivers/infiniband/hw/qib/qib_init.c static void qib_free_pportdata(struct qib_pportdata *ppd) ppd 610 drivers/infiniband/hw/qib/qib_init.c free_percpu(ppd->ibport_data.pmastats); ppd 611 drivers/infiniband/hw/qib/qib_init.c free_percpu(ppd->ibport_data.rvp.rc_acks); ppd 612 drivers/infiniband/hw/qib/qib_init.c free_percpu(ppd->ibport_data.rvp.rc_qacks); ppd 613 drivers/infiniband/hw/qib/qib_init.c free_percpu(ppd->ibport_data.rvp.rc_delayed_comp); ppd 614 drivers/infiniband/hw/qib/qib_init.c ppd->ibport_data.pmastats = NULL; ppd 638 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 643 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 644 drivers/infiniband/hw/qib/qib_init.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 645 drivers/infiniband/hw/qib/qib_init.c ppd->lflags &= ~(QIBL_LINKACTIVE | QIBL_LINKARMED | ppd 648 drivers/infiniband/hw/qib/qib_init.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 691 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 698 drivers/infiniband/hw/qib/qib_init.c ppd->init_ibmaxlen = min(mtu > 2048 ? ppd 706 drivers/infiniband/hw/qib/qib_init.c ppd->ibmaxlen = ppd->init_ibmaxlen; ppd 707 drivers/infiniband/hw/qib/qib_init.c qib_set_mtu(ppd, mtu); ppd 709 drivers/infiniband/hw/qib/qib_init.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 710 drivers/infiniband/hw/qib/qib_init.c ppd->lflags |= QIBL_IB_LINK_DISABLED; ppd 711 drivers/infiniband/hw/qib/qib_init.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 713 drivers/infiniband/hw/qib/qib_init.c lastfail = dd->f_bringup_serdes(ppd); ppd 716 drivers/infiniband/hw/qib/qib_init.c "Failed to bringup IB port %u\n", ppd->port); ppd 741 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 746 drivers/infiniband/hw/qib/qib_init.c *ppd->statusp |= QIB_STATUS_CHIP_PRESENT | ppd 748 drivers/infiniband/hw/qib/qib_init.c if (!ppd->link_speed_enabled) ppd 751 drivers/infiniband/hw/qib/qib_init.c ret = qib_setup_sdma(ppd); ppd 752 drivers/infiniband/hw/qib/qib_init.c timer_setup(&ppd->hol_timer, qib_hol_event, 0); ppd 753 drivers/infiniband/hw/qib/qib_init.c ppd->hol_state = QIB_HOL_UP; ppd 798 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 806 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 807 drivers/infiniband/hw/qib/qib_init.c if (ppd->hol_timer.function) ppd 808 drivers/infiniband/hw/qib/qib_init.c del_timer_sync(&ppd->hol_timer); ppd 809 drivers/infiniband/hw/qib/qib_init.c if (ppd->led_override_timer.function) { ppd 810 drivers/infiniband/hw/qib/qib_init.c del_timer_sync(&ppd->led_override_timer); ppd 811 drivers/infiniband/hw/qib/qib_init.c atomic_set(&ppd->led_override_timer_active, 0); ppd 813 drivers/infiniband/hw/qib/qib_init.c if (ppd->symerr_clear_timer.function) ppd 814 drivers/infiniband/hw/qib/qib_init.c del_timer_sync(&ppd->symerr_clear_timer); ppd 829 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 837 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 839 drivers/infiniband/hw/qib/qib_init.c spin_lock_irq(&ppd->lflags_lock); ppd 840 drivers/infiniband/hw/qib/qib_init.c ppd->lflags &= ~(QIBL_LINKDOWN | QIBL_LINKINIT | ppd 843 drivers/infiniband/hw/qib/qib_init.c spin_unlock_irq(&ppd->lflags_lock); ppd 844 drivers/infiniband/hw/qib/qib_init.c *ppd->statusp &= ~(QIB_STATUS_IB_CONF | QIB_STATUS_IB_READY); ppd 852 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 853 drivers/infiniband/hw/qib/qib_init.c dd->f_rcvctrl(ppd, QIB_RCVCTRL_TAILUPD_DIS | ppd 861 drivers/infiniband/hw/qib/qib_init.c dd->f_sendctrl(ppd, QIB_SENDCTRL_CLEAR); ppd 871 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 872 drivers/infiniband/hw/qib/qib_init.c dd->f_setextled(ppd, 0); /* make sure LEDs are off */ ppd 875 drivers/infiniband/hw/qib/qib_init.c qib_teardown_sdma(ppd); ppd 877 drivers/infiniband/hw/qib/qib_init.c dd->f_sendctrl(ppd, QIB_SENDCTRL_AVAIL_DIS | ppd 883 drivers/infiniband/hw/qib/qib_init.c dd->f_quiet_serdes(ppd); ppd 885 drivers/infiniband/hw/qib/qib_init.c if (ppd->qib_wq) { ppd 886 drivers/infiniband/hw/qib/qib_init.c destroy_workqueue(ppd->qib_wq); ppd 887 drivers/infiniband/hw/qib/qib_init.c ppd->qib_wq = NULL; ppd 889 drivers/infiniband/hw/qib/qib_init.c qib_free_pportdata(ppd); ppd 1138 drivers/infiniband/hw/qib/qib_init.c struct qib_pportdata *ppd; ppd 1140 drivers/infiniband/hw/qib/qib_init.c ppd = dd->pport + pidx; ppd 1142 drivers/infiniband/hw/qib/qib_init.c qib_set_linkstate(ppd, ppd 1144 drivers/infiniband/hw/qib/qib_init.c dd->f_setextled(ppd, 0); ppd 1146 drivers/infiniband/hw/qib/qib_init.c *ppd->statusp &= ~QIB_STATUS_IB_READY; ppd 72 drivers/infiniband/hw/qib/qib_intr.c static void signal_ib_event(struct qib_pportdata *ppd, enum ib_event_type ev) ppd 75 drivers/infiniband/hw/qib/qib_intr.c struct qib_devdata *dd = ppd->dd; ppd 78 drivers/infiniband/hw/qib/qib_intr.c event.element.port_num = ppd->port; ppd 83 drivers/infiniband/hw/qib/qib_intr.c void qib_handle_e_ibstatuschanged(struct qib_pportdata *ppd, u64 ibcs) ppd 85 drivers/infiniband/hw/qib/qib_intr.c struct qib_devdata *dd = ppd->dd; ppd 104 drivers/infiniband/hw/qib/qib_intr.c (!ppd->lflags || (ppd->lflags & QIBL_LINKDOWN)) && ppd 107 drivers/infiniband/hw/qib/qib_intr.c if (dd->f_ib_updown(ppd, 1, ibcs)) ppd 109 drivers/infiniband/hw/qib/qib_intr.c } else if (ppd->lflags & (QIBL_LINKINIT | QIBL_LINKARMED | ppd 113 drivers/infiniband/hw/qib/qib_intr.c dd->f_ib_updown(ppd, 0, ibcs)) ppd 115 drivers/infiniband/hw/qib/qib_intr.c qib_set_uevent_bits(ppd, _QIB_EVENT_LINKDOWN_BIT); ppd 121 drivers/infiniband/hw/qib/qib_intr.c *ppd->statusp &= ~QIB_STATUS_IB_READY; ppd 122 drivers/infiniband/hw/qib/qib_intr.c if (ppd->lflags & QIBL_LINKACTIVE) ppd 124 drivers/infiniband/hw/qib/qib_intr.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 126 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags |= QIBL_LINKARMED | QIBL_LINKV; ppd 127 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags &= ~(QIBL_LINKINIT | ppd 130 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags |= QIBL_LINKINIT | QIBL_LINKV; ppd 131 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags &= ~(QIBL_LINKARMED | ppd 134 drivers/infiniband/hw/qib/qib_intr.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 136 drivers/infiniband/hw/qib/qib_intr.c mod_timer(&ppd->symerr_clear_timer, ppd 139 drivers/infiniband/hw/qib/qib_intr.c !(ppd->lflags & QIBL_LINKACTIVE)) { ppd 141 drivers/infiniband/hw/qib/qib_intr.c qib_hol_up(ppd); /* useful only for 6120 now */ ppd 142 drivers/infiniband/hw/qib/qib_intr.c *ppd->statusp |= ppd 144 drivers/infiniband/hw/qib/qib_intr.c qib_clear_symerror_on_linkup(&ppd->symerr_clear_timer); ppd 145 drivers/infiniband/hw/qib/qib_intr.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 146 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags |= QIBL_LINKACTIVE | QIBL_LINKV; ppd 147 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags &= ~(QIBL_LINKINIT | ppd 149 drivers/infiniband/hw/qib/qib_intr.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 151 drivers/infiniband/hw/qib/qib_intr.c qib_sdma_process_event(ppd, ppd 154 drivers/infiniband/hw/qib/qib_intr.c dd->f_setextled(ppd, 1); ppd 157 drivers/infiniband/hw/qib/qib_intr.c if (ppd->lflags & QIBL_LINKACTIVE) ppd 159 drivers/infiniband/hw/qib/qib_intr.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 160 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags |= QIBL_LINKDOWN | QIBL_LINKV; ppd 161 drivers/infiniband/hw/qib/qib_intr.c ppd->lflags &= ~(QIBL_LINKINIT | ppd 163 drivers/infiniband/hw/qib/qib_intr.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 164 drivers/infiniband/hw/qib/qib_intr.c *ppd->statusp &= ~QIB_STATUS_IB_READY; ppd 168 drivers/infiniband/hw/qib/qib_intr.c ppd->lastibcstat = ibcs; ppd 170 drivers/infiniband/hw/qib/qib_intr.c signal_ib_event(ppd, ev); ppd 175 drivers/infiniband/hw/qib/qib_intr.c struct qib_pportdata *ppd = from_timer(ppd, t, symerr_clear_timer); ppd 177 drivers/infiniband/hw/qib/qib_intr.c if (ppd->lflags & QIBL_LINKACTIVE) ppd 180 drivers/infiniband/hw/qib/qib_intr.c ppd->ibport_data.z_symbol_error_counter = ppd 181 drivers/infiniband/hw/qib/qib_intr.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_IBSYMBOLERR); ppd 205 drivers/infiniband/hw/qib/qib_intr.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_INTRAVAIL_DIS, ppd 326 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = dd->pport + pidx; ppd 327 drivers/infiniband/hw/qib/qib_mad.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 328 drivers/infiniband/hw/qib/qib_mad.c __be64 g = ppd->guid; ppd 346 drivers/infiniband/hw/qib/qib_mad.c static void set_link_width_enabled(struct qib_pportdata *ppd, u32 w) ppd 348 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LWID_ENB, w); ppd 351 drivers/infiniband/hw/qib/qib_mad.c static void set_link_speed_enabled(struct qib_pportdata *ppd, u32 s) ppd 353 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_SPD_ENB, s); ppd 356 drivers/infiniband/hw/qib/qib_mad.c static int get_overrunthreshold(struct qib_pportdata *ppd) ppd 358 drivers/infiniband/hw/qib/qib_mad.c return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH); ppd 368 drivers/infiniband/hw/qib/qib_mad.c static int set_overrunthreshold(struct qib_pportdata *ppd, unsigned n) ppd 370 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OVERRUN_THRESH, ppd 375 drivers/infiniband/hw/qib/qib_mad.c static int get_phyerrthreshold(struct qib_pportdata *ppd) ppd 377 drivers/infiniband/hw/qib/qib_mad.c return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH); ppd 387 drivers/infiniband/hw/qib/qib_mad.c static int set_phyerrthreshold(struct qib_pportdata *ppd, unsigned n) ppd 389 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PHYERR_THRESH, ppd 400 drivers/infiniband/hw/qib/qib_mad.c static int get_linkdowndefaultstate(struct qib_pportdata *ppd) ppd 402 drivers/infiniband/hw/qib/qib_mad.c return ppd->dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT) == ppd 458 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd; ppd 486 drivers/infiniband/hw/qib/qib_mad.c ppd = dd->pport + (port_num - 1); ppd 487 drivers/infiniband/hw/qib/qib_mad.c ibp = &ppd->ibport_data; ppd 498 drivers/infiniband/hw/qib/qib_mad.c pip->lid = cpu_to_be16(ppd->lid); ppd 504 drivers/infiniband/hw/qib/qib_mad.c pip->link_width_enabled = ppd->link_width_enabled; ppd 505 drivers/infiniband/hw/qib/qib_mad.c pip->link_width_supported = ppd->link_width_supported; ppd 506 drivers/infiniband/hw/qib/qib_mad.c pip->link_width_active = ppd->link_width_active; ppd 507 drivers/infiniband/hw/qib/qib_mad.c state = dd->f_iblink_state(ppd->lastibcstat); ppd 508 drivers/infiniband/hw/qib/qib_mad.c pip->linkspeed_portstate = ppd->link_speed_supported << 4 | state; ppd 511 drivers/infiniband/hw/qib/qib_mad.c (dd->f_ibphys_portstate(ppd->lastibcstat) << 4) | ppd 512 drivers/infiniband/hw/qib/qib_mad.c (get_linkdowndefaultstate(ppd) ? 1 : 2); ppd 513 drivers/infiniband/hw/qib/qib_mad.c pip->mkeyprot_resv_lmc = (ibp->rvp.mkeyprot << 6) | ppd->lmc; ppd 514 drivers/infiniband/hw/qib/qib_mad.c pip->linkspeedactive_enabled = (ppd->link_speed_active << 4) | ppd 515 drivers/infiniband/hw/qib/qib_mad.c ppd->link_speed_enabled; ppd 516 drivers/infiniband/hw/qib/qib_mad.c switch (ppd->ibmtu) { ppd 535 drivers/infiniband/hw/qib/qib_mad.c pip->vlcap_inittype = ppd->vls_supported << 4; /* InitType = 0 */ ppd 538 drivers/infiniband/hw/qib/qib_mad.c dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_CAP); ppd 540 drivers/infiniband/hw/qib/qib_mad.c dd->f_get_ib_cfg(ppd, QIB_IB_CFG_VL_LOW_CAP); ppd 546 drivers/infiniband/hw/qib/qib_mad.c dd->f_get_ib_cfg(ppd, QIB_IB_CFG_OP_VLS) << 4; ppd 557 drivers/infiniband/hw/qib/qib_mad.c (get_phyerrthreshold(ppd) << 4) | ppd 558 drivers/infiniband/hw/qib/qib_mad.c get_overrunthreshold(ppd); ppd 563 drivers/infiniband/hw/qib/qib_mad.c v = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_LINKLATENCY); ppd 583 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = dd->pport + port - 1; ppd 589 drivers/infiniband/hw/qib/qib_mad.c struct qib_ctxtdata *rcd = dd->rcd[ppd->hw_pidx]; ppd 631 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = dd->pport + pidx; ppd 632 drivers/infiniband/hw/qib/qib_mad.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 659 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd; ppd 685 drivers/infiniband/hw/qib/qib_mad.c ppd = dd->pport + (port_num - 1); ppd 686 drivers/infiniband/hw/qib/qib_mad.c ibp = &ppd->ibport_data; ppd 698 drivers/infiniband/hw/qib/qib_mad.c else if (ppd->lid != lid || ppd->lmc != (pip->mkeyprot_resv_lmc & 7)) { ppd 699 drivers/infiniband/hw/qib/qib_mad.c if (ppd->lid != lid) ppd 700 drivers/infiniband/hw/qib/qib_mad.c qib_set_uevent_bits(ppd, _QIB_EVENT_LID_CHANGE_BIT); ppd 701 drivers/infiniband/hw/qib/qib_mad.c if (ppd->lmc != (pip->mkeyprot_resv_lmc & 7)) ppd 702 drivers/infiniband/hw/qib/qib_mad.c qib_set_uevent_bits(ppd, _QIB_EVENT_LMC_CHANGE_BIT); ppd 703 drivers/infiniband/hw/qib/qib_mad.c qib_set_lid(ppd, lid, pip->mkeyprot_resv_lmc & 7); ppd 735 drivers/infiniband/hw/qib/qib_mad.c set_link_width_enabled(ppd, ppd->link_width_supported); ppd 736 drivers/infiniband/hw/qib/qib_mad.c else if (lwe >= 16 || (lwe & ~ppd->link_width_supported)) ppd 738 drivers/infiniband/hw/qib/qib_mad.c else if (lwe != ppd->link_width_enabled) ppd 739 drivers/infiniband/hw/qib/qib_mad.c set_link_width_enabled(ppd, lwe); ppd 750 drivers/infiniband/hw/qib/qib_mad.c set_link_speed_enabled(ppd, ppd 751 drivers/infiniband/hw/qib/qib_mad.c ppd->link_speed_supported); ppd 752 drivers/infiniband/hw/qib/qib_mad.c else if (lse >= 8 || (lse & ~ppd->link_speed_supported)) ppd 754 drivers/infiniband/hw/qib/qib_mad.c else if (lse != ppd->link_speed_enabled) ppd 755 drivers/infiniband/hw/qib/qib_mad.c set_link_speed_enabled(ppd, lse); ppd 763 drivers/infiniband/hw/qib/qib_mad.c (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, ppd 767 drivers/infiniband/hw/qib/qib_mad.c (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_LINKDEFAULT, ppd 776 drivers/infiniband/hw/qib/qib_mad.c (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_VL_HIGH_LIMIT, ppd 783 drivers/infiniband/hw/qib/qib_mad.c qib_set_mtu(ppd, mtu); ppd 788 drivers/infiniband/hw/qib/qib_mad.c if (vls > ppd->vls_supported) ppd 791 drivers/infiniband/hw/qib/qib_mad.c (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_OP_VLS, vls); ppd 804 drivers/infiniband/hw/qib/qib_mad.c if (set_phyerrthreshold(ppd, (ore >> 4) & 0xF)) ppd 807 drivers/infiniband/hw/qib/qib_mad.c if (set_overrunthreshold(ppd, (ore & 0xF))) ppd 845 drivers/infiniband/hw/qib/qib_mad.c spin_lock_irqsave(&ppd->lflags_lock, flags); ppd 846 drivers/infiniband/hw/qib/qib_mad.c ppd->lflags &= ~QIBL_LINKV; ppd 847 drivers/infiniband/hw/qib/qib_mad.c spin_unlock_irqrestore(&ppd->lflags_lock, flags); ppd 848 drivers/infiniband/hw/qib/qib_mad.c qib_set_linkstate(ppd, lstate); ppd 857 drivers/infiniband/hw/qib/qib_mad.c qib_wait_linkstate(ppd, QIBL_LINKV, 10); ppd 860 drivers/infiniband/hw/qib/qib_mad.c qib_set_linkstate(ppd, QIB_IB_LINKARM); ppd 863 drivers/infiniband/hw/qib/qib_mad.c qib_set_linkstate(ppd, QIB_IB_LINKACTIVE); ppd 895 drivers/infiniband/hw/qib/qib_mad.c static int rm_pkey(struct qib_pportdata *ppd, u16 key) ppd 900 drivers/infiniband/hw/qib/qib_mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 901 drivers/infiniband/hw/qib/qib_mad.c if (ppd->pkeys[i] != key) ppd 903 drivers/infiniband/hw/qib/qib_mad.c if (atomic_dec_and_test(&ppd->pkeyrefs[i])) { ppd 904 drivers/infiniband/hw/qib/qib_mad.c ppd->pkeys[i] = 0; ppd 925 drivers/infiniband/hw/qib/qib_mad.c static int add_pkey(struct qib_pportdata *ppd, u16 key) ppd 938 drivers/infiniband/hw/qib/qib_mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 939 drivers/infiniband/hw/qib/qib_mad.c if (!ppd->pkeys[i]) { ppd 944 drivers/infiniband/hw/qib/qib_mad.c if (ppd->pkeys[i] == key) { ppd 945 drivers/infiniband/hw/qib/qib_mad.c if (atomic_inc_return(&ppd->pkeyrefs[i]) > 1) { ppd 950 drivers/infiniband/hw/qib/qib_mad.c atomic_dec(&ppd->pkeyrefs[i]); ppd 958 drivers/infiniband/hw/qib/qib_mad.c if ((ppd->pkeys[i] & 0x7FFF) == lkey) { ppd 967 drivers/infiniband/hw/qib/qib_mad.c for (i = 0; i < ARRAY_SIZE(ppd->pkeys); i++) { ppd 968 drivers/infiniband/hw/qib/qib_mad.c if (!ppd->pkeys[i] && ppd 969 drivers/infiniband/hw/qib/qib_mad.c atomic_inc_return(&ppd->pkeyrefs[i]) == 1) { ppd 971 drivers/infiniband/hw/qib/qib_mad.c ppd->pkeys[i] = key; ppd 990 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd; ppd 1001 drivers/infiniband/hw/qib/qib_mad.c ppd = dd->pport + (port - 1); ppd 1002 drivers/infiniband/hw/qib/qib_mad.c rcd = dd->rcd[ppd->hw_pidx]; ppd 1015 drivers/infiniband/hw/qib/qib_mad.c changed |= rm_pkey(ppd, okey); ppd 1017 drivers/infiniband/hw/qib/qib_mad.c int ret = add_pkey(ppd, key); ppd 1029 drivers/infiniband/hw/qib/qib_mad.c (void) dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PKEYS, 0); ppd 1101 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(to_iport(ibdev, port)); ppd 1105 drivers/infiniband/hw/qib/qib_mad.c if (ppd->vls_supported == IB_VL_VL0) ppd 1108 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, ppd 1111 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_get_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, ppd 1123 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(to_iport(ibdev, port)); ppd 1125 drivers/infiniband/hw/qib/qib_mad.c if (ppd->vls_supported == IB_VL_VL0) ppd 1128 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_LOW_ARB, ppd 1131 drivers/infiniband/hw/qib/qib_mad.c (void) ppd->dd->f_set_ib_table(ppd, QIB_IB_TBL_VL_HIGH_ARB, ppd 1190 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1202 drivers/infiniband/hw/qib/qib_mad.c p->tick = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_PMA_TICKS); ppd 1203 drivers/infiniband/hw/qib/qib_mad.c p->sample_status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); ppd 1228 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1242 drivers/infiniband/hw/qib/qib_mad.c xmit_flags = ppd->cong_stats.flags; ppd 1243 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.flags = IB_PMA_CONG_HW_CONTROL_SAMPLE; ppd 1244 drivers/infiniband/hw/qib/qib_mad.c status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); ppd 1256 drivers/infiniband/hw/qib/qib_mad.c dd->f_set_cntr_sample(ppd, ibp->rvp.pma_sample_interval, ppd 1267 drivers/infiniband/hw/qib/qib_mad.c static u64 get_counter(struct qib_ibport *ibp, struct qib_pportdata *ppd, ppd 1274 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITDATA); ppd 1277 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVDATA); ppd 1280 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITPKTS); ppd 1283 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSRCVPKTS); ppd 1286 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->dd->f_portcntr(ppd, QIBPORTCNTR_PSXMITWAIT); ppd 1296 drivers/infiniband/hw/qib/qib_mad.c static u64 xmit_wait_get_value_delta(struct qib_pportdata *ppd) ppd 1300 drivers/infiniband/hw/qib/qib_mad.c delta = get_counter(&ppd->ibport_data, ppd, ppd 1302 drivers/infiniband/hw/qib/qib_mad.c return ppd->cong_stats.counter + delta; ppd 1305 drivers/infiniband/hw/qib/qib_mad.c static void cache_hw_sample_counters(struct qib_pportdata *ppd) ppd 1307 drivers/infiniband/hw/qib/qib_mad.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 1309 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter_cache.psxmitdata = ppd 1310 drivers/infiniband/hw/qib/qib_mad.c get_counter(ibp, ppd, IB_PMA_PORT_XMIT_DATA); ppd 1311 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter_cache.psrcvdata = ppd 1312 drivers/infiniband/hw/qib/qib_mad.c get_counter(ibp, ppd, IB_PMA_PORT_RCV_DATA); ppd 1313 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter_cache.psxmitpkts = ppd 1314 drivers/infiniband/hw/qib/qib_mad.c get_counter(ibp, ppd, IB_PMA_PORT_XMIT_PKTS); ppd 1315 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter_cache.psrcvpkts = ppd 1316 drivers/infiniband/hw/qib/qib_mad.c get_counter(ibp, ppd, IB_PMA_PORT_RCV_PKTS); ppd 1317 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter_cache.psxmitwait = ppd 1318 drivers/infiniband/hw/qib/qib_mad.c get_counter(ibp, ppd, IB_PMA_PORT_XMIT_WAIT); ppd 1321 drivers/infiniband/hw/qib/qib_mad.c static u64 get_cache_hw_sample_counters(struct qib_pportdata *ppd, ppd 1328 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->cong_stats.counter_cache.psxmitdata; ppd 1331 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->cong_stats.counter_cache.psrcvdata; ppd 1334 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->cong_stats.counter_cache.psxmitpkts; ppd 1337 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->cong_stats.counter_cache.psrcvpkts; ppd 1340 drivers/infiniband/hw/qib/qib_mad.c ret = ppd->cong_stats.counter_cache.psxmitwait; ppd 1357 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1365 drivers/infiniband/hw/qib/qib_mad.c if (ppd->cong_stats.flags == IB_PMA_CONG_HW_CONTROL_TIMER) ppd 1368 drivers/infiniband/hw/qib/qib_mad.c status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); ppd 1371 drivers/infiniband/hw/qib/qib_mad.c cache_hw_sample_counters(ppd); ppd 1372 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter = ppd 1373 drivers/infiniband/hw/qib/qib_mad.c xmit_wait_get_value_delta(ppd); ppd 1374 drivers/infiniband/hw/qib/qib_mad.c dd->f_set_cntr_sample(ppd, ppd 1376 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.flags = IB_PMA_CONG_HW_CONTROL_TIMER; ppd 1382 drivers/infiniband/hw/qib/qib_mad.c ppd, ibp->rvp.pma_counter_select[i])); ppd 1396 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1405 drivers/infiniband/hw/qib/qib_mad.c if (ppd->cong_stats.flags == IB_PMA_CONG_HW_CONTROL_TIMER) ppd 1408 drivers/infiniband/hw/qib/qib_mad.c status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); ppd 1413 drivers/infiniband/hw/qib/qib_mad.c cache_hw_sample_counters(ppd); ppd 1414 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter = ppd 1415 drivers/infiniband/hw/qib/qib_mad.c xmit_wait_get_value_delta(ppd); ppd 1416 drivers/infiniband/hw/qib/qib_mad.c dd->f_set_cntr_sample(ppd, ppd 1418 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.flags = IB_PMA_CONG_HW_CONTROL_TIMER; ppd 1424 drivers/infiniband/hw/qib/qib_mad.c ppd, ibp->rvp.pma_counter_select[i])); ppd 1436 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1440 drivers/infiniband/hw/qib/qib_mad.c qib_get_counters(ppd, &cntrs); ppd 1536 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1537 drivers/infiniband/hw/qib/qib_mad.c struct qib_devdata *dd = dd_from_ppd(ppd); ppd 1551 drivers/infiniband/hw/qib/qib_mad.c qib_get_counters(ppd, &cntrs); ppd 1552 drivers/infiniband/hw/qib/qib_mad.c spin_lock_irqsave(&ppd->ibport_data.rvp.lock, flags); ppd 1553 drivers/infiniband/hw/qib/qib_mad.c xmit_wait_counter = xmit_wait_get_value_delta(ppd); ppd 1554 drivers/infiniband/hw/qib/qib_mad.c spin_unlock_irqrestore(&ppd->ibport_data.rvp.lock, flags); ppd 1664 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1677 drivers/infiniband/hw/qib/qib_mad.c qib_snapshot_counters(ppd, &swords, &rwords, &spkts, &rpkts, &xwait); ppd 1711 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1718 drivers/infiniband/hw/qib/qib_mad.c qib_get_counters(ppd, &cntrs); ppd 1772 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1773 drivers/infiniband/hw/qib/qib_mad.c struct qib_devdata *dd = dd_from_ppd(ppd); ppd 1779 drivers/infiniband/hw/qib/qib_mad.c qib_get_counters(ppd, &cntrs); ppd 1784 drivers/infiniband/hw/qib/qib_mad.c spin_lock_irqsave(&ppd->ibport_data.rvp.lock, flags); ppd 1785 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter = 0; ppd 1786 drivers/infiniband/hw/qib/qib_mad.c dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, ppd 1788 drivers/infiniband/hw/qib/qib_mad.c spin_unlock_irqrestore(&ppd->ibport_data.rvp.lock, flags); ppd 1825 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1829 drivers/infiniband/hw/qib/qib_mad.c qib_snapshot_counters(ppd, &swords, &rwords, &spkts, &rpkts, &xwait); ppd 1866 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1996 drivers/infiniband/hw/qib/qib_mad.c ppd->dd->f_set_ib_cfg(ppd, QIB_IB_CFG_PORT, ppd 2121 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2126 drivers/infiniband/hw/qib/qib_mad.c p->control_table_cap = ppd->cc_max_table_entries; ppd 2138 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2143 drivers/infiniband/hw/qib/qib_mad.c spin_lock(&ppd->cc_shadow_lock); ppd 2145 drivers/infiniband/hw/qib/qib_mad.c entries = ppd->congestion_entries_shadow->entries; ppd 2147 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries_shadow->port_control); ppd 2149 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries_shadow->control_map); ppd 2157 drivers/infiniband/hw/qib/qib_mad.c spin_unlock(&ppd->cc_shadow_lock); ppd 2168 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2181 drivers/infiniband/hw/qib/qib_mad.c spin_lock(&ppd->cc_shadow_lock); ppd 2184 drivers/infiniband/hw/qib/qib_mad.c (ppd->ccti_entries_shadow->ccti_last_entry + 1)/IB_CCT_ENTRIES; ppd 2188 drivers/infiniband/hw/qib/qib_mad.c spin_unlock(&ppd->cc_shadow_lock); ppd 2200 drivers/infiniband/hw/qib/qib_mad.c entries = &ppd->ccti_entries_shadow-> ppd 2207 drivers/infiniband/hw/qib/qib_mad.c spin_unlock(&ppd->cc_shadow_lock); ppd 2221 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2224 drivers/infiniband/hw/qib/qib_mad.c ppd->cc_sl_control_map = be16_to_cpu(p->control_map); ppd 2227 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries[i].ccti_increase = ppd 2230 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries[i].ccti_timer = ppd 2233 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries[i].trigger_threshold = ppd 2236 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries[i].ccti_min = ppd 2249 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2263 drivers/infiniband/hw/qib/qib_mad.c ppd->total_cct_entry = 0; ppd 2268 drivers/infiniband/hw/qib/qib_mad.c ppd->total_cct_entry += (cct_entry + 1); ppd 2270 drivers/infiniband/hw/qib/qib_mad.c if (ppd->total_cct_entry > ppd->cc_supported_table_entries) ppd 2273 drivers/infiniband/hw/qib/qib_mad.c ppd->ccti_limit = be16_to_cpu(p->ccti_limit); ppd 2275 drivers/infiniband/hw/qib/qib_mad.c entries = ppd->ccti_entries + (IB_CCT_ENTRIES * cct_block_index); ppd 2280 drivers/infiniband/hw/qib/qib_mad.c spin_lock(&ppd->cc_shadow_lock); ppd 2282 drivers/infiniband/hw/qib/qib_mad.c ppd->ccti_entries_shadow->ccti_last_entry = ppd->total_cct_entry - 1; ppd 2283 drivers/infiniband/hw/qib/qib_mad.c memcpy(ppd->ccti_entries_shadow->entries, ppd->ccti_entries, ppd 2284 drivers/infiniband/hw/qib/qib_mad.c (ppd->total_cct_entry * sizeof(struct ib_cc_table_entry))); ppd 2286 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries_shadow->port_control = IB_CC_CCS_PC_SL_BASED; ppd 2287 drivers/infiniband/hw/qib/qib_mad.c ppd->congestion_entries_shadow->control_map = ppd->cc_sl_control_map; ppd 2288 drivers/infiniband/hw/qib/qib_mad.c memcpy(ppd->congestion_entries_shadow->entries, ppd->congestion_entries, ppd 2291 drivers/infiniband/hw/qib/qib_mad.c spin_unlock(&ppd->cc_shadow_lock); ppd 2414 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 2433 drivers/infiniband/hw/qib/qib_mad.c if (!ppd->congestion_entries_shadow || ppd 2451 drivers/infiniband/hw/qib/qib_mad.c struct qib_pportdata *ppd = from_timer(ppd, t, cong_stats.timer); ppd 2452 drivers/infiniband/hw/qib/qib_mad.c struct qib_devdata *dd = dd_from_ppd(ppd); ppd 2456 drivers/infiniband/hw/qib/qib_mad.c spin_lock_irqsave(&ppd->ibport_data.rvp.lock, flags); ppd 2457 drivers/infiniband/hw/qib/qib_mad.c if (ppd->cong_stats.flags == IB_PMA_CONG_HW_CONTROL_SAMPLE) { ppd 2458 drivers/infiniband/hw/qib/qib_mad.c status = dd->f_portcntr(ppd, QIBPORTCNTR_PSSTAT); ppd 2461 drivers/infiniband/hw/qib/qib_mad.c cache_hw_sample_counters(ppd); ppd 2462 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.flags = IB_PMA_CONG_HW_CONTROL_TIMER; ppd 2466 drivers/infiniband/hw/qib/qib_mad.c ppd->cong_stats.counter = xmit_wait_get_value_delta(ppd); ppd 2467 drivers/infiniband/hw/qib/qib_mad.c dd->f_set_cntr_sample(ppd, QIB_CONG_TIMER_PSINTERVAL, 0x0); ppd 2469 drivers/infiniband/hw/qib/qib_mad.c spin_unlock_irqrestore(&ppd->ibport_data.rvp.lock, flags); ppd 2470 drivers/infiniband/hw/qib/qib_mad.c mod_timer(&ppd->cong_stats.timer, jiffies + HZ); ppd 47 drivers/infiniband/hw/qib/qib_qsfp.c static int qsfp_read(struct qib_pportdata *ppd, int addr, void *bp, int len) ppd 49 drivers/infiniband/hw/qib/qib_qsfp.c struct qib_devdata *dd = ppd->dd; ppd 73 drivers/infiniband/hw/qib/qib_qsfp.c if (ppd->hw_pidx) { ppd 89 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(dd, ppd->port, ppd 139 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(dd, ppd->port, "QSFP failed even retrying\n"); ppd 141 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(dd, ppd->port, "QSFP retries: %d\n", pass); ppd 157 drivers/infiniband/hw/qib/qib_qsfp.c static int qib_qsfp_write(struct qib_pportdata *ppd, int addr, void *bp, ppd 160 drivers/infiniband/hw/qib/qib_qsfp.c struct qib_devdata *dd = ppd->dd; ppd 183 drivers/infiniband/hw/qib/qib_qsfp.c if (ppd->hw_pidx) { ppd 198 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(dd, ppd->port, ppd 253 drivers/infiniband/hw/qib/qib_qsfp.c static int qsfp_cks(struct qib_pportdata *ppd, int first, int next) ppd 261 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, first, &bval, 1); ppd 273 drivers/infiniband/hw/qib/qib_qsfp.c int qib_refresh_qsfp_cache(struct qib_pportdata *ppd, struct qib_qsfp_cache *cp) ppd 283 drivers/infiniband/hw/qib/qib_qsfp.c if (!qib_qsfp_mod_present(ppd)) { ppd 288 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, 0, peek, 3); ppd 292 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(ppd->dd, ppd->port, ppd 302 drivers/infiniband/hw/qib/qib_qsfp.c ret = qib_qsfp_write(ppd, 127, &poke, 1); ppd 305 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(ppd->dd, ppd->port, ppd 311 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_ID_OFFS, &cp->id, 1); ppd 315 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(ppd->dd, ppd->port, ppd 319 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_PWR_OFFS, &cp->pwr, 1); ppd 324 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_cks(ppd, QSFP_MOD_PWR_OFFS + 1, QSFP_MOD_LEN_OFFS); ppd 329 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_LEN_OFFS, &cp->len, 1); ppd 334 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_TECH_OFFS, &cp->tech, 1); ppd 339 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_VEND_OFFS, &cp->vendor, QSFP_VEND_LEN); ppd 345 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_IBXCV_OFFS, &cp->xt_xcv, 1); ppd 350 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_VOUI_OFFS, &cp->oui, QSFP_VOUI_LEN); ppd 356 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_PN_OFFS, &cp->partnum, QSFP_PN_LEN); ppd 362 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_REV_OFFS, &cp->rev, QSFP_REV_LEN); ppd 368 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_ATTEN_OFFS, &cp->atten, QSFP_ATTEN_LEN); ppd 374 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_cks(ppd, QSFP_ATTEN_OFFS + QSFP_ATTEN_LEN, QSFP_CC_OFFS); ppd 380 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_CC_OFFS, &cp->cks1, 1); ppd 384 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(ppd->dd, ppd->port, ppd 389 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_cks(ppd, QSFP_CC_OFFS + 1, QSFP_SN_OFFS); ppd 394 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_SN_OFFS, &cp->serial, QSFP_SN_LEN); ppd 400 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_DATE_OFFS, &cp->date, QSFP_DATE_LEN); ppd 406 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_LOT_OFFS, &cp->lot, QSFP_LOT_LEN); ppd 412 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_cks(ppd, QSFP_LOT_OFFS + QSFP_LOT_LEN, QSFP_CC_EXT_OFFS); ppd 417 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_CC_EXT_OFFS, &cp->cks2, 1); ppd 422 drivers/infiniband/hw/qib/qib_qsfp.c qib_dev_porterr(ppd->dd, ppd->port, ppd 444 drivers/infiniband/hw/qib/qib_qsfp.c int qib_qsfp_mod_present(struct qib_pportdata *ppd) ppd 450 drivers/infiniband/hw/qib/qib_qsfp.c (ppd->hw_pidx * QSFP_GPIO_PORT2_SHIFT); ppd 451 drivers/infiniband/hw/qib/qib_qsfp.c ret = ppd->dd->f_gpio_mod(ppd->dd, 0, 0, 0); ppd 454 drivers/infiniband/hw/qib/qib_qsfp.c ((ppd->hw_pidx * QSFP_GPIO_PORT2_SHIFT) + 3)); ppd 466 drivers/infiniband/hw/qib/qib_qsfp.c struct qib_devdata *dd = qd->ppd->dd; ppd 478 drivers/infiniband/hw/qib/qib_qsfp.c if (qd->ppd->hw_pidx) { ppd 488 drivers/infiniband/hw/qib/qib_qsfp.c int qib_qsfp_dump(struct qib_pportdata *ppd, char *buf, int len) ppd 497 drivers/infiniband/hw/qib/qib_qsfp.c ret = qib_refresh_qsfp_cache(ppd, &cd); ppd 536 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, bidx, bin_buff, QSFP_DUMP_CHUNK); ppd 177 drivers/infiniband/hw/qib/qib_qsfp.h struct qib_pportdata *ppd; ppd 184 drivers/infiniband/hw/qib/qib_qsfp.h extern int qib_refresh_qsfp_cache(struct qib_pportdata *ppd, ppd 186 drivers/infiniband/hw/qib/qib_qsfp.h extern int qib_qsfp_mod_present(struct qib_pportdata *ppd); ppd 601 drivers/infiniband/hw/qib/qib_rc.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 650 drivers/infiniband/hw/qib/qib_rc.c hdr.lrh[3] = cpu_to_be16(ppd->lid | ppd 659 drivers/infiniband/hw/qib/qib_rc.c if (!(ppd->lflags & QIBL_LINKACTIVE)) ppd 662 drivers/infiniband/hw/qib/qib_rc.c control = dd->f_setpbc_control(ppd, hwords + SIZE_OF_CRC, ppd 667 drivers/infiniband/hw/qib/qib_rc.c piobuf = dd->f_getsendbuf(ppd, pbc, &pbufn); ppd 1276 drivers/infiniband/hw/qib/qib_rc.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1298 drivers/infiniband/hw/qib/qib_rc.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1300 drivers/infiniband/hw/qib/qib_rc.c qib_sdma_make_progress(ppd); ppd 1302 drivers/infiniband/hw/qib/qib_rc.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1714 drivers/infiniband/hw/qib/qib_rc.c struct qib_ibport *ibp = &rcd->ppd->ibport_data; ppd 62 drivers/infiniband/hw/qib/qib_ruc.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 64 drivers/infiniband/hw/qib/qib_ruc.c return ppd->guid; ppd 267 drivers/infiniband/hw/qib/qib_ruc.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 274 drivers/infiniband/hw/qib/qib_ruc.c ~((1 << ppd->lmc) - 1)) == ppd->lid) { ppd 123 drivers/infiniband/hw/qib/qib_sd7220.c static int qib_ibsd_ucode_loaded(struct qib_pportdata *ppd, ppd 126 drivers/infiniband/hw/qib/qib_sd7220.c struct qib_devdata *dd = ppd->dd; ppd 1391 drivers/infiniband/hw/qib/qib_sd7220.c struct qib_pportdata *ppd = dd->pport; ppd 1400 drivers/infiniband/hw/qib/qib_sd7220.c if ((dd->flags & QIB_INITTED) && !(ppd->lflags & ppd 1404 drivers/infiniband/hw/qib/qib_sd7220.c if (!(ppd->lflags & QIBL_IB_LINK_DISABLED)) ppd 101 drivers/infiniband/hw/qib/qib_sdma.c static void clear_sdma_activelist(struct qib_pportdata *ppd) ppd 105 drivers/infiniband/hw/qib/qib_sdma.c list_for_each_entry_safe(txp, txp_next, &ppd->sdma_activelist, list) { ppd 112 drivers/infiniband/hw/qib/qib_sdma.c unmap_desc(ppd, idx); ppd 113 drivers/infiniband/hw/qib/qib_sdma.c if (++idx == ppd->sdma_descq_cnt) ppd 124 drivers/infiniband/hw/qib/qib_sdma.c struct qib_pportdata *ppd = (struct qib_pportdata *) opaque; ppd 127 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 139 drivers/infiniband/hw/qib/qib_sdma.c qib_sdma_make_progress(ppd); ppd 141 drivers/infiniband/hw/qib/qib_sdma.c clear_sdma_activelist(ppd); ppd 147 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_removed = ppd->sdma_descq_added; ppd 154 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_tail = 0; ppd 155 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_head = 0; ppd 156 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_dma[0] = 0; ppd 157 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_generation = 0; ppd 159 drivers/infiniband/hw/qib/qib_sdma.c __qib_sdma_process_event(ppd, qib_sdma_event_e40_sw_cleaned); ppd 161 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 169 drivers/infiniband/hw/qib/qib_sdma.c static void sdma_hw_start_up(struct qib_pportdata *ppd) ppd 171 drivers/infiniband/hw/qib/qib_sdma.c struct qib_sdma_state *ss = &ppd->sdma_state; ppd 175 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sendctrl(ppd, QIB_SENDCTRL_DISARM_BUF(bufno)); ppd 177 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_hw_start_up(ppd); ppd 180 drivers/infiniband/hw/qib/qib_sdma.c static void sdma_sw_tear_down(struct qib_pportdata *ppd) ppd 182 drivers/infiniband/hw/qib/qib_sdma.c struct qib_sdma_state *ss = &ppd->sdma_state; ppd 188 drivers/infiniband/hw/qib/qib_sdma.c static void sdma_start_sw_clean_up(struct qib_pportdata *ppd) ppd 190 drivers/infiniband/hw/qib/qib_sdma.c tasklet_hi_schedule(&ppd->sdma_sw_clean_up_task); ppd 193 drivers/infiniband/hw/qib/qib_sdma.c static void sdma_set_state(struct qib_pportdata *ppd, ppd 196 drivers/infiniband/hw/qib/qib_sdma.c struct qib_sdma_state *ss = &ppd->sdma_state; ppd 226 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_sendctrl(ppd, ss->current_op); ppd 229 drivers/infiniband/hw/qib/qib_sdma.c static void unmap_desc(struct qib_pportdata *ppd, unsigned head) ppd 231 drivers/infiniband/hw/qib/qib_sdma.c __le64 *descqp = &ppd->sdma_descq[head].qw[0]; ppd 241 drivers/infiniband/hw/qib/qib_sdma.c dma_unmap_single(&ppd->dd->pcidev->dev, addr, len, DMA_TO_DEVICE); ppd 244 drivers/infiniband/hw/qib/qib_sdma.c static int alloc_sdma(struct qib_pportdata *ppd) ppd 246 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt = sdma_descq_cnt; ppd 247 drivers/infiniband/hw/qib/qib_sdma.c if (!ppd->sdma_descq_cnt) ppd 248 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt = 256; ppd 251 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq = dma_alloc_coherent(&ppd->dd->pcidev->dev, ppd 252 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt * sizeof(u64[2]), &ppd->sdma_descq_phys, ppd 255 drivers/infiniband/hw/qib/qib_sdma.c if (!ppd->sdma_descq) { ppd 256 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_err(ppd->dd, ppd 262 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_dma = dma_alloc_coherent(&ppd->dd->pcidev->dev, ppd 263 drivers/infiniband/hw/qib/qib_sdma.c PAGE_SIZE, &ppd->sdma_head_phys, GFP_KERNEL); ppd 264 drivers/infiniband/hw/qib/qib_sdma.c if (!ppd->sdma_head_dma) { ppd 265 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_err(ppd->dd, ppd 269 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_dma[0] = 0; ppd 273 drivers/infiniband/hw/qib/qib_sdma.c dma_free_coherent(&ppd->dd->pcidev->dev, ppd 274 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt * sizeof(u64[2]), (void *)ppd->sdma_descq, ppd 275 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_phys); ppd 276 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq = NULL; ppd 277 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_phys = 0; ppd 279 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt = 0; ppd 283 drivers/infiniband/hw/qib/qib_sdma.c static void free_sdma(struct qib_pportdata *ppd) ppd 285 drivers/infiniband/hw/qib/qib_sdma.c struct qib_devdata *dd = ppd->dd; ppd 287 drivers/infiniband/hw/qib/qib_sdma.c if (ppd->sdma_head_dma) { ppd 289 drivers/infiniband/hw/qib/qib_sdma.c (void *)ppd->sdma_head_dma, ppd 290 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_phys); ppd 291 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_dma = NULL; ppd 292 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_head_phys = 0; ppd 295 drivers/infiniband/hw/qib/qib_sdma.c if (ppd->sdma_descq) { ppd 297 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt * sizeof(u64[2]), ppd 298 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq, ppd->sdma_descq_phys); ppd 299 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq = NULL; ppd 300 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_phys = 0; ppd 304 drivers/infiniband/hw/qib/qib_sdma.c static inline void make_sdma_desc(struct qib_pportdata *ppd, ppd 315 drivers/infiniband/hw/qib/qib_sdma.c sdmadesc[0] |= (ppd->sdma_generation & 3ULL) << ppd 324 drivers/infiniband/hw/qib/qib_sdma.c int qib_sdma_make_progress(struct qib_pportdata *ppd) ppd 328 drivers/infiniband/hw/qib/qib_sdma.c struct qib_devdata *dd = ppd->dd; ppd 333 drivers/infiniband/hw/qib/qib_sdma.c hwhead = dd->f_sdma_gethead(ppd); ppd 341 drivers/infiniband/hw/qib/qib_sdma.c if (!list_empty(&ppd->sdma_activelist)) { ppd 342 drivers/infiniband/hw/qib/qib_sdma.c lp = ppd->sdma_activelist.next; ppd 347 drivers/infiniband/hw/qib/qib_sdma.c while (ppd->sdma_descq_head != hwhead) { ppd 350 drivers/infiniband/hw/qib/qib_sdma.c (idx == ppd->sdma_descq_head)) { ppd 351 drivers/infiniband/hw/qib/qib_sdma.c unmap_desc(ppd, ppd->sdma_descq_head); ppd 352 drivers/infiniband/hw/qib/qib_sdma.c if (++idx == ppd->sdma_descq_cnt) ppd 357 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_removed++; ppd 360 drivers/infiniband/hw/qib/qib_sdma.c if (++ppd->sdma_descq_head == ppd->sdma_descq_cnt) ppd 361 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_head = 0; ppd 364 drivers/infiniband/hw/qib/qib_sdma.c if (txp && txp->next_descq_idx == ppd->sdma_descq_head) { ppd 370 drivers/infiniband/hw/qib/qib_sdma.c if (list_empty(&ppd->sdma_activelist)) ppd 373 drivers/infiniband/hw/qib/qib_sdma.c lp = ppd->sdma_activelist.next; ppd 382 drivers/infiniband/hw/qib/qib_sdma.c qib_verbs_sdma_desc_avail(ppd, qib_sdma_descq_freecnt(ppd)); ppd 389 drivers/infiniband/hw/qib/qib_sdma.c void qib_sdma_intr(struct qib_pportdata *ppd) ppd 393 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 395 drivers/infiniband/hw/qib/qib_sdma.c __qib_sdma_intr(ppd); ppd 397 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 400 drivers/infiniband/hw/qib/qib_sdma.c void __qib_sdma_intr(struct qib_pportdata *ppd) ppd 402 drivers/infiniband/hw/qib/qib_sdma.c if (__qib_sdma_running(ppd)) { ppd 403 drivers/infiniband/hw/qib/qib_sdma.c qib_sdma_make_progress(ppd); ppd 404 drivers/infiniband/hw/qib/qib_sdma.c if (!list_empty(&ppd->sdma_userpending)) ppd 405 drivers/infiniband/hw/qib/qib_sdma.c qib_user_sdma_send_desc(ppd, &ppd->sdma_userpending); ppd 409 drivers/infiniband/hw/qib/qib_sdma.c int qib_setup_sdma(struct qib_pportdata *ppd) ppd 411 drivers/infiniband/hw/qib/qib_sdma.c struct qib_devdata *dd = ppd->dd; ppd 415 drivers/infiniband/hw/qib/qib_sdma.c ret = alloc_sdma(ppd); ppd 420 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_init_early(ppd); ppd 421 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 422 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 423 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 426 drivers/infiniband/hw/qib/qib_sdma.c kref_init(&ppd->sdma_state.kref); ppd 427 drivers/infiniband/hw/qib/qib_sdma.c init_completion(&ppd->sdma_state.comp); ppd 429 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_generation = 0; ppd 430 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_head = 0; ppd 431 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_removed = 0; ppd 432 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_added = 0; ppd 434 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_intrequest = 0; ppd 435 drivers/infiniband/hw/qib/qib_sdma.c INIT_LIST_HEAD(&ppd->sdma_userpending); ppd 437 drivers/infiniband/hw/qib/qib_sdma.c INIT_LIST_HEAD(&ppd->sdma_activelist); ppd 439 drivers/infiniband/hw/qib/qib_sdma.c tasklet_init(&ppd->sdma_sw_clean_up_task, sdma_sw_clean_up_task, ppd 440 drivers/infiniband/hw/qib/qib_sdma.c (unsigned long)ppd); ppd 442 drivers/infiniband/hw/qib/qib_sdma.c ret = dd->f_init_sdma_regs(ppd); ppd 446 drivers/infiniband/hw/qib/qib_sdma.c qib_sdma_process_event(ppd, qib_sdma_event_e10_go_hw_start); ppd 451 drivers/infiniband/hw/qib/qib_sdma.c qib_teardown_sdma(ppd); ppd 456 drivers/infiniband/hw/qib/qib_sdma.c void qib_teardown_sdma(struct qib_pportdata *ppd) ppd 458 drivers/infiniband/hw/qib/qib_sdma.c qib_sdma_process_event(ppd, qib_sdma_event_e00_go_hw_down); ppd 465 drivers/infiniband/hw/qib/qib_sdma.c sdma_finalput(&ppd->sdma_state); ppd 467 drivers/infiniband/hw/qib/qib_sdma.c free_sdma(ppd); ppd 470 drivers/infiniband/hw/qib/qib_sdma.c int qib_sdma_running(struct qib_pportdata *ppd) ppd 475 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 476 drivers/infiniband/hw/qib/qib_sdma.c ret = __qib_sdma_running(ppd); ppd 477 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 489 drivers/infiniband/hw/qib/qib_sdma.c static void complete_sdma_err_req(struct qib_pportdata *ppd, ppd 498 drivers/infiniband/hw/qib/qib_sdma.c list_add_tail(&tx->txreq.list, &ppd->sdma_activelist); ppd 499 drivers/infiniband/hw/qib/qib_sdma.c clear_sdma_activelist(ppd); ppd 511 drivers/infiniband/hw/qib/qib_sdma.c int qib_sdma_verbs_send(struct qib_pportdata *ppd, ppd 526 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 529 drivers/infiniband/hw/qib/qib_sdma.c if (unlikely(!__qib_sdma_running(ppd))) { ppd 530 drivers/infiniband/hw/qib/qib_sdma.c complete_sdma_err_req(ppd, tx); ppd 534 drivers/infiniband/hw/qib/qib_sdma.c if (tx->txreq.sg_count > qib_sdma_descq_freecnt(ppd)) { ppd 535 drivers/infiniband/hw/qib/qib_sdma.c if (qib_sdma_make_progress(ppd)) ppd 537 drivers/infiniband/hw/qib/qib_sdma.c if (ppd->dd->flags & QIB_HAS_SDMA_TIMEOUT) ppd 538 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_set_desc_cnt(ppd, ppd 539 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_cnt / 2); ppd 544 drivers/infiniband/hw/qib/qib_sdma.c make_sdma_desc(ppd, sdmadesc, (u64) tx->txreq.addr, dwoffset, 0); ppd 551 drivers/infiniband/hw/qib/qib_sdma.c tail = ppd->sdma_descq_tail; ppd 552 drivers/infiniband/hw/qib/qib_sdma.c descqp = &ppd->sdma_descq[tail].qw[0]; ppd 557 drivers/infiniband/hw/qib/qib_sdma.c if (++tail == ppd->sdma_descq_cnt) { ppd 559 drivers/infiniband/hw/qib/qib_sdma.c descqp = &ppd->sdma_descq[0].qw[0]; ppd 560 drivers/infiniband/hw/qib/qib_sdma.c ++ppd->sdma_generation; ppd 571 drivers/infiniband/hw/qib/qib_sdma.c addr = dma_map_single(&ppd->dd->pcidev->dev, sge->vaddr, ppd 573 drivers/infiniband/hw/qib/qib_sdma.c if (dma_mapping_error(&ppd->dd->pcidev->dev, addr)) { ppd 578 drivers/infiniband/hw/qib/qib_sdma.c make_sdma_desc(ppd, sdmadesc, (u64) addr, dw, dwoffset); ppd 587 drivers/infiniband/hw/qib/qib_sdma.c if (++tail == ppd->sdma_descq_cnt) { ppd 589 drivers/infiniband/hw/qib/qib_sdma.c descqp = &ppd->sdma_descq[0].qw[0]; ppd 590 drivers/infiniband/hw/qib/qib_sdma.c ++ppd->sdma_generation; ppd 598 drivers/infiniband/hw/qib/qib_sdma.c descqp = &ppd->sdma_descq[ppd->sdma_descq_cnt].qw[0]; ppd 608 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_update_tail(ppd, tail); ppd 609 drivers/infiniband/hw/qib/qib_sdma.c ppd->sdma_descq_added += tx->txreq.sg_count; ppd 610 drivers/infiniband/hw/qib/qib_sdma.c list_add_tail(&tx->txreq.list, &ppd->sdma_activelist); ppd 616 drivers/infiniband/hw/qib/qib_sdma.c tail = ppd->sdma_descq_cnt - 1; ppd 619 drivers/infiniband/hw/qib/qib_sdma.c if (tail == ppd->sdma_descq_tail) ppd 621 drivers/infiniband/hw/qib/qib_sdma.c unmap_desc(ppd, tail); ppd 654 drivers/infiniband/hw/qib/qib_sdma.c dev = &ppd->dd->verbs_dev; ppd 659 drivers/infiniband/hw/qib/qib_sdma.c ibp = &ppd->ibport_data; ppd 673 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 680 drivers/infiniband/hw/qib/qib_sdma.c void dump_sdma_state(struct qib_pportdata *ppd) ppd 690 drivers/infiniband/hw/qib/qib_sdma.c head = ppd->sdma_descq_head; ppd 691 drivers/infiniband/hw/qib/qib_sdma.c tail = ppd->sdma_descq_tail; ppd 692 drivers/infiniband/hw/qib/qib_sdma.c cnt = qib_sdma_descq_freecnt(ppd); ppd 693 drivers/infiniband/hw/qib/qib_sdma.c descq = ppd->sdma_descq; ppd 695 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_porterr(ppd->dd, ppd->port, ppd 697 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_porterr(ppd->dd, ppd->port, ppd 699 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_porterr(ppd->dd, ppd->port, ppd 718 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_porterr(ppd->dd, ppd->port, ppd 721 drivers/infiniband/hw/qib/qib_sdma.c if (++head == ppd->sdma_descq_cnt) ppd 726 drivers/infiniband/hw/qib/qib_sdma.c list_for_each_entry_safe(txp, txpnext, &ppd->sdma_activelist, ppd 728 drivers/infiniband/hw/qib/qib_sdma.c qib_dev_porterr(ppd->dd, ppd->port, ppd 733 drivers/infiniband/hw/qib/qib_sdma.c void qib_sdma_process_event(struct qib_pportdata *ppd, ppd 738 drivers/infiniband/hw/qib/qib_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 740 drivers/infiniband/hw/qib/qib_sdma.c __qib_sdma_process_event(ppd, event); ppd 742 drivers/infiniband/hw/qib/qib_sdma.c if (ppd->sdma_state.current_state == qib_sdma_state_s99_running) ppd 743 drivers/infiniband/hw/qib/qib_sdma.c qib_verbs_sdma_desc_avail(ppd, qib_sdma_descq_freecnt(ppd)); ppd 745 drivers/infiniband/hw/qib/qib_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 748 drivers/infiniband/hw/qib/qib_sdma.c void __qib_sdma_process_event(struct qib_pportdata *ppd, ppd 751 drivers/infiniband/hw/qib/qib_sdma.c struct qib_sdma_state *ss = &ppd->sdma_state; ppd 769 drivers/infiniband/hw/qib/qib_sdma.c sdma_get(&ppd->sdma_state); ppd 770 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 776 drivers/infiniband/hw/qib/qib_sdma.c sdma_sw_tear_down(ppd); ppd 796 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 797 drivers/infiniband/hw/qib/qib_sdma.c sdma_sw_tear_down(ppd); ppd 802 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ss->go_s99_running ? ppd 830 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 831 drivers/infiniband/hw/qib/qib_sdma.c sdma_sw_tear_down(ppd); ppd 838 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s99_running); ppd 861 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 871 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 873 drivers/infiniband/hw/qib/qib_sdma.c sdma_hw_start_up(ppd); ppd 894 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 895 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 907 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 909 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 928 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 929 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 943 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 945 drivers/infiniband/hw/qib/qib_sdma.c ppd->dd->f_sdma_hw_clean_up(ppd); ppd 962 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s00_hw_down); ppd 963 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 976 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 978 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 981 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s50_hw_halt_wait); ppd 985 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, ppd 987 drivers/infiniband/hw/qib/qib_sdma.c sdma_start_sw_clean_up(ppd); ppd 990 drivers/infiniband/hw/qib/qib_sdma.c sdma_set_state(ppd, qib_sdma_state_s50_hw_halt_wait); ppd 43 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t show_hrtbt_enb(struct qib_pportdata *ppd, char *buf) ppd 45 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_devdata *dd = ppd->dd; ppd 48 drivers/infiniband/hw/qib/qib_sysfs.c ret = dd->f_get_ib_cfg(ppd, QIB_IB_CFG_HRTBT); ppd 53 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t store_hrtbt_enb(struct qib_pportdata *ppd, const char *buf, ppd 56 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_devdata *dd = ppd->dd; ppd 73 drivers/infiniband/hw/qib/qib_sysfs.c ret = dd->f_set_ib_cfg(ppd, QIB_IB_CFG_HRTBT, val); ppd 77 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t store_loopback(struct qib_pportdata *ppd, const char *buf, ppd 80 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_devdata *dd = ppd->dd; ppd 83 drivers/infiniband/hw/qib/qib_sysfs.c r = dd->f_set_ib_loopback(ppd, buf); ppd 90 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t store_led_override(struct qib_pportdata *ppd, const char *buf, ppd 93 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_devdata *dd = ppd->dd; ppd 103 drivers/infiniband/hw/qib/qib_sysfs.c qib_set_led_override(ppd, val); ppd 107 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t show_status(struct qib_pportdata *ppd, char *buf) ppd 111 drivers/infiniband/hw/qib/qib_sysfs.c if (!ppd->statusp) ppd 115 drivers/infiniband/hw/qib/qib_sysfs.c (unsigned long long) *(ppd->statusp)); ppd 137 drivers/infiniband/hw/qib/qib_sysfs.c static ssize_t show_status_str(struct qib_pportdata *ppd, char *buf) ppd 143 drivers/infiniband/hw/qib/qib_sysfs.c if (!ppd->statusp) { ppd 148 drivers/infiniband/hw/qib/qib_sysfs.c s = *(ppd->statusp); ppd 216 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 219 drivers/infiniband/hw/qib/qib_sysfs.c if (!qib_cc_table_size || !ppd->ccti_entries_shadow) ppd 222 drivers/infiniband/hw/qib/qib_sysfs.c ret = ppd->total_cct_entry * sizeof(struct ib_cc_table_entry_shadow) ppd 234 drivers/infiniband/hw/qib/qib_sysfs.c spin_lock(&ppd->cc_shadow_lock); ppd 235 drivers/infiniband/hw/qib/qib_sysfs.c memcpy(buf, ppd->ccti_entries_shadow, count); ppd 236 drivers/infiniband/hw/qib/qib_sysfs.c spin_unlock(&ppd->cc_shadow_lock); ppd 266 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 269 drivers/infiniband/hw/qib/qib_sysfs.c if (!qib_cc_table_size || !ppd->congestion_entries_shadow) ppd 282 drivers/infiniband/hw/qib/qib_sysfs.c spin_lock(&ppd->cc_shadow_lock); ppd 283 drivers/infiniband/hw/qib/qib_sysfs.c memcpy(buf, ppd->congestion_entries_shadow, count); ppd 284 drivers/infiniband/hw/qib/qib_sysfs.c spin_unlock(&ppd->cc_shadow_lock); ppd 301 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 307 drivers/infiniband/hw/qib/qib_sysfs.c return pattr->show(ppd, buf); ppd 315 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 321 drivers/infiniband/hw/qib/qib_sysfs.c return pattr->store(ppd, buf, len); ppd 391 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 393 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_ibport *qibp = &ppd->ibport_data; ppd 478 drivers/infiniband/hw/qib/qib_sysfs.c static void write_per_cpu_##cntr(struct qib_pportdata *ppd, u32 data) \ ppd 480 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_devdata *dd = ppd->dd; \ ppd 481 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_ibport *qibp = &ppd->ibport_data; \ ppd 501 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 503 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_ibport *qibp = &ppd->ibport_data; ppd 522 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd = ppd 524 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_ibport *qibp = &ppd->ibport_data; ppd 533 drivers/infiniband/hw/qib/qib_sysfs.c write_per_cpu_rc_acks(ppd, val); ppd 535 drivers/infiniband/hw/qib/qib_sysfs.c write_per_cpu_rc_qacks(ppd, val); ppd 537 drivers/infiniband/hw/qib/qib_sysfs.c write_per_cpu_rc_delayed_comp(ppd, val); ppd 744 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd; ppd 755 drivers/infiniband/hw/qib/qib_sysfs.c ppd = &dd->pport[port_num - 1]; ppd 757 drivers/infiniband/hw/qib/qib_sysfs.c ret = kobject_init_and_add(&ppd->pport_kobj, &qib_port_ktype, kobj, ppd 765 drivers/infiniband/hw/qib/qib_sysfs.c kobject_uevent(&ppd->pport_kobj, KOBJ_ADD); ppd 767 drivers/infiniband/hw/qib/qib_sysfs.c ret = kobject_init_and_add(&ppd->sl2vl_kobj, &qib_sl2vl_ktype, kobj, ppd 775 drivers/infiniband/hw/qib/qib_sysfs.c kobject_uevent(&ppd->sl2vl_kobj, KOBJ_ADD); ppd 777 drivers/infiniband/hw/qib/qib_sysfs.c ret = kobject_init_and_add(&ppd->diagc_kobj, &qib_diagc_ktype, kobj, ppd 785 drivers/infiniband/hw/qib/qib_sysfs.c kobject_uevent(&ppd->diagc_kobj, KOBJ_ADD); ppd 787 drivers/infiniband/hw/qib/qib_sysfs.c if (!qib_cc_table_size || !ppd->congestion_entries_shadow) ppd 790 drivers/infiniband/hw/qib/qib_sysfs.c ret = kobject_init_and_add(&ppd->pport_cc_kobj, &qib_port_cc_ktype, ppd 799 drivers/infiniband/hw/qib/qib_sysfs.c kobject_uevent(&ppd->pport_cc_kobj, KOBJ_ADD); ppd 801 drivers/infiniband/hw/qib/qib_sysfs.c ret = sysfs_create_bin_file(&ppd->pport_cc_kobj, ppd 810 drivers/infiniband/hw/qib/qib_sysfs.c ret = sysfs_create_bin_file(&ppd->pport_cc_kobj, ppd 826 drivers/infiniband/hw/qib/qib_sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, &cc_setting_bin_attr); ppd 828 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->pport_cc_kobj); ppd 830 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->diagc_kobj); ppd 832 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->sl2vl_kobj); ppd 834 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->pport_kobj); ppd 844 drivers/infiniband/hw/qib/qib_sysfs.c struct qib_pportdata *ppd; ppd 848 drivers/infiniband/hw/qib/qib_sysfs.c ppd = &dd->pport[i]; ppd 850 drivers/infiniband/hw/qib/qib_sysfs.c ppd->congestion_entries_shadow) { ppd 851 drivers/infiniband/hw/qib/qib_sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, ppd 853 drivers/infiniband/hw/qib/qib_sysfs.c sysfs_remove_bin_file(&ppd->pport_cc_kobj, ppd 855 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->pport_cc_kobj); ppd 857 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->diagc_kobj); ppd 858 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->sl2vl_kobj); ppd 859 drivers/infiniband/hw/qib/qib_sysfs.c kobject_put(&ppd->pport_kobj); ppd 107 drivers/infiniband/hw/qib/qib_tx.c dd->f_sendctrl(rcd->ppd, QIB_SENDCTRL_DISARM_BUF(i)); ppd 116 drivers/infiniband/hw/qib/qib_tx.c struct qib_pportdata *ppd; ppd 120 drivers/infiniband/hw/qib/qib_tx.c ppd = dd->pport + pidx; ppd 121 drivers/infiniband/hw/qib/qib_tx.c if (i >= ppd->sdma_state.first_sendbuf && ppd 122 drivers/infiniband/hw/qib/qib_tx.c i < ppd->sdma_state.last_sendbuf) ppd 123 drivers/infiniband/hw/qib/qib_tx.c return ppd; ppd 174 drivers/infiniband/hw/qib/qib_tx.c struct qib_pportdata *ppd, *pppd[QIB_MAX_IB_PORTS]; ppd 188 drivers/infiniband/hw/qib/qib_tx.c ppd = is_sdma_buf(dd, i); ppd 189 drivers/infiniband/hw/qib/qib_tx.c if (ppd) { ppd 190 drivers/infiniband/hw/qib/qib_tx.c pppd[ppd->port] = ppd; ppd 453 drivers/infiniband/hw/qib/qib_tx.c void qib_cancel_sends(struct qib_pportdata *ppd) ppd 455 drivers/infiniband/hw/qib/qib_tx.c struct qib_devdata *dd = ppd->dd; ppd 473 drivers/infiniband/hw/qib/qib_tx.c if (rcd && rcd->ppd == ppd) { ppd 498 drivers/infiniband/hw/qib/qib_tx.c dd->f_sendctrl(ppd, QIB_SENDCTRL_DISARM_ALL | ppd 514 drivers/infiniband/hw/qib/qib_tx.c void qib_hol_down(struct qib_pportdata *ppd) ppd 520 drivers/infiniband/hw/qib/qib_tx.c if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) ppd 521 drivers/infiniband/hw/qib/qib_tx.c qib_cancel_sends(ppd); ppd 529 drivers/infiniband/hw/qib/qib_tx.c void qib_hol_init(struct qib_pportdata *ppd) ppd 531 drivers/infiniband/hw/qib/qib_tx.c if (ppd->hol_state != QIB_HOL_INIT) { ppd 532 drivers/infiniband/hw/qib/qib_tx.c ppd->hol_state = QIB_HOL_INIT; ppd 533 drivers/infiniband/hw/qib/qib_tx.c mod_timer(&ppd->hol_timer, ppd 543 drivers/infiniband/hw/qib/qib_tx.c void qib_hol_up(struct qib_pportdata *ppd) ppd 545 drivers/infiniband/hw/qib/qib_tx.c ppd->hol_state = QIB_HOL_UP; ppd 553 drivers/infiniband/hw/qib/qib_tx.c struct qib_pportdata *ppd = from_timer(ppd, t, hol_timer); ppd 556 drivers/infiniband/hw/qib/qib_tx.c if (!(ppd->dd->flags & QIB_INITTED)) ppd 559 drivers/infiniband/hw/qib/qib_tx.c if (ppd->hol_state != QIB_HOL_UP) { ppd 564 drivers/infiniband/hw/qib/qib_tx.c qib_hol_down(ppd); ppd 565 drivers/infiniband/hw/qib/qib_tx.c mod_timer(&ppd->hol_timer, ppd 54 drivers/infiniband/hw/qib/qib_ud.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 55 drivers/infiniband/hw/qib/qib_ud.c struct qib_devdata *dd = ppd->dd; ppd 85 drivers/infiniband/hw/qib/qib_ud.c ppd = ppd_from_ibp(ibp); ppd 95 drivers/infiniband/hw/qib/qib_ud.c lid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & ppd 96 drivers/infiniband/hw/qib/qib_ud.c ((1 << ppd->lmc) - 1)); ppd 208 drivers/infiniband/hw/qib/qib_ud.c wc.slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & ppd 209 drivers/infiniband/hw/qib/qib_ud.c ((1 << ppd->lmc) - 1)); ppd 211 drivers/infiniband/hw/qib/qib_ud.c wc.dlid_path_bits = rdma_ah_get_dlid(ah_attr) & ((1 << ppd->lmc) - 1); ppd 235 drivers/infiniband/hw/qib/qib_ud.c struct qib_pportdata *ppd; ppd 273 drivers/infiniband/hw/qib/qib_ud.c ppd = ppd_from_ibp(ibp); ppd 283 drivers/infiniband/hw/qib/qib_ud.c lid = rdma_ah_get_dlid(ah_attr) & ~((1 << ppd->lmc) - 1); ppd 284 drivers/infiniband/hw/qib/qib_ud.c if (unlikely(lid == ppd->lid)) { ppd 354 drivers/infiniband/hw/qib/qib_ud.c lid = ppd->lid; ppd 357 drivers/infiniband/hw/qib/qib_ud.c ((1 << ppd->lmc) - 1); ppd 395 drivers/infiniband/hw/qib/qib_ud.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 396 drivers/infiniband/hw/qib/qib_ud.c struct qib_devdata *dd = ppd->dd; ppd 397 drivers/infiniband/hw/qib/qib_ud.c unsigned ctxt = ppd->hw_pidx; ppd 803 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_pportdata *ppd, ppd 901 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->ibmaxlen) { ppd 1047 drivers/infiniband/hw/qib/qib_user_sdma.c static int qib_user_sdma_queue_clean(struct qib_pportdata *ppd, ppd 1050 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_devdata *dd = ppd->dd; ppd 1069 drivers/infiniband/hw/qib/qib_user_sdma.c s64 descd = ppd->sdma_descq_removed - pkt->added; ppd 1112 drivers/infiniband/hw/qib/qib_user_sdma.c static int qib_user_sdma_hwqueue_clean(struct qib_pportdata *ppd) ppd 1117 drivers/infiniband/hw/qib/qib_user_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1118 drivers/infiniband/hw/qib/qib_user_sdma.c ret = qib_sdma_make_progress(ppd); ppd 1119 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1125 drivers/infiniband/hw/qib/qib_user_sdma.c void qib_user_sdma_queue_drain(struct qib_pportdata *ppd, ppd 1128 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_devdata *dd = ppd->dd; ppd 1141 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_hwqueue_clean(ppd); ppd 1142 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_queue_clean(ppd, pq); ppd 1153 drivers/infiniband/hw/qib/qib_user_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1159 drivers/infiniband/hw/qib/qib_user_sdma.c &ppd->sdma_userpending, list) { ppd 1167 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1208 drivers/infiniband/hw/qib/qib_user_sdma.c static void qib_user_sdma_send_frag(struct qib_pportdata *ppd, ppd 1218 drivers/infiniband/hw/qib/qib_user_sdma.c descqp = &ppd->sdma_descq[tail].qw[0]; ppd 1225 drivers/infiniband/hw/qib/qib_user_sdma.c if (ppd->sdma_intrequest) { ppd 1227 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_intrequest = 0; ppd 1235 drivers/infiniband/hw/qib/qib_user_sdma.c void qib_user_sdma_send_desc(struct qib_pportdata *ppd, ppd 1238 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_devdata *dd = ppd->dd; ppd 1243 drivers/infiniband/hw/qib/qib_user_sdma.c nfree = qib_sdma_descq_freecnt(ppd); ppd 1249 drivers/infiniband/hw/qib/qib_user_sdma.c tail_c = tail = ppd->sdma_descq_tail; ppd 1250 drivers/infiniband/hw/qib/qib_user_sdma.c gen_c = gen = ppd->sdma_generation; ppd 1260 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_send_frag(ppd, pkt, i, ofs, tail, gen); ppd 1263 drivers/infiniband/hw/qib/qib_user_sdma.c if (++tail == ppd->sdma_descq_cnt) { ppd 1266 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_intrequest = 1; ppd 1267 drivers/infiniband/hw/qib/qib_user_sdma.c } else if (tail == (ppd->sdma_descq_cnt>>1)) { ppd 1268 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_intrequest = 1; ppd 1282 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_descq[dtail].qw[0] |= ppd 1284 drivers/infiniband/hw/qib/qib_user_sdma.c if (++dtail == ppd->sdma_descq_cnt) ppd 1295 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_descq_added += c; ppd 1298 drivers/infiniband/hw/qib/qib_user_sdma.c pkt->added = ppd->sdma_descq_added; ppd 1306 drivers/infiniband/hw/qib/qib_user_sdma.c if (!nfree || (nsent<<2) > ppd->sdma_descq_cnt) ppd 1311 drivers/infiniband/hw/qib/qib_user_sdma.c if (ppd->sdma_descq_tail != tail_c) { ppd 1312 drivers/infiniband/hw/qib/qib_user_sdma.c ppd->sdma_generation = gen_c; ppd 1313 drivers/infiniband/hw/qib/qib_user_sdma.c dd->f_sdma_update_tail(ppd, tail_c); ppd 1321 drivers/infiniband/hw/qib/qib_user_sdma.c static int qib_user_sdma_push_pkts(struct qib_pportdata *ppd, ppd 1327 drivers/infiniband/hw/qib/qib_user_sdma.c if (unlikely(!(ppd->lflags & QIBL_LINKACTIVE))) ppd 1332 drivers/infiniband/hw/qib/qib_user_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1333 drivers/infiniband/hw/qib/qib_user_sdma.c if (unlikely(!__qib_sdma_running(ppd))) { ppd 1334 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1338 drivers/infiniband/hw/qib/qib_user_sdma.c list_splice_tail_init(pktlist, &ppd->sdma_userpending); ppd 1339 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_send_desc(ppd, &ppd->sdma_userpending); ppd 1340 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1359 drivers/infiniband/hw/qib/qib_user_sdma.c spin_lock_irqsave(&ppd->sdma_lock, flags); ppd 1360 drivers/infiniband/hw/qib/qib_user_sdma.c if (unlikely(!__qib_sdma_running(ppd))) { ppd 1361 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1364 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_send_desc(ppd, pktlist); ppd 1366 drivers/infiniband/hw/qib/qib_user_sdma.c qib_sdma_make_progress(ppd); ppd 1367 drivers/infiniband/hw/qib/qib_user_sdma.c spin_unlock_irqrestore(&ppd->sdma_lock, flags); ppd 1379 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_pportdata *ppd = rcd->ppd; ppd 1389 drivers/infiniband/hw/qib/qib_user_sdma.c if (!qib_sdma_running(ppd)) ppd 1393 drivers/infiniband/hw/qib/qib_user_sdma.c if (pq->added > ppd->sdma_descq_removed) ppd 1394 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_hwqueue_clean(ppd); ppd 1397 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_queue_clean(ppd, pq); ppd 1403 drivers/infiniband/hw/qib/qib_user_sdma.c ret = qib_user_sdma_queue_pkts(dd, ppd, pq, ppd 1417 drivers/infiniband/hw/qib/qib_user_sdma.c if (qib_sdma_descq_freecnt(ppd) < ndesc) { ppd 1418 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_hwqueue_clean(ppd); ppd 1420 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_queue_clean(ppd, pq); ppd 1423 drivers/infiniband/hw/qib/qib_user_sdma.c ret = qib_user_sdma_push_pkts(ppd, pq, &list, mxp); ppd 1441 drivers/infiniband/hw/qib/qib_user_sdma.c int qib_user_sdma_make_progress(struct qib_pportdata *ppd, ppd 1447 drivers/infiniband/hw/qib/qib_user_sdma.c qib_user_sdma_hwqueue_clean(ppd); ppd 1448 drivers/infiniband/hw/qib/qib_user_sdma.c ret = qib_user_sdma_queue_clean(ppd, pq); ppd 45 drivers/infiniband/hw/qib/qib_user_sdma.h int qib_user_sdma_make_progress(struct qib_pportdata *ppd, ppd 48 drivers/infiniband/hw/qib/qib_user_sdma.h void qib_user_sdma_queue_drain(struct qib_pportdata *ppd, ppd 226 drivers/infiniband/hw/qib/qib_verbs.c struct qib_ibport *ibp = &rcd->ppd->ibport_data; ppd 274 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = rcd->ppd; ppd 275 drivers/infiniband/hw/qib/qib_verbs.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 277 drivers/infiniband/hw/qib/qib_verbs.c struct qib_devdata *dd = ppd->dd; ppd 293 drivers/infiniband/hw/qib/qib_verbs.c lid &= ~((1 << ppd->lmc) - 1); ppd 294 drivers/infiniband/hw/qib/qib_verbs.c if (unlikely(lid != ppd->lid)) ppd 668 drivers/infiniband/hw/qib/qib_verbs.c void qib_verbs_sdma_desc_avail(struct qib_pportdata *ppd, unsigned avail) ppd 677 drivers/infiniband/hw/qib/qib_verbs.c dev = &ppd->dd->verbs_dev; ppd 683 drivers/infiniband/hw/qib/qib_verbs.c if (qp->port_num != ppd->port) ppd 779 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 790 drivers/infiniband/hw/qib/qib_verbs.c ret = qib_sdma_verbs_send(ppd, tx->ss, tx->dwords, tx); ppd 798 drivers/infiniband/hw/qib/qib_verbs.c control = dd->f_setpbc_control(ppd, plen, qp->s_srate, ppd 819 drivers/infiniband/hw/qib/qib_verbs.c if (ndesc >= ppd->sdma_descq_cnt) ppd 833 drivers/infiniband/hw/qib/qib_verbs.c ret = qib_sdma_verbs_send(ppd, ss, dwords, tx); ppd 854 drivers/infiniband/hw/qib/qib_verbs.c ret = qib_sdma_verbs_send(ppd, NULL, 0, tx); ppd 912 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = dd->pport + qp->port_num - 1; ppd 922 drivers/infiniband/hw/qib/qib_verbs.c control = dd->f_setpbc_control(ppd, plen, qp->s_srate, ppd 925 drivers/infiniband/hw/qib/qib_verbs.c piobuf = dd->f_getsendbuf(ppd, pbc, &pbufn); ppd 1045 drivers/infiniband/hw/qib/qib_verbs.c int qib_snapshot_counters(struct qib_pportdata *ppd, u64 *swords, ppd 1050 drivers/infiniband/hw/qib/qib_verbs.c struct qib_devdata *dd = ppd->dd; ppd 1057 drivers/infiniband/hw/qib/qib_verbs.c *swords = dd->f_portcntr(ppd, QIBPORTCNTR_WORDSEND); ppd 1058 drivers/infiniband/hw/qib/qib_verbs.c *rwords = dd->f_portcntr(ppd, QIBPORTCNTR_WORDRCV); ppd 1059 drivers/infiniband/hw/qib/qib_verbs.c *spkts = dd->f_portcntr(ppd, QIBPORTCNTR_PKTSEND); ppd 1060 drivers/infiniband/hw/qib/qib_verbs.c *rpkts = dd->f_portcntr(ppd, QIBPORTCNTR_PKTRCV); ppd 1061 drivers/infiniband/hw/qib/qib_verbs.c *xmit_wait = dd->f_portcntr(ppd, QIBPORTCNTR_SENDSTALL); ppd 1076 drivers/infiniband/hw/qib/qib_verbs.c int qib_get_counters(struct qib_pportdata *ppd, ppd 1081 drivers/infiniband/hw/qib/qib_verbs.c if (!(ppd->dd->flags & QIB_PRESENT)) { ppd 1087 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_IBSYMBOLERR); ppd 1089 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_IBLINKERRRECOV); ppd 1096 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_IBLINKDOWN); ppd 1098 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_RXDROPPKT) + ppd 1099 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_RCVOVFL) + ppd 1100 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_ERR_RLEN) + ppd 1101 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_INVALIDRLEN) + ppd 1102 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_ERRLINK) + ppd 1103 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_ERRICRC) + ppd 1104 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_ERRVCRC) + ppd 1105 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_ERRLPCRC) + ppd 1106 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_BADFORMAT); ppd 1108 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_RXLOCALPHYERR); ppd 1110 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_RXVLERR); ppd 1112 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_RCVEBP); ppd 1114 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_UNSUPVL); ppd 1115 drivers/infiniband/hw/qib/qib_verbs.c cntrs->port_xmit_data = ppd->dd->f_portcntr(ppd, ppd 1117 drivers/infiniband/hw/qib/qib_verbs.c cntrs->port_rcv_data = ppd->dd->f_portcntr(ppd, ppd 1119 drivers/infiniband/hw/qib/qib_verbs.c cntrs->port_xmit_packets = ppd->dd->f_portcntr(ppd, ppd 1121 drivers/infiniband/hw/qib/qib_verbs.c cntrs->port_rcv_packets = ppd->dd->f_portcntr(ppd, ppd 1124 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_LLI); ppd 1126 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_EXCESSBUFOVFL); ppd 1128 drivers/infiniband/hw/qib/qib_verbs.c ppd->dd->f_portcntr(ppd, QIBPORTCNTR_VL15PKTDROP); ppd 1197 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = &dd->pport[port_num - 1]; ppd 1199 drivers/infiniband/hw/qib/qib_verbs.c u16 lid = ppd->lid; ppd 1203 drivers/infiniband/hw/qib/qib_verbs.c props->lmc = ppd->lmc; ppd 1204 drivers/infiniband/hw/qib/qib_verbs.c props->state = dd->f_iblink_state(ppd->lastibcstat); ppd 1205 drivers/infiniband/hw/qib/qib_verbs.c props->phys_state = dd->f_ibphys_portstate(ppd->lastibcstat); ppd 1207 drivers/infiniband/hw/qib/qib_verbs.c props->active_width = ppd->link_width_active; ppd 1209 drivers/infiniband/hw/qib/qib_verbs.c props->active_speed = ppd->link_speed_active; ppd 1210 drivers/infiniband/hw/qib/qib_verbs.c props->max_vl_num = qib_num_vls(ppd->vls_supported); ppd 1213 drivers/infiniband/hw/qib/qib_verbs.c switch (ppd->ibmtu) { ppd 1281 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = &dd->pport[port_num - 1]; ppd 1283 drivers/infiniband/hw/qib/qib_verbs.c qib_set_linkstate(ppd, QIB_IB_LINKDOWN); ppd 1292 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1295 drivers/infiniband/hw/qib/qib_verbs.c *guid = ppd->guid; ppd 1326 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd; ppd 1334 drivers/infiniband/hw/qib/qib_verbs.c ppd = ppd_from_ibp(ibp); ppd 1336 drivers/infiniband/hw/qib/qib_verbs.c ah->log_pmtu = ilog2(ppd->ibmtu); ppd 1344 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1345 drivers/infiniband/hw/qib/qib_verbs.c struct qib_devdata *dd = dd_from_ppd(ppd); ppd 1346 drivers/infiniband/hw/qib/qib_verbs.c u8 port_num = ppd->port; ppd 1375 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1376 drivers/infiniband/hw/qib/qib_verbs.c struct qib_devdata *dd = ppd->dd; ppd 1377 drivers/infiniband/hw/qib/qib_verbs.c unsigned ctxt = ppd->hw_pidx; ppd 1389 drivers/infiniband/hw/qib/qib_verbs.c static void init_ibport(struct qib_pportdata *ppd) ppd 1392 drivers/infiniband/hw/qib/qib_verbs.c struct qib_ibport *ibp = &ppd->ibport_data; ppd 1403 drivers/infiniband/hw/qib/qib_verbs.c if (ppd->dd->flags & QIB_HAS_LINK_LATENCY) ppd 1412 drivers/infiniband/hw/qib/qib_verbs.c qib_get_counters(ppd, &cntrs); ppd 1502 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = dd->pport; ppd 1508 drivers/infiniband/hw/qib/qib_verbs.c init_ibport(ppd + i); ppd 1519 drivers/infiniband/hw/qib/qib_verbs.c if (ppd->sdma_descq_cnt) { ppd 1521 drivers/infiniband/hw/qib/qib_verbs.c ppd->sdma_descq_cnt * ppd 1531 drivers/infiniband/hw/qib/qib_verbs.c for (i = 0; i < ppd->sdma_descq_cnt; i++) { ppd 1549 drivers/infiniband/hw/qib/qib_verbs.c ib_qib_sys_image_guid = ppd->guid; ppd 1551 drivers/infiniband/hw/qib/qib_verbs.c ibdev->node_guid = ppd->guid; ppd 1610 drivers/infiniband/hw/qib/qib_verbs.c ppd = dd->pport; ppd 1611 drivers/infiniband/hw/qib/qib_verbs.c for (i = 0; i < dd->num_pports; i++, ppd++) { ppd 1612 drivers/infiniband/hw/qib/qib_verbs.c ctxt = ppd->hw_pidx; ppd 1614 drivers/infiniband/hw/qib/qib_verbs.c &ppd->ibport_data.rvp, ppd 1636 drivers/infiniband/hw/qib/qib_verbs.c if (ppd->sdma_descq_cnt) ppd 1638 drivers/infiniband/hw/qib/qib_verbs.c ppd->sdma_descq_cnt * ppd 1692 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = ppd_from_ibp(ibp); ppd 1695 drivers/infiniband/hw/qib/qib_verbs.c return queue_work(ppd->qib_wq, &priv->s_work); ppd 263 drivers/infiniband/hw/qib/qib_verbs.h int qib_snapshot_counters(struct qib_pportdata *ppd, u64 *swords, ppd 267 drivers/infiniband/hw/qib/qib_verbs.h int qib_get_counters(struct qib_pportdata *ppd, ppd 288 drivers/infiniband/hw/qib/qib_verbs.h void qib_verbs_sdma_desc_avail(struct qib_pportdata *ppd, unsigned avail); ppd 477 drivers/net/dsa/mv88e6xxx/ptp.c struct ptp_pin_desc *ppd = &chip->pin_config[i]; ppd 479 drivers/net/dsa/mv88e6xxx/ptp.c snprintf(ppd->name, sizeof(ppd->name), "mv88e6xxx_gpio%d", i); ppd 480 drivers/net/dsa/mv88e6xxx/ptp.c ppd->index = i; ppd 481 drivers/net/dsa/mv88e6xxx/ptp.c ppd->func = PTP_PF_NONE; ppd 391 drivers/net/ethernet/broadcom/genet/bcmmii.c struct unimac_mdio_pdata *ppd) ppd 401 drivers/net/ethernet/broadcom/genet/bcmmii.c ppd->phy_mask = 1 << pd->phy_address; ppd 403 drivers/net/ethernet/broadcom/genet/bcmmii.c ppd->phy_mask = 0; ppd 423 drivers/net/ethernet/broadcom/genet/bcmmii.c struct unimac_mdio_pdata ppd; ppd 430 drivers/net/ethernet/broadcom/genet/bcmmii.c memset(&ppd, 0, sizeof(ppd)); ppd 432 drivers/net/ethernet/broadcom/genet/bcmmii.c ppd.wait_func = bcmgenet_mii_wait; ppd 433 drivers/net/ethernet/broadcom/genet/bcmmii.c ppd.wait_func_data = priv; ppd 434 drivers/net/ethernet/broadcom/genet/bcmmii.c ppd.bus_name = "bcmgenet MII bus"; ppd 457 drivers/net/ethernet/broadcom/genet/bcmmii.c bcmgenet_mii_pdata_init(priv, &ppd); ppd 463 drivers/net/ethernet/broadcom/genet/bcmmii.c ret = platform_device_add_data(ppdev, &ppd, sizeof(ppd)); ppd 1222 drivers/net/ethernet/intel/igb/igb_ptp.c struct ptp_pin_desc *ppd = &adapter->sdp_config[i]; ppd 1224 drivers/net/ethernet/intel/igb/igb_ptp.c snprintf(ppd->name, sizeof(ppd->name), "SDP%d", i); ppd 1225 drivers/net/ethernet/intel/igb/igb_ptp.c ppd->index = i; ppd 1226 drivers/net/ethernet/intel/igb/igb_ptp.c ppd->func = PTP_PF_NONE; ppd 2706 drivers/net/ethernet/marvell/mv643xx_eth.c struct mv643xx_eth_platform_data ppd; ppd 2712 drivers/net/ethernet/marvell/mv643xx_eth.c memset(&ppd, 0, sizeof(ppd)); ppd 2713 drivers/net/ethernet/marvell/mv643xx_eth.c ppd.shared = pdev; ppd 2721 drivers/net/ethernet/marvell/mv643xx_eth.c if (of_property_read_u32(pnp, "reg", &ppd.port_number)) { ppd 2726 drivers/net/ethernet/marvell/mv643xx_eth.c if (ppd.port_number >= 3) { ppd 2741 drivers/net/ethernet/marvell/mv643xx_eth.c ether_addr_copy(ppd.mac_addr, mac_addr); ppd 2743 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "tx-queue-size", ppd.tx_queue_size); ppd 2744 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "tx-sram-addr", ppd.tx_sram_addr); ppd 2745 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "tx-sram-size", ppd.tx_sram_size); ppd 2746 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "rx-queue-size", ppd.rx_queue_size); ppd 2747 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "rx-sram-addr", ppd.rx_sram_addr); ppd 2748 drivers/net/ethernet/marvell/mv643xx_eth.c mv643xx_eth_property(pnp, "rx-sram-size", ppd.rx_sram_size); ppd 2750 drivers/net/ethernet/marvell/mv643xx_eth.c ppd.phy_node = of_parse_phandle(pnp, "phy-handle", 0); ppd 2751 drivers/net/ethernet/marvell/mv643xx_eth.c if (!ppd.phy_node) { ppd 2752 drivers/net/ethernet/marvell/mv643xx_eth.c ppd.phy_addr = MV643XX_ETH_PHY_NONE; ppd 2753 drivers/net/ethernet/marvell/mv643xx_eth.c of_property_read_u32(pnp, "speed", &ppd.speed); ppd 2754 drivers/net/ethernet/marvell/mv643xx_eth.c of_property_read_u32(pnp, "duplex", &ppd.duplex); ppd 2767 drivers/net/ethernet/marvell/mv643xx_eth.c ret = platform_device_add_data(ppdev, &ppd, sizeof(ppd)); ppd 1245 drivers/ntb/hw/intel/ntb_hw_gen1.c enum ntb_topo xeon_ppd_topo(struct intel_ntb_dev *ndev, u8 ppd) ppd 1247 drivers/ntb/hw/intel/ntb_hw_gen1.c switch (ppd & XEON_PPD_TOPO_MASK) { ppd 1266 drivers/ntb/hw/intel/ntb_hw_gen1.c static inline int xeon_ppd_bar4_split(struct intel_ntb_dev *ndev, u8 ppd) ppd 1268 drivers/ntb/hw/intel/ntb_hw_gen1.c if (ppd & XEON_PPD_SPLIT_BAR_MASK) { ppd 1269 drivers/ntb/hw/intel/ntb_hw_gen1.c dev_dbg(&ndev->ntb.pdev->dev, "PPD %d split bar\n", ppd); ppd 1643 drivers/ntb/hw/intel/ntb_hw_gen1.c u8 ppd; ppd 1717 drivers/ntb/hw/intel/ntb_hw_gen1.c rc = pci_read_config_byte(pdev, XEON_PPD_OFFSET, &ppd); ppd 1721 drivers/ntb/hw/intel/ntb_hw_gen1.c ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); ppd 1722 drivers/ntb/hw/intel/ntb_hw_gen1.c dev_dbg(&pdev->dev, "ppd %#x topo %s\n", ppd, ppd 1728 drivers/ntb/hw/intel/ntb_hw_gen1.c ndev->bar4_split = xeon_ppd_bar4_split(ndev, ppd); ppd 1730 drivers/ntb/hw/intel/ntb_hw_gen1.c ppd, ndev->bar4_split); ppd 149 drivers/ntb/hw/intel/ntb_hw_gen1.h enum ntb_topo xeon_ppd_topo(struct intel_ntb_dev *ndev, u8 ppd); ppd 229 drivers/ntb/hw/intel/ntb_hw_gen3.c u8 ppd; ppd 236 drivers/ntb/hw/intel/ntb_hw_gen3.c rc = pci_read_config_byte(pdev, XEON_PPD_OFFSET, &ppd); ppd 240 drivers/ntb/hw/intel/ntb_hw_gen3.c ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); ppd 241 drivers/ntb/hw/intel/ntb_hw_gen3.c dev_dbg(&pdev->dev, "ppd %#x topo %s\n", ppd, ppd 950 net/packet/af_packet.c struct tpacket3_hdr *ppd) ppd 952 net/packet/af_packet.c ppd->hv1.tp_rxhash = skb_get_hash(pkc->skb); ppd 956 net/packet/af_packet.c struct tpacket3_hdr *ppd) ppd 958 net/packet/af_packet.c ppd->hv1.tp_rxhash = 0; ppd 962 net/packet/af_packet.c struct tpacket3_hdr *ppd) ppd 965 net/packet/af_packet.c ppd->hv1.tp_vlan_tci = skb_vlan_tag_get(pkc->skb); ppd 966 net/packet/af_packet.c ppd->hv1.tp_vlan_tpid = ntohs(pkc->skb->vlan_proto); ppd 967 net/packet/af_packet.c ppd->tp_status = TP_STATUS_VLAN_VALID | TP_STATUS_VLAN_TPID_VALID; ppd 969 net/packet/af_packet.c ppd->hv1.tp_vlan_tci = 0; ppd 970 net/packet/af_packet.c ppd->hv1.tp_vlan_tpid = 0; ppd 971 net/packet/af_packet.c ppd->tp_status = TP_STATUS_AVAILABLE; ppd 976 net/packet/af_packet.c struct tpacket3_hdr *ppd) ppd 978 net/packet/af_packet.c ppd->hv1.tp_padding = 0; ppd 979 net/packet/af_packet.c prb_fill_vlan_info(pkc, ppd); ppd 982 net/packet/af_packet.c prb_fill_rxhash(pkc, ppd); ppd 984 net/packet/af_packet.c prb_clear_rxhash(pkc, ppd); ppd 992 net/packet/af_packet.c struct tpacket3_hdr *ppd; ppd 994 net/packet/af_packet.c ppd = (struct tpacket3_hdr *)curr; ppd 995 net/packet/af_packet.c ppd->tp_next_offset = TOTAL_PKT_LEN_INCL_ALIGN(len); ppd 1001 net/packet/af_packet.c prb_run_all_ft_ops(pkc, ppd); ppd 224 tools/testing/selftests/net/psock_tpacket.c union frame_map ppd; ppd 241 tools/testing/selftests/net/psock_tpacket.c ppd.raw = ring->rd[frame_num].iov_base; ppd 245 tools/testing/selftests/net/psock_tpacket.c test_payload((uint8_t *) ppd.raw + ppd.v1->tp_h.tp_mac, ppd 246 tools/testing/selftests/net/psock_tpacket.c ppd.v1->tp_h.tp_snaplen); ppd 247 tools/testing/selftests/net/psock_tpacket.c total_bytes += ppd.v1->tp_h.tp_snaplen; ppd 251 tools/testing/selftests/net/psock_tpacket.c test_payload((uint8_t *) ppd.raw + ppd.v2->tp_h.tp_mac, ppd 252 tools/testing/selftests/net/psock_tpacket.c ppd.v2->tp_h.tp_snaplen); ppd 253 tools/testing/selftests/net/psock_tpacket.c total_bytes += ppd.v2->tp_h.tp_snaplen; ppd 260 tools/testing/selftests/net/psock_tpacket.c __v1_v2_rx_user_ready(ppd.raw, ring->version); ppd 374 tools/testing/selftests/net/psock_tpacket.c union frame_map ppd; ppd 423 tools/testing/selftests/net/psock_tpacket.c ppd.raw = next; ppd 427 tools/testing/selftests/net/psock_tpacket.c ppd.v1->tp_h.tp_snaplen = packet_len; ppd 428 tools/testing/selftests/net/psock_tpacket.c ppd.v1->tp_h.tp_len = packet_len; ppd 430 tools/testing/selftests/net/psock_tpacket.c memcpy((uint8_t *) ppd.raw + TPACKET_HDRLEN - ppd 433 tools/testing/selftests/net/psock_tpacket.c total_bytes += ppd.v1->tp_h.tp_snaplen; ppd 437 tools/testing/selftests/net/psock_tpacket.c ppd.v2->tp_h.tp_snaplen = packet_len; ppd 438 tools/testing/selftests/net/psock_tpacket.c ppd.v2->tp_h.tp_len = packet_len; ppd 440 tools/testing/selftests/net/psock_tpacket.c memcpy((uint8_t *) ppd.raw + TPACKET2_HDRLEN - ppd 443 tools/testing/selftests/net/psock_tpacket.c total_bytes += ppd.v2->tp_h.tp_snaplen; ppd 547 tools/testing/selftests/net/psock_tpacket.c struct tpacket3_hdr *ppd; ppd 551 tools/testing/selftests/net/psock_tpacket.c ppd = (struct tpacket3_hdr *) ((uint8_t *) pbd + ppd 555 tools/testing/selftests/net/psock_tpacket.c bytes += ppd->tp_snaplen; ppd 557 tools/testing/selftests/net/psock_tpacket.c if (ppd->tp_next_offset) ppd 558 tools/testing/selftests/net/psock_tpacket.c bytes_with_padding += ppd->tp_next_offset; ppd 560 tools/testing/selftests/net/psock_tpacket.c bytes_with_padding += ALIGN_8(ppd->tp_snaplen + ppd->tp_mac); ppd 562 tools/testing/selftests/net/psock_tpacket.c test_payload((uint8_t *) ppd + ppd->tp_mac, ppd->tp_snaplen); ppd 567 tools/testing/selftests/net/psock_tpacket.c ppd = (struct tpacket3_hdr *) ((uint8_t *) ppd + ppd->tp_next_offset);