bp 122 arch/arm/include/asm/hw_breakpoint.h extern int hw_breakpoint_arch_parse(struct perf_event *bp, bp 132 arch/arm/include/asm/hw_breakpoint.h int arch_install_hw_breakpoint(struct perf_event *bp); bp 133 arch/arm/include/asm/hw_breakpoint.h void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 134 arch/arm/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_read(struct perf_event *bp); bp 322 arch/arm/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 324 arch/arm/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 350 arch/arm/kernel/hw_breakpoint.c *slot = bp; bp 379 arch/arm/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 381 arch/arm/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 401 arch/arm/kernel/hw_breakpoint.c if (*slot == bp) { bp 509 arch/arm/kernel/hw_breakpoint.c static int arch_build_bp_info(struct perf_event *bp, bp 583 arch/arm/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 595 arch/arm/kernel/hw_breakpoint.c ret = arch_build_bp_info(bp, attr, hw); bp 626 arch/arm/kernel/hw_breakpoint.c if (is_default_overflow_handler(bp)) { bp 642 arch/arm/kernel/hw_breakpoint.c if (!bp->hw.target) bp 662 arch/arm/kernel/hw_breakpoint.c static void enable_single_step(struct perf_event *bp, u32 addr) bp 664 arch/arm/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 666 arch/arm/kernel/hw_breakpoint.c arch_uninstall_hw_breakpoint(bp); bp 673 arch/arm/kernel/hw_breakpoint.c arch_install_hw_breakpoint(bp); bp 676 arch/arm/kernel/hw_breakpoint.c static void disable_single_step(struct perf_event *bp) bp 678 arch/arm/kernel/hw_breakpoint.c arch_uninstall_hw_breakpoint(bp); bp 679 arch/arm/kernel/hw_breakpoint.c counter_arch_bp(bp)->step_ctrl.enabled = 0; bp 680 arch/arm/kernel/hw_breakpoint.c arch_install_hw_breakpoint(bp); bp 793 arch/arm/kernel/hw_breakpoint.c struct perf_event *bp, **slots; bp 806 arch/arm/kernel/hw_breakpoint.c bp = slots[i]; bp 808 arch/arm/kernel/hw_breakpoint.c if (bp == NULL) bp 811 arch/arm/kernel/hw_breakpoint.c info = counter_arch_bp(bp); bp 824 arch/arm/kernel/hw_breakpoint.c perf_bp_event(bp, regs); bp 825 arch/arm/kernel/hw_breakpoint.c if (!bp->overflow_handler) bp 826 arch/arm/kernel/hw_breakpoint.c enable_single_step(bp, addr); bp 833 arch/arm/kernel/hw_breakpoint.c disable_single_step(bp); bp 1130 arch/arm/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 377 arch/arm/kernel/ptrace.c static void ptrace_hbptriggered(struct perf_event *bp, bp 381 arch/arm/kernel/ptrace.c struct arch_hw_breakpoint *bkpt = counter_arch_bp(bp); bp 386 arch/arm/kernel/ptrace.c if (current->thread.debug.hbp[i] == bp) bp 463 arch/arm/kernel/ptrace.c struct perf_event *bp; bp 475 arch/arm/kernel/ptrace.c bp = tsk->thread.debug.hbp[idx]; bp 476 arch/arm/kernel/ptrace.c if (!bp) { bp 481 arch/arm/kernel/ptrace.c arch_ctrl = counter_arch_bp(bp)->ctrl; bp 491 arch/arm/kernel/ptrace.c reg = bp->attr.bp_addr; bp 509 arch/arm/kernel/ptrace.c struct perf_event *bp; bp 531 arch/arm/kernel/ptrace.c bp = tsk->thread.debug.hbp[idx]; bp 532 arch/arm/kernel/ptrace.c if (!bp) { bp 533 arch/arm/kernel/ptrace.c bp = ptrace_hbp_create(tsk, implied_type); bp 534 arch/arm/kernel/ptrace.c if (IS_ERR(bp)) { bp 535 arch/arm/kernel/ptrace.c ret = PTR_ERR(bp); bp 538 arch/arm/kernel/ptrace.c tsk->thread.debug.hbp[idx] = bp; bp 541 arch/arm/kernel/ptrace.c attr = bp->attr; bp 563 arch/arm/kernel/ptrace.c ret = modify_user_hw_breakpoint(bp, &attr); bp 116 arch/arm64/include/asm/hw_breakpoint.h extern int hw_breakpoint_arch_parse(struct perf_event *bp, bp 122 arch/arm64/include/asm/hw_breakpoint.h extern int arch_install_hw_breakpoint(struct perf_event *bp); bp 123 arch/arm64/include/asm/hw_breakpoint.h extern void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 124 arch/arm64/include/asm/hw_breakpoint.h extern void hw_breakpoint_pmu_read(struct perf_event *bp); bp 344 arch/arm64/kernel/debug-monitors.c bool bp = false; bp 359 arch/arm64/kernel/debug-monitors.c bp = thumb_instr == AARCH32_BREAK_THUMB2_HI; bp 361 arch/arm64/kernel/debug-monitors.c bp = thumb_instr == AARCH32_BREAK_THUMB; bp 368 arch/arm64/kernel/debug-monitors.c bp = (arm_instr & ~0xf0000000) == AARCH32_BREAK_ARM; bp 371 arch/arm64/kernel/debug-monitors.c if (!bp) bp 160 arch/arm64/kernel/hw_breakpoint.c static int is_compat_bp(struct perf_event *bp) bp 162 arch/arm64/kernel/hw_breakpoint.c struct task_struct *tsk = bp->hw.target; bp 189 arch/arm64/kernel/hw_breakpoint.c struct perf_event *bp, bp 200 arch/arm64/kernel/hw_breakpoint.c *slot = bp; bp 205 arch/arm64/kernel/hw_breakpoint.c if (*slot == bp) { bp 211 arch/arm64/kernel/hw_breakpoint.c if (*slot == bp) bp 222 arch/arm64/kernel/hw_breakpoint.c static int hw_breakpoint_control(struct perf_event *bp, bp 225 arch/arm64/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 248 arch/arm64/kernel/hw_breakpoint.c i = hw_breakpoint_slot_setup(slots, max_slots, bp, ops); bp 288 arch/arm64/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 290 arch/arm64/kernel/hw_breakpoint.c return hw_breakpoint_control(bp, HW_BREAKPOINT_INSTALL); bp 293 arch/arm64/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 295 arch/arm64/kernel/hw_breakpoint.c hw_breakpoint_control(bp, HW_BREAKPOINT_UNINSTALL); bp 412 arch/arm64/kernel/hw_breakpoint.c static int arch_build_bp_info(struct perf_event *bp, bp 470 arch/arm64/kernel/hw_breakpoint.c if (is_compat_bp(bp)) { bp 507 arch/arm64/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 515 arch/arm64/kernel/hw_breakpoint.c ret = arch_build_bp_info(bp, attr, hw); bp 528 arch/arm64/kernel/hw_breakpoint.c if (is_compat_bp(bp)) { bp 569 arch/arm64/kernel/hw_breakpoint.c if (hw->ctrl.privilege == AARCH64_BREAKPOINT_EL1 && bp->hw.target) bp 626 arch/arm64/kernel/hw_breakpoint.c struct perf_event *bp, **slots; bp 637 arch/arm64/kernel/hw_breakpoint.c bp = slots[i]; bp 639 arch/arm64/kernel/hw_breakpoint.c if (bp == NULL) bp 653 arch/arm64/kernel/hw_breakpoint.c counter_arch_bp(bp)->trigger = addr; bp 654 arch/arm64/kernel/hw_breakpoint.c perf_bp_event(bp, regs); bp 657 arch/arm64/kernel/hw_breakpoint.c if (is_default_overflow_handler(bp)) bp 1012 arch/arm64/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 170 arch/arm64/kernel/ptrace.c static void ptrace_hbptriggered(struct perf_event *bp, bp 174 arch/arm64/kernel/ptrace.c struct arch_hw_breakpoint *bkpt = counter_arch_bp(bp); bp 183 arch/arm64/kernel/ptrace.c if (current->thread.debug.hbp_break[i] == bp) { bp 190 arch/arm64/kernel/ptrace.c if (current->thread.debug.hbp_watch[i] == bp) { bp 238 arch/arm64/kernel/ptrace.c struct perf_event *bp = ERR_PTR(-EINVAL); bp 245 arch/arm64/kernel/ptrace.c bp = tsk->thread.debug.hbp_break[idx]; bp 251 arch/arm64/kernel/ptrace.c bp = tsk->thread.debug.hbp_watch[idx]; bp 256 arch/arm64/kernel/ptrace.c return bp; bp 262 arch/arm64/kernel/ptrace.c struct perf_event *bp) bp 271 arch/arm64/kernel/ptrace.c tsk->thread.debug.hbp_break[idx] = bp; bp 278 arch/arm64/kernel/ptrace.c tsk->thread.debug.hbp_watch[idx] = bp; bp 291 arch/arm64/kernel/ptrace.c struct perf_event *bp; bp 317 arch/arm64/kernel/ptrace.c bp = register_user_hw_breakpoint(&attr, ptrace_hbptriggered, NULL, tsk); bp 318 arch/arm64/kernel/ptrace.c if (IS_ERR(bp)) bp 319 arch/arm64/kernel/ptrace.c return bp; bp 321 arch/arm64/kernel/ptrace.c err = ptrace_hbp_set_event(note_type, tsk, idx, bp); bp 325 arch/arm64/kernel/ptrace.c return bp; bp 391 arch/arm64/kernel/ptrace.c struct perf_event *bp = ptrace_hbp_get_event(note_type, tsk, idx); bp 393 arch/arm64/kernel/ptrace.c if (IS_ERR(bp)) bp 394 arch/arm64/kernel/ptrace.c return PTR_ERR(bp); bp 396 arch/arm64/kernel/ptrace.c *ctrl = bp ? encode_ctrl_reg(counter_arch_bp(bp)->ctrl) : 0; bp 405 arch/arm64/kernel/ptrace.c struct perf_event *bp = ptrace_hbp_get_event(note_type, tsk, idx); bp 407 arch/arm64/kernel/ptrace.c if (IS_ERR(bp)) bp 408 arch/arm64/kernel/ptrace.c return PTR_ERR(bp); bp 410 arch/arm64/kernel/ptrace.c *addr = bp ? counter_arch_bp(bp)->address : 0; bp 418 arch/arm64/kernel/ptrace.c struct perf_event *bp = ptrace_hbp_get_event(note_type, tsk, idx); bp 420 arch/arm64/kernel/ptrace.c if (!bp) bp 421 arch/arm64/kernel/ptrace.c bp = ptrace_hbp_create(note_type, tsk, idx); bp 423 arch/arm64/kernel/ptrace.c return bp; bp 432 arch/arm64/kernel/ptrace.c struct perf_event *bp; bp 436 arch/arm64/kernel/ptrace.c bp = ptrace_hbp_get_initialised_bp(note_type, tsk, idx); bp 437 arch/arm64/kernel/ptrace.c if (IS_ERR(bp)) { bp 438 arch/arm64/kernel/ptrace.c err = PTR_ERR(bp); bp 442 arch/arm64/kernel/ptrace.c attr = bp->attr; bp 448 arch/arm64/kernel/ptrace.c return modify_user_hw_breakpoint(bp, &attr); bp 457 arch/arm64/kernel/ptrace.c struct perf_event *bp; bp 460 arch/arm64/kernel/ptrace.c bp = ptrace_hbp_get_initialised_bp(note_type, tsk, idx); bp 461 arch/arm64/kernel/ptrace.c if (IS_ERR(bp)) { bp 462 arch/arm64/kernel/ptrace.c err = PTR_ERR(bp); bp 466 arch/arm64/kernel/ptrace.c attr = bp->attr; bp 468 arch/arm64/kernel/ptrace.c err = modify_user_hw_breakpoint(bp, &attr); bp 249 arch/h8300/kernel/ptrace_h.c asmlinkage void trace_trap(unsigned long bp) bp 251 arch/h8300/kernel/ptrace_h.c if ((unsigned long)current->thread.breakinfo.addr == bp) { bp 40 arch/h8300/kernel/ptrace_s.c asmlinkage void trace_trap(unsigned long bp) bp 42 arch/h8300/kernel/ptrace_s.c (void)bp; bp 71 arch/ia64/kernel/unwind_decoder.c unsigned char *bp = *dpp; bp 75 arch/ia64/kernel/unwind_decoder.c byte = *bp++; bp 81 arch/ia64/kernel/unwind_decoder.c *dpp = bp; bp 338 arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c gmx_tx_ovr_bp.s.bp &= ~(1 << index); bp 1107 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 1111 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 1403 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:2; bp 1405 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:2; bp 1412 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 1414 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 1647 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:2; bp 1653 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:2; bp 1664 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 1670 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t bp:1; bp 2099 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:4; bp 2103 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:4; bp 2115 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:3; bp 2121 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:3; bp 2131 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:4; bp 2135 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:4; bp 2147 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:2; bp 2153 arch/mips/include/asm/octeon/cvmx-gmxx-defs.h uint64_t bp:2; bp 3426 arch/mips/include/asm/octeon/cvmx-npei-defs.h uint64_t bp:32; bp 3428 arch/mips/include/asm/octeon/cvmx-npei-defs.h uint64_t bp:32; bp 52 arch/powerpc/include/asm/hw_breakpoint.h extern int hw_breakpoint_arch_parse(struct perf_event *bp, bp 57 arch/powerpc/include/asm/hw_breakpoint.h int arch_install_hw_breakpoint(struct perf_event *bp); bp 58 arch/powerpc/include/asm/hw_breakpoint.h void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 59 arch/powerpc/include/asm/hw_breakpoint.h void arch_unregister_hw_breakpoint(struct perf_event *bp); bp 60 arch/powerpc/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_read(struct perf_event *bp); bp 64 arch/powerpc/include/asm/hw_breakpoint.h extern void ptrace_triggered(struct perf_event *bp, bp 314 arch/powerpc/include/uapi/asm/kvm.h } bp[16]; bp 54 arch/powerpc/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 56 arch/powerpc/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 59 arch/powerpc/kernel/hw_breakpoint.c *slot = bp; bp 65 arch/powerpc/kernel/hw_breakpoint.c if (current->thread.last_hit_ubp != bp) bp 80 arch/powerpc/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 84 arch/powerpc/kernel/hw_breakpoint.c if (*slot != bp) { bp 97 arch/powerpc/kernel/hw_breakpoint.c void arch_unregister_hw_breakpoint(struct perf_event *bp) bp 105 arch/powerpc/kernel/hw_breakpoint.c if (bp->ctx && bp->ctx->task && bp->ctx->task != ((void *)-1L)) bp 106 arch/powerpc/kernel/hw_breakpoint.c bp->ctx->task->thread.last_hit_ubp = NULL; bp 132 arch/powerpc/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 138 arch/powerpc/kernel/hw_breakpoint.c if (!bp) bp 211 arch/powerpc/kernel/hw_breakpoint.c static bool stepping_handler(struct pt_regs *regs, struct perf_event *bp, bp 227 arch/powerpc/kernel/hw_breakpoint.c current->thread.last_hit_ubp = bp; bp 246 arch/powerpc/kernel/hw_breakpoint.c perf_event_disable_inatomic(bp); bp 253 arch/powerpc/kernel/hw_breakpoint.c struct perf_event *bp; bp 269 arch/powerpc/kernel/hw_breakpoint.c bp = __this_cpu_read(bp_per_reg); bp 270 arch/powerpc/kernel/hw_breakpoint.c if (!bp) { bp 274 arch/powerpc/kernel/hw_breakpoint.c info = counter_arch_bp(bp); bp 282 arch/powerpc/kernel/hw_breakpoint.c if (bp->overflow_handler == ptrace_triggered) { bp 283 arch/powerpc/kernel/hw_breakpoint.c perf_bp_event(bp, regs); bp 295 arch/powerpc/kernel/hw_breakpoint.c if (!((bp->attr.bp_addr <= dar) && bp 296 arch/powerpc/kernel/hw_breakpoint.c (dar - bp->attr.bp_addr < bp->attr.bp_len))) bp 299 arch/powerpc/kernel/hw_breakpoint.c if (!IS_ENABLED(CONFIG_PPC_8xx) && !stepping_handler(regs, bp, info->address)) bp 307 arch/powerpc/kernel/hw_breakpoint.c perf_bp_event(bp, regs); bp 322 arch/powerpc/kernel/hw_breakpoint.c struct perf_event *bp = NULL; bp 325 arch/powerpc/kernel/hw_breakpoint.c bp = current->thread.last_hit_ubp; bp 330 arch/powerpc/kernel/hw_breakpoint.c if (!bp) bp 333 arch/powerpc/kernel/hw_breakpoint.c info = counter_arch_bp(bp); bp 340 arch/powerpc/kernel/hw_breakpoint.c perf_bp_event(bp, regs); bp 388 arch/powerpc/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 2368 arch/powerpc/kernel/ptrace.c void ptrace_triggered(struct perf_event *bp, bp 2379 arch/powerpc/kernel/ptrace.c attr = bp->attr; bp 2381 arch/powerpc/kernel/ptrace.c modify_user_hw_breakpoint(bp, &attr); bp 2391 arch/powerpc/kernel/ptrace.c struct perf_event *bp; bp 2431 arch/powerpc/kernel/ptrace.c bp = thread->ptrace_bps[0]; bp 2433 arch/powerpc/kernel/ptrace.c if (bp) { bp 2434 arch/powerpc/kernel/ptrace.c unregister_hw_breakpoint(bp); bp 2439 arch/powerpc/kernel/ptrace.c if (bp) { bp 2440 arch/powerpc/kernel/ptrace.c attr = bp->attr; bp 2447 arch/powerpc/kernel/ptrace.c ret = modify_user_hw_breakpoint(bp, &attr); bp 2451 arch/powerpc/kernel/ptrace.c thread->ptrace_bps[0] = bp; bp 2463 arch/powerpc/kernel/ptrace.c thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, bp 2465 arch/powerpc/kernel/ptrace.c if (IS_ERR(bp)) { bp 2467 arch/powerpc/kernel/ptrace.c return PTR_ERR(bp); bp 2831 arch/powerpc/kernel/ptrace.c struct perf_event *bp; bp 2901 arch/powerpc/kernel/ptrace.c bp = thread->ptrace_bps[0]; bp 2902 arch/powerpc/kernel/ptrace.c if (bp) bp 2911 arch/powerpc/kernel/ptrace.c thread->ptrace_bps[0] = bp = register_user_hw_breakpoint(&attr, bp 2913 arch/powerpc/kernel/ptrace.c if (IS_ERR(bp)) { bp 2915 arch/powerpc/kernel/ptrace.c return PTR_ERR(bp); bp 2941 arch/powerpc/kernel/ptrace.c struct perf_event *bp; bp 2964 arch/powerpc/kernel/ptrace.c bp = thread->ptrace_bps[0]; bp 2965 arch/powerpc/kernel/ptrace.c if (bp) { bp 2966 arch/powerpc/kernel/ptrace.c unregister_hw_breakpoint(bp); bp 2063 arch/powerpc/kvm/booke.c uint64_t addr = dbg->arch.bp[n].addr; bp 2064 arch/powerpc/kvm/booke.c uint32_t type = dbg->arch.bp[n].type; bp 663 arch/powerpc/lib/sstep.c const unsigned char *bp; bp 729 arch/powerpc/lib/sstep.c bp = mem; bp 732 arch/powerpc/lib/sstep.c reg->b[i] = *bp++; bp 748 arch/powerpc/lib/sstep.c unsigned char *bp; bp 805 arch/powerpc/lib/sstep.c bp = mem; bp 808 arch/powerpc/lib/sstep.c *bp++ = reg->b[i]; bp 616 arch/powerpc/mm/book3s64/hash_utils.c long int ap, bp; bp 619 arch/powerpc/mm/book3s64/hash_utils.c for (bp = 0; bp < MMU_PAGE_COUNT; ++bp) { bp 620 arch/powerpc/mm/book3s64/hash_utils.c if (!mmu_psize_defs[bp].shift) bp 622 arch/powerpc/mm/book3s64/hash_utils.c for (ap = bp; ap < MMU_PAGE_COUNT; ++ap) { bp 623 arch/powerpc/mm/book3s64/hash_utils.c penc = mmu_psize_defs[bp].penc[ap]; bp 635 arch/powerpc/mm/book3s64/hash_utils.c hpte_page_sizes[penc] = (ap << 4) | bp; bp 280 arch/powerpc/platforms/8xx/cpm1.c u32 __iomem *bp; bp 283 arch/powerpc/platforms/8xx/cpm1.c bp = &cpmp->cp_brgc1; bp 284 arch/powerpc/platforms/8xx/cpm1.c bp += brg; bp 290 arch/powerpc/platforms/8xx/cpm1.c out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN); bp 292 arch/powerpc/platforms/8xx/cpm1.c out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) | bp 451 arch/powerpc/platforms/powermac/pci.c static void __init init_bandit(struct pci_controller *bp) bp 457 arch/powerpc/platforms/powermac/pci.c out_le32(bp->cfg_addr, (1UL << BANDIT_DEVNUM) + PCI_VENDOR_ID); bp 459 arch/powerpc/platforms/powermac/pci.c vendev = in_le32(bp->cfg_data); bp 463 arch/powerpc/platforms/powermac/pci.c out_le32(bp->cfg_addr, bp 466 arch/powerpc/platforms/powermac/pci.c rev = in_8(bp->cfg_data); bp 476 arch/powerpc/platforms/powermac/pci.c out_le32(bp->cfg_addr, (1UL << BANDIT_DEVNUM) + BANDIT_MAGIC); bp 478 arch/powerpc/platforms/powermac/pci.c magic = in_le32(bp->cfg_data); bp 483 arch/powerpc/platforms/powermac/pci.c out_le32(bp->cfg_data, magic); bp 117 arch/powerpc/sysdev/cpm2.c u32 __iomem *bp; bp 123 arch/powerpc/sysdev/cpm2.c bp = cpm2_map_size(im_brgc1, 16); bp 125 arch/powerpc/sysdev/cpm2.c bp = cpm2_map_size(im_brgc5, 16); bp 128 arch/powerpc/sysdev/cpm2.c bp += brg; bp 134 arch/powerpc/sysdev/cpm2.c out_be32(bp, val); bp 135 arch/powerpc/sysdev/cpm2.c cpm2_unmap(bp); bp 26 arch/powerpc/sysdev/grackle.c static inline void grackle_set_stg(struct pci_controller* bp, int enable) bp 30 arch/powerpc/sysdev/grackle.c out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8)); bp 31 arch/powerpc/sysdev/grackle.c val = in_le32(bp->cfg_data); bp 34 arch/powerpc/sysdev/grackle.c out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8)); bp 35 arch/powerpc/sysdev/grackle.c out_le32(bp->cfg_data, val); bp 36 arch/powerpc/sysdev/grackle.c (void)in_le32(bp->cfg_data); bp 39 arch/powerpc/sysdev/grackle.c static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable) bp 43 arch/powerpc/sysdev/grackle.c out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8)); bp 44 arch/powerpc/sysdev/grackle.c val = in_le32(bp->cfg_data); bp 47 arch/powerpc/sysdev/grackle.c out_be32(bp->cfg_addr, GRACKLE_CFA(0, 0, 0xa8)); bp 48 arch/powerpc/sysdev/grackle.c out_le32(bp->cfg_data, val); bp 49 arch/powerpc/sysdev/grackle.c (void)in_le32(bp->cfg_data); bp 117 arch/powerpc/xmon/xmon.c #define BP_NUM(bp) ((bp) - bpts + 1) bp 490 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 510 arch/powerpc/xmon/xmon.c bp = in_breakpoint_table(regs->nip, &offset); bp 511 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 512 arch/powerpc/xmon/xmon.c regs->nip = bp->address + offset; bp 513 arch/powerpc/xmon/xmon.c atomic_dec(&bp->ref_count); bp 550 arch/powerpc/xmon/xmon.c bp = NULL; bp 552 arch/powerpc/xmon/xmon.c bp = at_breakpoint(regs->nip); bp 553 arch/powerpc/xmon/xmon.c if (bp || unrecoverable_excp(regs)) bp 560 arch/powerpc/xmon/xmon.c if (bp) { bp 562 arch/powerpc/xmon/xmon.c cpu, BP_NUM(bp)); bp 614 arch/powerpc/xmon/xmon.c if (bp || TRAP(regs) == 0xd00) bp 671 arch/powerpc/xmon/xmon.c bp = at_breakpoint(regs->nip); bp 672 arch/powerpc/xmon/xmon.c if (bp) { bp 673 arch/powerpc/xmon/xmon.c printf("Stopped at breakpoint %tx (", BP_NUM(bp)); bp 683 arch/powerpc/xmon/xmon.c if (bp || TRAP(regs) == 0xd00) bp 698 arch/powerpc/xmon/xmon.c bp = at_breakpoint(regs->nip); bp 699 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 700 arch/powerpc/xmon/xmon.c regs->nip = (unsigned long) &bp->instr[0]; bp 701 arch/powerpc/xmon/xmon.c atomic_inc(&bp->ref_count); bp 706 arch/powerpc/xmon/xmon.c bp = at_breakpoint(regs->nip); bp 707 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 708 arch/powerpc/xmon/xmon.c int stepped = emulate_step(regs, bp->instr[0]); bp 710 arch/powerpc/xmon/xmon.c regs->nip = (unsigned long) &bp->instr[0]; bp 711 arch/powerpc/xmon/xmon.c atomic_inc(&bp->ref_count); bp 714 arch/powerpc/xmon/xmon.c (IS_RFID(bp->instr[0])? "rfid": "mtmsrd")); bp 755 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 762 arch/powerpc/xmon/xmon.c bp = in_breakpoint_table(regs->nip, &offset); bp 763 arch/powerpc/xmon/xmon.c if (bp != NULL && offset == 4) { bp 764 arch/powerpc/xmon/xmon.c regs->nip = bp->address + 4; bp 765 arch/powerpc/xmon/xmon.c atomic_dec(&bp->ref_count); bp 770 arch/powerpc/xmon/xmon.c bp = at_breakpoint(regs->nip); bp 771 arch/powerpc/xmon/xmon.c if (!bp) bp 818 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 825 arch/powerpc/xmon/xmon.c bp = in_breakpoint_table(regs->nip, &offset); bp 826 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 827 arch/powerpc/xmon/xmon.c regs->nip = bp->address + offset; bp 828 arch/powerpc/xmon/xmon.c atomic_dec(&bp->ref_count); bp 848 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 850 arch/powerpc/xmon/xmon.c bp = bpts; bp 851 arch/powerpc/xmon/xmon.c for (i = 0; i < NBPTS; ++i, ++bp) bp 852 arch/powerpc/xmon/xmon.c if (bp->enabled && pc == bp->address) bp 853 arch/powerpc/xmon/xmon.c return bp; bp 874 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 877 arch/powerpc/xmon/xmon.c bp = at_breakpoint(a); bp 878 arch/powerpc/xmon/xmon.c if (bp) bp 879 arch/powerpc/xmon/xmon.c return bp; bp 881 arch/powerpc/xmon/xmon.c for (bp = bpts; bp < &bpts[NBPTS]; ++bp) { bp 882 arch/powerpc/xmon/xmon.c if (!bp->enabled && atomic_read(&bp->ref_count) == 0) { bp 883 arch/powerpc/xmon/xmon.c bp->address = a; bp 884 arch/powerpc/xmon/xmon.c bp->instr[1] = bpinstr; bp 885 arch/powerpc/xmon/xmon.c store_inst(&bp->instr[1]); bp 886 arch/powerpc/xmon/xmon.c return bp; bp 897 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 899 arch/powerpc/xmon/xmon.c bp = bpts; bp 900 arch/powerpc/xmon/xmon.c for (i = 0; i < NBPTS; ++i, ++bp) { bp 901 arch/powerpc/xmon/xmon.c if ((bp->enabled & (BP_TRAP|BP_CIABR)) == 0) bp 903 arch/powerpc/xmon/xmon.c if (mread(bp->address, &bp->instr[0], 4) != 4) { bp 905 arch/powerpc/xmon/xmon.c "disabling breakpoint there\n", bp->address); bp 906 arch/powerpc/xmon/xmon.c bp->enabled = 0; bp 909 arch/powerpc/xmon/xmon.c if (IS_MTMSRD(bp->instr[0]) || IS_RFID(bp->instr[0])) { bp 911 arch/powerpc/xmon/xmon.c "instruction, disabling it\n", bp->address); bp 912 arch/powerpc/xmon/xmon.c bp->enabled = 0; bp 915 arch/powerpc/xmon/xmon.c store_inst(&bp->instr[0]); bp 916 arch/powerpc/xmon/xmon.c if (bp->enabled & BP_CIABR) bp 918 arch/powerpc/xmon/xmon.c if (patch_instruction((unsigned int *)bp->address, bp 921 arch/powerpc/xmon/xmon.c "disabling breakpoint there\n", bp->address); bp 922 arch/powerpc/xmon/xmon.c bp->enabled &= ~BP_TRAP; bp 925 arch/powerpc/xmon/xmon.c store_inst((void *)bp->address); bp 947 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 950 arch/powerpc/xmon/xmon.c bp = bpts; bp 951 arch/powerpc/xmon/xmon.c for (i = 0; i < NBPTS; ++i, ++bp) { bp 952 arch/powerpc/xmon/xmon.c if ((bp->enabled & (BP_TRAP|BP_CIABR)) != BP_TRAP) bp 954 arch/powerpc/xmon/xmon.c if (mread(bp->address, &instr, 4) == 4 bp 957 arch/powerpc/xmon/xmon.c (unsigned int *)bp->address, bp->instr[0]) != 0) bp 959 arch/powerpc/xmon/xmon.c bp->address); bp 961 arch/powerpc/xmon/xmon.c store_inst((void *)bp->address); bp 1368 arch/powerpc/xmon/xmon.c struct bpt *bp; bp 1416 arch/powerpc/xmon/xmon.c bp = new_breakpoint(a); bp 1417 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 1418 arch/powerpc/xmon/xmon.c bp->enabled |= BP_CIABR; bp 1419 arch/powerpc/xmon/xmon.c iabr = bp; bp 1438 arch/powerpc/xmon/xmon.c bp = &bpts[a-1]; /* bp nums are 1 based */ bp 1441 arch/powerpc/xmon/xmon.c bp = at_breakpoint(a); bp 1442 arch/powerpc/xmon/xmon.c if (bp == NULL) { bp 1448 arch/powerpc/xmon/xmon.c printf("Cleared breakpoint %tx (", BP_NUM(bp)); bp 1449 arch/powerpc/xmon/xmon.c xmon_print_symbol(bp->address, " ", ")\n"); bp 1450 arch/powerpc/xmon/xmon.c bp->enabled = 0; bp 1472 arch/powerpc/xmon/xmon.c for (bp = bpts; bp < &bpts[NBPTS]; ++bp) { bp 1473 arch/powerpc/xmon/xmon.c if (!bp->enabled) bp 1475 arch/powerpc/xmon/xmon.c printf("%tx %s ", BP_NUM(bp), bp 1476 arch/powerpc/xmon/xmon.c (bp->enabled & BP_CIABR) ? "inst": "trap"); bp 1477 arch/powerpc/xmon/xmon.c xmon_print_symbol(bp->address, " ", "\n"); bp 1484 arch/powerpc/xmon/xmon.c bp = new_breakpoint(a); bp 1485 arch/powerpc/xmon/xmon.c if (bp != NULL) { bp 1486 arch/powerpc/xmon/xmon.c bp->enabled |= BP_TRAP; bp 58 arch/sh/include/asm/hw_breakpoint.h extern int hw_breakpoint_arch_parse(struct perf_event *bp, bp 64 arch/sh/include/asm/hw_breakpoint.h int arch_install_hw_breakpoint(struct perf_event *bp); bp 65 arch/sh/include/asm/hw_breakpoint.h void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 66 arch/sh/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_read(struct perf_event *bp); bp 68 arch/sh/include/asm/hw_breakpoint.h extern void arch_fill_perf_breakpoint(struct perf_event *bp); bp 123 arch/sh/include/asm/ptrace.h extern void ptrace_triggered(struct perf_event *bp, bp 47 arch/sh/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 49 arch/sh/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 56 arch/sh/kernel/hw_breakpoint.c *slot = bp; bp 79 arch/sh/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 81 arch/sh/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 87 arch/sh/kernel/hw_breakpoint.c if (*slot == bp) { bp 174 arch/sh/kernel/hw_breakpoint.c static int arch_build_bp_info(struct perf_event *bp, bp 219 arch/sh/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 226 arch/sh/kernel/hw_breakpoint.c ret = arch_build_bp_info(bp, attr, hw); bp 276 arch/sh/kernel/hw_breakpoint.c struct perf_event *bp; bp 311 arch/sh/kernel/hw_breakpoint.c bp = per_cpu(bp_per_reg[i], cpu); bp 312 arch/sh/kernel/hw_breakpoint.c if (bp) bp 325 arch/sh/kernel/hw_breakpoint.c if (!bp) { bp 334 arch/sh/kernel/hw_breakpoint.c if (bp->overflow_handler == ptrace_triggered) bp 337 arch/sh/kernel/hw_breakpoint.c perf_bp_event(bp, args->regs); bp 340 arch/sh/kernel/hw_breakpoint.c if (!arch_check_bp_in_kernelspace(&bp->hw.info)) { bp 391 arch/sh/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 63 arch/sh/kernel/ptrace_32.c void ptrace_triggered(struct perf_event *bp, bp 72 arch/sh/kernel/ptrace_32.c attr = bp->attr; bp 74 arch/sh/kernel/ptrace_32.c modify_user_hw_breakpoint(bp, &attr); bp 80 arch/sh/kernel/ptrace_32.c struct perf_event *bp; bp 83 arch/sh/kernel/ptrace_32.c bp = thread->ptrace_bps[0]; bp 84 arch/sh/kernel/ptrace_32.c if (!bp) { bp 91 arch/sh/kernel/ptrace_32.c bp = register_user_hw_breakpoint(&attr, ptrace_triggered, bp 93 arch/sh/kernel/ptrace_32.c if (IS_ERR(bp)) bp 94 arch/sh/kernel/ptrace_32.c return PTR_ERR(bp); bp 96 arch/sh/kernel/ptrace_32.c thread->ptrace_bps[0] = bp; bp 100 arch/sh/kernel/ptrace_32.c attr = bp->attr; bp 104 arch/sh/kernel/ptrace_32.c err = modify_user_hw_breakpoint(bp, &attr); bp 487 arch/sparc/kernel/chmc.c static int chmc_bank_match(struct chmc_bank_info *bp, unsigned long phys_addr) bp 493 arch/sparc/kernel/chmc.c if (bp->valid == 0) bp 497 arch/sparc/kernel/chmc.c upper_bits ^= bp->um; /* What bits are different? */ bp 499 arch/sparc/kernel/chmc.c upper_bits |= bp->uk; /* What bits don't matter for matching? */ bp 506 arch/sparc/kernel/chmc.c lower_bits ^= bp->lm; /* What bits are different? */ bp 508 arch/sparc/kernel/chmc.c lower_bits |= bp->lk; /* What bits don't matter for matching? */ bp 527 arch/sparc/kernel/chmc.c struct chmc_bank_info *bp; bp 529 arch/sparc/kernel/chmc.c bp = &p->logical_banks[bank_no]; bp 530 arch/sparc/kernel/chmc.c if (chmc_bank_match(bp, phys_addr)) bp 531 arch/sparc/kernel/chmc.c return bp; bp 543 arch/sparc/kernel/chmc.c struct chmc_bank_info *bp; bp 547 arch/sparc/kernel/chmc.c bp = chmc_find_bank(phys_addr); bp 548 arch/sparc/kernel/chmc.c if (bp == NULL || bp 558 arch/sparc/kernel/chmc.c prop = &bp->p->layout_prop; bp 559 arch/sparc/kernel/chmc.c bank_in_controller = bp->bank_id & (CHMCTRL_NBANKS - 1); bp 632 arch/sparc/kernel/chmc.c struct chmc_bank_info *bp = &p->logical_banks[which_bank]; bp 634 arch/sparc/kernel/chmc.c bp->p = p; bp 635 arch/sparc/kernel/chmc.c bp->bank_id = (CHMCTRL_NBANKS * p->portid) + which_bank; bp 636 arch/sparc/kernel/chmc.c bp->raw_reg = val; bp 637 arch/sparc/kernel/chmc.c bp->valid = (val & MEM_DECODE_VALID) >> MEM_DECODE_VALID_SHIFT; bp 638 arch/sparc/kernel/chmc.c bp->uk = (val & MEM_DECODE_UK) >> MEM_DECODE_UK_SHIFT; bp 639 arch/sparc/kernel/chmc.c bp->um = (val & MEM_DECODE_UM) >> MEM_DECODE_UM_SHIFT; bp 640 arch/sparc/kernel/chmc.c bp->lk = (val & MEM_DECODE_LK) >> MEM_DECODE_LK_SHIFT; bp 641 arch/sparc/kernel/chmc.c bp->lm = (val & MEM_DECODE_LM) >> MEM_DECODE_LM_SHIFT; bp 643 arch/sparc/kernel/chmc.c bp->base = (bp->um); bp 644 arch/sparc/kernel/chmc.c bp->base &= ~(bp->uk); bp 645 arch/sparc/kernel/chmc.c bp->base <<= PA_UPPER_BITS_SHIFT; bp 647 arch/sparc/kernel/chmc.c switch(bp->lk) { bp 650 arch/sparc/kernel/chmc.c bp->interleave = 1; bp 654 arch/sparc/kernel/chmc.c bp->interleave = 2; bp 658 arch/sparc/kernel/chmc.c bp->interleave = 4; bp 662 arch/sparc/kernel/chmc.c bp->interleave = 8; bp 666 arch/sparc/kernel/chmc.c bp->interleave = 16; bp 673 arch/sparc/kernel/chmc.c bp->size = (((unsigned long)bp->uk & bp 675 arch/sparc/kernel/chmc.c bp->size /= bp->interleave; bp 21 arch/um/kernel/stacktrace.c unsigned long *sp, bp, addr; bp 25 arch/um/kernel/stacktrace.c bp = get_frame_pointer(tsk, segv_regs); bp 28 arch/um/kernel/stacktrace.c frame = (struct stack_frame *)bp; bp 33 arch/um/kernel/stacktrace.c if ((unsigned long) sp == bp + sizeof(long)) { bp 35 arch/um/kernel/stacktrace.c bp = (unsigned long)frame; bp 30 arch/unicore32/include/asm/processor.h struct debug_entry bp[2]; bp 245 arch/x86/boot/boot.h u16 bp, hbp; bp 114 arch/x86/entry/common.c sd.args[5] = regs->bp; bp 344 arch/x86/entry/common.c (unsigned int)regs->di, (unsigned int)regs->bp); bp 388 arch/x86/entry/common.c __get_user(*(u32 *)®s->bp, bp 391 arch/x86/entry/common.c get_user(*(u32 *)®s->bp, bp 2443 arch/x86/events/core.c fp = compat_ptr(ss_base + regs->bp); bp 2491 arch/x86/events/core.c fp = (unsigned long __user *)regs->bp; bp 206 arch/x86/events/intel/ds.c u64 si, di, bp, sp; bp 214 arch/x86/events/intel/ds.c u64 si, di, bp, sp; bp 226 arch/x86/events/intel/ds.c u64 si, di, bp, sp; bp 255 arch/x86/events/intel/ds.c u64 si, di, bp, sp; bp 1408 arch/x86/events/intel/ds.c regs->bp = pebs->bp; bp 1490 arch/x86/events/intel/ds.c regs->bp = gprs->bp; bp 88 arch/x86/ia32/ia32_signal.c COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx); bp 194 arch/x86/ia32/ia32_signal.c put_user_ex(regs->bp, &sc->bp); bp 39 arch/x86/include/asm/asm-prototypes.h INDIRECT_THUNK(bp) bp 45 arch/x86/include/asm/asm.h #define _ASM_BP __ASM_REG(bp) bp 112 arch/x86/include/asm/elf.h _r->si = 0; _r->di = 0; _r->bp = 0; \ bp 128 arch/x86/include/asm/elf.h pr_reg[5] = regs->bp; \ bp 177 arch/x86/include/asm/elf.h regs->si = regs->di = regs->bp = 0; bp 213 arch/x86/include/asm/elf.h (pr_reg)[4] = (regs)->bp; \ bp 57 arch/x86/include/asm/hw_breakpoint.h extern int hw_breakpoint_arch_parse(struct perf_event *bp, bp 64 arch/x86/include/asm/hw_breakpoint.h int arch_install_hw_breakpoint(struct perf_event *bp); bp 65 arch/x86/include/asm/hw_breakpoint.h void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 66 arch/x86/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_read(struct perf_event *bp); bp 67 arch/x86/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_unthrottle(struct perf_event *bp); bp 70 arch/x86/include/asm/hw_breakpoint.h arch_fill_perf_breakpoint(struct perf_event *bp); bp 90 arch/x86/include/asm/kexec.h asm volatile("movl %%ebp,%0" : "=m"(newregs->bp)); bp 104 arch/x86/include/asm/kexec.h asm volatile("movq %%rbp,%0" : "=m"(newregs->bp)); bp 40 arch/x86/include/asm/mem_encrypt.h void __init sme_encrypt_kernel(struct boot_params *bp); bp 41 arch/x86/include/asm/mem_encrypt.h void __init sme_enable(struct boot_params *bp); bp 69 arch/x86/include/asm/mem_encrypt.h static inline void __init sme_encrypt_kernel(struct boot_params *bp) { } bp 70 arch/x86/include/asm/mem_encrypt.h static inline void __init sme_enable(struct boot_params *bp) { } bp 206 arch/x86/include/asm/perf_event.h u64 flags, ip, ax, cx, dx, bx, sp, bp, si, di; bp 285 arch/x86/include/asm/processor.h unsigned long bp; bp 32 arch/x86/include/asm/ptrace.h unsigned long bp; bp 65 arch/x86/include/asm/ptrace.h unsigned long bp; bp 185 arch/x86/include/asm/ptrace.h return regs->bp; bp 49 arch/x86/include/asm/setup.h extern unsigned long __startup_64(unsigned long physaddr, struct boot_params *bp); bp 62 arch/x86/include/asm/stacktrace.h return (unsigned long *)regs->bp; bp 67 arch/x86/include/asm/stacktrace.h return &((struct inactive_task_frame *)task->thread.sp)->bp; bp 59 arch/x86/include/asm/switch_to.h unsigned long bp; bp 127 arch/x86/include/asm/syscall.h *args = regs->bp; bp 151 arch/x86/include/asm/syscall.h regs->bp = *args; bp 22 arch/x86/include/asm/syscall_wrapper.h ,,(unsigned int)regs->di,,(unsigned int)regs->bp) bp 21 arch/x86/include/asm/unwind.h unsigned long sp, bp, ip; bp 25 arch/x86/include/asm/unwind.h unsigned long *bp, *orig_sp, ip; bp 84 arch/x86/include/asm/user_32.h unsigned long bp; bp 74 arch/x86/include/asm/user_64.h unsigned long bp; bp 104 arch/x86/include/asm/xen/interface_64.h __DECL_REG(bp); bp 209 arch/x86/include/uapi/asm/sigcontext.h __u32 bp; bp 249 arch/x86/include/uapi/asm/sigcontext.h __u64 bp; bp 59 arch/x86/kernel/asm-offsets.c OFFSET(IA32_SIGCONTEXT_bp, sigcontext_32, bp); bp 32 arch/x86/kernel/asm-offsets_32.c OFFSET(PT_EBP, pt_regs, bp); bp 60 arch/x86/kernel/asm-offsets_64.c ENTRY(bp); bp 1458 arch/x86/kernel/cpu/mce/amd.c struct threshold_bank **bp; bp 1461 arch/x86/kernel/cpu/mce/amd.c bp = per_cpu(threshold_banks, cpu); bp 1462 arch/x86/kernel/cpu/mce/amd.c if (bp) bp 1465 arch/x86/kernel/cpu/mce/amd.c bp = kcalloc(per_cpu(mce_num_banks, cpu), sizeof(struct threshold_bank *), bp 1467 arch/x86/kernel/cpu/mce/amd.c if (!bp) bp 1470 arch/x86/kernel/cpu/mce/amd.c per_cpu(threshold_banks, cpu) = bp; bp 293 arch/x86/kernel/e820.c const struct change_member *ap = *app, *bp = *bpp; bp 301 arch/x86/kernel/e820.c if (ap->addr != bp->addr) bp 302 arch/x86/kernel/e820.c return ap->addr > bp->addr ? 1 : -1; bp 304 arch/x86/kernel/e820.c return (ap->addr != ap->entry->addr) - (bp->addr != bp->entry->addr); bp 114 arch/x86/kernel/head64.c struct boot_params *bp) bp 145 arch/x86/kernel/head64.c sme_enable(bp); bp 258 arch/x86/kernel/head64.c sme_encrypt_kernel(bp); bp 94 arch/x86/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 96 arch/x86/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 104 arch/x86/kernel/hw_breakpoint.c *slot = bp; bp 134 arch/x86/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 136 arch/x86/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 143 arch/x86/kernel/hw_breakpoint.c if (*slot == bp) { bp 230 arch/x86/kernel/hw_breakpoint.c static int arch_build_bp_info(struct perf_event *bp, bp 314 arch/x86/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 322 arch/x86/kernel/hw_breakpoint.c ret = arch_build_bp_info(bp, attr, hw); bp 370 arch/x86/kernel/hw_breakpoint.c struct perf_event *bp; bp 375 arch/x86/kernel/hw_breakpoint.c bp = thread->ptrace_bps[i]; bp 377 arch/x86/kernel/hw_breakpoint.c if (bp && !bp->attr.disabled) { bp 378 arch/x86/kernel/hw_breakpoint.c dump->u_debugreg[i] = bp->attr.bp_addr; bp 379 arch/x86/kernel/hw_breakpoint.c info = counter_arch_bp(bp); bp 441 arch/x86/kernel/hw_breakpoint.c struct perf_event *bp; bp 481 arch/x86/kernel/hw_breakpoint.c bp = per_cpu(bp_per_reg[i], cpu); bp 491 arch/x86/kernel/hw_breakpoint.c if (!bp) { bp 496 arch/x86/kernel/hw_breakpoint.c perf_bp_event(bp, args->regs); bp 502 arch/x86/kernel/hw_breakpoint.c if (bp->hw.info.type == X86_BREAKPOINT_EXECUTE) bp 534 arch/x86/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 54 arch/x86/kernel/kgdb.c { "bp", 4, offsetof(struct pt_regs, bp) }, bp 70 arch/x86/kernel/kgdb.c { "bp", 8, offsetof(struct pt_regs, bp) }, bp 153 arch/x86/kernel/kgdb.c gdb_regs[GDB_BP] = ((struct inactive_task_frame *)p->thread.sp)->bp; bp 194 arch/x86/kernel/kgdb.c struct perf_event *bp; bp 208 arch/x86/kernel/kgdb.c bp = *per_cpu_ptr(breakinfo[breakno].pev, cpu); bp 209 arch/x86/kernel/kgdb.c info = counter_arch_bp(bp); bp 210 arch/x86/kernel/kgdb.c if (bp->attr.disabled != 1) bp 212 arch/x86/kernel/kgdb.c bp->attr.bp_addr = breakinfo[breakno].addr; bp 213 arch/x86/kernel/kgdb.c bp->attr.bp_len = breakinfo[breakno].len; bp 214 arch/x86/kernel/kgdb.c bp->attr.bp_type = breakinfo[breakno].type; bp 218 arch/x86/kernel/kgdb.c val = arch_install_hw_breakpoint(bp); bp 220 arch/x86/kernel/kgdb.c bp->attr.disabled = 0; bp 299 arch/x86/kernel/kgdb.c struct perf_event *bp; bp 304 arch/x86/kernel/kgdb.c bp = *per_cpu_ptr(breakinfo[i].pev, cpu); bp 305 arch/x86/kernel/kgdb.c if (!bp->attr.disabled) { bp 306 arch/x86/kernel/kgdb.c arch_uninstall_hw_breakpoint(bp); bp 307 arch/x86/kernel/kgdb.c bp->attr.disabled = 1; bp 385 arch/x86/kernel/kgdb.c struct perf_event *bp; bp 397 arch/x86/kernel/kgdb.c bp = *per_cpu_ptr(breakinfo[i].pev, cpu); bp 398 arch/x86/kernel/kgdb.c if (bp->attr.disabled == 1) bp 400 arch/x86/kernel/kgdb.c arch_uninstall_hw_breakpoint(bp); bp 401 arch/x86/kernel/kgdb.c bp->attr.disabled = 1; bp 577 arch/x86/kernel/mpparse.c unsigned int *bp; bp 586 arch/x86/kernel/mpparse.c bp = early_memremap(base, length); bp 587 arch/x86/kernel/mpparse.c mpf = (struct mpf_intel *)bp; bp 588 arch/x86/kernel/mpparse.c if ((*bp == SMP_MAGIC_IDENT) && bp 590 arch/x86/kernel/mpparse.c !mpf_checksum((unsigned char *)bp, 16) && bp 608 arch/x86/kernel/mpparse.c early_memunmap(bp, length); bp 27 arch/x86/kernel/perf_regs.c PT_REGS_OFFSET(PERF_REG_X86_BP, bp), bp 176 arch/x86/kernel/perf_regs.c regs_user_copy->bp = user_regs->bp; bp 113 arch/x86/kernel/process.c unsigned long *bp = t->io_bitmap_ptr; bp 116 arch/x86/kernel/process.c if (bp) { bp 127 arch/x86/kernel/process.c kfree(bp); bp 841 arch/x86/kernel/process.c fp = READ_ONCE_NOCHECK(((struct inactive_task_frame *)sp)->bp); bp 77 arch/x86/kernel/process_32.c regs->si, regs->di, regs->bp, regs->sp); bp 131 arch/x86/kernel/process_32.c frame->bp = 0; bp 86 arch/x86/kernel/process_64.c regs->bp, regs->r8, regs->r9); bp 387 arch/x86/kernel/process_64.c frame->bp = 0; bp 82 arch/x86/kernel/ptrace.c REG_OFFSET_NAME(bp), bp 475 arch/x86/kernel/ptrace.c static void ptrace_triggered(struct perf_event *bp, bp 487 arch/x86/kernel/ptrace.c if (thread->ptrace_bps[i] == bp) bp 499 arch/x86/kernel/ptrace.c static unsigned long ptrace_get_dr7(struct perf_event *bp[]) bp 506 arch/x86/kernel/ptrace.c if (bp[i] && !bp[i]->attr.disabled) { bp 507 arch/x86/kernel/ptrace.c info = counter_arch_bp(bp[i]); bp 548 arch/x86/kernel/ptrace.c static int ptrace_modify_breakpoint(struct perf_event *bp, int len, int type, bp 551 arch/x86/kernel/ptrace.c struct perf_event_attr attr = bp->attr; bp 558 arch/x86/kernel/ptrace.c return modify_user_hw_breakpoint(bp, &attr); bp 579 arch/x86/kernel/ptrace.c struct perf_event *bp = thread->ptrace_bps[i]; bp 581 arch/x86/kernel/ptrace.c if (!bp) { bp 585 arch/x86/kernel/ptrace.c bp = ptrace_register_breakpoint(tsk, bp 587 arch/x86/kernel/ptrace.c if (IS_ERR(bp)) { bp 588 arch/x86/kernel/ptrace.c rc = PTR_ERR(bp); bp 592 arch/x86/kernel/ptrace.c thread->ptrace_bps[i] = bp; bp 596 arch/x86/kernel/ptrace.c rc = ptrace_modify_breakpoint(bp, len, type, disabled); bp 622 arch/x86/kernel/ptrace.c struct perf_event *bp = thread->ptrace_bps[index]; bp 624 arch/x86/kernel/ptrace.c if (bp) bp 625 arch/x86/kernel/ptrace.c val = bp->hw.info.address; bp 638 arch/x86/kernel/ptrace.c struct perf_event *bp = t->ptrace_bps[nr]; bp 641 arch/x86/kernel/ptrace.c if (!bp) { bp 653 arch/x86/kernel/ptrace.c bp = ptrace_register_breakpoint(tsk, bp 656 arch/x86/kernel/ptrace.c if (IS_ERR(bp)) bp 657 arch/x86/kernel/ptrace.c err = PTR_ERR(bp); bp 659 arch/x86/kernel/ptrace.c t->ptrace_bps[nr] = bp; bp 661 arch/x86/kernel/ptrace.c struct perf_event_attr attr = bp->attr; bp 664 arch/x86/kernel/ptrace.c err = modify_user_hw_breakpoint(bp, &attr); bp 883 arch/x86/kernel/ptrace.c R32(ebp, bp); bp 956 arch/x86/kernel/ptrace.c R32(ebp, bp); bp 118 arch/x86/kernel/signal.c COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx); bp 175 arch/x86/kernel/signal.c put_user_ex(regs->bp, &sc->bp); bp 118 arch/x86/kernel/stacktrace.c const void __user *fp = (const void __user *)regs->bp; bp 34 arch/x86/kernel/time.c return *(unsigned long *)(regs->bp + sizeof(long)); bp 28 arch/x86/kernel/unwind_frame.c return state->regs ? &state->regs->ip : state->bp + 1; bp 93 arch/x86/kernel/unwind_frame.c return state->bp == last_frame(state); bp 135 arch/x86/kernel/unwind_frame.c return (state->bp == aligned_bp && *(aligned_bp + 1) == *(last_bp + 1)); bp 155 arch/x86/kernel/unwind_frame.c return (state->bp == last_ftrace_bp && bp 156 arch/x86/kernel/unwind_frame.c *state->bp == *(state->bp + 2) && bp 157 arch/x86/kernel/unwind_frame.c *(state->bp + 1) == *(state->bp + 4)); bp 171 arch/x86/kernel/unwind_frame.c static struct pt_regs *decode_frame_pointer(unsigned long *bp) bp 173 arch/x86/kernel/unwind_frame.c unsigned long regs = (unsigned long)bp; bp 181 arch/x86/kernel/unwind_frame.c static struct pt_regs *decode_frame_pointer(unsigned long *bp) bp 183 arch/x86/kernel/unwind_frame.c unsigned long regs = (unsigned long)bp; bp 204 arch/x86/kernel/unwind_frame.c prev_frame_end = (void *)state->bp + FRAME_HEADER_SIZE; bp 237 arch/x86/kernel/unwind_frame.c state->bp = NULL; bp 239 arch/x86/kernel/unwind_frame.c state->bp = next_bp; bp 295 arch/x86/kernel/unwind_frame.c state->bp = NULL; bp 305 arch/x86/kernel/unwind_frame.c next_bp = (unsigned long *)state->regs->bp; bp 307 arch/x86/kernel/unwind_frame.c next_bp = (unsigned long *)READ_ONCE_TASK_STACK(state->task, *state->bp); bp 356 arch/x86/kernel/unwind_frame.c state->bp, state->task->comm, bp 369 arch/x86/kernel/unwind_frame.c unsigned long *bp; bp 381 arch/x86/kernel/unwind_frame.c bp = get_frame_pointer(task, regs); bp 393 arch/x86/kernel/unwind_frame.c state->next_bp = bp; bp 394 arch/x86/kernel/unwind_frame.c bp = ((unsigned long *)regs->sp) - 1; bp 398 arch/x86/kernel/unwind_frame.c get_stack_info(bp, state->task, &state->stack_info, bp 400 arch/x86/kernel/unwind_frame.c update_stack_state(state, bp); bp 409 arch/x86/kernel/unwind_frame.c (state->next_bp == NULL && state->bp < first_frame))) bp 464 arch/x86/kernel/unwind_orc.c sp = state->bp + orc->sp_offset; bp 473 arch/x86/kernel/unwind_orc.c sp = state->bp + orc->sp_offset; bp 573 arch/x86/kernel/unwind_orc.c if (get_reg(state, offsetof(struct pt_regs, bp), &tmp)) bp 574 arch/x86/kernel/unwind_orc.c state->bp = tmp; bp 578 arch/x86/kernel/unwind_orc.c if (!deref_stack_reg(state, sp + orc->bp_offset, &state->bp)) bp 583 arch/x86/kernel/unwind_orc.c if (!deref_stack_reg(state, state->bp + orc->bp_offset, &state->bp)) bp 638 arch/x86/kernel/unwind_orc.c state->bp = regs->bp; bp 648 arch/x86/kernel/unwind_orc.c "=r" (state->bp)); bp 654 arch/x86/kernel/unwind_orc.c state->bp = READ_ONCE_NOCHECK(frame->bp); bp 826 arch/x86/kernel/uprobes.c reg_offset = offsetof(struct pt_regs, bp); bp 130 arch/x86/kernel/vm86_32.c put_user_ex(regs->pt.bp, &user->regs.ebp); bp 294 arch/x86/kernel/vm86_32.c get_user_ex(vm86regs.pt.bp, &user_vm86->regs.ebp); bp 1305 arch/x86/kvm/emulate.c unsigned bp = reg_read(ctxt, VCPU_REGS_RBP); bp 1330 arch/x86/kvm/emulate.c modrm_ea += bp + si; bp 1333 arch/x86/kvm/emulate.c modrm_ea += bp + di; bp 1343 arch/x86/kvm/emulate.c modrm_ea += bp; bp 3060 arch/x86/kvm/emulate.c tss->bp = reg_read(ctxt, VCPU_REGS_RBP); bp 3084 arch/x86/kvm/emulate.c *reg_write(ctxt, VCPU_REGS_RBP) = tss->bp; bp 50 arch/x86/kvm/tss.h u16 bp; bp 194 arch/x86/lib/insn-eval.c case offsetof(struct pt_regs, bp): bp 407 arch/x86/lib/insn-eval.c offsetof(struct pt_regs, bp), bp 513 arch/x86/lib/insn-eval.c offsetof(struct pt_regs, bp), bp 514 arch/x86/lib/insn-eval.c offsetof(struct pt_regs, bp), bp 517 arch/x86/lib/insn-eval.c offsetof(struct pt_regs, bp), bp 38 arch/x86/math-emu/get_address.c offsetof(struct pt_regs, bp), bp 355 arch/x86/math-emu/get_address.c address += FPU_info->regs->bp + FPU_info->regs->si; bp 360 arch/x86/math-emu/get_address.c address += FPU_info->regs->bp + FPU_info->regs->di; bp 371 arch/x86/math-emu/get_address.c address += FPU_info->regs->bp; bp 280 arch/x86/mm/mem_encrypt_identity.c void __init sme_encrypt_kernel(struct boot_params *bp) bp 317 arch/x86/mm/mem_encrypt_identity.c initrd_len = (unsigned long)bp->hdr.ramdisk_size | bp 318 arch/x86/mm/mem_encrypt_identity.c ((unsigned long)bp->ext_ramdisk_size << 32); bp 320 arch/x86/mm/mem_encrypt_identity.c initrd_start = (unsigned long)bp->hdr.ramdisk_image | bp 321 arch/x86/mm/mem_encrypt_identity.c ((unsigned long)bp->ext_ramdisk_image << 32); bp 487 arch/x86/mm/mem_encrypt_identity.c void __init sme_enable(struct boot_params *bp) bp 570 arch/x86/mm/mem_encrypt_identity.c cmdline_ptr = (const char *)((u64)bp->hdr.cmd_line_ptr | bp 571 arch/x86/mm/mem_encrypt_identity.c ((u64)bp->ext_cmd_line_ptr << 32)); bp 119 arch/x86/mm/mmio-mod.c regs->si, regs->di, regs->bp, regs->sp); bp 124 arch/x86/mm/mmio-mod.c regs->si, regs->di, regs->bp, regs->sp); bp 299 arch/x86/mm/pf_in.c rv = (unsigned char *)®s->bp; bp 353 arch/x86/mm/pf_in.c rv = ®s->bp; bp 55 arch/x86/oprofile/backtrace.c head = (struct stack_frame_ia32 *) regs->bp; bp 51 arch/x86/um/asm/processor_32.h #define current_bp() ({ unsigned long bp; __asm__("movl %%ebp, %0" : "=r" (bp) : ); bp; }) bp 35 arch/x86/um/asm/processor_64.h #define current_bp() ({ unsigned long bp; __asm__("movq %%rbp, %0" : "=r" (bp) : ); bp; }) bp 176 arch/x86/um/signal.c GETREG(BP, bp); bp 255 arch/x86/um/signal.c PUTREG(BP, bp); bp 40 arch/xtensa/include/asm/hw_breakpoint.h int hw_breakpoint_arch_parse(struct perf_event *bp, bp 46 arch/xtensa/include/asm/hw_breakpoint.h int arch_install_hw_breakpoint(struct perf_event *bp); bp 47 arch/xtensa/include/asm/hw_breakpoint.h void arch_uninstall_hw_breakpoint(struct perf_event *bp); bp 48 arch/xtensa/include/asm/hw_breakpoint.h void hw_breakpoint_pmu_read(struct perf_event *bp); bp 50 arch/xtensa/kernel/hw_breakpoint.c int hw_breakpoint_arch_parse(struct perf_event *bp, bp 134 arch/xtensa/kernel/hw_breakpoint.c struct perf_event *bp) bp 140 arch/xtensa/kernel/hw_breakpoint.c slot[i] = bp; bp 147 arch/xtensa/kernel/hw_breakpoint.c static void set_ibreak_regs(int reg, struct perf_event *bp) bp 149 arch/xtensa/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 157 arch/xtensa/kernel/hw_breakpoint.c static void set_dbreak_regs(int reg, struct perf_event *bp) bp 159 arch/xtensa/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 171 arch/xtensa/kernel/hw_breakpoint.c int arch_install_hw_breakpoint(struct perf_event *bp) bp 175 arch/xtensa/kernel/hw_breakpoint.c if (counter_arch_bp(bp)->type == XTENSA_BREAKPOINT_EXECUTE) { bp 177 arch/xtensa/kernel/hw_breakpoint.c i = alloc_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); bp 180 arch/xtensa/kernel/hw_breakpoint.c set_ibreak_regs(i, bp); bp 184 arch/xtensa/kernel/hw_breakpoint.c i = alloc_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); bp 187 arch/xtensa/kernel/hw_breakpoint.c set_dbreak_regs(i, bp); bp 193 arch/xtensa/kernel/hw_breakpoint.c struct perf_event *bp) bp 198 arch/xtensa/kernel/hw_breakpoint.c if (slot[i] == bp) { bp 206 arch/xtensa/kernel/hw_breakpoint.c void arch_uninstall_hw_breakpoint(struct perf_event *bp) bp 208 arch/xtensa/kernel/hw_breakpoint.c struct arch_hw_breakpoint *info = counter_arch_bp(bp); bp 215 arch/xtensa/kernel/hw_breakpoint.c i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp); bp 223 arch/xtensa/kernel/hw_breakpoint.c i = free_slot(this_cpu_ptr(wp_on_reg), XCHAL_NUM_DBREAK, bp); bp 229 arch/xtensa/kernel/hw_breakpoint.c void hw_breakpoint_pmu_read(struct perf_event *bp) bp 268 arch/xtensa/kernel/hw_breakpoint.c struct perf_event *bp = this_cpu_ptr(wp_on_reg)[i]; bp 270 arch/xtensa/kernel/hw_breakpoint.c if (bp) bp 271 arch/xtensa/kernel/hw_breakpoint.c set_dbreak_regs(i, bp); bp 280 arch/xtensa/kernel/hw_breakpoint.c struct perf_event **bp = this_cpu_ptr(bp_on_reg); bp 283 arch/xtensa/kernel/hw_breakpoint.c if (bp[i] && !bp[i]->attr.disabled && bp 284 arch/xtensa/kernel/hw_breakpoint.c regs->pc == bp[i]->attr.bp_addr) bp 285 arch/xtensa/kernel/hw_breakpoint.c perf_bp_event(bp[i], regs); bp 289 arch/xtensa/kernel/hw_breakpoint.c struct perf_event **bp = this_cpu_ptr(wp_on_reg); bp 293 arch/xtensa/kernel/hw_breakpoint.c if (dbnum < XCHAL_NUM_DBREAK && bp[dbnum]) { bp 295 arch/xtensa/kernel/hw_breakpoint.c perf_bp_event(bp[dbnum], regs); bp 365 arch/xtensa/kernel/ptrace.c static void ptrace_hbptriggered(struct perf_event *bp, bp 370 arch/xtensa/kernel/ptrace.c struct arch_hw_breakpoint *bkpt = counter_arch_bp(bp); bp 372 arch/xtensa/kernel/ptrace.c if (bp->attr.bp_type & HW_BREAKPOINT_X) { bp 374 arch/xtensa/kernel/ptrace.c if (current->thread.ptrace_bp[i] == bp) bp 379 arch/xtensa/kernel/ptrace.c if (current->thread.ptrace_wp[i] == bp) bp 418 arch/xtensa/kernel/ptrace.c struct perf_event *bp; bp 428 arch/xtensa/kernel/ptrace.c bp = child->thread.ptrace_wp[idx]; bp 430 arch/xtensa/kernel/ptrace.c bp = child->thread.ptrace_bp[idx]; bp 432 arch/xtensa/kernel/ptrace.c if (bp) { bp 433 arch/xtensa/kernel/ptrace.c user_data[0] = bp->attr.bp_addr; bp 434 arch/xtensa/kernel/ptrace.c user_data[1] = bp->attr.disabled ? 0 : bp->attr.bp_len; bp 436 arch/xtensa/kernel/ptrace.c if (bp->attr.bp_type & HW_BREAKPOINT_R) bp 438 arch/xtensa/kernel/ptrace.c if (bp->attr.bp_type & HW_BREAKPOINT_W) bp 452 arch/xtensa/kernel/ptrace.c struct perf_event *bp; bp 467 arch/xtensa/kernel/ptrace.c bp = child->thread.ptrace_wp[idx]; bp 473 arch/xtensa/kernel/ptrace.c bp = child->thread.ptrace_bp[idx]; bp 477 arch/xtensa/kernel/ptrace.c if (!bp) { bp 478 arch/xtensa/kernel/ptrace.c bp = ptrace_hbp_create(child, bp 480 arch/xtensa/kernel/ptrace.c if (IS_ERR(bp)) bp 481 arch/xtensa/kernel/ptrace.c return PTR_ERR(bp); bp 483 arch/xtensa/kernel/ptrace.c child->thread.ptrace_wp[idx] = bp; bp 485 arch/xtensa/kernel/ptrace.c child->thread.ptrace_bp[idx] = bp; bp 488 arch/xtensa/kernel/ptrace.c attr = bp->attr; bp 494 arch/xtensa/kernel/ptrace.c return modify_user_hw_breakpoint(bp, &attr); bp 1947 block/bio.c struct biovec_slab *bp = bvec_slabs + BVEC_POOL_MAX; bp 1949 block/bio.c return mempool_init_slab_pool(pool, pool_entries, bp->slab); bp 2682 drivers/android/binder.c struct binder_buffer_object *bp, bp 2696 drivers/android/binder.c if (!(bp->flags & BINDER_BUFFER_FLAG_HAS_PARENT)) bp 2699 drivers/android/binder.c parent = binder_validate_ptr(target_proc, b, &object, bp->parent, bp 2709 drivers/android/binder.c parent_offset, bp->parent_offset, bp 2718 drivers/android/binder.c bp->parent_offset > parent->length - sizeof(binder_uintptr_t)) { bp 2724 drivers/android/binder.c buffer_offset = bp->parent_offset + bp 2727 drivers/android/binder.c &bp->buffer, sizeof(bp->buffer))) { bp 3359 drivers/android/binder.c struct binder_buffer_object *bp = bp 3364 drivers/android/binder.c if (bp->length > buf_left) { bp 3377 drivers/android/binder.c (uintptr_t)bp->buffer, bp 3378 drivers/android/binder.c bp->length)) { bp 3387 drivers/android/binder.c bp->buffer = (uintptr_t) bp 3389 drivers/android/binder.c sg_buf_offset += ALIGN(bp->length, sizeof(u64)); bp 3393 drivers/android/binder.c ret = binder_fixup_parent(t, thread, bp, bp 3402 drivers/android/binder.c bp, sizeof(*bp))) { bp 1464 drivers/ata/libata-scsi.c u8 bp = 0xff; bp 1478 drivers/ata/libata-scsi.c bp = 1; bp 1483 drivers/ata/libata-scsi.c bp = 3; bp 1531 drivers/ata/libata-scsi.c ata_scsi_set_invalid_field(qc->dev, scmd, fp, bp); bp 2593 drivers/ata/libata-scsi.c u8 dpofua, bp = 0xff; bp 2614 drivers/ata/libata-scsi.c bp = 6; bp 2684 drivers/ata/libata-scsi.c ata_scsi_set_invalid_field(dev, args->cmd, fp, bp); bp 3462 drivers/ata/libata-scsi.c u8 bp = 0xff; bp 3487 drivers/ata/libata-scsi.c bp = 3; bp 3540 drivers/ata/libata-scsi.c ata_scsi_set_invalid_field(dev, scmd, fp, bp); bp 3700 drivers/ata/libata-scsi.c u8 sa, options, bp = 0xff; bp 3768 drivers/ata/libata-scsi.c ata_scsi_set_invalid_field(qc->dev, scmd, fp, bp); bp 3986 drivers/ata/libata-scsi.c u8 bp = 0xff; bp 4012 drivers/ata/libata-scsi.c bp = (cdb[1] & 0x01) ? 1 : 5; bp 4108 drivers/ata/libata-scsi.c ata_scsi_set_invalid_field(qc->dev, scmd, fp, bp); bp 1207 drivers/block/skd_main.c u8 *bp = (u8 *)skmsg->msg_buf; bp 1211 drivers/block/skd_main.c &bp[i]); bp 1248 drivers/block/skd_main.c u8 *bp = (u8 *)skspcl->msg_buf; bp 1253 drivers/block/skd_main.c &bp[i]); bp 43 drivers/firmware/dmi_scan.c const u8 *bp = ((u8 *) dm) + dm->length; bp 47 drivers/firmware/dmi_scan.c while (--s > 0 && *bp) bp 48 drivers/firmware/dmi_scan.c bp += strlen(bp) + 1; bp 51 drivers/firmware/dmi_scan.c nsp = bp; bp 55 drivers/firmware/dmi_scan.c return bp; bp 63 drivers/firmware/dmi_scan.c const char *bp = dmi_string_nosave(dm, s); bp 67 drivers/firmware/dmi_scan.c if (bp == dmi_empty_string) bp 70 drivers/firmware/dmi_scan.c len = strlen(bp) + 1; bp 73 drivers/firmware/dmi_scan.c strcpy(str, bp); bp 274 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c struct amdgpu_bo_param bp; bp 278 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c memset(&bp, 0, sizeof(bp)); bp 279 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.size = size; bp 280 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.byte_align = PAGE_SIZE; bp 281 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.domain = AMDGPU_GEM_DOMAIN_GTT; bp 282 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC; bp 283 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.type = ttm_bo_type_kernel; bp 284 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.resv = NULL; bp 287 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.flags |= AMDGPU_GEM_CREATE_MQD_GFX9; bp 289 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c r = amdgpu_bo_create(adev, &bp, &bo); bp 356 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c struct amdgpu_bo_param bp; bp 359 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c memset(&bp, 0, sizeof(bp)); bp 360 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.size = size; bp 361 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.byte_align = 1; bp 362 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.domain = AMDGPU_GEM_DOMAIN_GWS; bp 363 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS; bp 364 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.type = ttm_bo_type_device; bp 365 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c bp.resv = NULL; bp 367 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c r = amdgpu_bo_create(adev, &bp, &bo); bp 1081 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c struct amdgpu_bo_param bp; bp 1169 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c memset(&bp, 0, sizeof(bp)); bp 1170 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.size = size; bp 1171 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.byte_align = byte_align; bp 1172 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.domain = alloc_domain; bp 1173 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.flags = alloc_flags; bp 1174 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.type = bo_type; bp 1175 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c bp.resv = NULL; bp 1176 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ret = amdgpu_bo_create(adev, &bp, &bo); bp 78 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c struct amdgpu_bo_param bp; bp 83 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c memset(&bp, 0, sizeof(bp)); bp 84 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.size = size; bp 85 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.byte_align = PAGE_SIZE; bp 86 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.domain = sdomain; bp 87 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.flags = 0; bp 88 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.type = ttm_bo_type_kernel; bp 89 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.resv = NULL; bp 91 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c r = amdgpu_bo_create(adev, &bp, &sobj); bp 109 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c bp.domain = ddomain; bp 110 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c r = amdgpu_bo_create(adev, &bp, &dobj); bp 373 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c struct amdgpu_bo_param bp; bp 376 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c memset(&bp, 0, sizeof(bp)); bp 377 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.size = attach->dmabuf->size; bp 378 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.byte_align = PAGE_SIZE; bp 379 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.domain = AMDGPU_GEM_DOMAIN_CPU; bp 380 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.flags = 0; bp 381 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.type = ttm_bo_type_sg; bp 382 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c bp.resv = resv; bp 384 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c ret = amdgpu_bo_create(adev, &bp, &bo); bp 119 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c struct amdgpu_bo_param bp; bp 121 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c memset(&bp, 0, sizeof(bp)); bp 122 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.size = adev->gart.table_size; bp 123 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.byte_align = PAGE_SIZE; bp 124 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.domain = AMDGPU_GEM_DOMAIN_VRAM; bp 125 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.flags = AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | bp 127 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.type = ttm_bo_type_kernel; bp 128 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c bp.resv = NULL; bp 129 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c r = amdgpu_bo_create(adev, &bp, &adev->gart.bo); bp 57 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c struct amdgpu_bo_param bp; bp 60 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c memset(&bp, 0, sizeof(bp)); bp 63 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.size = size; bp 64 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.byte_align = alignment; bp 65 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.type = type; bp 66 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.resv = resv; bp 67 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.preferred_domain = initial_domain; bp 69 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.flags = flags; bp 70 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c bp.domain = initial_domain; bp 71 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c r = amdgpu_bo_create(adev, &bp, &bo); bp 236 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c struct amdgpu_bo_param bp; bp 245 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c memset(&bp, 0, sizeof(bp)); bp 246 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.size = size; bp 247 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.byte_align = align; bp 248 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.domain = domain; bp 249 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.flags = cpu_addr ? AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED bp 251 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.flags |= AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; bp 252 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.type = ttm_bo_type_kernel; bp 253 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.resv = NULL; bp 256 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c r = amdgpu_bo_create(adev, &bp, bo_ptr); bp 510 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c struct amdgpu_bo_param *bp, bp 514 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c .interruptible = (bp->type != ttm_bo_type_kernel), bp 516 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c .resv = bp->resv, bp 517 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c .flags = bp->type != ttm_bo_type_kernel ? bp 521 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c unsigned long page_align, size = bp->size; bp 526 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA)) { bp 528 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c page_align = bp->byte_align; bp 530 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c } else if (bp->domain & AMDGPU_GEM_DOMAIN_GDS) { bp 532 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c page_align = ALIGN(bp->byte_align, 4); bp 536 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c page_align = ALIGN(bp->byte_align, PAGE_SIZE) >> PAGE_SHIFT; bp 540 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (!amdgpu_bo_validate_size(adev, size, bp->domain)) bp 554 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bo->preferred_domains = bp->preferred_domain ? bp->preferred_domain : bp 555 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp->domain; bp 557 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->type != ttm_bo_type_kernel && bp 561 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bo->flags = bp->flags; bp 567 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA | bp 571 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c amdgpu_bo_placement_from_domain(bo, bp->domain); bp 572 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->type == ttm_bo_type_kernel) bp 575 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, bp 577 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c NULL, bp->resv, &amdgpu_bo_destroy); bp 589 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bp 602 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (!bp->resv) bp 609 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (bp->type == ttm_bo_type_device) bp 615 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (!bp->resv) bp 625 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c struct amdgpu_bo_param bp; bp 631 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c memset(&bp, 0, sizeof(bp)); bp 632 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.size = size; bp 633 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.domain = AMDGPU_GEM_DOMAIN_GTT; bp 634 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.flags = AMDGPU_GEM_CREATE_CPU_GTT_USWC | bp 636 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.type = ttm_bo_type_kernel; bp 637 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp.resv = bo->tbo.base.resv; bp 639 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c r = amdgpu_bo_do_create(adev, &bp, &bo->shadow); bp 665 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c struct amdgpu_bo_param *bp, bp 668 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c u64 flags = bp->flags; bp 671 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c bp->flags = bp->flags & ~AMDGPU_GEM_CREATE_SHADOW; bp 672 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c r = amdgpu_bo_do_create(adev, bp, bo_ptr); bp 677 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (!bp->resv) bp 681 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c r = amdgpu_bo_create_shadow(adev, bp->size, *bo_ptr); bp 683 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c if (!bp->resv) bp 230 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h struct amdgpu_bo_param *bp, bp 776 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c bps[start].bp, bp 1185 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c .bp = data->bps[i].bp, bp 1258 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c data->bps[data->count++].bp = bps[i]; bp 1272 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c uint64_t bp; bp 1285 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c bp = data->bps[i].bp; bp 1287 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT, PAGE_SIZE, bp 1290 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c DRM_ERROR("RAS ERROR: reserve vram %llx fail\n", bp); bp 356 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h unsigned long bp; bp 410 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h unsigned int bp; bp 37 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c struct amdgpu_bo_param bp; bp 63 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c memset(&bp, 0, sizeof(bp)); bp 64 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.size = size; bp 65 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.byte_align = PAGE_SIZE; bp 66 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.domain = AMDGPU_GEM_DOMAIN_VRAM; bp 67 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.flags = 0; bp 68 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.type = ttm_bo_type_kernel; bp 69 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.resv = NULL; bp 71 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c r = amdgpu_bo_create(adev, &bp, &vram_obj); bp 91 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c bp.domain = AMDGPU_GEM_DOMAIN_GTT; bp 92 drivers/gpu/drm/amd/amdgpu/amdgpu_test.c r = amdgpu_bo_create(adev, &bp, gtt_obj + i); bp 819 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int level, struct amdgpu_bo_param *bp) bp 821 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c memset(bp, 0, sizeof(*bp)); bp 823 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->size = amdgpu_vm_bo_size(adev, level); bp 824 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->byte_align = AMDGPU_GPU_PAGE_SIZE; bp 825 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->domain = AMDGPU_GEM_DOMAIN_VRAM; bp 826 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->domain = amdgpu_bo_get_preferred_pin_domain(adev, bp->domain); bp 827 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->flags = AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | bp 830 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; bp 832 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->flags |= AMDGPU_GEM_CREATE_SHADOW; bp 833 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->type = ttm_bo_type_kernel; bp 835 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp->resv = vm->root.base.bo->tbo.base.resv; bp 856 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c struct amdgpu_bo_param bp; bp 874 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c amdgpu_vm_bo_param(adev, vm, cursor->level, &bp); bp 876 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c r = amdgpu_bo_create(adev, &bp, &pt); bp 2676 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c struct amdgpu_bo_param bp; bp 2720 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c amdgpu_vm_bo_param(adev, vm, adev->vm_manager.root_level, &bp); bp 2722 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c bp.flags &= ~AMDGPU_GEM_CREATE_SHADOW; bp 2723 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c r = amdgpu_bo_create(adev, &bp, &root); bp 55 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.ctx->logger bp 57 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c #define DATA_TABLES(table) (bp->master_data_tbl->ListOfDataTables.table) bp 62 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static uint32_t get_src_obj_list(struct bios_parser *bp, ATOM_OBJECT *object, bp 64 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static ATOM_OBJECT *get_bios_object(struct bios_parser *bp, bp 66 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static enum bp_result get_gpio_i2c_info(struct bios_parser *bp, bp 69 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static ATOM_HPD_INT_RECORD *get_hpd_record(struct bios_parser *bp, bp 75 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 83 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 100 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = NULL; bp 102 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL); bp 103 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp) bp 106 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bios_parser_construct(bp, init, dce_version)) bp 107 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return &bp->base; bp 109 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c kfree(bp); bp 114 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static void destruct(struct bios_parser *bp) bp 116 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c kfree(bp->base.bios_local_image); bp 117 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c kfree(bp->base.integrated_info); bp 122 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(*dcb); bp 124 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp) { bp 129 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c destruct(bp); bp 131 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c kfree(bp); bp 135 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static uint8_t get_number_of_objects(struct bios_parser *bp, uint32_t offset) bp 139 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c uint32_t object_table_offset = bp->object_info_tbl_offset + offset; bp 151 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 153 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_number_of_objects(bp, bp 154 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c le16_to_cpu(bp->object_info_tbl.v1_1->usConnectorObjectTableOffset)); bp 161 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 166 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c uint32_t connector_table_offset = bp->object_info_tbl_offset bp 167 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + le16_to_cpu(bp->object_info_tbl.v1_1->usConnectorObjectTableOffset); bp 195 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 200 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c object = get_bios_object(bp, object_id); bp 207 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c number = get_src_obj_list(bp, object, &id); bp 225 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 230 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c object = get_bios_object(bp, id); bp 236 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + bp->object_info_tbl_offset; bp 253 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (get_gpio_i2c_info(bp, record, info) == BP_RESULT_OK) bp 267 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 274 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c object = get_bios_object(bp, id); bp 279 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c record = get_hpd_record(bp, object); bp 291 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 299 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + bp->object_info_tbl_offset; bp 333 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 342 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c object = get_bios_object(bp, connector_object_id); bp 349 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bios_parser_get_device_tag_record(bp, object, &record) bp 366 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 369 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 372 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 379 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 392 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c result = get_firmware_info_v1_4(bp, info); bp 402 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c result = get_firmware_info_v2_1(bp, info); bp 405 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c result = get_firmware_info_v2_2(bp, info); bp 420 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 464 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 470 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 512 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c else if (get_ss_info_v3_1(bp, bp 535 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c else if (get_ss_info_v3_1(bp, bp 554 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 597 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c else if (get_ss_info_v3_1(bp, bp 620 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c else if (get_ss_info_v3_1(bp, bp 648 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 730 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 732 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.transmitter_control) bp 735 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.transmitter_control(bp, cntl); bp 742 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 744 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.dig_encoder_control) bp 747 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.dig_encoder_control(bp, cntl); bp 754 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 756 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.adjust_display_pll) bp 759 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.adjust_display_pll(bp, bp_params); bp 766 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 768 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.set_pixel_clock) bp 771 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.set_pixel_clock(bp, bp_params); bp 778 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 780 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.set_dce_clock) bp 783 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.set_dce_clock(bp, bp_params); bp 791 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 793 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.enable_spread_spectrum_on_ppll) bp 796 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.enable_spread_spectrum_on_ppll( bp 797 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp, bp_params, enable); bp 805 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 807 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.set_crtc_timing) bp 810 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.set_crtc_timing(bp, bp_params); bp 817 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 819 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.program_clock) bp 822 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.program_clock(bp, bp_params); bp 832 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 834 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.enable_crtc) bp 837 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.enable_crtc(bp, id, enable); bp 845 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 847 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->cmd_tbl.enable_disp_power_gating) bp 850 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return bp->cmd_tbl.enable_disp_power_gating(bp, controller_id, bp 858 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 862 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return (le16_to_cpu(bp->object_info_tbl.v1_1->usDeviceSupport) & mask) != 0; bp 865 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static ATOM_HPD_INT_RECORD *get_hpd_record(struct bios_parser *bp, bp 877 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + bp->object_info_tbl_offset; bp 900 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 904 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 926 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 939 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_info_from_ss_info_table(bp, clk_id_ss, bp 953 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_info_from_tbl(bp, clk_id_ss, bp 964 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_info_v3_1(bp, clk_id_ss, index, ss_info); bp 977 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 994 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1002 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_info_from_ss_info_table(bp, id, ss_info); bp 1004 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_info_from_internal_ss_info_tbl_V2_1(bp, id, bp 1019 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1084 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1118 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bios_parser_get_embedded_panel_info(&bp->base, &panel_info) bp 1168 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1171 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1178 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1195 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_embedded_panel_info_v1_2(bp, info); bp 1197 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_embedded_panel_info_v1_3(bp, info); bp 1209 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1328 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1469 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1476 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c object = get_bios_object(bp, object_id); bp 1481 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c record = get_encoder_cap_record(bp, object); bp 1505 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1517 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + bp->object_info_tbl_offset; bp 1542 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1545 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1548 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1551 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1566 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1574 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_entry_number_from_ss_info_tbl(bp, ss_id); bp 1584 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_entry_number(bp, ss_id); bp 1594 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp, ss_id); bp 1616 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1649 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bios_parser_get_embedded_panel_info(&bp->base, &panel_info) bp 1684 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static uint32_t get_ss_entry_number(struct bios_parser *bp, uint32_t id) bp 1687 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_entry_number_from_ss_info_tbl(bp, id); bp 1689 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c return get_ss_entry_number_from_internal_ss_info_tbl_v2_1(bp, id); bp 1702 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1737 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 1783 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1827 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static enum bp_result get_gpio_i2c_info(struct bios_parser *bp, bp 1948 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static ATOM_OBJECT *get_bios_object(struct bios_parser *bp, bp 1957 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c offset = le16_to_cpu(bp->object_info_tbl.v1_1->usEncoderObjectTableOffset); bp 1961 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c offset = le16_to_cpu(bp->object_info_tbl.v1_1->usConnectorObjectTableOffset); bp 1965 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c offset = le16_to_cpu(bp->object_info_tbl.v1_1->usRouterObjectTableOffset); bp 1969 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bp->object_info_tbl.revision.minor < 3) bp 1971 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c offset = le16_to_cpu(bp->object_info_tbl.v1_3->usMiscObjectTableOffset); bp 1978 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c offset += bp->object_info_tbl_offset; bp 1993 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c static uint32_t get_src_obj_list(struct bios_parser *bp, ATOM_OBJECT *object, bp 2005 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c + bp->object_info_tbl_offset; bp 2012 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c *id_list = (uint16_t *)bios_get_image(&bp->base, offset, *number * sizeof(uint16_t)); bp 2229 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 2236 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->master_data_tbl->ListOfDataTables.IntegratedSystemInfo); bp 2379 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 2386 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->master_data_tbl->ListOfDataTables.IntegratedSystemInfo); bp 2516 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 2524 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bp->master_data_tbl->ListOfDataTables.IntegratedSystemInfo) { bp 2526 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->master_data_tbl->ListOfDataTables.IntegratedSystemInfo); bp 2533 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c result = get_integrated_info_v8(bp, info); bp 2536 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c result = get_integrated_info_v9(bp, info); bp 2572 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 2582 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (construct_integrated_info(bp, info) == BP_RESULT_OK) bp 2597 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp; bp 2602 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp = BP_FROM_DCB(dcb); bp 2701 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp; bp 2707 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp = BP_FROM_DCB(dcb); bp 2715 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c genericTableOffset = bp->object_info_tbl_offset + bp 2716 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl.v1_3->usMiscObjectTableOffset; bp 2730 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl_offset; bp 2745 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp; bp 2754 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp = BP_FROM_DCB(dcb); bp 2845 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c struct bios_parser *bp, bp 2860 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.funcs = &vbios_funcs; bp 2861 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.bios = init->bios; bp 2862 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.bios_size = bp->base.bios[BIOS_IMAGE_SIZE_OFFSET] * BIOS_IMAGE_SIZE_UNIT; bp 2864 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.ctx = init->ctx; bp 2865 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.bios_local_image = NULL; bp 2882 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->master_data_tbl = bp 2886 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->master_data_tbl) bp 2889 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl_offset = DATA_TABLES(Object_Header); bp 2891 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (!bp->object_info_tbl_offset) bp 2895 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c GET_IMAGE(ATOM_OBJECT_HEADER, bp->object_info_tbl_offset); bp 2901 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c &bp->object_info_tbl.revision); bp 2903 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c if (bp->object_info_tbl.revision.major == 1 bp 2904 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c && bp->object_info_tbl.revision.minor >= 3) { bp 2908 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl_offset); bp 2912 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl.v1_3 = tbl_v3; bp 2913 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c } else if (bp->object_info_tbl.revision.major == 1 bp 2914 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c && bp->object_info_tbl.revision.minor >= 1) bp 2915 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->object_info_tbl.v1_1 = object_info_tbl; bp 2919 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c dal_bios_parser_init_cmd_tbl(bp); bp 2920 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c dal_bios_parser_init_cmd_tbl_helper(&bp->cmd_helper, dce_version); bp 2922 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.integrated_info = bios_parser_create_integrated_info(&bp->base); bp 2923 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c bp->base.fw_info_valid = bios_parser_get_firmware_info(&bp->base, &bp->base.fw_info) == BP_RESULT_OK; bp 69 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.ctx->logger bp 81 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c static enum bp_result get_gpio_i2c_info(struct bios_parser *bp, bp 95 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 99 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 102 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c static struct atom_hpd_int_record *get_hpd_record(struct bios_parser *bp, bp 106 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 112 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c #define DATA_TABLES(table) (bp->master_data_tbl->listOfdatatables.table) bp 114 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c static void destruct(struct bios_parser *bp) bp 116 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c kfree(bp->base.bios_local_image); bp 117 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c kfree(bp->base.integrated_info); bp 122 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(*dcb); bp 124 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp) { bp 129 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c destruct(bp); bp 131 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c kfree(bp); bp 160 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 164 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) { bp 165 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (bp->object_info_tbl.v1_4->display_path[i].encoderobjid != 0) bp 175 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 178 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct object_info_table *tbl = &bp->object_info_tbl; bp 198 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 202 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct object_info_table *tbl = &bp->object_info_tbl; bp 255 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 263 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) { bp 265 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl.v1_4->display_path[i].encoderobjid); bp 268 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return &bp->object_info_tbl.v1_4->display_path[i]; bp 276 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) { bp 278 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl.v1_4->display_path[i].display_objid); bp 281 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return &bp->object_info_tbl.v1_4->display_path[i]; bp 297 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 302 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c object = get_bios_object(bp, id); bp 307 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c offset = object->disp_recordoffset + bp->object_info_tbl_offset; bp 325 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (get_gpio_i2c_info(bp, record, info) == bp 337 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 419 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 426 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c object = get_bios_object(bp, id); bp 431 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c record = get_hpd_record(bp, object); bp 443 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 455 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c + bp->object_info_tbl_offset; bp 496 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 617 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 624 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c object = get_bios_object(bp, connector_object_id); bp 638 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 718 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 810 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 829 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return get_ss_info_v4_1(bp, signal, index, ss_info); bp 831 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return get_ss_info_v4_2(bp, signal, index, ss_info); bp 844 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 926 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c *bp = BP_FROM_DCB(dcb); bp 944 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return get_embedded_panel_info_v2_1(bp, info); bp 999 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1003 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return (le16_to_cpu(bp->object_info_tbl.v1_4->supporteddevices) & bp 1021 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1023 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.transmitter_control) bp 1026 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.transmitter_control(bp, cntl); bp 1033 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1035 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.dig_encoder_control) bp 1038 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.dig_encoder_control(bp, cntl); bp 1045 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1047 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.set_pixel_clock) bp 1050 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.set_pixel_clock(bp, bp_params); bp 1057 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1059 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.set_dce_clock) bp 1062 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.set_dce_clock(bp, bp_params); bp 1069 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1071 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.set_crtc_timing) bp 1074 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.set_crtc_timing(bp, bp_params); bp 1082 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1084 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.enable_crtc) bp 1087 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.enable_crtc(bp, id, enable); bp 1095 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1097 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->cmd_tbl.enable_disp_power_gating) bp 1100 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return bp->cmd_tbl.enable_disp_power_gating(bp, controller_id, bp 1130 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1144 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c result = get_firmware_info_v3_1(bp, info); bp 1147 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c result = get_firmware_info_v3_2(bp, info); bp 1150 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c result = get_firmware_info_v3_2(bp, info); bp 1165 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1202 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (bp->cmd_tbl.get_smu_clock_info != NULL) { bp 1205 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->cmd_tbl.get_smu_clock_info(bp, SMU9_SYSPLL0_ID) * 10; bp 1212 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1277 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (bp->cmd_tbl.get_smu_clock_info != NULL) { bp 1280 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->cmd_tbl.get_smu_clock_info(bp, SMU9_SYSPLL0_ID) * 10; bp 1283 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->cmd_tbl.get_smu_clock_info(bp, SMU11_SYSPLL3_0_ID) * 10; bp 1294 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1301 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c object = get_bios_object(bp, object_id); bp 1306 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c record = get_encoder_cap_record(bp, object); bp 1326 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1337 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c offset = object->encoder_recordoffset + bp->object_info_tbl_offset; bp 1377 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1609 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1630 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c result = get_integrated_info_v11(bp, info); bp 1661 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1671 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (construct_integrated_info(bp, info) == BP_RESULT_OK) bp 1690 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp; bp 1698 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp = BP_FROM_DCB(dcb); bp 1699 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c tbl = &bp->object_info_tbl; bp 1705 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c (unsigned int)(bp->object_info_tbl_offset); bp 1802 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = BP_FROM_DCB(dcb); bp 1811 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c tbl = &bp->object_info_tbl; bp 1832 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp; bp 1841 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp = BP_FROM_DCB(dcb); bp 1922 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp, bp 1937 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.funcs = &vbios_funcs; bp 1938 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.bios = init->bios; bp 1939 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.bios_size = bp->base.bios[OFFSET_TO_ATOM_ROM_IMAGE_SIZE] * BIOS_IMAGE_SIZE_UNIT; bp 1941 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.ctx = init->ctx; bp 1943 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.bios_local_image = NULL; bp 1960 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->master_data_tbl = bp 1964 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->master_data_tbl) bp 1967 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl_offset = DATA_TABLES(displayobjectinfo); bp 1969 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp->object_info_tbl_offset) bp 1974 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl_offset); bp 1980 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c &bp->object_info_tbl.revision); bp 1982 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (bp->object_info_tbl.revision.major == 1 bp 1983 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c && bp->object_info_tbl.revision.minor >= 4) { bp 1987 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl_offset); bp 1991 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->object_info_tbl.v1_4 = tbl_v1_4; bp 1995 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c dal_firmware_parser_init_cmd_tbl(bp); bp 1996 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c dal_bios_parser_init_cmd_tbl_helper2(&bp->cmd_helper, dce_version); bp 1998 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.integrated_info = bios_parser_create_integrated_info(&bp->base); bp 1999 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp->base.fw_info_valid = bios_parser_get_firmware_info(&bp->base, &bp->base.fw_info) == BP_RESULT_OK; bp 2008 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c struct bios_parser *bp = NULL; bp 2010 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL); bp 2011 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (!bp) bp 2014 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c if (bios_parser_construct(bp, init, dce_version)) bp 2015 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c return &bp->base; bp 2017 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c kfree(bp); bp 36 drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c uint8_t *bios_get_image(struct dc_bios *bp, bp 40 drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c if (bp->bios && offset + size < bp->bios_size) bp 41 drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c return bp->bios + offset; bp 31 drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h uint8_t *bios_get_image(struct dc_bios *bp, uint32_t offset, bp 39 drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h #define GET_IMAGE(type, offset) ((type *) bios_get_image(&bp->base, offset, sizeof(type))) bp 38 drivers/gpu/drm/amd/display/dc/bios/command_table.c (amdgpu_atom_execute_table(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \ bp 43 drivers/gpu/drm/amd/display/dc/bios/command_table.c amdgpu_atom_parse_cmd_header(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \ bp 47 drivers/gpu/drm/amd/display/dc/bios/command_table.c bios_cmd_table_para_revision(bp->base.ctx->driver_context, \ bp 50 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dig_encoder_control(struct bios_parser *bp); bp 51 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_transmitter_control(struct bios_parser *bp); bp 52 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_pixel_clock(struct bios_parser *bp); bp 53 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp); bp 54 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_adjust_display_pll(struct bios_parser *bp); bp 55 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dac_encoder_control(struct bios_parser *bp); bp 56 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dac_output_control(struct bios_parser *bp); bp 57 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_crtc_timing(struct bios_parser *bp); bp 58 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_crtc(struct bios_parser *bp); bp 59 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_crtc_mem_req(struct bios_parser *bp); bp 60 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_external_encoder_control(struct bios_parser *bp); bp 61 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_disp_power_gating(struct bios_parser *bp); bp 62 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_program_clock(struct bios_parser *bp); bp 63 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_dce_clock(struct bios_parser *bp); bp 65 drivers/gpu/drm/amd/display/dc/bios/command_table.c void dal_bios_parser_init_cmd_tbl(struct bios_parser *bp) bp 67 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_dig_encoder_control(bp); bp 68 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_transmitter_control(bp); bp 69 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_set_pixel_clock(bp); bp 70 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_enable_spread_spectrum_on_ppll(bp); bp 71 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_adjust_display_pll(bp); bp 72 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_dac_encoder_control(bp); bp 73 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_dac_output_control(bp); bp 74 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_set_crtc_timing(bp); bp 75 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_enable_crtc(bp); bp 76 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_enable_crtc_mem_req(bp); bp 77 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_program_clock(bp); bp 78 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_external_encoder_control(bp); bp 79 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_enable_disp_power_gating(bp); bp 80 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_set_dce_clock(bp); bp 105 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 109 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 113 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 116 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_encoder_control_dig_v1(struct bios_parser *bp); bp 118 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dig_encoder_control(struct bios_parser *bp) bp 125 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v3; bp 128 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v4; bp 132 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v5; bp 136 drivers/gpu/drm/amd/display/dc/bios/command_table.c init_encoder_control_dig_v1(bp); bp 142 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 145 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 148 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 151 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_encoder_control_dig_v1(struct bios_parser *bp) bp 153 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct cmd_tbl *cmd_tbl = &bp->cmd_tbl; bp 169 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 173 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct cmd_tbl *cmd_tbl = &bp->cmd_tbl; bp 180 drivers/gpu/drm/amd/display/dc/bios/command_table.c cmd_tbl->encoder_control_dig1(bp, cntl); bp 185 drivers/gpu/drm/amd/display/dc/bios/command_table.c cmd_tbl->encoder_control_dig2(bp, cntl); bp 196 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 202 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->assign_control_parameter(bp->cmd_helper, cntl, ¶ms); bp 211 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 217 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->assign_control_parameter(bp->cmd_helper, cntl, ¶ms); bp 226 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 240 drivers/gpu/drm/amd/display/dc/bios/command_table.c params.ucAction = bp->cmd_helper->encoder_action_to_atom(cntl->action); bp 243 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 255 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 269 drivers/gpu/drm/amd/display/dc/bios/command_table.c params.ucAction = bp->cmd_helper->encoder_action_to_atom(cntl->action); bp 272 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)(bp->cmd_helper->encoder_mode_bp_to_atom( bp 284 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 291 drivers/gpu/drm/amd/display/dc/bios/command_table.c params.ucAction = bp->cmd_helper->encoder_action_to_atom(cntl->action); bp 295 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)(bp->cmd_helper->encoder_mode_bp_to_atom( bp 350 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 353 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 356 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 359 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 362 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 365 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_transmitter_control(struct bios_parser *bp) bp 375 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = transmitter_control_v2; bp 378 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = transmitter_control_v3; bp 381 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = transmitter_control_v4; bp 384 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = transmitter_control_v1_5; bp 387 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = transmitter_control_v1_6; bp 391 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.transmitter_control = NULL; bp 397 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 505 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->transmitter_bp_to_atom( bp 517 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 525 drivers/gpu/drm/amd/display/dc/bios/command_table.c const struct command_table_helper *cmd = bp->cmd_helper; bp 651 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 659 drivers/gpu/drm/amd/display/dc/bios/command_table.c const struct command_table_helper *cmd = bp->cmd_helper; bp 774 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 778 drivers/gpu/drm/amd/display/dc/bios/command_table.c const struct command_table_helper *cmd = bp->cmd_helper; bp 835 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 839 drivers/gpu/drm/amd/display/dc/bios/command_table.c const struct command_table_helper *cmd = bp->cmd_helper; bp 904 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 907 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 910 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 913 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 916 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_pixel_clock(struct bios_parser *bp) bp 920 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v3; bp 923 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v5; bp 926 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v6; bp 929 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7; bp 934 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_pixel_clock = NULL; bp 940 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 971 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->encoder_id_to_atom( bp 975 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)(bp->cmd_helper->encoder_mode_bp_to_atom( bp 1012 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1022 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->clock_source_id_to_atom(bp_params->pll_id, &pll_id) bp 1023 drivers/gpu/drm/amd/display/dc/bios/command_table.c && bp->cmd_helper->controller_id_to_atom( bp 1036 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->encoder_id_to_atom( bp 1040 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 1069 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1079 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->clock_source_id_to_atom(bp_params->pll_id, &pll_id) bp 1080 drivers/gpu/drm/amd/display/dc/bios/command_table.c && bp->cmd_helper->controller_id_to_atom( bp 1112 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->encoder_id_to_atom( bp 1116 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t) bp->cmd_helper->encoder_mode_bp_to_atom( bp 1147 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1157 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->clock_source_id_to_atom(bp_params->pll_id, &pll_id) bp 1158 drivers/gpu/drm/amd/display/dc/bios/command_table.c && bp->cmd_helper->controller_id_to_atom(bp_params->controller_id, &controller_id)) { bp 1180 drivers/gpu/drm/amd/display/dc/bios/command_table.c clk.ucTransmitterID = bp->cmd_helper->encoder_id_to_atom(dal_graphics_object_id_get_encoder_id(bp_params->encoder_object_id)); bp 1181 drivers/gpu/drm/amd/display/dc/bios/command_table.c clk.ucEncoderMode = (uint8_t) bp->cmd_helper->encoder_mode_bp_to_atom(bp_params->signal_type, false); bp 1185 drivers/gpu/drm/amd/display/dc/bios/command_table.c clk.ucDeepColorRatio = (uint8_t) bp->cmd_helper->transmitter_color_depth_to_atom(bp_params->color_depth); bp 1222 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1226 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1230 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1234 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_spread_spectrum_on_ppll(struct bios_parser *bp) bp 1238 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_spread_spectrum_on_ppll = bp 1242 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_spread_spectrum_on_ppll = bp 1246 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_spread_spectrum_on_ppll = bp 1252 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_spread_spectrum_on_ppll = NULL; bp 1258 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1302 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1354 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1431 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1434 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1437 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_adjust_display_pll(struct bios_parser *bp) bp 1441 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.adjust_display_pll = adjust_display_pll_v2; bp 1444 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.adjust_display_pll = adjust_display_pll_v3; bp 1449 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.adjust_display_pll = NULL; bp 1455 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1467 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->encoder_id_to_atom( bp 1471 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 1477 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1490 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->encoder_id_to_atom( bp 1494 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 1538 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1543 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1548 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dac_encoder_control(struct bios_parser *bp) bp 1552 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac1_encoder_control = dac1_encoder_control_v1; bp 1555 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac1_encoder_control = NULL; bp 1560 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac2_encoder_control = dac2_encoder_control_v1; bp 1563 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac2_encoder_control = NULL; bp 1587 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1608 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1636 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1639 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1642 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_dac_output_control(struct bios_parser *bp) bp 1646 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac1_output_control = dac1_output_control_v1; bp 1649 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac1_output_control = NULL; bp 1654 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac2_output_control = dac2_output_control_v1; bp 1657 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.dac2_output_control = NULL; bp 1663 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bool enable) bp 1680 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bool enable) bp 1705 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1708 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1711 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_crtc_timing(struct bios_parser *bp) bp 1718 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_crtc_timing = bp 1724 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_crtc_timing = NULL; bp 1730 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_crtc_timing = set_crtc_timing_v1; bp 1735 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_crtc_timing = NULL; bp 1741 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1748 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->controller_id_to_atom( bp 1814 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1821 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->controller_id_to_atom( bp 1905 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1909 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_crtc(struct bios_parser *bp) bp 1913 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_crtc = enable_crtc_v1; bp 1918 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_crtc = NULL; bp 1924 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1932 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->controller_id_to_atom(controller_id, &id)) bp 1957 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1961 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_enable_crtc_mem_req(struct bios_parser *bp) bp 1965 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_crtc_mem_req = enable_crtc_mem_req_v1; bp 1968 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_crtc_mem_req = NULL; bp 1974 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 1982 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->controller_id_to_atom(controller_id, &id)) { bp 2008 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2011 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2014 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_program_clock(struct bios_parser *bp) bp 2018 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.program_clock = program_clock_v5; bp 2021 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.program_clock = program_clock_v6; bp 2026 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.program_clock = NULL; bp 2032 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2041 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (!bp->cmd_helper->clock_source_id_to_atom( bp 2063 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2073 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (!bp->cmd_helper->clock_source_id_to_atom( bp 2110 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2114 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp) bp 2118 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.external_encoder_control = bp 2122 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.external_encoder_control = NULL; bp 2128 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2190 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 2212 drivers/gpu/drm/amd/display/dc/bios/command_table.c (uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom( bp 2237 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2242 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp) bp 2246 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_disp_power_gating = bp 2252 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.enable_disp_power_gating = NULL; bp 2258 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2267 drivers/gpu/drm/amd/display/dc/bios/command_table.c if (bp->cmd_helper->controller_id_to_atom(crtc_id, &atom_crtc_id)) bp 2273 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_helper->disp_power_gating_action_to_atom(action); bp 2289 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2292 drivers/gpu/drm/amd/display/dc/bios/command_table.c static void init_set_dce_clock(struct bios_parser *bp) bp 2296 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1; bp 2301 drivers/gpu/drm/amd/display/dc/bios/command_table.c bp->cmd_tbl.set_dce_clock = NULL; bp 2307 drivers/gpu/drm/amd/display/dc/bios/command_table.c struct bios_parser *bp, bp 2315 drivers/gpu/drm/amd/display/dc/bios/command_table.c const struct command_table_helper *cmd = bp->cmd_helper; bp 34 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 37 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 40 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 43 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 46 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 49 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 53 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 56 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 61 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 66 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 69 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 72 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 75 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 79 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 83 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 86 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 89 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 93 drivers/gpu/drm/amd/display/dc/bios/command_table.h struct bios_parser *bp, bp 97 drivers/gpu/drm/amd/display/dc/bios/command_table.h void dal_bios_parser_init_cmd_tbl(struct bios_parser *bp); bp 42 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->base.ctx->logger bp 50 drivers/gpu/drm/amd/display/dc/bios/command_table2.c (amdgpu_atom_execute_table(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \ bp 55 drivers/gpu/drm/amd/display/dc/bios/command_table2.c amdgpu_atom_parse_cmd_header(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \ bp 59 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bios_cmd_table_para_revision(bp->base.ctx->driver_context, \ bp 87 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 90 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_dig_encoder_control(struct bios_parser *bp) bp 97 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.dig_encoder_control = encoder_control_digx_v1_5; bp 101 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.dig_encoder_control = NULL; bp 107 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 114 drivers/gpu/drm/amd/display/dc/bios/command_table2.c params.action = bp->cmd_helper->encoder_action_to_atom(cntl->action); bp 118 drivers/gpu/drm/amd/display/dc/bios/command_table2.c (uint8_t)(bp->cmd_helper->encoder_mode_bp_to_atom( bp 173 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 176 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_transmitter_control(struct bios_parser *bp) bp 185 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.transmitter_control = transmitter_control_v1_6; bp 189 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.transmitter_control = NULL; bp 195 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 199 drivers/gpu/drm/amd/display/dc/bios/command_table2.c const struct command_table_helper *cmd = bp->cmd_helper; bp 241 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 244 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_set_pixel_clock(struct bios_parser *bp) bp 248 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_pixel_clock = set_pixel_clock_v7; bp 253 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_pixel_clock = NULL; bp 261 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 271 drivers/gpu/drm/amd/display/dc/bios/command_table2.c if (bp->cmd_helper->clock_source_id_to_atom(bp_params->pll_id, &pll_id) bp 272 drivers/gpu/drm/amd/display/dc/bios/command_table2.c && bp->cmd_helper->controller_id_to_atom(bp_params-> bp 296 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_helper->encoder_id_to_atom( bp 300 drivers/gpu/drm/amd/display/dc/bios/command_table2.c clk.encoder_mode = (uint8_t) bp-> bp 307 drivers/gpu/drm/amd/display/dc/bios/command_table2.c (uint8_t) bp->cmd_helper-> bp 349 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 352 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_set_crtc_timing(struct bios_parser *bp) bp 359 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_crtc_timing = bp 364 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_crtc_timing = NULL; bp 370 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 377 drivers/gpu/drm/amd/display/dc/bios/command_table2.c if (bp->cmd_helper->controller_id_to_atom( bp 472 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 476 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_enable_crtc(struct bios_parser *bp) bp 480 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.enable_crtc = enable_crtc_v1; bp 485 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.enable_crtc = NULL; bp 491 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 499 drivers/gpu/drm/amd/display/dc/bios/command_table2.c if (bp->cmd_helper->controller_id_to_atom(controller_id, &id)) bp 534 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 538 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp) bp 542 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.external_encoder_control = bp 546 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.external_encoder_control = NULL; bp 552 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 568 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 573 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp) bp 577 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.enable_disp_power_gating = bp 583 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.enable_disp_power_gating = NULL; bp 589 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 599 drivers/gpu/drm/amd/display/dc/bios/command_table2.c if (bp->cmd_helper->controller_id_to_atom(crtc_id, &atom_crtc_id)) bp 605 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_helper->disp_power_gating_action_to_atom(action); bp 622 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 625 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_set_dce_clock(struct bios_parser *bp) bp 629 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_dce_clock = set_dce_clock_v2_1; bp 634 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.set_dce_clock = NULL; bp 640 drivers/gpu/drm/amd/display/dc/bios/command_table2.c struct bios_parser *bp, bp 648 drivers/gpu/drm/amd/display/dc/bios/command_table2.c const struct command_table_helper *cmd = bp->cmd_helper; bp 707 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static unsigned int get_smu_clock_info_v3_1(struct bios_parser *bp, uint8_t id); bp 709 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static void init_get_smu_clock_info(struct bios_parser *bp) bp 712 drivers/gpu/drm/amd/display/dc/bios/command_table2.c bp->cmd_tbl.get_smu_clock_info = get_smu_clock_info_v3_1; bp 716 drivers/gpu/drm/amd/display/dc/bios/command_table2.c static unsigned int get_smu_clock_info_v3_1(struct bios_parser *bp, uint8_t id) bp 734 drivers/gpu/drm/amd/display/dc/bios/command_table2.c void dal_firmware_parser_init_cmd_tbl(struct bios_parser *bp) bp 736 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_dig_encoder_control(bp); bp 737 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_transmitter_control(bp); bp 738 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_set_pixel_clock(bp); bp 740 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_set_crtc_timing(bp); bp 742 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_enable_crtc(bp); bp 744 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_external_encoder_control(bp); bp 745 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_enable_disp_power_gating(bp); bp 746 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_set_dce_clock(bp); bp 747 drivers/gpu/drm/amd/display/dc/bios/command_table2.c init_get_smu_clock_info(bp); bp 34 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 37 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 40 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 43 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 46 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 49 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 53 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 56 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 61 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 66 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 69 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 72 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 75 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 79 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 83 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 86 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 89 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 93 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, bp 96 drivers/gpu/drm/amd/display/dc/bios/command_table2.h struct bios_parser *bp, uint8_t id); bp 100 drivers/gpu/drm/amd/display/dc/bios/command_table2.h void dal_firmware_parser_init_cmd_tbl(struct bios_parser *bp); bp 235 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_base->ctx->dc_bios; bp 251 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c bp->funcs->program_display_engine_pll(bp, &pxl_clk_params); bp 275 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 278 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c if (bp->integrated_info) bp 279 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c clk_mgr_dce->dentist_vco_freq_khz = bp->integrated_info->dentist_vco_freq; bp 281 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c clk_mgr_dce->dentist_vco_freq_khz = bp->fw_info.smu_gpu_pll_output_freq; bp 314 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c if (bp->integrated_info) bp 315 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c if (bp->integrated_info->disp_clk_voltage[i].max_supported_clk >= 100000) bp 317 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c bp->integrated_info->disp_clk_voltage[i].max_supported_clk; bp 320 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c if (!debug->disable_dfs_bypass && bp->integrated_info) bp 321 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c if (bp->integrated_info->gpu_cap_info & DFS_BYPASS_ENABLE) bp 327 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 328 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c int ss_info_num = bp->funcs->get_ss_entry_number( bp 329 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_GPU_PLL); bp 333 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c enum bp_result result = bp->funcs->get_spread_spectrum_info( bp 334 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_GPU_PLL, 0, &info); bp 357 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c result = bp->funcs->get_spread_spectrum_info( bp 358 drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_DISPLAY_PORT, 0, &info); bp 74 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c struct dc_bios *bp = clk_mgr_base->ctx->dc_bios; bp 90 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 111 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 128 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c struct dc_bios *bp = clk_mgr->base.ctx->dc_bios; bp 144 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 171 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c struct dc_bios *bp = clk_mgr->base.ctx->dc_bios; bp 187 drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 60 drivers/gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 64 drivers/gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c result = bp->funcs->get_spread_spectrum_info(bp, AS_SIGNAL_TYPE_XGMI, bp 254 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c struct dc_bios *bp = ctx->dc_bios; bp 268 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c if (bp->integrated_info) bp 269 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c clk_mgr->dentist_vco_freq_khz = bp->integrated_info->dentist_vco_freq; bp 270 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c if (bp->fw_info_valid && clk_mgr->dentist_vco_freq_khz == 0) { bp 271 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c clk_mgr->dentist_vco_freq_khz = bp->fw_info.smu_gpu_pll_output_freq; bp 276 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c if (!debug->disable_dfs_bypass && bp->integrated_info) bp 277 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c if (bp->integrated_info->gpu_cap_info & DFS_BYPASS_ENABLE) bp 252 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c struct dc_bios *bp = clk_mgr->ctx->dc_bios; bp 268 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp->funcs->program_display_engine_pll(bp, &pxl_clk_params); bp 292 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c struct dc_bios *bp = clk_mgr->ctx->dc_bios; bp 308 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 327 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp->funcs->set_dce_clock(bp, &dce_clk_params); bp 344 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 349 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c if (bp->integrated_info) bp 350 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c info = *bp->integrated_info; bp 354 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp->funcs->get_firmware_info(bp, &fw_info); bp 394 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c if (!debug->disable_dfs_bypass && bp->integrated_info) bp 395 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c if (bp->integrated_info->gpu_cap_info & DFS_BYPASS_ENABLE) bp 401 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 402 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c int ss_info_num = bp->funcs->get_ss_entry_number( bp 403 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_GPU_PLL); bp 407 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c enum bp_result result = bp->funcs->get_spread_spectrum_info( bp 408 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_GPU_PLL, 0, &info); bp 431 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c result = bp->funcs->get_spread_spectrum_info( bp 432 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c bp, AS_SIGNAL_TYPE_DISPLAY_PORT, 0, &info); bp 469 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios; bp 473 drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c result = bp->funcs->get_spread_spectrum_info(bp, AS_SIGNAL_TYPE_XGMI, bp 1241 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c init_data->bp == NULL) bp 1244 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c if (!init_data->bp->fw_info_valid) bp 1247 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c fw_info = &init_data->bp->fw_info; bp 1339 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c calc_pll_cs_init_data.bp = bios; bp 1358 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c calc_pll_cs_init_data_hdmi.bp = bios; bp 129 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c struct dc_bios *bp = enc110->base.ctx->dc_bios; bp 131 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c result = bp->funcs->transmitter_control(bp, cntl); bp 567 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c if (enc110->base.bp->funcs->encoder_control( bp 568 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c enc110->base.bp, &cntl) != BP_RESULT_OK) bp 681 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c if (enc110->base.bp->funcs->encoder_control( bp 682 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c enc110->base.bp, &cntl) != BP_RESULT_OK) bp 705 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c if (enc110->base.bp->funcs->encoder_control( bp 706 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c enc110->base.bp, &cntl) != BP_RESULT_OK) bp 1657 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c struct dc_bios *bp, bp 1666 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c enc110->base.bp = bp; bp 707 drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h struct dc_bios *bp, bp 914 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c struct dc_bios *bp; bp 922 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c bp = ctx->dc_bios; bp 924 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c if (bp->fw_info_valid && bp->fw_info.external_clock_source_frequency_for_dp != 0) { bp 926 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true); bp 929 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false); bp 931 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 933 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 938 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true); bp 941 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 943 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 2369 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c struct dc_bios *bp; bp 2374 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c bp = dc->ctx->dc_bios; bp 2380 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c dc, i, bp, bp 2383 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c dc, i, bp, bp 1278 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c struct dc_bios *bp; bp 1301 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c bp = ctx->dc_bios; bp 1303 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c if (bp->fw_info_valid && bp->fw_info.external_clock_source_frequency_for_dp != 0) { bp 1305 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true); bp 1308 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, bp 1311 drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, bp 146 drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c result = tg->bp->funcs->enable_crtc(tg->bp, tg110->controller_id, true); bp 238 drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c result = tg->bp->funcs->enable_crtc(tg->bp, tg110->controller_id, false); bp 343 drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c result = tg->bp->funcs->program_crtc_timing(tg->bp, &bp_params); bp 2258 drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c tg110->base.bp = ctx->dc_bios; bp 698 drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c tg110->base.bp = ctx->dc_bios; bp 793 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c struct dc_bios *bp = ctx->dc_bios; bp 826 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c bp->funcs->get_embedded_panel_info(bp, &panel_info)) { bp 151 drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c result = tg->bp->funcs->enable_crtc(tg->bp, tg110->controller_id, true); bp 1254 drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c tg110->base.bp = ctx->dc_bios; bp 880 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c struct dc_bios *bp; bp 903 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c bp = ctx->dc_bios; bp 905 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c if (bp->fw_info_valid && bp->fw_info.external_clock_source_frequency_for_dp != 0) { bp 907 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true); bp 910 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false); bp 912 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 914 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 919 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true); bp 922 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 924 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 1077 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c struct dc_bios *bp; bp 1100 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c bp = ctx->dc_bios; bp 1102 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c if (bp->fw_info_valid && bp->fw_info.external_clock_source_frequency_for_dp != 0) { bp 1104 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true); bp 1107 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false); bp 1109 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 1111 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 1116 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true); bp 1119 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false); bp 1121 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false); bp 1274 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c struct dc_bios *bp; bp 1297 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c bp = ctx->dc_bios; bp 1299 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c if (bp->fw_info_valid && bp->fw_info.external_clock_source_frequency_for_dp != 0) { bp 1301 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true); bp 1304 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[0], false); bp 1306 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[1], false); bp 1311 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[0], true); bp 1314 drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[1], false); bp 238 drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c tg110->base.bp = ctx->dc_bios; bp 669 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c struct dc_bios *bp = dc->ctx->dc_bios; bp 686 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c bp->funcs->enable_disp_power_gating(bp, bp 691 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c bp->funcs->enable_disp_power_gating(bp, bp 101 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c struct dc_bios *bp = enc10->base.ctx->dc_bios; bp 103 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c result = bp->funcs->transmitter_control(bp, cntl); bp 508 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c if (enc1->base.bp->funcs->encoder_control( bp 509 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c enc1->base.bp, &cntl) != BP_RESULT_OK) bp 615 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c if (enc1->base.bp->funcs->encoder_control( bp 616 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c enc1->base.bp, &cntl) != BP_RESULT_OK) bp 1597 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c struct dc_bios *bp, bp 1606 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c enc1->base.bp = bp; bp 514 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h struct dc_bios *bp, bp 601 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c struct dc_bios *bp, bp 610 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.c enc1->base.bp = bp; bp 91 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_stream_encoder.h struct dc_bios *bp, bp 121 drivers/gpu/drm/amd/display/dc/inc/clock_source.h struct dc_bios *bp; bp 108 drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h struct dc_bios *bp; bp 126 drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h struct dc_bios *bp; bp 129 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c struct dc_bios *bp) bp 133 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c if (!bp) bp 139 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c enc->bp = bp; bp 145 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c struct dc_context *ctx, struct dc_bios *bp) bp 152 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c if (virtual_stream_encoder_construct(enc, ctx, bp)) bp 32 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.h struct dc_context *ctx, struct dc_bios *bp); bp 37 drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.h struct dc_bios *bp); bp 34 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c bp, flg, fm, np) \ bp 45 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c .bpp = bp, \ bp 53 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c alpha, bp, flg, fm, np, th) \ bp 64 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c .bpp = bp, \ bp 73 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c alpha, chroma, count, bp, flg, fm, np) \ bp 84 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c .bpp = bp, \ bp 166 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c #define PLANAR_YUV_FMT(fmt, a, r, g, b, e0, e1, e2, alpha, chroma, bp, \ bp 178 drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c .bpp = bp, \ bp 406 drivers/gpu/drm/sun4i/sun4i_tcon.c unsigned int bp; bp 429 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_htotal - mode->crtc_hsync_start; bp 431 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->crtc_htotal, bp); bp 436 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON0_BASIC1_H_BACKPORCH(bp)); bp 442 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_vtotal - mode->crtc_vsync_start; bp 444 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->crtc_vtotal, bp); bp 449 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON0_BASIC2_V_BACKPORCH(bp)); bp 485 drivers/gpu/drm/sun4i/sun4i_tcon.c unsigned int bp, hsync, vsync; bp 508 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_htotal - mode->crtc_hsync_start; bp 510 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->crtc_htotal, bp); bp 515 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON0_BASIC1_H_BACKPORCH(bp)); bp 521 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_vtotal - mode->crtc_vsync_start; bp 523 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->crtc_vtotal, bp); bp 528 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON0_BASIC2_V_BACKPORCH(bp)); bp 587 drivers/gpu/drm/sun4i/sun4i_tcon.c unsigned int bp, hsync, vsync, vtotal; bp 627 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_htotal - mode->crtc_hsync_start; bp 629 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->htotal, bp); bp 632 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON1_BASIC3_H_BACKPORCH(bp)); bp 634 drivers/gpu/drm/sun4i/sun4i_tcon.c bp = mode->crtc_vtotal - mode->crtc_vsync_start; bp 636 drivers/gpu/drm/sun4i/sun4i_tcon.c mode->crtc_vtotal, bp); bp 658 drivers/gpu/drm/sun4i/sun4i_tcon.c SUN4I_TCON1_BASIC4_V_BACKPORCH(bp)); bp 71 drivers/gpu/drm/sun4i/sun4i_tcon.h #define SUN4I_TCON0_BASIC1_H_BACKPORCH(bp) (((bp) - 1) & 0xfff) bp 75 drivers/gpu/drm/sun4i/sun4i_tcon.h #define SUN4I_TCON0_BASIC2_V_BACKPORCH(bp) (((bp) - 1) & 0xfff) bp 145 drivers/gpu/drm/sun4i/sun4i_tcon.h #define SUN4I_TCON1_BASIC3_H_BACKPORCH(bp) (((bp) - 1) & 0xfff) bp 149 drivers/gpu/drm/sun4i/sun4i_tcon.h #define SUN4I_TCON1_BASIC4_V_BACKPORCH(bp) (((bp) - 1) & 0xfff) bp 152 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c unsigned long bp = channel->cookie_high; bp 162 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c VMW_HYPERVISOR_MAGIC, bp, bp 206 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c unsigned long bp = channel->cookie_low; bp 215 drivers/gpu/drm/vmwgfx/vmwgfx_msg.c VMW_HYPERVISOR_MAGIC, bp, bp 102 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h flags, magic, bp, \ bp 121 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h "r"(bp) : \ bp 127 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h flags, magic, bp, \ bp 146 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h "r"(bp) : \ bp 161 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h flags, magic, bp, \ bp 182 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h "m"(bp) : \ bp 188 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h flags, magic, bp, \ bp 209 drivers/gpu/drm/vmwgfx/vmwgfx_msg.h "m"(bp) : \ bp 1978 drivers/hid/hid-wiimote-modules.c __u8 o, r, y, g, b, bass, bm, bp; bp 2024 drivers/hid/hid-wiimote-modules.c bp = !(ext[4] & 0x04); bp 2059 drivers/hid/hid-wiimote-modules.c input_report_key(wdata->extension.input, BTN_START, bp); bp 2206 drivers/hid/hid-wiimote-modules.c __u8 sx, sy, tb, wb, bd, bm, bp, bo, br, bb, bg, by, bu; bp 2245 drivers/hid/hid-wiimote-modules.c bp = !(ext[4] & 0x04); bp 2287 drivers/hid/hid-wiimote-modules.c bp); bp 92 drivers/infiniband/hw/bnxt_re/main.c struct bnxt *bp; bp 95 drivers/infiniband/hw/bnxt_re/main.c bp = netdev_priv(en_dev->net); bp 97 drivers/infiniband/hw/bnxt_re/main.c rdev->chip_ctx.chip_num = bp->chip_num; bp 110 drivers/infiniband/hw/bnxt_re/main.c struct bnxt *bp; bp 112 drivers/infiniband/hw/bnxt_re/main.c bp = netdev_priv(rdev->en_dev->net); bp 113 drivers/infiniband/hw/bnxt_re/main.c if (BNXT_VF(bp)) bp 532 drivers/infiniband/hw/bnxt_re/main.c struct bnxt *bp = netdev_priv(netdev); bp 537 drivers/infiniband/hw/bnxt_re/main.c if (!bp->ulp_probe) bp 540 drivers/infiniband/hw/bnxt_re/main.c en_dev = bp->ulp_probe(netdev); bp 1066 drivers/infiniband/hw/bnxt_re/main.c struct bnxt *bp = netdev_priv(rdev->netdev); bp 1083 drivers/infiniband/hw/bnxt_re/main.c req.port_id = bp->pf.port_id; bp 317 drivers/infiniband/hw/hfi1/qsfp.c int offset, void *bp, int len) bp 327 drivers/infiniband/hw/hfi1/qsfp.c return i2c_bus_write(dd, bus, slave_addr, offset, offset_size, bp, len); bp 336 drivers/infiniband/hw/hfi1/qsfp.c void *bp, int len) bp 343 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_write(ppd, target, i2c_addr, offset, bp, len); bp 356 drivers/infiniband/hw/hfi1/qsfp.c int offset, void *bp, int len) bp 366 drivers/infiniband/hw/hfi1/qsfp.c return i2c_bus_read(dd, bus, slave_addr, offset, offset_size, bp, len); bp 375 drivers/infiniband/hw/hfi1/qsfp.c void *bp, int len) bp 382 drivers/infiniband/hw/hfi1/qsfp.c ret = __i2c_read(ppd, target, i2c_addr, offset, bp, len); bp 397 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 434 drivers/infiniband/hw/hfi1/qsfp.c offset, bp + count, nwrite); bp 453 drivers/infiniband/hw/hfi1/qsfp.c int one_qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 463 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_write(ppd, target, addr, bp, len); bp 477 drivers/infiniband/hw/hfi1/qsfp.c int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 513 drivers/infiniband/hw/hfi1/qsfp.c offset, bp + count, nread); bp 530 drivers/infiniband/hw/hfi1/qsfp.c int one_qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 540 drivers/infiniband/hw/hfi1/qsfp.c ret = qsfp_read(ppd, target, addr, bp, len); bp 233 drivers/infiniband/hw/hfi1/qsfp.h int offset, void *bp, int len); bp 235 drivers/infiniband/hw/hfi1/qsfp.h int offset, void *bp, int len); bp 236 drivers/infiniband/hw/hfi1/qsfp.h int qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 238 drivers/infiniband/hw/hfi1/qsfp.h int qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 240 drivers/infiniband/hw/hfi1/qsfp.h int one_qsfp_write(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 242 drivers/infiniband/hw/hfi1/qsfp.h int one_qsfp_read(struct hfi1_pportdata *ppd, u32 target, int addr, void *bp, bp 198 drivers/infiniband/hw/i40iw/i40iw_hmc.c sd_entry->u.bp.addr.pa; bp 426 drivers/infiniband/hw/i40iw/i40iw_hmc.c &sd_entry->u.bp.addr; bp 580 drivers/infiniband/hw/i40iw/i40iw_hmc.c memcpy(&sd_entry->u.bp.addr, &mem, sizeof(struct i40iw_dma_mem)); bp 581 drivers/infiniband/hw/i40iw/i40iw_hmc.c sd_entry->u.bp.sd_pd_index = sd_index; bp 589 drivers/infiniband/hw/i40iw/i40iw_hmc.c I40IW_INC_BP_REFCNT(&sd_entry->u.bp); bp 652 drivers/infiniband/hw/i40iw/i40iw_hmc.c memcpy(&pd_entry->bp.addr, page, sizeof(struct i40iw_dma_mem)); bp 653 drivers/infiniband/hw/i40iw/i40iw_hmc.c pd_entry->bp.sd_pd_index = pd_index; bp 654 drivers/infiniband/hw/i40iw/i40iw_hmc.c pd_entry->bp.entry_type = I40IW_SD_TYPE_PAGED; bp 671 drivers/infiniband/hw/i40iw/i40iw_hmc.c I40IW_INC_BP_REFCNT(&pd_entry->bp); bp 715 drivers/infiniband/hw/i40iw/i40iw_hmc.c I40IW_DEC_BP_REFCNT(&pd_entry->bp); bp 716 drivers/infiniband/hw/i40iw/i40iw_hmc.c if (pd_entry->bp.ref_cnt) bp 731 drivers/infiniband/hw/i40iw/i40iw_hmc.c mem = &pd_entry->bp.addr; bp 752 drivers/infiniband/hw/i40iw/i40iw_hmc.c I40IW_DEC_BP_REFCNT(&sd_entry->u.bp); bp 753 drivers/infiniband/hw/i40iw/i40iw_hmc.c if (sd_entry->u.bp.ref_cnt) bp 58 drivers/infiniband/hw/i40iw/i40iw_hmc.h #define I40IW_INC_BP_REFCNT(bp) ((bp)->ref_cnt++) bp 62 drivers/infiniband/hw/i40iw/i40iw_hmc.h #define I40IW_DEC_BP_REFCNT(bp) ((bp)->ref_cnt--) bp 109 drivers/infiniband/hw/i40iw/i40iw_hmc.h struct i40iw_hmc_bp bp; bp 129 drivers/infiniband/hw/i40iw/i40iw_hmc.h struct i40iw_hmc_bp bp; bp 156 drivers/infiniband/hw/i40iw/i40iw_pble.c chunk->vaddr = ((u8 *)sd_entry->u.bp.addr.va + offset); bp 397 drivers/infiniband/hw/i40iw/i40iw_pble.c sd_entry->u.pd_table.pd_page_addr.pa : sd_entry->u.bp.addr.pa; bp 47 drivers/infiniband/hw/qib/qib_qsfp.c static int qsfp_read(struct qib_pportdata *ppd, int addr, void *bp, int len) bp 53 drivers/infiniband/hw/qib/qib_qsfp.c u8 *buff = bp; bp 157 drivers/infiniband/hw/qib/qib_qsfp.c static int qib_qsfp_write(struct qib_pportdata *ppd, int addr, void *bp, bp 163 drivers/infiniband/hw/qib/qib_qsfp.c u8 *buff = bp; bp 360 drivers/infiniband/hw/qib/qib_twsi.c u8 *bp = buffer; bp 413 drivers/infiniband/hw/qib/qib_twsi.c *bp++ = rd_byte(dd, !len); bp 438 drivers/infiniband/hw/qib/qib_twsi.c const u8 *bp = buffer; bp 466 drivers/infiniband/hw/qib/qib_twsi.c if (qib_twsi_wr(dd, *bp++, 0)) bp 94 drivers/input/joystick/twidjoy.c struct twidjoy_button_spec *bp; bp 99 drivers/input/joystick/twidjoy.c for (bp = twidjoy_buttons; bp->bitmask; bp++) { bp 100 drivers/input/joystick/twidjoy.c int value = (button_bits & (bp->bitmask << bp->bitshift)) >> bp->bitshift; bp 103 drivers/input/joystick/twidjoy.c for (i = 0; i < bp->bitmask; i++) bp 104 drivers/input/joystick/twidjoy.c input_report_key(dev, bp->buttons[i], i+1 == value); bp 171 drivers/input/joystick/twidjoy.c struct twidjoy_button_spec *bp; bp 197 drivers/input/joystick/twidjoy.c for (bp = twidjoy_buttons; bp->bitmask; bp++) bp 198 drivers/input/joystick/twidjoy.c for (i = 0; i < bp->bitmask; i++) bp 199 drivers/input/joystick/twidjoy.c set_bit(bp->buttons[i], input_dev->keybit); bp 120 drivers/isdn/mISDN/core.c char *bp = buf; bp 124 drivers/isdn/mISDN/core.c *bp++ = test_channelmap(i, mdev->channelmap) ? '1' : '0'; bp 126 drivers/isdn/mISDN/core.c return bp - buf; bp 277 drivers/isdn/mISDN/core.c struct Bprotocol *bp; bp 281 drivers/isdn/mISDN/core.c list_for_each_entry(bp, &Bprotocols, list) bp 282 drivers/isdn/mISDN/core.c m |= bp->Bprotocols; bp 290 drivers/isdn/mISDN/core.c struct Bprotocol *bp; bp 293 drivers/isdn/mISDN/core.c list_for_each_entry(bp, &Bprotocols, list) bp 294 drivers/isdn/mISDN/core.c if (bp->Bprotocols & m) { bp 296 drivers/isdn/mISDN/core.c return bp; bp 317 drivers/isdn/mISDN/core.c mISDN_register_Bprotocol(struct Bprotocol *bp) bp 324 drivers/isdn/mISDN/core.c bp->name, bp->Bprotocols); bp 325 drivers/isdn/mISDN/core.c old = get_Bprotocol4mask(bp->Bprotocols); bp 329 drivers/isdn/mISDN/core.c old->name, old->Bprotocols, bp->name, bp->Bprotocols); bp 333 drivers/isdn/mISDN/core.c list_add_tail(&bp->list, &Bprotocols); bp 340 drivers/isdn/mISDN/core.c mISDN_unregister_Bprotocol(struct Bprotocol *bp) bp 345 drivers/isdn/mISDN/core.c printk(KERN_DEBUG "%s: %s/%x\n", __func__, bp->name, bp 346 drivers/isdn/mISDN/core.c bp->Bprotocols); bp 348 drivers/isdn/mISDN/core.c list_del(&bp->list); bp 460 drivers/isdn/mISDN/stack.c struct Bprotocol *bp; bp 481 drivers/isdn/mISDN/stack.c bp = get_Bprotocol4mask(pmask); bp 482 drivers/isdn/mISDN/stack.c if (!bp) bp 487 drivers/isdn/mISDN/stack.c err = bp->create(&rq2); bp 435 drivers/isdn/mISDN/tei.c u_char bp[8]; bp 437 drivers/isdn/mISDN/tei.c bp[0] = (TEI_SAPI << 2); bp 439 drivers/isdn/mISDN/tei.c bp[0] |= 2; /* CR:=1 for net command */ bp 440 drivers/isdn/mISDN/tei.c bp[1] = (GROUP_TEI << 1) | 0x1; bp 441 drivers/isdn/mISDN/tei.c bp[2] = UI; bp 442 drivers/isdn/mISDN/tei.c bp[3] = TEI_ENTITY_ID; bp 443 drivers/isdn/mISDN/tei.c bp[4] = ri >> 8; bp 444 drivers/isdn/mISDN/tei.c bp[5] = ri & 0xff; bp 445 drivers/isdn/mISDN/tei.c bp[6] = m_id; bp 446 drivers/isdn/mISDN/tei.c bp[7] = ((tei << 1) & 0xff) | 1; bp 447 drivers/isdn/mISDN/tei.c skb = _alloc_mISDN_skb(PH_DATA_REQ, new_id(mgr), 8, bp, GFP_ATOMIC); bp 1040 drivers/md/dm-bufio.c enum new_flag nf, struct dm_buffer **bp) bp 1073 drivers/md/dm-bufio.c *bp = b; bp 1079 drivers/md/dm-bufio.c struct dm_buffer **bp) bp 1081 drivers/md/dm-bufio.c return new_read(c, block, NF_GET, bp); bp 1086 drivers/md/dm-bufio.c struct dm_buffer **bp) bp 1090 drivers/md/dm-bufio.c return new_read(c, block, NF_READ, bp); bp 1095 drivers/md/dm-bufio.c struct dm_buffer **bp) bp 1099 drivers/md/dm-bufio.c return new_read(c, block, NF_FRESH, bp); bp 519 drivers/md/dm-snap-persistent.c struct dm_buffer *bp; bp 538 drivers/md/dm-snap-persistent.c area = dm_bufio_read(client, chunk, &bp); bp 550 drivers/md/dm-snap-persistent.c dm_bufio_release(bp); bp 65 drivers/md/md-bitmap.c if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */ bp 68 drivers/md/md-bitmap.c if (bitmap->bp[page].map) /* page is already allocated, just return */ bp 100 drivers/md/md-bitmap.c if (!bitmap->bp[page].map) bp 101 drivers/md/md-bitmap.c bitmap->bp[page].hijacked = 1; bp 102 drivers/md/md-bitmap.c } else if (bitmap->bp[page].map || bp 103 drivers/md/md-bitmap.c bitmap->bp[page].hijacked) { bp 110 drivers/md/md-bitmap.c bitmap->bp[page].map = mappage; bp 123 drivers/md/md-bitmap.c if (bitmap->bp[page].count) /* page is still busy */ bp 128 drivers/md/md-bitmap.c if (bitmap->bp[page].hijacked) { /* page was hijacked, undo this now */ bp 129 drivers/md/md-bitmap.c bitmap->bp[page].hijacked = 0; bp 130 drivers/md/md-bitmap.c bitmap->bp[page].map = NULL; bp 133 drivers/md/md-bitmap.c ptr = bitmap->bp[page].map; bp 134 drivers/md/md-bitmap.c bitmap->bp[page].map = NULL; bp 1207 drivers/md/md-bitmap.c bitmap->bp[page].count += inc; bp 1215 drivers/md/md-bitmap.c struct bitmap_page *bp = &bitmap->bp[page]; bp 1217 drivers/md/md-bitmap.c if (!bp->pending) bp 1218 drivers/md/md-bitmap.c bp->pending = 1; bp 1299 drivers/md/md-bitmap.c if (!counts->bp[j >> PAGE_COUNTER_SHIFT].pending) { bp 1303 drivers/md/md-bitmap.c counts->bp[j >> PAGE_COUNTER_SHIFT].pending = 0; bp 1372 drivers/md/md-bitmap.c if (bitmap->bp[page].hijacked || bp 1373 drivers/md/md-bitmap.c bitmap->bp[page].map == NULL) bp 1385 drivers/md/md-bitmap.c if (bitmap->bp[page].hijacked) { /* hijacked pointer */ bp 1390 drivers/md/md-bitmap.c &bitmap->bp[page].map)[hi]; bp 1393 drivers/md/md-bitmap.c &(bitmap->bp[page].map[pageoff]); bp 1738 drivers/md/md-bitmap.c struct bitmap_page *bp; bp 1757 drivers/md/md-bitmap.c bp = bitmap->counts.bp; bp 1762 drivers/md/md-bitmap.c if (bp) /* deallocate the page memory */ bp 1764 drivers/md/md-bitmap.c if (bp[k].map && !bp[k].hijacked) bp 1765 drivers/md/md-bitmap.c kfree(bp[k].map); bp 1766 drivers/md/md-bitmap.c kfree(bp); bp 2147 drivers/md/md-bitmap.c bitmap->counts.bp = new_bp; bp 2173 drivers/md/md-bitmap.c bitmap->counts.bp = old_counts.bp; bp 2184 drivers/md/md-bitmap.c bitmap->counts.bp[page].count += 1; bp 2217 drivers/md/md-bitmap.c if (bitmap->counts.bp != old_counts.bp) { bp 2220 drivers/md/md-bitmap.c if (!old_counts.bp[k].hijacked) bp 2221 drivers/md/md-bitmap.c kfree(old_counts.bp[k].map); bp 2222 drivers/md/md-bitmap.c kfree(old_counts.bp); bp 184 drivers/md/md-bitmap.h struct bitmap_page *bp; bp 796 drivers/media/i2c/ad9389b.c u8 *bp = b; bp 801 drivers/media/i2c/ad9389b.c sprintf(bp, "0x%02x, ", buf[j]); bp 802 drivers/media/i2c/ad9389b.c bp += 6; bp 804 drivers/media/i2c/ad9389b.c bp[0] = '\0'; bp 1461 drivers/media/i2c/adv7511-v4l2.c u8 *bp = b; bp 1465 drivers/media/i2c/adv7511-v4l2.c sprintf(bp, "0x%02x, ", buf[j]); bp 1466 drivers/media/i2c/adv7511-v4l2.c bp += 6; bp 1468 drivers/media/i2c/adv7511-v4l2.c bp[0] = '\0'; bp 85 drivers/media/tuners/tda827x.c u8 bp; bp 92 drivers/media/tuners/tda827x.c { .lomax = 62000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, bp 93 drivers/media/tuners/tda827x.c { .lomax = 66000000, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, bp 94 drivers/media/tuners/tda827x.c { .lomax = 76000000, .spd = 3, .bs = 1, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, bp 95 drivers/media/tuners/tda827x.c { .lomax = 84000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, bp 96 drivers/media/tuners/tda827x.c { .lomax = 93000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 97 drivers/media/tuners/tda827x.c { .lomax = 98000000, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 98 drivers/media/tuners/tda827x.c { .lomax = 109000000, .spd = 3, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 99 drivers/media/tuners/tda827x.c { .lomax = 123000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 100 drivers/media/tuners/tda827x.c { .lomax = 133000000, .spd = 2, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 101 drivers/media/tuners/tda827x.c { .lomax = 151000000, .spd = 2, .bs = 1, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 102 drivers/media/tuners/tda827x.c { .lomax = 154000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 103 drivers/media/tuners/tda827x.c { .lomax = 181000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 0, .div1p5 = 0}, bp 104 drivers/media/tuners/tda827x.c { .lomax = 185000000, .spd = 2, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 105 drivers/media/tuners/tda827x.c { .lomax = 217000000, .spd = 2, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 106 drivers/media/tuners/tda827x.c { .lomax = 244000000, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 107 drivers/media/tuners/tda827x.c { .lomax = 265000000, .spd = 1, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 108 drivers/media/tuners/tda827x.c { .lomax = 302000000, .spd = 1, .bs = 1, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 109 drivers/media/tuners/tda827x.c { .lomax = 324000000, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 110 drivers/media/tuners/tda827x.c { .lomax = 370000000, .spd = 1, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 111 drivers/media/tuners/tda827x.c { .lomax = 454000000, .spd = 1, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 112 drivers/media/tuners/tda827x.c { .lomax = 493000000, .spd = 0, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 113 drivers/media/tuners/tda827x.c { .lomax = 530000000, .spd = 0, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, bp 114 drivers/media/tuners/tda827x.c { .lomax = 554000000, .spd = 0, .bs = 1, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, bp 115 drivers/media/tuners/tda827x.c { .lomax = 604000000, .spd = 0, .bs = 1, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, bp 116 drivers/media/tuners/tda827x.c { .lomax = 696000000, .spd = 0, .bs = 2, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, bp 117 drivers/media/tuners/tda827x.c { .lomax = 740000000, .spd = 0, .bs = 2, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, bp 118 drivers/media/tuners/tda827x.c { .lomax = 820000000, .spd = 0, .bs = 3, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, bp 119 drivers/media/tuners/tda827x.c { .lomax = 865000000, .spd = 0, .bs = 3, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, bp 120 drivers/media/tuners/tda827x.c { .lomax = 0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0} bp 183 drivers/media/tuners/tda827x.c tda827x_table[i].bp; bp 271 drivers/media/tuners/tda827x.c (tda827x_table[i].bs << 3) + tda827x_table[i].bp; bp 25 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_buffer *bp; bp 39 drivers/media/usb/pvrusb2/pvrusb2-dvb.c bp = pvr2_stream_get_ready_buffer(stream); bp 40 drivers/media/usb/pvrusb2/pvrusb2-dvb.c if (bp != NULL) { bp 41 drivers/media/usb/pvrusb2/pvrusb2-dvb.c count = pvr2_buffer_get_count(bp); bp 46 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_buffer_get_id(bp)], bp 49 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_buffer_get_status(bp); bp 52 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_buffer_queue(bp); bp 134 drivers/media/usb/pvrusb2/pvrusb2-dvb.c struct pvr2_buffer *bp; bp 158 drivers/media/usb/pvrusb2/pvrusb2-dvb.c bp = pvr2_stream_get_buffer(stream, idx); bp 159 drivers/media/usb/pvrusb2/pvrusb2-dvb.c pvr2_buffer_set_buffer(bp, bp 167 drivers/media/usb/pvrusb2/pvrusb2-dvb.c while ((bp = pvr2_stream_get_idle_buffer(stream)) != NULL) { bp 168 drivers/media/usb/pvrusb2/pvrusb2-dvb.c ret = pvr2_buffer_queue(bp); bp 22 drivers/media/usb/pvrusb2/pvrusb2-io.c #define BUFFER_CHECK(bp) do { \ bp 23 drivers/media/usb/pvrusb2/pvrusb2-io.c if ((bp)->signature != BUFFER_SIG) { \ bp 26 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp), __FILE__, __LINE__); \ bp 27 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_describe(bp, "BadSig"); \ bp 32 drivers/media/usb/pvrusb2/pvrusb2-io.c #define BUFFER_CHECK(bp) do {} while (0) bp 99 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_describe(struct pvr2_buffer *bp, const char *msg) bp 105 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, bp 106 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), bp 107 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? bp->id : 0), bp 108 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? bp->status : 0), bp 109 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? bp->stream : NULL), bp 110 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? bp->purb : NULL), bp 111 drivers/media/usb/pvrusb2/pvrusb2-io.c (bp ? bp->signature : 0)); bp 115 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_remove(struct pvr2_buffer *bp) bp 120 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_stream *sp = bp->stream; bp 121 drivers/media/usb/pvrusb2/pvrusb2-io.c switch (bp->state) { bp 125 drivers/media/usb/pvrusb2/pvrusb2-io.c ccnt = bp->max_count; bp 130 drivers/media/usb/pvrusb2/pvrusb2-io.c ccnt = bp->max_count; bp 135 drivers/media/usb/pvrusb2/pvrusb2-io.c ccnt = bp->used_count; bp 140 drivers/media/usb/pvrusb2/pvrusb2-io.c list_del_init(&bp->list_overhead); bp 145 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), *bcnt, *cnt); bp 146 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->state = pvr2_buffer_state_none; bp 149 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_set_none(struct pvr2_buffer *bp) bp 153 drivers/media/usb/pvrusb2/pvrusb2-io.c BUFFER_CHECK(bp); bp 154 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 157 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, bp 158 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 161 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_remove(bp); bp 165 drivers/media/usb/pvrusb2/pvrusb2-io.c static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) bp 170 drivers/media/usb/pvrusb2/pvrusb2-io.c BUFFER_CHECK(bp); bp 171 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 174 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, bp 175 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 179 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_remove(bp); bp 180 drivers/media/usb/pvrusb2/pvrusb2-io.c list_add_tail(&bp->list_overhead, &sp->ready_list); bp 181 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->state = pvr2_buffer_state_ready; bp 183 drivers/media/usb/pvrusb2/pvrusb2-io.c sp->r_bcount += bp->used_count; bp 186 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 192 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_set_idle(struct pvr2_buffer *bp) bp 196 drivers/media/usb/pvrusb2/pvrusb2-io.c BUFFER_CHECK(bp); bp 197 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 200 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, bp 201 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 204 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_remove(bp); bp 205 drivers/media/usb/pvrusb2/pvrusb2-io.c list_add_tail(&bp->list_overhead, &sp->idle_list); bp 206 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->state = pvr2_buffer_state_idle; bp 208 drivers/media/usb/pvrusb2/pvrusb2-io.c sp->i_bcount += bp->max_count; bp 211 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 216 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) bp 220 drivers/media/usb/pvrusb2/pvrusb2-io.c BUFFER_CHECK(bp); bp 221 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 224 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, bp 225 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 228 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_remove(bp); bp 229 drivers/media/usb/pvrusb2/pvrusb2-io.c list_add_tail(&bp->list_overhead, &sp->queued_list); bp 230 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->state = pvr2_buffer_state_queued; bp 232 drivers/media/usb/pvrusb2/pvrusb2-io.c sp->q_bcount += bp->max_count; bp 235 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_state_decode(bp->state), bp 240 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_wipe(struct pvr2_buffer *bp) bp 242 drivers/media/usb/pvrusb2/pvrusb2-io.c if (bp->state == pvr2_buffer_state_queued) { bp 243 drivers/media/usb/pvrusb2/pvrusb2-io.c usb_kill_urb(bp->purb); bp 247 drivers/media/usb/pvrusb2/pvrusb2-io.c static int pvr2_buffer_init(struct pvr2_buffer *bp, bp 251 drivers/media/usb/pvrusb2/pvrusb2-io.c memset(bp, 0, sizeof(*bp)); bp 252 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->signature = BUFFER_SIG; bp 253 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->id = id; bp 255 drivers/media/usb/pvrusb2/pvrusb2-io.c "/*---TRACE_FLOW---*/ bufferInit %p stream=%p", bp, sp); bp 256 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->stream = sp; bp 257 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->state = pvr2_buffer_state_none; bp 258 drivers/media/usb/pvrusb2/pvrusb2-io.c INIT_LIST_HEAD(&bp->list_overhead); bp 259 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->purb = usb_alloc_urb(0, GFP_KERNEL); bp 260 drivers/media/usb/pvrusb2/pvrusb2-io.c if (! bp->purb) return -ENOMEM; bp 262 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_describe(bp, "create"); bp 267 drivers/media/usb/pvrusb2/pvrusb2-io.c static void pvr2_buffer_done(struct pvr2_buffer *bp) bp 270 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_describe(bp, "delete"); bp 272 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_wipe(bp); bp 273 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_set_none(bp); bp 274 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->signature = 0; bp 275 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->stream = NULL; bp 276 drivers/media/usb/pvrusb2/pvrusb2-io.c usb_free_urb(bp->purb); bp 278 drivers/media/usb/pvrusb2/pvrusb2-io.c bp); bp 313 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_buffer *bp; bp 314 drivers/media/usb/pvrusb2/pvrusb2-io.c bp = kmalloc(sizeof(*bp), GFP_KERNEL); bp 315 drivers/media/usb/pvrusb2/pvrusb2-io.c if (!bp) return -ENOMEM; bp 316 drivers/media/usb/pvrusb2/pvrusb2-io.c ret = pvr2_buffer_init(bp, sp, sp->buffer_total_count); bp 318 drivers/media/usb/pvrusb2/pvrusb2-io.c kfree(bp); bp 321 drivers/media/usb/pvrusb2/pvrusb2-io.c sp->buffers[sp->buffer_total_count] = bp; bp 323 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_set_idle(bp); bp 327 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_buffer *bp; bp 328 drivers/media/usb/pvrusb2/pvrusb2-io.c bp = sp->buffers[sp->buffer_total_count - 1]; bp 332 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_done(bp); bp 333 drivers/media/usb/pvrusb2/pvrusb2-io.c kfree(bp); bp 352 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_buffer *bp; bp 367 drivers/media/usb/pvrusb2/pvrusb2-io.c bp = sp->buffers[sp->buffer_total_count - (cnt + 1)]; bp 368 drivers/media/usb/pvrusb2/pvrusb2-io.c if (bp->state != pvr2_buffer_state_idle) break; bp 417 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_buffer *bp = urb->context; bp 420 drivers/media/usb/pvrusb2/pvrusb2-io.c BUFFER_CHECK(bp); bp 421 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 422 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->used_count = 0; bp 423 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->status = 0; bp 426 drivers/media/usb/pvrusb2/pvrusb2-io.c bp, urb->status, urb->actual_length); bp 434 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->used_count = urb->actual_length; bp 451 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->status = urb->status; bp 454 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_set_ready(bp); bp 575 drivers/media/usb/pvrusb2/pvrusb2-io.c struct pvr2_buffer *bp; bp 579 drivers/media/usb/pvrusb2/pvrusb2-io.c while ((bp = pvr2_stream_get_ready_buffer(sp)) != NULL) { bp 580 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_set_idle(bp); bp 589 drivers/media/usb/pvrusb2/pvrusb2-io.c int pvr2_buffer_queue(struct pvr2_buffer *bp) bp 598 drivers/media/usb/pvrusb2/pvrusb2-io.c if (!bp) return -EINVAL; bp 599 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 602 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_wipe(bp); bp 607 drivers/media/usb/pvrusb2/pvrusb2-io.c pvr2_buffer_set_queued(bp); bp 609 drivers/media/usb/pvrusb2/pvrusb2-io.c for (idx = 0; idx < (bp->max_count) / 4; idx++) { bp 610 drivers/media/usb/pvrusb2/pvrusb2-io.c val = bp->id << 24; bp 612 drivers/media/usb/pvrusb2/pvrusb2-io.c ((unsigned int *)(bp->ptr))[idx] = val; bp 615 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->status = -EINPROGRESS; bp 616 drivers/media/usb/pvrusb2/pvrusb2-io.c usb_fill_bulk_urb(bp->purb, // struct urb *urb bp 620 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->ptr, // void *transfer_buffer bp 621 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->max_count, // int buffer_length bp 623 drivers/media/usb/pvrusb2/pvrusb2-io.c bp); bp 624 drivers/media/usb/pvrusb2/pvrusb2-io.c usb_submit_urb(bp->purb, GFP_KERNEL); bp 630 drivers/media/usb/pvrusb2/pvrusb2-io.c int pvr2_buffer_set_buffer(struct pvr2_buffer *bp, void *ptr, unsigned int cnt) bp 635 drivers/media/usb/pvrusb2/pvrusb2-io.c if (!bp) return -EINVAL; bp 636 drivers/media/usb/pvrusb2/pvrusb2-io.c sp = bp->stream; bp 640 drivers/media/usb/pvrusb2/pvrusb2-io.c if (bp->state != pvr2_buffer_state_idle) { bp 643 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->ptr = ptr; bp 644 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->stream->i_bcount -= bp->max_count; bp 645 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->max_count = cnt; bp 646 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->stream->i_bcount += bp->max_count; bp 651 drivers/media/usb/pvrusb2/pvrusb2-io.c bp->stream->i_bcount, bp->stream->i_count); bp 659 drivers/media/usb/pvrusb2/pvrusb2-io.c unsigned int pvr2_buffer_get_count(struct pvr2_buffer *bp) bp 661 drivers/media/usb/pvrusb2/pvrusb2-io.c return bp->used_count; bp 664 drivers/media/usb/pvrusb2/pvrusb2-io.c int pvr2_buffer_get_status(struct pvr2_buffer *bp) bp 666 drivers/media/usb/pvrusb2/pvrusb2-io.c return bp->status; bp 669 drivers/media/usb/pvrusb2/pvrusb2-io.c int pvr2_buffer_get_id(struct pvr2_buffer *bp) bp 671 drivers/media/usb/pvrusb2/pvrusb2-io.c return bp->id; bp 149 drivers/media/usb/pvrusb2/pvrusb2-ioread.c struct pvr2_buffer *bp; bp 154 drivers/media/usb/pvrusb2/pvrusb2-ioread.c while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != NULL) { bp 155 drivers/media/usb/pvrusb2/pvrusb2-ioread.c stat = pvr2_buffer_queue(bp); bp 190 drivers/media/usb/pvrusb2/pvrusb2-ioread.c struct pvr2_buffer *bp; bp 216 drivers/media/usb/pvrusb2/pvrusb2-ioread.c bp = pvr2_stream_get_buffer(sp,idx); bp 217 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_buffer_set_buffer(bp, bp 35 drivers/mfd/ipaq-micro.c int i, bp; bp 39 drivers/mfd/ipaq-micro.c bp = 0; bp 40 drivers/mfd/ipaq-micro.c tx->buf[bp++] = CHAR_SOF; bp 43 drivers/mfd/ipaq-micro.c tx->buf[bp++] = checksum; bp 46 drivers/mfd/ipaq-micro.c tx->buf[bp++] = msg->tx_data[i]; bp 50 drivers/mfd/ipaq-micro.c tx->buf[bp++] = checksum; bp 51 drivers/mfd/ipaq-micro.c tx->len = bp; bp 82 drivers/mfd/qcom-pm8xxx.c static int pm8xxx_read_block_irq(struct pm_irq_chip *chip, unsigned int bp, bp 88 drivers/mfd/qcom-pm8xxx.c rc = regmap_write(chip->regmap, SSBI_REG_ADDR_IRQ_BLK_SEL, bp); bp 90 drivers/mfd/qcom-pm8xxx.c pr_err("Failed Selecting Block %d rc=%d\n", bp, rc); bp 103 drivers/mfd/qcom-pm8xxx.c pm8xxx_config_irq(struct pm_irq_chip *chip, unsigned int bp, unsigned int cp) bp 108 drivers/mfd/qcom-pm8xxx.c rc = regmap_write(chip->regmap, SSBI_REG_ADDR_IRQ_BLK_SEL, bp); bp 110 drivers/mfd/qcom-pm8xxx.c pr_err("Failed Selecting Block %d rc=%d\n", bp, rc); bp 1205 drivers/misc/fastrpc.c struct fastrpc_alloc_dma_buf bp; bp 1210 drivers/misc/fastrpc.c if (copy_from_user(&bp, argp, sizeof(bp))) bp 1213 drivers/misc/fastrpc.c err = fastrpc_buf_alloc(fl, fl->sctx->dev, bp.size, &buf); bp 1217 drivers/misc/fastrpc.c exp_info.size = bp.size; bp 1227 drivers/misc/fastrpc.c bp.fd = dma_buf_fd(buf->dmabuf, O_ACCMODE); bp 1228 drivers/misc/fastrpc.c if (bp.fd < 0) { bp 1233 drivers/misc/fastrpc.c if (copy_to_user(argp, &bp, sizeof(bp))) { bp 374 drivers/misc/mic/host/mic_x100.c struct boot_params __iomem *bp = mdev->aper.va + mdev->bootaddr; bp 388 drivers/misc/mic/host/mic_x100.c iowrite32(mdev->bootaddr << 1, &bp->hdr.ramdisk_image); bp 389 drivers/misc/mic/host/mic_x100.c iowrite32(fw->size, &bp->hdr.ramdisk_size); bp 84 drivers/misc/mic/scif/scif_main.c struct mic_bootparam *bp = sdev->dp; bp 86 drivers/misc/mic/scif/scif_main.c da = bp->scif_card_dma_addr; bp 87 drivers/misc/mic/scif/scif_main.c scifdev->rdb = bp->h2c_scif_db; bp 89 drivers/misc/mic/scif/scif_main.c struct mic_bootparam __iomem *bp = sdev->rdp; bp 91 drivers/misc/mic/scif/scif_main.c da = readq(&bp->scif_host_dma_addr); bp 92 drivers/misc/mic/scif/scif_main.c scifdev->rdb = ioread8(&bp->c2h_scif_db); bp 171 drivers/misc/mic/scif/scif_main.c struct mic_bootparam *bp = sdev->dp; bp 173 drivers/misc/mic/scif/scif_main.c bp->c2h_scif_db = scifdev->db; bp 174 drivers/misc/mic/scif/scif_main.c bp->scif_host_dma_addr = scifdev->qp_dma_addr; bp 176 drivers/misc/mic/scif/scif_main.c struct mic_bootparam __iomem *bp = sdev->rdp; bp 178 drivers/misc/mic/scif/scif_main.c iowrite8(scifdev->db, &bp->h2c_scif_db); bp 179 drivers/misc/mic/scif/scif_main.c writeq(scifdev->qp_dma_addr, &bp->scif_card_dma_addr); bp 213 drivers/misc/mic/scif/scif_main.c struct mic_bootparam *bp = sdev->dp; bp 215 drivers/misc/mic/scif/scif_main.c bp->c2h_scif_db = -1; bp 216 drivers/misc/mic/scif/scif_main.c bp->scif_host_dma_addr = 0x0; bp 218 drivers/misc/mic/scif/scif_main.c struct mic_bootparam __iomem *bp = sdev->rdp; bp 220 drivers/misc/mic/scif/scif_main.c iowrite8(-1, &bp->h2c_scif_db); bp 221 drivers/misc/mic/scif/scif_main.c writeq(0x0, &bp->scif_card_dma_addr); bp 692 drivers/misc/mic/vop/vop_main.c struct mic_bootparam __iomem *bp; bp 695 drivers/misc/mic/vop/vop_main.c bp = vpdev->hw_ops->get_remote_dp(vpdev); bp 698 drivers/misc/mic/vop/vop_main.c vpdev->hw_ops->ack_interrupt(vpdev, ioread8(&bp->h2c_config_db)); bp 985 drivers/mmc/host/omap.c u32 burst, *bp; bp 1002 drivers/mmc/host/omap.c bp = &host->dma_tx_burst; bp 1007 drivers/mmc/host/omap.c bp = &host->dma_rx_burst; bp 1016 drivers/mmc/host/omap.c if (*bp != burst) { bp 1031 drivers/mmc/host/omap.c *bp = burst; bp 615 drivers/mtd/mtdswap.c unsigned int page, unsigned int *bp, int gc_context) bp 629 drivers/mtd/mtdswap.c ret = mtdswap_map_free_block(d, page, bp); bp 630 drivers/mtd/mtdswap.c eb = d->eb_data + (*bp / d->pages_per_eblk); bp 635 drivers/mtd/mtdswap.c d->revmap[*bp] = PAGE_UNDEF; bp 642 drivers/mtd/mtdswap.c writepos = (loff_t)*bp << PAGE_SHIFT; bp 647 drivers/mtd/mtdswap.c d->revmap[*bp] = PAGE_UNDEF; bp 670 drivers/mtd/mtdswap.c d->revmap[*bp] = PAGE_UNDEF; bp 127 drivers/mtd/nand/raw/nand_ecc.c const uint32_t *bp = (uint32_t *)buf; bp 160 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 163 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 166 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 169 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 173 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 177 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 180 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 183 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 187 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 192 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 196 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 200 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 204 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 208 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 211 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 214 drivers/mtd/nand/raw/nand_ecc.c cur = *bp++; bp 225 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 226 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 227 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 234 drivers/net/ethernet/apple/bmac.c pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 1); bp 309 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 326 drivers/net/ethernet/apple/bmac.c if (!bp->is_bmac_plus) { bp 368 drivers/net/ethernet/apple/bmac.c for (i=0; i<4; i++) bp->hash_table_mask[i] = 0; bp 369 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH3, bp->hash_table_mask[0]); /* bits 15 - 0 */ bp 370 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH2, bp->hash_table_mask[1]); /* bits 31 - 16 */ bp 371 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH1, bp->hash_table_mask[2]); /* bits 47 - 32 */ bp 372 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH0, bp->hash_table_mask[3]); /* bits 63 - 48 */ bp 402 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 403 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 422 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 432 drivers/net/ethernet/apple/bmac.c if (bp->is_bmac_plus) { bp 456 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 463 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 464 drivers/net/ethernet/apple/bmac.c if (bp->timeout_active) { bp 465 drivers/net/ethernet/apple/bmac.c del_timer(&bp->tx_timeout); bp 466 drivers/net/ethernet/apple/bmac.c bp->timeout_active = 0; bp 469 drivers/net/ethernet/apple/bmac.c disable_irq(bp->tx_dma_intr); bp 470 drivers/net/ethernet/apple/bmac.c disable_irq(bp->rx_dma_intr); bp 471 drivers/net/ethernet/apple/bmac.c bp->sleeping = 1; bp 472 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 473 drivers/net/ethernet/apple/bmac.c if (bp->opened) { bp 474 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 475 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 487 drivers/net/ethernet/apple/bmac.c if (bp->rx_bufs[i] != NULL) { bp 488 drivers/net/ethernet/apple/bmac.c dev_kfree_skb(bp->rx_bufs[i]); bp 489 drivers/net/ethernet/apple/bmac.c bp->rx_bufs[i] = NULL; bp 493 drivers/net/ethernet/apple/bmac.c if (bp->tx_bufs[i] != NULL) { bp 494 drivers/net/ethernet/apple/bmac.c dev_kfree_skb(bp->tx_bufs[i]); bp 495 drivers/net/ethernet/apple/bmac.c bp->tx_bufs[i] = NULL; bp 499 drivers/net/ethernet/apple/bmac.c pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 0); bp 506 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 509 drivers/net/ethernet/apple/bmac.c if (bp->opened) bp 513 drivers/net/ethernet/apple/bmac.c enable_irq(bp->tx_dma_intr); bp 514 drivers/net/ethernet/apple/bmac.c enable_irq(bp->rx_dma_intr); bp 523 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 530 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 541 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 548 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 551 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 552 drivers/net/ethernet/apple/bmac.c if (bp->timeout_active) bp 553 drivers/net/ethernet/apple/bmac.c del_timer(&bp->tx_timeout); bp 554 drivers/net/ethernet/apple/bmac.c bp->tx_timeout.expires = jiffies + TX_TIMEOUT; bp 555 drivers/net/ethernet/apple/bmac.c add_timer(&bp->tx_timeout); bp 556 drivers/net/ethernet/apple/bmac.c bp->timeout_active = 1; bp 557 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 584 drivers/net/ethernet/apple/bmac.c bmac_init_tx_ring(struct bmac_data *bp) bp 586 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 588 drivers/net/ethernet/apple/bmac.c memset((char *)bp->tx_cmds, 0, (N_TX_RING+1) * sizeof(struct dbdma_cmd)); bp 590 drivers/net/ethernet/apple/bmac.c bp->tx_empty = 0; bp 591 drivers/net/ethernet/apple/bmac.c bp->tx_fill = 0; bp 592 drivers/net/ethernet/apple/bmac.c bp->tx_fullup = 0; bp 595 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(&bp->tx_cmds[N_TX_RING], bp 596 drivers/net/ethernet/apple/bmac.c (DBDMA_NOP | BR_ALWAYS), 0, 0, virt_to_bus(bp->tx_cmds)); bp 601 drivers/net/ethernet/apple/bmac.c out_le32(&td->cmdptr, virt_to_bus(bp->tx_cmds)); bp 607 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 608 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 613 drivers/net/ethernet/apple/bmac.c memset((char *)bp->rx_cmds, 0, bp 616 drivers/net/ethernet/apple/bmac.c if ((skb = bp->rx_bufs[i]) == NULL) { bp 617 drivers/net/ethernet/apple/bmac.c bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2); bp 621 drivers/net/ethernet/apple/bmac.c bmac_construct_rxbuff(skb, &bp->rx_cmds[i]); bp 624 drivers/net/ethernet/apple/bmac.c bp->rx_empty = 0; bp 625 drivers/net/ethernet/apple/bmac.c bp->rx_fill = i; bp 628 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(&bp->rx_cmds[N_RX_RING], bp 629 drivers/net/ethernet/apple/bmac.c (DBDMA_NOP | BR_ALWAYS), 0, 0, virt_to_bus(bp->rx_cmds)); bp 633 drivers/net/ethernet/apple/bmac.c out_le32(&rd->cmdptr, virt_to_bus(bp->rx_cmds)); bp 641 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 642 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 648 drivers/net/ethernet/apple/bmac.c i = bp->tx_fill + 1; bp 651 drivers/net/ethernet/apple/bmac.c if (i == bp->tx_empty) { bp 653 drivers/net/ethernet/apple/bmac.c bp->tx_fullup = 1; bp 658 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(&bp->tx_cmds[i], DBDMA_STOP, 0, 0, 0); bp 660 drivers/net/ethernet/apple/bmac.c bmac_construct_xmt(skb, &bp->tx_cmds[bp->tx_fill]); bp 662 drivers/net/ethernet/apple/bmac.c bp->tx_bufs[bp->tx_fill] = skb; bp 663 drivers/net/ethernet/apple/bmac.c bp->tx_fill = i; bp 677 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 678 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 686 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 693 drivers/net/ethernet/apple/bmac.c i = bp->rx_empty; bp 696 drivers/net/ethernet/apple/bmac.c cp = &bp->rx_cmds[i]; bp 707 drivers/net/ethernet/apple/bmac.c skb = bp->rx_bufs[i]; bp 708 drivers/net/ethernet/apple/bmac.c bp->rx_bufs[i] = NULL; bp 720 drivers/net/ethernet/apple/bmac.c if ((skb = bp->rx_bufs[i]) == NULL) { bp 721 drivers/net/ethernet/apple/bmac.c bp->rx_bufs[i] = skb = netdev_alloc_skb(dev, RX_BUFLEN + 2); bp 723 drivers/net/ethernet/apple/bmac.c skb_reserve(bp->rx_bufs[i], 2); bp 725 drivers/net/ethernet/apple/bmac.c bmac_construct_rxbuff(skb, &bp->rx_cmds[i]); bp 733 drivers/net/ethernet/apple/bmac.c bp->rx_fill = last; bp 734 drivers/net/ethernet/apple/bmac.c bp->rx_empty = i; bp 738 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 751 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 756 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 766 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[bp->tx_empty]; bp 775 drivers/net/ethernet/apple/bmac.c if (cp == bus_to_virt(in_le32(&bp->tx_dma->cmdptr))) bp 779 drivers/net/ethernet/apple/bmac.c if (bp->tx_bufs[bp->tx_empty]) { bp 781 drivers/net/ethernet/apple/bmac.c dev_consume_skb_irq(bp->tx_bufs[bp->tx_empty]); bp 783 drivers/net/ethernet/apple/bmac.c bp->tx_bufs[bp->tx_empty] = NULL; bp 784 drivers/net/ethernet/apple/bmac.c bp->tx_fullup = 0; bp 786 drivers/net/ethernet/apple/bmac.c if (++bp->tx_empty >= N_TX_RING) bp 787 drivers/net/ethernet/apple/bmac.c bp->tx_empty = 0; bp 788 drivers/net/ethernet/apple/bmac.c if (bp->tx_empty == bp->tx_fill) bp 792 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 862 drivers/net/ethernet/apple/bmac.c bmac_addhash(struct bmac_data *bp, unsigned char *addr) bp 870 drivers/net/ethernet/apple/bmac.c if (bp->hash_use_count[crc]++) return; /* This bit is already set */ bp 873 drivers/net/ethernet/apple/bmac.c bp->hash_use_count[crc/16] |= mask; bp 877 drivers/net/ethernet/apple/bmac.c bmac_removehash(struct bmac_data *bp, unsigned char *addr) bp 885 drivers/net/ethernet/apple/bmac.c if (bp->hash_use_count[crc] == 0) return; /* That bit wasn't in use! */ bp 886 drivers/net/ethernet/apple/bmac.c if (--bp->hash_use_count[crc]) return; /* That bit is still in use */ bp 889 drivers/net/ethernet/apple/bmac.c bp->hash_table_mask[crc/16] &= mask; bp 929 drivers/net/ethernet/apple/bmac.c bmac_update_hash_table_mask(struct net_device *dev, struct bmac_data *bp) bp 931 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH3, bp->hash_table_mask[0]); /* bits 15 - 0 */ bp 932 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH2, bp->hash_table_mask[1]); /* bits 31 - 16 */ bp 933 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH1, bp->hash_table_mask[2]); /* bits 47 - 32 */ bp 934 drivers/net/ethernet/apple/bmac.c bmwrite(dev, BHASH0, bp->hash_table_mask[3]); /* bits 63 - 48 */ bp 940 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp, unsigned char *addr) bp 943 drivers/net/ethernet/apple/bmac.c bmac_addhash(bp, addr); bp 945 drivers/net/ethernet/apple/bmac.c bmac_update_hash_table_mask(dev, bp); bp 952 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp, unsigned char *addr) bp 954 drivers/net/ethernet/apple/bmac.c bmac_removehash(bp, addr); bp 956 drivers/net/ethernet/apple/bmac.c bmac_update_hash_table_mask(dev, bp); bp 970 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 975 drivers/net/ethernet/apple/bmac.c if (bp->sleeping) bp 981 drivers/net/ethernet/apple/bmac.c for (i=0; i<4; i++) bp->hash_table_mask[i] = 0xffff; bp 982 drivers/net/ethernet/apple/bmac.c bmac_update_hash_table_mask(dev, bp); bp 992 drivers/net/ethernet/apple/bmac.c for (i=0; i<4; i++) bp->hash_table_mask[i] = 0; bp 993 drivers/net/ethernet/apple/bmac.c for (i=0; i<64; i++) bp->hash_use_count[i] = 0; bp 999 drivers/net/ethernet/apple/bmac.c bmac_addhash(bp, ha->addr); bp 1000 drivers/net/ethernet/apple/bmac.c bmac_update_hash_table_mask(dev, bp); bp 1196 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1201 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 1203 drivers/net/ethernet/apple/bmac.c bmac_init_tx_ring(bp); bp 1208 drivers/net/ethernet/apple/bmac.c bp->sleeping = 0; bp 1221 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 1240 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp; bp 1266 drivers/net/ethernet/apple/bmac.c bp = netdev_priv(dev); bp 1270 drivers/net/ethernet/apple/bmac.c bp->mdev = mdev; bp 1271 drivers/net/ethernet/apple/bmac.c spin_lock_init(&bp->lock); bp 1303 drivers/net/ethernet/apple/bmac.c bp->is_bmac_plus = is_bmac_plus; bp 1304 drivers/net/ethernet/apple/bmac.c bp->tx_dma = ioremap(macio_resource_start(mdev, 1), macio_resource_len(mdev, 1)); bp 1305 drivers/net/ethernet/apple/bmac.c if (!bp->tx_dma) bp 1307 drivers/net/ethernet/apple/bmac.c bp->tx_dma_intr = macio_irq(mdev, 1); bp 1308 drivers/net/ethernet/apple/bmac.c bp->rx_dma = ioremap(macio_resource_start(mdev, 2), macio_resource_len(mdev, 2)); bp 1309 drivers/net/ethernet/apple/bmac.c if (!bp->rx_dma) bp 1311 drivers/net/ethernet/apple/bmac.c bp->rx_dma_intr = macio_irq(mdev, 2); bp 1313 drivers/net/ethernet/apple/bmac.c bp->tx_cmds = (volatile struct dbdma_cmd *) DBDMA_ALIGN(bp + 1); bp 1314 drivers/net/ethernet/apple/bmac.c bp->rx_cmds = bp->tx_cmds + N_TX_RING + 1; bp 1316 drivers/net/ethernet/apple/bmac.c bp->queue = (struct sk_buff_head *)(bp->rx_cmds + N_RX_RING + 1); bp 1317 drivers/net/ethernet/apple/bmac.c skb_queue_head_init(bp->queue); bp 1319 drivers/net/ethernet/apple/bmac.c timer_setup(&bp->tx_timeout, bmac_tx_timeout, 0); bp 1326 drivers/net/ethernet/apple/bmac.c ret = request_irq(bp->tx_dma_intr, bmac_txdma_intr, 0, "BMAC-txdma", dev); bp 1328 drivers/net/ethernet/apple/bmac.c printk(KERN_ERR "BMAC: can't get irq %d\n", bp->tx_dma_intr); bp 1331 drivers/net/ethernet/apple/bmac.c ret = request_irq(bp->rx_dma_intr, bmac_rxdma_intr, 0, "BMAC-rxdma", dev); bp 1333 drivers/net/ethernet/apple/bmac.c printk(KERN_ERR "BMAC: can't get irq %d\n", bp->rx_dma_intr); bp 1341 drivers/net/ethernet/apple/bmac.c pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 0); bp 1356 drivers/net/ethernet/apple/bmac.c free_irq(bp->rx_dma_intr, dev); bp 1358 drivers/net/ethernet/apple/bmac.c free_irq(bp->tx_dma_intr, dev); bp 1362 drivers/net/ethernet/apple/bmac.c iounmap(bp->rx_dma); bp 1364 drivers/net/ethernet/apple/bmac.c iounmap(bp->tx_dma); bp 1370 drivers/net/ethernet/apple/bmac.c pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 0); bp 1378 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1381 drivers/net/ethernet/apple/bmac.c bp->opened = 1; bp 1389 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1390 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 1391 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 1395 drivers/net/ethernet/apple/bmac.c bp->sleeping = 1; bp 1413 drivers/net/ethernet/apple/bmac.c if (bp->rx_bufs[i] != NULL) { bp 1414 drivers/net/ethernet/apple/bmac.c dev_kfree_skb(bp->rx_bufs[i]); bp 1415 drivers/net/ethernet/apple/bmac.c bp->rx_bufs[i] = NULL; bp 1420 drivers/net/ethernet/apple/bmac.c if (bp->tx_bufs[i] != NULL) { bp 1421 drivers/net/ethernet/apple/bmac.c dev_kfree_skb(bp->tx_bufs[i]); bp 1422 drivers/net/ethernet/apple/bmac.c bp->tx_bufs[i] = NULL; bp 1427 drivers/net/ethernet/apple/bmac.c bp->opened = 0; bp 1429 drivers/net/ethernet/apple/bmac.c pmac_call_feature(PMAC_FTR_BMAC_ENABLE, macio_get_of_node(bp->mdev), 0, 0); bp 1437 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1442 drivers/net/ethernet/apple/bmac.c if (bp->sleeping) bp 1445 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 1447 drivers/net/ethernet/apple/bmac.c i = bp->tx_fill + 1; bp 1450 drivers/net/ethernet/apple/bmac.c if (i == bp->tx_empty) bp 1452 drivers/net/ethernet/apple/bmac.c skb = skb_dequeue(bp->queue); bp 1457 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 1463 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1464 drivers/net/ethernet/apple/bmac.c skb_queue_tail(bp->queue, skb); bp 1471 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = from_timer(bp, t, tx_timeout); bp 1472 drivers/net/ethernet/apple/bmac.c struct net_device *dev = macio_get_drvdata(bp->mdev); bp 1473 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *td = bp->tx_dma; bp 1474 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_regs __iomem *rd = bp->rx_dma; bp 1481 drivers/net/ethernet/apple/bmac.c spin_lock_irqsave(&bp->lock, flags); bp 1482 drivers/net/ethernet/apple/bmac.c bp->timeout_active = 0; bp 1487 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[bp->tx_empty]; bp 1510 drivers/net/ethernet/apple/bmac.c bp->tx_empty, bp->tx_fill, bp->tx_fullup)); bp 1511 drivers/net/ethernet/apple/bmac.c i = bp->tx_empty; bp 1513 drivers/net/ethernet/apple/bmac.c if (i != bp->tx_fill) { bp 1514 drivers/net/ethernet/apple/bmac.c dev_kfree_skb(bp->tx_bufs[i]); bp 1515 drivers/net/ethernet/apple/bmac.c bp->tx_bufs[i] = NULL; bp 1517 drivers/net/ethernet/apple/bmac.c bp->tx_empty = i; bp 1519 drivers/net/ethernet/apple/bmac.c bp->tx_fullup = 0; bp 1521 drivers/net/ethernet/apple/bmac.c if (i != bp->tx_fill) { bp 1522 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[i]; bp 1537 drivers/net/ethernet/apple/bmac.c spin_unlock_irqrestore(&bp->lock, flags); bp 1598 drivers/net/ethernet/apple/bmac.c struct bmac_data *bp = netdev_priv(dev); bp 1603 drivers/net/ethernet/apple/bmac.c free_irq(bp->tx_dma_intr, dev); bp 1604 drivers/net/ethernet/apple/bmac.c free_irq(bp->rx_dma_intr, dev); bp 1607 drivers/net/ethernet/apple/bmac.c iounmap(bp->tx_dma); bp 1608 drivers/net/ethernet/apple/bmac.c iounmap(bp->rx_dma); bp 166 drivers/net/ethernet/broadcom/b44.c static inline unsigned long br32(const struct b44 *bp, unsigned long reg) bp 168 drivers/net/ethernet/broadcom/b44.c return ssb_read32(bp->sdev, reg); bp 171 drivers/net/ethernet/broadcom/b44.c static inline void bw32(const struct b44 *bp, bp 174 drivers/net/ethernet/broadcom/b44.c ssb_write32(bp->sdev, reg, val); bp 177 drivers/net/ethernet/broadcom/b44.c static int b44_wait_bit(struct b44 *bp, unsigned long reg, bp 183 drivers/net/ethernet/broadcom/b44.c u32 val = br32(bp, reg); bp 193 drivers/net/ethernet/broadcom/b44.c netdev_err(bp->dev, "BUG! Timeout waiting for bit %08x of register %lx to %s\n", bp 201 drivers/net/ethernet/broadcom/b44.c static inline void __b44_cam_read(struct b44 *bp, unsigned char *data, int index) bp 205 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_CTRL, (CAM_CTRL_READ | bp 208 drivers/net/ethernet/broadcom/b44.c b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1); bp 210 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_CAM_DATA_LO); bp 217 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_CAM_DATA_HI); bp 223 drivers/net/ethernet/broadcom/b44.c static inline void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) bp 231 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_DATA_LO, val); bp 235 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_DATA_HI, val); bp 236 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_CTRL, (CAM_CTRL_WRITE | bp 238 drivers/net/ethernet/broadcom/b44.c b44_wait_bit(bp, B44_CAM_CTRL, CAM_CTRL_BUSY, 100, 1); bp 241 drivers/net/ethernet/broadcom/b44.c static inline void __b44_disable_ints(struct b44 *bp) bp 243 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_IMASK, 0); bp 246 drivers/net/ethernet/broadcom/b44.c static void b44_disable_ints(struct b44 *bp) bp 248 drivers/net/ethernet/broadcom/b44.c __b44_disable_ints(bp); bp 251 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_IMASK); bp 254 drivers/net/ethernet/broadcom/b44.c static void b44_enable_ints(struct b44 *bp) bp 256 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_IMASK, bp->imask); bp 259 drivers/net/ethernet/broadcom/b44.c static int __b44_readphy(struct b44 *bp, int phy_addr, int reg, u32 *val) bp 263 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_EMAC_ISTAT, EMAC_INT_MII); bp 264 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MDIO_DATA, (MDIO_DATA_SB_START | bp 269 drivers/net/ethernet/broadcom/b44.c err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0); bp 270 drivers/net/ethernet/broadcom/b44.c *val = br32(bp, B44_MDIO_DATA) & MDIO_DATA_DATA; bp 275 drivers/net/ethernet/broadcom/b44.c static int __b44_writephy(struct b44 *bp, int phy_addr, int reg, u32 val) bp 277 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_EMAC_ISTAT, EMAC_INT_MII); bp 278 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MDIO_DATA, (MDIO_DATA_SB_START | bp 284 drivers/net/ethernet/broadcom/b44.c return b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0); bp 287 drivers/net/ethernet/broadcom/b44.c static inline int b44_readphy(struct b44 *bp, int reg, u32 *val) bp 289 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 292 drivers/net/ethernet/broadcom/b44.c return __b44_readphy(bp, bp->phy_addr, reg, val); bp 295 drivers/net/ethernet/broadcom/b44.c static inline int b44_writephy(struct b44 *bp, int reg, u32 val) bp 297 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 300 drivers/net/ethernet/broadcom/b44.c return __b44_writephy(bp, bp->phy_addr, reg, val); bp 307 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 308 drivers/net/ethernet/broadcom/b44.c int rc = __b44_readphy(bp, phy_id, location, &val); bp 317 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 318 drivers/net/ethernet/broadcom/b44.c __b44_writephy(bp, phy_id, location, val); bp 324 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = bus->priv; bp 325 drivers/net/ethernet/broadcom/b44.c int rc = __b44_readphy(bp, phy_id, location, &val); bp 334 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = bus->priv; bp 335 drivers/net/ethernet/broadcom/b44.c return __b44_writephy(bp, phy_id, location, val); bp 338 drivers/net/ethernet/broadcom/b44.c static int b44_phy_reset(struct b44 *bp) bp 343 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 345 drivers/net/ethernet/broadcom/b44.c err = b44_writephy(bp, MII_BMCR, BMCR_RESET); bp 349 drivers/net/ethernet/broadcom/b44.c err = b44_readphy(bp, MII_BMCR, &val); bp 352 drivers/net/ethernet/broadcom/b44.c netdev_err(bp->dev, "PHY Reset would not complete\n"); bp 360 drivers/net/ethernet/broadcom/b44.c static void __b44_set_flow_ctrl(struct b44 *bp, u32 pause_flags) bp 364 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~(B44_FLAG_TX_PAUSE | B44_FLAG_RX_PAUSE); bp 365 drivers/net/ethernet/broadcom/b44.c bp->flags |= pause_flags; bp 367 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_RXCONFIG); bp 372 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RXCONFIG, val); bp 374 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_MAC_FLOW); bp 380 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MAC_FLOW, val); bp 383 drivers/net/ethernet/broadcom/b44.c static void b44_set_flow_ctrl(struct b44 *bp, u32 local, u32 remote) bp 399 drivers/net/ethernet/broadcom/b44.c __b44_set_flow_ctrl(bp, pause_enab); bp 404 drivers/net/ethernet/broadcom/b44.c static void b44_wap54g10_workaround(struct b44 *bp) bp 418 drivers/net/ethernet/broadcom/b44.c err = __b44_readphy(bp, 0, MII_BMCR, &val); bp 424 drivers/net/ethernet/broadcom/b44.c err = __b44_writephy(bp, 0, MII_BMCR, val); bp 433 drivers/net/ethernet/broadcom/b44.c static inline void b44_wap54g10_workaround(struct b44 *bp) bp 438 drivers/net/ethernet/broadcom/b44.c static int b44_setup_phy(struct b44 *bp) bp 443 drivers/net/ethernet/broadcom/b44.c b44_wap54g10_workaround(bp); bp 445 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 447 drivers/net/ethernet/broadcom/b44.c if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0) bp 449 drivers/net/ethernet/broadcom/b44.c if ((err = b44_writephy(bp, B44_MII_ALEDCTRL, bp 452 drivers/net/ethernet/broadcom/b44.c if ((err = b44_readphy(bp, B44_MII_TLEDCTRL, &val)) != 0) bp 454 drivers/net/ethernet/broadcom/b44.c if ((err = b44_writephy(bp, B44_MII_TLEDCTRL, bp 458 drivers/net/ethernet/broadcom/b44.c if (!(bp->flags & B44_FLAG_FORCE_LINK)) { bp 461 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_10HALF) bp 463 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_10FULL) bp 465 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_100HALF) bp 467 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_100FULL) bp 470 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_PAUSE_AUTO) bp 473 drivers/net/ethernet/broadcom/b44.c if ((err = b44_writephy(bp, MII_ADVERTISE, adv)) != 0) bp 475 drivers/net/ethernet/broadcom/b44.c if ((err = b44_writephy(bp, MII_BMCR, (BMCR_ANENABLE | bp 481 drivers/net/ethernet/broadcom/b44.c if ((err = b44_readphy(bp, MII_BMCR, &bmcr)) != 0) bp 484 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_100_BASE_T) bp 486 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_FULL_DUPLEX) bp 488 drivers/net/ethernet/broadcom/b44.c if ((err = b44_writephy(bp, MII_BMCR, bmcr)) != 0) bp 495 drivers/net/ethernet/broadcom/b44.c b44_set_flow_ctrl(bp, 0, 0); bp 502 drivers/net/ethernet/broadcom/b44.c static void b44_stats_update(struct b44 *bp) bp 507 drivers/net/ethernet/broadcom/b44.c val = &bp->hw_stats.tx_good_octets; bp 508 drivers/net/ethernet/broadcom/b44.c u64_stats_update_begin(&bp->hw_stats.syncp); bp 511 drivers/net/ethernet/broadcom/b44.c *val++ += br32(bp, reg); bp 518 drivers/net/ethernet/broadcom/b44.c *val++ += br32(bp, reg); bp 521 drivers/net/ethernet/broadcom/b44.c u64_stats_update_end(&bp->hw_stats.syncp); bp 524 drivers/net/ethernet/broadcom/b44.c static void b44_link_report(struct b44 *bp) bp 526 drivers/net/ethernet/broadcom/b44.c if (!netif_carrier_ok(bp->dev)) { bp 527 drivers/net/ethernet/broadcom/b44.c netdev_info(bp->dev, "Link is down\n"); bp 529 drivers/net/ethernet/broadcom/b44.c netdev_info(bp->dev, "Link is up at %d Mbps, %s duplex\n", bp 530 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_100_BASE_T) ? 100 : 10, bp 531 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_FULL_DUPLEX) ? "full" : "half"); bp 533 drivers/net/ethernet/broadcom/b44.c netdev_info(bp->dev, "Flow control is %s for TX and %s for RX\n", bp 534 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_TX_PAUSE) ? "on" : "off", bp 535 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_RX_PAUSE) ? "on" : "off"); bp 539 drivers/net/ethernet/broadcom/b44.c static void b44_check_phy(struct b44 *bp) bp 543 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) { bp 544 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_100_BASE_T; bp 545 drivers/net/ethernet/broadcom/b44.c if (!netif_carrier_ok(bp->dev)) { bp 546 drivers/net/ethernet/broadcom/b44.c u32 val = br32(bp, B44_TX_CTRL); bp 547 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_FULL_DUPLEX) bp 551 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_TX_CTRL, val); bp 552 drivers/net/ethernet/broadcom/b44.c netif_carrier_on(bp->dev); bp 553 drivers/net/ethernet/broadcom/b44.c b44_link_report(bp); bp 558 drivers/net/ethernet/broadcom/b44.c if (!b44_readphy(bp, MII_BMSR, &bmsr) && bp 559 drivers/net/ethernet/broadcom/b44.c !b44_readphy(bp, B44_MII_AUXCTRL, &aux) && bp 562 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_100_BASE_T; bp 564 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_100_BASE_T; bp 566 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_FULL_DUPLEX; bp 568 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_FULL_DUPLEX; bp 570 drivers/net/ethernet/broadcom/b44.c if (!netif_carrier_ok(bp->dev) && bp 572 drivers/net/ethernet/broadcom/b44.c u32 val = br32(bp, B44_TX_CTRL); bp 575 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_FULL_DUPLEX) bp 579 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_TX_CTRL, val); bp 581 drivers/net/ethernet/broadcom/b44.c if (!(bp->flags & B44_FLAG_FORCE_LINK) && bp 582 drivers/net/ethernet/broadcom/b44.c !b44_readphy(bp, MII_ADVERTISE, &local_adv) && bp 583 drivers/net/ethernet/broadcom/b44.c !b44_readphy(bp, MII_LPA, &remote_adv)) bp 584 drivers/net/ethernet/broadcom/b44.c b44_set_flow_ctrl(bp, local_adv, remote_adv); bp 587 drivers/net/ethernet/broadcom/b44.c netif_carrier_on(bp->dev); bp 588 drivers/net/ethernet/broadcom/b44.c b44_link_report(bp); bp 589 drivers/net/ethernet/broadcom/b44.c } else if (netif_carrier_ok(bp->dev) && !(bmsr & BMSR_LSTATUS)) { bp 591 drivers/net/ethernet/broadcom/b44.c netif_carrier_off(bp->dev); bp 592 drivers/net/ethernet/broadcom/b44.c b44_link_report(bp); bp 596 drivers/net/ethernet/broadcom/b44.c netdev_warn(bp->dev, "Remote fault detected in PHY\n"); bp 598 drivers/net/ethernet/broadcom/b44.c netdev_warn(bp->dev, "Jabber detected in PHY\n"); bp 604 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = from_timer(bp, t, timer); bp 606 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 608 drivers/net/ethernet/broadcom/b44.c b44_check_phy(bp); bp 610 drivers/net/ethernet/broadcom/b44.c b44_stats_update(bp); bp 612 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 614 drivers/net/ethernet/broadcom/b44.c mod_timer(&bp->timer, round_jiffies(jiffies + HZ)); bp 617 drivers/net/ethernet/broadcom/b44.c static void b44_tx(struct b44 *bp) bp 622 drivers/net/ethernet/broadcom/b44.c cur = br32(bp, B44_DMATX_STAT) & DMATX_STAT_CDMASK; bp 626 drivers/net/ethernet/broadcom/b44.c for (cons = bp->tx_cons; cons != cur; cons = NEXT_TX(cons)) { bp 627 drivers/net/ethernet/broadcom/b44.c struct ring_info *rp = &bp->tx_buffers[cons]; bp 632 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, bp 644 drivers/net/ethernet/broadcom/b44.c netdev_completed_queue(bp->dev, pkts_compl, bytes_compl); bp 645 drivers/net/ethernet/broadcom/b44.c bp->tx_cons = cons; bp 646 drivers/net/ethernet/broadcom/b44.c if (netif_queue_stopped(bp->dev) && bp 647 drivers/net/ethernet/broadcom/b44.c TX_BUFFS_AVAIL(bp) > B44_TX_WAKEUP_THRESH) bp 648 drivers/net/ethernet/broadcom/b44.c netif_wake_queue(bp->dev); bp 650 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_GPTIMER, 0); bp 658 drivers/net/ethernet/broadcom/b44.c static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) bp 670 drivers/net/ethernet/broadcom/b44.c src_map = &bp->rx_buffers[src_idx]; bp 672 drivers/net/ethernet/broadcom/b44.c map = &bp->rx_buffers[dest_idx]; bp 673 drivers/net/ethernet/broadcom/b44.c skb = netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ); bp 677 drivers/net/ethernet/broadcom/b44.c mapping = dma_map_single(bp->sdev->dma_dev, skb->data, bp 683 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, mapping) || bp 686 drivers/net/ethernet/broadcom/b44.c if (!dma_mapping_error(bp->sdev->dma_dev, mapping)) bp 687 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, mapping, bp 693 drivers/net/ethernet/broadcom/b44.c mapping = dma_map_single(bp->sdev->dma_dev, skb->data, bp 696 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, mapping) || bp 698 drivers/net/ethernet/broadcom/b44.c if (!dma_mapping_error(bp->sdev->dma_dev, mapping)) bp 699 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); bp 703 drivers/net/ethernet/broadcom/b44.c bp->force_copybreak = 1; bp 721 drivers/net/ethernet/broadcom/b44.c dp = &bp->rx_ring[dest_idx]; bp 723 drivers/net/ethernet/broadcom/b44.c dp->addr = cpu_to_le32((u32) mapping + bp->dma_offset); bp 725 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_RX_RING_HACK) bp 726 drivers/net/ethernet/broadcom/b44.c b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma, bp 733 drivers/net/ethernet/broadcom/b44.c static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) bp 742 drivers/net/ethernet/broadcom/b44.c dest_desc = &bp->rx_ring[dest_idx]; bp 743 drivers/net/ethernet/broadcom/b44.c dest_map = &bp->rx_buffers[dest_idx]; bp 744 drivers/net/ethernet/broadcom/b44.c src_desc = &bp->rx_ring[src_idx]; bp 745 drivers/net/ethernet/broadcom/b44.c src_map = &bp->rx_buffers[src_idx]; bp 753 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_RX_RING_HACK) bp 754 drivers/net/ethernet/broadcom/b44.c b44_sync_dma_desc_for_cpu(bp->sdev, bp->rx_ring_dma, bp 769 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_RX_RING_HACK) bp 770 drivers/net/ethernet/broadcom/b44.c b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma, bp 774 drivers/net/ethernet/broadcom/b44.c dma_sync_single_for_device(bp->sdev->dma_dev, dest_map->mapping, bp 779 drivers/net/ethernet/broadcom/b44.c static int b44_rx(struct b44 *bp, int budget) bp 785 drivers/net/ethernet/broadcom/b44.c prod = br32(bp, B44_DMARX_STAT) & DMARX_STAT_CDMASK; bp 787 drivers/net/ethernet/broadcom/b44.c cons = bp->rx_cons; bp 790 drivers/net/ethernet/broadcom/b44.c struct ring_info *rp = &bp->rx_buffers[cons]; bp 796 drivers/net/ethernet/broadcom/b44.c dma_sync_single_for_cpu(bp->sdev->dma_dev, map, bp 804 drivers/net/ethernet/broadcom/b44.c b44_recycle_rx(bp, cons, bp->rx_prod); bp 806 drivers/net/ethernet/broadcom/b44.c bp->dev->stats.rx_dropped++; bp 825 drivers/net/ethernet/broadcom/b44.c if (!bp->force_copybreak && len > RX_COPY_THRESHOLD) { bp 827 drivers/net/ethernet/broadcom/b44.c skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); bp 830 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, map, bp 838 drivers/net/ethernet/broadcom/b44.c b44_recycle_rx(bp, cons, bp->rx_prod); bp 839 drivers/net/ethernet/broadcom/b44.c copy_skb = napi_alloc_skb(&bp->napi, len); bp 850 drivers/net/ethernet/broadcom/b44.c skb->protocol = eth_type_trans(skb, bp->dev); bp 855 drivers/net/ethernet/broadcom/b44.c bp->rx_prod = (bp->rx_prod + 1) & bp 860 drivers/net/ethernet/broadcom/b44.c bp->rx_cons = cons; bp 861 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_PTR, cons * sizeof(struct dma_desc)); bp 868 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = container_of(napi, struct b44, napi); bp 872 drivers/net/ethernet/broadcom/b44.c spin_lock_irqsave(&bp->lock, flags); bp 874 drivers/net/ethernet/broadcom/b44.c if (bp->istat & (ISTAT_TX | ISTAT_TO)) { bp 876 drivers/net/ethernet/broadcom/b44.c b44_tx(bp); bp 879 drivers/net/ethernet/broadcom/b44.c if (bp->istat & ISTAT_RFO) { /* fast recovery, in ~20msec */ bp 880 drivers/net/ethernet/broadcom/b44.c bp->istat &= ~ISTAT_RFO; bp 881 drivers/net/ethernet/broadcom/b44.c b44_disable_ints(bp); bp 882 drivers/net/ethernet/broadcom/b44.c ssb_device_enable(bp->sdev, 0); /* resets ISTAT_RFO */ bp 883 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 884 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY); bp 885 drivers/net/ethernet/broadcom/b44.c netif_wake_queue(bp->dev); bp 888 drivers/net/ethernet/broadcom/b44.c spin_unlock_irqrestore(&bp->lock, flags); bp 891 drivers/net/ethernet/broadcom/b44.c if (bp->istat & ISTAT_RX) bp 892 drivers/net/ethernet/broadcom/b44.c work_done += b44_rx(bp, budget); bp 894 drivers/net/ethernet/broadcom/b44.c if (bp->istat & ISTAT_ERRORS) { bp 895 drivers/net/ethernet/broadcom/b44.c spin_lock_irqsave(&bp->lock, flags); bp 896 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 897 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 898 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY); bp 899 drivers/net/ethernet/broadcom/b44.c netif_wake_queue(bp->dev); bp 900 drivers/net/ethernet/broadcom/b44.c spin_unlock_irqrestore(&bp->lock, flags); bp 906 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 915 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 919 drivers/net/ethernet/broadcom/b44.c spin_lock(&bp->lock); bp 921 drivers/net/ethernet/broadcom/b44.c istat = br32(bp, B44_ISTAT); bp 922 drivers/net/ethernet/broadcom/b44.c imask = br32(bp, B44_IMASK); bp 937 drivers/net/ethernet/broadcom/b44.c if (napi_schedule_prep(&bp->napi)) { bp 941 drivers/net/ethernet/broadcom/b44.c bp->istat = istat; bp 942 drivers/net/ethernet/broadcom/b44.c __b44_disable_ints(bp); bp 943 drivers/net/ethernet/broadcom/b44.c __napi_schedule(&bp->napi); bp 947 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ISTAT, istat); bp 948 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_ISTAT); bp 950 drivers/net/ethernet/broadcom/b44.c spin_unlock(&bp->lock); bp 956 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 960 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 962 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 963 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 964 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 966 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 968 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 975 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 982 drivers/net/ethernet/broadcom/b44.c spin_lock_irqsave(&bp->lock, flags); bp 985 drivers/net/ethernet/broadcom/b44.c if (unlikely(TX_BUFFS_AVAIL(bp) < 1)) { bp 991 drivers/net/ethernet/broadcom/b44.c mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE); bp 992 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, mapping) || mapping + len > DMA_BIT_MASK(30)) { bp 996 drivers/net/ethernet/broadcom/b44.c if (!dma_mapping_error(bp->sdev->dma_dev, mapping)) bp 997 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, mapping, len, bp 1004 drivers/net/ethernet/broadcom/b44.c mapping = dma_map_single(bp->sdev->dma_dev, bounce_skb->data, bp 1006 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, mapping) || mapping + len > DMA_BIT_MASK(30)) { bp 1007 drivers/net/ethernet/broadcom/b44.c if (!dma_mapping_error(bp->sdev->dma_dev, mapping)) bp 1008 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, mapping, bp 1019 drivers/net/ethernet/broadcom/b44.c entry = bp->tx_prod; bp 1020 drivers/net/ethernet/broadcom/b44.c bp->tx_buffers[entry].skb = skb; bp 1021 drivers/net/ethernet/broadcom/b44.c bp->tx_buffers[entry].mapping = mapping; bp 1028 drivers/net/ethernet/broadcom/b44.c bp->tx_ring[entry].ctrl = cpu_to_le32(ctrl); bp 1029 drivers/net/ethernet/broadcom/b44.c bp->tx_ring[entry].addr = cpu_to_le32((u32) mapping+bp->dma_offset); bp 1031 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_TX_RING_HACK) bp 1032 drivers/net/ethernet/broadcom/b44.c b44_sync_dma_desc_for_device(bp->sdev, bp->tx_ring_dma, bp 1033 drivers/net/ethernet/broadcom/b44.c entry * sizeof(bp->tx_ring[0]), bp 1038 drivers/net/ethernet/broadcom/b44.c bp->tx_prod = entry; bp 1042 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMATX_PTR, entry * sizeof(struct dma_desc)); bp 1043 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_BUGGY_TXPTR) bp 1044 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMATX_PTR, entry * sizeof(struct dma_desc)); bp 1045 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_REORDER_BUG) bp 1046 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_DMATX_PTR); bp 1050 drivers/net/ethernet/broadcom/b44.c if (TX_BUFFS_AVAIL(bp) < 1) bp 1054 drivers/net/ethernet/broadcom/b44.c spin_unlock_irqrestore(&bp->lock, flags); bp 1065 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1075 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1076 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 1078 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 1079 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 1080 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1082 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 1094 drivers/net/ethernet/broadcom/b44.c static void b44_free_rings(struct b44 *bp) bp 1100 drivers/net/ethernet/broadcom/b44.c rp = &bp->rx_buffers[i]; bp 1104 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, rp->mapping, RX_PKT_BUF_SZ, bp 1112 drivers/net/ethernet/broadcom/b44.c rp = &bp->tx_buffers[i]; bp 1116 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, rp->mapping, rp->skb->len, bp 1129 drivers/net/ethernet/broadcom/b44.c static void b44_init_rings(struct b44 *bp) bp 1133 drivers/net/ethernet/broadcom/b44.c b44_free_rings(bp); bp 1135 drivers/net/ethernet/broadcom/b44.c memset(bp->rx_ring, 0, B44_RX_RING_BYTES); bp 1136 drivers/net/ethernet/broadcom/b44.c memset(bp->tx_ring, 0, B44_TX_RING_BYTES); bp 1138 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_RX_RING_HACK) bp 1139 drivers/net/ethernet/broadcom/b44.c dma_sync_single_for_device(bp->sdev->dma_dev, bp->rx_ring_dma, bp 1142 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_TX_RING_HACK) bp 1143 drivers/net/ethernet/broadcom/b44.c dma_sync_single_for_device(bp->sdev->dma_dev, bp->tx_ring_dma, bp 1146 drivers/net/ethernet/broadcom/b44.c for (i = 0; i < bp->rx_pending; i++) { bp 1147 drivers/net/ethernet/broadcom/b44.c if (b44_alloc_rx_skb(bp, -1, i) < 0) bp 1156 drivers/net/ethernet/broadcom/b44.c static void b44_free_consistent(struct b44 *bp) bp 1158 drivers/net/ethernet/broadcom/b44.c kfree(bp->rx_buffers); bp 1159 drivers/net/ethernet/broadcom/b44.c bp->rx_buffers = NULL; bp 1160 drivers/net/ethernet/broadcom/b44.c kfree(bp->tx_buffers); bp 1161 drivers/net/ethernet/broadcom/b44.c bp->tx_buffers = NULL; bp 1162 drivers/net/ethernet/broadcom/b44.c if (bp->rx_ring) { bp 1163 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_RX_RING_HACK) { bp 1164 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, bp->rx_ring_dma, bp 1166 drivers/net/ethernet/broadcom/b44.c kfree(bp->rx_ring); bp 1168 drivers/net/ethernet/broadcom/b44.c dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES, bp 1169 drivers/net/ethernet/broadcom/b44.c bp->rx_ring, bp->rx_ring_dma); bp 1170 drivers/net/ethernet/broadcom/b44.c bp->rx_ring = NULL; bp 1171 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_RX_RING_HACK; bp 1173 drivers/net/ethernet/broadcom/b44.c if (bp->tx_ring) { bp 1174 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_TX_RING_HACK) { bp 1175 drivers/net/ethernet/broadcom/b44.c dma_unmap_single(bp->sdev->dma_dev, bp->tx_ring_dma, bp 1177 drivers/net/ethernet/broadcom/b44.c kfree(bp->tx_ring); bp 1179 drivers/net/ethernet/broadcom/b44.c dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES, bp 1180 drivers/net/ethernet/broadcom/b44.c bp->tx_ring, bp->tx_ring_dma); bp 1181 drivers/net/ethernet/broadcom/b44.c bp->tx_ring = NULL; bp 1182 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_TX_RING_HACK; bp 1190 drivers/net/ethernet/broadcom/b44.c static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp) bp 1195 drivers/net/ethernet/broadcom/b44.c bp->rx_buffers = kzalloc(size, gfp); bp 1196 drivers/net/ethernet/broadcom/b44.c if (!bp->rx_buffers) bp 1200 drivers/net/ethernet/broadcom/b44.c bp->tx_buffers = kzalloc(size, gfp); bp 1201 drivers/net/ethernet/broadcom/b44.c if (!bp->tx_buffers) bp 1205 drivers/net/ethernet/broadcom/b44.c bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, bp 1206 drivers/net/ethernet/broadcom/b44.c &bp->rx_ring_dma, gfp); bp 1207 drivers/net/ethernet/broadcom/b44.c if (!bp->rx_ring) { bp 1218 drivers/net/ethernet/broadcom/b44.c rx_ring_dma = dma_map_single(bp->sdev->dma_dev, rx_ring, bp 1222 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, rx_ring_dma) || bp 1228 drivers/net/ethernet/broadcom/b44.c bp->rx_ring = rx_ring; bp 1229 drivers/net/ethernet/broadcom/b44.c bp->rx_ring_dma = rx_ring_dma; bp 1230 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_RX_RING_HACK; bp 1233 drivers/net/ethernet/broadcom/b44.c bp->tx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size, bp 1234 drivers/net/ethernet/broadcom/b44.c &bp->tx_ring_dma, gfp); bp 1235 drivers/net/ethernet/broadcom/b44.c if (!bp->tx_ring) { bp 1246 drivers/net/ethernet/broadcom/b44.c tx_ring_dma = dma_map_single(bp->sdev->dma_dev, tx_ring, bp 1250 drivers/net/ethernet/broadcom/b44.c if (dma_mapping_error(bp->sdev->dma_dev, tx_ring_dma) || bp 1256 drivers/net/ethernet/broadcom/b44.c bp->tx_ring = tx_ring; bp 1257 drivers/net/ethernet/broadcom/b44.c bp->tx_ring_dma = tx_ring_dma; bp 1258 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_TX_RING_HACK; bp 1264 drivers/net/ethernet/broadcom/b44.c b44_free_consistent(bp); bp 1269 drivers/net/ethernet/broadcom/b44.c static void b44_clear_stats(struct b44 *bp) bp 1273 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); bp 1275 drivers/net/ethernet/broadcom/b44.c br32(bp, reg); bp 1277 drivers/net/ethernet/broadcom/b44.c br32(bp, reg); bp 1281 drivers/net/ethernet/broadcom/b44.c static void b44_chip_reset(struct b44 *bp, int reset_kind) bp 1283 drivers/net/ethernet/broadcom/b44.c struct ssb_device *sdev = bp->sdev; bp 1286 drivers/net/ethernet/broadcom/b44.c was_enabled = ssb_device_is_enabled(bp->sdev); bp 1288 drivers/net/ethernet/broadcom/b44.c ssb_device_enable(bp->sdev, 0); bp 1292 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RCV_LAZY, 0); bp 1293 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); bp 1294 drivers/net/ethernet/broadcom/b44.c b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); bp 1295 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMATX_CTRL, 0); bp 1296 drivers/net/ethernet/broadcom/b44.c bp->tx_prod = bp->tx_cons = 0; bp 1297 drivers/net/ethernet/broadcom/b44.c if (br32(bp, B44_DMARX_STAT) & DMARX_STAT_EMASK) { bp 1298 drivers/net/ethernet/broadcom/b44.c b44_wait_bit(bp, B44_DMARX_STAT, DMARX_STAT_SIDLE, bp 1301 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_CTRL, 0); bp 1302 drivers/net/ethernet/broadcom/b44.c bp->rx_prod = bp->rx_cons = 0; bp 1305 drivers/net/ethernet/broadcom/b44.c b44_clear_stats(bp); bp 1316 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE | bp 1322 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MDIO_CTRL, (MDIO_CTRL_PREAMBLE | bp 1331 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_MDIO_CTRL); bp 1333 drivers/net/ethernet/broadcom/b44.c if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) { bp 1334 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ENET_CTRL, ENET_CTRL_EPSEL); bp 1335 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_ENET_CTRL); bp 1336 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_EXTERNAL_PHY; bp 1338 drivers/net/ethernet/broadcom/b44.c u32 val = br32(bp, B44_DEVCTRL); bp 1341 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DEVCTRL, (val & ~DEVCTRL_EPR)); bp 1342 drivers/net/ethernet/broadcom/b44.c br32(bp, B44_DEVCTRL); bp 1345 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_EXTERNAL_PHY; bp 1350 drivers/net/ethernet/broadcom/b44.c static void b44_halt(struct b44 *bp) bp 1352 drivers/net/ethernet/broadcom/b44.c b44_disable_ints(bp); bp 1354 drivers/net/ethernet/broadcom/b44.c b44_phy_reset(bp); bp 1356 drivers/net/ethernet/broadcom/b44.c netdev_info(bp->dev, "powering down PHY\n"); bp 1357 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MAC_CTRL, MAC_CTRL_PHY_PDOWN); bp 1360 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 1361 drivers/net/ethernet/broadcom/b44.c b44_chip_reset(bp, B44_CHIP_RESET_FULL); bp 1363 drivers/net/ethernet/broadcom/b44.c b44_chip_reset(bp, B44_CHIP_RESET_PARTIAL); bp 1367 drivers/net/ethernet/broadcom/b44.c static void __b44_set_mac_addr(struct b44 *bp) bp 1369 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_CTRL, 0); bp 1370 drivers/net/ethernet/broadcom/b44.c if (!(bp->dev->flags & IFF_PROMISC)) { bp 1373 drivers/net/ethernet/broadcom/b44.c __b44_cam_write(bp, bp->dev->dev_addr, 0); bp 1374 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_CAM_CTRL); bp 1375 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_CTRL, val | CAM_CTRL_ENABLE); bp 1381 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1393 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1395 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_RXCONFIG); bp 1397 drivers/net/ethernet/broadcom/b44.c __b44_set_mac_addr(bp); bp 1399 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1408 drivers/net/ethernet/broadcom/b44.c static void b44_init_hw(struct b44 *bp, int reset_kind) bp 1412 drivers/net/ethernet/broadcom/b44.c b44_chip_reset(bp, B44_CHIP_RESET_FULL); bp 1414 drivers/net/ethernet/broadcom/b44.c b44_phy_reset(bp); bp 1415 drivers/net/ethernet/broadcom/b44.c b44_setup_phy(bp); bp 1419 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MAC_CTRL, MAC_CTRL_CRC32_ENAB | MAC_CTRL_PHY_LEDCTRL); bp 1420 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RCV_LAZY, (1 << RCV_LAZY_FC_SHIFT)); bp 1423 drivers/net/ethernet/broadcom/b44.c __b44_set_rx_mode(bp->dev); bp 1426 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); bp 1427 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); bp 1429 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ bp 1431 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | bp 1434 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); bp 1435 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); bp 1436 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | bp 1438 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_ADDR, bp->rx_ring_dma + bp->dma_offset); bp 1440 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DMARX_PTR, bp->rx_pending); bp 1441 drivers/net/ethernet/broadcom/b44.c bp->rx_prod = bp->rx_pending; bp 1443 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); bp 1446 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_ENET_CTRL); bp 1447 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ENET_CTRL, (val | ENET_CTRL_ENABLE)); bp 1449 drivers/net/ethernet/broadcom/b44.c netdev_reset_queue(bp->dev); bp 1454 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1457 drivers/net/ethernet/broadcom/b44.c err = b44_alloc_consistent(bp, GFP_KERNEL); bp 1461 drivers/net/ethernet/broadcom/b44.c napi_enable(&bp->napi); bp 1463 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 1464 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 1466 drivers/net/ethernet/broadcom/b44.c b44_check_phy(bp); bp 1470 drivers/net/ethernet/broadcom/b44.c napi_disable(&bp->napi); bp 1471 drivers/net/ethernet/broadcom/b44.c b44_chip_reset(bp, B44_CHIP_RESET_PARTIAL); bp 1472 drivers/net/ethernet/broadcom/b44.c b44_free_rings(bp); bp 1473 drivers/net/ethernet/broadcom/b44.c b44_free_consistent(bp); bp 1477 drivers/net/ethernet/broadcom/b44.c timer_setup(&bp->timer, b44_timer, 0); bp 1478 drivers/net/ethernet/broadcom/b44.c bp->timer.expires = jiffies + HZ; bp 1479 drivers/net/ethernet/broadcom/b44.c add_timer(&bp->timer); bp 1481 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 1483 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 1504 drivers/net/ethernet/broadcom/b44.c static void bwfilter_table(struct b44 *bp, u8 *pp, u32 bytes, u32 table_offset) bp 1510 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_FILT_ADDR, table_offset + i); bp 1511 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_FILT_DATA, pattern[i / sizeof(u32)]); bp 1547 drivers/net/ethernet/broadcom/b44.c static void b44_setup_pseudo_magicp(struct b44 *bp) bp 1561 drivers/net/ethernet/broadcom/b44.c plen0 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, bp 1564 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, B44_PATTERN_BASE); bp 1565 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, B44_PMASK_BASE); bp 1570 drivers/net/ethernet/broadcom/b44.c plen1 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, bp 1573 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, bp 1575 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, bp 1581 drivers/net/ethernet/broadcom/b44.c plen2 = b44_magic_pattern(bp->dev->dev_addr, pwol_pattern, pwol_mask, bp 1584 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_pattern, B44_PATTERN_SIZE, bp 1586 drivers/net/ethernet/broadcom/b44.c bwfilter_table(bp, pwol_mask, B44_PMASK_SIZE, bp 1593 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_WKUP_LEN, val); bp 1596 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_DEVCTRL); bp 1597 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DEVCTRL, val | DEVCTRL_PFE); bp 1602 drivers/net/ethernet/broadcom/b44.c static void b44_setup_wol_pci(struct b44 *bp) bp 1606 drivers/net/ethernet/broadcom/b44.c if (bp->sdev->bus->bustype != SSB_BUSTYPE_SSB) { bp 1607 drivers/net/ethernet/broadcom/b44.c bw32(bp, SSB_TMSLOW, br32(bp, SSB_TMSLOW) | SSB_TMSLOW_PE); bp 1608 drivers/net/ethernet/broadcom/b44.c pci_read_config_word(bp->sdev->bus->host_pci, SSB_PMCSR, &val); bp 1609 drivers/net/ethernet/broadcom/b44.c pci_write_config_word(bp->sdev->bus->host_pci, SSB_PMCSR, val | SSB_PE); bp 1613 drivers/net/ethernet/broadcom/b44.c static inline void b44_setup_wol_pci(struct b44 *bp) { } bp 1616 drivers/net/ethernet/broadcom/b44.c static void b44_setup_wol(struct b44 *bp) bp 1620 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RXCONFIG, RXCONFIG_ALLMULTI); bp 1622 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_B0_ANDLATER) { bp 1624 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_WKUP_LEN, WKUP_LEN_DISABLE); bp 1626 drivers/net/ethernet/broadcom/b44.c val = bp->dev->dev_addr[2] << 24 | bp 1627 drivers/net/ethernet/broadcom/b44.c bp->dev->dev_addr[3] << 16 | bp 1628 drivers/net/ethernet/broadcom/b44.c bp->dev->dev_addr[4] << 8 | bp 1629 drivers/net/ethernet/broadcom/b44.c bp->dev->dev_addr[5]; bp 1630 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ADDR_LO, val); bp 1632 drivers/net/ethernet/broadcom/b44.c val = bp->dev->dev_addr[0] << 8 | bp 1633 drivers/net/ethernet/broadcom/b44.c bp->dev->dev_addr[1]; bp 1634 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_ADDR_HI, val); bp 1636 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_DEVCTRL); bp 1637 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_DEVCTRL, val | DEVCTRL_MPM | DEVCTRL_PFE); bp 1640 drivers/net/ethernet/broadcom/b44.c b44_setup_pseudo_magicp(bp); bp 1642 drivers/net/ethernet/broadcom/b44.c b44_setup_wol_pci(bp); bp 1647 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1651 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 1654 drivers/net/ethernet/broadcom/b44.c napi_disable(&bp->napi); bp 1656 drivers/net/ethernet/broadcom/b44.c del_timer_sync(&bp->timer); bp 1658 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1660 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 1661 drivers/net/ethernet/broadcom/b44.c b44_free_rings(bp); bp 1664 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1668 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_WOL_ENABLE) { bp 1669 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_PARTIAL_RESET); bp 1670 drivers/net/ethernet/broadcom/b44.c b44_setup_wol(bp); bp 1673 drivers/net/ethernet/broadcom/b44.c b44_free_consistent(bp); bp 1681 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1682 drivers/net/ethernet/broadcom/b44.c struct b44_hw_stats *hwstat = &bp->hw_stats; bp 1724 drivers/net/ethernet/broadcom/b44.c static int __b44_load_mcast(struct b44 *bp, struct net_device *dev) bp 1734 drivers/net/ethernet/broadcom/b44.c __b44_cam_write(bp, ha->addr, i++ + 1); bp 1741 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1744 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_RXCONFIG); bp 1748 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RXCONFIG, val); bp 1753 drivers/net/ethernet/broadcom/b44.c __b44_set_mac_addr(bp); bp 1759 drivers/net/ethernet/broadcom/b44.c i = __b44_load_mcast(bp, dev); bp 1762 drivers/net/ethernet/broadcom/b44.c __b44_cam_write(bp, zero, i); bp 1764 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_RXCONFIG, val); bp 1765 drivers/net/ethernet/broadcom/b44.c val = br32(bp, B44_CAM_CTRL); bp 1766 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_CAM_CTRL, val | CAM_CTRL_ENABLE); bp 1772 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1774 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1776 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1781 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1782 drivers/net/ethernet/broadcom/b44.c return bp->msg_enable; bp 1787 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1788 drivers/net/ethernet/broadcom/b44.c bp->msg_enable = value; bp 1793 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1794 drivers/net/ethernet/broadcom/b44.c struct ssb_bus *bus = bp->sdev->bus; bp 1814 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1818 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1819 drivers/net/ethernet/broadcom/b44.c b44_readphy(bp, MII_BMCR, &bmcr); bp 1820 drivers/net/ethernet/broadcom/b44.c b44_readphy(bp, MII_BMCR, &bmcr); bp 1823 drivers/net/ethernet/broadcom/b44.c b44_writephy(bp, MII_BMCR, bp 1827 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1835 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1838 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) { bp 1853 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_10HALF) bp 1855 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_10FULL) bp 1857 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_100HALF) bp 1859 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_ADV_100FULL) bp 1862 drivers/net/ethernet/broadcom/b44.c cmd->base.speed = (bp->flags & B44_FLAG_100_BASE_T) ? bp 1864 drivers/net/ethernet/broadcom/b44.c cmd->base.duplex = (bp->flags & B44_FLAG_FULL_DUPLEX) ? bp 1867 drivers/net/ethernet/broadcom/b44.c cmd->base.phy_address = bp->phy_addr; bp 1868 drivers/net/ethernet/broadcom/b44.c cmd->base.autoneg = (bp->flags & B44_FLAG_FORCE_LINK) ? bp 1889 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1894 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) { bp 1896 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1898 drivers/net/ethernet/broadcom/b44.c b44_setup_phy(bp); bp 1902 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1925 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1928 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~(B44_FLAG_FORCE_LINK | bp 1936 drivers/net/ethernet/broadcom/b44.c bp->flags |= (B44_FLAG_ADV_10HALF | bp 1942 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_ADV_10HALF; bp 1944 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_ADV_10FULL; bp 1946 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_ADV_100HALF; bp 1948 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_ADV_100FULL; bp 1951 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_FORCE_LINK; bp 1952 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~(B44_FLAG_100_BASE_T | B44_FLAG_FULL_DUPLEX); bp 1954 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_100_BASE_T; bp 1956 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_FULL_DUPLEX; bp 1960 drivers/net/ethernet/broadcom/b44.c b44_setup_phy(bp); bp 1962 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 1970 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1973 drivers/net/ethernet/broadcom/b44.c ering->rx_pending = bp->rx_pending; bp 1981 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 1989 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 1991 drivers/net/ethernet/broadcom/b44.c bp->rx_pending = ering->rx_pending; bp 1992 drivers/net/ethernet/broadcom/b44.c bp->tx_pending = ering->tx_pending; bp 1994 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 1995 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 1996 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 1997 drivers/net/ethernet/broadcom/b44.c netif_wake_queue(bp->dev); bp 1998 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2000 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 2008 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2011 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_PAUSE_AUTO) != 0; bp 2013 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_RX_PAUSE) != 0; bp 2015 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_TX_PAUSE) != 0; bp 2021 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2023 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2025 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_PAUSE_AUTO; bp 2027 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_PAUSE_AUTO; bp 2029 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_RX_PAUSE; bp 2031 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_RX_PAUSE; bp 2033 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_TX_PAUSE; bp 2035 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_TX_PAUSE; bp 2036 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_PAUSE_AUTO) { bp 2037 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 2038 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 2039 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 2041 drivers/net/ethernet/broadcom/b44.c __b44_set_flow_ctrl(bp, bp->flags); bp 2043 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2045 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 2072 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2073 drivers/net/ethernet/broadcom/b44.c struct b44_hw_stats *hwstat = &bp->hw_stats; bp 2078 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2079 drivers/net/ethernet/broadcom/b44.c b44_stats_update(bp); bp 2080 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2095 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2098 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_WOL_ENABLE) bp 2107 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2109 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2111 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_WOL_ENABLE; bp 2113 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_WOL_ENABLE; bp 2114 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2116 drivers/net/ethernet/broadcom/b44.c device_set_wakeup_enable(bp->sdev->dev, wol->wolopts & WAKE_MAGIC); bp 2141 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2147 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2148 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) { bp 2152 drivers/net/ethernet/broadcom/b44.c err = generic_mii_ioctl(&bp->mii_if, if_mii(ifr), cmd, NULL); bp 2154 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2159 drivers/net/ethernet/broadcom/b44.c static int b44_get_invariants(struct b44 *bp) bp 2161 drivers/net/ethernet/broadcom/b44.c struct ssb_device *sdev = bp->sdev; bp 2165 drivers/net/ethernet/broadcom/b44.c bp->dma_offset = ssb_dma_translation(sdev); bp 2170 drivers/net/ethernet/broadcom/b44.c bp->phy_addr = sdev->bus->sprom.et1phyaddr; bp 2173 drivers/net/ethernet/broadcom/b44.c bp->phy_addr = sdev->bus->sprom.et0phyaddr; bp 2178 drivers/net/ethernet/broadcom/b44.c bp->phy_addr &= 0x1F; bp 2180 drivers/net/ethernet/broadcom/b44.c memcpy(bp->dev->dev_addr, addr, ETH_ALEN); bp 2182 drivers/net/ethernet/broadcom/b44.c if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){ bp 2187 drivers/net/ethernet/broadcom/b44.c bp->imask = IMASK_DEF; bp 2193 drivers/net/ethernet/broadcom/b44.c if (bp->sdev->id.revision >= 7) bp 2194 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_B0_ANDLATER; bp 2217 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2223 drivers/net/ethernet/broadcom/b44.c if (bp->old_link != phydev->link) { bp 2225 drivers/net/ethernet/broadcom/b44.c bp->old_link = phydev->link; bp 2231 drivers/net/ethernet/broadcom/b44.c (bp->flags & B44_FLAG_FULL_DUPLEX)) { bp 2233 drivers/net/ethernet/broadcom/b44.c bp->flags &= ~B44_FLAG_FULL_DUPLEX; bp 2235 drivers/net/ethernet/broadcom/b44.c !(bp->flags & B44_FLAG_FULL_DUPLEX)) { bp 2237 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_FULL_DUPLEX; bp 2242 drivers/net/ethernet/broadcom/b44.c u32 val = br32(bp, B44_TX_CTRL); bp 2243 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_FULL_DUPLEX) bp 2247 drivers/net/ethernet/broadcom/b44.c bw32(bp, B44_TX_CTRL, val); bp 2252 drivers/net/ethernet/broadcom/b44.c static int b44_register_phy_one(struct b44 *bp) bp 2256 drivers/net/ethernet/broadcom/b44.c struct ssb_device *sdev = bp->sdev; bp 2269 drivers/net/ethernet/broadcom/b44.c mii_bus->priv = bp; bp 2274 drivers/net/ethernet/broadcom/b44.c mii_bus->phy_mask = ~(1 << bp->phy_addr); bp 2277 drivers/net/ethernet/broadcom/b44.c bp->mii_bus = mii_bus; bp 2285 drivers/net/ethernet/broadcom/b44.c if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) && bp 2290 drivers/net/ethernet/broadcom/b44.c bp->phy_addr); bp 2292 drivers/net/ethernet/broadcom/b44.c bp->phy_addr = 0; bp 2294 drivers/net/ethernet/broadcom/b44.c bp->phy_addr); bp 2297 drivers/net/ethernet/broadcom/b44.c bp->phy_addr); bp 2300 drivers/net/ethernet/broadcom/b44.c phydev = phy_connect(bp->dev, bus_id, &b44_adjust_link, bp 2304 drivers/net/ethernet/broadcom/b44.c bp->phy_addr); bp 2317 drivers/net/ethernet/broadcom/b44.c bp->old_link = 0; bp 2318 drivers/net/ethernet/broadcom/b44.c bp->phy_addr = phydev->mdio.addr; bp 2334 drivers/net/ethernet/broadcom/b44.c static void b44_unregister_phy_one(struct b44 *bp) bp 2336 drivers/net/ethernet/broadcom/b44.c struct net_device *dev = bp->dev; bp 2337 drivers/net/ethernet/broadcom/b44.c struct mii_bus *mii_bus = bp->mii_bus; bp 2348 drivers/net/ethernet/broadcom/b44.c struct b44 *bp; bp 2355 drivers/net/ethernet/broadcom/b44.c dev = alloc_etherdev(sizeof(*bp)); bp 2366 drivers/net/ethernet/broadcom/b44.c bp = netdev_priv(dev); bp 2367 drivers/net/ethernet/broadcom/b44.c bp->sdev = sdev; bp 2368 drivers/net/ethernet/broadcom/b44.c bp->dev = dev; bp 2369 drivers/net/ethernet/broadcom/b44.c bp->force_copybreak = 0; bp 2371 drivers/net/ethernet/broadcom/b44.c bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE); bp 2373 drivers/net/ethernet/broadcom/b44.c spin_lock_init(&bp->lock); bp 2374 drivers/net/ethernet/broadcom/b44.c u64_stats_init(&bp->hw_stats.syncp); bp 2376 drivers/net/ethernet/broadcom/b44.c bp->rx_pending = B44_DEF_RX_RING_PENDING; bp 2377 drivers/net/ethernet/broadcom/b44.c bp->tx_pending = B44_DEF_TX_RING_PENDING; bp 2380 drivers/net/ethernet/broadcom/b44.c netif_napi_add(dev, &bp->napi, b44_poll, 64); bp 2400 drivers/net/ethernet/broadcom/b44.c err = b44_get_invariants(bp); bp 2407 drivers/net/ethernet/broadcom/b44.c if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) { bp 2413 drivers/net/ethernet/broadcom/b44.c bp->mii_if.dev = dev; bp 2414 drivers/net/ethernet/broadcom/b44.c bp->mii_if.mdio_read = b44_mdio_read_mii; bp 2415 drivers/net/ethernet/broadcom/b44.c bp->mii_if.mdio_write = b44_mdio_write_mii; bp 2416 drivers/net/ethernet/broadcom/b44.c bp->mii_if.phy_id = bp->phy_addr; bp 2417 drivers/net/ethernet/broadcom/b44.c bp->mii_if.phy_id_mask = 0x1f; bp 2418 drivers/net/ethernet/broadcom/b44.c bp->mii_if.reg_num_mask = 0x1f; bp 2421 drivers/net/ethernet/broadcom/b44.c bp->flags |= (B44_FLAG_ADV_10HALF | B44_FLAG_ADV_10FULL | bp 2425 drivers/net/ethernet/broadcom/b44.c bp->flags |= B44_FLAG_PAUSE_AUTO; bp 2440 drivers/net/ethernet/broadcom/b44.c b44_chip_reset(bp, B44_CHIP_RESET_FULL); bp 2443 drivers/net/ethernet/broadcom/b44.c err = b44_phy_reset(bp); bp 2449 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) { bp 2450 drivers/net/ethernet/broadcom/b44.c err = b44_register_phy_one(bp); bp 2468 drivers/net/ethernet/broadcom/b44.c netif_napi_del(&bp->napi); bp 2478 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2481 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_EXTERNAL_PHY) bp 2482 drivers/net/ethernet/broadcom/b44.c b44_unregister_phy_one(bp); bp 2485 drivers/net/ethernet/broadcom/b44.c netif_napi_del(&bp->napi); bp 2494 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2499 drivers/net/ethernet/broadcom/b44.c del_timer_sync(&bp->timer); bp 2501 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2503 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 2504 drivers/net/ethernet/broadcom/b44.c netif_carrier_off(bp->dev); bp 2505 drivers/net/ethernet/broadcom/b44.c netif_device_detach(bp->dev); bp 2506 drivers/net/ethernet/broadcom/b44.c b44_free_rings(bp); bp 2508 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2511 drivers/net/ethernet/broadcom/b44.c if (bp->flags & B44_FLAG_WOL_ENABLE) { bp 2512 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_PARTIAL_RESET); bp 2513 drivers/net/ethernet/broadcom/b44.c b44_setup_wol(bp); bp 2523 drivers/net/ethernet/broadcom/b44.c struct b44 *bp = netdev_priv(dev); bp 2536 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2537 drivers/net/ethernet/broadcom/b44.c b44_init_rings(bp); bp 2538 drivers/net/ethernet/broadcom/b44.c b44_init_hw(bp, B44_FULL_RESET); bp 2539 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2549 drivers/net/ethernet/broadcom/b44.c spin_lock_irq(&bp->lock); bp 2550 drivers/net/ethernet/broadcom/b44.c b44_halt(bp); bp 2551 drivers/net/ethernet/broadcom/b44.c b44_free_rings(bp); bp 2552 drivers/net/ethernet/broadcom/b44.c spin_unlock_irq(&bp->lock); bp 2556 drivers/net/ethernet/broadcom/b44.c netif_device_attach(bp->dev); bp 2558 drivers/net/ethernet/broadcom/b44.c b44_enable_ints(bp); bp 2561 drivers/net/ethernet/broadcom/b44.c mod_timer(&bp->timer, jiffies + 1); bp 250 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_init_napi(struct bnx2 *bp); bp 251 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_del_napi(struct bnx2 *bp); bp 253 drivers/net/ethernet/broadcom/bnx2.c static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) bp 266 drivers/net/ethernet/broadcom/bnx2.c return bp->tx_ring_size - diff; bp 270 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(struct bnx2 *bp, u32 offset) bp 275 drivers/net/ethernet/broadcom/bnx2.c spin_lock_irqsave(&bp->indirect_lock, flags); bp 276 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_REG_WINDOW_ADDRESS, offset); bp 277 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_PCICFG_REG_WINDOW); bp 278 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_irqrestore(&bp->indirect_lock, flags); bp 283 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(struct bnx2 *bp, u32 offset, u32 val) bp 287 drivers/net/ethernet/broadcom/bnx2.c spin_lock_irqsave(&bp->indirect_lock, flags); bp 288 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_REG_WINDOW_ADDRESS, offset); bp 289 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_REG_WINDOW, val); bp 290 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_irqrestore(&bp->indirect_lock, flags); bp 294 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(struct bnx2 *bp, u32 offset, u32 val) bp 296 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, bp->shmem_base + offset, val); bp 300 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(struct bnx2 *bp, u32 offset) bp 302 drivers/net/ethernet/broadcom/bnx2.c return bnx2_reg_rd_ind(bp, bp->shmem_base + offset); bp 306 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(struct bnx2 *bp, u32 cid_addr, u32 offset, u32 val) bp 311 drivers/net/ethernet/broadcom/bnx2.c spin_lock_irqsave(&bp->indirect_lock, flags); bp 312 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 315 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_CTX_DATA, val); bp 316 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_CTX_CTRL, bp 319 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_CTX_CTX_CTRL); bp 325 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_DATA_ADR, offset); bp 326 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_DATA, val); bp 328 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_irqrestore(&bp->indirect_lock, flags); bp 335 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 340 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, io->offset, io->data); bp 343 drivers/net/ethernet/broadcom/bnx2.c io->data = bnx2_reg_rd_ind(bp, io->offset); bp 346 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, io->cid_addr, io->offset, io->data); bp 354 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_setup_cnic_irq_info(struct bnx2 *bp) bp 356 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 357 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0]; bp 360 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSIX) { bp 363 drivers/net/ethernet/broadcom/bnx2.c sb_id = bp->irq_nvecs; bp 373 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].vector = bp->irq_tbl[sb_id].vector; bp 384 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 385 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 393 drivers/net/ethernet/broadcom/bnx2.c if (!bnx2_reg_rd_ind(bp, BNX2_FW_MAX_ISCSI_CONN)) bp 396 drivers/net/ethernet/broadcom/bnx2.c bp->cnic_data = data; bp 397 drivers/net/ethernet/broadcom/bnx2.c rcu_assign_pointer(bp->cnic_ops, ops); bp 402 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_cnic_irq_info(bp); bp 409 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 410 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0]; bp 411 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 413 drivers/net/ethernet/broadcom/bnx2.c mutex_lock(&bp->cnic_lock); bp 416 drivers/net/ethernet/broadcom/bnx2.c RCU_INIT_POINTER(bp->cnic_ops, NULL); bp 417 drivers/net/ethernet/broadcom/bnx2.c mutex_unlock(&bp->cnic_lock); bp 424 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 425 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 431 drivers/net/ethernet/broadcom/bnx2.c cp->chip_id = bp->chip_id; bp 432 drivers/net/ethernet/broadcom/bnx2.c cp->pdev = bp->pdev; bp 433 drivers/net/ethernet/broadcom/bnx2.c cp->io_base = bp->regview; bp 442 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_stop(struct bnx2 *bp) bp 447 drivers/net/ethernet/broadcom/bnx2.c mutex_lock(&bp->cnic_lock); bp 448 drivers/net/ethernet/broadcom/bnx2.c c_ops = rcu_dereference_protected(bp->cnic_ops, bp 449 drivers/net/ethernet/broadcom/bnx2.c lockdep_is_held(&bp->cnic_lock)); bp 452 drivers/net/ethernet/broadcom/bnx2.c c_ops->cnic_ctl(bp->cnic_data, &info); bp 454 drivers/net/ethernet/broadcom/bnx2.c mutex_unlock(&bp->cnic_lock); bp 458 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_start(struct bnx2 *bp) bp 463 drivers/net/ethernet/broadcom/bnx2.c mutex_lock(&bp->cnic_lock); bp 464 drivers/net/ethernet/broadcom/bnx2.c c_ops = rcu_dereference_protected(bp->cnic_ops, bp 465 drivers/net/ethernet/broadcom/bnx2.c lockdep_is_held(&bp->cnic_lock)); bp 467 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_USING_MSIX)) { bp 468 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0]; bp 473 drivers/net/ethernet/broadcom/bnx2.c c_ops->cnic_ctl(bp->cnic_data, &info); bp 475 drivers/net/ethernet/broadcom/bnx2.c mutex_unlock(&bp->cnic_lock); bp 481 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_stop(struct bnx2 *bp) bp 486 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_start(struct bnx2 *bp) bp 493 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(struct bnx2 *bp, u32 reg, u32 *val) bp 498 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING) { bp 499 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 502 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_MODE, val1); bp 503 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 508 drivers/net/ethernet/broadcom/bnx2.c val1 = (bp->phy_addr << 21) | (reg << 16) | bp 511 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_COMM, val1); bp 516 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_COMM); bp 520 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_COMM); bp 536 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING) { bp 537 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 540 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_MODE, val1); bp 541 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 550 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(struct bnx2 *bp, u32 reg, u32 val) bp 555 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING) { bp 556 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 559 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_MODE, val1); bp 560 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 565 drivers/net/ethernet/broadcom/bnx2.c val1 = (bp->phy_addr << 21) | (reg << 16) | val | bp 568 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_COMM, val1); bp 573 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_COMM); bp 585 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING) { bp 586 drivers/net/ethernet/broadcom/bnx2.c val1 = BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 589 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MDIO_MODE, val1); bp 590 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_MDIO_MODE); bp 599 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int(struct bnx2 *bp) bp 604 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 605 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[i]; bp 606 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | bp 609 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_PCICFG_INT_ACK_CMD); bp 613 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_int(struct bnx2 *bp) bp 618 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 619 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[i]; bp 621 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | bp 626 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | bp 630 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd | BNX2_HC_COMMAND_COAL_NOW); bp 634 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int_sync(struct bnx2 *bp) bp 638 drivers/net/ethernet/broadcom/bnx2.c atomic_inc(&bp->intr_sem); bp 639 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 642 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int(bp); bp 643 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) bp 644 drivers/net/ethernet/broadcom/bnx2.c synchronize_irq(bp->irq_tbl[i].vector); bp 648 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_disable(struct bnx2 *bp) bp 652 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) bp 653 drivers/net/ethernet/broadcom/bnx2.c napi_disable(&bp->bnx2_napi[i].napi); bp 657 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(struct bnx2 *bp) bp 661 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) bp 662 drivers/net/ethernet/broadcom/bnx2.c napi_enable(&bp->bnx2_napi[i].napi); bp 666 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic) bp 669 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_stop(bp); bp 670 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev)) { bp 671 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_disable(bp); bp 672 drivers/net/ethernet/broadcom/bnx2.c netif_tx_disable(bp->dev); bp 674 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int_sync(bp); bp 675 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_off(bp->dev); /* prevent tx timeout */ bp 679 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(struct bnx2 *bp, bool start_cnic) bp 681 drivers/net/ethernet/broadcom/bnx2.c if (atomic_dec_and_test(&bp->intr_sem)) { bp 682 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev)) { bp 683 drivers/net/ethernet/broadcom/bnx2.c netif_tx_wake_all_queues(bp->dev); bp 684 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 685 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) bp 686 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_on(bp->dev); bp 687 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 688 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(bp); bp 689 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_int(bp); bp 691 drivers/net/ethernet/broadcom/bnx2.c bnx2_cnic_start(bp); bp 697 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_tx_mem(struct bnx2 *bp) bp 701 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_tx_rings; i++) { bp 702 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 706 drivers/net/ethernet/broadcom/bnx2.c dma_free_coherent(&bp->pdev->dev, TXBD_RING_SIZE, bp 717 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_mem(struct bnx2 *bp) bp 721 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_rx_rings; i++) { bp 722 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 726 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_ring; j++) { bp 728 drivers/net/ethernet/broadcom/bnx2.c dma_free_coherent(&bp->pdev->dev, RXBD_RING_SIZE, bp 736 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_pg_ring; j++) { bp 738 drivers/net/ethernet/broadcom/bnx2.c dma_free_coherent(&bp->pdev->dev, RXBD_RING_SIZE, bp 749 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_tx_mem(struct bnx2 *bp) bp 753 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_tx_rings; i++) { bp 754 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 762 drivers/net/ethernet/broadcom/bnx2.c dma_alloc_coherent(&bp->pdev->dev, TXBD_RING_SIZE, bp 771 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_rx_mem(struct bnx2 *bp) bp 775 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_rx_rings; i++) { bp 776 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 781 drivers/net/ethernet/broadcom/bnx2.c vzalloc(array_size(SW_RXBD_RING_SIZE, bp->rx_max_ring)); bp 785 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_ring; j++) { bp 787 drivers/net/ethernet/broadcom/bnx2.c dma_alloc_coherent(&bp->pdev->dev, bp 796 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_pg_ring_size) { bp 799 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_pg_ring)); bp 805 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_pg_ring; j++) { bp 807 drivers/net/ethernet/broadcom/bnx2.c dma_alloc_coherent(&bp->pdev->dev, bp 822 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 824 drivers/net/ethernet/broadcom/bnx2.c if (bp->status_blk) { bp 825 drivers/net/ethernet/broadcom/bnx2.c dma_free_coherent(&bp->pdev->dev, bp->status_stats_size, bp 826 drivers/net/ethernet/broadcom/bnx2.c bp->status_blk, bp 827 drivers/net/ethernet/broadcom/bnx2.c bp->status_blk_mapping); bp 828 drivers/net/ethernet/broadcom/bnx2.c bp->status_blk = NULL; bp 829 drivers/net/ethernet/broadcom/bnx2.c bp->stats_blk = NULL; bp 838 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 842 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_MSIX_CAP) bp 845 drivers/net/ethernet/broadcom/bnx2.c bp->status_stats_size = status_blk_size + bp 847 drivers/net/ethernet/broadcom/bnx2.c status_blk = dma_alloc_coherent(&bp->pdev->dev, bp->status_stats_size, bp 848 drivers/net/ethernet/broadcom/bnx2.c &bp->status_blk_mapping, GFP_KERNEL); bp 852 drivers/net/ethernet/broadcom/bnx2.c bp->status_blk = status_blk; bp 853 drivers/net/ethernet/broadcom/bnx2.c bp->stats_blk = status_blk + status_blk_size; bp 854 drivers/net/ethernet/broadcom/bnx2.c bp->stats_blk_mapping = bp->status_blk_mapping + status_blk_size; bp 860 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_mem(struct bnx2 *bp) bp 863 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0]; bp 865 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_tx_mem(bp); bp 866 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_mem(bp); bp 868 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->ctx_pages; i++) { bp 869 drivers/net/ethernet/broadcom/bnx2.c if (bp->ctx_blk[i]) { bp 870 drivers/net/ethernet/broadcom/bnx2.c dma_free_coherent(&bp->pdev->dev, BNX2_PAGE_SIZE, bp 871 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_blk[i], bp 872 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_blk_mapping[i]); bp 873 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_blk[i] = NULL; bp 882 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_mem(struct bnx2 *bp) bp 887 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[0]; bp 888 drivers/net/ethernet/broadcom/bnx2.c bnapi->status_blk.msi = bp->status_blk; bp 893 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_MSIX_CAP) { bp 894 drivers/net/ethernet/broadcom/bnx2.c for (i = 1; i < bp->irq_nvecs; i++) { bp 897 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[i]; bp 899 drivers/net/ethernet/broadcom/bnx2.c sblk = (bp->status_blk + BNX2_SBLK_MSIX_ALIGN_SIZE * i); bp 909 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 910 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_pages = 0x2000 / BNX2_PAGE_SIZE; bp 911 drivers/net/ethernet/broadcom/bnx2.c if (bp->ctx_pages == 0) bp 912 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_pages = 1; bp 913 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->ctx_pages; i++) { bp 914 drivers/net/ethernet/broadcom/bnx2.c bp->ctx_blk[i] = dma_alloc_coherent(&bp->pdev->dev, bp 916 drivers/net/ethernet/broadcom/bnx2.c &bp->ctx_blk_mapping[i], bp 918 drivers/net/ethernet/broadcom/bnx2.c if (!bp->ctx_blk[i]) bp 923 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_alloc_rx_mem(bp); bp 927 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_alloc_tx_mem(bp); bp 934 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_mem(bp); bp 939 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_fw_link(struct bnx2 *bp) bp 943 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 946 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 949 drivers/net/ethernet/broadcom/bnx2.c switch (bp->line_speed) { bp 951 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_HALF) bp 957 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_HALF) bp 963 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_HALF) bp 969 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_HALF) bp 978 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg) { bp 981 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 982 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 985 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags & BNX2_PHY_FLAG_PARALLEL_DETECT) bp 994 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_LINK_STATUS, fw_link_status); bp 998 drivers/net/ethernet/broadcom/bnx2.c bnx2_xceiver_str(struct bnx2 *bp) bp 1000 drivers/net/ethernet/broadcom/bnx2.c return (bp->phy_port == PORT_FIBRE) ? "SerDes" : bp 1001 drivers/net/ethernet/broadcom/bnx2.c ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) ? "Remote Copper" : bp 1006 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_link(struct bnx2 *bp) bp 1008 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 1009 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_on(bp->dev); bp 1010 drivers/net/ethernet/broadcom/bnx2.c netdev_info(bp->dev, "NIC %s Link is Up, %d Mbps %s duplex", bp 1011 drivers/net/ethernet/broadcom/bnx2.c bnx2_xceiver_str(bp), bp 1012 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed, bp 1013 drivers/net/ethernet/broadcom/bnx2.c bp->duplex == DUPLEX_FULL ? "full" : "half"); bp 1015 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl) { bp 1016 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl & FLOW_CTRL_RX) { bp 1018 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl & FLOW_CTRL_TX) bp 1028 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_off(bp->dev); bp 1029 drivers/net/ethernet/broadcom/bnx2.c netdev_err(bp->dev, "NIC %s Link is Down\n", bp 1030 drivers/net/ethernet/broadcom/bnx2.c bnx2_xceiver_str(bp)); bp 1033 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_fw_link(bp); bp 1037 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(struct bnx2 *bp) bp 1041 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = 0; bp 1042 drivers/net/ethernet/broadcom/bnx2.c if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) != bp 1045 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_FULL) { bp 1046 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = bp->req_flow_ctrl; bp 1051 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex != DUPLEX_FULL) { bp 1055 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 1056 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP(bp) == BNX2_CHIP_5708)) { bp 1059 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_1000X_STAT1, &val); bp 1061 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl |= FLOW_CTRL_TX; bp 1063 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl |= FLOW_CTRL_RX; bp 1067 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &local_adv); bp 1068 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_lpa, &remote_adv); bp 1070 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1091 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = FLOW_CTRL_TX | FLOW_CTRL_RX; bp 1094 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = FLOW_CTRL_RX; bp 1099 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = FLOW_CTRL_TX | FLOW_CTRL_RX; bp 1107 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = FLOW_CTRL_TX; bp 1113 drivers/net/ethernet/broadcom/bnx2.c bnx2_5709s_linkup(struct bnx2 *bp) bp 1117 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 1119 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_GP_STATUS); bp 1120 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_GP_TOP_AN_STATUS1, &val); bp 1121 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_COMBO_IEEEB0); bp 1123 drivers/net/ethernet/broadcom/bnx2.c if ((bp->autoneg & AUTONEG_SPEED) == 0) { bp 1124 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = bp->req_line_speed; bp 1125 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = bp->req_duplex; bp 1131 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 1134 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 1138 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 1141 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_2500; bp 1145 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1147 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1152 drivers/net/ethernet/broadcom/bnx2.c bnx2_5708s_linkup(struct bnx2 *bp) bp 1156 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 1157 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_1000X_STAT1, &val); bp 1160 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 1163 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 1166 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 1169 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_2500; bp 1173 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1175 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1181 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706s_linkup(struct bnx2 *bp) bp 1185 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 1186 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 1188 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1190 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1193 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1200 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &local_adv); bp 1201 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_lpa, &remote_adv); bp 1207 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1210 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1218 drivers/net/ethernet/broadcom/bnx2.c bnx2_copper_linkup(struct bnx2 *bp) bp 1222 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_MDIX; bp 1224 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1228 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_CTRL1000, &local_adv); bp 1229 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_STAT1000, &remote_adv); bp 1233 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 1234 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1237 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 1238 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1241 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &local_adv); bp 1242 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_lpa, &remote_adv); bp 1246 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 1247 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1250 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 1251 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1254 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 1255 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1258 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 1259 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1262 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = 0; bp 1263 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 0; bp 1269 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 1272 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 1275 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 1278 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 1282 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 1285 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_EXT_STATUS, &ext_status); bp 1287 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_MDIX; bp 1294 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_rx_context(struct bnx2 *bp, u32 cid) bp 1302 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl & FLOW_CTRL_TX) bp 1305 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_CTX_TYPE, val); bp 1309 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_all_rx_contexts(struct bnx2 *bp) bp 1314 drivers/net/ethernet/broadcom/bnx2.c for (i = 0, cid = RX_CID; i < bp->num_rx_rings; i++, cid++) { bp 1317 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_rx_context(bp, cid); bp 1322 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(struct bnx2 *bp) bp 1326 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_TX_LENGTHS, 0x2620); bp 1327 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up && (bp->line_speed == SPEED_1000) && bp 1328 drivers/net/ethernet/broadcom/bnx2.c (bp->duplex == DUPLEX_HALF)) { bp 1329 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_TX_LENGTHS, 0x26ff); bp 1333 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_EMAC_MODE); bp 1339 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 1340 drivers/net/ethernet/broadcom/bnx2.c switch (bp->line_speed) { bp 1342 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) != BNX2_CHIP_5706) { bp 1363 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_HALF) bp 1365 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MODE, val); bp 1368 drivers/net/ethernet/broadcom/bnx2.c bp->rx_mode &= ~BNX2_EMAC_RX_MODE_FLOW_EN; bp 1370 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl & FLOW_CTRL_RX) bp 1371 drivers/net/ethernet/broadcom/bnx2.c bp->rx_mode |= BNX2_EMAC_RX_MODE_FLOW_EN; bp 1372 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_RX_MODE, bp->rx_mode); bp 1375 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_EMAC_TX_MODE); bp 1378 drivers/net/ethernet/broadcom/bnx2.c if (bp->flow_ctrl & FLOW_CTRL_TX) bp 1380 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_TX_MODE, val); bp 1383 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_STATUS, BNX2_EMAC_STATUS_LINK_CHANGE); bp 1385 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_all_rx_contexts(bp); bp 1389 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_bmsr1(struct bnx2 *bp) bp 1391 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 1392 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP(bp) == BNX2_CHIP_5709)) bp 1393 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1398 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_bmsr1(struct bnx2 *bp) bp 1400 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 1401 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP(bp) == BNX2_CHIP_5709)) bp 1402 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1407 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_and_enable_2g5(struct bnx2 *bp) bp 1412 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE)) bp 1415 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) bp 1416 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_2500baseX_Full; bp 1418 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 1419 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_OVER1G); bp 1421 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_up1, &up1); bp 1424 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_up1, up1); bp 1428 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 1429 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1436 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_and_disable_2g5(struct bnx2 *bp) bp 1441 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE)) bp 1444 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 1445 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_OVER1G); bp 1447 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_up1, &up1); bp 1450 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_up1, up1); bp 1454 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 1455 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1462 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_forced_2g5(struct bnx2 *bp) bp 1467 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE)) bp 1470 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 1473 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1475 drivers/net/ethernet/broadcom/bnx2.c if (!bnx2_read_phy(bp, MII_BNX2_SERDES_DIG_MISC1, &val)) { bp 1479 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_SERDES_DIG_MISC1, val); bp 1482 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1484 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1486 drivers/net/ethernet/broadcom/bnx2.c } else if (BNX2_CHIP(bp) == BNX2_CHIP_5708) { bp 1487 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1497 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) { bp 1499 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_duplex == DUPLEX_FULL) bp 1502 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr); bp 1506 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_forced_2g5(struct bnx2 *bp) bp 1511 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE)) bp 1514 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 1517 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1519 drivers/net/ethernet/broadcom/bnx2.c if (!bnx2_read_phy(bp, MII_BNX2_SERDES_DIG_MISC1, &val)) { bp 1521 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_SERDES_DIG_MISC1, val); bp 1524 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, bp 1526 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1528 drivers/net/ethernet/broadcom/bnx2.c } else if (BNX2_CHIP(bp) == BNX2_CHIP_5708) { bp 1529 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1539 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) bp 1541 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr); bp 1545 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706s_force_link_dn(struct bnx2 *bp, int start) bp 1549 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_ADDRESS, MII_EXPAND_SERDES_CTL); bp 1550 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &val); bp 1552 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_RW_PORT, val & 0xff0f); bp 1554 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_RW_PORT, val | 0xc0); bp 1558 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_link(struct bnx2 *bp) bp 1563 drivers/net/ethernet/broadcom/bnx2.c if (bp->loopback == MAC_LOOPBACK || bp->loopback == PHY_LOOPBACK) { bp 1564 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 1568 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 1571 drivers/net/ethernet/broadcom/bnx2.c link_up = bp->link_up; bp 1573 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_bmsr1(bp); bp 1574 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr1, &bmsr); bp 1575 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr1, &bmsr); bp 1576 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_bmsr1(bp); bp 1578 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 1579 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP(bp) == BNX2_CHIP_5706)) { bp 1582 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_FORCED_DOWN) { bp 1583 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706s_force_link_dn(bp, 0); bp 1584 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_FORCED_DOWN; bp 1586 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_EMAC_STATUS); bp 1588 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_MISC_SHADOW, MISC_SHDW_AN_DBG); bp 1589 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &an_dbg); bp 1590 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &an_dbg); bp 1600 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 1602 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1603 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706) bp 1604 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706s_linkup(bp); bp 1605 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP(bp) == BNX2_CHIP_5708) bp 1606 drivers/net/ethernet/broadcom/bnx2.c bnx2_5708s_linkup(bp); bp 1607 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 1608 drivers/net/ethernet/broadcom/bnx2.c bnx2_5709s_linkup(bp); bp 1611 drivers/net/ethernet/broadcom/bnx2.c bnx2_copper_linkup(bp); bp 1613 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 1616 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 1617 drivers/net/ethernet/broadcom/bnx2.c (bp->autoneg & AUTONEG_SPEED)) bp 1618 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_forced_2g5(bp); bp 1620 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_PARALLEL_DETECT) { bp 1623 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1625 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr); bp 1627 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT; bp 1629 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 0; bp 1632 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up != link_up) { bp 1633 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_link(bp); bp 1636 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 1642 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_phy(struct bnx2 *bp) bp 1647 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, BMCR_RESET); bp 1653 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, ®); bp 1666 drivers/net/ethernet/broadcom/bnx2.c bnx2_phy_get_pause_adv(struct bnx2 *bp) bp 1670 drivers/net/ethernet/broadcom/bnx2.c if ((bp->req_flow_ctrl & (FLOW_CTRL_RX | FLOW_CTRL_TX)) == bp 1673 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1680 drivers/net/ethernet/broadcom/bnx2.c else if (bp->req_flow_ctrl & FLOW_CTRL_TX) { bp 1681 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1688 drivers/net/ethernet/broadcom/bnx2.c else if (bp->req_flow_ctrl & FLOW_CTRL_RX) { bp 1689 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1702 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_remote_phy(struct bnx2 *bp, u8 port) bp 1703 drivers/net/ethernet/broadcom/bnx2.c __releases(&bp->phy_lock) bp 1704 drivers/net/ethernet/broadcom/bnx2.c __acquires(&bp->phy_lock) bp 1708 drivers/net/ethernet/broadcom/bnx2.c pause_adv = bnx2_phy_get_pause_adv(bp); bp 1710 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) { bp 1712 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_10baseT_Half) bp 1714 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_10baseT_Full) bp 1716 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_100baseT_Half) bp 1718 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_100baseT_Full) bp 1720 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_1000baseT_Full) bp 1722 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_2500baseX_Full) bp 1725 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_line_speed == SPEED_2500) bp 1727 drivers/net/ethernet/broadcom/bnx2.c else if (bp->req_line_speed == SPEED_1000) bp 1729 drivers/net/ethernet/broadcom/bnx2.c else if (bp->req_line_speed == SPEED_100) { bp 1730 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_duplex == DUPLEX_FULL) bp 1734 drivers/net/ethernet/broadcom/bnx2.c } else if (bp->req_line_speed == SPEED_10) { bp 1735 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_duplex == DUPLEX_FULL) bp 1751 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_DRV_MB_ARG0, speed_arg); bp 1753 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 1754 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_CMD_SET_LINK, 1, 0); bp 1755 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 1761 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_serdes_phy(struct bnx2 *bp, u8 port) bp 1762 drivers/net/ethernet/broadcom/bnx2.c __releases(&bp->phy_lock) bp 1763 drivers/net/ethernet/broadcom/bnx2.c __acquires(&bp->phy_lock) bp 1768 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 1769 drivers/net/ethernet/broadcom/bnx2.c return bnx2_setup_remote_phy(bp, port); bp 1771 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->autoneg & AUTONEG_SPEED)) { bp 1775 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_line_speed == SPEED_2500) { bp 1776 drivers/net/ethernet/broadcom/bnx2.c if (!bnx2_test_and_enable_2g5(bp)) bp 1778 drivers/net/ethernet/broadcom/bnx2.c } else if (bp->req_line_speed == SPEED_1000) { bp 1779 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_and_disable_2g5(bp)) bp 1782 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &adv); bp 1785 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1789 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 1790 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_line_speed == SPEED_2500) bp 1791 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_forced_2g5(bp); bp 1792 drivers/net/ethernet/broadcom/bnx2.c else if (bp->req_line_speed == SPEED_1000) { bp 1793 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_forced_2g5(bp); bp 1797 drivers/net/ethernet/broadcom/bnx2.c } else if (BNX2_CHIP(bp) == BNX2_CHIP_5708) { bp 1798 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_line_speed == SPEED_2500) bp 1804 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_duplex == DUPLEX_FULL) { bp 1814 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 1815 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_adv, adv & bp 1818 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr | bp 1821 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 0; bp 1822 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_off(bp->dev); bp 1823 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, new_bmcr); bp 1824 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_link(bp); bp 1826 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_adv, adv); bp 1827 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, new_bmcr); bp 1829 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 1830 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 1835 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_and_enable_2g5(bp); bp 1837 drivers/net/ethernet/broadcom/bnx2.c if (bp->advertising & ADVERTISED_1000baseT_Full) bp 1840 drivers/net/ethernet/broadcom/bnx2.c new_adv |= bnx2_phy_get_pause_adv(bp); bp 1842 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &adv); bp 1843 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 1845 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending = 0; bp 1848 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) { bp 1849 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, BMCR_LOOPBACK); bp 1850 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 1852 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 1855 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_adv, new_adv); bp 1856 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr | BMCR_ANRESTART | bp 1866 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_SERDES_AN_TIMEOUT; bp 1867 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending = 1; bp 1868 drivers/net/ethernet/broadcom/bnx2.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 1870 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 1871 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 1878 drivers/net/ethernet/broadcom/bnx2.c (bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) ? \ bp 1893 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_remote_link(struct bnx2 *bp) bp 1897 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_port == PORT_TP) bp 1898 drivers/net/ethernet/broadcom/bnx2.c link = bnx2_shmem_rd(bp, BNX2_RPHY_COPPER_LINK); bp 1900 drivers/net/ethernet/broadcom/bnx2.c link = bnx2_shmem_rd(bp, BNX2_RPHY_SERDES_LINK); bp 1903 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = 0; bp 1904 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg |= AUTONEG_SPEED; bp 1905 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = ADVERTISED_Autoneg; bp 1907 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_10baseT_Half; bp 1909 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_10baseT_Full; bp 1911 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_100baseT_Half; bp 1913 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_100baseT_Full; bp 1915 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_1000baseT_Full; bp 1917 drivers/net/ethernet/broadcom/bnx2.c bp->advertising |= ADVERTISED_2500baseX_Full; bp 1919 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = 0; bp 1920 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = 0; bp 1921 drivers/net/ethernet/broadcom/bnx2.c bp->req_duplex = DUPLEX_FULL; bp 1923 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = SPEED_10; bp 1925 drivers/net/ethernet/broadcom/bnx2.c bp->req_duplex = DUPLEX_HALF; bp 1928 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = SPEED_100; bp 1930 drivers/net/ethernet/broadcom/bnx2.c bp->req_duplex = DUPLEX_HALF; bp 1933 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = SPEED_1000; bp 1935 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = SPEED_2500; bp 1940 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_link(struct bnx2 *bp) bp 1942 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) { bp 1943 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_remote_link(bp); bp 1947 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = AUTONEG_SPEED | AUTONEG_FLOW_CTRL; bp 1948 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = 0; bp 1949 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 1952 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = ETHTOOL_ALL_FIBRE_SPEED | ADVERTISED_Autoneg; bp 1954 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_PORT_HW_CFG_CONFIG); bp 1957 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = 0; bp 1958 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = bp->line_speed = SPEED_1000; bp 1959 drivers/net/ethernet/broadcom/bnx2.c bp->req_duplex = DUPLEX_FULL; bp 1962 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = ETHTOOL_ALL_COPPER_SPEED | ADVERTISED_Autoneg; bp 1966 drivers/net/ethernet/broadcom/bnx2.c bnx2_send_heart_beat(struct bnx2 *bp) bp 1971 drivers/net/ethernet/broadcom/bnx2.c spin_lock(&bp->indirect_lock); bp 1972 drivers/net/ethernet/broadcom/bnx2.c msg = (u32) (++bp->fw_drv_pulse_wr_seq & BNX2_DRV_PULSE_SEQ_MASK); bp 1973 drivers/net/ethernet/broadcom/bnx2.c addr = bp->shmem_base + BNX2_DRV_PULSE_MB; bp 1974 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_REG_WINDOW_ADDRESS, addr); bp 1975 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_REG_WINDOW, msg); bp 1976 drivers/net/ethernet/broadcom/bnx2.c spin_unlock(&bp->indirect_lock); bp 1980 drivers/net/ethernet/broadcom/bnx2.c bnx2_remote_phy_event(struct bnx2 *bp) bp 1983 drivers/net/ethernet/broadcom/bnx2.c u8 link_up = bp->link_up; bp 1986 drivers/net/ethernet/broadcom/bnx2.c msg = bnx2_shmem_rd(bp, BNX2_LINK_STATUS); bp 1989 drivers/net/ethernet/broadcom/bnx2.c bnx2_send_heart_beat(bp); bp 1994 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 0; bp 1998 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 2000 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_FULL; bp 2003 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 2006 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_10; bp 2009 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 2013 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_100; bp 2016 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 2019 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_1000; bp 2022 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = DUPLEX_HALF; bp 2025 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = SPEED_2500; bp 2028 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = 0; bp 2032 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = 0; bp 2033 drivers/net/ethernet/broadcom/bnx2.c if ((bp->autoneg & (AUTONEG_SPEED | AUTONEG_FLOW_CTRL)) != bp 2035 drivers/net/ethernet/broadcom/bnx2.c if (bp->duplex == DUPLEX_FULL) bp 2036 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl = bp->req_flow_ctrl; bp 2039 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl |= FLOW_CTRL_TX; bp 2041 drivers/net/ethernet/broadcom/bnx2.c bp->flow_ctrl |= FLOW_CTRL_RX; bp 2044 drivers/net/ethernet/broadcom/bnx2.c old_port = bp->phy_port; bp 2046 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_FIBRE; bp 2048 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_TP; bp 2050 drivers/net/ethernet/broadcom/bnx2.c if (old_port != bp->phy_port) bp 2051 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_link(bp); bp 2054 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up != link_up) bp 2055 drivers/net/ethernet/broadcom/bnx2.c bnx2_report_link(bp); bp 2057 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 2061 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_remote_link(struct bnx2 *bp) bp 2065 drivers/net/ethernet/broadcom/bnx2.c evt_code = bnx2_shmem_rd(bp, BNX2_FW_EVT_CODE_MB); bp 2068 drivers/net/ethernet/broadcom/bnx2.c bnx2_remote_phy_event(bp); bp 2072 drivers/net/ethernet/broadcom/bnx2.c bnx2_send_heart_beat(bp); bp 2079 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_copper_phy(struct bnx2 *bp) bp 2080 drivers/net/ethernet/broadcom/bnx2.c __releases(&bp->phy_lock) bp 2081 drivers/net/ethernet/broadcom/bnx2.c __acquires(&bp->phy_lock) bp 2086 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 2088 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_adv, &adv_reg); bp 2092 drivers/net/ethernet/broadcom/bnx2.c new_adv = ADVERTISE_CSMA | ethtool_adv_to_mii_adv_t(bp->advertising); bp 2094 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) { bp 2098 drivers/net/ethernet/broadcom/bnx2.c new_adv |= bnx2_phy_get_pause_adv(bp); bp 2100 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_CTRL1000, &adv1000_reg); bp 2103 drivers/net/ethernet/broadcom/bnx2.c new_adv1000 |= ethtool_adv_to_mii_ctrl1000_t(bp->advertising); bp 2108 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_adv, new_adv); bp 2109 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_CTRL1000, new_adv1000); bp 2110 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, BMCR_ANRESTART | bp 2113 drivers/net/ethernet/broadcom/bnx2.c else if (bp->link_up) { bp 2117 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 2118 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 2125 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_adv, new_adv); bp 2128 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_line_speed == SPEED_100) { bp 2131 drivers/net/ethernet/broadcom/bnx2.c if (bp->req_duplex == DUPLEX_FULL) { bp 2137 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 2138 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 2142 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, BMCR_LOOPBACK); bp 2143 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 2145 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 2147 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 2148 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr, &bmsr); bp 2151 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, new_bmcr); bp 2158 drivers/net/ethernet/broadcom/bnx2.c bp->line_speed = bp->req_line_speed; bp 2159 drivers/net/ethernet/broadcom/bnx2.c bp->duplex = bp->req_duplex; bp 2160 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 2161 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 2164 drivers/net/ethernet/broadcom/bnx2.c bnx2_resolve_flow_ctrl(bp); bp 2165 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_link(bp); bp 2171 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_phy(struct bnx2 *bp, u8 port) bp 2172 drivers/net/ethernet/broadcom/bnx2.c __releases(&bp->phy_lock) bp 2173 drivers/net/ethernet/broadcom/bnx2.c __acquires(&bp->phy_lock) bp 2175 drivers/net/ethernet/broadcom/bnx2.c if (bp->loopback == MAC_LOOPBACK) bp 2178 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 2179 drivers/net/ethernet/broadcom/bnx2.c return bnx2_setup_serdes_phy(bp, port); bp 2182 drivers/net/ethernet/broadcom/bnx2.c return bnx2_setup_copper_phy(bp); bp 2187 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_5709s_phy(struct bnx2 *bp, int reset_phy) bp 2191 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmcr = MII_BMCR + 0x10; bp 2192 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmsr = MII_BMSR + 0x10; bp 2193 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmsr1 = MII_BNX2_GP_TOP_AN_STATUS1; bp 2194 drivers/net/ethernet/broadcom/bnx2.c bp->mii_adv = MII_ADVERTISE + 0x10; bp 2195 drivers/net/ethernet/broadcom/bnx2.c bp->mii_lpa = MII_LPA + 0x10; bp 2196 drivers/net/ethernet/broadcom/bnx2.c bp->mii_up1 = MII_BNX2_OVER1G_UP1; bp 2198 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_AER); bp 2199 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_AER_AER, MII_BNX2_AER_AER_AN_MMD); bp 2201 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_COMBO_IEEEB0); bp 2203 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_phy(bp); bp 2205 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_SERDES_DIG); bp 2207 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_SERDES_DIG_1000XCTL1, &val); bp 2210 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_SERDES_DIG_1000XCTL1, val); bp 2212 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_OVER1G); bp 2213 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_OVER1G_UP1, &val); bp 2214 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) bp 2218 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_OVER1G_UP1, val); bp 2220 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_BAM_NXTPG); bp 2221 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_BAM_NXTPG_CTL, &val); bp 2223 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BAM_NXTPG_CTL, val); bp 2225 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_CL73_USERB0); bp 2229 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_CL73_BAM_CTL1, val); bp 2231 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_BLK_ADDR, MII_BNX2_BLK_ADDR_COMBO_IEEEB0); bp 2237 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_5708s_phy(struct bnx2 *bp, int reset_phy) bp 2242 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_phy(bp); bp 2244 drivers/net/ethernet/broadcom/bnx2.c bp->mii_up1 = BCM5708S_UP1; bp 2246 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, BCM5708S_BLK_ADDR_DIG3); bp 2247 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_DIG_3_0, BCM5708S_DIG_3_0_USE_IEEE); bp 2248 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, BCM5708S_BLK_ADDR_DIG); bp 2250 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_1000X_CTL1, &val); bp 2252 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_1000X_CTL1, val); bp 2254 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_1000X_CTL2, &val); bp 2256 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_1000X_CTL2, val); bp 2258 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) { bp 2259 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_UP1, &val); bp 2261 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_UP1, val); bp 2264 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_A0) || bp 2265 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_B0) || bp 2266 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_B1)) { bp 2268 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, bp 2270 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, BCM5708S_TX_ACTL1, &val); bp 2272 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_TX_ACTL1, val); bp 2273 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, BCM5708S_BLK_ADDR_DIG); bp 2276 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_PORT_HW_CFG_CONFIG) & bp 2282 drivers/net/ethernet/broadcom/bnx2.c is_backplane = bnx2_shmem_rd(bp, BNX2_SHARED_HW_CFG_CONFIG); bp 2284 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, bp 2286 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_TX_ACTL3, val); bp 2287 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, BCM5708S_BLK_ADDR, bp 2295 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_5706s_phy(struct bnx2 *bp, int reset_phy) bp 2298 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_phy(bp); bp 2300 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT; bp 2302 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706) bp 2303 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_GP_HW_CTL0, 0x300); bp 2305 drivers/net/ethernet/broadcom/bnx2.c if (bp->dev->mtu > ETH_DATA_LEN) { bp 2309 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x7); bp 2310 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x18, &val); bp 2311 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, (val & 0xfff8) | 0x4000); bp 2313 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x1c, 0x6c00); bp 2314 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x1c, &val); bp 2315 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x1c, (val & 0x3ff) | 0xec02); bp 2320 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x7); bp 2321 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x18, &val); bp 2322 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, val & ~0x4007); bp 2324 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x1c, 0x6c00); bp 2325 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x1c, &val); bp 2326 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x1c, (val & 0x3fd) | 0xec00); bp 2333 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_copper_phy(struct bnx2 *bp, int reset_phy) bp 2338 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_phy(bp); bp 2340 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_CRC_FIX) { bp 2341 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x0c00); bp 2342 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x17, 0x000a); bp 2343 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x15, 0x310b); bp 2344 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x17, 0x201f); bp 2345 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x15, 0x9506); bp 2346 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x17, 0x401f); bp 2347 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x15, 0x14e2); bp 2348 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x0400); bp 2351 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_DIS_EARLY_DAC) { bp 2352 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_ADDRESS, bp 2354 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &val); bp 2356 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_RW_PORT, val); bp 2359 drivers/net/ethernet/broadcom/bnx2.c if (bp->dev->mtu > ETH_DATA_LEN) { bp 2361 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x7); bp 2362 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x18, &val); bp 2363 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, val | 0x4000); bp 2365 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x10, &val); bp 2366 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x10, val | 0x1); bp 2369 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, 0x7); bp 2370 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x18, &val); bp 2371 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x18, val & ~0x4007); bp 2373 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x10, &val); bp 2374 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x10, val & ~0x1); bp 2378 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_AUX_CTL, AUX_CTL_MISC_CTL); bp 2379 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_AUX_CTL, &val); bp 2383 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 2386 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_AUX_CTL, val); bp 2392 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_phy(struct bnx2 *bp, int reset_phy) bp 2393 drivers/net/ethernet/broadcom/bnx2.c __releases(&bp->phy_lock) bp 2394 drivers/net/ethernet/broadcom/bnx2.c __acquires(&bp->phy_lock) bp 2399 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_INT_MODE_MASK; bp 2400 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_INT_MODE_LINK_READY; bp 2402 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmcr = MII_BMCR; bp 2403 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmsr = MII_BMSR; bp 2404 drivers/net/ethernet/broadcom/bnx2.c bp->mii_bmsr1 = MII_BMSR; bp 2405 drivers/net/ethernet/broadcom/bnx2.c bp->mii_adv = MII_ADVERTISE; bp 2406 drivers/net/ethernet/broadcom/bnx2.c bp->mii_lpa = MII_LPA; bp 2408 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA, BNX2_EMAC_ATTENTION_ENA_LINK); bp 2410 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 2413 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_PHYSID1, &val); bp 2414 drivers/net/ethernet/broadcom/bnx2.c bp->phy_id = val << 16; bp 2415 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_PHYSID2, &val); bp 2416 drivers/net/ethernet/broadcom/bnx2.c bp->phy_id |= val & 0xffff; bp 2418 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 2419 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706) bp 2420 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_5706s_phy(bp, reset_phy); bp 2421 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP(bp) == BNX2_CHIP_5708) bp 2422 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_5708s_phy(bp, reset_phy); bp 2423 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 2424 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_5709s_phy(bp, reset_phy); bp 2427 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_copper_phy(bp, reset_phy); bp 2432 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_setup_phy(bp, bp->phy_port); bp 2438 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_loopback(struct bnx2 *bp) bp 2442 drivers/net/ethernet/broadcom/bnx2.c mac_mode = BNX2_RD(bp, BNX2_EMAC_MODE); bp 2445 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MODE, mac_mode); bp 2446 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 2453 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_phy_loopback(struct bnx2 *bp) bp 2458 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 2459 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_write_phy(bp, bp->mii_bmcr, BMCR_LOOPBACK | BMCR_FULLDPLX | bp 2461 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 2466 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_link(bp) == 0) bp 2471 drivers/net/ethernet/broadcom/bnx2.c mac_mode = BNX2_RD(bp, BNX2_EMAC_MODE); bp 2477 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MODE, mac_mode); bp 2478 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 1; bp 2483 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_mcp_state(struct bnx2 *bp) bp 2485 drivers/net/ethernet/broadcom/bnx2.c struct net_device *dev = bp->dev; bp 2489 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 2497 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, mcp_p0), bnx2_reg_rd_ind(bp, mcp_p1)); bp 2499 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_MODE), bp 2500 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_STATE), bp 2501 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_EVENT_MASK)); bp 2503 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_PROGRAM_COUNTER), bp 2504 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_PROGRAM_COUNTER), bp 2505 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_MCP_CPU_INSTRUCTION)); bp 2508 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_DRV_MB), bp 2509 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_FW_MB), bp 2510 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_LINK_STATUS)); bp 2511 drivers/net/ethernet/broadcom/bnx2.c pr_cont(" drv_pulse_mb[%08x]\n", bnx2_shmem_rd(bp, BNX2_DRV_PULSE_MB)); bp 2513 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_DEV_INFO_SIGNATURE), bp 2514 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_BC_STATE_RESET_TYPE)); bp 2516 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_rd(bp, BNX2_BC_STATE_CONDITION)); bp 2517 drivers/net/ethernet/broadcom/bnx2.c DP_SHMEM_LINE(bp, BNX2_BC_RESET_TYPE); bp 2518 drivers/net/ethernet/broadcom/bnx2.c DP_SHMEM_LINE(bp, 0x3cc); bp 2519 drivers/net/ethernet/broadcom/bnx2.c DP_SHMEM_LINE(bp, 0x3dc); bp 2520 drivers/net/ethernet/broadcom/bnx2.c DP_SHMEM_LINE(bp, 0x3ec); bp 2521 drivers/net/ethernet/broadcom/bnx2.c netdev_err(dev, "DEBUG: 0x3fc[%08x]\n", bnx2_shmem_rd(bp, 0x3fc)); bp 2526 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int ack, int silent) bp 2531 drivers/net/ethernet/broadcom/bnx2.c bp->fw_wr_seq++; bp 2532 drivers/net/ethernet/broadcom/bnx2.c msg_data |= bp->fw_wr_seq; bp 2533 drivers/net/ethernet/broadcom/bnx2.c bp->fw_last_msg = msg_data; bp 2535 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_DRV_MB, msg_data); bp 2544 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_FW_MB); bp 2557 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_DRV_MB, msg_data); bp 2560 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_mcp_state(bp); bp 2573 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_5709_context(struct bnx2 *bp) bp 2580 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_COMMAND, val); bp 2582 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_CTX_COMMAND); bp 2590 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->ctx_pages; i++) { bp 2593 drivers/net/ethernet/broadcom/bnx2.c if (bp->ctx_blk[i]) bp 2594 drivers/net/ethernet/broadcom/bnx2.c memset(bp->ctx_blk[i], 0, BNX2_PAGE_SIZE); bp 2598 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_HOST_PAGE_TBL_DATA0, bp 2599 drivers/net/ethernet/broadcom/bnx2.c (bp->ctx_blk_mapping[i] & 0xffffffff) | bp 2601 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_HOST_PAGE_TBL_DATA1, bp 2602 drivers/net/ethernet/broadcom/bnx2.c (u64) bp->ctx_blk_mapping[i] >> 32); bp 2603 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_HOST_PAGE_TBL_CTRL, i | bp 2607 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_CTX_HOST_PAGE_TBL_CTRL); bp 2621 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_context(struct bnx2 *bp) bp 2632 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) { bp 2653 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_VIRT_ADDR, vcid_addr); bp 2654 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_CTX_PAGE_TBL, pcid_addr); bp 2658 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, vcid_addr, offset, 0); bp 2664 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_bad_rbuf(struct bnx2 *bp) bp 2674 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ENABLE_SET_BITS, bp 2680 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_reg_rd_ind(bp, BNX2_RBUF_STATUS1); bp 2682 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RBUF_COMMAND, bp 2685 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_reg_rd_ind(bp, BNX2_RBUF_FW_BUF_ALLOC); bp 2695 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_reg_rd_ind(bp, BNX2_RBUF_STATUS1); bp 2706 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RBUF_FW_BUF_FREE, val); bp 2713 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(struct bnx2 *bp, u8 *mac_addr, u32 pos) bp 2719 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MAC_MATCH0 + (pos * 8), val); bp 2724 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MAC_MATCH1 + (pos * 8), val); bp 2728 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp) bp 2738 drivers/net/ethernet/broadcom/bnx2.c mapping = dma_map_page(&bp->pdev->dev, page, 0, PAGE_SIZE, bp 2740 drivers/net/ethernet/broadcom/bnx2.c if (dma_mapping_error(&bp->pdev->dev, mapping)) { bp 2753 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_page(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index) bp 2761 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_page(&bp->pdev->dev, dma_unmap_addr(rx_pg, mapping), bp 2769 drivers/net/ethernet/broadcom/bnx2.c bnx2_alloc_rx_data(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u16 index, gfp_t gfp) bp 2777 drivers/net/ethernet/broadcom/bnx2.c data = kmalloc(bp->rx_buf_size, gfp); bp 2781 drivers/net/ethernet/broadcom/bnx2.c mapping = dma_map_single(&bp->pdev->dev, bp 2783 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_use_size, bp 2785 drivers/net/ethernet/broadcom/bnx2.c if (dma_mapping_error(&bp->pdev->dev, mapping)) { bp 2796 drivers/net/ethernet/broadcom/bnx2.c rxr->rx_prod_bseq += bp->rx_buf_use_size; bp 2802 drivers/net/ethernet/broadcom/bnx2.c bnx2_phy_event_is_set(struct bnx2 *bp, struct bnx2_napi *bnapi, u32 event) bp 2812 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_STATUS_BIT_SET_CMD, event); bp 2814 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_STATUS_BIT_CLEAR_CMD, event); bp 2822 drivers/net/ethernet/broadcom/bnx2.c bnx2_phy_int(struct bnx2 *bp, struct bnx2_napi *bnapi) bp 2824 drivers/net/ethernet/broadcom/bnx2.c spin_lock(&bp->phy_lock); bp 2826 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_LINK_STATE)) bp 2827 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_link(bp); bp 2828 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_phy_event_is_set(bp, bnapi, STATUS_ATTN_BITS_TIMER_ABORT)) bp 2829 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_remote_link(bp); bp 2831 drivers/net/ethernet/broadcom/bnx2.c spin_unlock(&bp->phy_lock); bp 2848 drivers/net/ethernet/broadcom/bnx2.c bnx2_tx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) bp 2856 drivers/net/ethernet/broadcom/bnx2.c index = (bnapi - bp->bnx2_napi); bp 2857 drivers/net/ethernet/broadcom/bnx2.c txq = netdev_get_tx_queue(bp->dev, index); bp 2889 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, dma_unmap_addr(tx_buf, mapping), bp 2901 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_page(&bp->pdev->dev, bp 2931 drivers/net/ethernet/broadcom/bnx2.c (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh)) { bp 2934 drivers/net/ethernet/broadcom/bnx2.c (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh)) bp 2943 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, bp 3001 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_data(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, bp 3010 drivers/net/ethernet/broadcom/bnx2.c dma_sync_single_for_device(&bp->pdev->dev, bp 3014 drivers/net/ethernet/broadcom/bnx2.c rxr->rx_prod_bseq += bp->rx_buf_use_size; bp 3031 drivers/net/ethernet/broadcom/bnx2.c bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, u8 *data, bp 3039 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_alloc_rx_data(bp, rxr, prod, GFP_ATOMIC); bp 3041 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_data(bp, rxr, data, (u16) (ring_idx >> 16), prod); bp 3047 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages); bp 3052 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, dma_addr, bp->rx_buf_use_size, bp 3082 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_skb_pages(bp, rxr, NULL, bp 3107 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_alloc_rx_page(bp, rxr, bp 3113 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_skb_pages(bp, rxr, skb, bp 3118 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_page(&bp->pdev->dev, mapping_old, bp 3148 drivers/net/ethernet/broadcom/bnx2.c bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) bp 3187 drivers/net/ethernet/broadcom/bnx2.c dma_sync_single_for_cpu(&bp->pdev->dev, dma_addr, bp 3202 drivers/net/ethernet/broadcom/bnx2.c } else if (len > bp->rx_jumbo_thresh) { bp 3203 drivers/net/ethernet/broadcom/bnx2.c hdr_len = bp->rx_jumbo_thresh; bp 3213 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_data(bp, rxr, data, sw_ring_cons, bp 3220 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages); bp 3227 drivers/net/ethernet/broadcom/bnx2.c if (len <= bp->rx_copy_thresh) { bp 3228 drivers/net/ethernet/broadcom/bnx2.c skb = netdev_alloc_skb(bp->dev, len + 6); bp 3230 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_data(bp, rxr, data, sw_ring_cons, bp 3242 drivers/net/ethernet/broadcom/bnx2.c bnx2_reuse_rx_data(bp, rxr, data, bp 3246 drivers/net/ethernet/broadcom/bnx2.c skb = bnx2_rx_skb(bp, rxr, data, len, hdr_len, dma_addr, bp 3252 drivers/net/ethernet/broadcom/bnx2.c !(bp->rx_mode & BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG)) bp 3255 drivers/net/ethernet/broadcom/bnx2.c skb->protocol = eth_type_trans(skb, bp->dev); bp 3257 drivers/net/ethernet/broadcom/bnx2.c if (len > (bp->dev->mtu + ETH_HLEN) && bp 3267 drivers/net/ethernet/broadcom/bnx2.c if ((bp->dev->features & NETIF_F_RXCSUM) && bp 3275 drivers/net/ethernet/broadcom/bnx2.c if ((bp->dev->features & NETIF_F_RXHASH) && bp 3281 drivers/net/ethernet/broadcom/bnx2.c skb_record_rx_queue(skb, bnapi - &bp->bnx2_napi[0]); bp 3302 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, rxr->rx_pg_bidx_addr, rxr->rx_pg_prod); bp 3304 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, rxr->rx_bidx_addr, sw_prod); bp 3306 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, rxr->rx_bseq_addr, rxr->rx_prod_bseq); bp 3319 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = bnapi->bp; bp 3322 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bp 3327 drivers/net/ethernet/broadcom/bnx2.c if (unlikely(atomic_read(&bp->intr_sem) != 0)) bp 3339 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = bnapi->bp; bp 3344 drivers/net/ethernet/broadcom/bnx2.c if (unlikely(atomic_read(&bp->intr_sem) != 0)) bp 3356 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = bnapi->bp; bp 3366 drivers/net/ethernet/broadcom/bnx2.c (BNX2_RD(bp, BNX2_PCICFG_MISC_STATUS) & bp 3370 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bp 3377 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_PCICFG_INT_ACK_CMD); bp 3380 drivers/net/ethernet/broadcom/bnx2.c if (unlikely(atomic_read(&bp->intr_sem) != 0)) bp 3427 drivers/net/ethernet/broadcom/bnx2.c bnx2_chk_missed_msi(struct bnx2 *bp) bp 3429 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0]; bp 3433 drivers/net/ethernet/broadcom/bnx2.c msi_ctrl = BNX2_RD(bp, BNX2_PCICFG_MSI_CONTROL); bp 3437 drivers/net/ethernet/broadcom/bnx2.c if (bnapi->last_status_idx == bp->idle_chk_status_idx) { bp 3438 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl & bp 3440 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_MSI_CONTROL, msi_ctrl); bp 3441 drivers/net/ethernet/broadcom/bnx2.c bnx2_msi(bp->irq_tbl[0].vector, bnapi); bp 3445 drivers/net/ethernet/broadcom/bnx2.c bp->idle_chk_status_idx = bnapi->last_status_idx; bp 3449 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_poll_cnic(struct bnx2 *bp, struct bnx2_napi *bnapi) bp 3457 drivers/net/ethernet/broadcom/bnx2.c c_ops = rcu_dereference(bp->cnic_ops); bp 3459 drivers/net/ethernet/broadcom/bnx2.c bnapi->cnic_tag = c_ops->cnic_handler(bp->cnic_data, bp 3465 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_poll_link(struct bnx2 *bp, struct bnx2_napi *bnapi) bp 3474 drivers/net/ethernet/broadcom/bnx2.c bnx2_phy_int(bp, bnapi); bp 3479 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp 3480 drivers/net/ethernet/broadcom/bnx2.c bp->hc_cmd | BNX2_HC_COMMAND_COAL_NOW_WO_INT); bp 3481 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_HC_COMMAND); bp 3485 drivers/net/ethernet/broadcom/bnx2.c static int bnx2_poll_work(struct bnx2 *bp, struct bnx2_napi *bnapi, bp 3492 drivers/net/ethernet/broadcom/bnx2.c bnx2_tx_int(bp, bnapi, 0); bp 3495 drivers/net/ethernet/broadcom/bnx2.c work_done += bnx2_rx_int(bp, bnapi, budget - work_done); bp 3503 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = bnapi->bp; bp 3508 drivers/net/ethernet/broadcom/bnx2.c work_done = bnx2_poll_work(bp, bnapi, work_done, budget); bp 3518 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bnapi->int_num | bp 3530 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = bnapi->bp; bp 3535 drivers/net/ethernet/broadcom/bnx2.c bnx2_poll_link(bp, bnapi); bp 3537 drivers/net/ethernet/broadcom/bnx2.c work_done = bnx2_poll_work(bp, bnapi, work_done, budget); bp 3540 drivers/net/ethernet/broadcom/bnx2.c bnx2_poll_cnic(bp, bnapi); bp 3555 drivers/net/ethernet/broadcom/bnx2.c if (likely(bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX)) { bp 3556 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bp 3561 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bp 3566 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, bp 3582 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 3590 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 3592 drivers/net/ethernet/broadcom/bnx2.c rx_mode = bp->rx_mode & ~(BNX2_EMAC_RX_MODE_PROMISCUOUS | bp 3596 drivers/net/ethernet/broadcom/bnx2.c (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN)) bp 3606 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MULTICAST_HASH0 + (i * 4), bp 3629 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MULTICAST_HASH0 + (i * 4), bp 3644 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(bp, ha->addr, bp 3653 drivers/net/ethernet/broadcom/bnx2.c if (rx_mode != bp->rx_mode) { bp 3654 drivers/net/ethernet/broadcom/bnx2.c bp->rx_mode = rx_mode; bp 3655 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_RX_MODE, rx_mode); bp 3658 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, 0x0); bp 3659 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, sort_mode); bp 3660 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, sort_mode | BNX2_RPM_SORT_USER0_ENA); bp 3662 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 3692 drivers/net/ethernet/broadcom/bnx2.c static void bnx2_release_firmware(struct bnx2 *bp) bp 3694 drivers/net/ethernet/broadcom/bnx2.c if (bp->rv2p_firmware) { bp 3695 drivers/net/ethernet/broadcom/bnx2.c release_firmware(bp->mips_firmware); bp 3696 drivers/net/ethernet/broadcom/bnx2.c release_firmware(bp->rv2p_firmware); bp 3697 drivers/net/ethernet/broadcom/bnx2.c bp->rv2p_firmware = NULL; bp 3701 drivers/net/ethernet/broadcom/bnx2.c static int bnx2_request_uncached_firmware(struct bnx2 *bp) bp 3708 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 3710 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5709_A0) || bp 3711 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5709_A1)) bp 3720 drivers/net/ethernet/broadcom/bnx2.c rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev); bp 3726 drivers/net/ethernet/broadcom/bnx2.c rc = request_firmware(&bp->rv2p_firmware, rv2p_fw_file, &bp->pdev->dev); bp 3731 drivers/net/ethernet/broadcom/bnx2.c mips_fw = (const struct bnx2_mips_fw_file *) bp->mips_firmware->data; bp 3732 drivers/net/ethernet/broadcom/bnx2.c rv2p_fw = (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data; bp 3733 drivers/net/ethernet/broadcom/bnx2.c if (bp->mips_firmware->size < sizeof(*mips_fw) || bp 3734 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->com) || bp 3735 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->cp) || bp 3736 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->rxp) || bp 3737 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->tpat) || bp 3738 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->txp)) { bp 3743 drivers/net/ethernet/broadcom/bnx2.c if (bp->rv2p_firmware->size < sizeof(*rv2p_fw) || bp 3744 drivers/net/ethernet/broadcom/bnx2.c check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc1.rv2p, 8, true) || bp 3745 drivers/net/ethernet/broadcom/bnx2.c check_fw_section(bp->rv2p_firmware, &rv2p_fw->proc2.rv2p, 8, true)) { bp 3754 drivers/net/ethernet/broadcom/bnx2.c release_firmware(bp->rv2p_firmware); bp 3755 drivers/net/ethernet/broadcom/bnx2.c bp->rv2p_firmware = NULL; bp 3757 drivers/net/ethernet/broadcom/bnx2.c release_firmware(bp->mips_firmware); bp 3761 drivers/net/ethernet/broadcom/bnx2.c static int bnx2_request_firmware(struct bnx2 *bp) bp 3763 drivers/net/ethernet/broadcom/bnx2.c return bp->rv2p_firmware ? 0 : bnx2_request_uncached_firmware(bp); bp 3779 drivers/net/ethernet/broadcom/bnx2.c load_rv2p_fw(struct bnx2 *bp, u32 rv2p_proc, bp 3790 drivers/net/ethernet/broadcom/bnx2.c rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset); bp 3801 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_INSTR_HIGH, be32_to_cpu(*rv2p_code)); bp 3803 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_INSTR_LOW, be32_to_cpu(*rv2p_code)); bp 3807 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, addr, val); bp 3810 drivers/net/ethernet/broadcom/bnx2.c rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset); bp 3817 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_INSTR_HIGH, code); bp 3820 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_INSTR_LOW, code); bp 3823 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, addr, val); bp 3829 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_COMMAND, BNX2_RV2P_COMMAND_PROC1_RESET); bp 3832 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_COMMAND, BNX2_RV2P_COMMAND_PROC2_RESET); bp 3839 drivers/net/ethernet/broadcom/bnx2.c load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, bp 3848 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_reg_rd_ind(bp, cpu_reg->mode); bp 3850 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->mode, val); bp 3851 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->state, cpu_reg->state_value_clear); bp 3857 drivers/net/ethernet/broadcom/bnx2.c data = (__be32 *)(bp->mips_firmware->data + file_offset); bp 3864 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j])); bp 3871 drivers/net/ethernet/broadcom/bnx2.c data = (__be32 *)(bp->mips_firmware->data + file_offset); bp 3878 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j])); bp 3885 drivers/net/ethernet/broadcom/bnx2.c data = (__be32 *)(bp->mips_firmware->data + file_offset); bp 3892 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j])); bp 3896 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->inst, 0); bp 3899 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->pc, val); bp 3902 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_reg_rd_ind(bp, cpu_reg->mode); bp 3904 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->state, cpu_reg->state_value_clear); bp 3905 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, cpu_reg->mode, val); bp 3911 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_cpus(struct bnx2 *bp) bp 3914 drivers/net/ethernet/broadcom/bnx2.c (const struct bnx2_mips_fw_file *) bp->mips_firmware->data; bp 3916 drivers/net/ethernet/broadcom/bnx2.c (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data; bp 3920 drivers/net/ethernet/broadcom/bnx2.c load_rv2p_fw(bp, RV2P_PROC1, &rv2p_fw->proc1); bp 3921 drivers/net/ethernet/broadcom/bnx2.c load_rv2p_fw(bp, RV2P_PROC2, &rv2p_fw->proc2); bp 3924 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_rxp, &mips_fw->rxp); bp 3929 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_txp, &mips_fw->txp); bp 3934 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_tpat, &mips_fw->tpat); bp 3939 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_com, &mips_fw->com); bp 3944 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_cp, &mips_fw->cp); bp 3951 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_wol(struct bnx2 *bp) bp 3956 drivers/net/ethernet/broadcom/bnx2.c if (bp->wol) { bp 3960 drivers/net/ethernet/broadcom/bnx2.c autoneg = bp->autoneg; bp 3961 drivers/net/ethernet/broadcom/bnx2.c advertising = bp->advertising; bp 3963 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_port == PORT_TP) { bp 3964 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = AUTONEG_SPEED; bp 3965 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = ADVERTISED_10baseT_Half | bp 3972 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 3973 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_phy(bp, bp->phy_port); bp 3974 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 3976 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = autoneg; bp 3977 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = advertising; bp 3979 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(bp, bp->dev->dev_addr, 0); bp 3981 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_EMAC_MODE); bp 3988 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_port == PORT_TP) { bp 3992 drivers/net/ethernet/broadcom/bnx2.c if (bp->line_speed == SPEED_2500) bp 3996 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MODE, val); bp 4000 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MULTICAST_HASH0 + (i * 4), bp 4003 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_RX_MODE, BNX2_EMAC_RX_MODE_SORT_MODE); bp 4006 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, 0x0); bp 4007 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, val); bp 4008 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_SORT_USER0, val | BNX2_RPM_SORT_USER0_ENA); bp 4011 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ENABLE_SET_BITS, bp 4016 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_RPM_CONFIG); bp 4018 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_CONFIG, val); bp 4025 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_NO_WOL)) { bp 4029 drivers/net/ethernet/broadcom/bnx2.c if (bp->fw_last_msg || BNX2_CHIP(bp) != BNX2_CHIP_5709) { bp 4030 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(bp, wol_msg, 1, 0); bp 4036 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_PORT_FEATURE); bp 4037 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_PORT_FEATURE, bp 4039 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(bp, wol_msg, 1, 0); bp 4040 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_PORT_FEATURE, val); bp 4046 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_power_state(struct bnx2 *bp, pci_power_t state) bp 4052 drivers/net/ethernet/broadcom/bnx2.c pci_enable_wake(bp->pdev, PCI_D0, false); bp 4053 drivers/net/ethernet/broadcom/bnx2.c pci_set_power_state(bp->pdev, PCI_D0); bp 4055 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_EMAC_MODE); bp 4058 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_MODE, val); bp 4060 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_RPM_CONFIG); bp 4062 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RPM_CONFIG, val); bp 4066 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_wol(bp); bp 4067 drivers/net/ethernet/broadcom/bnx2.c pci_wake_from_d3(bp->pdev, bp->wol); bp 4068 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) || bp 4069 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1)) { bp 4071 drivers/net/ethernet/broadcom/bnx2.c if (bp->wol) bp 4072 drivers/net/ethernet/broadcom/bnx2.c pci_set_power_state(bp->pdev, PCI_D3hot); bp 4076 drivers/net/ethernet/broadcom/bnx2.c if (!bp->fw_last_msg && BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 4083 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_BC_STATE_CONDITION); bp 4086 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_BC_STATE_CONDITION, val); bp 4088 drivers/net/ethernet/broadcom/bnx2.c pci_set_power_state(bp->pdev, PCI_D3hot); bp 4102 drivers/net/ethernet/broadcom/bnx2.c bnx2_acquire_nvram_lock(struct bnx2 *bp) bp 4108 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_SW_ARB, BNX2_NVM_SW_ARB_ARB_REQ_SET2); bp 4110 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_SW_ARB); bp 4124 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_nvram_lock(struct bnx2 *bp) bp 4130 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_SW_ARB, BNX2_NVM_SW_ARB_ARB_REQ_CLR2); bp 4133 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_SW_ARB); bp 4148 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_write(struct bnx2 *bp) bp 4152 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_CFG); bp 4153 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_CFG, val | BNX2_MISC_CFG_NVM_WR_EN_PCI); bp 4155 drivers/net/ethernet/broadcom/bnx2.c if (bp->flash_info->flags & BNX2_NV_WREN) { bp 4158 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, BNX2_NVM_COMMAND_DONE); bp 4159 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, bp 4165 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_COMMAND); bp 4177 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_write(struct bnx2 *bp) bp 4181 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_CFG); bp 4182 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_CFG, val & ~BNX2_MISC_CFG_NVM_WR_EN); bp 4187 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_access(struct bnx2 *bp) bp 4191 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_ACCESS_ENABLE); bp 4193 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_ACCESS_ENABLE, bp 4198 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_access(struct bnx2 *bp) bp 4202 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_ACCESS_ENABLE); bp 4204 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_ACCESS_ENABLE, bp 4210 drivers/net/ethernet/broadcom/bnx2.c bnx2_nvram_erase_page(struct bnx2 *bp, u32 offset) bp 4215 drivers/net/ethernet/broadcom/bnx2.c if (bp->flash_info->flags & BNX2_NV_BUFFERED) bp 4224 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, BNX2_NVM_COMMAND_DONE); bp 4227 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_ADDR, offset & BNX2_NVM_ADDR_NVM_ADDR_VALUE); bp 4230 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, cmd); bp 4238 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_COMMAND); bp 4250 drivers/net/ethernet/broadcom/bnx2.c bnx2_nvram_read_dword(struct bnx2 *bp, u32 offset, u8 *ret_val, u32 cmd_flags) bp 4259 drivers/net/ethernet/broadcom/bnx2.c if (bp->flash_info->flags & BNX2_NV_TRANSLATE) { bp 4260 drivers/net/ethernet/broadcom/bnx2.c offset = ((offset / bp->flash_info->page_size) << bp 4261 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info->page_bits) + bp 4262 drivers/net/ethernet/broadcom/bnx2.c (offset % bp->flash_info->page_size); bp 4266 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, BNX2_NVM_COMMAND_DONE); bp 4269 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_ADDR, offset & BNX2_NVM_ADDR_NVM_ADDR_VALUE); bp 4272 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, cmd); bp 4280 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_COMMAND); bp 4282 drivers/net/ethernet/broadcom/bnx2.c __be32 v = cpu_to_be32(BNX2_RD(bp, BNX2_NVM_READ)); bp 4295 drivers/net/ethernet/broadcom/bnx2.c bnx2_nvram_write_dword(struct bnx2 *bp, u32 offset, u8 *val, u32 cmd_flags) bp 4305 drivers/net/ethernet/broadcom/bnx2.c if (bp->flash_info->flags & BNX2_NV_TRANSLATE) { bp 4306 drivers/net/ethernet/broadcom/bnx2.c offset = ((offset / bp->flash_info->page_size) << bp 4307 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info->page_bits) + bp 4308 drivers/net/ethernet/broadcom/bnx2.c (offset % bp->flash_info->page_size); bp 4312 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, BNX2_NVM_COMMAND_DONE); bp 4317 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_WRITE, be32_to_cpu(val32)); bp 4320 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_ADDR, offset & BNX2_NVM_ADDR_NVM_ADDR_VALUE); bp 4323 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_COMMAND, cmd); bp 4329 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_RD(bp, BNX2_NVM_COMMAND) & BNX2_NVM_COMMAND_DONE) bp 4339 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nvram(struct bnx2 *bp) bp 4345 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 4346 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = &flash_5709; bp 4351 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_NVM_CFG1); bp 4362 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = flash; bp 4380 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = flash; bp 4383 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_acquire_nvram_lock(bp)) != 0) bp 4387 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_access(bp); bp 4390 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG1, flash->config1); bp 4391 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG2, flash->config2); bp 4392 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_CFG3, flash->config3); bp 4393 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_NVM_WRITE1, flash->write1); bp 4396 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_access(bp); bp 4397 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_nvram_lock(bp); bp 4405 drivers/net/ethernet/broadcom/bnx2.c bp->flash_info = NULL; bp 4411 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_SHARED_HW_CFG_CONFIG2); bp 4414 drivers/net/ethernet/broadcom/bnx2.c bp->flash_size = val; bp 4416 drivers/net/ethernet/broadcom/bnx2.c bp->flash_size = bp->flash_info->total_size; bp 4422 drivers/net/ethernet/broadcom/bnx2.c bnx2_nvram_read(struct bnx2 *bp, u32 offset, u8 *ret_buf, bp 4432 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_acquire_nvram_lock(bp)) != 0) bp 4436 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_access(bp); bp 4460 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, offset32, buf, cmd_flags); bp 4485 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, offset32, buf, cmd_flags); bp 4498 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, offset32, ret_buf, cmd_flags); bp 4506 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, offset32, ret_buf, 0); bp 4518 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, offset32, buf, cmd_flags); bp 4524 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_access(bp); bp 4526 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_nvram_lock(bp); bp 4532 drivers/net/ethernet/broadcom/bnx2.c bnx2_nvram_write(struct bnx2 *bp, u32 offset, u8 *data_buf, bp 4550 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_nvram_read(bp, offset32, start, 4))) bp 4557 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_nvram_read(bp, offset32 + len32 - 4, end, 4))) bp 4575 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flash_info->flags & BNX2_NV_BUFFERED)) { bp 4591 drivers/net/ethernet/broadcom/bnx2.c page_start -= (page_start % bp->flash_info->page_size); bp 4593 drivers/net/ethernet/broadcom/bnx2.c page_end = page_start + bp->flash_info->page_size; bp 4601 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_acquire_nvram_lock(bp)) != 0) bp 4605 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_access(bp); bp 4608 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flash_info->flags & BNX2_NV_BUFFERED)) { bp 4613 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->flash_info->page_size; j += 4) { bp 4614 drivers/net/ethernet/broadcom/bnx2.c if (j == (bp->flash_info->page_size - 4)) { bp 4617 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read_dword(bp, bp 4630 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_enable_nvram_write(bp)) != 0) bp 4636 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flash_info->flags & BNX2_NV_BUFFERED)) { bp 4638 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_nvram_erase_page(bp, page_start)) != 0) bp 4642 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_nvram_write(bp); bp 4647 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_write_dword(bp, addr, bp 4660 drivers/net/ethernet/broadcom/bnx2.c ((bp->flash_info->flags & BNX2_NV_BUFFERED) && bp 4665 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_write_dword(bp, addr, buf, bp 4677 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flash_info->flags & BNX2_NV_BUFFERED)) { bp 4684 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_write_dword(bp, addr, bp 4695 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_write(bp); bp 4698 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_nvram_access(bp); bp 4699 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_nvram_lock(bp); bp 4712 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_fw_cap(struct bnx2 *bp) bp 4716 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_REMOTE_PHY_CAP; bp 4717 drivers/net/ethernet/broadcom/bnx2.c bp->flags &= ~BNX2_FLAG_CAN_KEEP_VLAN; bp 4719 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_ASF_ENABLE)) bp 4720 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_CAN_KEEP_VLAN; bp 4722 drivers/net/ethernet/broadcom/bnx2.c val = bnx2_shmem_rd(bp, BNX2_FW_CAP_MB); bp 4727 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_CAN_KEEP_VLAN; bp 4731 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_SERDES) && bp 4735 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_REMOTE_PHY_CAP; bp 4737 drivers/net/ethernet/broadcom/bnx2.c link = bnx2_shmem_rd(bp, BNX2_LINK_STATUS); bp 4739 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_FIBRE; bp 4741 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_TP; bp 4747 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev) && sig) bp 4748 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_DRV_ACK_CAP_MB, sig); bp 4752 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_msix_tbl(struct bnx2 *bp) bp 4754 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_GRC_WINDOW_ADDR, BNX2_PCI_GRC_WINDOW_ADDR_SEP_WIN); bp 4756 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_GRC_WINDOW2_ADDR, BNX2_MSIX_TABLE_ADDR); bp 4757 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_GRC_WINDOW3_ADDR, BNX2_MSIX_PBA_ADDR); bp 4761 drivers/net/ethernet/broadcom/bnx2.c bnx2_wait_dma_complete(struct bnx2 *bp) bp 4770 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP(bp) == BNX2_CHIP_5706) || bp 4771 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP(bp) == BNX2_CHIP_5708)) { bp 4772 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ENABLE_CLR_BITS, bp 4777 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_ENABLE_CLR_BITS); bp 4780 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_NEW_CORE_CTL); bp 4782 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_NEW_CORE_CTL, val); bp 4783 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_NEW_CORE_CTL); bp 4787 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_PCICFG_DEVICE_CONTROL); bp 4798 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_chip(struct bnx2 *bp, u32 reset_code) bp 4806 drivers/net/ethernet/broadcom/bnx2.c bnx2_wait_dma_complete(bp); bp 4809 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT0 | reset_code, 1, 1); bp 4813 drivers/net/ethernet/broadcom/bnx2.c bnx2_shmem_wr(bp, BNX2_DRV_RESET_SIGNATURE, bp 4818 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_ID); bp 4820 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 4821 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_COMMAND, BNX2_MISC_COMMAND_SW_RESET); bp 4822 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_MISC_COMMAND); bp 4828 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_MISC_CONFIG, val); bp 4836 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_MISC_CONFIG, val); bp 4842 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) || bp 4843 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1)) bp 4848 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_PCICFG_MISC_CONFIG); bp 4863 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_PCI_SWAP_DIAG0); bp 4870 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT1 | reset_code, 1, 0); bp 4874 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 4875 drivers/net/ethernet/broadcom/bnx2.c old_port = bp->phy_port; bp 4876 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_fw_cap(bp); bp 4877 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) && bp 4878 drivers/net/ethernet/broadcom/bnx2.c old_port != bp->phy_port) bp 4879 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_remote_link(bp); bp 4880 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 4882 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) { bp 4885 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_VREG_CONTROL, 0x000000fa); bp 4888 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_alloc_bad_rbuf(bp); bp 4891 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSIX) { bp 4892 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_msix_tbl(bp); bp 4894 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ECO_HW_CTL, bp 4902 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_chip(struct bnx2 *bp) bp 4908 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_INT_ACK_CMD, BNX2_PCICFG_INT_ACK_CMD_MASK_INT); bp 4921 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_PCIX) && (bp->bus_speed_mhz == 133)) bp 4924 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP(bp) == BNX2_CHIP_5706) && bp 4925 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) != BNX2_CHIP_ID_5706_A0) && bp 4926 drivers/net/ethernet/broadcom/bnx2.c !(bp->flags & BNX2_FLAG_PCIX)) bp 4929 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_DMA_CONFIG, val); bp 4931 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) { bp 4932 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_TDMA_CONFIG); bp 4934 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TDMA_CONFIG, val); bp 4937 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_PCIX) { bp 4940 drivers/net/ethernet/broadcom/bnx2.c pci_read_config_word(bp->pdev, bp->pcix_cap + PCI_X_CMD, bp 4942 drivers/net/ethernet/broadcom/bnx2.c pci_write_config_word(bp->pdev, bp->pcix_cap + PCI_X_CMD, bp 4946 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ENABLE_SET_BITS, bp 4953 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 4954 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_5709_context(bp); bp 4958 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_context(bp); bp 4960 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_init_cpus(bp)) != 0) bp 4963 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nvram(bp); bp 4965 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(bp, bp->dev->dev_addr, 0); bp 4967 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MQ_CONFIG); bp 4970 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 4972 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_REV(bp) == BNX2_CHIP_REV_Ax) bp 4976 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MQ_CONFIG, val); bp 4979 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MQ_KNL_BYP_WIND_START, val); bp 4980 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MQ_KNL_WIND_END, val); bp 4983 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RV2P_CONFIG, val); bp 4986 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_TBDR_CONFIG); bp 4989 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TBDR_CONFIG, val); bp 4991 drivers/net/ethernet/broadcom/bnx2.c val = bp->mac_addr[0] + bp 4992 drivers/net/ethernet/broadcom/bnx2.c (bp->mac_addr[1] << 8) + bp 4993 drivers/net/ethernet/broadcom/bnx2.c (bp->mac_addr[2] << 16) + bp 4994 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[3] + bp 4995 drivers/net/ethernet/broadcom/bnx2.c (bp->mac_addr[4] << 8) + bp 4996 drivers/net/ethernet/broadcom/bnx2.c (bp->mac_addr[5] << 16); bp 4997 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_BACKOFF_SEED, val); bp 5000 drivers/net/ethernet/broadcom/bnx2.c mtu = bp->dev->mtu; bp 5004 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_RX_MTU_SIZE, val); bp 5009 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG, BNX2_RBUF_CONFIG_VAL(mtu)); bp 5010 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG2, BNX2_RBUF_CONFIG2_VAL(mtu)); bp 5011 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RBUF_CONFIG3, BNX2_RBUF_CONFIG3_VAL(mtu)); bp 5013 drivers/net/ethernet/broadcom/bnx2.c memset(bp->bnx2_napi[0].status_blk.msi, 0, bp->status_stats_size); bp 5015 drivers/net/ethernet/broadcom/bnx2.c bp->bnx2_napi[i].last_status_idx = 0; bp 5017 drivers/net/ethernet/broadcom/bnx2.c bp->idle_chk_status_idx = 0xffff; bp 5020 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_ATTENTION_ENA, BNX2_EMAC_ATTENTION_ENA_LINK); bp 5022 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATUS_ADDR_L, bp 5023 drivers/net/ethernet/broadcom/bnx2.c (u64) bp->status_blk_mapping & 0xffffffff); bp 5024 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATUS_ADDR_H, (u64) bp->status_blk_mapping >> 32); bp 5026 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATISTICS_ADDR_L, bp 5027 drivers/net/ethernet/broadcom/bnx2.c (u64) bp->stats_blk_mapping & 0xffffffff); bp 5028 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATISTICS_ADDR_H, bp 5029 drivers/net/ethernet/broadcom/bnx2.c (u64) bp->stats_blk_mapping >> 32); bp 5031 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_TX_QUICK_CONS_TRIP, bp 5032 drivers/net/ethernet/broadcom/bnx2.c (bp->tx_quick_cons_trip_int << 16) | bp->tx_quick_cons_trip); bp 5034 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_RX_QUICK_CONS_TRIP, bp 5035 drivers/net/ethernet/broadcom/bnx2.c (bp->rx_quick_cons_trip_int << 16) | bp->rx_quick_cons_trip); bp 5037 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMP_PROD_TRIP, bp 5038 drivers/net/ethernet/broadcom/bnx2.c (bp->comp_prod_trip_int << 16) | bp->comp_prod_trip); bp 5040 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_TX_TICKS, (bp->tx_ticks_int << 16) | bp->tx_ticks); bp 5042 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_RX_TICKS, (bp->rx_ticks_int << 16) | bp->rx_ticks); bp 5044 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COM_TICKS, bp 5045 drivers/net/ethernet/broadcom/bnx2.c (bp->com_ticks_int << 16) | bp->com_ticks); bp 5047 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_CMD_TICKS, bp 5048 drivers/net/ethernet/broadcom/bnx2.c (bp->cmd_ticks_int << 16) | bp->cmd_ticks); bp 5050 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_BROKEN_STATS) bp 5051 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATS_TICKS, 0); bp 5053 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STATS_TICKS, bp->stats_ticks); bp 5054 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_STAT_COLLECT_TICKS, 0xbb8); /* 3ms */ bp 5056 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1) bp 5063 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSIX) { bp 5064 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_MSIX_BIT_VECTOR, bp 5070 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_ONE_SHOT_MSI) bp 5073 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_CONFIG, val); bp 5075 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_ticks < 25) bp 5076 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_FW_RX_LOW_LATENCY, 1); bp 5078 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_FW_RX_LOW_LATENCY, 0); bp 5080 drivers/net/ethernet/broadcom/bnx2.c for (i = 1; i < bp->irq_nvecs; i++) { bp 5084 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, base, bp 5089 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, base + BNX2_HC_TX_QUICK_CONS_TRIP_OFF, bp 5090 drivers/net/ethernet/broadcom/bnx2.c (bp->tx_quick_cons_trip_int << 16) | bp 5091 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip); bp 5093 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, base + BNX2_HC_TX_TICKS_OFF, bp 5094 drivers/net/ethernet/broadcom/bnx2.c (bp->tx_ticks_int << 16) | bp->tx_ticks); bp 5096 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, base + BNX2_HC_RX_QUICK_CONS_TRIP_OFF, bp 5097 drivers/net/ethernet/broadcom/bnx2.c (bp->rx_quick_cons_trip_int << 16) | bp 5098 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip); bp 5100 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, base + BNX2_HC_RX_TICKS_OFF, bp 5101 drivers/net/ethernet/broadcom/bnx2.c (bp->rx_ticks_int << 16) | bp->rx_ticks); bp 5105 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, BNX2_HC_COMMAND_CLR_STAT_NOW); bp 5107 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_EVENTS); bp 5110 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_rx_mode(bp->dev); bp 5112 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 5113 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MISC_NEW_CORE_CTL); bp 5115 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_NEW_CORE_CTL, val); bp 5117 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT2 | BNX2_DRV_MSG_CODE_RESET, bp 5120 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_ENABLE_SET_BITS, BNX2_MISC_ENABLE_DEFAULT); bp 5121 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_MISC_ENABLE_SET_BITS); bp 5125 drivers/net/ethernet/broadcom/bnx2.c bp->hc_cmd = BNX2_RD(bp, BNX2_HC_COMMAND); bp 5131 drivers/net/ethernet/broadcom/bnx2.c bnx2_clear_ring_states(struct bnx2 *bp) bp 5139 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[i]; bp 5154 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_tx_context(struct bnx2 *bp, u32 cid, struct bnx2_tx_ring_info *txr) bp 5159 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 5171 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, cid_addr, offset0, val); bp 5174 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, cid_addr, offset1, val); bp 5177 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, cid_addr, offset2, val); bp 5180 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, cid_addr, offset3, val); bp 5184 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_tx_ring(struct bnx2 *bp, int ring_num) bp 5191 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[ring_num]; bp 5199 drivers/net/ethernet/broadcom/bnx2.c bp->tx_wake_thresh = bp->tx_ring_size / 2; bp 5212 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_tx_context(bp, cid, txr); bp 5240 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_rx_ring(struct bnx2 *bp, int ring_num) bp 5245 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[ring_num]; bp 5256 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_use_size, bp->rx_max_ring); bp 5258 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_rx_context(bp, cid); bp 5260 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 5261 drivers/net/ethernet/broadcom/bnx2.c val = BNX2_RD(bp, BNX2_MQ_MAP_L2_5); bp 5262 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MQ_MAP_L2_5, val | BNX2_MQ_MAP_L2_5_ARM); bp 5265 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_PG_BUF_SIZE, 0); bp 5266 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_pg_ring_size) { bp 5269 drivers/net/ethernet/broadcom/bnx2.c PAGE_SIZE, bp->rx_max_pg_ring); bp 5270 drivers/net/ethernet/broadcom/bnx2.c val = (bp->rx_buf_use_size << 16) | PAGE_SIZE; bp 5271 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_PG_BUF_SIZE, val); bp 5272 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_RBDC_KEY, bp 5276 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_NX_PG_BDHADDR_HI, val); bp 5279 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_NX_PG_BDHADDR_LO, val); bp 5281 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 5282 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MQ_MAP_L2_3, BNX2_MQ_MAP_L2_3_DEFAULT); bp 5286 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_NX_BDHADDR_HI, val); bp 5289 drivers/net/ethernet/broadcom/bnx2.c bnx2_ctx_wr(bp, rx_cid_addr, BNX2_L2CTX_NX_BDHADDR_LO, val); bp 5292 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->rx_pg_ring_size; i++) { bp 5293 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_alloc_rx_page(bp, rxr, ring_prod, GFP_KERNEL) < 0) { bp 5294 drivers/net/ethernet/broadcom/bnx2.c netdev_warn(bp->dev, "init'ed rx page ring %d with %d/%d pages only\n", bp 5295 drivers/net/ethernet/broadcom/bnx2.c ring_num, i, bp->rx_pg_ring_size); bp 5304 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->rx_ring_size; i++) { bp 5305 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_alloc_rx_data(bp, rxr, ring_prod, GFP_KERNEL) < 0) { bp 5306 drivers/net/ethernet/broadcom/bnx2.c netdev_warn(bp->dev, "init'ed rx ring %d with %d/%d skbs only\n", bp 5307 drivers/net/ethernet/broadcom/bnx2.c ring_num, i, bp->rx_ring_size); bp 5319 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, rxr->rx_pg_bidx_addr, rxr->rx_pg_prod); bp 5320 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, rxr->rx_bidx_addr, prod); bp 5322 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, rxr->rx_bseq_addr, rxr->rx_prod_bseq); bp 5326 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_all_rings(struct bnx2 *bp) bp 5331 drivers/net/ethernet/broadcom/bnx2.c bnx2_clear_ring_states(bp); bp 5333 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TSCH_TSS_CFG, 0); bp 5334 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_tx_rings; i++) bp 5335 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_tx_ring(bp, i); bp 5337 drivers/net/ethernet/broadcom/bnx2.c if (bp->num_tx_rings > 1) bp 5338 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TSCH_TSS_CFG, ((bp->num_tx_rings - 1) << 24) | bp 5341 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RLUP_RSS_CONFIG, 0); bp 5342 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, BNX2_RXP_SCRATCH_RSS_TBL_SZ, 0); bp 5344 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_rx_rings; i++) bp 5345 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_rx_ring(bp, i); bp 5347 drivers/net/ethernet/broadcom/bnx2.c if (bp->num_rx_rings > 1) { bp 5353 drivers/net/ethernet/broadcom/bnx2.c tbl_32 |= (i % (bp->num_rx_rings - 1)) << shift; bp 5355 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RLUP_RSS_DATA, tbl_32); bp 5356 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RLUP_RSS_COMMAND, (i >> 3) | bp 5367 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_RLUP_RSS_CONFIG, val); bp 5392 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_rx_ring_size(struct bnx2 *bp, u32 size) bp 5397 drivers/net/ethernet/broadcom/bnx2.c rx_size = bp->dev->mtu + ETH_HLEN + BNX2_RX_OFFSET + 8; bp 5402 drivers/net/ethernet/broadcom/bnx2.c bp->rx_copy_thresh = BNX2_RX_COPY_THRESH; bp 5403 drivers/net/ethernet/broadcom/bnx2.c bp->rx_pg_ring_size = 0; bp 5404 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_pg_ring = 0; bp 5405 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_pg_ring_idx = 0; bp 5406 drivers/net/ethernet/broadcom/bnx2.c if ((rx_space > PAGE_SIZE) && !(bp->flags & BNX2_FLAG_JUMBO_BROKEN)) { bp 5407 drivers/net/ethernet/broadcom/bnx2.c int pages = PAGE_ALIGN(bp->dev->mtu - 40) >> PAGE_SHIFT; bp 5413 drivers/net/ethernet/broadcom/bnx2.c bp->rx_pg_ring_size = jumbo_size; bp 5414 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_pg_ring = bnx2_find_max_ring(jumbo_size, bp 5416 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_pg_ring_idx = bp 5417 drivers/net/ethernet/broadcom/bnx2.c (bp->rx_max_pg_ring * BNX2_RX_DESC_CNT) - 1; bp 5419 drivers/net/ethernet/broadcom/bnx2.c bp->rx_copy_thresh = 0; bp 5422 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_use_size = rx_size; bp 5424 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_size = SKB_DATA_ALIGN(bp->rx_buf_use_size + BNX2_RX_ALIGN) + bp 5426 drivers/net/ethernet/broadcom/bnx2.c bp->rx_jumbo_thresh = rx_size - BNX2_RX_OFFSET; bp 5427 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ring_size = size; bp 5428 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_ring = bnx2_find_max_ring(size, BNX2_MAX_RX_RINGS); bp 5429 drivers/net/ethernet/broadcom/bnx2.c bp->rx_max_ring_idx = (bp->rx_max_ring * BNX2_RX_DESC_CNT) - 1; bp 5433 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_tx_skbs(struct bnx2 *bp) bp 5437 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_tx_rings; i++) { bp 5438 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 5455 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, bp 5466 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_page(&bp->pdev->dev, bp 5473 drivers/net/ethernet/broadcom/bnx2.c netdev_tx_reset_queue(netdev_get_tx_queue(bp->dev, i)); bp 5478 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_skbs(struct bnx2 *bp) bp 5482 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->num_rx_rings; i++) { bp 5483 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 5490 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_ring_idx; j++) { bp 5497 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, bp 5499 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_use_size, bp 5506 drivers/net/ethernet/broadcom/bnx2.c for (j = 0; j < bp->rx_max_pg_ring_idx; j++) bp 5507 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_page(bp, rxr, j); bp 5512 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(struct bnx2 *bp) bp 5514 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_tx_skbs(bp); bp 5515 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_rx_skbs(bp); bp 5519 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_nic(struct bnx2 *bp, u32 reset_code) bp 5523 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_reset_chip(bp, reset_code); bp 5524 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 5528 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_init_chip(bp)) != 0) bp 5531 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_all_rings(bp); bp 5536 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nic(struct bnx2 *bp, int reset_phy) bp 5540 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET)) != 0) bp 5543 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 5544 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_phy(bp, reset_phy); bp 5545 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_link(bp); bp 5546 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 5547 drivers/net/ethernet/broadcom/bnx2.c bnx2_remote_phy_event(bp); bp 5548 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 5553 drivers/net/ethernet/broadcom/bnx2.c bnx2_shutdown_chip(struct bnx2 *bp) bp 5557 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_NO_WOL) bp 5559 drivers/net/ethernet/broadcom/bnx2.c else if (bp->wol) bp 5564 drivers/net/ethernet/broadcom/bnx2.c return bnx2_reset_chip(bp, reset_code); bp 5568 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_registers(struct bnx2 *bp) bp 5689 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 5703 drivers/net/ethernet/broadcom/bnx2.c save_val = readl(bp->regview + offset); bp 5705 drivers/net/ethernet/broadcom/bnx2.c writel(0, bp->regview + offset); bp 5707 drivers/net/ethernet/broadcom/bnx2.c val = readl(bp->regview + offset); bp 5716 drivers/net/ethernet/broadcom/bnx2.c writel(0xffffffff, bp->regview + offset); bp 5718 drivers/net/ethernet/broadcom/bnx2.c val = readl(bp->regview + offset); bp 5727 drivers/net/ethernet/broadcom/bnx2.c writel(save_val, bp->regview + offset); bp 5731 drivers/net/ethernet/broadcom/bnx2.c writel(save_val, bp->regview + offset); bp 5739 drivers/net/ethernet/broadcom/bnx2.c bnx2_do_mem_test(struct bnx2 *bp, u32 start, u32 size) bp 5750 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_wr_ind(bp, start + offset, test_pattern[i]); bp 5752 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_reg_rd_ind(bp, start + offset) != bp 5762 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_memory(struct bnx2 *bp) bp 5788 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 5794 drivers/net/ethernet/broadcom/bnx2.c if ((ret = bnx2_do_mem_test(bp, mem_tbl[i].offset, bp 5807 drivers/net/ethernet/broadcom/bnx2.c bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) bp 5819 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[0], *tx_napi; bp 5828 drivers/net/ethernet/broadcom/bnx2.c bp->loopback = MAC_LOOPBACK; bp 5829 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_loopback(bp); bp 5832 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 5835 drivers/net/ethernet/broadcom/bnx2.c bp->loopback = PHY_LOOPBACK; bp 5836 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_phy_loopback(bp); bp 5841 drivers/net/ethernet/broadcom/bnx2.c pkt_size = min(bp->dev->mtu + ETH_HLEN, bp->rx_jumbo_thresh - 4); bp 5842 drivers/net/ethernet/broadcom/bnx2.c skb = netdev_alloc_skb(bp->dev, pkt_size); bp 5846 drivers/net/ethernet/broadcom/bnx2.c memcpy(packet, bp->dev->dev_addr, ETH_ALEN); bp 5851 drivers/net/ethernet/broadcom/bnx2.c map = dma_map_single(&bp->pdev->dev, skb->data, pkt_size, bp 5853 drivers/net/ethernet/broadcom/bnx2.c if (dma_mapping_error(&bp->pdev->dev, map)) { bp 5858 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp 5859 drivers/net/ethernet/broadcom/bnx2.c bp->hc_cmd | BNX2_HC_COMMAND_COAL_NOW_WO_INT); bp 5861 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_HC_COMMAND); bp 5879 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, txr->tx_bidx_addr, txr->tx_prod); bp 5880 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, txr->tx_bseq_addr, txr->tx_prod_bseq); bp 5884 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp 5885 drivers/net/ethernet/broadcom/bnx2.c bp->hc_cmd | BNX2_HC_COMMAND_COAL_NOW_WO_INT); bp 5887 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_HC_COMMAND); bp 5891 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, map, pkt_size, PCI_DMA_TODEVICE); bp 5908 drivers/net/ethernet/broadcom/bnx2.c dma_sync_single_for_cpu(&bp->pdev->dev, bp 5910 drivers/net/ethernet/broadcom/bnx2.c bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); bp 5935 drivers/net/ethernet/broadcom/bnx2.c bp->loopback = 0; bp 5945 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_loopback(struct bnx2 *bp) bp 5949 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 5952 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); bp 5953 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 5954 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_phy(bp, 1); bp 5955 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 5956 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_run_loopback(bp, BNX2_MAC_LOOPBACK)) bp 5958 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_run_loopback(bp, BNX2_PHY_LOOPBACK)) bp 5967 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_nvram(struct bnx2 *bp) bp 5974 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_nvram_read(bp, 0, data, 4)) != 0) bp 5983 drivers/net/ethernet/broadcom/bnx2.c if ((rc = bnx2_nvram_read(bp, 0x100, data, NVRAM_SIZE)) != 0) bp 6002 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_link(struct bnx2 *bp) bp 6006 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 6009 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) { bp 6010 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) bp 6014 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 6015 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_bmsr1(bp); bp 6016 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr1, &bmsr); bp 6017 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmsr1, &bmsr); bp 6018 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_bmsr1(bp); bp 6019 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 6028 drivers/net/ethernet/broadcom/bnx2.c bnx2_test_intr(struct bnx2 *bp) bp 6033 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 6036 drivers/net/ethernet/broadcom/bnx2.c status_idx = BNX2_RD(bp, BNX2_PCICFG_INT_ACK_CMD) & 0xffff; bp 6039 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd | BNX2_HC_COMMAND_COAL_NOW); bp 6040 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_HC_COMMAND); bp 6043 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_RD(bp, BNX2_PCICFG_INT_ACK_CMD) & 0xffff) != bp 6059 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706_serdes_has_link(struct bnx2 *bp) bp 6063 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_NO_PARALLEL) bp 6066 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_MISC_SHADOW, MISC_SHDW_MODE_CTL); bp 6067 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &mode_ctl); bp 6072 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_MISC_SHADOW, MISC_SHDW_AN_DBG); bp 6073 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &an_dbg); bp 6074 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &an_dbg); bp 6079 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_DSP_ADDRESS, MII_EXPAND_REG1); bp 6080 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &exp); bp 6081 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &exp); bp 6090 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706_serdes_timer(struct bnx2 *bp) bp 6094 drivers/net/ethernet/broadcom/bnx2.c spin_lock(&bp->phy_lock); bp 6095 drivers/net/ethernet/broadcom/bnx2.c if (bp->serdes_an_pending) { bp 6096 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending--; bp 6098 drivers/net/ethernet/broadcom/bnx2.c } else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) { bp 6101 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_TIMER_INTERVAL; bp 6103 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 6106 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_5706_serdes_has_link(bp)) { bp 6109 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr); bp 6110 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_PARALLEL_DETECT; bp 6114 drivers/net/ethernet/broadcom/bnx2.c else if ((bp->link_up) && (bp->autoneg & AUTONEG_SPEED) && bp 6115 drivers/net/ethernet/broadcom/bnx2.c (bp->phy_flags & BNX2_PHY_FLAG_PARALLEL_DETECT)) { bp 6118 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, 0x17, 0x0f01); bp 6119 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, 0x15, &phy2); bp 6123 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 6125 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr); bp 6127 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags &= ~BNX2_PHY_FLAG_PARALLEL_DETECT; bp 6130 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_TIMER_INTERVAL; bp 6135 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, MII_BNX2_MISC_SHADOW, MISC_SHDW_AN_DBG); bp 6136 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &val); bp 6137 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &val); bp 6139 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up && (val & MISC_SHDW_AN_DBG_NOSYNC)) { bp 6140 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_FORCED_DOWN)) { bp 6141 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706s_force_link_dn(bp, 1); bp 6142 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_FORCED_DOWN; bp 6144 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_link(bp); bp 6145 drivers/net/ethernet/broadcom/bnx2.c } else if (!bp->link_up && !(val & MISC_SHDW_AN_DBG_NOSYNC)) bp 6146 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_link(bp); bp 6148 drivers/net/ethernet/broadcom/bnx2.c spin_unlock(&bp->phy_lock); bp 6152 drivers/net/ethernet/broadcom/bnx2.c bnx2_5708_serdes_timer(struct bnx2 *bp) bp 6154 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 6157 drivers/net/ethernet/broadcom/bnx2.c if ((bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) == 0) { bp 6158 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending = 0; bp 6162 drivers/net/ethernet/broadcom/bnx2.c spin_lock(&bp->phy_lock); bp 6163 drivers/net/ethernet/broadcom/bnx2.c if (bp->serdes_an_pending) bp 6164 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending--; bp 6165 drivers/net/ethernet/broadcom/bnx2.c else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) { bp 6168 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 6170 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_forced_2g5(bp); bp 6171 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_SERDES_FORCED_TIMEOUT; bp 6173 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_forced_2g5(bp); bp 6174 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending = 2; bp 6175 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_TIMER_INTERVAL; bp 6179 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_TIMER_INTERVAL; bp 6181 drivers/net/ethernet/broadcom/bnx2.c spin_unlock(&bp->phy_lock); bp 6187 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = from_timer(bp, t, timer); bp 6189 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 6192 drivers/net/ethernet/broadcom/bnx2.c if (atomic_read(&bp->intr_sem) != 0) bp 6195 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & (BNX2_FLAG_USING_MSI | BNX2_FLAG_ONE_SHOT_MSI)) == bp 6197 drivers/net/ethernet/broadcom/bnx2.c bnx2_chk_missed_msi(bp); bp 6199 drivers/net/ethernet/broadcom/bnx2.c bnx2_send_heart_beat(bp); bp 6201 drivers/net/ethernet/broadcom/bnx2.c bp->stats_blk->stat_FwRxDrop = bp 6202 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, BNX2_FW_RX_DROP_COUNT); bp 6205 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_BROKEN_STATS) && bp->stats_ticks) bp 6206 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd | bp 6209 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 6210 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706) bp 6211 drivers/net/ethernet/broadcom/bnx2.c bnx2_5706_serdes_timer(bp); bp 6213 drivers/net/ethernet/broadcom/bnx2.c bnx2_5708_serdes_timer(bp); bp 6217 drivers/net/ethernet/broadcom/bnx2.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 6221 drivers/net/ethernet/broadcom/bnx2.c bnx2_request_irq(struct bnx2 *bp) bp 6227 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSI_OR_MSIX) bp 6232 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 6233 drivers/net/ethernet/broadcom/bnx2.c irq = &bp->irq_tbl[i]; bp 6235 drivers/net/ethernet/broadcom/bnx2.c &bp->bnx2_napi[i]); bp 6244 drivers/net/ethernet/broadcom/bnx2.c __bnx2_free_irq(struct bnx2 *bp) bp 6249 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 6250 drivers/net/ethernet/broadcom/bnx2.c irq = &bp->irq_tbl[i]; bp 6252 drivers/net/ethernet/broadcom/bnx2.c free_irq(irq->vector, &bp->bnx2_napi[i]); bp 6258 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_irq(struct bnx2 *bp) bp 6261 drivers/net/ethernet/broadcom/bnx2.c __bnx2_free_irq(bp); bp 6262 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSI) bp 6263 drivers/net/ethernet/broadcom/bnx2.c pci_disable_msi(bp->pdev); bp 6264 drivers/net/ethernet/broadcom/bnx2.c else if (bp->flags & BNX2_FLAG_USING_MSIX) bp 6265 drivers/net/ethernet/broadcom/bnx2.c pci_disable_msix(bp->pdev); bp 6267 drivers/net/ethernet/broadcom/bnx2.c bp->flags &= ~(BNX2_FLAG_USING_MSI_OR_MSIX | BNX2_FLAG_ONE_SHOT_MSI); bp 6271 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) bp 6275 drivers/net/ethernet/broadcom/bnx2.c struct net_device *dev = bp->dev; bp 6276 drivers/net/ethernet/broadcom/bnx2.c const int len = sizeof(bp->irq_tbl[0].name); bp 6278 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_msix_tbl(bp); bp 6279 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_MSIX_CONTROL, BNX2_MAX_MSIX_HW_VEC - 1); bp 6280 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_MSIX_TBL_OFF_BIR, BNX2_PCI_GRC_WINDOW2_BASE); bp 6281 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCI_MSIX_PBA_OFF_BIT, BNX2_PCI_GRC_WINDOW3_BASE); bp 6285 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_PCI_MSIX_CONTROL); bp 6296 drivers/net/ethernet/broadcom/bnx2.c total_vecs = pci_enable_msix_range(bp->pdev, msix_ent, bp 6305 drivers/net/ethernet/broadcom/bnx2.c bp->irq_nvecs = msix_vecs; bp 6306 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; bp 6308 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[i].vector = msix_ent[i].vector; bp 6309 drivers/net/ethernet/broadcom/bnx2.c snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); bp 6310 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[i].handler = bnx2_msi_1shot; bp 6315 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi) bp 6320 drivers/net/ethernet/broadcom/bnx2.c if (!bp->num_req_rx_rings) bp 6321 drivers/net/ethernet/broadcom/bnx2.c msix_vecs = max(cpus + 1, bp->num_req_tx_rings); bp 6322 drivers/net/ethernet/broadcom/bnx2.c else if (!bp->num_req_tx_rings) bp 6323 drivers/net/ethernet/broadcom/bnx2.c msix_vecs = max(cpus, bp->num_req_rx_rings); bp 6325 drivers/net/ethernet/broadcom/bnx2.c msix_vecs = max(bp->num_req_rx_rings, bp->num_req_tx_rings); bp 6329 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[0].handler = bnx2_interrupt; bp 6330 drivers/net/ethernet/broadcom/bnx2.c strcpy(bp->irq_tbl[0].name, bp->dev->name); bp 6331 drivers/net/ethernet/broadcom/bnx2.c bp->irq_nvecs = 1; bp 6332 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[0].vector = bp->pdev->irq; bp 6334 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_MSIX_CAP) && !dis_msi) bp 6335 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_msix(bp, msix_vecs); bp 6337 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_MSI_CAP) && !dis_msi && bp 6338 drivers/net/ethernet/broadcom/bnx2.c !(bp->flags & BNX2_FLAG_USING_MSIX)) { bp 6339 drivers/net/ethernet/broadcom/bnx2.c if (pci_enable_msi(bp->pdev) == 0) { bp 6340 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_USING_MSI; bp 6341 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 6342 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_ONE_SHOT_MSI; bp 6343 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[0].handler = bnx2_msi_1shot; bp 6345 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[0].handler = bnx2_msi; bp 6347 drivers/net/ethernet/broadcom/bnx2.c bp->irq_tbl[0].vector = bp->pdev->irq; bp 6351 drivers/net/ethernet/broadcom/bnx2.c if (!bp->num_req_tx_rings) bp 6352 drivers/net/ethernet/broadcom/bnx2.c bp->num_tx_rings = rounddown_pow_of_two(bp->irq_nvecs); bp 6354 drivers/net/ethernet/broadcom/bnx2.c bp->num_tx_rings = min(bp->irq_nvecs, bp->num_req_tx_rings); bp 6356 drivers/net/ethernet/broadcom/bnx2.c if (!bp->num_req_rx_rings) bp 6357 drivers/net/ethernet/broadcom/bnx2.c bp->num_rx_rings = bp->irq_nvecs; bp 6359 drivers/net/ethernet/broadcom/bnx2.c bp->num_rx_rings = min(bp->irq_nvecs, bp->num_req_rx_rings); bp 6361 drivers/net/ethernet/broadcom/bnx2.c netif_set_real_num_tx_queues(bp->dev, bp->num_tx_rings); bp 6363 drivers/net/ethernet/broadcom/bnx2.c return netif_set_real_num_rx_queues(bp->dev, bp->num_rx_rings); bp 6370 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6373 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_request_firmware(bp); bp 6379 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int(bp); bp 6381 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_setup_int_mode(bp, disable_msi); bp 6384 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_napi(bp); bp 6385 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(bp); bp 6386 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_alloc_mem(bp); bp 6390 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_request_irq(bp); bp 6394 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_nic(bp, 1); bp 6398 drivers/net/ethernet/broadcom/bnx2.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 6400 drivers/net/ethernet/broadcom/bnx2.c atomic_set(&bp->intr_sem, 0); bp 6402 drivers/net/ethernet/broadcom/bnx2.c memset(bp->temp_stats_blk, 0, sizeof(struct statistics_block)); bp 6404 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_int(bp); bp 6406 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSI) { bp 6410 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_intr(bp) != 0) { bp 6411 drivers/net/ethernet/broadcom/bnx2.c netdev_warn(bp->dev, "No interrupt was generated using MSI, switching to INTx mode. Please report this failure to the PCI maintainer and include system chipset information.\n"); bp 6413 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int(bp); bp 6414 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_irq(bp); bp 6416 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_int_mode(bp, 1); bp 6418 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_nic(bp, 0); bp 6421 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_request_irq(bp); bp 6424 drivers/net/ethernet/broadcom/bnx2.c del_timer_sync(&bp->timer); bp 6427 drivers/net/ethernet/broadcom/bnx2.c bnx2_enable_int(bp); bp 6430 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSI) bp 6432 drivers/net/ethernet/broadcom/bnx2.c else if (bp->flags & BNX2_FLAG_USING_MSIX) bp 6440 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_disable(bp); bp 6441 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 6442 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_irq(bp); bp 6443 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_mem(bp); bp 6444 drivers/net/ethernet/broadcom/bnx2.c bnx2_del_napi(bp); bp 6445 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_firmware(bp); bp 6452 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = container_of(work, struct bnx2, reset_task); bp 6457 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) { bp 6462 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 6464 drivers/net/ethernet/broadcom/bnx2.c pci_read_config_word(bp->pdev, PCI_COMMAND, &pcicmd); bp 6467 drivers/net/ethernet/broadcom/bnx2.c pci_restore_state(bp->pdev); bp 6468 drivers/net/ethernet/broadcom/bnx2.c pci_save_state(bp->pdev); bp 6470 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_nic(bp, 1); bp 6472 drivers/net/ethernet/broadcom/bnx2.c netdev_err(bp->dev, "failed to reset NIC, closing\n"); bp 6473 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(bp); bp 6474 drivers/net/ethernet/broadcom/bnx2.c dev_close(bp->dev); bp 6479 drivers/net/ethernet/broadcom/bnx2.c atomic_set(&bp->intr_sem, 1); bp 6480 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 6487 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_ftq(struct bnx2 *bp) bp 6491 drivers/net/ethernet/broadcom/bnx2.c struct net_device *dev = bp->dev; bp 6515 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, ftq_arr[i].off)); bp 6520 drivers/net/ethernet/broadcom/bnx2.c reg, bnx2_reg_rd_ind(bp, reg), bp 6521 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, reg + 4), bp 6522 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, reg + 8), bp 6523 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, reg + 0x1c), bp 6524 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, reg + 0x1c), bp 6525 drivers/net/ethernet/broadcom/bnx2.c bnx2_reg_rd_ind(bp, reg + 0x20)); bp 6530 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_TBDC_STATUS) & BNX2_TBDC_STATUS_FREE_CNT); bp 6535 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TBDC_BD_ADDR, i); bp 6536 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TBDC_CAM_OPCODE, bp 6538 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_TBDC_COMMAND, BNX2_TBDC_COMMAND_CMD_REG_ARB); bp 6539 drivers/net/ethernet/broadcom/bnx2.c while ((BNX2_RD(bp, BNX2_TBDC_COMMAND) & bp 6543 drivers/net/ethernet/broadcom/bnx2.c cid = BNX2_RD(bp, BNX2_TBDC_CID); bp 6544 drivers/net/ethernet/broadcom/bnx2.c bdidx = BNX2_RD(bp, BNX2_TBDC_BIDX); bp 6545 drivers/net/ethernet/broadcom/bnx2.c valid = BNX2_RD(bp, BNX2_TBDC_CAM_OPCODE); bp 6554 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_state(struct bnx2 *bp) bp 6556 drivers/net/ethernet/broadcom/bnx2.c struct net_device *dev = bp->dev; bp 6559 drivers/net/ethernet/broadcom/bnx2.c pci_read_config_dword(bp->pdev, PCI_COMMAND, &val1); bp 6561 drivers/net/ethernet/broadcom/bnx2.c atomic_read(&bp->intr_sem), val1); bp 6562 drivers/net/ethernet/broadcom/bnx2.c pci_read_config_dword(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &val1); bp 6563 drivers/net/ethernet/broadcom/bnx2.c pci_read_config_dword(bp->pdev, BNX2_PCICFG_MISC_CONFIG, &val2); bp 6566 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_TX_STATUS), bp 6567 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_EMAC_RX_STATUS)); bp 6569 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_RPM_MGMT_PKT_CTRL)); bp 6571 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_HC_STATS_INTERRUPT_STATUS)); bp 6572 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_USING_MSIX) bp 6574 drivers/net/ethernet/broadcom/bnx2.c BNX2_RD(bp, BNX2_PCI_GRC_WINDOW3_BASE)); bp 6580 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6582 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_ftq(bp); bp 6583 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_state(bp); bp 6584 drivers/net/ethernet/broadcom/bnx2.c bnx2_dump_mcp_state(bp); bp 6587 drivers/net/ethernet/broadcom/bnx2.c schedule_work(&bp->reset_task); bp 6597 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6610 drivers/net/ethernet/broadcom/bnx2.c bnapi = &bp->bnx2_napi[i]; bp 6614 drivers/net/ethernet/broadcom/bnx2.c if (unlikely(bnx2_tx_avail(bp, txr) < bp 6669 drivers/net/ethernet/broadcom/bnx2.c mapping = dma_map_single(&bp->pdev->dev, skb->data, len, PCI_DMA_TODEVICE); bp 6670 drivers/net/ethernet/broadcom/bnx2.c if (dma_mapping_error(&bp->pdev->dev, mapping)) { bp 6698 drivers/net/ethernet/broadcom/bnx2.c mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len, bp 6700 drivers/net/ethernet/broadcom/bnx2.c if (dma_mapping_error(&bp->pdev->dev, mapping)) bp 6721 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR16(bp, txr->tx_bidx_addr, prod); bp 6722 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, txr->tx_bseq_addr, txr->tx_prod_bseq); bp 6726 drivers/net/ethernet/broadcom/bnx2.c if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { bp 6735 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_tx_avail(bp, txr) > bp->tx_wake_thresh) bp 6749 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_single(&bp->pdev->dev, dma_unmap_addr(tx_buf, mapping), bp 6757 drivers/net/ethernet/broadcom/bnx2.c dma_unmap_page(&bp->pdev->dev, dma_unmap_addr(tx_buf, mapping), bp 6770 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6772 drivers/net/ethernet/broadcom/bnx2.c bnx2_disable_int_sync(bp); bp 6773 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_disable(bp); bp 6775 drivers/net/ethernet/broadcom/bnx2.c del_timer_sync(&bp->timer); bp 6776 drivers/net/ethernet/broadcom/bnx2.c bnx2_shutdown_chip(bp); bp 6777 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_irq(bp); bp 6778 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 6779 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_mem(bp); bp 6780 drivers/net/ethernet/broadcom/bnx2.c bnx2_del_napi(bp); bp 6781 drivers/net/ethernet/broadcom/bnx2.c bp->link_up = 0; bp 6782 drivers/net/ethernet/broadcom/bnx2.c netif_carrier_off(bp->dev); bp 6787 drivers/net/ethernet/broadcom/bnx2.c bnx2_save_stats(struct bnx2 *bp) bp 6789 drivers/net/ethernet/broadcom/bnx2.c u32 *hw_stats = (u32 *) bp->stats_blk; bp 6790 drivers/net/ethernet/broadcom/bnx2.c u32 *temp_stats = (u32 *) bp->temp_stats_blk; bp 6814 drivers/net/ethernet/broadcom/bnx2.c GET_64BIT_NET_STATS64(bp->stats_blk->ctr) + \ bp 6815 drivers/net/ethernet/broadcom/bnx2.c GET_64BIT_NET_STATS64(bp->temp_stats_blk->ctr) bp 6818 drivers/net/ethernet/broadcom/bnx2.c (unsigned long) (bp->stats_blk->ctr + \ bp 6819 drivers/net/ethernet/broadcom/bnx2.c bp->temp_stats_blk->ctr) bp 6824 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6826 drivers/net/ethernet/broadcom/bnx2.c if (!bp->stats_blk) bp 6873 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP(bp) == BNX2_CHIP_5706) || bp 6874 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_A0)) bp 6899 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6904 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) { bp 6907 drivers/net/ethernet/broadcom/bnx2.c } else if (bp->phy_port == PORT_FIBRE) bp 6915 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE) bp 6927 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 6928 drivers/net/ethernet/broadcom/bnx2.c cmd->base.port = bp->phy_port; bp 6929 drivers/net/ethernet/broadcom/bnx2.c advertising = bp->advertising; bp 6931 drivers/net/ethernet/broadcom/bnx2.c if (bp->autoneg & AUTONEG_SPEED) { bp 6938 drivers/net/ethernet/broadcom/bnx2.c cmd->base.speed = bp->line_speed; bp 6939 drivers/net/ethernet/broadcom/bnx2.c cmd->base.duplex = bp->duplex; bp 6940 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->phy_flags & BNX2_PHY_FLAG_SERDES)) { bp 6941 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_MDIX) bp 6951 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 6953 drivers/net/ethernet/broadcom/bnx2.c cmd->base.phy_address = bp->phy_addr; bp 6967 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 6968 drivers/net/ethernet/broadcom/bnx2.c u8 autoneg = bp->autoneg; bp 6969 drivers/net/ethernet/broadcom/bnx2.c u8 req_duplex = bp->req_duplex; bp 6970 drivers/net/ethernet/broadcom/bnx2.c u16 req_line_speed = bp->req_line_speed; bp 6971 drivers/net/ethernet/broadcom/bnx2.c u32 advertising = bp->advertising; bp 6974 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 6979 drivers/net/ethernet/broadcom/bnx2.c if (cmd->base.port != bp->phy_port && bp 6980 drivers/net/ethernet/broadcom/bnx2.c !(bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP)) bp 6986 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(dev) && cmd->base.port != bp->phy_port) bp 7016 drivers/net/ethernet/broadcom/bnx2.c !(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE)) bp 7027 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg = autoneg; bp 7028 drivers/net/ethernet/broadcom/bnx2.c bp->advertising = advertising; bp 7029 drivers/net/ethernet/broadcom/bnx2.c bp->req_line_speed = req_line_speed; bp 7030 drivers/net/ethernet/broadcom/bnx2.c bp->req_duplex = req_duplex; bp 7037 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_setup_phy(bp, cmd->base.port); bp 7040 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7048 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7052 drivers/net/ethernet/broadcom/bnx2.c strlcpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info)); bp 7053 drivers/net/ethernet/broadcom/bnx2.c strlcpy(info->fw_version, bp->fw_version, sizeof(info->fw_version)); bp 7069 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7099 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 7106 drivers/net/ethernet/broadcom/bnx2.c *p++ = BNX2_RD(bp, offset); bp 7119 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7121 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_NO_WOL) { bp 7127 drivers/net/ethernet/broadcom/bnx2.c if (bp->wol) bp 7138 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7144 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_NO_WOL) bp 7147 drivers/net/ethernet/broadcom/bnx2.c bp->wol = 1; bp 7150 drivers/net/ethernet/broadcom/bnx2.c bp->wol = 0; bp 7153 drivers/net/ethernet/broadcom/bnx2.c device_set_wakeup_enable(&bp->pdev->dev, bp->wol); bp 7161 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7167 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->autoneg & AUTONEG_SPEED)) { bp 7171 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 7173 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) { bp 7176 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_setup_remote_phy(bp, bp->phy_port); bp 7177 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7182 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 7183 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, BMCR_LOOPBACK); bp 7184 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7188 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 7190 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_SERDES_AN_TIMEOUT; bp 7191 drivers/net/ethernet/broadcom/bnx2.c bp->serdes_an_pending = 1; bp 7192 drivers/net/ethernet/broadcom/bnx2.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 7195 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); bp 7197 drivers/net/ethernet/broadcom/bnx2.c bnx2_write_phy(bp, bp->mii_bmcr, bmcr | BMCR_ANRESTART | BMCR_ANENABLE); bp 7199 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7207 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7209 drivers/net/ethernet/broadcom/bnx2.c return bp->link_up; bp 7215 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7217 drivers/net/ethernet/broadcom/bnx2.c if (!bp->flash_info) bp 7220 drivers/net/ethernet/broadcom/bnx2.c return (int) bp->flash_size; bp 7227 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7232 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read(bp, eeprom->offset, eebuf, eeprom->len); bp 7241 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7246 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_write(bp, eeprom->offset, eebuf, eeprom->len); bp 7254 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7258 drivers/net/ethernet/broadcom/bnx2.c coal->rx_coalesce_usecs = bp->rx_ticks; bp 7259 drivers/net/ethernet/broadcom/bnx2.c coal->rx_max_coalesced_frames = bp->rx_quick_cons_trip; bp 7260 drivers/net/ethernet/broadcom/bnx2.c coal->rx_coalesce_usecs_irq = bp->rx_ticks_int; bp 7261 drivers/net/ethernet/broadcom/bnx2.c coal->rx_max_coalesced_frames_irq = bp->rx_quick_cons_trip_int; bp 7263 drivers/net/ethernet/broadcom/bnx2.c coal->tx_coalesce_usecs = bp->tx_ticks; bp 7264 drivers/net/ethernet/broadcom/bnx2.c coal->tx_max_coalesced_frames = bp->tx_quick_cons_trip; bp 7265 drivers/net/ethernet/broadcom/bnx2.c coal->tx_coalesce_usecs_irq = bp->tx_ticks_int; bp 7266 drivers/net/ethernet/broadcom/bnx2.c coal->tx_max_coalesced_frames_irq = bp->tx_quick_cons_trip_int; bp 7268 drivers/net/ethernet/broadcom/bnx2.c coal->stats_block_coalesce_usecs = bp->stats_ticks; bp 7276 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7278 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ticks = (u16) coal->rx_coalesce_usecs; bp 7279 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_ticks > 0x3ff) bp->rx_ticks = 0x3ff; bp 7281 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip = (u16) coal->rx_max_coalesced_frames; bp 7282 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_quick_cons_trip > 0xff) bp->rx_quick_cons_trip = 0xff; bp 7284 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ticks_int = (u16) coal->rx_coalesce_usecs_irq; bp 7285 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_ticks_int > 0x3ff) bp->rx_ticks_int = 0x3ff; bp 7287 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip_int = (u16) coal->rx_max_coalesced_frames_irq; bp 7288 drivers/net/ethernet/broadcom/bnx2.c if (bp->rx_quick_cons_trip_int > 0xff) bp 7289 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip_int = 0xff; bp 7291 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ticks = (u16) coal->tx_coalesce_usecs; bp 7292 drivers/net/ethernet/broadcom/bnx2.c if (bp->tx_ticks > 0x3ff) bp->tx_ticks = 0x3ff; bp 7294 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip = (u16) coal->tx_max_coalesced_frames; bp 7295 drivers/net/ethernet/broadcom/bnx2.c if (bp->tx_quick_cons_trip > 0xff) bp->tx_quick_cons_trip = 0xff; bp 7297 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ticks_int = (u16) coal->tx_coalesce_usecs_irq; bp 7298 drivers/net/ethernet/broadcom/bnx2.c if (bp->tx_ticks_int > 0x3ff) bp->tx_ticks_int = 0x3ff; bp 7300 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip_int = (u16) coal->tx_max_coalesced_frames_irq; bp 7301 drivers/net/ethernet/broadcom/bnx2.c if (bp->tx_quick_cons_trip_int > 0xff) bp->tx_quick_cons_trip_int = bp 7304 drivers/net/ethernet/broadcom/bnx2.c bp->stats_ticks = coal->stats_block_coalesce_usecs; bp 7305 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_BROKEN_STATS) { bp 7306 drivers/net/ethernet/broadcom/bnx2.c if (bp->stats_ticks != 0 && bp->stats_ticks != USEC_PER_SEC) bp 7307 drivers/net/ethernet/broadcom/bnx2.c bp->stats_ticks = USEC_PER_SEC; bp 7309 drivers/net/ethernet/broadcom/bnx2.c if (bp->stats_ticks > BNX2_HC_STATS_TICKS_HC_STAT_TICKS) bp 7310 drivers/net/ethernet/broadcom/bnx2.c bp->stats_ticks = BNX2_HC_STATS_TICKS_HC_STAT_TICKS; bp 7311 drivers/net/ethernet/broadcom/bnx2.c bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS; bp 7313 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev)) { bp 7314 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 7315 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nic(bp, 0); bp 7316 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 7325 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7330 drivers/net/ethernet/broadcom/bnx2.c ering->rx_pending = bp->rx_ring_size; bp 7331 drivers/net/ethernet/broadcom/bnx2.c ering->rx_jumbo_pending = bp->rx_pg_ring_size; bp 7334 drivers/net/ethernet/broadcom/bnx2.c ering->tx_pending = bp->tx_ring_size; bp 7338 drivers/net/ethernet/broadcom/bnx2.c bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx, bool reset_irq) bp 7340 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev)) { bp 7342 drivers/net/ethernet/broadcom/bnx2.c bnx2_save_stats(bp); bp 7344 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 7345 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); bp 7347 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_irq(bp); bp 7348 drivers/net/ethernet/broadcom/bnx2.c bnx2_del_napi(bp); bp 7350 drivers/net/ethernet/broadcom/bnx2.c __bnx2_free_irq(bp); bp 7352 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 7353 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_mem(bp); bp 7356 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_rx_ring_size(bp, rx); bp 7357 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ring_size = tx; bp 7359 drivers/net/ethernet/broadcom/bnx2.c if (netif_running(bp->dev)) { bp 7363 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_setup_int_mode(bp, disable_msi); bp 7364 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_napi(bp); bp 7368 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_alloc_mem(bp); bp 7371 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_request_irq(bp); bp 7374 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_init_nic(bp, 0); bp 7377 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(bp); bp 7378 drivers/net/ethernet/broadcom/bnx2.c dev_close(bp->dev); bp 7382 drivers/net/ethernet/broadcom/bnx2.c mutex_lock(&bp->cnic_lock); bp 7384 drivers/net/ethernet/broadcom/bnx2.c if (bp->cnic_eth_dev.drv_state & CNIC_DRV_STATE_REGD) bp 7385 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_cnic_irq_info(bp); bp 7386 drivers/net/ethernet/broadcom/bnx2.c mutex_unlock(&bp->cnic_lock); bp 7388 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 7396 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7405 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_change_ring_size(bp, ering->rx_pending, ering->tx_pending, bp 7413 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7415 drivers/net/ethernet/broadcom/bnx2.c epause->autoneg = ((bp->autoneg & AUTONEG_FLOW_CTRL) != 0); bp 7416 drivers/net/ethernet/broadcom/bnx2.c epause->rx_pause = ((bp->flow_ctrl & FLOW_CTRL_RX) != 0); bp 7417 drivers/net/ethernet/broadcom/bnx2.c epause->tx_pause = ((bp->flow_ctrl & FLOW_CTRL_TX) != 0); bp 7423 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7425 drivers/net/ethernet/broadcom/bnx2.c bp->req_flow_ctrl = 0; bp 7427 drivers/net/ethernet/broadcom/bnx2.c bp->req_flow_ctrl |= FLOW_CTRL_RX; bp 7429 drivers/net/ethernet/broadcom/bnx2.c bp->req_flow_ctrl |= FLOW_CTRL_TX; bp 7432 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg |= AUTONEG_FLOW_CTRL; bp 7435 drivers/net/ethernet/broadcom/bnx2.c bp->autoneg &= ~AUTONEG_FLOW_CTRL; bp 7439 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 7440 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_phy(bp, bp->phy_port); bp 7441 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7601 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7607 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 7608 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG); bp 7609 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 7611 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_registers(bp) != 0) { bp 7615 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_memory(bp) != 0) { bp 7619 drivers/net/ethernet/broadcom/bnx2.c if ((buf[2] = bnx2_test_loopback(bp)) != 0) bp 7622 drivers/net/ethernet/broadcom/bnx2.c if (!netif_running(bp->dev)) bp 7623 drivers/net/ethernet/broadcom/bnx2.c bnx2_shutdown_chip(bp); bp 7625 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nic(bp, 1); bp 7626 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 7631 drivers/net/ethernet/broadcom/bnx2.c if (bp->link_up) bp 7637 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_nvram(bp) != 0) { bp 7641 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_intr(bp) != 0) { bp 7646 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_test_link(bp) != 0) { bp 7672 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7674 drivers/net/ethernet/broadcom/bnx2.c u32 *hw_stats = (u32 *) bp->stats_blk; bp 7675 drivers/net/ethernet/broadcom/bnx2.c u32 *temp_stats = (u32 *) bp->temp_stats_blk; bp 7683 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) || bp 7684 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1) || bp 7685 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A2) || bp 7686 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_A0)) bp 7718 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7722 drivers/net/ethernet/broadcom/bnx2.c bp->leds_save = BNX2_RD(bp, BNX2_MISC_CFG); bp 7723 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_CFG, BNX2_MISC_CFG_LEDMODE_MAC); bp 7727 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_LED, BNX2_EMAC_LED_OVERRIDE | bp 7736 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_LED, BNX2_EMAC_LED_OVERRIDE); bp 7740 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_EMAC_LED, 0); bp 7741 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_MISC_CFG, bp->leds_save); bp 7751 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7760 drivers/net/ethernet/broadcom/bnx2.c !!(bp->rx_mode & BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG)) && bp 7762 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, false); bp 7765 drivers/net/ethernet/broadcom/bnx2.c bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1); bp 7766 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, false); bp 7776 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7780 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_MSIX_CAP) && !disable_msi) { bp 7789 drivers/net/ethernet/broadcom/bnx2.c channels->rx_count = bp->num_rx_rings; bp 7790 drivers/net/ethernet/broadcom/bnx2.c channels->tx_count = bp->num_tx_rings; bp 7798 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7803 drivers/net/ethernet/broadcom/bnx2.c if ((bp->flags & BNX2_FLAG_MSIX_CAP) && !disable_msi) { bp 7811 drivers/net/ethernet/broadcom/bnx2.c bp->num_req_rx_rings = channels->rx_count; bp 7812 drivers/net/ethernet/broadcom/bnx2.c bp->num_req_tx_rings = channels->tx_count; bp 7815 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_change_ring_size(bp, bp->rx_ring_size, bp 7816 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ring_size, true); bp 7854 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7859 drivers/net/ethernet/broadcom/bnx2.c data->phy_id = bp->phy_addr; bp 7865 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 7871 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 7872 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_read_phy(bp, data->reg_num & 0x1f, &mii_regval); bp 7873 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7881 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) bp 7887 drivers/net/ethernet/broadcom/bnx2.c spin_lock_bh(&bp->phy_lock); bp 7888 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_write_phy(bp, data->reg_num & 0x1f, data->val_in); bp 7889 drivers/net/ethernet/broadcom/bnx2.c spin_unlock_bh(&bp->phy_lock); bp 7905 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7912 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_mac_addr(bp, bp->dev->dev_addr, 0); bp 7921 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7924 drivers/net/ethernet/broadcom/bnx2.c return bnx2_change_ring_size(bp, bp->rx_ring_size, bp->tx_ring_size, bp 7932 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 7935 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 7936 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_irq *irq = &bp->irq_tbl[i]; bp 7939 drivers/net/ethernet/broadcom/bnx2.c irq->handler(irq->vector, &bp->bnx2_napi[i]); bp 7946 drivers/net/ethernet/broadcom/bnx2.c bnx2_get_5709_media(struct bnx2 *bp) bp 7948 drivers/net/ethernet/broadcom/bnx2.c u32 val = BNX2_RD(bp, BNX2_MISC_DUAL_MEDIA_CTRL); bp 7955 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_SERDES; bp 7964 drivers/net/ethernet/broadcom/bnx2.c if (bp->func == 0) { bp 7969 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_SERDES; bp 7977 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_SERDES; bp 7984 drivers/net/ethernet/broadcom/bnx2.c bnx2_get_pci_speed(struct bnx2 *bp) bp 7988 drivers/net/ethernet/broadcom/bnx2.c reg = BNX2_RD(bp, BNX2_PCICFG_MISC_STATUS); bp 7992 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_PCIX; bp 7994 drivers/net/ethernet/broadcom/bnx2.c clkreg = BNX2_RD(bp, BNX2_PCICFG_PCI_CLOCK_CONTROL_BITS); bp 7999 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 133; bp 8003 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 100; bp 8008 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 66; bp 8013 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 50; bp 8019 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 33; bp 8025 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 66; bp 8027 drivers/net/ethernet/broadcom/bnx2.c bp->bus_speed_mhz = 33; bp 8031 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_PCI_32BIT; bp 8036 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_vpd_fw_ver(struct bnx2 *bp) bp 8050 drivers/net/ethernet/broadcom/bnx2.c rc = bnx2_nvram_read(bp, BNX2_VPD_NVRAM_OFFSET, data + BNX2_VPD_LEN, bp 8096 drivers/net/ethernet/broadcom/bnx2.c memcpy(bp->fw_version, &data[j], len); bp 8097 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[len] = ' '; bp 8106 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp; bp 8113 drivers/net/ethernet/broadcom/bnx2.c bp = netdev_priv(dev); bp 8115 drivers/net/ethernet/broadcom/bnx2.c bp->flags = 0; bp 8116 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags = 0; bp 8118 drivers/net/ethernet/broadcom/bnx2.c bp->temp_stats_blk = bp 8121 drivers/net/ethernet/broadcom/bnx2.c if (!bp->temp_stats_blk) { bp 8148 drivers/net/ethernet/broadcom/bnx2.c bp->pm_cap = pdev->pm_cap; bp 8149 drivers/net/ethernet/broadcom/bnx2.c if (bp->pm_cap == 0) { bp 8156 drivers/net/ethernet/broadcom/bnx2.c bp->dev = dev; bp 8157 drivers/net/ethernet/broadcom/bnx2.c bp->pdev = pdev; bp 8159 drivers/net/ethernet/broadcom/bnx2.c spin_lock_init(&bp->phy_lock); bp 8160 drivers/net/ethernet/broadcom/bnx2.c spin_lock_init(&bp->indirect_lock); bp 8162 drivers/net/ethernet/broadcom/bnx2.c mutex_init(&bp->cnic_lock); bp 8164 drivers/net/ethernet/broadcom/bnx2.c INIT_WORK(&bp->reset_task, bnx2_reset_task); bp 8166 drivers/net/ethernet/broadcom/bnx2.c bp->regview = pci_iomap(pdev, 0, MB_GET_CID_ADDR(TX_TSS_CID + bp 8168 drivers/net/ethernet/broadcom/bnx2.c if (!bp->regview) { bp 8178 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, BNX2_PCICFG_MISC_CONFIG, bp 8182 drivers/net/ethernet/broadcom/bnx2.c bp->chip_id = BNX2_RD(bp, BNX2_MISC_ID); bp 8184 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) { bp 8190 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_PCIE; bp 8191 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_REV(bp) == BNX2_CHIP_REV_Ax) bp 8192 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_JUMBO_BROKEN; bp 8197 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_AER_ENABLED; bp 8200 drivers/net/ethernet/broadcom/bnx2.c bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX); bp 8201 drivers/net/ethernet/broadcom/bnx2.c if (bp->pcix_cap == 0) { bp 8207 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_BROKEN_STATS; bp 8210 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709 && bp 8211 drivers/net/ethernet/broadcom/bnx2.c BNX2_CHIP_REV(bp) != BNX2_CHIP_REV_Ax) { bp 8213 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_MSIX_CAP; bp 8216 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) != BNX2_CHIP_ID_5706_A0 && bp 8217 drivers/net/ethernet/broadcom/bnx2.c BNX2_CHIP_ID(bp) != BNX2_CHIP_ID_5706_A1) { bp 8219 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_MSI_CAP; bp 8223 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5708) bp 8242 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_PCIE)) bp 8243 drivers/net/ethernet/broadcom/bnx2.c bnx2_get_pci_speed(bp); bp 8246 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) { bp 8247 drivers/net/ethernet/broadcom/bnx2.c reg = BNX2_RD(bp, PCI_COMMAND); bp 8249 drivers/net/ethernet/broadcom/bnx2.c BNX2_WR(bp, PCI_COMMAND, reg); bp 8250 drivers/net/ethernet/broadcom/bnx2.c } else if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A1) && bp 8251 drivers/net/ethernet/broadcom/bnx2.c !(bp->flags & BNX2_FLAG_PCIX)) { bp 8258 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nvram(bp); bp 8260 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_reg_rd_ind(bp, BNX2_SHM_HDR_SIGNATURE); bp 8262 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_reg_rd_ind(bp, BNX2_MCP_TOE_ID) & BNX2_MCP_TOE_ID_FUNCTION_ID) bp 8263 drivers/net/ethernet/broadcom/bnx2.c bp->func = 1; bp 8267 drivers/net/ethernet/broadcom/bnx2.c u32 off = bp->func << 2; bp 8269 drivers/net/ethernet/broadcom/bnx2.c bp->shmem_base = bnx2_reg_rd_ind(bp, BNX2_SHM_HDR_ADDR_0 + off); bp 8271 drivers/net/ethernet/broadcom/bnx2.c bp->shmem_base = HOST_VIEW_SHMEM_BASE; bp 8276 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_DEV_INFO_SIGNATURE); bp 8285 drivers/net/ethernet/broadcom/bnx2.c bnx2_read_vpd_fw_ver(bp); bp 8287 drivers/net/ethernet/broadcom/bnx2.c j = strlen(bp->fw_version); bp 8288 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_DEV_INFO_BC_REV); bp 8293 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = 'b'; bp 8294 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = 'c'; bp 8295 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = ' '; bp 8300 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = (num / k) + '0'; bp 8305 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = '.'; bp 8307 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_PORT_FEATURE); bp 8309 drivers/net/ethernet/broadcom/bnx2.c bp->wol = 1; bp 8312 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_ASF_ENABLE; bp 8315 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_BC_STATE_CONDITION); bp 8321 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_BC_STATE_CONDITION); bp 8325 drivers/net/ethernet/broadcom/bnx2.c u32 addr = bnx2_shmem_rd(bp, BNX2_MFW_VER_PTR); bp 8328 drivers/net/ethernet/broadcom/bnx2.c bp->fw_version[j++] = ' '; bp 8330 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_reg_rd_ind(bp, addr + i * 4); bp 8332 drivers/net/ethernet/broadcom/bnx2.c memcpy(&bp->fw_version[j], ®, 4); bp 8337 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_PORT_HW_CFG_MAC_UPPER); bp 8338 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[0] = (u8) (reg >> 8); bp 8339 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[1] = (u8) reg; bp 8341 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_PORT_HW_CFG_MAC_LOWER); bp 8342 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[2] = (u8) (reg >> 24); bp 8343 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[3] = (u8) (reg >> 16); bp 8344 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[4] = (u8) (reg >> 8); bp 8345 drivers/net/ethernet/broadcom/bnx2.c bp->mac_addr[5] = (u8) reg; bp 8347 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ring_size = BNX2_MAX_TX_DESC_CNT; bp 8348 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_rx_ring_size(bp, 255); bp 8350 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip_int = 2; bp 8351 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip = 20; bp 8352 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ticks_int = 18; bp 8353 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ticks = 80; bp 8355 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip_int = 2; bp 8356 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip = 12; bp 8357 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ticks_int = 18; bp 8358 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ticks = 18; bp 8360 drivers/net/ethernet/broadcom/bnx2.c bp->stats_ticks = USEC_PER_SEC & BNX2_HC_STATS_TICKS_HC_STAT_TICKS; bp 8362 drivers/net/ethernet/broadcom/bnx2.c bp->current_interval = BNX2_TIMER_INTERVAL; bp 8364 drivers/net/ethernet/broadcom/bnx2.c bp->phy_addr = 1; bp 8372 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 8373 drivers/net/ethernet/broadcom/bnx2.c bnx2_get_5709_media(bp); bp 8374 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP_BOND(bp) & BNX2_CHIP_BOND_SERDES_BIT) bp 8375 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_SERDES; bp 8377 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_TP; bp 8378 drivers/net/ethernet/broadcom/bnx2.c if (bp->phy_flags & BNX2_PHY_FLAG_SERDES) { bp 8379 drivers/net/ethernet/broadcom/bnx2.c bp->phy_port = PORT_FIBRE; bp 8380 drivers/net/ethernet/broadcom/bnx2.c reg = bnx2_shmem_rd(bp, BNX2_SHARED_HW_CFG_CONFIG); bp 8382 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_NO_WOL; bp 8383 drivers/net/ethernet/broadcom/bnx2.c bp->wol = 0; bp 8385 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706) { bp 8392 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_NO_PARALLEL; bp 8394 drivers/net/ethernet/broadcom/bnx2.c bp->phy_addr = 2; bp 8396 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_2_5G_CAPABLE; bp 8398 drivers/net/ethernet/broadcom/bnx2.c } else if (BNX2_CHIP(bp) == BNX2_CHIP_5706 || bp 8399 drivers/net/ethernet/broadcom/bnx2.c BNX2_CHIP(bp) == BNX2_CHIP_5708) bp 8400 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_CRC_FIX; bp 8401 drivers/net/ethernet/broadcom/bnx2.c else if (BNX2_CHIP(bp) == BNX2_CHIP_5709 && bp 8402 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_REV(bp) == BNX2_CHIP_REV_Ax || bp 8403 drivers/net/ethernet/broadcom/bnx2.c BNX2_CHIP_REV(bp) == BNX2_CHIP_REV_Bx)) bp 8404 drivers/net/ethernet/broadcom/bnx2.c bp->phy_flags |= BNX2_PHY_FLAG_DIS_EARLY_DAC; bp 8406 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_fw_cap(bp); bp 8408 drivers/net/ethernet/broadcom/bnx2.c if ((BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_A0) || bp 8409 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_B0) || bp 8410 drivers/net/ethernet/broadcom/bnx2.c (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5708_B1) || bp 8411 drivers/net/ethernet/broadcom/bnx2.c !(BNX2_RD(bp, BNX2_PCI_CONFIG_3) & BNX2_PCI_CONFIG_3_VAUX_PRESET)) { bp 8412 drivers/net/ethernet/broadcom/bnx2.c bp->flags |= BNX2_FLAG_NO_WOL; bp 8413 drivers/net/ethernet/broadcom/bnx2.c bp->wol = 0; bp 8416 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_NO_WOL) bp 8417 drivers/net/ethernet/broadcom/bnx2.c device_set_wakeup_capable(&bp->pdev->dev, false); bp 8419 drivers/net/ethernet/broadcom/bnx2.c device_set_wakeup_enable(&bp->pdev->dev, bp->wol); bp 8421 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP_ID(bp) == BNX2_CHIP_ID_5706_A0) { bp 8422 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip_int = bp 8423 drivers/net/ethernet/broadcom/bnx2.c bp->tx_quick_cons_trip; bp 8424 drivers/net/ethernet/broadcom/bnx2.c bp->tx_ticks_int = bp->tx_ticks; bp 8425 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip_int = bp 8426 drivers/net/ethernet/broadcom/bnx2.c bp->rx_quick_cons_trip; bp 8427 drivers/net/ethernet/broadcom/bnx2.c bp->rx_ticks_int = bp->rx_ticks; bp 8428 drivers/net/ethernet/broadcom/bnx2.c bp->comp_prod_trip_int = bp->comp_prod_trip; bp 8429 drivers/net/ethernet/broadcom/bnx2.c bp->com_ticks_int = bp->com_ticks; bp 8430 drivers/net/ethernet/broadcom/bnx2.c bp->cmd_ticks_int = bp->cmd_ticks; bp 8443 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5706 && disable_msi == 0) { bp 8459 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_default_link(bp); bp 8460 drivers/net/ethernet/broadcom/bnx2.c bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX; bp 8462 drivers/net/ethernet/broadcom/bnx2.c timer_setup(&bp->timer, bnx2_timer, 0); bp 8463 drivers/net/ethernet/broadcom/bnx2.c bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL); bp 8466 drivers/net/ethernet/broadcom/bnx2.c if (bnx2_shmem_rd(bp, BNX2_ISCSI_INITIATOR) & BNX2_ISCSI_INITIATOR_EN) bp 8467 drivers/net/ethernet/broadcom/bnx2.c bp->cnic_eth_dev.max_iscsi_conn = bp 8468 drivers/net/ethernet/broadcom/bnx2.c (bnx2_shmem_rd(bp, BNX2_ISCSI_MAX_CONN) & bp 8470 drivers/net/ethernet/broadcom/bnx2.c bp->cnic_probe = bnx2_cnic_probe; bp 8477 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_AER_ENABLED) { bp 8479 drivers/net/ethernet/broadcom/bnx2.c bp->flags &= ~BNX2_FLAG_AER_ENABLED; bp 8482 drivers/net/ethernet/broadcom/bnx2.c pci_iounmap(pdev, bp->regview); bp 8483 drivers/net/ethernet/broadcom/bnx2.c bp->regview = NULL; bp 8492 drivers/net/ethernet/broadcom/bnx2.c kfree(bp->temp_stats_blk); bp 8498 drivers/net/ethernet/broadcom/bnx2.c bnx2_bus_string(struct bnx2 *bp, char *str) bp 8502 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_PCIE) { bp 8506 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_PCIX) bp 8508 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_PCI_32BIT) bp 8512 drivers/net/ethernet/broadcom/bnx2.c s += sprintf(s, " %dMHz", bp->bus_speed_mhz); bp 8518 drivers/net/ethernet/broadcom/bnx2.c bnx2_del_napi(struct bnx2 *bp) bp 8522 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) bp 8523 drivers/net/ethernet/broadcom/bnx2.c netif_napi_del(&bp->bnx2_napi[i].napi); bp 8527 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_napi(struct bnx2 *bp) bp 8531 drivers/net/ethernet/broadcom/bnx2.c for (i = 0; i < bp->irq_nvecs; i++) { bp 8532 drivers/net/ethernet/broadcom/bnx2.c struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; bp 8540 drivers/net/ethernet/broadcom/bnx2.c netif_napi_add(bp->dev, &bp->bnx2_napi[i].napi, poll, 64); bp 8541 drivers/net/ethernet/broadcom/bnx2.c bnapi->bp = bp; bp 8567 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp; bp 8575 drivers/net/ethernet/broadcom/bnx2.c dev = alloc_etherdev_mq(sizeof(*bp), TX_MAX_RINGS); bp 8587 drivers/net/ethernet/broadcom/bnx2.c bp = netdev_priv(dev); bp 8598 drivers/net/ethernet/broadcom/bnx2.c bnx2_wait_dma_complete(bp); bp 8600 drivers/net/ethernet/broadcom/bnx2.c memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN); bp 8606 drivers/net/ethernet/broadcom/bnx2.c if (BNX2_CHIP(bp) == BNX2_CHIP_5709) bp 8616 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_CAN_KEEP_VLAN)) bp 8626 drivers/net/ethernet/broadcom/bnx2.c ((BNX2_CHIP_ID(bp) & 0xf000) >> 12) + 'A', bp 8627 drivers/net/ethernet/broadcom/bnx2.c ((BNX2_CHIP_ID(bp) & 0x0ff0) >> 4), bp 8628 drivers/net/ethernet/broadcom/bnx2.c bnx2_bus_string(bp, str), (long)pci_resource_start(pdev, 0), bp 8634 drivers/net/ethernet/broadcom/bnx2.c pci_iounmap(pdev, bp->regview); bp 8647 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8651 drivers/net/ethernet/broadcom/bnx2.c del_timer_sync(&bp->timer); bp 8652 drivers/net/ethernet/broadcom/bnx2.c cancel_work_sync(&bp->reset_task); bp 8654 drivers/net/ethernet/broadcom/bnx2.c pci_iounmap(bp->pdev, bp->regview); bp 8657 drivers/net/ethernet/broadcom/bnx2.c kfree(bp->temp_stats_blk); bp 8659 drivers/net/ethernet/broadcom/bnx2.c if (bp->flags & BNX2_FLAG_AER_ENABLED) { bp 8661 drivers/net/ethernet/broadcom/bnx2.c bp->flags &= ~BNX2_FLAG_AER_ENABLED; bp 8664 drivers/net/ethernet/broadcom/bnx2.c bnx2_release_firmware(bp); bp 8677 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8680 drivers/net/ethernet/broadcom/bnx2.c cancel_work_sync(&bp->reset_task); bp 8681 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 8683 drivers/net/ethernet/broadcom/bnx2.c del_timer_sync(&bp->timer); bp 8684 drivers/net/ethernet/broadcom/bnx2.c bnx2_shutdown_chip(bp); bp 8685 drivers/net/ethernet/broadcom/bnx2.c __bnx2_free_irq(bp); bp 8686 drivers/net/ethernet/broadcom/bnx2.c bnx2_free_skbs(bp); bp 8688 drivers/net/ethernet/broadcom/bnx2.c bnx2_setup_wol(bp); bp 8696 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8701 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_power_state(bp, PCI_D0); bp 8703 drivers/net/ethernet/broadcom/bnx2.c bnx2_request_irq(bp); bp 8704 drivers/net/ethernet/broadcom/bnx2.c bnx2_init_nic(bp, 1); bp 8705 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 8729 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8740 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_stop(bp, true); bp 8741 drivers/net/ethernet/broadcom/bnx2.c del_timer_sync(&bp->timer); bp 8742 drivers/net/ethernet/broadcom/bnx2.c bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); bp 8761 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8775 drivers/net/ethernet/broadcom/bnx2.c err = bnx2_init_nic(bp, 1); bp 8782 drivers/net/ethernet/broadcom/bnx2.c bnx2_napi_enable(bp); bp 8787 drivers/net/ethernet/broadcom/bnx2.c if (!(bp->flags & BNX2_FLAG_AER_ENABLED)) bp 8803 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp = netdev_priv(dev); bp 8807 drivers/net/ethernet/broadcom/bnx2.c bnx2_netif_start(bp, true); bp 8816 drivers/net/ethernet/broadcom/bnx2.c struct bnx2 *bp; bp 8821 drivers/net/ethernet/broadcom/bnx2.c bp = netdev_priv(dev); bp 8822 drivers/net/ethernet/broadcom/bnx2.c if (!bp) bp 8827 drivers/net/ethernet/broadcom/bnx2.c dev_close(bp->dev); bp 8830 drivers/net/ethernet/broadcom/bnx2.c bnx2_set_power_state(bp, PCI_D3hot); bp 6578 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_RX_RING_IDX(x) ((x) & bp->rx_max_ring_idx) bp 6579 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_RX_PG_RING_IDX(x) ((x) & bp->rx_max_pg_ring_idx) bp 6766 drivers/net/ethernet/broadcom/bnx2.h struct bnx2 *bp; bp 6868 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_CHIP(bp) (((bp)->chip_id) & 0xffff0000) bp 6873 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_CHIP_REV(bp) (((bp)->chip_id) & 0x0000f000) bp 6878 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_CHIP_METAL(bp) (((bp)->chip_id) & 0x00000ff0) bp 6879 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_CHIP_BOND(bp) (((bp)->chip_id) & 0x0000000f) bp 6881 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_CHIP_ID(bp) (((bp)->chip_id) & 0xfffffff0) bp 7007 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_RD(bp, offset) \ bp 7008 drivers/net/ethernet/broadcom/bnx2.h readl(bp->regview + offset) bp 7010 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_WR(bp, offset, val) \ bp 7011 drivers/net/ethernet/broadcom/bnx2.h writel(val, bp->regview + offset) bp 7013 drivers/net/ethernet/broadcom/bnx2.h #define BNX2_WR16(bp, offset, val) \ bp 7014 drivers/net/ethernet/broadcom/bnx2.h writew(val, bp->regview + offset) bp 7028 drivers/net/ethernet/broadcom/bnx2.h u32 bp; bp 7458 drivers/net/ethernet/broadcom/bnx2.h #define DP_SHMEM_LINE(bp, offset) \ bp 7459 drivers/net/ethernet/broadcom/bnx2.h netdev_err(bp->dev, "DEBUG: %08x: %08x %08x %08x %08x\n", \ bp 7461 drivers/net/ethernet/broadcom/bnx2.h bnx2_shmem_rd(bp, offset), \ bp 7462 drivers/net/ethernet/broadcom/bnx2.h bnx2_shmem_rd(bp, offset + 4), \ bp 7463 drivers/net/ethernet/broadcom/bnx2.h bnx2_shmem_rd(bp, offset + 8), \ bp 7464 drivers/net/ethernet/broadcom/bnx2.h bnx2_shmem_rd(bp, offset + 12)) bp 22 drivers/net/ethernet/broadcom/bnx2_fw.h .bp = BNX2_COM_CPU_HW_BREAKPOINT, bp 38 drivers/net/ethernet/broadcom/bnx2_fw.h .bp = BNX2_CP_CPU_HW_BREAKPOINT, bp 54 drivers/net/ethernet/broadcom/bnx2_fw.h .bp = BNX2_RXP_CPU_HW_BREAKPOINT, bp 70 drivers/net/ethernet/broadcom/bnx2_fw.h .bp = BNX2_TPAT_CPU_HW_BREAKPOINT, bp 86 drivers/net/ethernet/broadcom/bnx2_fw.h .bp = BNX2_TXP_CPU_HW_BREAKPOINT, bp 47 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_MIN_MSIX_VEC_CNT(bp) ((bp)->min_msix_vec_cnt) bp 88 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->dev ? (bp->dev->name) : "?", \ bp 93 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (unlikely(bp->msg_enable & (__mask))) \ bp 99 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (unlikely((bp->msg_enable & (__mask)) == __mask)) \ bp 105 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (unlikely(bp->msg_enable & (__mask))) \ bp 112 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (unlikely(netif_msg_probe(bp))) \ bp 115 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->dev ? (bp->dev->name) : "?", \ bp 124 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->dev ? (bp->dev->name) : "?", \ bp 134 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (unlikely(netif_msg_probe(bp))) \ bp 135 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h dev_info(&bp->pdev->dev, fmt, ##__VA_ARGS__); \ bp 139 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int); bp 143 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->panic = 1; \ bp 145 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bnx2x_panic_dump(bp, true); \ bp 150 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->panic = 1; \ bp 152 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bnx2x_panic_dump(bp, false); \ bp 163 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_ADDR(bp, offset) ((bp->regview) + (offset)) bp 165 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_RD(bp, offset) readl(REG_ADDR(bp, offset)) bp 166 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_RD8(bp, offset) readb(REG_ADDR(bp, offset)) bp 167 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_RD16(bp, offset) readw(REG_ADDR(bp, offset)) bp 169 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR_RELAXED(bp, offset, val) \ bp 170 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h writel_relaxed((u32)val, REG_ADDR(bp, offset)) bp 172 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR16_RELAXED(bp, offset, val) \ bp 173 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h writew_relaxed((u16)val, REG_ADDR(bp, offset)) bp 175 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR(bp, offset, val) writel((u32)val, REG_ADDR(bp, offset)) bp 176 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR8(bp, offset, val) writeb((u8)val, REG_ADDR(bp, offset)) bp 177 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR16(bp, offset, val) writew((u16)val, REG_ADDR(bp, offset)) bp 179 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_RD_IND(bp, offset) bnx2x_reg_rd_ind(bp, offset) bp 180 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR_IND(bp, offset, val) bnx2x_reg_wr_ind(bp, offset, val) bp 182 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_RD_DMAE(bp, offset, valp, len32) \ bp 184 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bnx2x_read_dmae(bp, offset, len32);\ bp 185 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h memcpy(valp, bnx2x_sp(bp, wb_data[0]), (len32) * 4); \ bp 188 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR_DMAE(bp, offset, valp, len32) \ bp 190 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h memcpy(bnx2x_sp(bp, wb_data[0]), valp, (len32) * 4); \ bp 191 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bnx2x_write_dmae(bp, bnx2x_sp_mapping(bp, wb_data), \ bp 195 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define REG_WR_DMAE_LEN(bp, offset, valp, len32) \ bp 196 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h REG_WR_DMAE(bp, offset, valp, len32) bp 198 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define VIRT_WR_DMAE_LEN(bp, data, addr, len32, le32_swap) \ bp 200 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h memcpy(GUNZIP_BUF(bp), data, (len32) * 4); \ bp 201 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bnx2x_write_big_buf_wb(bp, addr, len32); \ bp 204 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM_ADDR(bp, field) (bp->common.shmem_base + \ bp 206 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM_RD(bp, field) REG_RD(bp, SHMEM_ADDR(bp, field)) bp 207 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM_WR(bp, field, val) REG_WR(bp, SHMEM_ADDR(bp, field), val) bp 209 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM2_ADDR(bp, field) (bp->common.shmem2_base + \ bp 211 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM2_RD(bp, field) REG_RD(bp, SHMEM2_ADDR(bp, field)) bp 212 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM2_WR(bp, field, val) REG_WR(bp, SHMEM2_ADDR(bp, field), val) bp 213 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MF_CFG_ADDR(bp, field) (bp->common.mf_cfg_base + \ bp 215 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MF2_CFG_ADDR(bp, field) (bp->common.mf2_cfg_base + \ bp 218 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MF_CFG_RD(bp, field) REG_RD(bp, MF_CFG_ADDR(bp, field)) bp 219 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MF_CFG_WR(bp, field, val) REG_WR(bp,\ bp 220 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h MF_CFG_ADDR(bp, field), (val)) bp 221 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MF2_CFG_RD(bp, field) REG_RD(bp, MF2_CFG_ADDR(bp, field)) bp 223 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SHMEM2_HAS(bp, field) ((bp)->common.shmem2_base && \ bp 224 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (SHMEM2_RD((bp), size) > \ bp 227 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define EMAC_RD(bp, reg) REG_RD(bp, emac_base + reg) bp 228 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define EMAC_WR(bp, reg, val) REG_WR(bp, emac_base + reg, val) bp 250 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (&bp->def_status_blk->sp_sb.\ bp 254 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (&bp->def_status_blk->sp_sb.\ bp 281 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_1st_NON_L2_ETH_CID(bp) (BNX2X_NUM_NON_CNIC_QUEUES(bp) * \ bp 282 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (bp)->max_cos) bp 286 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define UIO_ROUNDUP(bp) (roundup(BNX2X_1st_NON_L2_ETH_CID(bp), \ bp 289 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define UIO_CID_OFFSET(bp) ((UIO_ROUNDUP(bp) + UIO_DPM) % \ bp 292 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define UIO_DPM_ALIGN(bp) (UIO_ROUNDUP(bp) + UIO_CID_OFFSET(bp)) bp 294 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define UIO_DPM_CID0_OFFSET(bp) ((UIO_DPM * 2) * \ bp 295 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (UIO_DPM_ALIGN(bp) == UIO_DPM)) bp 297 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_CNIC_START_ETH_CID(bp) (UIO_DPM_ALIGN(bp) + \ bp 298 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (UIO_DPM_CID0_OFFSET(bp))) bp 300 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define UIO_CID_PAD(bp) (BNX2X_CNIC_START_ETH_CID(bp) - \ bp 301 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BNX2X_1st_NON_L2_ETH_CID(bp)) bp 303 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_ISCSI_ETH_CID(bp) (BNX2X_CNIC_START_ETH_CID(bp)) bp 305 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_FCOE_ETH_CID(bp) (BNX2X_CNIC_START_ETH_CID(bp) + 1) bp 307 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CNIC_SUPPORT(bp) ((bp)->cnic_support) bp 308 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CNIC_ENABLED(bp) ((bp)->cnic_enabled) bp 309 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CNIC_LOADED(bp) ((bp)->cnic_loaded) bp 310 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define FCOE_INIT(bp) ((bp)->fcoe_init) bp 323 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CID_TO_FP(cid, bp) ((cid) % BNX2X_NUM_NON_CNIC_QUEUES(bp)) bp 324 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CID_COS_TO_TX_ONLY_CID(cid, cos, bp) \ bp 325 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (cid + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp)) bp 328 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define FP_COS_TO_TXQ(fp, cos, bp) \ bp 329 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h ((fp)->index + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp)) bp 342 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MAX_ETH_TXQ_IDX(bp) (BNX2X_NUM_NON_CNIC_QUEUES(bp) * (bp)->max_cos) bp 343 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define FCOE_TXQ_IDX(bp) (MAX_ETH_TXQ_IDX(bp) + FCOE_TXQ_IDX_OFFSET) bp 377 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BRB_SIZE(bp) (CHIP_IS_E3(bp) ? 1024 : 512) bp 378 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MAX_AGG_QS(bp) (CHIP_IS_E1(bp) ? \ bp 381 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define FW_DROP_LEVEL(bp) (3 + MAX_SPQ_PENDING + MAX_AGG_QS(bp)) bp 425 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NUM_SGE_REQ (MAX_AGG_QS(bp) + \ bp 426 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BRB_SIZE(bp) - MAX_AGG_QS(bp)) / 2) bp 429 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SGE_TH_LO(bp) (NUM_SGE_REQ + \ bp 431 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define SGE_TH_HI(bp) (SGE_TH_LO(bp) + DROPLESS_FC_HEADROOM) bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h struct bnx2x *bp; /* parent */ bp 615 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fp(bp, nr, var) ((bp)->fp[(nr)].var) bp 616 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_sp_obj(bp, fp) ((bp)->sp_objs[(fp)->index]) bp 617 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fp_stats(bp, fp) (&((bp)->fp_stats[(fp)->index])) bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fp_qstats(bp, fp) (&((bp)->fp_stats[(fp)->index].eth_q_stats)) bp 625 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define FCOE_IDX(bp) (BNX2X_NUM_NON_CNIC_QUEUES(bp) + \ bp 627 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fcoe_fp(bp) (&bp->fp[FCOE_IDX(bp)]) bp 628 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fcoe(bp, var) (bnx2x_fcoe_fp(bp)->var) bp 629 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fcoe_inner_sp_obj(bp) (&bp->sp_objs[FCOE_IDX(bp)]) bp 630 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fcoe_sp_obj(bp, var) (bnx2x_fcoe_inner_sp_obj(bp)->var) bp 631 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_fcoe_tx(bp, var) (bnx2x_fcoe_fp(bp)-> \ bp 635 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_ETH_FP(fp) ((fp)->index < BNX2X_NUM_ETH_QUEUES((fp)->bp)) bp 636 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_FCOE_FP(fp) ((fp)->index == FCOE_IDX((fp)->bp)) bp 637 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_FCOE_IDX(idx) ((idx) == FCOE_IDX(bp)) bp 690 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NUM_BD_REQ BRB_SIZE(bp) bp 693 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BD_TH_LO(bp) (NUM_BD_REQ + \ bp 695 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h FW_DROP_LEVEL(bp)) bp 696 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BD_TH_HI(bp) (BD_TH_LO(bp) + DROPLESS_FC_HEADROOM) bp 698 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MIN_RX_AVAIL ((bp)->dropless_fc ? BD_TH_HI(bp) + 128 : 128) bp 700 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MIN_RX_SIZE_TPA_HW (CHIP_IS_E1(bp) ? \ bp 738 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NUM_RCQ_REQ BRB_SIZE(bp) bp 741 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define RCQ_TH_LO(bp) (NUM_RCQ_REQ + \ bp 743 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h FW_DROP_LEVEL(bp)) bp 744 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define RCQ_TH_HI(bp) (RCQ_TH_LO(bp) + DROPLESS_FC_HEADROOM) bp 767 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define DOORBELL_RELAXED(bp, cid, val) \ bp 768 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h writel_relaxed((u32)(val), (bp)->doorbells + ((bp)->db_size * (cid))) bp 845 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_ID(bp) (bp->common.chip_id & 0xfffffff0) bp 847 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_NUM(bp) (bp->common.chip_id >> 16) bp 871 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E1(bp) (CHIP_NUM(bp) == CHIP_NUM_57710) bp 872 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57711(bp) (CHIP_NUM(bp) == CHIP_NUM_57711) bp 873 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57711E(bp) (CHIP_NUM(bp) == CHIP_NUM_57711E) bp 874 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57712(bp) (CHIP_NUM(bp) == CHIP_NUM_57712) bp 875 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57712_VF(bp) (CHIP_NUM(bp) == CHIP_NUM_57712_VF) bp 876 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57712_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57712_MF) bp 877 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57800(bp) (CHIP_NUM(bp) == CHIP_NUM_57800) bp 878 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57800_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57800_MF) bp 879 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57800_VF(bp) (CHIP_NUM(bp) == CHIP_NUM_57800_VF) bp 880 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57810(bp) (CHIP_NUM(bp) == CHIP_NUM_57810) bp 881 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57810_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_MF) bp 882 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57810_VF(bp) (CHIP_NUM(bp) == CHIP_NUM_57810_VF) bp 883 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57811(bp) (CHIP_NUM(bp) == CHIP_NUM_57811) bp 884 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57811_MF(bp) (CHIP_NUM(bp) == CHIP_NUM_57811_MF) bp 885 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57811_VF(bp) (CHIP_NUM(bp) == CHIP_NUM_57811_VF) bp 886 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57840(bp) \ bp 887 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h ((CHIP_NUM(bp) == CHIP_NUM_57840_4_10) || \ bp 888 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_NUM(bp) == CHIP_NUM_57840_2_20) || \ bp 889 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_NUM(bp) == CHIP_NUM_57840_OBSOLETE)) bp 890 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57840_MF(bp) ((CHIP_NUM(bp) == CHIP_NUM_57840_MF) || \ bp 891 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_NUM(bp) == CHIP_NUM_57840_MF_OBSOLETE)) bp 892 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57840_VF(bp) (CHIP_NUM(bp) == CHIP_NUM_57840_VF) bp 893 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E1H(bp) (CHIP_IS_57711(bp) || \ bp 894 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57711E(bp)) bp 895 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_57811xx(bp) (CHIP_IS_57811(bp) || \ bp 896 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57811_MF(bp) || \ bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57811_VF(bp)) bp 898 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E2(bp) (CHIP_IS_57712(bp) || \ bp 899 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57712_MF(bp) || \ bp 900 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57712_VF(bp)) bp 901 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E3(bp) (CHIP_IS_57800(bp) || \ bp 902 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57800_MF(bp) || \ bp 903 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57800_VF(bp) || \ bp 904 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57810(bp) || \ bp 905 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57810_MF(bp) || \ bp 906 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57810_VF(bp) || \ bp 907 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57811xx(bp) || \ bp 908 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57840(bp) || \ bp 909 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57840_MF(bp) || \ bp 910 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_IS_57840_VF(bp)) bp 911 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E1x(bp) (CHIP_IS_E1((bp)) || CHIP_IS_E1H((bp))) bp 912 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define USES_WARPCORE(bp) (CHIP_IS_E3(bp)) bp 913 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_E1H_OFFSET (!CHIP_IS_E1(bp)) bp 917 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV_VAL(bp) (bp->common.chip_id & CHIP_REV_MASK) bp 921 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV_IS_SLOW(bp) (CHIP_REV_VAL(bp) > 0x00005000) bp 923 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV_IS_EMUL(bp) ((CHIP_REV_IS_SLOW(bp)) && \ bp 924 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h !(CHIP_REV_VAL(bp) & 0x00001000)) bp 926 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV_IS_FPGA(bp) ((CHIP_REV_IS_SLOW(bp)) && \ bp 927 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_REV_VAL(bp) & 0x00001000)) bp 929 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_TIME(bp) ((CHIP_REV_IS_EMUL(bp)) ? 2000 : \ bp 930 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h ((CHIP_REV_IS_FPGA(bp)) ? 200 : 1)) bp 932 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_METAL(bp) (bp->common.chip_id & 0x00000ff0) bp 933 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_BOND_ID(bp) (bp->common.chip_id & 0x0000000f) bp 934 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV_SIM(bp) (((CHIP_REV_MASK - CHIP_REV_VAL(bp)) >>\ bp 937 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_REV(bp) (CHIP_REV_IS_SLOW(bp) ? \ bp 938 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_REV_SIM(bp) :\ bp 939 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h CHIP_REV_VAL(bp)) bp 940 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E3B0(bp) (CHIP_IS_E3(bp) && \ bp 941 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_REV(bp) == CHIP_REV_Bx)) bp 942 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_IS_E3A0(bp) (CHIP_IS_E3(bp) && \ bp 943 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_REV(bp) == CHIP_REV_Ax)) bp 955 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CONFIGURE_NIC_MODE(bp) (!CHIP_IS_E1x(bp) && !CNIC_ENABLED(bp)) bp 976 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_INT_MODE_IS_NBC(bp) \ bp 977 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (!CHIP_IS_E1x(bp) && \ bp 978 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h !((bp)->common.int_block & INT_BLOCK_MODE_BW_COMP)) bp 979 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_INT_MODE_IS_BC(bp) (!CHIP_INT_MODE_IS_NBC(bp)) bp 985 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_MODE(bp) (bp->common.chip_port_mode) bp 986 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define CHIP_MODE_IS_4_PORT(bp) (CHIP_MODE(bp) == CHIP_4_PORT_MODE) bp 1174 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_sp(bp, var) (&bp->slowpath->var) bp 1175 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define bnx2x_sp_mapping(bp, var) \ bp 1176 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (bp->slowpath_mapping + offsetof(struct bnx2x_slowpath, var)) bp 1231 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (&bp->def_status_blk->sp_sb.\ bp 1360 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_PATH(bp) (CHIP_IS_E1x(bp) ? 0 : (bp->pf_num & 1)) bp 1361 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_PORT(bp) (bp->pfid & 1) bp 1362 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_FUNC(bp) (bp->pfid) bp 1363 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_ABS_FUNC(bp) (bp->pf_num) bp 1364 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_VN(bp) ((bp)->pfid >> 1) bp 1365 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_MAX_VN_NUM(bp) (CHIP_MODE_IS_4_PORT(bp) ? 2 : 4) bp 1366 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_L_ID(bp) (BP_VN(bp) << 2) bp 1367 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_FW_MB_IDX_VN(bp, vn) (BP_PORT(bp) +\ bp 1368 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (vn) * ((CHIP_IS_E1x(bp) || (CHIP_MODE_IS_4_PORT(bp))) ? 2 : 1)) bp 1369 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_FW_MB_IDX(bp) BP_FW_MB_IDX_VN(bp, BP_VN(bp)) bp 1395 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IRO (bp->iro_arr) bp 1493 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_NOMCP(bp) ((bp)->flags & NO_MCP_FLAG) bp 1496 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_VF(bp) ((bp)->flags & IS_VF_FLAG) bp 1497 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_PF(bp) (!((bp)->flags & IS_VF_FLAG)) bp 1499 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_VF(bp) false bp 1500 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_PF(bp) true bp 1503 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NO_ISCSI(bp) ((bp)->flags & NO_ISCSI_FLAG) bp 1504 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NO_ISCSI_OOO(bp) ((bp)->flags & NO_ISCSI_OOO_FLAG) bp 1505 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define NO_FCOE(bp) ((bp)->flags & NO_FCOE_FLAG) bp 1551 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF(bp) (bp->mf_mode != 0) bp 1552 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_SI(bp) (bp->mf_mode == MULTI_FUNCTION_SI) bp 1553 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_SD(bp) (bp->mf_mode == MULTI_FUNCTION_SD) bp 1554 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_AFEX(bp) (bp->mf_mode == MULTI_FUNCTION_AFEX) bp 1556 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_UFP(bp) (IS_MF_SD(bp) && \ bp 1557 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->mf_sub_mode == SUB_MF_MODE_UFP) bp 1558 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_BD(bp) (IS_MF_SD(bp) && \ bp 1559 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bp->mf_sub_mode == SUB_MF_MODE_BD) bp 1651 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BP_ILT(bp) ((bp)->ilt) bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_MAX_RSS_COUNT(bp) ((bp)->igu_sb_cnt - CNIC_SUPPORT(bp)) bp 1664 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_L2_CID_COUNT(bp) (BNX2X_NUM_ETH_QUEUES(bp) * BNX2X_MULTI_TX_COS \ bp 1665 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h + CNIC_SUPPORT(bp) * (2 + UIO_CID_PAD(bp))) bp 1666 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_L2_MAX_CID(bp) (BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS \ bp 1667 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h + CNIC_SUPPORT(bp) * (2 + UIO_CID_PAD(bp))) bp 1668 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define L2_ILT_LINES(bp) (DIV_ROUND_UP(BNX2X_L2_CID_COUNT(bp),\ bp 1726 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define GUNZIP_BUF(bp) (bp->gunzip_buf) bp 1727 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define GUNZIP_PHYS(bp) (bp->gunzip_mapping) bp 1728 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define GUNZIP_OUTLEN(bp) (bp->gunzip_outlen) bp 1736 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_MODE_FLAGS(bp) (bp->init_mode_flags) bp 1746 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_OPS(bp) (bp->init_ops) bp 1747 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_OPS_OFFSETS(bp) (bp->init_ops_offsets) bp 1748 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_DATA(bp) (bp->init_data) bp 1749 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_TSEM_INT_TABLE_DATA(bp) (bp->tsem_int_table_data) bp 1750 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_TSEM_PRAM_DATA(bp) (bp->tsem_pram_data) bp 1751 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_USEM_INT_TABLE_DATA(bp) (bp->usem_int_table_data) bp 1752 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_USEM_PRAM_DATA(bp) (bp->usem_pram_data) bp 1753 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_XSEM_INT_TABLE_DATA(bp) (bp->xsem_int_table_data) bp 1754 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_XSEM_PRAM_DATA(bp) (bp->xsem_pram_data) bp 1755 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_CSEM_INT_TABLE_DATA(bp) (bp->csem_int_table_data) bp 1756 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_CSEM_PRAM_DATA(bp) (bp->csem_pram_data) bp 1763 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_SRIOV(bp) ((bp)->vfdb) bp 1857 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_NUM_QUEUES(bp) (bp->num_queues) bp 1858 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_NUM_ETH_QUEUES(bp) ((bp)->num_ethernet_queues) bp 1859 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_NUM_NON_CNIC_QUEUES(bp) (BNX2X_NUM_QUEUES(bp) - \ bp 1860 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (bp)->num_cnic_queues) bp 1861 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_NUM_RX_QUEUES(bp) BNX2X_NUM_QUEUES(bp) bp 1863 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define is_multi(bp) (BNX2X_NUM_QUEUES(bp) > 1) bp 1865 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_MAX_QUEUES(bp) BNX2X_MAX_RSS_COUNT(bp) bp 1890 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_cnic_queue(bp, var) \ bp 1891 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = BNX2X_NUM_ETH_QUEUES(bp); (var) < BNX2X_NUM_QUEUES(bp); \ bp 1893 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_queue(bp, var)) \ bp 1897 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_eth_queue(bp, var) \ bp 1898 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 0; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++) bp 1900 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_nondefault_eth_queue(bp, var) \ bp 1901 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 1; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++) bp 1903 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_queue(bp, var) \ bp 1904 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \ bp 1905 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_queue(bp, var)) \ bp 1910 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_valid_rx_queue(bp, var) \ bp 1912 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (var) < (CNIC_LOADED(bp) ? BNX2X_NUM_QUEUES(bp) : \ bp 1913 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BNX2X_NUM_ETH_QUEUES(bp)); \ bp 1915 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_rx_queue(bp, var)) \ bp 1919 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_rx_queue_cnic(bp, var) \ bp 1920 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = BNX2X_NUM_ETH_QUEUES(bp); (var) < BNX2X_NUM_QUEUES(bp); \ bp 1922 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_rx_queue(bp, var)) \ bp 1926 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_rx_queue(bp, var) \ bp 1927 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \ bp 1928 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_rx_queue(bp, var)) \ bp 1933 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_valid_tx_queue(bp, var) \ bp 1935 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (var) < (CNIC_LOADED(bp) ? BNX2X_NUM_QUEUES(bp) : \ bp 1936 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BNX2X_NUM_ETH_QUEUES(bp)); \ bp 1938 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_tx_queue(bp, var)) \ bp 1942 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_tx_queue_cnic(bp, var) \ bp 1943 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = BNX2X_NUM_ETH_QUEUES(bp); (var) < BNX2X_NUM_QUEUES(bp); \ bp 1945 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_tx_queue(bp, var)) \ bp 1949 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_tx_queue(bp, var) \ bp 1950 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \ bp 1951 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_tx_queue(bp, var)) \ bp 1955 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define for_each_nondefault_queue(bp, var) \ bp 1956 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h for ((var) = 1; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \ bp 1957 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h if (skip_queue(bp, var)) \ bp 1967 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define skip_rx_queue(bp, idx) (NO_FCOE(bp) && IS_FCOE_IDX(idx)) bp 1972 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define skip_tx_queue(bp, idx) (NO_FCOE(bp) && IS_FCOE_IDX(idx)) bp 1974 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define skip_queue(bp, idx) (NO_FCOE(bp) && IS_FCOE_IDX(idx)) bp 1994 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac, bp 1998 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan, bp 2016 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_del_all_macs(struct bnx2x *bp, bp 2021 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p); bp 2022 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_init_sb(struct bnx2x *bp, dma_addr_t mapping, int vfid, bp 2024 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port); bp 2025 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port); bp 2026 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_set_mult_gpio(struct bnx2x *bp, u8 pins, u32 mode); bp 2027 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_set_gpio_int(struct bnx2x *bp, int gpio_num, u32 mode, u8 port); bp 2028 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_read_mf_cfg(struct bnx2x *bp); bp 2030 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val); bp 2033 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32); bp 2034 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_write_dmae(struct bnx2x *bp, dma_addr_t dma_addr, u32 dst_addr, bp 2036 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_post_dmae(struct bnx2x *bp, struct dmae_command *dmae, int idx); bp 2039 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h u32 bnx2x_dmae_opcode(struct bnx2x *bp, u8 src_type, u8 dst_type, bp 2042 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_prep_dmae_with_comp(struct bnx2x *bp, struct dmae_command *dmae, bp 2044 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_issue_dmae_with_comp(struct bnx2x *bp, struct dmae_command *dmae, bp 2048 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h u32 bnx2x_flr_clnup_poll_count(struct bnx2x *bp); bp 2049 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_tx_hw_flushed(struct bnx2x *bp, u32 poll_count); bp 2050 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_send_final_clnup(struct bnx2x *bp, u8 clnup_func, u32 poll_cnt); bp 2052 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_flr_clnup_poll_hw_counter(struct bnx2x *bp, u32 reg, bp 2055 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_calc_fc_adv(struct bnx2x *bp); bp 2056 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_sp_post(struct bnx2x *bp, int command, int cid, bp 2058 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_update_coalesce(struct bnx2x *bp); bp 2059 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_get_cur_phy_idx(struct bnx2x *bp); bp 2061 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h bool bnx2x_port_after_undi(struct bnx2x *bp); bp 2063 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h static inline u32 reg_poll(struct bnx2x *bp, u32 reg, u32 expected, int ms, bp 2069 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h val = REG_RD(bp, reg); bp 2080 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, bp 2084 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL) bp 2089 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h dma_free_coherent(&bp->pdev->dev, size, x, y); \ bp 2183 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define DMAE_LEN32_WR_MAX(bp) (CHIP_IS_E1(bp) ? 0x400 : 0x2000) bp 2190 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define INIT_DMAE_C(bp) (BP_PORT(bp) * MAX_DMAE_C_PER_PORT + \ bp 2191 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BP_VN(bp)) bp 2192 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define PMF_DMAE_C(bp) (BP_PORT(bp) * MAX_DMAE_C_PER_PORT + \ bp 2210 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_NUM_TESTS(bp) (IS_MF(bp) ? BNX2X_NUM_TESTS_MF : \ bp 2211 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h IS_VF(bp) ? 0 : BNX2X_NUM_TESTS_SF) bp 2225 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define HW_CID(bp, x) ((BP_PORT(bp) << 23) | \ bp 2226 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BP_VN(bp) << BNX2X_SWCID_SHIFT) | \ bp 2268 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_STORAGE_ONLY(bp) (IS_MF_STORAGE_PERSONALITY_ONLY(bp) || \ bp 2269 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h IS_MF_FCOE_AFEX(bp)) bp 2274 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h GENERAL_ATTEN_OFFSET(LINK_SYNC_ATTENTION_BIT_FUNC_0 + BP_FUNC(bp)) bp 2386 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (&bp->def_status_blk->sp_sb.\ bp 2396 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MC_HASH_OFFSET(bp, i) (BAR_TSTRORM_INTMEM + \ bp 2397 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h TSTORM_APPROXIMATE_MATCH_MULTICAST_FILTERING_OFFSET(BP_FUNC(bp)) + i*4) bp 2417 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_compare_fw_ver(struct bnx2x *bp, u32 load_code, bool print_err); bp 2434 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev); bp 2435 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_notify_link_changed(struct bnx2x *bp); bp 2437 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_MF_SD_PROTOCOL(bp) \ bp 2438 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h ((bp)->mf_config[BP_VN(bp)] & FUNC_MF_CFG_PROTOCOL_MASK) bp 2440 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) \ bp 2441 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_ISCSI) bp 2443 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp) \ bp 2444 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_MF_SD_PROTOCOL(bp) == FUNC_MF_CFG_PROTOCOL_FCOE) bp 2446 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_ISCSI_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) bp 2447 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_FCOE_SD(bp) (IS_MF_SD(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) bp 2448 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_ISCSI_SI(bp) (IS_MF_SI(bp) && BNX2X_IS_MF_EXT_PROTOCOL_ISCSI(bp)) bp 2450 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_ISCSI_ONLY(bp) (IS_MF_ISCSI_SD(bp) || IS_MF_ISCSI_SI(bp)) bp 2457 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_MF_EXT_PROT(bp) ((bp)->mf_ext_config & \ bp 2460 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_HAS_MF_EXT_PROTOCOL_FCOE(bp) \ bp 2461 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_MF_EXT_PROT(bp) & MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD) bp 2463 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_IS_MF_EXT_PROTOCOL_FCOE(bp) \ bp 2464 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_MF_EXT_PROT(bp) == MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD) bp 2466 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define BNX2X_IS_MF_EXT_PROTOCOL_ISCSI(bp) \ bp 2467 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_MF_EXT_PROT(bp) == MACP_FUNC_CFG_FLAGS_ISCSI_OFFLOAD) bp 2469 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_FCOE_AFEX(bp) \ bp 2470 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (IS_MF_AFEX(bp) && BNX2X_IS_MF_EXT_PROTOCOL_FCOE(bp)) bp 2472 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp) \ bp 2473 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (IS_MF_SD(bp) && \ bp 2474 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp) || \ bp 2475 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) bp 2477 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_SI_STORAGE_PERSONALITY_ONLY(bp) \ bp 2478 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (IS_MF_SI(bp) && \ bp 2479 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (BNX2X_IS_MF_EXT_PROTOCOL_ISCSI(bp) || \ bp 2480 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h BNX2X_IS_MF_EXT_PROTOCOL_FCOE(bp))) bp 2482 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_STORAGE_PERSONALITY_ONLY(bp) \ bp 2483 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp) || \ bp 2484 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h IS_MF_SI_STORAGE_PERSONALITY_ONLY(bp)) bp 2489 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define IS_MF_PERCENT_BW(bp) (IS_MF_SI(bp) || IS_MF_UFP(bp) || IS_MF_BD(bp)) bp 2510 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_set_local_cmng(struct bnx2x *bp); bp 2512 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_update_mng_version(struct bnx2x *bp); bp 2514 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_update_mfw_dump(struct bnx2x *bp); bp 2516 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h #define MCPR_SCRATCH_BASE(bp) \ bp 2517 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h (CHIP_IS_E1x(bp) ? MCP_REG_MCPR_SCRATCH : MCP_A_REG_MCPR_SCRATCH) bp 2521 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_init_ptp(struct bnx2x *bp); bp 2522 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_configure_ptp_filters(struct bnx2x *bp); bp 2523 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb); bp 2524 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h void bnx2x_register_phc(struct bnx2x *bp); bp 2532 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp); bp 35 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_fp_mem_cnic(struct bnx2x *bp); bp 36 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp); bp 37 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fp_mem(struct bnx2x *bp); bp 40 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_add_all_napi_cnic(struct bnx2x *bp) bp 45 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue_cnic(bp, i) { bp 46 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi), bp 51 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_add_all_napi(struct bnx2x *bp) bp 56 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 57 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi), bp 62 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_calc_num_queues(struct bnx2x *bp) bp 70 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp)); bp 87 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static inline void bnx2x_move_fp(struct bnx2x *bp, int from, int to) bp 89 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *from_fp = &bp->fp[from]; bp 90 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *to_fp = &bp->fp[to]; bp 91 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_sp_objs *from_sp_objs = &bp->sp_objs[from]; bp 92 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_sp_objs *to_sp_objs = &bp->sp_objs[to]; bp 93 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fp_stats *from_fp_stats = &bp->fp_stats[from]; bp 94 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fp_stats *to_fp_stats = &bp->fp_stats[to]; bp 122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c old_max_eth_txqs = BNX2X_NUM_ETH_QUEUES(bp) * (bp)->max_cos; bp 123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c new_max_eth_txqs = (BNX2X_NUM_ETH_QUEUES(bp) - from + to) * bp 124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp)->max_cos; bp 125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (from == FCOE_IDX(bp)) { bp 130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c memcpy(&bp->bnx2x_txq[new_txdata_index], bp 131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c &bp->bnx2x_txq[old_txdata_index], bp 133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c to_fp->txdata_ptr[0] = &bp->bnx2x_txq[new_txdata_index]; bp 144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len) bp 146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_get_ext_phy_fw_version(&bp->link_params, bp 152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c strlcpy(buf, bp->fw_ver, buf_len); bp 153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c snprintf(buf + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver), bp 155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->common.bc_ver & 0xff0000) >> 16, bp 156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->common.bc_ver & 0xff00) >> 8, bp 157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->common.bc_ver & 0xff), bp 160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_vf_fill_fw_str(bp, buf, buf_len); bp 170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta) bp 172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int i, cos, old_eth_num = BNX2X_NUM_ETH_QUEUES(bp); bp 177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (cos = 1; cos < bp->max_cos; cos++) { bp 179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c memcpy(&bp->bnx2x_txq[new_idx], fp->txdata_ptr[cos], bp 184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp->txdata_ptr[cos] = &bp->bnx2x_txq[new_idx]; bp 194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, bp 245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd), bp 253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_page(&bp->pdev->dev, BD_UNMAP_ADDR(tx_data_bd), bp 273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata) bp 280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) bp 284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c txq = netdev_get_tx_queue(bp->dev, txdata->txq_index); bp 300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bd_cons = bnx2x_free_tx_pkt(bp, txdata, pkt_cons, bp 336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->state == BNX2X_STATE_OPEN) && bp 337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bnx2x_tx_avail(bp, txdata) >= MAX_DESC_PER_TX_PKT)) bp 358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u32 bnx2x_get_rxhash(const struct bnx2x *bp, bp 415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if ((bp->dev->features & NETIF_F_RXHASH) && bp 434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mapping = dma_map_single(&bp->pdev->dev, bp 456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c tpa_info->rxhash = bnx2x_get_rxhash(bp, cqe, &tpa_info->rxhash_type); bp 546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_rx_sge(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mapping = dma_map_page(&bp->pdev->dev, pool->page, bp 564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c err = bnx2x_alloc_rx_sge(bp, fp, sge_idx, GFP_ATOMIC); bp 639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++; bp 643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_page(&bp->pdev->dev, bp 697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_gro_ip_csum(struct bnx2x *bp, struct sk_buff *skb) bp 709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_gro_ipv6_csum(struct bnx2x *bp, struct sk_buff *skb) bp 721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_gro_csum(struct bnx2x *bp, struct sk_buff *skb, bp 725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c gro_func(bp, skb); bp 730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_gro_receive(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 737 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_gro_csum(bp, skb, bnx2x_gro_ip_csum); bp 740 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_gro_csum(bp, skb, bnx2x_gro_ipv6_csum); bp 743 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_WARN_ONCE(bp->dev, bp 753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_single(&bp->pdev->dev, dma_unmap_addr(rx_buf, mapping), bp 798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c skb->protocol = eth_type_trans(skb, bp->dev); bp 801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fill_frag_skb(bp, fp, tpa_info, pages, bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_gro_receive(bp, fp, skb); bp 823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_stats(bp, fp)->eth_q_stats.rx_skb_alloc_failed++; bp 826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_rx_data(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mapping = dma_map_single(&bp->pdev->dev, data + NET_SKB_PAD, bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 890 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) bp 920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) bp 999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_tpa_stop(bp, fp, tpa_info, pages, bp 1002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->panic) bp 1012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_sync_single_for_cpu(&bp->pdev->dev, bp 1023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)->rx_err_discard_pkt++; bp 1030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if ((bp->dev->mtu > ETH_MAX_PACKET_SIZE) && bp 1036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++; bp 1042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (likely(bnx2x_alloc_rx_data(bp, fp, bd_prod, bp 1044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_single(&bp->pdev->dev, bp 1051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)-> bp 1059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)->rx_skb_alloc_failed++; bp 1067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c skb->protocol = eth_type_trans(skb, bp->dev); bp 1070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rxhash = bnx2x_get_rxhash(bp, cqe_fp, &rxhash_type); bp 1075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->dev->features & NETIF_F_RXCSUM) bp 1077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, fp)); bp 1084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_rx_ts(bp, skb); bp 1120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_rx_prod(bp, fp, bd_prod_fw, sw_comp_prod, bp 1129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 1136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_ack_sb(bp, fp->igu_sb_id, USTORM_ID, 0, IGU_INT_DISABLE, 0); bp 1139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) bp 1148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c napi_schedule_irqoff(&bnx2x_fp(bp, fp->index, napi)); bp 1154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_acquire_phy_lock(struct bnx2x *bp) bp 1156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mutex_lock(&bp->port.phy_mutex); bp 1158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_MDIO); bp 1161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_release_phy_lock(struct bnx2x *bp) bp 1163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_MDIO); bp 1165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mutex_unlock(&bp->port.phy_mutex); bp 1169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u16 bnx2x_get_mf_speed(struct bnx2x *bp) bp 1171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u16 line_speed = bp->link_vars.line_speed; bp 1172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_MF(bp)) { bp 1173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u16 maxCfg = bnx2x_extract_max_cfg(bp, bp 1174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->mf_config[BP_VN(bp)]); bp 1179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_MF_PERCENT_BW(bp)) bp 1200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_fill_report_data(struct bnx2x *bp, bp 1205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 1207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c data->line_speed = bnx2x_get_mf_speed(bp); bp 1210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->link_vars.link_up || (bp->flags & MF_FUNC_DIS)) bp 1214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!BNX2X_NUM_ETH_QUEUES(bp)) bp 1219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_vars.duplex == DUPLEX_FULL) bp 1224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) bp 1229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) bp 1233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c *data = bp->vf_link_vars; bp 1247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_link_report(struct bnx2x *bp) bp 1249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_acquire_phy_lock(bp); bp 1250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c __bnx2x_link_report(bp); bp 1251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_release_phy_lock(bp); bp 1262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void __bnx2x_link_report(struct bnx2x *bp) bp 1266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->force_link_down) { bp 1267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->link_vars.link_up = 0; bp 1272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && !CHIP_IS_E1(bp)) bp 1273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_read_mf_cfg(bp); bp 1276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fill_report_data(bp, &cur_data); bp 1279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!memcmp(&cur_data, &bp->last_reported_link, sizeof(cur_data)) || bp 1281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c &bp->last_reported_link.link_report_flags) && bp 1286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->link_cnt++; bp 1291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c memcpy(&bp->last_reported_link, &cur_data, sizeof(cur_data)); bp 1294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 1295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_iov_link_update(bp); bp 1299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_carrier_off(bp->dev); bp 1300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_err(bp->dev, "NIC Link is Down\n"); bp 1306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_carrier_on(bp->dev); bp 1332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_info(bp->dev, "NIC Link is Up, %d Mbps %s duplex, Flow control: %s\n", bp 1355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_tpa_pool(struct bnx2x *bp, bp 1370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_single(&bp->pdev->dev, bp 1378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_init_rx_rings_cnic(struct bnx2x *bp) bp 1382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue_cnic(bp, j) { bp 1383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[j]; bp 1392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_rx_prod(bp, fp, fp->rx_bd_prod, fp->rx_comp_prod, bp 1397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_init_rx_rings(struct bnx2x *bp) bp 1399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int func = BP_FUNC(bp); bp 1404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, j) { bp 1405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[j]; bp 1408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c "mtu %d rx_buf_size %d\n", bp->dev->mtu, fp->rx_buf_size); bp 1412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (i = 0; i < MAX_AGG_QS(bp); i++) { bp 1423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tpa_pool(bp, fp, i); bp 1441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_rx_sge(bp, fp, ring_prod, bp 1448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_sge_range(bp, fp, bp 1450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tpa_pool(bp, fp, bp 1451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c MAX_AGG_QS(bp)); bp 1463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, j) { bp 1464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[j]; bp 1473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_rx_prod(bp, fp, fp->rx_bd_prod, fp->rx_comp_prod, bp 1479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CHIP_IS_E1(bp)) { bp 1480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR(bp, BAR_USTRORM_INTMEM + bp 1483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR(bp, BAR_USTRORM_INTMEM + bp 1493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 1503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_pkt(bp, txdata, TX_BD(sw_cons), bp 1509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_get_tx_queue(bp->dev, bp 1514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_tx_skbs_cnic(struct bnx2x *bp) bp 1518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_tx_queue_cnic(bp, i) { bp 1519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_skbs_queue(&bp->fp[i]); bp 1523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_tx_skbs(struct bnx2x *bp) bp 1527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_skbs_queue(&bp->fp[i]); bp 1534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 1547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dma_unmap_single(&bp->pdev->dev, bp 1556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_rx_skbs_cnic(struct bnx2x *bp) bp 1560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue_cnic(bp, j) { bp 1561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_bds(&bp->fp[j]); bp 1565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_rx_skbs(struct bnx2x *bp) bp 1569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, j) { bp 1570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[j]; bp 1575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tpa_pool(bp, fp, MAX_AGG_QS(bp)); bp 1579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_skbs_cnic(struct bnx2x *bp) bp 1581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_skbs_cnic(bp); bp 1582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_skbs_cnic(bp); bp 1585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_free_skbs(struct bnx2x *bp) bp 1587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_skbs(bp); bp 1588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_skbs(bp); bp 1591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value) bp 1594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u32 mf_cfg = bp->mf_config[BP_VN(bp)]; bp 1596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (value != bnx2x_extract_max_cfg(bp, mf_cfg)) { bp 1604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW, mf_cfg); bp 1614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_msix_irqs(struct bnx2x *bp, int nvecs) bp 1622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 1623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c free_irq(bp->msix_table[offset].vector, bp->dev); bp 1625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[offset].vector); bp 1629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_SUPPORT(bp)) { bp 1635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c i, bp->msix_table[offset].vector); bp 1641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c free_irq(bp->msix_table[offset++].vector, &bp->fp[i]); bp 1645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_free_irq(struct bnx2x *bp) bp 1647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & USING_MSIX_FLAG && bp 1648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c !(bp->flags & USING_SINGLE_MSIX_FLAG)) { bp 1649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int nvecs = BNX2X_NUM_ETH_QUEUES(bp) + CNIC_SUPPORT(bp); bp 1652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 1655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_msix_irqs(bp, nvecs); bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c free_irq(bp->dev->irq, bp->dev); bp 1661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_enable_msix(struct bnx2x *bp) bp 1666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 1667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[msix_vec].entry = msix_vec; bp 1669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[0].entry); bp 1674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_SUPPORT(bp)) { bp 1675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[msix_vec].entry = msix_vec; bp 1677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c msix_vec, bp->msix_table[msix_vec].entry); bp 1682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1683 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[msix_vec].entry = msix_vec; bp 1692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = pci_enable_msix_range(bp->pdev, &bp->msix_table[0], bp 1693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_MIN_MSIX_VEC_CNT(bp), msix_vec); bp 1700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = pci_enable_msix_range(bp->pdev, &bp->msix_table[0], 1, 1); bp 1708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->flags |= USING_SINGLE_MSIX_FLAG; bp 1711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_ethernet_queues = 1; bp 1712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp 1725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_ethernet_queues -= diff; bp 1726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp 1729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues); bp 1732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->flags |= USING_MSIX_FLAG; bp 1739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->flags |= DISABLE_MSI_FLAG; bp 1744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_req_msix_irqs(struct bnx2x *bp) bp 1749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 1750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = request_irq(bp->msix_table[offset++].vector, bp 1752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->name, bp->dev); bp 1759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_SUPPORT(bp)) bp 1762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1763 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 1765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->name, i); bp 1767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = request_irq(bp->msix_table[offset].vector, bp 1771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[offset].vector, rc); bp 1772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_msix_irqs(bp, offset); bp 1779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c i = BNX2X_NUM_ETH_QUEUES(bp); bp 1780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 1781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c offset = 1 + CNIC_SUPPORT(bp); bp 1782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_info(bp->dev, bp 1784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table[0].vector, bp 1785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 0, bp->msix_table[offset].vector, bp 1786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c i - 1, bp->msix_table[offset + i - 1].vector); bp 1788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c offset = CNIC_SUPPORT(bp); bp 1789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_info(bp->dev, bp 1791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 0, bp->msix_table[offset].vector, bp 1792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c i - 1, bp->msix_table[offset + i - 1].vector); bp 1797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_enable_msi(struct bnx2x *bp) bp 1801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = pci_enable_msi(bp->pdev); bp 1806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->flags |= USING_MSI_FLAG; bp 1811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_req_irq(struct bnx2x *bp) bp 1816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & (USING_MSI_FLAG | USING_MSIX_FLAG)) bp 1821 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & USING_MSIX_FLAG) bp 1822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c irq = bp->msix_table[0].vector; bp 1824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c irq = bp->pdev->irq; bp 1826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return request_irq(irq, bnx2x_interrupt, flags, bp->dev->name, bp->dev); bp 1829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_setup_irqs(struct bnx2x *bp) bp 1832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & USING_MSIX_FLAG && bp 1833 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c !(bp->flags & USING_SINGLE_MSIX_FLAG)) { bp 1834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_req_msix_irqs(bp); bp 1838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_req_irq(bp); bp 1843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & USING_MSI_FLAG) { bp 1844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->irq = bp->pdev->irq; bp 1845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_info(bp->dev, "using MSI IRQ %d\n", bp 1846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->irq); bp 1848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & USING_MSIX_FLAG) { bp 1849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->irq = bp->msix_table[0].vector; bp 1850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_info(bp->dev, "using MSIX IRQ %d\n", bp 1851 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->dev->irq); bp 1858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_napi_enable_cnic(struct bnx2x *bp) bp 1862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue_cnic(bp, i) { bp 1863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c napi_enable(&bnx2x_fp(bp, i, napi)); bp 1867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_napi_enable(struct bnx2x *bp) bp 1871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c napi_enable(&bnx2x_fp(bp, i, napi)); bp 1876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_napi_disable_cnic(struct bnx2x *bp) bp 1880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue_cnic(bp, i) { bp 1881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c napi_disable(&bnx2x_fp(bp, i, napi)); bp 1885 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_napi_disable(struct bnx2x *bp) bp 1889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) { bp 1890 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c napi_disable(&bnx2x_fp(bp, i, napi)); bp 1894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_netif_start(struct bnx2x *bp) bp 1896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (netif_running(bp->dev)) { bp 1897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_enable(bp); bp 1898 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 1899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_enable_cnic(bp); bp 1900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_int_enable(bp); bp 1901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->state == BNX2X_STATE_OPEN) bp 1902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_tx_wake_all_queues(bp->dev); bp 1906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw) bp 1908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_int_disable_sync(bp, disable_hw); bp 1909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_disable(bp); bp 1910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 1911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_disable_cnic(bp); bp 1917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 1919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp) && !NO_FCOE(bp)) { bp 1933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_fcoe_tx(bp, txq_index); bp 1937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return netdev_pick_tx(dev, skb, NULL) % (BNX2X_NUM_ETH_QUEUES(bp)); bp 1940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_set_num_queues(struct bnx2x *bp) bp 1943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_ethernet_queues = bnx2x_calc_num_queues(bp); bp 1946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_MF_STORAGE_ONLY(bp)) bp 1947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_ethernet_queues = 1; bp 1950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_cnic_queues = CNIC_SUPPORT(bp); /* For FCOE */ bp 1951 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp 1953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_DEV_INFO("set number of queues to %d\n", bp->num_queues); bp 1978 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_set_real_num_queues(struct bnx2x *bp, int include_cnic) bp 1982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c tx = BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos; bp 1983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rx = BNX2X_NUM_ETH_QUEUES(bp); bp 1986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (include_cnic && !NO_FCOE(bp)) { bp 1991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = netif_set_real_num_tx_queues(bp->dev, tx); bp 1996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = netif_set_real_num_rx_queues(bp->dev, rx); bp 2008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_set_rx_buf_size(struct bnx2x *bp) bp 2012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_queue(bp, i) { bp 2013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 2026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mtu = bp->dev->mtu; bp 2041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_init_rss(struct bnx2x *bp) bp 2044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u8 num_eth_queues = BNX2X_NUM_ETH_QUEUES(bp); bp 2049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (i = 0; i < sizeof(bp->rss_conf_obj.ind_table); i++) bp 2050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->rss_conf_obj.ind_table[i] = bp 2051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fp->cl_id + bp 2062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_config_rss_eth(bp, bp->port.pmf || !CHIP_IS_E1x(bp)); bp 2065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_rss(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj, bp 2094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) { bp 2117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_config_rss(bp, ¶ms); bp 2120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_vfpf_config_rss(bp, ¶ms); bp 2123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_init_hw(struct bnx2x *bp, u32 load_code) bp 2130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c func_params.f_obj = &bp->func_obj; bp 2135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_func_state_change(bp, &func_params); bp 2142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_squeeze_objects(struct bnx2x *bp) bp 2147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_vlan_mac_obj *mac_obj = &bp->sp_objs->mac_obj; bp 2158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = mac_obj->delete_all(bp, &bp->sp_objs->mac_obj, &vlan_mac_flags, bp 2166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = mac_obj->delete_all(bp, mac_obj, &vlan_mac_flags, bp 2172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rparam.mcast_obj = &bp->mcast_obj; bp 2179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_addr_lock_bh(bp->dev); bp 2180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_DEL); bp 2186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_CONT); bp 2191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_addr_unlock_bh(bp->dev); bp 2195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_CONT); bp 2197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_addr_unlock_bh(bp->dev); bp 2201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c #define LOAD_ERROR_EXIT(bp, label) \ bp 2203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp)->state = BNX2X_STATE_ERROR; \ bp 2207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c #define LOAD_ERROR_EXIT_CNIC(bp, label) \ bp 2209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->cnic_loaded = false; \ bp 2213 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c #define LOAD_ERROR_EXIT(bp, label) \ bp 2215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp)->state = BNX2X_STATE_ERROR; \ bp 2216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp)->panic = 1; \ bp 2219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c #define LOAD_ERROR_EXIT_CNIC(bp, label) \ bp 2221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->cnic_loaded = false; \ bp 2222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp)->panic = 1; \ bp 2227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_fw_stats_mem(struct bnx2x *bp) bp 2229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_FREE(bp->fw_stats, bp->fw_stats_mapping, bp 2230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_data_sz + bp->fw_stats_req_sz); bp 2234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fw_stats_mem(struct bnx2x *bp) bp 2237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int is_fcoe_stats = NO_FCOE(bp) ? 0 : 1; bp 2240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u8 num_queue_stats = BNX2X_NUM_ETH_QUEUES(bp) + is_fcoe_stats; bp 2247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_num = 2 + is_fcoe_stats + num_queue_stats; bp 2254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_SRIOV(bp)) bp 2255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c vf_headroom = bnx2x_vf_headroom(bp); bp 2263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (((bp->fw_stats_num + vf_headroom) / STATS_QUERY_CMD_COUNT) + bp 2264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (((bp->fw_stats_num + vf_headroom) % STATS_QUERY_CMD_COUNT) ? bp 2268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_num, vf_headroom, num_groups); bp 2269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_req_sz = sizeof(struct stats_query_header) + bp 2280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_data_sz = sizeof(struct per_port_stats) + bp 2286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats = BNX2X_PCI_ALLOC(&bp->fw_stats_mapping, bp 2287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_data_sz + bp->fw_stats_req_sz); bp 2288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->fw_stats) bp 2292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_req = (struct bnx2x_fw_stats_req *)bp->fw_stats; bp 2293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_req_mapping = bp->fw_stats_mapping; bp 2294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_data = (struct bnx2x_fw_stats_data *) bp 2295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c ((u8 *)bp->fw_stats + bp->fw_stats_req_sz); bp 2296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_data_mapping = bp->fw_stats_mapping + bp 2297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_stats_req_sz; bp 2300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c U64_HI(bp->fw_stats_req_mapping), bp 2301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c U64_LO(bp->fw_stats_req_mapping)); bp 2303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c U64_HI(bp->fw_stats_data_mapping), bp 2304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c U64_LO(bp->fw_stats_data_mapping)); bp 2308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fw_stats_mem(bp); bp 2314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_nic_load_request(struct bnx2x *bp, u32 *load_code) bp 2319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_seq = bp 2320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) & bp 2322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_DEV_INFO("fw_seq 0x%08x\n", bp->fw_seq); bp 2325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_drv_pulse_wr_seq = bp 2326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_pulse_mb) & bp 2328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_DEV_INFO("drv_pulse 0x%x\n", bp->fw_drv_pulse_wr_seq); bp 2332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_MF_SD(bp) && bnx2x_port_after_undi(bp)) bp 2336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (*load_code) = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, param); bp 2358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_compare_fw_ver(struct bnx2x *bp, u32 load_code, bool print_err) bp 2370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u32 loaded_fw = REG_RD(bp, XSEM_REG_PRAM); bp 2390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_nic_load_no_mcp(struct bnx2x *bp, int port) bp 2392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int path = BP_PATH(bp); bp 2411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_nic_load_pmf(struct bnx2x *bp, u32 load_code) bp 2416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->port.pmf = 1; bp 2423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->port.pmf = 0; bp 2426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf); bp 2429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_nic_load_afex_dcc(struct bnx2x *bp, int load_code) bp 2433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->common.shmem2_base)) { bp 2434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (SHMEM2_HAS(bp, dcc_support)) bp 2435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, dcc_support, bp 2438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (SHMEM2_HAS(bp, afex_driver_support)) bp 2439 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, afex_driver_support, bp 2444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->afex_def_vlan_tag = -1; bp 2456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_bz_fp(struct bnx2x *bp, int index) bp 2458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[index]; bp 2472 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp->bp = bp; bp 2475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp->max_cos = bp->max_cos; bp 2482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp->txdata_ptr[0] = &bp->bnx2x_txq[FCOE_TXQ_IDX(bp)]; bp 2485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp->txdata_ptr[cos] = &bp->bnx2x_txq[cos * bp 2486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_NUM_ETH_QUEUES(bp) + index]; bp 2491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->dev->features & NETIF_F_LRO) bp 2493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c else if (bp->dev->features & NETIF_F_GRO_HW) bp 2501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->disable_tpa || IS_FCOE_FP(fp)) bp 2505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_set_os_driver_state(struct bnx2x *bp, u32 state) bp 2509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!IS_MF_BD(bp) || !SHMEM2_HAS(bp, os_driver_state) || IS_VF(bp)) bp 2512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c cur = SHMEM2_RD(bp, os_driver_state[BP_FW_MB_IDX(bp)]); bp 2516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, os_driver_state[BP_FW_MB_IDX(bp)], state); bp 2519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_load_cnic(struct bnx2x *bp) bp 2521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int i, rc, port = BP_PORT(bp); bp 2525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mutex_init(&bp->cnic_mutex); bp 2527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_alloc_mem_cnic(bp); bp 2531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT_CNIC(bp, load_error_cnic0); bp 2535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_alloc_fp_mem_cnic(bp); bp 2538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT_CNIC(bp, load_error_cnic0); bp 2542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_set_real_num_queues(bp, 1); bp 2545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT_CNIC(bp, load_error_cnic0); bp 2549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_add_all_napi_cnic(bp); bp 2551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_enable_cnic(bp); bp 2553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_init_hw_func_cnic(bp); bp 2555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT_CNIC(bp, load_error_cnic1); bp 2557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_init_cnic(bp); bp 2559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR(bp, TM_REG_EN_LINEAR0_TIMER + port*4, 1); bp 2564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_cnic_queue(bp, i) { bp 2565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_setup_queue(bp, &bp->fp[i], 0); bp 2568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error_cnic2); bp 2574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_rx_mode_inner(bp); bp 2577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_get_iscsi_info(bp); bp 2578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_setup_cnic_irq_info(bp); bp 2579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_setup_cnic_info(bp); bp 2580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->cnic_loaded = true; bp 2581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->state == BNX2X_STATE_OPEN) bp 2582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_cnic_notify(bp, CNIC_CTL_START_CMD); bp 2591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR(bp, TM_REG_EN_LINEAR0_TIMER + port*4, 0); bp 2594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_disable_cnic(bp); bp 2596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_set_real_num_queues(bp, 0)) bp 2600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem_cnic(bp); bp 2601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_mem_cnic(bp); bp 2607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_nic_load(struct bnx2x *bp, int load_mode) bp 2609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int port = BP_PORT(bp); bp 2614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c "CNIC is %s\n", CNIC_ENABLED(bp) ? "enabled" : "disabled"); bp 2617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) { bp 2623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD; bp 2626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c memset(&bp->last_reported_link, 0, sizeof(bp->last_reported_link)); bp 2628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c &bp->last_reported_link.link_report_flags); bp 2630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_ilt_set_info(bp); bp 2639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c DP(NETIF_MSG_IFUP, "num queues: %d", bp->num_queues); bp 2640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_queue(bp, i) bp 2641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_bz_fp(bp, i); bp 2642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c memset(bp->bnx2x_txq, 0, (BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS + bp 2643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_cnic_queues) * bp 2646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fcoe_init = false; bp 2649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_rx_buf_size(bp); bp 2651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_alloc_mem(bp); bp 2662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_alloc_fp_mem(bp); bp 2665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error0); bp 2669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_fw_stats_mem(bp)) bp 2670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error0); bp 2673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_VF(bp)) { bp 2674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_vfpf_init(bp); bp 2676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error0); bp 2683 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_set_real_num_queues(bp, 0); bp 2686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error0); bp 2693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_setup_tc(bp->dev, bp->max_cos); bp 2696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_add_all_napi(bp); bp 2698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_enable(bp); bp 2700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_pf_load(bp); bp 2705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!BP_NOMCP(bp)) { bp 2707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_nic_load_request(bp, &load_code); bp 2709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error1); bp 2712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_compare_fw_ver(bp, load_code, true); bp 2714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0); bp 2715 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error2); bp 2718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c load_code = bnx2x_nic_load_no_mcp(bp, port); bp 2722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_load_pmf(bp, load_code); bp 2725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x__init_func_obj(bp); bp 2728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_init_hw(bp, load_code); bp 2731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0); bp 2732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error2); bp 2736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_pre_irq_nic_init(bp); bp 2739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_setup_irqs(bp); bp 2742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2743 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0); bp 2744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error2); bp 2748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_post_irq_nic_init(bp, load_code); bp 2752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_init_bp_objs(bp); bp 2753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_iov_nic_init(bp); bp 2756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->afex_def_vlan_tag = -1; bp 2757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_load_afex_dcc(bp, load_code); bp 2758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_OPENING_WAIT4_PORT; bp 2759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_func_start(bp); bp 2762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0); bp 2764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!BP_NOMCP(bp)) { bp 2769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c load_code = bnx2x_fw_command(bp, bp 2774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_coalesce(bp); bp 2783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_setup_leading(bp); bp 2786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_nondefault_eth_queue(bp, i) { bp 2791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_setup_queue(bp, &bp->fp[i], false); bp 2794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_vfpf_setup_q(bp, &bp->fp[i], false); bp 2797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_init_rss(bp); bp 2805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_OPEN; bp 2812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2813 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_set_eth_mac(bp, true); bp 2815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_vfpf_config_mac(bp, bp->dev->dev_addr, bp->fp->index, bp 2819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && bp->pending_max) { bp 2823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_max_mf_config(bp, bp->pending_max); bp 2824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->pending_max = 0; bp 2827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->force_link_down = false; bp 2828 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->port.pmf) { bp 2829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_initial_phy_init(bp, load_mode); bp 2831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2833 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_BOOT_FROM_SAN; bp 2838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_vlan_reconfigure_vid(bp); bp 2840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c LOAD_ERROR_EXIT(bp, load_error3); bp 2843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_rx_mode_inner(bp); bp 2845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & PTP_SUPPORTED) { bp 2846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_register_phc(bp); bp 2847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_init_ptp(bp); bp 2848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_configure_ptp_filters(bp); bp 2854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_tx_wake_all_queues(bp->dev); bp 2858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netif_tx_start_all_queues(bp->dev); bp 2864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_DIAG; bp 2871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->port.pmf) bp 2872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_PORT_MASK, 0); bp 2874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x__link_status_update(bp); bp 2877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 2879 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_ENABLED(bp)) bp 2880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_load_cnic(bp); bp 2882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_GET_DRV_VERSION, 0); bp 2885 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) { bp 2888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c val = SHMEM2_RD(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)]); bp 2890 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c val |= (bp->dev->mtu << DRV_FLAGS_MTU_SHIFT); bp 2891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)], bp 2897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && !bnx2x_wait_sp_comp(bp, ~0x0UL)) { bp 2899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_unload(bp, UNLOAD_CLOSE, false); bp 2904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_mfw_dump(bp); bp 2908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->port.pmf && (bp->state != BNX2X_STATE_DIAG)) bp 2909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_dcbx_init(bp, false); bp 2911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp)) bp 2912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_ACTIVE); bp 2920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 2921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_int_disable_sync(bp, 1); bp 2924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_squeeze_objects(bp); bp 2928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_skbs(bp); bp 2929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue(bp, i) bp 2930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); bp 2933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_irq(bp); bp 2935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && !BP_NOMCP(bp)) { bp 2936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP, 0); bp 2937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, 0); bp 2940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->port.pmf = 0; bp 2942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_napi_disable(bp); bp 2943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_del_all_napi(bp); bp 2946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 2947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_clear_pf_load(bp); bp 2949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fw_stats_mem(bp); bp 2950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem(bp); bp 2951 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_mem(bp); bp 2957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_drain_tx_queues(struct bnx2x *bp) bp 2962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_tx_queue(bp, i) { bp 2963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 2966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_clean_tx_queue(bp, fp->txdata_ptr[cos]); bp 2974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link) bp 2981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp)) bp 2982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_DISABLED); bp 2985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) { bp 2987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c val = SHMEM2_RD(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)]); bp 2988 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)], bp 2992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && bp->recovery_state != BNX2X_RECOVERY_DONE && bp 2993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->state == BNX2X_STATE_CLOSED || bp 2994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state == BNX2X_STATE_ERROR)) { bp 3002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->recovery_state = BNX2X_RECOVERY_DONE; bp 3003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->is_leader = 0; bp 3004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_release_leader_lock(bp); bp 3018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->state == BNX2X_STATE_CLOSED || bp->state == BNX2X_STATE_ERROR) bp 3025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT; bp 3029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_iov_channel_down(bp); bp 3031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 3032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD); bp 3035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_tx_disable(bp); bp 3036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_reset_tc(bp->dev); bp 3038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->rx_mode = BNX2X_RX_MODE_NONE; bp 3040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c del_timer_sync(&bp->timer); bp 3042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && !BP_NOMCP(bp)) { bp 3044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE; bp 3045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_drv_pulse(bp); bp 3046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 3047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_save_statistics(bp); bp 3055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_drain_tx_queues(bp); bp 3060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_VF(bp)) { bp 3061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_clear_vlan_info(bp); bp 3062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_vfpf_close_vf(bp); bp 3065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_chip_cleanup(bp, unload_mode, keep_link); bp 3068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_send_unload_req(bp, unload_mode); bp 3076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) bp 3077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_pf_disable(bp); bp 3080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_netif_stop(bp, 1); bp 3082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_del_all_napi(bp); bp 3083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 3084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_del_all_napi_cnic(bp); bp 3086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_irq(bp); bp 3089 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_send_unload_done(bp, false); bp 3096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 3097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_squeeze_objects(bp); bp 3100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->sp_state = 0; bp 3102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->port.pmf = 0; bp 3105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->sp_rtnl_state = 0; bp 3109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_skbs(bp); bp 3110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 3111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_skbs_cnic(bp); bp 3112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_rx_queue(bp, i) bp 3113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); bp 3115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem(bp); bp 3116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 3117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem_cnic(bp); bp 3119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) { bp 3120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_LOADED(bp)) bp 3121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_mem_cnic(bp); bp 3123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_mem(bp); bp 3125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->state = BNX2X_STATE_CLOSED; bp 3126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->cnic_loaded = false; bp 3129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && !BP_NOMCP(bp)) bp 3130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_update_mng_version(bp); bp 3135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && bnx2x_chk_parity_attn(bp, &global, false)) { bp 3136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_reset_in_progress(bp); bp 3140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_reset_global(bp); bp 3146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && bp 3147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c !bnx2x_clear_pf_load(bp) && bp 3148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_reset_is_done(bp, BP_PATH(bp))) bp 3149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_disable_close_the_gate(bp); bp 3156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state) bp 3161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->pdev->pm_cap) { bp 3166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c pci_read_config_word(bp->pdev, bp->pdev->pm_cap + PCI_PM_CTRL, &pmcsr); bp 3170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c pci_write_config_word(bp->pdev, bp->pdev->pm_cap + PCI_PM_CTRL, bp 3182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (atomic_read(&bp->pdev->enable_cnt) != 1) bp 3185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CHIP_REV_IS_SLOW(bp)) bp 3191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->wol) bp 3194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c pci_write_config_word(bp->pdev, bp->pdev->pm_cap + PCI_PM_CTRL, bp 3203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dev_err(&bp->pdev->dev, "Can't support state = %d\n", state); bp 3216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 3221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) { bp 3228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_tx_int(bp, fp->txdata_ptr[cos]); bp 3261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_ack_sb(bp, fp->igu_sb_id, USTORM_ID, bp 3278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u16 bnx2x_tx_split(struct bnx2x *bp, bp 3337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb) bp 3355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp) && skb->encapsulation) { bp 3394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_pkt_req_lin(struct bnx2x *bp, struct sk_buff *skb, bp 3515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u8 bnx2x_set_pbd_csum_enc(struct bnx2x *bp, struct sk_buff *skb, bp 3549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u8 bnx2x_set_pbd_csum_e2(struct bnx2x *bp, struct sk_buff *skb, bp 3571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_set_sbd_csum(struct bnx2x *bp, struct sk_buff *skb, bp 3592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static u8 bnx2x_set_pbd_csum(struct bnx2x *bp, struct sk_buff *skb, bp 3735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 3749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u32 xmit_type = bnx2x_xmit_type(bp, skb); bp 3757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bp->panic)) bp 3764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BUG_ON(txq_index >= MAX_ETH_TXQ_IDX(bp) + (CNIC_LOADED(bp) ? 1 : 0)); bp 3766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c txdata = &bp->bnx2x_txq[txq_index]; bp 3777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bnx2x_tx_avail(bp, txdata) < bp 3784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, txdata->parent_fp); bp 3789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, txdata->parent_fp)->driver_xoff++; bp 3816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_pkt_req_lin(bp, skb, xmit_type)) { bp 3818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->lin_cnt++; bp 3828 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mapping = dma_map_single(&bp->pdev->dev, skb->data, bp 3830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 3862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!(bp->flags & TX_TIMESTAMPING_EN)) { bp 3863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->eth_stats.ptp_skip_tx_ts++; bp 3865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c } else if (bp->ptp_tx_skb) { bp 3866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->eth_stats.ptp_skip_tx_ts++; bp 3867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_err_once(bp->dev, bp 3872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->ptp_tx_skb = skb_get(skb); bp 3873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->ptp_tx_start = jiffies; bp 3874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c schedule_work(&bp->ptp_task); bp 3901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_VF(bp)) { bp 3928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_sbd_csum(bp, skb, tx_start_bd, xmit_type); bp 3930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) { bp 3938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c hlen = bnx2x_set_pbd_csum_enc(bp, skb, bp 3972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c hlen = bnx2x_set_pbd_csum_e2(bp, skb, bp 3981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_VF(bp)) { bp 3993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->flags & TX_SWITCHING) bp 4018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c hlen = bnx2x_set_pbd_csum(bp, skb, pbd_e1x, xmit_type); bp 4049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bd_prod = bnx2x_tx_split(bp, txdata, tx_buf, bp 4053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) bp 4074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, bp 4076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 4088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_tx_pkt(bp, txdata, bp 4172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); bp 4176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_DESC_PER_TX_PKT)) { bp 4184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_qstats(bp, txdata->parent_fp)->driver_xoff++; bp 4185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_tx_avail(bp, txdata) >= MAX_DESC_PER_TX_PKT) bp 4193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_get_c2s_mapping(struct bnx2x *bp, u8 *c2s_map, u8 *c2s_default) bp 4195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int mfw_vn = BP_FW_MB_IDX(bp); bp 4199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!IS_MF_BD(bp)) { bp 4209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c tmp = SHMEM2_RD(bp, c2s_pcp_map_lower[mfw_vn]); bp 4216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c tmp = SHMEM2_RD(bp, c2s_pcp_map_upper[mfw_vn]); bp 4223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c tmp = SHMEM2_RD(bp, c2s_pcp_map_default[mfw_vn]); bp 4238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (num_tc > bp->max_cos) { bp 4254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c num_tc, bp->max_cos); bp 4264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_get_c2s_mapping(bp, c2s_map, &c2s_def); bp 4270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_set_prio_tc_map(dev, prio, bp->prio_to_cos[outer_prio]); bp 4273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c outer_prio, bp->prio_to_cos[outer_prio]); bp 4287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (cos = 0; cos < bp->max_cos; cos++) { bp 4288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c count = BNX2X_NUM_ETH_QUEUES(bp); bp 4289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c offset = cos * BNX2X_NUM_NON_CNIC_QUEUES(bp); bp 4316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_MF_STORAGE_ONLY(bp)) { bp 4330 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_set_eth_mac(bp, false); bp 4338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_set_eth_mac(bp, true); bp 4340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && SHMEM2_HAS(bp, curr_cfg)) bp 4341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, curr_cfg, CURR_CFG_MET_OS); bp 4346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_fp_mem_at(struct bnx2x *bp, int fp_index) bp 4348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c union host_hc_status_block *sb = &bnx2x_fp(bp, fp_index, status_blk); bp 4349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[fp_index]; bp 4359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) bp 4361 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, fp_index, bp 4366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, fp_index, bp 4372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!skip_rx_queue(bp, fp_index)) { bp 4376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_FREE(bnx2x_fp(bp, fp_index, rx_buf_ring)); bp 4377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_FREE(bnx2x_fp(bp, fp_index, rx_desc_ring), bp 4378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, fp_index, rx_desc_mapping), bp 4381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_FREE(bnx2x_fp(bp, fp_index, rx_comp_ring), bp 4382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, fp_index, rx_comp_mapping), bp 4387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_FREE(bnx2x_fp(bp, fp_index, rx_page_ring)); bp 4388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_FREE(bnx2x_fp(bp, fp_index, rx_sge_ring), bp 4389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, fp_index, rx_sge_mapping), bp 4394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!skip_tx_queue(bp, fp_index)) { bp 4412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void bnx2x_free_fp_mem_cnic(struct bnx2x *bp) bp 4415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_cnic_queue(bp, i) bp 4416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem_at(bp, i); bp 4419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_free_fp_mem(struct bnx2x *bp) bp 4422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_eth_queue(bp, i) bp 4423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem_at(bp, i); bp 4426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void set_sb_shortcuts(struct bnx2x *bp, int index) bp 4428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c union host_hc_status_block status_blk = bnx2x_fp(bp, index, status_blk); bp 4429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) { bp 4430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, sb_index_values) = bp 4432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, sb_running_index) = bp 4435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, sb_index_values) = bp 4437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, sb_running_index) = bp 4446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = fp->bp; bp 4457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_rx_data(bp, fp, ring_prod, GFP_KERNEL) < 0) { bp 4475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp_stats(bp, fp)->eth_q_stats.rx_skb_alloc_failed += failure_cnt; bp 4498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index) bp 4501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x_fastpath *fp = &bp->fp[index]; bp 4506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->rx_ring_size && IS_MF_STORAGE_ONLY(bp)) { bp 4508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->rx_ring_size = rx_ring_size; bp 4509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c } else if (!bp->rx_ring_size) { bp 4510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rx_ring_size = MAX_RX_AVAIL/BNX2X_NUM_RX_QUEUES(bp); bp 4512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CHIP_IS_E3(bp)) { bp 4513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u32 cfg = SHMEM_RD(bp, bp 4514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c dev_info.port_hw_config[BP_PORT(bp)]. bp 4524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rx_ring_size = max_t(int, bp->disable_tpa ? MIN_RX_SIZE_NONTPA : bp 4527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->rx_ring_size = rx_ring_size; bp 4529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rx_ring_size = bp->rx_ring_size; bp 4534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c sb = &bnx2x_fp(bp, index, status_blk); bp 4538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!CHIP_IS_E1x(bp)) { bp 4539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c sb->e2_sb = BNX2X_PCI_ALLOC(&bnx2x_fp(bp, index, status_blk_mapping), bp 4544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c sb->e1x_sb = BNX2X_PCI_ALLOC(&bnx2x_fp(bp, index, status_blk_mapping), bp 4555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c set_sb_shortcuts(bp, index); bp 4558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!skip_tx_queue(bp, index)) { bp 4580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!skip_rx_queue(bp, index)) { bp 4582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, rx_buf_ring) = bp 4584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fp(bp, index, rx_buf_ring)) bp 4586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, rx_desc_ring) = bp 4587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_ALLOC(&bnx2x_fp(bp, index, rx_desc_mapping), bp 4589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fp(bp, index, rx_desc_ring)) bp 4593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, rx_comp_ring) = bp 4594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_FALLOC(&bnx2x_fp(bp, index, rx_comp_mapping), bp 4596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fp(bp, index, rx_comp_ring)) bp 4600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, rx_page_ring) = bp 4603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fp(bp, index, rx_page_ring)) bp 4605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_fp(bp, index, rx_sge_ring) = bp 4606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_PCI_ALLOC(&bnx2x_fp(bp, index, rx_sge_mapping), bp 4608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bnx2x_fp(bp, index, rx_sge_ring)) bp 4635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_fp_mem_at(bp, index); bp 4641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp) bp 4643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!NO_FCOE(bp)) bp 4645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_fp_mem_at(bp, FCOE_IDX(bp))) bp 4654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_alloc_fp_mem(struct bnx2x *bp) bp 4663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_fp_mem_at(bp, 0)) bp 4667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for_each_nondefault_eth_queue(bp, i) bp 4668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bnx2x_alloc_fp_mem_at(bp, i)) bp 4672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (i != BNX2X_NUM_ETH_QUEUES(bp)) { bp 4673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int delta = BNX2X_NUM_ETH_QUEUES(bp) - i; bp 4676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_shrink_eth_fp(bp, delta); bp 4677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (CNIC_SUPPORT(bp)) bp 4684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_move_fp(bp, FCOE_IDX(bp), FCOE_IDX(bp) - delta); bp 4685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_ethernet_queues -= delta; bp 4686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues = bp->num_ethernet_queues + bp 4687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_cnic_queues; bp 4689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->num_queues + delta, bp->num_queues); bp 4695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_free_mem_bp(struct bnx2x *bp) bp 4699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (i = 0; i < bp->fp_array_size; i++) bp 4700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->fp[i].tpa_info); bp 4701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->fp); bp 4702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->sp_objs); bp 4703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->fp_stats); bp 4704 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->bnx2x_txq); bp 4705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->msix_table); bp 4706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c kfree(bp->ilt); bp 4709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_alloc_mem_bp(struct bnx2x *bp) bp 4722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c msix_table_size = bp->igu_sb_cnt; bp 4723 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp)) bp 4728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp_array_size = BNX2X_MAX_RSS_COUNT(bp) + CNIC_SUPPORT(bp); bp 4729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fp_array_size = fp_array_size; bp 4730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_DEV_INFO("fp_array_size %d\n", bp->fp_array_size); bp 4732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c fp = kcalloc(bp->fp_array_size, sizeof(*fp), GFP_KERNEL); bp 4735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c for (i = 0; i < bp->fp_array_size; i++) { bp 4743 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fp = fp; bp 4746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->sp_objs = kcalloc(bp->fp_array_size, sizeof(struct bnx2x_sp_objs), bp 4748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->sp_objs) bp 4752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->fp_stats = kcalloc(bp->fp_array_size, sizeof(struct bnx2x_fp_stats), bp 4754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->fp_stats) bp 4759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS + CNIC_SUPPORT(bp); bp 4762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->bnx2x_txq = kcalloc(txq_array_size, sizeof(struct bnx2x_fp_txdata), bp 4764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->bnx2x_txq) bp 4771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->msix_table = tbl; bp 4777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->ilt = ilt; bp 4781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_free_mem_bp(bp); bp 4787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, true); bp 4793 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c return bnx2x_nic_load(bp, LOAD_NORMAL); bp 4796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_get_cur_phy_idx(struct bnx2x *bp) bp 4799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_params.num_phys <= 1) bp 4802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_vars.link_up) { bp 4805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if ((bp->link_vars.link_status & LINK_STATUS_SERDES_LINK) && bp 4806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c (bp->link_params.phy[EXT_PHY2].supported & SUPPORTED_FIBRE)) bp 4810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c switch (bnx2x_phy_selection(&bp->link_params)) { bp 4825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int bnx2x_get_link_cfg_idx(struct bnx2x *bp) bp 4827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u32 sel_phy_idx = bnx2x_get_cur_phy_idx(bp); bp 4834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_params.multi_phy_config & bp 4847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 4871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (pci_num_vf(bp->pdev)) { bp 4878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 4892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (IS_PF(bp) && SHMEM2_HAS(bp, curr_cfg)) bp 4893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c SHMEM2_WR(bp, curr_cfg, CURR_CFG_MET_OS); bp 4901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (pci_num_vf(bp->pdev)) { bp 4909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!(features & NETIF_F_RXCSUM) && !bp->disable_tpa) { bp 4934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!pci_num_vf(bp->pdev)) { bp 4942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_params.loopback_mode != LOOPBACK_BMAC) { bp 4943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->link_params.loopback_mode = LOOPBACK_BMAC; bp 4947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->link_params.loopback_mode != LOOPBACK_NONE) { bp 4948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp->link_params.loopback_mode = LOOPBACK_NONE; bp 4961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->recovery_state == BNX2X_RECOVERY_DONE) { bp 4974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp = netdev_priv(dev); bp 4979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (!bp->panic) bp 4981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_panic_dump(bp, false); bp 4987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_TX_TIMEOUT, 0); bp 4993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp; bp 4999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp = netdev_priv(dev); bp 5012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_nic_unload(bp, UNLOAD_CLOSE, false); bp 5014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_power_state(bp, pci_choose_state(pdev, state)); bp 5024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct bnx2x *bp; bp 5031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bp = netdev_priv(dev); bp 5033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 5047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c bnx2x_set_power_state(bp, PCI_D0); bp 5050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c rc = bnx2x_nic_load(bp, LOAD_OPEN); bp 5057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_set_ctx_validation(struct bnx2x *bp, struct eth_context *cxt, bp 5067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c CDU_RSRVD_VALUE_TYPE_A(HW_CID(bp, cid), bp 5071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c CDU_RSRVD_VALUE_TYPE_A(HW_CID(bp, cid), bp 5075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void storm_memset_hc_timeout(struct bnx2x *bp, u8 port, bp 5081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR8(bp, addr, ticks); bp 5087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static void storm_memset_hc_disable(struct bnx2x *bp, u8 port, bp 5094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c u8 flags = REG_RD8(bp, addr); bp 5098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c REG_WR8(bp, addr, flags); bp 5104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_update_coalesce_sb_index(struct bnx2x *bp, u8 fw_sb_id, bp 5107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c int port = BP_PORT(bp); bp 5110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c storm_memset_hc_timeout(bp, port, fw_sb_id, sb_index, ticks); bp 5113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c storm_memset_hc_disable(bp, port, fw_sb_id, sb_index, disable); bp 5116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c void bnx2x_schedule_sp_rtnl(struct bnx2x *bp, enum sp_rtnl_flag flag, bp 5120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c set_bit(flag, &bp->sp_rtnl_state); bp 5124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c schedule_delayed_work(&bp->sp_rtnl_task, 0); bp 39 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h dma_free_coherent(&bp->pdev->dev, size, (void *)x, y); \ bp 55 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ bp 64 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ bp 87 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode); bp 95 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_send_unload_done(struct bnx2x *bp, bool keep_link); bp 106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_rss(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj, bp 118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x__init_func_obj(struct bnx2x *bp); bp 128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_setup_queue(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_setup_leading(struct bnx2x *bp); bp 147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 bnx2x_fw_command(struct bnx2x *bp, u32 command, u32 param); bp 155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode); bp 162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_link_set(struct bnx2x *bp); bp 170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_force_link_reset(struct bnx2x *bp); bp 180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u8 bnx2x_link_test(struct bnx2x *bp, u8 is_serdes); bp 190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_drv_pulse(struct bnx2x *bp); bp 202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_igu_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 segment, bp 206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_pf_disable(struct bnx2x *bp); bp 207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val); bp 214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x__link_status_update(struct bnx2x *bp); bp 221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_link_report(struct bnx2x *bp); bp 224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void __bnx2x_link_report(struct bnx2x *bp); bp 233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u16 bnx2x_get_mf_speed(struct bnx2x *bp); bp 257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_cnic_notify(struct bnx2x *bp, int cmd); bp 264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_setup_cnic_irq_info(struct bnx2x *bp); bp 271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_setup_cnic_info(struct bnx2x *bp); bp 278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_int_enable(struct bnx2x *bp); bp 289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw); bp 302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_nic_init_cnic(struct bnx2x *bp); bp 314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_pre_irq_nic_init(struct bnx2x *bp); bp 327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_post_irq_nic_init(struct bnx2x *bp, u32 load_code); bp 333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_alloc_mem_cnic(struct bnx2x *bp); bp 339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_alloc_mem(struct bnx2x *bp); bp 346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_mem_cnic(struct bnx2x *bp); bp 352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_mem(struct bnx2x *bp); bp 359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_num_queues(struct bnx2x *bp); bp 372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode, bool keep_link); bp 380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_acquire_hw_lock(struct bnx2x *bp, u32 resource); bp 388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_release_hw_lock(struct bnx2x *bp, u32 resource); bp 395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_release_leader_lock(struct bnx2x *bp); bp 405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_set_eth_mac(struct bnx2x *bp, bool set); bp 416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_rx_mode_inner(struct bnx2x *bp); bp 419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_pf_load(struct bnx2x *bp); bp 420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bool bnx2x_clear_pf_load(struct bnx2x *bp); bp 421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bool bnx2x_chk_parity_attn(struct bnx2x *bp, bool *global, bool print); bp 422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bool bnx2x_reset_is_done(struct bnx2x *bp, int engine); bp 423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_reset_in_progress(struct bnx2x *bp); bp 424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_reset_global(struct bnx2x *bp); bp 425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_disable_close_the_gate(struct bnx2x *bp); bp 426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_init_hw_func_cnic(struct bnx2x *bp); bp 428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_clear_vlan_info(struct bnx2x *bp); bp 443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_ilt_set_info(struct bnx2x *bp); bp 451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_ilt_set_info_cnic(struct bnx2x *bp); bp 458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem); bp 468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state); bp 476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_update_max_mf_config(struct bnx2x *bp, u32 value); bp 478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_fw_dump_lvl(struct bnx2x *bp, const char *lvl); bp 481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link); bp 484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_nic_load(struct bnx2x *bp, int load_mode); bp 505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_update_rx_prod(struct bnx2x *bp, bp 528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR_RELAXED(bp, fp->ustorm_rx_prods_offset + i * 4, bp 542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata); bp 549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_irq(struct bnx2x *bp); bp 551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_fp_mem(struct bnx2x *bp); bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_init_rx_rings(struct bnx2x *bp); bp 553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_init_rx_rings_cnic(struct bnx2x *bp); bp 554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_skbs(struct bnx2x *bp); bp 555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw); bp 556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_netif_start(struct bnx2x *bp); bp 557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_load_cnic(struct bnx2x *bp); bp 567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_enable_msix(struct bnx2x *bp); bp 574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_enable_msi(struct bnx2x *bp); bp 581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_alloc_mem_bp(struct bnx2x *bp); bp 588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_free_mem_bp(struct bnx2x *bp); bp 628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_get_c2s_mapping(struct bnx2x *bp, u8 *c2s_map, u8 *c2s_default); bp 638 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_igu_ack_sb_gen(struct bnx2x *bp, u8 igu_sb_id, bp 652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, igu_addr, cmd_data.sb_id_and_flags); bp 658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_hc_ack_sb(struct bnx2x *bp, u8 sb_id, bp 661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 + bp 672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, hc_addr, (*(u32 *)&igu_ack)); bp 678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 storm, bp 681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->common.int_block == INT_BLOCK_HC) bp 682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_hc_ack_sb(bp, igu_sb_id, storm, index, op, update); bp 686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (CHIP_INT_MODE_IS_BC(bp)) bp 688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h else if (igu_sb_id != bp->igu_dsb_id) bp 694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_igu_ack_sb(bp, igu_sb_id, segment, index, op, update); bp 698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u16 bnx2x_hc_ack_int(struct bnx2x *bp) bp 700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp)*32 + bp 702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 result = REG_RD(bp, hc_addr); bp 708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u16 bnx2x_igu_ack_int(struct bnx2x *bp) bp 711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h u32 result = REG_RD(bp, igu_addr); bp 720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u16 bnx2x_ack_int(struct bnx2x *bp) bp 723 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->common.int_block == INT_BLOCK_HC) bp 724 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bnx2x_hc_ack_int(bp); bp 726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bnx2x_igu_ack_int(bp); bp 736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u16 bnx2x_tx_avail(struct bnx2x *bp, bp 795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_tx_disable(struct bnx2x *bp) bp 797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_tx_disable(bp->dev); bp 798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_carrier_off(bp->dev); bp 801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_free_rx_sge(struct bnx2x *bp, bp 815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h dma_unmap_page(&bp->pdev->dev, dma_unmap_addr(sw_buf, mapping), bp 825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_del_all_napi_cnic(struct bnx2x *bp) bp 829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h for_each_rx_queue_cnic(bp, i) { bp 830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h napi_hash_del(&bnx2x_fp(bp, i, napi)); bp 831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_napi_del(&bnx2x_fp(bp, i, napi)); bp 835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_del_all_napi(struct bnx2x *bp) bp 839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h for_each_eth_queue(bp, i) { bp 840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h napi_hash_del(&bnx2x_fp(bp, i, napi)); bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_napi_del(&bnx2x_fp(bp, i, napi)); bp 845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_set_int_mode(struct bnx2x *bp); bp 847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_disable_msi(struct bnx2x *bp) bp 849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->flags & USING_MSIX_FLAG) { bp 850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h pci_disable_msix(bp->pdev); bp 851 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bp->flags &= ~(USING_MSIX_FLAG | USING_SINGLE_MSIX_FLAG); bp 852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h } else if (bp->flags & USING_MSI_FLAG) { bp 853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h pci_disable_msi(bp->pdev); bp 854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bp->flags &= ~USING_MSI_FLAG; bp 906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline int func_by_vn(struct bnx2x *bp, int vn) bp 908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return 2 * vn + BP_PORT(bp); bp 911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline int bnx2x_config_rss_eth(struct bnx2x *bp, bool config_hash) bp 913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bnx2x_rss(bp, &bp->rss_conf_obj, config_hash, true); bp 923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline int bnx2x_func_start(struct bnx2x *bp) bp 933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h func_params.f_obj = &bp->func_obj; bp 937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h start_params->mf_mode = bp->mf_mode; bp 938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h start_params->sd_vlan_tag = bp->mf_ov; bp 941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (IS_MF_BD(bp)) { bp 944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, PRS_REG_VLAN_TYPE_0, ETH_P_8021AD); bp 945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, PBF_REG_VLAN_TYPE_0, ETH_P_8021AD); bp 946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, NIG_REG_LLH_E1HOV_TYPE_1, ETH_P_8021AD); bp 948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_get_c2s_mapping(bp, start_params->c2s_pri, bp 961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (CHIP_IS_E2(bp) || CHIP_IS_E3(bp)) bp 965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].count) { bp 966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].dst_port; bp 969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].count) { bp 970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].dst_port; bp 976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (IS_MF_UFP(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) { bp 982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bnx2x_func_state_change(bp, &func_params); bp 1004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_free_rx_mem_pool(struct bnx2x *bp, bp 1015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_free_rx_sge_range(struct bnx2x *bp, bp 1024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_free_rx_sge(bp, fp, i); bp 1026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_free_rx_mem_pool(bp, &fp->page_pool); bp 1051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h struct bnx2x *bp = fp->bp; bp 1052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (!CHIP_IS_E1x(bp)) { bp 1055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bp->cnic_base_cl_id + (bp->pf_num >> 1); bp 1058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x; bp 1064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h struct bnx2x *bp = fp->bp; bp 1067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_mac_obj(bp, &bnx2x_sp_obj(bp, fp).mac_obj, fp->cl_id, bp 1068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h fp->cid, BP_FUNC(bp), bnx2x_sp(bp, mac_rdata), bp 1069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp_mapping(bp, mac_rdata), bp 1071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h &bp->sp_state, obj_type, bp 1072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h &bp->macs_pool); bp 1074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (!CHIP_IS_E1x(bp)) bp 1075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_vlan_obj(bp, &bnx2x_sp_obj(bp, fp).vlan_obj, bp 1076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h fp->cl_id, fp->cid, BP_FUNC(bp), bp 1077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp(bp, vlan_rdata), bp 1078 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp_mapping(bp, vlan_rdata), bp 1080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h &bp->sp_state, obj_type, bp 1081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h &bp->vlans_pool); bp 1092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp) bp 1097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (CHIP_IS_E1(bp)) bp 1103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (CHIP_REV_IS_SLOW(bp)) { bp 1104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (IS_MF(bp)) bp 1111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h MF_CFG_RD(bp, bp 1112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h func_mf_config[BP_PATH(bp) + 2 * i]. bp 1124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_init_bp_objs(struct bnx2x *bp) bp 1127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_rx_mode_obj(bp, &bp->rx_mode_obj); bp 1130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid, bp 1131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h BP_FUNC(bp), BP_FUNC(bp), bp 1132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp(bp, mcast_rdata), bp 1133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp_mapping(bp, mcast_rdata), bp 1134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h BNX2X_FILTER_MCAST_PENDING, &bp->sp_state, bp 1138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_mac_credit_pool(bp, &bp->macs_pool, BP_FUNC(bp), bp 1139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_get_path_func_num(bp)); bp 1141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_vlan_credit_pool(bp, &bp->vlans_pool, BP_FUNC(bp), bp 1142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_get_path_func_num(bp)); bp 1145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_init_rss_config_obj(bp, &bp->rss_conf_obj, bp->fp->cl_id, bp 1146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bp->fp->cid, BP_FUNC(bp), BP_FUNC(bp), bp 1147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp(bp, rss_rdata), bp 1148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_sp_mapping(bp, rss_rdata), bp 1149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h BNX2X_FILTER_RSS_CONF_PENDING, &bp->sp_state, bp 1152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bp->vlan_credit = PF_VLAN_CREDIT_E2(bp, bnx2x_get_path_func_num(bp)); bp 1157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (CHIP_IS_E1x(fp->bp)) bp 1158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return fp->cl_id + BP_PORT(fp->bp) * ETH_MAX_RX_CLIENTS_E1H; bp 1163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_init_txdata(struct bnx2x *bp, bp 1172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h txdata->tx_ring_size = IS_FCOE_FP(fp) ? MAX_TX_AVAIL : bp->tx_ring_size; bp 1178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) bp 1180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bp->cnic_base_cl_id + cl_idx + bp 1181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h (bp->pf_num >> 1) * BNX2X_MAX_CNIC_ETH_CL_ID_IDX; bp 1184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) bp 1187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bp->base_fw_ndsb; bp 1190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u8 bnx2x_cnic_igu_sb_id(struct bnx2x *bp) bp 1192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h return bp->igu_base_sb; bp 1195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline int bnx2x_clean_tx_queue(struct bnx2x *bp, bp 1219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_get_link_cfg_idx(struct bnx2x *bp); bp 1221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void __storm_memset_struct(struct bnx2x *bp, bp 1226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, addr + (i * 4), data[i]); bp 1235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline bool bnx2x_wait_sp_comp(struct bnx2x *bp, unsigned long mask) bp 1241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_lock_bh(bp->dev); bp 1242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (!(bp->sp_state & mask)) { bp 1243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_unlock_bh(bp->dev); bp 1246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_unlock_bh(bp->dev); bp 1253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_lock_bh(bp->dev); bp 1254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (bp->sp_state & mask) { bp 1256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bp->sp_state, mask); bp 1257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_unlock_bh(bp->dev); bp 1260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h netif_addr_unlock_bh(bp->dev); bp 1272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_ctx_validation(struct bnx2x *bp, struct eth_context *cxt, bp 1275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_update_coalesce_sb_index(struct bnx2x *bp, u8 fw_sb_id, bp 1277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_acquire_phy_lock(struct bnx2x *bp); bp 1278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_release_phy_lock(struct bnx2x *bp); bp 1287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg) bp 1318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_get_iscsi_info(struct bnx2x *bp); bp 1326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_link_sync_notify(struct bnx2x *bp) bp 1332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) { bp 1333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (vn == BP_VN(bp)) bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h func = func_by_vn(bp, vn); bp 1337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_0 + bp 1350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h static inline void bnx2x_update_drv_flags(struct bnx2x *bp, u32 flags, u32 set) bp 1352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h if (SHMEM2_HAS(bp, drv_flags)) { bp 1354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_DRV_FLAGS); bp 1355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h drv_flags = SHMEM2_RD(bp, drv_flags); bp 1362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h SHMEM2_WR(bp, drv_flags, drv_flags); bp 1364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_DRV_FLAGS); bp 1378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len); bp 1380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_drain_tx_queues(struct bnx2x *bp); bp 1381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_squeeze_objects(struct bnx2x *bp); bp 1392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h void bnx2x_set_os_driver_state(struct bnx2x *bp, u32 state); bp 1402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h int bnx2x_nvram_read(struct bnx2x *bp, u32 offset, u8 *ret_buf, bp 35 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_pfc_set_pfc(struct bnx2x *bp); bp 36 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp); bp 37 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp, bp 40 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, bp 43 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp, bp 47 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp, bp 51 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_fw_struct(struct bnx2x *bp, bp 55 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_read_data(struct bnx2x *bp, u32 *buff, bp 60 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *buff = REG_RD(bp, addr + i); bp 63 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_write_data(struct bnx2x *bp, u32 *buff, bp 68 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c REG_WR(bp, addr + i, *buff); bp 71 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_pfc_set(struct bnx2x *bp) bp 78 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.num_of_cos; bp 81 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (i = 0; i < bp->dcbx_port_params.ets.num_of_cos; i++) bp 88 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.cos_params[i].pri_bitmask bp 89 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c & DCBX_PFC_PRI_PAUSE_MASK(bp); bp 99 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!(pri_bit & DCBX_PFC_PRI_PAUSE_MASK(bp))) bp 106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pfc_params.llfc_low_priority_classes = DCBX_PFC_PRI_PAUSE_MASK(bp); bp 110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_acquire_phy_lock(bp); bp 111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->link_params.feature_config_flags |= FEATURE_CONFIG_PFC_ENABLED; bp 112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &pfc_params); bp 113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_release_phy_lock(bp); bp 116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_pfc_clear(struct bnx2x *bp) bp 120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_acquire_phy_lock(bp); bp 121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_PFC_ENABLED; bp 122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &nig_params); bp 123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_release_phy_lock(bp); bp 126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dump_dcbx_drv_param(struct bnx2x *bp, bp 172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_ap_priority(struct bnx2x *bp, bp 179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp, bp 197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.app.enabled = true; bp 243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_ap_priority(bp, bp 268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.app.enabled = false; bp 274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, bp 281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.cos_params; bp 292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { bp 299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_port_params.app.enabled && ets->enabled && bp 303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.enabled = true; bp 305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_ets_pri_pg_tbl(bp, bp 309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_num_pg_traf_type(bp, bp 313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_fill_cos_params(bp, &pg_help_data, bp 318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.enabled = false; bp 326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp, bp 334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_port_params.app.enabled && pfc->enabled && bp 337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.pfc.enabled = true; bp 338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.pfc.priority_non_pauseable_mask = bp 342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.pfc.enabled = false; bp 343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.pfc.priority_non_pauseable_mask = 0; bp 348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_map_nw(struct bnx2x *bp) bp 352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.cos_params; bp 362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params); i++) { bp 373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_get_dcbx_drv_param(struct bnx2x *bp, bp 377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_ap_feature(bp, &features->app, error); bp 379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_pfc_feature(bp, &features->pfc, error); bp 381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_get_ets_feature(bp, &features->ets, error); bp 383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_map_nw(bp); bp 387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static int bnx2x_dcbx_read_mib(struct bnx2x *bp, bp 408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c offset += BP_PORT(bp) * mib_size; bp 411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_read_data(bp, base_mib_addr, offset, mib_size); bp 440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_pfc_set_pfc(struct bnx2x *bp) bp 442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int mfw_configured = SHMEM2_HAS(bp, drv_flags) && bp 443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c GET_FLAGS(SHMEM2_RD(bp, drv_flags), bp 446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_port_params.pfc.enabled && bp 447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c (!(bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) || mfw_configured)) bp 452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_pfc_set(bp); bp 454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_pfc_clear(bp); bp 457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp) bp 462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c func_params.f_obj = &bp->func_obj; bp 470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_func_state_change(bp, &func_params); bp 479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int bnx2x_dcbx_resume_hw_tx(struct bnx2x *bp) bp 486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c func_params.f_obj = &bp->func_obj; bp 492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_fw_struct(bp, tx_params); bp 496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_func_state_change(bp, &func_params); bp 505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_2cos_limit_update_ets_config(struct bnx2x *bp) bp 507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_ets_bw_limit(&bp->link_params, bw_tbl_0, bw_tbl_1); bp 555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_ets_strict(&bp->link_params, 0); bp 558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_ets_strict(&bp->link_params, 1); bp 567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_update_ets_config(struct bnx2x *bp) bp 569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); bp 598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_ets_e3b0_config(&bp->link_params, &bp->link_vars, bp 601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); bp 605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp) bp 607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int mfw_configured = SHMEM2_HAS(bp, drv_flags) && bp 608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c GET_FLAGS(SHMEM2_RD(bp, drv_flags), bp 611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); bp 613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bp->dcbx_port_params.ets.enabled || bp 614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured)) bp 617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (CHIP_IS_E3B0(bp)) bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_update_ets_config(bp); bp 620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_2cos_limit_update_ets_config(bp); bp 624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static int bnx2x_dcbx_read_shmem_remote_mib(struct bnx2x *bp) bp 627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 dcbx_remote_mib_offset = SHMEM2_RD(bp, dcbx_remote_mib_offset); bp 638 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_dcbx_read_mib(bp, (u32 *)&remote_mib, dcbx_remote_mib_offset, bp 647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_remote_feat = remote_mib.features; bp 648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_remote_flags = remote_mib.flags; bp 653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static int bnx2x_dcbx_read_shmem_neg_results(struct bnx2x *bp) bp 656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 dcbx_neg_res_offset = SHMEM2_RD(bp, dcbx_neg_res_offset); bp 666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c rc = bnx2x_dcbx_read_mib(bp, (u32 *)&local_mib, dcbx_neg_res_offset, bp 675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_local_feat = local_mib.features; bp 676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_error = local_mib.error; bp 701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int bnx2x_dcbnl_update_applist(struct bnx2x *bp, bool delall) bp 707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c &bp->dcbx_local_feat.app.app_pri_tbl[i]; bp 718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c err = dcb_setapp(bp->dev, &app); bp 726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static inline void bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp) bp 729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) { bp 731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask bp 733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->prio_to_cos[prio] = cos; bp 744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_SETUP_TC, 0); bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) bp 758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbnl_update_applist(bp, true); bp 761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbx_read_shmem_remote_mib(bp)) bp 765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbx_read_shmem_neg_results(bp)) bp 768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, bp 769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_error); bp 771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, bp 772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_error); bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_update_drv_flags(bp, bp 782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbnl_update_applist(bp, false); bp 788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_update_tc_mapping(bp); bp 794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_MF(bp)) bp 795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_link_sync_notify(bp); bp 797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_TX_STOP, 0); bp 802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_pfc_set_pfc(bp); bp 804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_update_ets_params(bp); bp 807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_set_local_cmng(bp); bp 811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_fw_command(bp, DRV_MSG_CODE_DCBX_PMF_DRV_OK, 0); bp 816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); bp 824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c #define LLDP_ADMIN_MIB_OFFSET(bp) (PORT_MAX*sizeof(struct lldp_params) + \ bp 825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c BP_PORT(bp)*sizeof(struct lldp_admin_mib)) bp 827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp, bp 832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 offset = dcbx_lldp_params_offset + LLDP_ADMIN_MIB_OFFSET(bp); bp 836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x_config_dcbx_params *dp = &bp->dcbx_config_params; bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_read_data(bp, (u32 *)&admin_mib, offset, bp 844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_ON) bp 948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_write_data(bp, (u32 *)&admin_mib, offset, bp 952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled) bp 954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!CHIP_IS_E1x(bp)) { bp 955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcb_state = dcb_on; bp 956 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_enabled = dcbx_enabled; bp 958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcb_state = false; bp 959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_enabled = BNX2X_DCBX_ENABLED_INVALID; bp 969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c void bnx2x_dcbx_init_params(struct bnx2x *bp) bp 971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_dcbx_version = 0x0; /* 0 - CEE; 1 - IEEE */ bp 972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_willing = 1; bp 973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_willing = 1; bp 974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.overwrite_settings = 1; bp 975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_enable = 1; bp 976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_enable = 1; bp 977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_tc_supported_tx_enable = 1; bp 978 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; bp 979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_tx_enable = 1; bp 980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_application_priority_tx_enable = 1; bp 981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_reco_valid = 1; bp 982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_app_priority_willing = 1; bp 983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[0] = 100; bp 984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[1] = 0; bp 985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[2] = 0; bp 986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[3] = 0; bp 987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[4] = 0; bp 988 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[5] = 0; bp 989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[6] = 0; bp 990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[7] = 0; bp 991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[0] = 0; bp 992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[1] = 0; bp 993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[2] = 0; bp 994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[3] = 0; bp 995 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[4] = 0; bp 996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[5] = 0; bp 997 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[6] = 0; bp 998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[7] = 0; bp 999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[0] = 100; bp 1000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[1] = 0; bp 1001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[2] = 0; bp 1002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[3] = 0; bp 1003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[4] = 0; bp 1004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[5] = 0; bp 1005 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[6] = 0; bp 1006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_bw_precentage[7] = 0; bp 1007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[0] = 0; bp 1008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[1] = 1; bp 1009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[2] = 2; bp 1010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[3] = 3; bp 1011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[4] = 4; bp 1012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[5] = 5; bp 1013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[6] = 6; bp 1014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_recommendation_ets_pg[7] = 7; bp 1015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_bitmap = 0x0; bp 1016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_priority_app_table[0].valid = 0; bp 1017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_priority_app_table[1].valid = 0; bp 1018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_priority_app_table[2].valid = 0; bp 1019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_priority_app_table[3].valid = 0; bp 1020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_default_priority = 0; bp 1023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c void bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem) bp 1028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if ((!bp->port.pmf) && (!(bp->flags & BC_SUPPORTS_DCBX_MSG_NON_PMF))) bp 1031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_enabled <= 0) bp 1040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcb_state, bp->port.pmf); bp 1042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcb_state == BNX2X_DCB_STATE_ON && bp 1043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c SHMEM2_HAS(bp, dcbx_lldp_params_offset)) { bp 1045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c SHMEM2_RD(bp, dcbx_lldp_params_offset); bp 1050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); bp 1056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_acquire_hw_lock(bp, bp 1059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_admin_mib_updated_params(bp, bp 1063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_fw_command(bp, bp 1068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_release_hw_lock(bp, bp 1074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_print_cos_params(struct bnx2x *bp, bp 1084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.pfc.priority_non_pauseable_mask); bp 1086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (cos = 0 ; cos < bp->dcbx_port_params.ets.num_of_cos ; cos++) { bp 1089 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c cos, bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask); bp 1093 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c cos, bp->dcbx_port_params.ets.cos_params[cos].bw_tbl); bp 1097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c cos, bp->dcbx_port_params.ets.cos_params[cos].strict); bp 1101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c cos, bp->dcbx_port_params.ets.cos_params[cos].pauseable); bp 1116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, bp 1122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 1163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_ets_disabled_entry_data(struct bnx2x *bp, bp 1169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); bp 1175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static inline void bnx2x_dcbx_add_to_cos_bw(struct bnx2x *bp, bp 1185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp, bp 1201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pri_tested = 1 << bp->dcbx_port_params. bp 1204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (pri_tested & DCBX_PFC_PRI_NON_PAUSE_MASK(bp)) { bp 1211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pg_entry = (u8)pg_pri_orginal_spread[bp->dcbx_port_params. bp 1215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_add_to_cos_bw(bp, &cos_data->data[entry], bp 1233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params(struct bnx2x *bp, bp 1242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 1245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, pri_join_mask); bp 1254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { bp 1266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (POWER_OF_2(DCBX_PFC_PRI_GET_PAUSE(bp, bp 1276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c } else if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask)) { bp 1300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_ets_disabled_entry_data(bp, bp 1304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { bp 1310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (DCBX_PFC_PRI_GET_PAUSE(bp, pri_join_mask) > bp 1311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DCBX_PFC_PRI_GET_NON_PAUSE(bp, pri_join_mask)) { bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); bp 1339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pri_tested = 1 << bp->dcbx_port_params. bp 1367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp, bp 1382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { bp 1383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, bp 1385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c IS_DCBX_PFC_PRI_MIX_PAUSE(bp, bp 1390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_separate_pauseable_from_non(bp, cos_data, bp 1392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.enabled = false; bp 1400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, bp 1422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp, bp 1494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp, bp 1514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) bp 1515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_separate_pauseable_from_non(bp, bp 1536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); bp 1539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pri_tested = 1 << bp->dcbx_port_params. bp 1541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pg_entry = (u8)pg_pri_orginal_spread[bp-> bp 1556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_add_to_cos_bw(bp, bp 1573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_2cos_limit_cee_fill_cos_params(struct bnx2x *bp, bp 1587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp, bp 1595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp, bp 1606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp, bp 1616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_ets_disabled_entry_data(bp, bp 1621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static int bnx2x_dcbx_spread_strict_pri(struct bnx2x *bp, bp 1642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, bp 1650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, bp 1670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static u8 bnx2x_dcbx_cee_fill_strict_pri(struct bnx2x *bp, bp 1676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbx_spread_strict_pri(bp, cos_data, entry, bp 1685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, bp 1693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_cee_fill_cos_params(struct bnx2x *bp, bp 1710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbx_join_pgs(bp, ets, help_data, bp 1713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, bp 1728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, bp 1742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c entry += bnx2x_dcbx_cee_fill_strict_pri(bp, cos_data, bp 1750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp, bp 1781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (CHIP_IS_E3B0(bp)) bp 1782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_cee_fill_cos_params(bp, help_data, ets, bp 1785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_2cos_limit_cee_fill_cos_params(bp, bp 1794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c &bp->dcbx_port_params.ets.cos_params[i]; bp 1807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (CHIP_IS_E2(bp) || CHIP_IS_E3A0(bp)) { bp 1810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DCBX_PFC_PRI_GET_NON_PAUSE(bp, bp 1816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DCBX_PFC_PRI_GET_PAUSE(bp, bp 1832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_port_params.ets.num_of_cos = cos_data.num_of_cos ; bp 1835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp, bp 1849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static void bnx2x_dcbx_fw_struct(struct bnx2x *bp, bp 1855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; bp 1856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c int mfw_configured = SHMEM2_HAS(bp, drv_flags) && bp 1857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c GET_FLAGS(SHMEM2_RD(bp, drv_flags), bp 1863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured) bp 1870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pfc_fw_cfg->dcb_version = ++bp->dcb_version; bp 1880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) bp 1881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_port_params.ets.cos_params[cos]. bp 1891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_print_cos_params(bp, pfc_fw_cfg); bp 1894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c void bnx2x_dcbx_pmf_update(struct bnx2x *bp) bp 1899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (SHMEM2_HAS(bp, drv_flags) && bp 1900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) { bp 1902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbx_read_shmem_neg_results(bp)) bp 1905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, bp 1906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_error); bp 1907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, bp 1908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_error); bp 1913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbnl_update_applist(bp, false); bp 1917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); bp 1923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_update_tc_mapping(bp); bp 1933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static inline bool bnx2x_dcbnl_set_valid(struct bnx2x *bp) bp 1938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c return bp->dcb_state && bp->dcbx_mode_uset; bp 1943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 1944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcb_state); bp 1945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c return bp->dcb_state; bp 1950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 1954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (state && ((bp->dcbx_enabled == BNX2X_DCBX_ENABLED_OFF) || bp 1955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_INVALID))) { bp 1960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_set_state(bp, (state ? true : false), bp->dcbx_enabled); bp 1967 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 1973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (CNIC_LOADED(bp)) bp 1975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c memcpy(perm_addr+netdev->addr_len, bp->fip_mac, bp 1983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 1986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp) || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) bp 2002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_ets_pg[prio] = pgid; bp 2003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; bp 2009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp) || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) bp 2015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_configuration_bw_precentage[pgid] = bw_pct; bp 2016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; bp 2023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bp->dcb_state || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) bp 2058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *pgid = DCBX_PRI_PG_GET(bp->dcbx_local_feat.ets.pri_pg_tbl, prio); bp 2064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bp->dcb_state || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) bp 2072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *bw_pct = DCBX_PG_BW_GET(bp->dcbx_local_feat.ets.pg_bw_tbl, pgid); bp 2079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp) || prio >= MAX_PFC_PRIORITIES) bp 2104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_bitmap |= (1 << prio); bp 2105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_tx_enable = 1; bp 2107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_bitmap &= ~(1 << prio); bp 2114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bp->dcb_state || prio >= MAX_PFC_PRIORITIES) bp 2122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *setting = (bp->dcbx_local_feat.pfc.pri_en_bitmap >> prio) & 0x1; bp 2127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp)) bp 2134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 2135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c netdev_err(bp->dev, bp 2139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (netif_running(bp->dev)) { bp 2140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_update_drv_flags(bp, bp 2143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bnx2x_dcbx_init(bp, true); bp 2152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcb_state) { bp 2197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcb_state) { bp 2205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : bp 2209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : bp 2227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); bp 2237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bp->dcb_state) bp 2240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c return bp->dcbx_local_feat.pfc.enabled; bp 2245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp)) bp 2251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_tx_enable = bp 2252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_enable = (state ? 1 : 0); bp 2300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c static int bnx2x_set_admin_app_up(struct bnx2x *bp, u8 idtype, u16 idval, u8 up) bp 2307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c &bp->dcbx_config_params.admin_priority_app_table[i]; bp 2316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params. bp 2321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c &bp->dcbx_config_params.admin_priority_app_table[ff], bp 2331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_application_priority_tx_enable = 1; bp 2339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (!bnx2x_dcbnl_set_valid(bp)) { bp 2358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c return bnx2x_set_admin_app_up(bp, idtype, idval, up); bp 2363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_OFF) bp 2376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcb_state != BNX2X_DCB_STATE_ON) { bp 2393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_OFF; bp 2395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_ON; bp 2397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_mode_uset = true; bp 2404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcb_state) { bp 2413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_local_feat.ets.enabled) bp 2415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_error & (DCBX_LOCAL_ETS_ERROR | bp 2420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_local_feat.pfc.enabled) bp 2422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR | bp 2428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_local_feat.app.enabled) bp 2430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR | bp 2451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bnx2x_dcbnl_set_valid(bp)) { bp 2460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_enable = bp 2462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_ets_willing = bp 2466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_enable = bp 2468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_pfc_willing = bp 2473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c bp->dcbx_config_params.admin_app_priority_willing = bp 2493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c info->willing = (bp->dcbx_remote_flags & DCBX_APP_REM_WILLING) ?: 0; bp 2498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c info->error = (bp->dcbx_remote_flags & DCBX_APP_RX_ERROR) ?: 0; bp 2502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c if (bp->dcbx_remote_feat.app.app_pri_tbl[i].appBitfield & bp 2512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c &bp->dcbx_remote_feat.app.app_pri_tbl[i]; bp 2532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pg->willing = (bp->dcbx_remote_flags & DCBX_ETS_REM_WILLING) ?: 0; bp 2538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DCBX_PG_BW_GET(bp->dcbx_remote_feat.ets.pg_bw_tbl, i); bp 2540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c DCBX_PRI_PG_GET(bp->dcbx_remote_feat.ets.pri_pg_tbl, i); bp 2548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c struct bnx2x *bp = netdev_priv(netdev); bp 2549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pfc->tcs_supported = bp->dcbx_remote_feat.pfc.pfc_caps; bp 2550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c pfc->pfc_en = bp->dcbx_remote_feat.pfc.pri_en_bitmap; bp 73 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define BNX2X_IS_ETS_ENABLED(bp) ((bp)->dcb_state == BNX2X_DCB_STATE_ON &&\ bp 74 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h (bp)->dcbx_port_params.ets.enabled) bp 155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define DCBX_PFC_PRI_NON_PAUSE_MASK(bp) \ bp 156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h ((bp)->dcbx_port_params.pfc.priority_non_pauseable_mask) bp 157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define DCBX_PFC_PRI_PAUSE_MASK(bp) \ bp 158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h ((u8)~DCBX_PFC_PRI_NON_PAUSE_MASK(bp)) bp 159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define DCBX_PFC_PRI_GET_PAUSE(bp, pg_pri) \ bp 160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h ((pg_pri) & (DCBX_PFC_PRI_PAUSE_MASK(bp))) bp 161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define DCBX_PFC_PRI_GET_NON_PAUSE(bp, pg_pri) \ bp 162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h (DCBX_PFC_PRI_NON_PAUSE_MASK(bp) & (pg_pri)) bp 163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define DCBX_IS_PFC_PRI_SOME_PAUSE(bp, pg_pri) \ bp 164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h (0 != DCBX_PFC_PRI_GET_PAUSE(bp, pg_pri)) bp 165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pg_pri) \ bp 166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h (pg_pri == DCBX_PFC_PRI_GET_PAUSE((bp), (pg_pri))) bp 167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define IS_DCBX_PFC_PRI_ONLY_NON_PAUSE(bp, pg_pri)\ bp 168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h ((pg_pri) == DCBX_PFC_PRI_GET_NON_PAUSE((bp), (pg_pri))) bp 169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h #define IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pg_pri) \ bp 170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h (!(IS_DCBX_PFC_PRI_ONLY_NON_PAUSE((bp), (pg_pri)) || \ bp 171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h IS_DCBX_PFC_PRI_ONLY_PAUSE((bp), (pg_pri)))) bp 187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h void bnx2x_dcbx_init_params(struct bnx2x *bp); bp 188 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled); bp 196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state); bp 197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h void bnx2x_dcbx_pmf_update(struct bnx2x *bp); bp 201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h int bnx2x_dcbnl_update_applist(struct bnx2x *bp, bool delall); bp 204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h int bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp); bp 205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.h int bnx2x_dcbx_resume_hw_tx(struct bnx2x *bp); bp 192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_get_port_type(struct bnx2x *bp) bp 195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 phy_idx = bnx2x_get_cur_phy_idx(bp); bp 196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c switch (bp->link_params.phy[phy_idx].media_type) { bp 224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state == BNX2X_STATE_OPEN) { bp 234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->vf_link_vars.link_report_flags)) bp 239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.speed = bp->vf_link_vars.line_speed; bp 264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c supported = bp->port.supported[cfg_idx] | bp 274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (bp->port.supported[cfg_idx ^ 1] & bp 276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c advertising = bp->port.advertising[cfg_idx]; bp 277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c media_type = bp->link_params.phy[bnx2x_get_cur_phy_idx(bp)].media_type; bp 283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if ((bp->state == BNX2X_STATE_OPEN) && bp->link_vars.link_up && bp 284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c !(bp->flags & MF_FUNC_DIS)) { bp 285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.duplex = bp->link_vars.duplex; bp 287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_MF(bp) && !BP_NOMCP(bp)) bp 288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.speed = bnx2x_get_mf_speed(bp); bp 290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.speed = bp->link_vars.line_speed; bp 296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.port = bnx2x_get_port_type(bp); bp 298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cmd->base.phy_address = bp->mdio.prtad; bp 300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.req_line_speed[cfg_idx] == SPEED_AUTO_NEG) bp 306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_vars.link_status & LINK_STATUS_AUTO_NEGOTIATE_COMPLETE) { bp 307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 status = bp->link_vars.link_status; bp 371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_MF_SD(bp)) bp 400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_MF_SI(bp)) { bp 402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 line_speed = bp->link_vars.line_speed; bp 408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->common.bc_ver < REQ_BC_VER_4_SET_MF_BW) { bp 423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state != BNX2X_STATE_OPEN) bp 425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->pending_max = part; bp 427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_update_max_mf_config(bp, part); bp 432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c old_multi_phy_config = bp->link_params.multi_phy_config; bp 434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (cmd->base.port != bnx2x_get_port_type(bp)) { bp 437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[0] & SUPPORTED_TP || bp 438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->port.supported[1] & SUPPORTED_TP)) { bp 443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config &= bp 445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.multi_phy_config & bp 447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config |= bp 450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config |= bp 456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[0] & SUPPORTED_FIBRE || bp 457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->port.supported[1] & SUPPORTED_FIBRE)) { bp 462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config &= bp 464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.multi_phy_config & bp 466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config |= bp 469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config |= bp 478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c new_multi_phy_config = bp->link_params.multi_phy_config; bp 480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config = old_multi_phy_config; bp 486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 an_supported_speed = bp->port.supported[cfg_idx]; bp 487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.phy[EXT_PHY1].type == bp 491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) { bp 503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_line_speed[cfg_idx] = SPEED_AUTO_NEG; bp 504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_duplex[cfg_idx] = duplex; bp 505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->port.advertising[cfg_idx] = (ADVERTISED_Autoneg | bp 509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] = 0; bp 511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.speed_cap_mask[cfg_idx] |= bp 550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & bp 560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & bp 574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & bp 584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & bp 603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->port.supported[cfg_idx] & bp 608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (bp->port.supported[cfg_idx] & bp 626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] bp 643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c phy_idx = bnx2x_get_cur_phy_idx(bp); bp 644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if ((bp->port.supported[cfg_idx] & bp 646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (bp->link_params.phy[phy_idx].media_type != bp 650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (bp->port.supported[cfg_idx] & bp 667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_line_speed[cfg_idx] = speed; bp 668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_duplex[cfg_idx] = duplex; bp 669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->port.advertising[cfg_idx] = advertising; bp 674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_line_speed[cfg_idx], bp 675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_duplex[cfg_idx], bp 676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->port.advertising[cfg_idx]); bp 679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.multi_phy_config = new_multi_phy_config; bp 681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_force_link_reset(bp); bp 683 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_link_set(bp); bp 692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int __bnx2x_get_preset_regs_len(struct bnx2x *bp, u32 preset) bp 694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3A0(bp)) bp 702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3B0(bp)) bp 708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int __bnx2x_get_regs_len(struct bnx2x *bp) bp 715 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c regdump_len += __bnx2x_get_preset_regs_len(bp, preset_idx); bp 722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_VF(bp)) bp 728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c regdump_len = __bnx2x_get_regs_len(bp); bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static const u32 *__bnx2x_get_page_addr_ar(struct bnx2x *bp) bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static u32 __bnx2x_get_page_reg_num(struct bnx2x *bp) bp 757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static const u32 *__bnx2x_get_page_write_ar(struct bnx2x *bp) bp 767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static u32 __bnx2x_get_page_write_num(struct bnx2x *bp) bp 777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static const struct reg_addr *__bnx2x_get_page_read_ar(struct bnx2x *bp) bp 787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static u32 __bnx2x_get_page_read_num(struct bnx2x *bp) bp 797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp)) bp 799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3(bp)) bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static bool bnx2x_is_reg_in_chip(struct bnx2x *bp, bp 808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3A0(bp)) bp 816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3B0(bp)) bp 822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static bool bnx2x_is_wreg_in_chip(struct bnx2x *bp, bp 825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3A0(bp)) bp 833 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3B0(bp)) bp 850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void bnx2x_read_pages_regs(struct bnx2x *bp, u32 *p, u32 preset) bp 855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c const u32 *page_addr = __bnx2x_get_page_addr_ar(bp); bp 857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int num_pages = __bnx2x_get_page_reg_num(bp); bp 859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c const u32 *write_addr = __bnx2x_get_page_write_ar(bp); bp 861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int write_num = __bnx2x_get_page_write_num(bp); bp 863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c const struct reg_addr *read_addr = __bnx2x_get_page_read_ar(bp); bp 865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int read_num = __bnx2x_get_page_read_num(bp); bp 870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, write_addr[j], page_addr[i]); bp 878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c *p++ = REG_RD(bp, addr); bp 886 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int __bnx2x_get_preset_regs(struct bnx2x *bp, u32 *p, u32 preset) bp 891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3A0(bp)) bp 899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3B0(bp)) bp 904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_is_reg_in_chip(bp, &idle_reg_addrs[i]) && bp 907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c *p++ = REG_RD(bp, idle_reg_addrs[i].addr + j*4); bp 913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_is_reg_in_chip(bp, ®_addrs[i]) && bp 916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c *p++ = REG_RD(bp, reg_addrs[i].addr + j*4); bp 921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_is_wreg_in_chip(bp, wreg_addr_p) && bp 924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c *p++ = REG_RD(bp, wreg_addr_p->addr + i*4); bp 931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c *p++ = REG_RD(bp, addr + j*4); bp 937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E2(bp) || CHIP_IS_E3(bp)) { bp 939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_read_pages_regs(bp, p, preset); bp 945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void __bnx2x_get_regs(struct bnx2x *bp, u32 *p) bp 957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c __bnx2x_get_preset_regs(bp, p, preset_idx); bp 958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c p += __bnx2x_get_preset_regs_len(bp, preset_idx); bp 966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!netif_running(bp->dev)) bp 980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_blocks_parity(bp); bp 987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) { bp 989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E1H(bp)) { bp 991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E2(bp)) { bp 993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E3A0(bp)) { bp 996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 997 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E3B0(bp)) { bp 999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 1011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c __bnx2x_get_regs(bp, p); bp 1014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_clear_blocks_parity(bp); bp 1015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_enable_blocks_parity(bp); bp 1020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c regdump_len = __bnx2x_get_preset_regs_len(bp, preset); bp 1032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->dump_preset_idx = val->flag; bp 1045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c dump->flag = bp->dump_preset_idx; bp 1050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c dump->len = bnx2x_get_preset_regs_len(dev, bp->dump_preset_idx); bp 1052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->dump_preset_idx, dump->len); bp 1061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_blocks_parity(bp); bp 1072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c dump_hdr.preset = bp->dump_preset_idx; bp 1078 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) { bp 1080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E1H(bp)) { bp 1082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E2(bp)) { bp 1084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 1085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E3A0(bp)) { bp 1087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 1088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c } else if (CHIP_IS_E3B0(bp)) { bp 1090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (BP_PATH(bp) ? DUMP_PATH_1 : DUMP_PATH_0); bp 1097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c __bnx2x_get_preset_regs(bp, p, dump_hdr.preset); bp 1100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_clear_blocks_parity(bp); bp 1101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_enable_blocks_parity(bp); bp 1109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (SHMEM2_HAS(bp, extended_dev_info_shared_addr)) { bp 1124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ext_dev_info_offset = SHMEM2_RD(bp, bp 1126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c mbi = REG_RD(bp, ext_dev_info_offset + bp 1141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_fill_fw_str(bp, version, ETHTOOL_FWVERS_LEN); bp 1144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c strlcpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info)); bp 1149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1151 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->flags & NO_WOL_FLAG) { bp 1156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->wol) bp 1166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->flags & NO_WOL_FLAG) { bp 1178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->wol = 1; bp 1180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->wol = 0; bp 1182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (SHMEM2_HAS(bp, curr_cfg)) bp 1183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c SHMEM2_WR(bp, curr_cfg, CURR_CFG_MET_OS); bp 1190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bp->msg_enable; bp 1197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_PF(bp) && (level & BNX2X_MSG_MCP)) bp 1202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_fw_dump_lvl(bp, KERN_INFO); bp 1203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->msg_enable = level; bp 1209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bp->port.pmf) bp 1215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 1216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_force_link_reset(bp); bp 1217 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_link_set(bp); bp 1225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->flags & MF_FUNC_DIS || (bp->state != BNX2X_STATE_OPEN)) bp 1230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_VF(bp)) bp 1232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->vf_link_vars.link_report_flags); bp 1234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bp->link_vars.link_up; bp 1239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bp->common.flash_size; bp 1257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_acquire_nvram_lock(struct bnx2x *bp) bp 1259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int port = BP_PORT(bp); bp 1264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_NVRAM); bp 1268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_REV_IS_SLOW(bp)) bp 1272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_SW_ARB, bp 1276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_SW_ARB); bp 1286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_NVRAM); bp 1293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_release_nvram_lock(struct bnx2x *bp) bp 1295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int port = BP_PORT(bp); bp 1301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_REV_IS_SLOW(bp)) bp 1305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_SW_ARB, bp 1309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_SW_ARB); bp 1323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_NVRAM); bp 1327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void bnx2x_enable_nvram_access(struct bnx2x *bp) bp 1331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_ACCESS_ENABLE); bp 1334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_ACCESS_ENABLE, bp 1339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void bnx2x_disable_nvram_access(struct bnx2x *bp) bp 1343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_ACCESS_ENABLE); bp 1346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_ACCESS_ENABLE, bp 1351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_read_dword(struct bnx2x *bp, u32 offset, __be32 *ret_val, bp 1361 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_COMMAND, MCPR_NVM_COMMAND_DONE); bp 1364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_ADDR, bp 1368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_COMMAND, cmd_flags); bp 1372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_REV_IS_SLOW(bp)) bp 1380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_COMMAND); bp 1383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_READ); bp 1399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int bnx2x_nvram_read(struct bnx2x *bp, u32 offset, u8 *ret_buf, bp 1413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (offset + buf_size > bp->common.flash_size) { bp 1416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c offset, buf_size, bp->common.flash_size); bp 1421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_acquire_nvram_lock(bp); bp 1426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_enable_nvram_access(bp); bp 1431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read_dword(bp, offset, &val, cmd_flags); bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read_dword(bp, offset, &val, cmd_flags); bp 1448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_nvram_access(bp); bp 1449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_nvram_lock(bp); bp 1454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_read32(struct bnx2x *bp, u32 offset, u32 *buf, bp 1459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read(bp, offset, (u8 *)buf, buf_size); bp 1471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static bool bnx2x_is_nvm_accessible(struct bnx2x *bp) bp 1475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct net_device *dev = pci_get_drvdata(bp->pdev); bp 1477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->pdev->pm_cap) bp 1478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = pci_read_config_word(bp->pdev, bp 1479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->pdev->pm_cap + PCI_PM_CTRL, &pm); bp 1491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 1506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_nvram_read(bp, eeprom->offset, eebuf, eeprom->len); bp 1513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 1524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c phy_idx = bnx2x_get_cur_phy_idx(bp); bp 1533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_read_sfp_module_eeprom(&bp->link_params.phy[phy_idx], bp 1535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_params, bp 1540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_read_sfp_module_eeprom(&bp->link_params.phy[phy_idx], bp 1560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_params, bp 1565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 1586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c phy_idx = bnx2x_get_cur_phy_idx(bp); bp 1587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_read_sfp_module_eeprom(&bp->link_params.phy[phy_idx], bp 1589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_params, bp 1594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_read_sfp_module_eeprom(&bp->link_params.phy[phy_idx], bp 1602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_params, bp 1607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_write_dword(struct bnx2x *bp, u32 offset, u32 val, bp 1634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_COMMAND, MCPR_NVM_COMMAND_DONE); bp 1637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_WRITE, val); bp 1640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_ADDR, bp 1644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, MCP_REG_MCPR_NVM_COMMAND, cmd_flags); bp 1648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_REV_IS_SLOW(bp)) bp 1655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, MCP_REG_MCPR_NVM_COMMAND); bp 1670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_write1(struct bnx2x *bp, u32 offset, u8 *data_buf, bp 1677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (offset + buf_size > bp->common.flash_size) { bp 1680 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c offset, buf_size, bp->common.flash_size); bp 1685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_acquire_nvram_lock(bp); bp 1690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_enable_nvram_access(bp); bp 1694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read_dword(bp, align_offset, &val_be, cmd_flags); bp 1707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_write_dword(bp, align_offset, val, bp 1712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_nvram_access(bp); bp 1713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_nvram_lock(bp); bp 1718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_write(struct bnx2x *bp, u32 offset, u8 *data_buf, bp 1727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_nvram_write1(bp, offset, data_buf, buf_size); bp 1736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (offset + buf_size > bp->common.flash_size) { bp 1739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c offset, buf_size, bp->common.flash_size); bp 1744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_acquire_nvram_lock(bp); bp 1749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_enable_nvram_access(bp); bp 1769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_write_dword(bp, offset, val, cmd_flags); bp 1784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_nvram_lock(bp); bp 1786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_acquire_nvram_lock(bp); bp 1795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_nvram_access(bp); bp 1796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_nvram_lock(bp); bp 1804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int port = BP_PORT(bp); bp 1809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 1824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c !bp->port.pmf) { bp 1831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c SHMEM_RD(bp, bp 1836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 1838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc |= bnx2x_link_reset(&bp->link_params, bp 1840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_vars, 0); bp 1843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_0, bp 1845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_link_report(bp); bp 1850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state == BNX2X_STATE_OPEN) { bp 1851 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc |= bnx2x_link_reset(&bp->link_params, bp 1853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_vars, 1); bp 1855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc |= bnx2x_phy_init(&bp->link_params, bp 1856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_vars); bp 1857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_calc_fc_adv(bp); bp 1866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_0, bp 1869 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 1871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_sfx7101_sp_sw_reset(bp, bp 1872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c &bp->link_params.phy[EXT_PHY1]); bp 1876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_ext_phy_hw_reset(bp, port); bp 1878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 1881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_write(bp, eeprom->offset, eebuf, eeprom->len); bp 1889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c coal->rx_coalesce_usecs = bp->rx_ticks; bp 1894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c coal->tx_coalesce_usecs = bp->tx_ticks; bp 1902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rx_ticks = (u16)coal->rx_coalesce_usecs; bp 1905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->rx_ticks > BNX2X_MAX_COALESCE_TOUT) bp 1906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rx_ticks = BNX2X_MAX_COALESCE_TOUT; bp 1908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->tx_ticks = (u16)coal->tx_coalesce_usecs; bp 1909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->tx_ticks > BNX2X_MAX_COALESCE_TOUT) bp 1910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->tx_ticks = BNX2X_MAX_COALESCE_TOUT; bp 1913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_update_coalesce(bp); bp 1921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->rx_ring_size) bp 1932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ering->rx_pending = bp->rx_ring_size; bp 1933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (BNX2X_NUM_RX_QUEUES(bp)) bp 1934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ering->rx_pending = MAX_RX_AVAIL / BNX2X_NUM_RX_QUEUES(bp); bp 1938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ering->tx_max_pending = IS_MF_FCOE_AFEX(bp) ? 0 : MAX_TX_AVAIL; bp 1939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ering->tx_pending = bp->tx_ring_size; bp 1945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1951 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (pci_num_vf(bp->pdev)) { bp 1957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 1964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (ering->rx_pending < (bp->disable_tpa ? MIN_RX_SIZE_NONTPA : bp 1966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (ering->tx_pending > (IS_MF_STORAGE_ONLY(bp) ? 0 : MAX_TX_AVAIL)) || bp 1972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rx_ring_size = ering->rx_pending; bp 1973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->tx_ring_size = ering->tx_pending; bp 1981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 1982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 1985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c epause->autoneg = (bp->link_params.req_flow_ctrl[cfg_idx] == bp 1989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cfg_reg = bp->link_params.req_flow_ctrl[cfg_idx]; bp 1991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c cfg_reg = bp->link_params.req_fc_auto_adv; bp 2006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 2007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 2008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_MF(bp)) bp 2015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_flow_ctrl[cfg_idx] = BNX2X_FLOW_CTRL_AUTO; bp 2018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_flow_ctrl[cfg_idx] |= BNX2X_FLOW_CTRL_RX; bp 2021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_flow_ctrl[cfg_idx] |= BNX2X_FLOW_CTRL_TX; bp 2023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.req_flow_ctrl[cfg_idx] == BNX2X_FLOW_CTRL_AUTO) bp 2024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_flow_ctrl[cfg_idx] = BNX2X_FLOW_CTRL_NONE; bp 2027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) { bp 2032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.req_line_speed[cfg_idx] == SPEED_AUTO_NEG) { bp 2033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_flow_ctrl[cfg_idx] = bp 2036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_fc_auto_adv = 0; bp 2038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_fc_auto_adv |= BNX2X_FLOW_CTRL_RX; bp 2041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_fc_auto_adv |= BNX2X_FLOW_CTRL_TX; bp 2043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bp->link_params.req_fc_auto_adv) bp 2044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.req_fc_auto_adv |= BNX2X_FLOW_CTRL_NONE; bp 2048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c "req_flow_ctrl 0x%x\n", bp->link_params.req_flow_ctrl[cfg_idx]); bp 2051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 2052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_force_link_reset(bp); bp 2053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_link_set(bp); bp 2111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 2114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!SHMEM2_HAS(bp, eee_status[BP_PORT(bp)])) { bp 2119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c eee_cfg = bp->link_vars.eee_status; bp 2144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 2148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (IS_MF(bp)) bp 2151 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!SHMEM2_HAS(bp, eee_status[BP_PORT(bp)])) { bp 2156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c eee_cfg = bp->link_vars.eee_status; bp 2187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode |= EEE_MODE_ADV_LPI; bp 2189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode &= ~EEE_MODE_ADV_LPI; bp 2192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode |= EEE_MODE_ENABLE_LPI; bp 2194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode &= ~EEE_MODE_ENABLE_LPI; bp 2196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode &= ~EEE_MODE_TIMER_MASK; bp 2197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.eee_mode |= (edata->tx_lpi_timer & bp 2204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 2205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_force_link_reset(bp); bp 2206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_link_set(bp); bp 2230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_registers(struct bnx2x *bp) bp 2234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int port = BP_PORT(bp); bp 2321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 2327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 2329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 2331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 2333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E3B0(bp)) bp 2360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c save_val = REG_RD(bp, offset); bp 2362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, offset, wr_val & mask); bp 2364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, offset); bp 2367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, offset, save_val); bp 2385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_memory(struct bnx2x *bp) bp 2425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 2431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1(bp)) bp 2433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E1H(bp)) bp 2435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c else if (CHIP_IS_E2(bp)) bp 2442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, prty_tbl[i].offset); bp 2453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_RD(bp, mem_tbl[i].offset + j*4); bp 2457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, prty_tbl[i].offset); bp 2471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void bnx2x_wait_for_link(struct bnx2x *bp, u8 link_up, u8 is_serdes) bp 2476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c while (bnx2x_link_test(bp, is_serdes) && cnt--) bp 2479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (cnt <= 0 && bnx2x_link_test(bp, is_serdes)) bp 2483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c while (!bp->link_vars.link_up && cnt--) bp 2486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (cnt <= 0 && !bp->link_vars.link_up) bp 2492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode) bp 2497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x_fastpath *fp_rx = &bp->fp[0]; bp 2498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x_fastpath *fp_tx = &bp->fp[0]; bp 2512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, bp 2518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.loopback_mode != LOOPBACK_XGXS) { bp 2524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E3(bp)) { bp 2525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 2526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->port.supported[cfg_idx] & bp 2530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.loopback_mode = LOOPBACK_XMAC; bp 2532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.loopback_mode = LOOPBACK_UMAC; bp 2534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.loopback_mode = LOOPBACK_BMAC; bp 2536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_phy_init(&bp->link_params, &bp->link_vars); bp 2539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->link_params.loopback_mode != LOOPBACK_EXT) { bp 2551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c pkt_size = (((bp->dev->mtu < ETH_MAX_PACKET_SIZE) ? bp 2552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->dev->mtu : ETH_MAX_PACKET_SIZE) + ETH_HLEN); bp 2553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c skb = netdev_alloc_skb(bp->dev, fp_rx->rx_buf_size); bp 2560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c memcpy(packet, bp->dev->dev_addr, ETH_ALEN); bp 2565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c mapping = dma_map_single(&bp->pdev->dev, skb->data, bp 2567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { bp 2605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1x(bp)) { bp 2627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); bp 2644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->common.int_block == INT_BLOCK_IGU) { bp 2650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_tx_int(bp, txdata); bp 2669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c dma_sync_single_for_cpu(&bp->pdev->dev, bp 2687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_update_rx_prod(bp, fp_rx, fp_rx->rx_bd_prod, fp_rx->rx_comp_prod, bp 2691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_params.loopback_mode = LOOPBACK_NONE; bp 2696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_loopback(struct bnx2x *bp) bp 2700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (BP_NOMCP(bp)) bp 2703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!netif_running(bp->dev)) bp 2706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_netif_stop(bp, 1); bp 2707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 2709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c res = bnx2x_run_loopback(bp, BNX2X_PHY_LOOPBACK); bp 2715 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c res = bnx2x_run_loopback(bp, BNX2X_MAC_LOOPBACK); bp 2721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 2722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_netif_start(bp); bp 2727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_ext_loopback(struct bnx2x *bp) bp 2731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (bp->link_vars.link_status & LINK_STATUS_SERDES_LINK) > 0; bp 2733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (BP_NOMCP(bp)) bp 2736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!netif_running(bp->dev)) bp 2739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, false); bp 2740 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nic_load(bp, LOAD_LOOPBACK_EXT); bp 2746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_wait_for_link(bp, 1, is_serdes); bp 2748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_netif_stop(bp, 1); bp 2750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_run_loopback(bp, BNX2X_EXT_LOOPBACK); bp 2754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_netif_start(bp); bp 2781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_nvram_crc(struct bnx2x *bp, bp 2795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read(bp, offset + done, buff, count); bp 2810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_nvram_dir(struct bnx2x *bp, bp 2822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_crc(bp, entry->nvm_start_addr, size, buff); bp 2830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_dir_entry(struct bnx2x *bp, u32 addr, u8 *buff) bp 2835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read32(bp, addr, (u32 *)&entry, sizeof(entry)); bp 2839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_test_nvram_dir(bp, &entry, buff); bp 2842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_nvram_ext_dirs(struct bnx2x *bp, u8 *buff) bp 2848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read32(bp, bp 2858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read32(bp, entry.nvm_start_addr, bp 2866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_test_dir_entry(bp, dir_offset + bp 2876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_nvram_dirs(struct bnx2x *bp, u8 *buff) bp 2884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_test_dir_entry(bp, dir_offset + bp 2891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_test_nvram_ext_dirs(bp, buff); bp 2899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_nvram_tbl(struct bnx2x *bp, bp 2905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int rc = bnx2x_nvram_crc(bp, nvram_tbl[i].offset, bp 2918 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_nvram(struct bnx2x *bp) bp 2939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (BP_NOMCP(bp)) bp 2949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nvram_read32(bp, 0, &magic, sizeof(magic)); bp 2964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_test_nvram_tbl(bp, nvram_tbl, buf); bp 2968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!CHIP_IS_E1x(bp) && !CHIP_IS_57811xx(bp)) { bp 2969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c u32 hide = SHMEM_RD(bp, dev_info.shared_hw_config.config2) & bp 2975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_test_nvram_tbl(bp, nvram_tbl2, buf); bp 2981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_test_nvram_dirs(bp, buf); bp 2989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_test_intr(struct bnx2x *bp) bp 2993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!netif_running(bp->dev)) { bp 2999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c params.q_obj = &bp->sp_objs->q_obj; bp 3004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_queue_state_change(bp, ¶ms); bp 3010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (pci_num_vf(bp->pdev)) { bp 3020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 3021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c netdev_err(bp->dev, bp 3032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c memset(buf, 0, sizeof(u64) * BNX2X_NUM_TESTS(bp)); bp 3034 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_test_nvram(bp) != 0) { bp 3035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!IS_MF(bp)) bp 3047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c is_serdes = (bp->link_vars.link_status & LINK_STATUS_SERDES_LINK) > 0; bp 3048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c link_up = bp->link_vars.link_up; bp 3050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if ((etest->flags & ETH_TEST_FL_OFFLINE) && !IS_MF(bp)) { bp 3051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c int port = BP_PORT(bp); bp 3055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c val = REG_RD(bp, NIG_REG_EGRESS_UMP0_IN_EN + port*4); bp 3057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, NIG_REG_EGRESS_UMP0_IN_EN + port*4, 0); bp 3059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, false); bp 3060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nic_load(bp, LOAD_DIAG); bp 3069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_wait_for_link(bp, 1, is_serdes); bp 3071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_test_registers(bp) != 0) { bp 3075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_test_memory(bp) != 0) { bp 3080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c buf[2] = bnx2x_test_loopback(bp); /* internal LB */ bp 3085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c buf[3] = bnx2x_test_ext_loopback(bp); /* external LB */ bp 3091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, false); bp 3094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c REG_WR(bp, NIG_REG_EGRESS_UMP0_IN_EN + port*4, val); bp 3095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c rc = bnx2x_nic_load(bp, LOAD_NORMAL); bp 3103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_wait_for_link(bp, link_up, is_serdes); bp 3106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bnx2x_test_intr(bp) != 0) { bp 3107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!IS_MF(bp)) bp 3116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c while (bnx2x_link_test(bp, is_serdes) && --cnt) bp 3121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!IS_MF(bp)) bp 3130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c #define HIDE_PORT_STAT(bp) IS_VF(bp) bp 3135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_num_stat_queues(struct bnx2x *bp) bp 3137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return BNX2X_NUM_ETH_QUEUES(bp); bp 3142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (is_multi(bp)) { bp 3148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c num_strings = bnx2x_num_stat_queues(bp) * bp 3152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (HIDE_PORT_STAT(bp)) { bp 3162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return BNX2X_NUM_TESTS(bp); bp 3174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c flags |= (!(bp->flags & NO_ISCSI_FLAG) ? 1 : 0) << BNX2X_PRI_FLAG_ISCSI; bp 3178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c flags |= (!(bp->flags & NO_FCOE_FLAG) ? 1 : 0) << BNX2X_PRI_FLAG_FCOE; bp 3179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c flags |= (!!IS_MF_STORAGE_ONLY(bp)) << BNX2X_PRI_FLAG_STORAGE; bp 3186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (is_multi(bp)) { bp 3194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c for_each_eth_queue(bp, i) { bp 3208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (HIDE_PORT_STAT(bp) && IS_PORT_STAT(i)) bp 3219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!IS_MF(bp)) bp 3224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c ETH_GSTRING_LEN * BNX2X_NUM_TESTS(bp)); bp 3237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (is_multi(bp)) { bp 3242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c for_each_eth_queue(bp, i) { bp 3243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c hw_stats = (u32 *)&bp->fp_stats[i].eth_q_stats; bp 3264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c hw_stats = (u32 *)&bp->eth_stats; bp 3266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (HIDE_PORT_STAT(bp) && IS_PORT_STAT(i)) bp 3290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (!bnx2x_is_nvm_accessible(bp)) { bp 3303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 3304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_led(&bp->link_params, &bp->link_vars, bp 3306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 3310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 3311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_led(&bp->link_params, &bp->link_vars, bp 3313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 3317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_acquire_phy_lock(bp); bp 3318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_led(&bp->link_params, &bp->link_vars, bp 3320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->link_vars.line_speed); bp 3321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_release_phy_lock(bp); bp 3327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_get_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info) bp 3336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->rss_conf_obj.udp_rss_v4) bp 3343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->rss_conf_obj.udp_rss_v6) bp 3364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c info->data = BNX2X_NUM_ETH_QUEUES(bp); bp 3371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_get_rss_flags(bp, info); bp 3378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static int bnx2x_set_rss_flags(struct bnx2x *bp, struct ethtool_rxnfc *info) bp 3409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (CHIP_IS_E1x(bp) && udp_rss_requested) { bp 3416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (bp->rss_conf_obj.udp_rss_v4 != udp_rss_requested)) { bp 3417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rss_conf_obj.udp_rss_v4 = udp_rss_requested; bp 3421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state == BNX2X_STATE_OPEN) bp 3422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_rss(bp, &bp->rss_conf_obj, false, bp 3425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (bp->rss_conf_obj.udp_rss_v6 != udp_rss_requested)) { bp 3426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rss_conf_obj.udp_rss_v6 = udp_rss_requested; bp 3430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state == BNX2X_STATE_OPEN) bp 3431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_rss(bp, &bp->rss_conf_obj, false, bp 3471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_set_rss_flags(bp, info); bp 3490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_get_rss_ind_table(&bp->rss_conf_obj, ind_table); bp 3512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c indir[i] = ind_table[i] - bp->fp->cl_id; bp 3520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->rss_conf_obj.ind_table[i] = indir[i] + bp->fp->cl_id; bp 3546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->state == BNX2X_STATE_OPEN) bp 3547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_config_rss_eth(bp, false); bp 3561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c channels->max_combined = BNX2X_MAX_RSS_COUNT(bp); bp 3564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c channels->combined_count = BNX2X_NUM_ETH_QUEUES(bp); bp 3575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c static void bnx2x_change_num_queues(struct bnx2x *bp, int num_rss) bp 3577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_disable_msi(bp); bp 3578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->num_ethernet_queues = num_rss; bp 3579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp 3580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c BNX2X_DEV_INFO("set number of queues to %d\n", bp->num_queues); bp 3581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_set_int_mode(bp); bp 3593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (pci_num_vf(bp->pdev)) { bp 3610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c (channels->combined_count > BNX2X_MAX_RSS_COUNT(bp))) { bp 3616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (channels->combined_count == BNX2X_NUM_ETH_QUEUES(bp)) { bp 3626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_change_num_queues(bp, channels->combined_count); bp 3629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, true); bp 3630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c bnx2x_change_num_queues(bp, channels->combined_count); bp 3631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c return bnx2x_nic_load(bp, LOAD_NORMAL); bp 3637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c struct bnx2x *bp = netdev_priv(dev); bp 3639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->flags & PTP_SUPPORTED) { bp 3647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c if (bp->ptp_clock) bp 3648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c info->phc_index = ptp_clock_index(bp->ptp_clock); bp 3730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev) bp 3732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c netdev->ethtool_ops = (IS_PF(bp)) ? bp 207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_map_q_cos(struct bnx2x *bp, u32 q_num, u32 new_cos) bp 210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h u32 curr_cos = REG_RD(bp, QM_REG_QVOQIDX_0 + q_num * 4); bp 218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h if (INIT_MODE_FLAGS(bp) & MODE_PORT4) { bp 220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h if (BP_PORT(bp)) { bp 229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h BNX2X_PF_Q_NUM(q_num, BP_PORT(bp), vnic); bp 233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, BNX2X_Q_VOQ_REG_ADDR(pf_q_num), new_cos); bp 237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_bit_map = REG_RD(bp, reg_addr); bp 238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, reg_addr, reg_bit_map & (~q_bit_map)); bp 242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_bit_map = REG_RD(bp, reg_addr); bp 243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, reg_addr, reg_bit_map | q_bit_map); bp 248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h if (!(INIT_MODE_FLAGS(bp) & MODE_E3_B0)) { bp 250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_bit_map = REG_RD(bp, reg_addr); bp 255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, reg_addr, reg_bit_map); bp 262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_dcb_config_qm(struct bnx2x *bp, enum cos_mode mode, bp 265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_FCOE_Q, bp 267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_ISCSI_Q, bp 269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_ISCSI_ACK_Q, bp 273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_ETH_Q, bp 275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_TOE_Q, bp 277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_map_q_cos(bp, BNX2X_TOE_ACK_Q, bp 676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_set_mcp_parity(struct bnx2x *bp, u8 enable) bp 682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_val = REG_RD(bp, mcp_attn_ctl_regs[i].addr); bp 689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, mcp_attn_ctl_regs[i].addr, reg_val); bp 693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline u32 bnx2x_parity_reg_mask(struct bnx2x *bp, int idx) bp 695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h if (CHIP_IS_E1(bp)) bp 697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h else if (CHIP_IS_E1H(bp)) bp 699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h else if (CHIP_IS_E2(bp)) bp 705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_disable_blocks_parity(struct bnx2x *bp) bp 710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h u32 dis_mask = bnx2x_parity_reg_mask(bp, i); bp 713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, bnx2x_blocks_parity_data[i].mask_addr, bp 722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_set_mcp_parity(bp, false); bp 726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_clear_blocks_parity(struct bnx2x *bp) bp 736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, XSEM_REG_FAST_MEMORY + SEM_FAST_REG_PARITY_RST, 0x1); bp 737 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, TSEM_REG_FAST_MEMORY + SEM_FAST_REG_PARITY_RST, 0x1); bp 738 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, USEM_REG_FAST_MEMORY + SEM_FAST_REG_PARITY_RST, 0x1); bp 739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, CSEM_REG_FAST_MEMORY + SEM_FAST_REG_PARITY_RST, 0x1); bp 742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h u32 reg_mask = bnx2x_parity_reg_mask(bp, i); bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_val = REG_RD(bp, bnx2x_blocks_parity_data[i]. bp 756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h reg_val = REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_4_MCP); bp 767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, MISC_REG_AEU_CLR_LATCH_SIGNAL, 0x780); bp 770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h static inline void bnx2x_enable_blocks_parity(struct bnx2x *bp) bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h u32 reg_mask = bnx2x_parity_reg_mask(bp, i); bp 778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h REG_WR(bp, bnx2x_blocks_parity_data[i].mask_addr, bp 783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init.h bnx2x_set_mcp_parity(bp, true); bp 22 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h #define BP_ILT(bp) NULL bp 26 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h #define BP_FUNC(bp) 0 bp 30 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h #define BP_PORT(bp) 0 bp 45 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static int bnx2x_gunzip(struct bnx2x *bp, const u8 *zbuf, int len); bp 46 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_reg_wr_ind(struct bnx2x *bp, u32 addr, u32 val); bp 47 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_write_dmae_phys_len(struct bnx2x *bp, bp 51 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_str_wr(struct bnx2x *bp, u32 addr, bp 57 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, addr + i*4, data[i]); bp 60 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_ind_wr(struct bnx2x *bp, u32 addr, bp 66 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_reg_wr_ind(bp, addr + i*4, data[i]); bp 69 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_write_big_buf(struct bnx2x *bp, u32 addr, u32 len, bp 72 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (bp->dmae_ready) bp 73 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_write_dmae_phys_len(bp, GUNZIP_PHYS(bp), addr, len); bp 76 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h else if (wb && CHIP_IS_E1(bp)) bp 77 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_ind_wr(bp, addr, GUNZIP_BUF(bp), len); bp 81 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_str_wr(bp, addr, GUNZIP_BUF(bp), len); bp 84 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_fill(struct bnx2x *bp, u32 addr, int fill, bp 91 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h memset(GUNZIP_BUF(bp), (u8)fill, buf_len); bp 96 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_write_big_buf(bp, addr + i*4, cur_len, wb); bp 100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_write_big_buf_wb(struct bnx2x *bp, u32 addr, u32 len) bp 102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (bp->dmae_ready) bp 103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_write_dmae_phys_len(bp, GUNZIP_PHYS(bp), addr, len); bp 106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h else if (CHIP_IS_E1(bp)) bp 107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_ind_wr(bp, addr, GUNZIP_BUF(bp), len); bp 111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_str_wr(bp, addr, GUNZIP_BUF(bp), len); bp 114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_wr_64(struct bnx2x *bp, u32 addr, bp 127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h u64 *pdata = ((u64 *)(GUNZIP_BUF(bp))) + i; bp 135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_write_big_buf_wb(bp, addr + i*4, cur_len); bp 153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static const u8 *bnx2x_sel_blob(struct bnx2x *bp, u32 addr, bp 157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_TSEM_INT_TABLE_DATA(bp); bp 160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_CSEM_INT_TABLE_DATA(bp); bp 163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_USEM_INT_TABLE_DATA(bp); bp 166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_XSEM_INT_TABLE_DATA(bp); bp 169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_TSEM_PRAM_DATA(bp); bp 172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_CSEM_PRAM_DATA(bp); bp 175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_USEM_PRAM_DATA(bp); bp 178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = INIT_XSEM_PRAM_DATA(bp); bp 183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_wr_wb(struct bnx2x *bp, u32 addr, bp 186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (bp->dmae_ready) bp 187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h VIRT_WR_DMAE_LEN(bp, data, addr, len, 0); bp 190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h else if (CHIP_IS_E1(bp)) bp 191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_ind_wr(bp, addr, data, len); bp 195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_str_wr(bp, addr, data, len); bp 198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_wr_64(struct bnx2x *bp, u32 reg, u32 val_lo, bp 205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR_DMAE_LEN(bp, reg, wb_write, 2); bp 207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_wr_zp(struct bnx2x *bp, u32 addr, u32 len, bp 214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data = bnx2x_sel_blob(bp, addr, data) + blob_off*4; bp 216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_gunzip(bp, data, len); bp 221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h len = GUNZIP_OUTLEN(bp); bp 223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h ((u32 *)GUNZIP_BUF(bp))[i] = (__force u32) bp 224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h cpu_to_le32(((u32 *)GUNZIP_BUF(bp))[i]); bp 226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_write_big_buf_wb(bp, addr, len); bp 229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_block(struct bnx2x *bp, u32 block, u32 stage) bp 232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h INIT_OPS_OFFSETS(bp)[BLOCK_OPS_IDX(block, stage, bp 235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h INIT_OPS_OFFSETS(bp)[BLOCK_OPS_IDX(block, stage, bp 245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h data_base = INIT_DATA(bp); bp 249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h op = (const union init_op *)&(INIT_OPS(bp)[op_idx]); bp 262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_RD(bp, addr); bp 265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, addr, op->write.val); bp 268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_str_wr(bp, addr, data, len); bp 271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_wr_wb(bp, addr, data, len); bp 274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_fill(bp, addr, 0, op->zero.len, 0); bp 277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_fill(bp, addr, 0, op->zero.len, 1); bp 280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_wr_zp(bp, addr, len, bp 284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_wr_64(bp, addr, data, len); bp 290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if ((INIT_MODE_FLAGS(bp) & bp 299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if ((INIT_MODE_FLAGS(bp) & bp 475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_init_pxp_arb(struct bnx2x *bp, int r_order, bp 490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CHIP_REV_IS_FPGA(bp)) { bp 497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, read_arb_addr[i].l, read_arb_data[i][r_order].l); bp 498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, read_arb_addr[i].add, bp 500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, read_arb_addr[i].ubound, bp 508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].l, bp 511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].add, bp 514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].ubound, bp 518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h val = REG_RD(bp, write_arb_addr[i].l); bp 519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].l, bp 522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h val = REG_RD(bp, write_arb_addr[i].add); bp 523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].add, bp 526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h val = REG_RD(bp, write_arb_addr[i].ubound); bp 527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, write_arb_addr[i].ubound, bp 535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_PSWRQ_BW_RD, val); bp 540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_PSWRQ_BW_WR, val); bp 542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_RQ_WR_MBS0, w_order); bp 543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_RQ_WR_MBS1, w_order); bp 544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_RQ_RD_MBS0, r_order); bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_RQ_RD_MBS1, r_order); bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if ((CHIP_IS_E1(bp) || CHIP_IS_E1H(bp)) && (r_order == MAX_RD_ORD)) bp 548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_RQ_PDR_LIMIT, 0xe00); bp 550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CHIP_IS_E3(bp)) bp 551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_USDMDP_TH, (0x4 << w_order)); bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h else if (CHIP_IS_E2(bp)) bp 553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_USDMDP_TH, (0x8 << w_order)); bp 555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_USDMDP_TH, (0x18 << w_order)); bp 557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (!CHIP_IS_E1(bp)) { bp 564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (!CHIP_IS_E1H(bp)) { bp 567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_DMAE_MPS, val); bp 570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_DMAE_MPS, 2); bp 573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_HC_MPS, val); bp 574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_USDM_MPS, val); bp 575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_CSDM_MPS, val); bp 576 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_TSDM_MPS, val); bp 577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_XSDM_MPS, val); bp 578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_QM_MPS, val); bp 579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_TM_MPS, val); bp 580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_SRC_MPS, val); bp 581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_DBG_MPS, val); bp 582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_WR_CDU_MPS, val); bp 587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h val = REG_RD(bp, PCIE_REG_PCIER_TL_HDR_FC_ST); bp 590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, PXP2_REG_PGL_TAGS_LIMIT, 0x20); bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static int bnx2x_ilt_line_mem_op(struct bnx2x *bp, bp 633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static int bnx2x_ilt_client_mem_op(struct bnx2x *bp, int cli_num, bp 637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h struct bnx2x_ilt *ilt = BP_ILT(bp); bp 647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_ilt_line_mem_op(bp, &ilt->lines[i], bp 653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static int bnx2x_ilt_mem_op_cnic(struct bnx2x *bp, u8 memop) bp 657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CONFIGURE_NIC_MODE(bp)) bp 658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_ilt_client_mem_op(bp, ILT_CLIENT_SRC, memop); bp 660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_ilt_client_mem_op(bp, ILT_CLIENT_TM, memop); bp 665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static int bnx2x_ilt_mem_op(struct bnx2x *bp, u8 memop) bp 667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h int rc = bnx2x_ilt_client_mem_op(bp, ILT_CLIENT_CDU, memop); bp 669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_ilt_client_mem_op(bp, ILT_CLIENT_QM, memop); bp 670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (!rc && CNIC_SUPPORT(bp) && !CONFIGURE_NIC_MODE(bp)) bp 671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h rc = bnx2x_ilt_client_mem_op(bp, ILT_CLIENT_SRC, memop); bp 676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_line_wr(struct bnx2x *bp, int abs_idx, bp 681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CHIP_IS_E1(bp)) bp 686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_wr_64(bp, reg, ILT_ADDR1(page_mapping), ILT_ADDR2(page_mapping)); bp 689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_line_init_op(struct bnx2x *bp, bp 700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_line_wr(bp, abs_idx, ilt->lines[idx].page_mapping); bp 704 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_line_wr(bp, abs_idx, null_mapping); bp 709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_boundry_init_op(struct bnx2x *bp, bp 720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CHIP_IS_E1(bp)) { bp 735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, start_reg + BP_FUNC(bp)*4, bp 757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, start_reg, (ilt_start + ilt_cli->start)); bp 758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, end_reg, (ilt_start + ilt_cli->end)); bp 762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_client_init_op_ilt(struct bnx2x *bp, bp 773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_line_init_op(bp, ilt, i, initop); bp 776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_boundry_init_op(bp, ilt_cli, ilt->start_line, initop); bp 779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_client_init_op(struct bnx2x *bp, bp 782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h struct bnx2x_ilt *ilt = BP_ILT(bp); bp 784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_init_op_ilt(bp, ilt, ilt_cli, initop); bp 787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_client_id_init_op(struct bnx2x *bp, bp 790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h struct bnx2x_ilt *ilt = BP_ILT(bp); bp 793 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_init_op(bp, ilt_cli, initop); bp 796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_init_op_cnic(struct bnx2x *bp, u8 initop) bp 798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CONFIGURE_NIC_MODE(bp)) bp 799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_id_init_op(bp, ILT_CLIENT_SRC, initop); bp 800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_id_init_op(bp, ILT_CLIENT_TM, initop); bp 803 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_init_op(struct bnx2x *bp, u8 initop) bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_id_init_op(bp, ILT_CLIENT_CDU, initop); bp 806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_id_init_op(bp, ILT_CLIENT_QM, initop); bp 807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CNIC_SUPPORT(bp) && !CONFIGURE_NIC_MODE(bp)) bp 808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_client_id_init_op(bp, ILT_CLIENT_SRC, initop); bp 811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_init_client_psz(struct bnx2x *bp, int cli_num, bp 814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h struct bnx2x_ilt *ilt = BP_ILT(bp); bp 824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, psz_reg, ILOG2(ilt_cli->page_size >> 12)); bp 835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_ilt_init_page_size(struct bnx2x *bp, u8 initop) bp 837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_init_client_psz(bp, ILT_CLIENT_CDU, bp 839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_init_client_psz(bp, ILT_CLIENT_QM, bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_init_client_psz(bp, ILT_CLIENT_SRC, bp 843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_ilt_init_client_psz(bp, ILT_CLIENT_TM, bp 855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_qm_init_cid_count(struct bnx2x *bp, int qm_cid_count, bp 858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h int port = BP_PORT(bp); bp 865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, QM_REG_CONNNUM_0 + port*4, bp 874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_qm_set_ptr_table(struct bnx2x *bp, int qm_cid_count, bp 880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, base_reg + i*4, bp 882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_init_wr_wb(bp, reg + i*8, wb_data, 2); bp 887 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_qm_init_ptr_table(struct bnx2x *bp, int qm_cid_count, bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_qm_set_ptr_table(bp, qm_cid_count, bp 899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h if (CHIP_IS_E1H(bp)) bp 900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_qm_set_ptr_table(bp, qm_cid_count, bp 913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h static void bnx2x_src_init_t2(struct bnx2x *bp, struct src_ent *t2, bp 917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h int port = BP_PORT(bp); bp 925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h REG_WR(bp, SRC_REG_COUNTFREE0 + port*4, src_cid_count); bp 927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_wr_64(bp, SRC_REG_FIRSTFREE0 + port*16, bp 930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h bnx2x_wr_64(bp, SRC_REG_LASTFREE0 + port*16, bp 220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u32 bnx2x_bits_en(struct bnx2x *bp, u32 reg, u32 bits) bp 222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 val = REG_RD(bp, reg); bp 225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, reg, val); bp 229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u32 bnx2x_bits_dis(struct bnx2x *bp, u32 reg, u32 bits) bp 231 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 val = REG_RD(bp, reg); bp 234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, reg, val); bp 251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, params->lfa_base + bp 262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c link_status = REG_RD(bp, params->shmem_base + bp 298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c saved_val = REG_RD(bp, params->lfa_base + bp 307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c saved_val = REG_RD(bp, params->lfa_base + bp 316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c saved_val = REG_RD(bp, params->lfa_base + bp 326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cur_speed_cap_mask = REG_RD(bp, params->lfa_base + bp 339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, params->lfa_base + bp 349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c eee_status = REG_RD(bp, params->shmem2_base + bp 368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_get_epio(struct bnx2x *bp, u32 epio_pin, u32 *en) bp 380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gp_oenable = REG_RD(bp, MCP_REG_MCPR_GP_OENABLE); bp 381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_GP_OENABLE, gp_oenable & ~epio_mask); bp 383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c *en = (REG_RD(bp, MCP_REG_MCPR_GP_INPUTS) & epio_mask) >> epio_pin; bp 385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_epio(struct bnx2x *bp, u32 epio_pin, u32 en) bp 397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gp_output = REG_RD(bp, MCP_REG_MCPR_GP_OUTPUTS); bp 403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_GP_OUTPUTS, gp_output); bp 406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gp_oenable = REG_RD(bp, MCP_REG_MCPR_GP_OENABLE); bp 407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_GP_OENABLE, gp_oenable | epio_mask); bp 410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_cfg_pin(struct bnx2x *bp, u32 pin_cfg, u32 val) bp 415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_epio(bp, pin_cfg - PIN_CFG_EPIO0, val); bp 419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, gpio_num, (u8)val, gpio_port); bp 423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u32 bnx2x_get_cfg_pin(struct bnx2x *bp, u32 pin_cfg, u32 *val) bp 428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_get_epio(bp, pin_cfg - PIN_CFG_EPIO0, val); bp 432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c *val = bnx2x_get_gpio(bp, gpio_num, gpio_port); bp 443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT, 0x4688); bp 463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_STRICT, 0x7); bp 465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_SUBJECT2WFQ, 0); bp 469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100); bp 473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_CREDIT_MAP, 0); bp 474 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0, 0); bp 475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1, 0); bp 477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_0, 0); bp 478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_1, 0); bp 479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_HIGH_PRIORITY_COS_NUM, 0); bp 481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ENABLED, 0); bp 485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS0_WEIGHT, 0x2710); bp 486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS1_WEIGHT, 0x2710); bp 488 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS0_UPPER_BOUND, 0x989680); bp 489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS1_UPPER_BOUND, 0x989680); bp 491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_NUM_STRICT_ARB_SLOTS, 0); bp 534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_0 : bp 541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_1 : bp 543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_2 : bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_3 : bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_4 : bp 549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_UPPER_BOUND_5 : bp 553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_6, bp 555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_7, bp 557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_8, bp 572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_PRIORITY_CLIENT2_LSB, 0x543210); bp 582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_PRIORITY_CLIENT2_MSB, 0x0); bp 584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_LSB, 0x76543210); bp 585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB, 0x8); bp 590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS : bp 597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_CLIENT_CREDIT_MAP2_LSB, 0x210543); bp 598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_CLIENT_CREDIT_MAP2_MSB, 0x0); bp 601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_CREDIT_MAP2_LSB, bp 603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_CREDIT_MAP2_MSB, 0x5); bp 614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_CLIENT_IS_STRICT, 0x3f); bp 616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_STRICT, 0x1ff); bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CLIENT_IS_SUBJECT2WFQ : bp 627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_0 : bp 629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_1 : bp 631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_2 : bp 633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_3 : bp 635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_4 : bp 637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CREDIT_WEIGHT_5 : bp 640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_6, 0x0); bp 641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_7, 0x0); bp 642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_8, 0x0); bp 656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, base_upper_bound + (i << 2), credit_upper_bound); bp 688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_PRIORITY_CLIENT_P1 , 0x688); bp 704 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_PRIORITY_CLIENT_P0 , 0x2C688); bp 709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_CLIENT_CREDIT_MAP_P1, 0x688); bp 712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_CLIENT_CREDIT_MAP_P0, 0x2C688); bp 714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? PBF_REG_ETS_ARB_NUM_STRICT_ARB_SLOTS_P1 : bp 718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? PBF_REG_ETS_ARB_CLIENT_IS_STRICT_P1 : bp 721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? PBF_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ_P1 : bp 735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, base_weight + (0x4 * i), 0); bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3B0(bp)) { bp 770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if ((CHIP_IS_E2(bp)) || (CHIP_IS_E3A0(bp))) bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c else if (CHIP_IS_E3B0(bp)) bp 795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CLIENT_IS_STRICT : bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? PBF_REG_ETS_ARB_CLIENT_IS_STRICT_P1 : bp 808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_CLIENT_IS_SUBJECT2WFQ : bp 812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (port) ? PBF_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ_P1 : bp 824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_ets_e3b0_set_cos_bw(struct bnx2x *bp, bp 881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, nig_reg_adress_crd_weight, cos_bw_nig); bp 883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, pbf_reg_adress_crd_weight, cos_bw_pbf); bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P1_TX_ARB_PRIORITY_CLIENT2_LSB, bp 1108 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_PRIORITY_CLIENT_P1 , pri_cli_pbf); bp 1114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_LSB, bp 1116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT2_MSB, bp 1119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ARB_PRIORITY_CLIENT_P0 , pri_cli_pbf); bp 1132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3B0(bp)) { bp 1183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bp, cos_entry, min_w_val_nig, min_w_val_pbf, bp 1233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_SUBJECT2WFQ, 0x18); bp 1246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_CREDIT_MAP, 0x111A); bp 1248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_0, bp 1250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_UPPER_BOUND_1, bp 1254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ENABLED, 1); bp 1257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_NUM_STRICT_ARB_SLOTS, 0); bp 1265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_STRICT, 0x7); bp 1268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS0_UPPER_BOUND, bp 1270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS1_UPPER_BOUND, bp 1278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0, cos0_credit_weight); bp 1300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1, cos1_credit_weight); bp 1302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS0_WEIGHT, cos0_credit_weight); bp 1303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_COS1_WEIGHT, cos1_credit_weight); bp 1309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_CLIENT_IS_STRICT, 0x1F); bp 1324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100); bp 1326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_ETS_ENABLED, 0); bp 1328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_NUM_STRICT_ARB_SLOTS, 0x100); bp 1331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_HIGH_PRIORITY_COS_NUM, strict_cos); bp 1341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_P0_TX_ARB_PRIORITY_CLIENT, val); bp 1353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PAUSE_CTRL, pause_val); bp 1385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL, pfc0_val); bp 1386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, pfc1_val); bp 1392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PAUSE_CTRL, pause_val); bp 1393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL, pfc0_val); bp 1394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, pfc1_val); bp 1398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CTRL_SA_LO, bp 1403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CTRL_SA_HI, bp 1413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_mdio_clk(struct bnx2x *bp, u32 chip_id, bp 1421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cur_mode = REG_RD(bp, emac_base + EMAC_REG_EMAC_MDIO_MODE); bp 1423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 1439 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, emac_base + EMAC_REG_EMAC_MDIO_MODE, new_mode); bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_mdio_emac_per_phy(struct bnx2x *bp, bp 1450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_clk(bp, params->chip_id, bp 1454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u8 bnx2x_is_4_port_mode(struct bnx2x *bp) bp 1458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port4mode_ovwr_val = REG_RD(bp, MISC_REG_PORT4MODE_EN_OVWR); bp 1464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c return (u8)REG_RD(bp, MISC_REG_PORT4MODE_EN); bp 1471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 1480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 1485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, emac_base + EMAC_REG_EMAC_MODE); bp 1486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_MODE, (val | EMAC_MODE_RESET)); bp 1490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, emac_base + EMAC_REG_EMAC_MODE); bp 1499 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_emac_per_phy(bp, params); bp 1503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH, val); bp 1509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + 4, val); bp 1516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->port ? NIG_REG_P1_MAC_IN_EN : NIG_REG_P0_MAC_IN_EN, bp 1520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->port ? NIG_REG_P1_MAC_OUT_EN : NIG_REG_P0_MAC_OUT_EN, bp 1522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->port ? NIG_REG_P1_MAC_PAUSE_OUT_EN : bp 1530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!(REG_RD(bp, MISC_REG_RESET_REG_2) & bp 1534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, umac_base + UMAC_REG_COMMAND_CONFIG); bp 1542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); bp 1550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 1556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 1562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 1); bp 1595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); bp 1601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_UMAC_EEE_CTRL, bp 1603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_EEE_WAKE_TIMER, 0x11); bp 1605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_UMAC_EEE_CTRL, 0x0); bp 1609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_MAC_ADDR0, bp 1614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_MAC_ADDR1, bp 1622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); bp 1631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_COMMAND_CONFIG, val); bp 1636 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_MAXFR, 0x2710); bp 1646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 is_port4mode = bnx2x_is_4_port_mode(bp); bp 1655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (((CHIP_NUM(bp) == CHIP_NUM_57840_4_10) || bp 1656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (CHIP_NUM(bp) == CHIP_NUM_57840_2_20) || bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (CHIP_NUM(bp) == CHIP_NUM_57840_OBSOLETE)) && bp 1659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 1667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 1671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 1677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_XMAC_CORE_PORT_MODE, 1); bp 1680 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_XMAC_PHY_PORT_MODE, 3); bp 1683 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_XMAC_CORE_PORT_MODE, 0); bp 1688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_XMAC_PHY_PORT_MODE, 3); bp 1693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_XMAC_PHY_PORT_MODE, 1); bp 1697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 1701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 1709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 1719 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c pfc_ctrl = REG_RD(bp, xmac_base + XMAC_REG_PFC_CTRL_HI); bp 1720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, bp 1722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_PFC_CTRL_HI, bp 1725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, xmac_base + XMAC_REG_CTRL); bp 1730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CTRL, val); bp 1738 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 0); bp 1758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_RX_LSS_CTRL, bp 1761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, 0); bp 1762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, bp 1767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_RX_MAX_SIZE, 0x2710); bp 1770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_TX_CTRL, 0xC800); bp 1777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_EEE_TIMERS_HI, 0x1380008); bp 1778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_EEE_CTRL, 0x1); bp 1780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_EEE_CTRL, 0x0); bp 1795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CTRL, val); bp 1807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 1819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 1); bp 1829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS_LANE_SEL_P0 + port*4, ser_lane); bp 1831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 1); bp 1836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 0); bp 1839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_RX_MODE, bp 1841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bp 1845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_RX_MODE, bp 1848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bp 1854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, emac_base + bp 1859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, emac_base + bp 1864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE, bp 1868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, emac_base + EMAC_REG_EMAC_RX_MODE); bp 1878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_RX_PFC_MODE, 0); bp 1882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_RX_PFC_MODE, bp 1887 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_RX_PFC_PARAM, bp 1894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_RX_MODE, val); bp 1897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, emac_base + EMAC_REG_EMAC_MODE); bp 1902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_MODE, val); bp 1905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 1); bp 1908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_RX_MTU_SIZE, bp 1913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_NIG_INGRESS_EMAC0_NO_CRC + port*4, 0x1); bp 1916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_IN_EN + port*4, 0x0); bp 1917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_PAUSE_OUT_EN + port*4, 0x0); bp 1918 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_OUT_EN + port*4, 0x0); bp 1921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EMAC0_IN_EN + port*4, 0x1); bp 1928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EMAC0_PAUSE_OUT_EN + port*4, val); bp 1929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0x1); bp 1931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4, 0x0); bp 1941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_CONTROL, wb_data, 2); bp 1963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_TX_CONTROL, wb_data, 2); bp 1974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 1986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_RX_CONTROL, wb_data, 2); bp 1997 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_TX_CONTROL, wb_data, 2); bp 2009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_PFC_CONTROL, bp 2020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_PFC_CONTROL, wb_data, 2); bp 2033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_TX_PAUSE_CONTROL, bp 2048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_BMAC_CONTROL, wb_data, 2); bp 2056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_pfc_nig_rx_priority_mask(struct bnx2x *bp, bp 2095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, nig_reg_rx_priority_mask_add, priority_mask); bp 2101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->shmem_base + bp 2110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (SHMEM2_HAS(bp, link_attr_sync)) bp 2113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->shmem2_base + bp 2125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c xcm_mask = REG_RD(bp, port ? NIG_REG_LLH1_XCM_MASK : bp 2145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) bp 2166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) bp 2167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_BRB1_PAUSE_IN_EN : bp 2169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLFC_OUT_EN_1 : bp 2171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLFC_ENABLE_1 : bp 2173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_PAUSE_ENABLE_1 : bp 2176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_PPP_ENABLE_1 : bp 2179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLH1_XCM_MASK : bp 2182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLFC_EGRESS_SRC_ENABLE_1 : bp 2186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_XCM1_OUT_EN : bp 2190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_P1_HWPFC_ENABLE : bp 2198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_pfc_nig_rx_priority_mask(bp, i, bp 2201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLFC_HIGH_PRIORITY_CLASSES_1 : bp 2205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_LLFC_LOW_PRIORITY_CLASSES_1 : bp 2209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, port ? NIG_REG_P1_PKT_PRIORITY_TO_COS : bp 2223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 2245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MISC_REG_RESET_REG_2); bp 2253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 2263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_PAUSE_OUT_EN + params->port*4, val); bp 2272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_BMAC_XGXS_CONTROL, bp 2294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_TX_SOURCE_ADDR, wb_data, 2); bp 2304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_BMAC_CONTROL, wb_data, 2); bp 2309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_MAX_SIZE, wb_data, 2); bp 2316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_TX_MAX_SIZE, wb_data, 2); bp 2321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_CNT_MAX_SIZE, wb_data, 2); bp 2326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC_REGISTER_RX_LLFC_MSG_FLDS, bp 2336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_BMAC_CONTROL, wb_data, 2); bp 2352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_BMAC_XGXS_CONTROL, bp 2364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_TX_SOURCE_ADDR, bp 2372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_RX_LLFC_MSG_FLDS, bp 2379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_RX_MAX_SIZE, wb_data, 2); bp 2385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_TX_MAX_SIZE, wb_data, 2); bp 2390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr + BIGMAC2_REGISTER_CNT_MAX_SIZE, wb_data, 2); bp 2403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 2412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 2416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4, 0x1); bp 2419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 2423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 0x1); bp 2424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS_LANE_SEL_P0 + port*4, 0x0); bp 2425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + port*4, 0x0); bp 2431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_PAUSE_OUT_EN + port*4, val); bp 2432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0x0); bp 2433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EMAC0_IN_EN + port*4, 0x0); bp 2434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EMAC0_PAUSE_OUT_EN + port*4, 0x0); bp 2435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_IN_EN + port*4, 0x1); bp 2436 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_OUT_EN + port*4, 0x1); bp 2442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_bmac_rx(struct bnx2x *bp, u32 chip_id, u8 port, u8 en) bp 2447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 nig_bmac_enable = REG_RD(bp, NIG_REG_BMAC0_REGS_OUT_EN + port*4); bp 2449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 2454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 2458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD_DMAE(bp, bmac_addr, wb_data, 2); bp 2463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR_DMAE(bp, bmac_addr, wb_data, 2); bp 2471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_DISABLE_NEW_TASK_PROC_P0 + port*4, 0x1); bp 2480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c init_crd = REG_RD(bp, PBF_REG_P0_INIT_CRD + port*4); bp 2481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c crd = REG_RD(bp, PBF_REG_P0_CREDIT + port*8); bp 2486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c crd = REG_RD(bp, PBF_REG_P0_CREDIT + port*8); bp 2489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c crd = REG_RD(bp, PBF_REG_P0_CREDIT + port*8); bp 2501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_P0_PAUSE_ENABLE + port*4, 1); bp 2503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_P0_ARB_THRSH + port*4, 0); bp 2510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_P0_PAUSE_ENABLE + port*4, 0); bp 2512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_P0_ARB_THRSH + port*4, thresh); bp 2524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_P0_INIT_CRD + port*4, init_crd); bp 2529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_INIT_P0 + port*4, 0x1); bp 2531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_INIT_P0 + port*4, 0x0); bp 2534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, PBF_REG_DISABLE_NEW_TASK_PROC_P0 + port*4, 0x0); bp 2553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u32 bnx2x_get_emac_base(struct bnx2x *bp, bp 2561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, NIG_REG_PORT_SWAP)) bp 2567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, NIG_REG_PORT_SWAP)) bp 2588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_cl22_write(struct bnx2x *bp, bp 2596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c mode = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE); bp 2597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE, bp 2604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, tmp); bp 2609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM); bp 2619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE, mode); bp 2623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_cl22_read(struct bnx2x *bp, bp 2632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c mode = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE); bp 2633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE, bp 2640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, val); bp 2645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM); bp 2658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_MODE, mode); bp 2665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_cl45_read(struct bnx2x *bp, struct bnx2x_phy *phy, bp 2673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c chip_id = (REG_RD(bp, MISC_REG_CHIP_NUM) << 16) | bp 2674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ((REG_RD(bp, MISC_REG_CHIP_REV) & 0xf) << 12); bp 2675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_clk(bp, chip_id, phy->mdio_ctrl); bp 2679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, bp 2685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, val); bp 2690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM); bp 2698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "MDC/MDIO access timeout\n"); bp 2706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, val); bp 2711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, phy->mdio_ctrl + bp 2720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "MDC/MDIO access timeout\n"); bp 2730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); bp 2735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, bp 2740 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_cl45_write(struct bnx2x *bp, struct bnx2x_phy *phy, bp 2748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c chip_id = (REG_RD(bp, MISC_REG_CHIP_NUM) << 16) | bp 2749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ((REG_RD(bp, MISC_REG_CHIP_REV) & 0xf) << 12); bp 2750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_clk(bp, chip_id, phy->mdio_ctrl); bp 2754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, bp 2761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, tmp); bp 2766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = REG_RD(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM); bp 2774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "MDC/MDIO access timeout\n"); bp 2781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_COMM, tmp); bp 2786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = REG_RD(bp, phy->mdio_ctrl + bp 2795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "MDC/MDIO access timeout\n"); bp 2804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, devad, 0xf, &temp_val); bp 2808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, phy->mdio_ctrl + EMAC_REG_EMAC_MDIO_STATUS, bp 2818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2820 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, params->shmem2_base) <= bp 2870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2885 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c eee_mode = ((REG_RD(bp, params->shmem_base + bp 2903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_IDLE_THR_P0 + (params->port << 2), bp 2955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2), 0); bp 2960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_EEE_ADV, 0x0); bp 2971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_MASK_EXT_P0 + (params->port << 2), 0xfc20); bp 2986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_EEE_ADV, val); bp 2996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 2999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->shmem2_base + bp 3008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_EEE_ADV, &adv); bp 3014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_LP_EEE_ADV, &lp); bp 3059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c board_cfg = REG_RD(bp, params->shmem_base + bp 3070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c sfp_ctrl = REG_RD(bp, params->shmem_base + bp 3077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, i2c_pins[idx], i2c_val[idx]); bp 3081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp, bp 3101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MCP_REG_MCPR_IMC_COMMAND); bp 3103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_IMC_COMMAND, val); bp 3107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_IMC_SLAVE_CONTROL, val); bp 3114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_IMC_COMMAND, val); bp 3118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MCP_REG_MCPR_IMC_COMMAND); bp 3121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MCP_REG_MCPR_IMC_COMMAND); bp 3138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MCP_REG_MCPR_IMC_COMMAND, val); bp 3142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MCP_REG_MCPR_IMC_COMMAND); bp 3145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MCP_REG_MCPR_IMC_COMMAND); bp 3156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c data_array[i] = REG_RD(bp, (MCP_REG_MCPR_IMC_DATAREG0 + i*4)); bp 3167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_cl45_read_or_write(struct bnx2x *bp, struct bnx2x_phy *phy, bp 3171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, devad, reg, &val); bp 3172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, devad, reg, val | or_val); bp 3175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_cl45_read_and_write(struct bnx2x *bp, bp 3180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, devad, reg, &val); bp 3181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, devad, reg, val & and_val); bp 3193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c return bnx2x_cl45_read(params->bp, bp 3210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c return bnx2x_cl45_write(params->bp, bp 3221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c path = BP_PATH(bp); bp 3228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_is_4_port_mode(bp)) { bp 3232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c path_swap_ovr = REG_RD(bp, MISC_REG_FOUR_PORT_PATH_SWAP_OVWR); bp 3236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c path_swap = REG_RD(bp, MISC_REG_FOUR_PORT_PATH_SWAP); bp 3242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port_swap_ovr = REG_RD(bp, MISC_REG_FOUR_PORT_PORT_SWAP_OVWR); bp 3246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port_swap = REG_RD(bp, MISC_REG_FOUR_PORT_PORT_SWAP); bp 3256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, MISC_REG_TWO_PORT_PATH_SWAP_OVWR); bp 3261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, MISC_REG_TWO_PORT_PATH_SWAP); bp 3276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) { bp 3294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c } else if (CHIP_IS_E2(bp)) bp 3299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 3308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_set_serdes_access(struct bnx2x *bp, u8 port) bp 3313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_SERDES0_CTRL_MD_ST + port*0x10, 1); bp 3314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, emac_base + EMAC_REG_EMAC_MDIO_COMM, 0x245f8000); bp 3316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, emac_base + EMAC_REG_EMAC_MDIO_COMM, 0x245d000f); bp 3319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_SERDES0_CTRL_MD_ST + port*0x10, 0); bp 3322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_serdes_deassert(struct bnx2x *bp, u8 port) bp 3331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, val); bp 3333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_SET, val); bp 3335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_serdes_access(bp, port); bp 3337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_SERDES0_CTRL_MD_DEVAD + port*0x10, bp 3345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + params->port*0x18, 0); bp 3350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + params->port*0x18, bp 3358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, val); bp 3369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_SET, val); bp 3377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_ADV_PAUSE, &val); bp 3480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_ADV_PAUSE, val); bp 3488 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0x4, &ld_pause); bp 3540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0x5, &lp_pause); bp 3541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c } else if (CHIP_IS_E3(bp) && bp 3545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 3552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 3554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 3557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 3559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 3569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 3572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 3628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, reg_set[i].reg, bp 3667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, reg_set[i].reg, bp 3701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3704 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 3718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 3730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, reg_set[i].reg, bp 3747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 3751 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, addr, 0x1); bp 3771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 3774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 3782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3793 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 3802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 3808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, params->shmem_base + bp 3812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3821 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 3835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c wc_lane_config = REG_RD(bp, params->shmem_base + bp 3851 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 3866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, reg_set[i].reg, bp 3902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 3905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 3908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 3914 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, bp 3922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, bp 3926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 3955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, 0); bp 3966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 3970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 3974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 3978 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 3983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 3985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 3990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_tap_val = REG_RD(bp, params->shmem_base + bp 4046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 4091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_PMA_DEVAD, bp 4098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 4101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 4128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_warpcore_set_20G_DXGXS(struct bnx2x *bp, bp 4139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_warpcore_reset_lane(struct bnx2x *bp, bp 4276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, wc_regs[i].devad, wc_regs[i].reg, bp 4319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_get_mod_abs_int_cfg(struct bnx2x *bp, bp 4332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 4333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = (REG_RD(bp, shmem_base + bp 4366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_get_mod_abs_int_cfg(bp, params->chip_id, bp 4373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_val = bnx2x_get_gpio(bp, gpio_num, gpio_port); bp 4385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, MDIO_WC_REG_GP2_STATUS_GP_2_0, bp 4399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c serdes_net_if = (REG_RD(bp, params->shmem_base + bp 4418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, 0x81d1, bp 4428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 1); bp 4429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 0); bp 4432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 4452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = REG_RD(bp, params->shmem_base + bp 4481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, cfg_pin, tx_en ^ 1); bp 4483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, cfg_pin + 3, tx_en ^ 1); bp 4490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c serdes_net_if = (REG_RD(bp, params->shmem_base + bp 4502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 1); bp 4568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_set_20G_DXGXS(bp, phy, lane); bp 4590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 0); bp 4597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_emac_per_phy(bp, params); bp 4603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 1); bp 4607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 4617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, MDIO_WC_DEVAD, bp 4625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 4666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 4676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 4684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD, bp 4697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c USES_WARPCORE(bp) && bp 4772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 4777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 4803 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c vars->link_status = REG_RD(bp, params->shmem_base + bp 4819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c vars->eee_status = REG_RD(bp, params->shmem2_base + bp 4829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c media_types = REG_RD(bp, sync_offset); bp 4847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c vars->aeu_int_mask = REG_RD(bp, sync_offset); bp 4857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (SHMEM2_HAS(bp, link_attr_sync)) bp 4858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c params->link_attr_sync = SHMEM2_RD(bp, bp 4870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 4882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 4900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_serdes_access(bp, params->port); bp 4913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 4924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Warning: PHY was not initialized," bp 4935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4956 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 4979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 4989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 4999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5089 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, MDIO_REG_BANK_CL73_IEEEB1, bp 5672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, MDIO_REG_BANK_OVER_1G, bp 5692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 5731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 5739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5763 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 5774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 5815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, phy, bp 5845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, GRCBASE_EMAC0 + port*0x400 + bp 5891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, bp 5904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 5908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, bp 5927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u16 bnx2x_wait_reset_complete(struct bnx2x *bp, bp 6019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 6022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 6031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Warning: PHY was not initialized," bp 6042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 6070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, bp 6076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_STATUS_INTERRUPT_PORT0 + port*4)); bp 6078 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4), bp 6079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_EMAC0_STATUS_MISC_MI_INT + port*0x18), bp 6080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_SERDES0_STATUS_LINK_STATUS+port*0x3c)); bp 6082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK10G + port*0x68), bp 6083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK_STATUS + port*0x68)); bp 6086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_rearm_latch_signal(struct bnx2x *bp, u8 port, bp 6096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c latch_status = REG_RD(bp, bp 6101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, bp 6106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, bp 6114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LATCH_STATUS_0 + port*8, bp 6123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_STATUS_INTERRUPT_PORT0 + port*4, bp 6134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 6154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, bp 6200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp; bp 6207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bp = params->bp; bp 6211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c spirom_ver = REG_RD(bp, params->phy[EXT_PHY1].ver_addr); bp 6221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c spirom_ver = REG_RD(bp, params->phy[EXT_PHY2].ver_addr); bp 6241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 6250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c md_devad = REG_RD(bp, (NIG_REG_XGXS0_CTRL_MD_DEVAD + bp 6253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + port*0x18, bp 6257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 6263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 6272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 6274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + port*0x18, bp 6280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, 5, bp 6284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, 5, bp 6301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 0); bp 6317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, bp 6320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); bp 6329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp); bp 6344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CHIP_IS_E2(bp) && params->num_phys == 2) { bp 6348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); bp 6349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); bp 6351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); bp 6352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_LED, bp 6366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if ((!CHIP_IS_E3(bp)) || bp 6367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (CHIP_IS_E3(bp) && bp 6369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); bp 6371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp) || bp 6372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CHIP_IS_E2(bp) || bp 6374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); bp 6376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, bp 6381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); bp 6382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); bp 6383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp | bp 6395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, bp 6399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 + port*4, 0); bp 6401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) bp 6402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_P0 + port*4, bp 6405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_P0 + port*4, bp 6407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_ENA_P0 + bp 6409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); bp 6410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c EMAC_WR(bp, EMAC_REG_EMAC_LED, bp 6413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1(bp) && bp 6419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 bp 6421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_TRAFFIC_P0 + bp 6423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_TRAFFIC_P0 + bp 6444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 6455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, int_phy, MDIO_WC_DEVAD, bp 6457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, int_phy, MDIO_WC_DEVAD, bp 6463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, int_phy, MDIO_WC_DEVAD, bp 6473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_RD_OVER_CL45(bp, int_phy, bp 6526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!USES_WARPCORE(bp)) bp 6549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (CHIP_IS_E1x(bp) || bp 6550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CHIP_IS_E2(bp))) bp 6591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_STATUS_INTERRUPT_PORT0 + bp 6604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(params->bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, bp 6611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 6615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_port = BP_PATH(bp); bp 6618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1, bp 6621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 6630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 1); bp 6648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) bp 6649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); bp 6653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp) || bp 6654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CHIP_IS_E2(bp)) bp 6655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 0); bp 6657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 6659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + (params->port << 2), bp 6661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_MASK_ENT_P0 + (params->port << 2), bp 6678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) { bp 6710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_FW_ENABLE_P0 + bp 6712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_DR_ENABLE, 1); bp 6713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_CPMU_LP_MASK_ENT_P0 + bp 6717 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if ((CHIP_IS_E1x(bp) || bp 6718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CHIP_IS_E2(bp))) { bp 6744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) bp 6749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 0); bp 6767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!(SHMEM2_HAS(bp, link_change_count))) bp 6779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, addr) + 1; bp 6780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, addr, val); bp 6797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 6822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 6827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_STATUS_INTERRUPT_PORT0 + port*4)); bp 6829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c is_mi_int = (u8)(REG_RD(bp, NIG_REG_EMAC0_STATUS_MISC_MI_INT + bp 6832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4), bp 6834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_SERDES0_STATUS_LINK_STATUS + port*0x3c)); bp 6837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK10G + port*0x68), bp 6838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK_STATUS + port*0x68)); bp 6841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) bp 6842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); bp 6960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_rearm_latch_signal(bp, port, bp 6983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, bp 7046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_fw_command(bp, DRV_MSG_CODE_LINK_STATUS_CHANGED, 0); bp 7054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c void bnx2x_ext_phy_hw_reset(struct bnx2x *bp, u8 port) bp 7056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1, bp 7059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1, bp 7063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_save_spirom_version(struct bnx2x *bp, u8 port, bp 7070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, ver_addr, spirom_ver); bp 7073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_save_bcm_spirom_ver(struct bnx2x *bp, bp 7079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 7081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 7083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, port, (u32)(fw_ver1<<16 | fw_ver2), bp 7087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_ext_phy_10G_an_resolve(struct bnx2x *bp, bp 7092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8073_8727_external_rom_boot(struct bnx2x *bp, bp 7150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_bcm_spirom_ver(bp, phy, port); bp 7221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8073_is_snr_needed(struct bnx2x *bp, struct bnx2x_phy *phy) bp 7227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8073_xaui_wa(struct bnx2x *bp, struct bnx2x_phy *phy) bp 7251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_807x_force_10G(struct bnx2x *bp, struct bnx2x_phy *phy) bp 7306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7361 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 7377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_port = BP_PATH(bp); bp 7381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 7384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1, bp 7390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7414 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, params->shmem_base + bp 7419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_807x_force_10G(bp, phy); bp 7432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_ADV, val); bp 7460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_8073_2_5G, &tmp1); bp 7467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_8073_2_5G, tmp1); bp 7483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LD, &tmp1); bp 7484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CL37_FC_LD, bp 7489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CL37_AN, 0x1000); bp 7495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_8073_is_snr_needed(bp, phy)) bp 7496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_ADV2, &tmp1); bp 7503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_ADV2, tmp1); bp 7509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, 0x1200); bp 7519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_8073_xaui_wa(bp, phy) != 0) bp 7563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (link_up && bnx2x_8073_is_snr_needed(bp, phy)) { bp 7582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); bp 7646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 7663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 7666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_port = BP_PATH(bp); bp 7671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 7683 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 7689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, params->port); bp 7690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 0xa040); bp 7691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 7693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, params->port, params->shmem_base, 0); bp 7712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 7771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_port = BP_PATH(bp); bp 7774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_val = REG_RD(bp, NIG_REG_PORT_SWAP); bp 7775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE); bp 7785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tx_en_mode = REG_RD(bp, params->shmem_base + bp 7798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, gpio_pin, gpio_mode, gpio_port); bp 7840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) bp 7853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 7878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 7919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c pin_cfg = (REG_RD(bp, params->shmem_base + bp 7934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1); bp 7946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc = bnx2x_bsc_read(params, bp, dev_addr, addr32, 0, byte_cnt, bp 7982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 7995 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E1x(bp)) { bp 8186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gport = BP_PATH(bp) + bp 8189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, bp 8220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c media_types = REG_RD(bp, sync_offset); bp 8232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, sync_offset, media_types); bp 8259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, params->shmem_base + bp 8295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c fw_resp = bnx2x_fw_command(bp, cmd, fw_cmd_param); bp 8321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Warning: Unqualified SFP+ module detected," bp 8336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_8727_power_module(struct bnx2x *bp, bp 8390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8726_set_limiting_mode(struct bnx2x *bp, bp 8402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8727_set_limiting_mode(struct bnx2x *bp, bp 8451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 8514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 fault_led_gpio = REG_RD(bp, params->shmem_base + bp 8548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, gpio_pin, gpio_mode, gpio_port); bp 8562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c pin_cfg = (REG_RD(bp, params->shmem_base + bp 8570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, pin_cfg, gpio_mode); bp 8576 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 8590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_WC0_RESET, 0x0c0e); bp 8596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_LCPLL_E40_PWRDWN, 1); bp 8597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_LCPLL_E40_RESETB_ANA, 0); bp 8598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_LCPLL_E40_RESETB_DIG, 0); bp 8605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_8727_power_module(params->bp, phy, power); bp 8626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 8648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bp 8651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 8655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 1); bp 8656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 0); bp 8666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_8726_set_limiting_mode(params->bp, phy, edc_mode); bp 8670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_8727_set_limiting_mode(params->bp, phy, edc_mode); bp 8681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 val = REG_RD(bp, params->shmem_base + bp 8735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 8746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_get_mod_abs_int_cfg(bp, params->chip_id, params->shmem_base, bp 8757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c gpio_val = bnx2x_get_gpio(bp, gpio_num, gpio_port); bp 8761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_emac_per_phy(bp, params); bp 8765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio_int(bp, gpio_num, bp 8770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 8776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 1); bp 8785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, phy, 0); bp 8792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio_int(bp, gpio_num, bp 8805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_sfp_mask_fault(struct bnx2x *bp, bp 8811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, alarm_ctrl_offset, &val); bp 8823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, alarm_ctrl_offset, val); bp 8834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_sfp_mask_fault(bp, phy, MDIO_PMA_LASI_TXSTAT, bp 8844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 8878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 8896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 8898 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 8901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, params->port); bp 8902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 0xa040); bp 8903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 8907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_XS_DEVAD, reg, &val); bp 8929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_XS_DEVAD, reg, val); bp 8936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 8973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_bcm_spirom_ver(bp, phy, params->port); bp 8979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tx_en_mode = REG_RD(bp, params->shmem_base + bp 8986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 8989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 0x0001); bp 9017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_bcm_spirom_ver(bp, phy, params->port); bp 9056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); bp 9081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 9094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_val = REG_RD(bp, NIG_REG_PORT_SWAP); bp 9228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE); bp 9230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_1, bp 9237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 9308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_8727_power_module(bp, phy, 1); bp 9325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tx_en_mode = REG_RD(bp, params->shmem_base + bp 9360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 val = REG_RD(bp, params->shmem_base + bp 9386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9439 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_sfp_mask_fault(bp, phy, MDIO_PMA_LASI_TXSTAT, bp 9489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E1x(bp)) bp 9509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c oc_port = BP_PATH(bp) + (params->port << 1); bp 9513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Error: Power fault on Port %d has " bp 9522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_8727_power_module(params->bp, phy, 0); bp 9547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 9588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, bp 9604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_LASI_CTRL, 0); bp 9647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp, bp 9661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, 0x400f, &fw_ver1); bp 9664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, port, fw_ver1, phy->ver_addr); bp 9669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, bp 9673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val); bp 9681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, port, 0, bp 9688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA819, 0x0000); bp 9689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA81A, 0xc200); bp 9690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, 0xA817, 0x000A); bp 9692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA818, &val); bp 9700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, port, 0, bp 9706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81B, &fw_ver1); bp 9708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_PMA_DEVAD, 0xA81C, &fw_ver2); bp 9710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, port, (fw_ver2<<16) | fw_ver1, bp 9715 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_848xx_set_led(struct bnx2x *bp, bp 9730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, reg_set[i].devad, reg_set[i].reg, bp 9774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_or_write(bp, phy, bp 9784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_848xx_spirom_version(phy, bp, params->port); bp 9795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_en(bp, NIG_REG_LATCH_BC_0 + params->port*4, bp 9798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_848xx_set_led(bp, phy); bp 9807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9820 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 9843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bp, phy, bp 9937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 9953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 9959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, params->port); bp 9960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 9962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); bp 9976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 9986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (REG_RD(bp, params->shmem2_base + bp 10152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c pair_swap = REG_RD(bp, params->shmem_base + bp 10175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u8 bnx2x_84833_get_reset_gpios(struct bnx2x *bp, bp 10182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 10186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c reset_pin[idx] = REG_RD(bp, shmem_base_path[idx] + bp 10199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c reset_pin[idx] = REG_RD(bp, shmem_base_path[idx] + bp 10216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 other_shmem_base_addr = REG_RD(bp, params->shmem2_base + bp 10225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, bp 10238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW); bp 10251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!(CHIP_IS_E1x(bp))) bp 10300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port = BP_PATH(bp); bp 10305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, bp 10310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 10334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 10382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_848xx_spirom_version(phy, bp, params->port); bp 10407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 cms_enable = REG_RD(bp, params->shmem_base + bp 10412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_CTL_DEVAD, bp 10422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_CTL_DEVAD, bp 10454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 10479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read_and_write(bp, phy, bp 10491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); bp 10515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 10636 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bp 10638 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bp 10645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(params->bp, phy, bp 10647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(params->bp, phy, bp 10654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!(CHIP_IS_E1x(bp))) bp 10659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port = BP_PATH(bp); bp 10664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, bp 10668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 10685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!(CHIP_IS_E1x(bp))) bp 10686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c port = BP_PATH(bp); bp 10699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10704 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 + bp 10787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bp, bp 10792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 + bp 10868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bp, bp 10877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10887 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 10965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 10985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 11004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD, bp 11016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11034 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = (REG_RD(bp, params->shmem_base + bp 11065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, cfg_pin, 1); bp 11071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 11081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, MDIO_REG_GPHY_EXP_ACCESS, bp 11192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, MDIO_REG_GPHY_EXP_ACCESS_GATE, &temp); bp 11194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, MDIO_REG_GPHY_EXP_ACCESS_GATE, temp); bp 11229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, bp 11234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, bp 11287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, MDIO_PMA_REG_CTRL, 0x800); bp 11299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = (REG_RD(bp, params->shmem_base + bp 11306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_cfg_pin(bp, cfg_pin, 0); bp 11313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, bp 11382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0x5, &val); bp 11400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0xa, &val); bp 11419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, 0x09, 3<<11); bp 11434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0x00, &val); bp 11437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, 0x00, val); bp 11443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, 0x18, 7); bp 11444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_read(bp, phy, 0x18, &val); bp 11445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl22_write(bp, phy, 0x18, val | (1<<10) | (1<<15)); bp 11448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4, 1); bp 11453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, umac_base + UMAC_REG_MAXFR, 0x2710); bp 11462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 11480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, params->port); bp 11481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_wait_reset_complete(bp, phy, params); bp 11483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_save_spirom_version(bp, params->port, bp 11512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_10G_an_resolve(bp, phy, vars); bp 11561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, struct bnx2x_phy *phy) bp 11565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 11577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, bp 11589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_2, bp 11592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(params->bp, MISC_REGISTERS_GPIO_1, bp 11600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 11613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy, bp 12154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_populate_preemphasis(struct bnx2x *bp, u32 shmem_base, bp 12166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rx = REG_RD(bp, shmem_base + bp 12170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tx = REG_RD(bp, shmem_base + bp 12174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rx = REG_RD(bp, shmem_base + bp 12178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tx = REG_RD(bp, shmem_base + bp 12191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static u32 bnx2x_get_ext_phy_config(struct bnx2x *bp, u32 shmem_base, bp 12197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ext_phy_config = REG_RD(bp, shmem_base + bp 12202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ext_phy_config = REG_RD(bp, shmem_base + bp 12213 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_populate_int_phy(struct bnx2x *bp, u32 shmem_base, u8 port, bp 12218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 switch_cfg = (REG_RD(bp, shmem_base + bp 12222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c chip_id = (REG_RD(bp, MISC_REG_CHIP_NUM) << 16) | bp 12223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ((REG_RD(bp, MISC_REG_CHIP_REV) & 0xf) << 12); bp 12226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) { bp 12228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy_addr = REG_RD(bp, bp 12231 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, MISC_REG_PORT4MODE_EN_OVWR) == 0x3) bp 12236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c serdes_net_if = (REG_RD(bp, shmem_base + bp 12311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_REV(bp) == CHIP_REV_Ax) bp 12318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy_addr = REG_RD(bp, bp 12324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy_addr = REG_RD(bp, bp 12335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy->mdio_ctrl = bnx2x_get_emac_base(bp, bp 12338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 12346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_populate_preemphasis(bp, shmem_base, phy, port, INT_PHY); bp 12350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_populate_ext_phy(struct bnx2x *bp, bp 12359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ext_phy_config = bnx2x_get_ext_phy_config(bp, shmem_base, bp 12426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_populate_preemphasis(bp, shmem_base, phy, port, phy_index); bp 12432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c config2 = REG_RD(bp, shmem_base + offsetof(struct shmem_region, bp 12443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 size = REG_RD(bp, shmem2_base); bp 12458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port); bp 12464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 raw_ver = REG_RD(bp, phy->ver_addr); bp 12478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_populate_phy(struct bnx2x *bp, u8 phy_index, u32 shmem_base, bp 12483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c return bnx2x_populate_int_phy(bp, shmem_base, port, phy); bp 12485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c return bnx2x_populate_ext_phy(bp, phy_index, shmem_base, shmem2_base, bp 12493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c link_config = REG_RD(bp, params->shmem_base + bp 12500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy->speed_cap_mask = REG_RD(bp, params->shmem_base + bp 12505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c link_config = REG_RD(bp, params->shmem_base + bp 12508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy->speed_cap_mask = REG_RD(bp, params->shmem_base + bp 12600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, params->shmem_base, bp 12646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c media_types = REG_RD(bp, sync_offset); bp 12660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, sync_offset, media_types); bp 12673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port * 4, 0); bp 12693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port * 4, 0); bp 12712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_warpcore_reset_lane(bp, ¶ms->phy[0], 0); bp 12732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 12738 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 12753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!USES_WARPCORE(bp)) bp 12771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 12778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (USES_WARPCORE(bp)) bp 12797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 12804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E1x(bp)) bp 12810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK + params->port*4, val); bp 12812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E1(bp)) { bp 12813 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK_MF + params->port*4, bp 12817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, (params->port ? NIG_REG_LLH1_BRB1_NOT_MCP : bp 12825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_emac_per_phy(bp, params); bp 12847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c lfa_sts = REG_RD(bp, params->lfa_base + bp 12854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 12856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + bp 12860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + bp 12884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 12900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12915 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c tmp_val = REG_RD(bp, params->lfa_base + bp 12931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c lfa_sts = REG_RD(bp, params->lfa_base + bp 12950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, params->lfa_base + bp 12958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 12991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + params->port*4, bp 13027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 13031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_serdes_deassert(bp, params->port); bp 13047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4, bp 13064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 1); bp 13067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 13068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_OUT_EN + port*4, 0); bp 13069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_EMAC0_OUT_EN + port*4, 0); bp 13072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 13073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_bmac_rx(bp, params->chip_id, port, 0); bp 13079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) bp 13080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0); bp 13087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_emac_per_phy(bp, params); bp 13108 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_rearm_latch_signal(bp, port, 0); bp 13109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_LATCH_BC_0 + port*4, bp 13117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) { bp 13119 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 13121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_BMAC0_IN_EN + port*4, 0); bp 13122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EMAC0_IN_EN + port*4, 0); bp 13126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 13128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, xmac_base + XMAC_REG_CTRL, bp 13138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 1); bp 13154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) bp 13155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 0); bp 13157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 13175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (!CHIP_IS_E3(bp)) bp 13176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_bmac_rx(bp, params->chip_id, params->port, 1); bp 13178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 13183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 13190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8073_common_init_phy(struct bnx2x *bp, bp 13201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_val = REG_RD(bp, NIG_REG_PORT_SWAP); bp 13202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE); bp 13204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, port); bp 13209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) { bp 13220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base, bp 13227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + bp 13237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 13242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, &phy[port], bp 13261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) bp 13268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bp 13273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy_blk[port], bp 13278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy_blk[port], bp 13293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy_blk[port], bp 13297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy_blk[port], bp 13303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy_blk[port], bp 13306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy_blk[port], bp 13311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_2, bp 13316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8726_common_init_phy(struct bnx2x *bp, bp 13326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MISC_REG_GPIO_EVENT_EN); bp 13329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_GPIO_EVENT_EN, val); bp 13331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_ext_phy_hw_reset(bp, 0); bp 13337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) { bp 13345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base, bp 13353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, &phy, bp 13358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_0, bp 13365 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static void bnx2x_get_ext_phy_reset_gpio(struct bnx2x *bp, u32 shmem_base, bp 13369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u32 phy_gpio_reset = REG_RD(bp, shmem_base + bp 13411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_8727_common_init_phy(struct bnx2x *bp, bp 13421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_val = REG_RD(bp, NIG_REG_PORT_SWAP); bp 13422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE); bp 13430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_get_ext_phy_reset_gpio(bp, shmem_base_path[0], bp 13437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, reset_gpio, MISC_REGISTERS_GPIO_OUTPUT_LOW, bp 13440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, reset_gpio, MISC_REGISTERS_GPIO_OUTPUT_HIGH, bp 13450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) { bp 13461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base, bp 13468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + bp 13477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, &phy[port], bp 13492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E1x(bp)) bp 13498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bp 13502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_write(bp, phy_blk[port], bp 13510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_84833_common_init_phy(struct bnx2x *bp, bp 13517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c reset_gpios = bnx2x_84833_get_reset_gpios(bp, shmem_base_path, chip_id); bp 13518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_LOW); bp 13520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mult_gpio(bp, reset_gpios, MISC_REGISTERS_GPIO_OUTPUT_HIGH); bp 13526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[], bp 13534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc = bnx2x_8073_common_init_phy(bp, shmem_base_path, bp 13541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc = bnx2x_8727_common_init_phy(bp, shmem_base_path, bp 13550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc = bnx2x_8726_common_init_phy(bp, shmem_base_path, bp 13560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc = bnx2x_84833_common_init_phy(bp, shmem_base_path, bp 13575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Warning: PHY was not initialized," bp 13581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c int bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base_path[], bp 13589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_clk(bp, chip_id, GRCBASE_EMAC0); bp 13590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_mdio_clk(bp, chip_id, GRCBASE_EMAC1); bp 13592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 13594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MISC_REG_GEN_PURP_HWG); bp 13595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_GEN_PURP_HWG, val | 1); bp 13598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c phy_ver = REG_RD(bp, shmem_base_path[0] + bp 13610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c ext_phy_config = bnx2x_get_ext_phy_config(bp, bp 13614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c rc |= bnx2x_ext_phy_common_init(bp, shmem_base_path, bp 13625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = (REG_RD(bp, params->shmem_base + bp 13637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_get_cfg_pin(bp, cfg_pin, &pin_val) != 0) bp 13642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c netdev_err(bp->dev, "Error: Power fault on Port %d has" bp 13662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 1); bp 13711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + params->port*4, 0); bp 13723 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_notify_link_changed(bp); bp 13741 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (REG_RD(bp, NIG_REG_EGRESS_EMAC0_PORT + params->port*4))) bp 13749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp) && bp 13750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 13760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, mac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, 0); bp 13761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, mac_base + XMAC_REG_CLEAR_RX_LSS_STATUS, bp 13764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (REG_RD(bp, mac_base + XMAC_REG_RX_LSS_STATUS)) bp 13770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c } else if (REG_RD(bp, MISC_REG_RESET_REG_2) & bp 13778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E2(bp)) bp 13783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_RD_DMAE(bp, mac_base + lss_status_reg, wb_data, 2); bp 13796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c cfg_pin = (REG_RD(bp, params->shmem_base + offsetof(struct shmem_region, bp 13806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_get_cfg_pin(bp, cfg_pin, &value)) { bp 13839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK, bp 13875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 13877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_cl45_read(bp, phy, MDIO_AN_DEVAD, bp 13921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 13944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if ((REG_RD(bp, params->shmem_base + bp 13963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c u8 bnx2x_fan_failure_det_req(struct bnx2x *bp, bp 13972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, shmem_base, shmem2_base, bp 13987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c struct bnx2x *bp = params->bp; bp 13989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + params->port*4, bp 14006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c void bnx2x_init_mod_abs_int(struct bnx2x *bp, struct link_vars *vars, bp 14013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (CHIP_IS_E3(bp)) { bp 14014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_get_mod_abs_int_cfg(bp, chip_id, bp 14024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c if (bnx2x_populate_phy(bp, phy_index, shmem_base, bp 14042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c bnx2x_set_gpio(bp, gpio_num, MISC_REGISTERS_GPIO_INPUT_HI_Z, gpio_port); bp 14044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_val = REG_RD(bp, NIG_REG_PORT_SWAP); bp 14045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c swap_override = REG_RD(bp, NIG_REG_STRAP_OVERRIDE); bp 14054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, sync_offset, vars->aeu_int_mask); bp 14065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c aeu_mask = REG_RD(bp, offset); bp 14067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, offset, aeu_mask); bp 14070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c val = REG_RD(bp, MISC_REG_GPIO_EVENT_EN); bp 14072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c REG_WR(bp, MISC_REG_GPIO_EVENT_EN, val); bp 322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h struct bnx2x *bp; bp 428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h int bnx2x_common_init_phy(struct bnx2x *bp, u32 shmem_base_path[], bp 432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h void bnx2x_ext_phy_hw_reset(struct bnx2x *bp, u8 port); bp 435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h void bnx2x_sfx7101_sp_sw_reset(struct bnx2x *bp, struct bnx2x_phy *phy); bp 451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h u8 bnx2x_fan_failure_det_req(struct bnx2x *bp, u32 shmem_base, bp 541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h void bnx2x_init_mod_abs_int(struct bnx2x *bp, struct link_vars *vars, bp 292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_storm_rx_mode(struct bnx2x *bp); bp 298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_hwtstamp_ioctl(struct bnx2x *bp, struct ifreq *ifr); bp 300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void __storm_memset_dma_mapping(struct bnx2x *bp, bp 303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, U64_LO(mapping)); bp 304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr + 4, U64_HI(mapping)); bp 307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_spq_addr(struct bnx2x *bp, bp 313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_dma_mapping(bp, addr, mapping); bp 316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_vf_to_pf(struct bnx2x *bp, u16 abs_fid, bp 319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_VF_TO_PF_OFFSET(abs_fid), bp 321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_VF_TO_PF_OFFSET(abs_fid), bp 323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_VF_TO_PF_OFFSET(abs_fid), bp 325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_VF_TO_PF_OFFSET(abs_fid), bp 329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_func_en(struct bnx2x *bp, u16 abs_fid, bp 332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_FUNC_EN_OFFSET(abs_fid), bp 334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_FUNC_EN_OFFSET(abs_fid), bp 336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_FUNC_EN_OFFSET(abs_fid), bp 338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_FUNC_EN_OFFSET(abs_fid), bp 342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_eq_data(struct bnx2x *bp, bp 350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, (u32 *)eq_data); bp 353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_eq_prod(struct bnx2x *bp, u16 eq_prod, bp 357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR16(bp, addr, eq_prod); bp 363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reg_wr_ind(struct bnx2x *bp, u32 addr, u32 val) bp 365 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, addr); bp 366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_DATA, val); bp 367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, bp 371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static u32 bnx2x_reg_rd_ind(struct bnx2x *bp, u32 addr) bp 375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, addr); bp 376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_read_config_dword(bp->pdev, PCICFG_GRC_DATA, &val); bp 377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, bp 389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_dp_dmae(struct bnx2x *bp, bp 456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_post_dmae(struct bnx2x *bp, struct dmae_command *dmae, int idx) bp 463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, cmd_offset + i*4, *(((u32 *)dmae) + i)); bp 465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, dmae_reg_go_c[idx], 1); bp 479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bnx2x_dmae_opcode(struct bnx2x *bp, u8 src_type, u8 dst_type, bp 489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c opcode |= (BP_PORT(bp) ? DMAE_CMD_PORT_1 : DMAE_CMD_PORT_0); bp 490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c opcode |= ((BP_VN(bp) << DMAE_CMD_E1HVN_SHIFT) | bp 491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (BP_VN(bp) << DMAE_COMMAND_DST_VN_SHIFT)); bp 504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_prep_dmae_with_comp(struct bnx2x *bp, bp 511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae->opcode = bnx2x_dmae_opcode(bp, src_type, dst_type, bp 515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, wb_comp)); bp 516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp)); bp 521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_issue_dmae_with_comp(struct bnx2x *bp, struct dmae_command *dmae, bp 524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int cnt = CHIP_REV_IS_SLOW(bp) ? (400000) : 4000; bp 527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dp_dmae(bp, dmae, BNX2X_MSG_DMAE); bp 534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_bh(&bp->dmae_lock); bp 540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->recovery_state != BNX2X_RECOVERY_DONE && bp 548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state != BNX2X_RECOVERY_NIC_LOADING)) { bp 563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->dmae_lock); bp 568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_write_dmae(struct bnx2x *bp, dma_addr_t dma_addr, u32 dst_addr, bp 574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->dmae_ready) { bp 575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 *data = bnx2x_sp(bp, wb_data[0]); bp 577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_ind_wr(bp, dst_addr, data, len32); bp 580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_str_wr(bp, dst_addr, data, len32); bp 585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prep_dmae_with_comp(bp, &dmae, DMAE_SRC_PCI, DMAE_DST_GRC); bp 595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_issue_dmae_with_comp(bp, &dmae, bnx2x_sp(bp, wb_comp)); bp 604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32) bp 609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->dmae_ready) { bp 610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 *data = bnx2x_sp(bp, wb_data[0]); bp 613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c data[i] = bnx2x_reg_rd_ind(bp, src_addr + i*4); bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c data[i] = REG_RD(bp, src_addr + i*4); bp 624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prep_dmae_with_comp(bp, &dmae, DMAE_SRC_GRC, DMAE_DST_PCI); bp 629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae.dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, wb_data)); bp 630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae.dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_data)); bp 634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_issue_dmae_with_comp(bp, &dmae, bnx2x_sp(bp, wb_comp)); bp 643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_write_dmae_phys_len(struct bnx2x *bp, dma_addr_t phys_addr, bp 646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int dmae_wr_max = DMAE_LEN32_WR_MAX(bp); bp 650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_write_dmae(bp, phys_addr + offset, bp 656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_write_dmae(bp, phys_addr + offset, addr + offset, len); bp 670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static inline int bnx2x_get_assert_list_entry(struct bnx2x *bp, bp 690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_mc_assert(struct bnx2x *bp) bp 716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c last_idx = REG_RD8(bp, bar_storm_intmem[storm] + bp 726 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c regs[j] = REG_RD(bp, bar_storm_intmem[storm] + bp 727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_assert_list_entry(bp, bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E1(bp) ? "everest1" : bp 746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E1H(bp) ? "everest1h" : bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E2(bp) ? "everest2" : "everest3", bp 756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c #define SCRATCH_BUFFER_SIZE(bp) \ bp 757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E1(bp) ? 0x10000 : (CHIP_IS_E1H(bp) ? 0x20000 : 0x28000)) bp 759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_fw_dump_lvl(struct bnx2x *bp, const char *lvl) bp 766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_NOMCP(bp)) { bp 770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_printk(lvl, bp->dev, "bc %d.%d.%d\n", bp 771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.bc_ver & 0xff0000) >> 16, bp 772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.bc_ver & 0xff00) >> 8, bp 773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.bc_ver & 0xff)); bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (pci_channel_offline(bp->pdev)) { bp 780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MCP_REG_MCPR_CPU_PROGRAM_COUNTER); bp 781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (val == REG_RD(bp, MCP_REG_MCPR_CPU_PROGRAM_COUNTER)) bp 784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_PATH(bp) == 0) bp 785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c trace_shmem_base = bp->common.shmem_base; bp 787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c trace_shmem_base = SHMEM2_RD(bp, other_shmem_base_addr); bp 790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (trace_shmem_base < MCPR_SCRATCH_BASE(bp) + MCPR_TRACE_BUFFER_SIZE || bp 791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c trace_shmem_base >= MCPR_SCRATCH_BASE(bp) + bp 792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SCRATCH_BUFFER_SIZE(bp)) { bp 801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mark = REG_RD(bp, addr); bp 809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mark = REG_RD(bp, addr); bp 810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mark = MCPR_SCRATCH_BASE(bp) + ((mark + 0x3) & ~0x3) - 0x08000000; bp 822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c data[word] = htonl(REG_RD(bp, offset + 4*word)); bp 830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c data[word] = htonl(REG_RD(bp, offset + 4*word)); bp 837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_fw_dump(struct bnx2x *bp) bp 839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_dump_lvl(bp, KERN_ERR); bp 842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_hc_int_disable(struct bnx2x *bp) bp 844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, addr); bp 852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) { bp 857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_INT_MASK + port*4, 0); bp 872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, val); bp 873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, addr) != val) bp 877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_igu_int_disable(struct bnx2x *bp) bp 879 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, IGU_REG_PF_CONFIGURATION); bp 887 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); bp 888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, IGU_REG_PF_CONFIGURATION) != val) bp 892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_int_disable(struct bnx2x *bp) bp 894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) bp 895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_hc_int_disable(bp); bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_int_disable(bp); bp 900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_panic_dump(struct bnx2x *bp, bool disable_int) bp 905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && disable_int) bp 911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_int_disable(bp); bp 913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->stats_state = STATS_STATE_DISABLED; bp 914 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.unrecoverable_error++; bp 921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct host_sp_status_block *def_sb = bp->def_status_blk; bp 926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->def_idx, bp->def_att_idx, bp->attn_state, bp 927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx, bp->stats_counter); bp 944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, BAR_CSTRORM_INTMEM + cstorm_offset + bp 957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) { bp 958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E1x(bp) ? bp 967 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E1x(bp) ? bp 974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->fp) bp 1007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c loop = CHIP_IS_E1x(bp) ? bp 1028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 1032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c data_size = CHIP_IS_E1x(bp) ? bp 1036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sb_data_p = CHIP_IS_E1x(bp) ? bp 1041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c *(sb_data_p + j) = REG_RD(bp, BAR_CSTRORM_INTMEM + bp 1045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 1082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 1084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_ERR("eq cons %x prod %x\n", bp->eq_cons, bp->eq_prod); bp 1086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 *data = (u32 *)&bp->eq_ring[i].message.data; bp 1089 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c i, bp->eq_ring[i].message.opcode, bp 1090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_ring[i].message.error); bp 1098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_valid_rx_queue(bp, i) { bp 1099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 1101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->fp) bp 1138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_valid_tx_queue(bp, i) { bp 1139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 1141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->fp) bp 1176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 1177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_dump(bp); bp 1178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_mc_assert(bp); bp 1206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pbf_pN_buf_flushed(struct bnx2x *bp, bp 1213 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c crd_freed = crd_freed_start = REG_RD(bp, regs->crd_freed); bp 1214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c crd = crd_start = REG_RD(bp, regs->crd); bp 1215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c init_crd = REG_RD(bp, regs->init_crd); bp 1225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c crd = REG_RD(bp, regs->crd); bp 1226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c crd_freed = REG_RD(bp, regs->crd_freed); bp 1241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pbf_pN_cmd_flushed(struct bnx2x *bp, bp 1248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c occup = to_free = REG_RD(bp, regs->lines_occup); bp 1249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c freed = freed_start = REG_RD(bp, regs->lines_freed); bp 1257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c occup = REG_RD(bp, regs->lines_occup); bp 1258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c freed = REG_RD(bp, regs->lines_freed); bp 1273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static u32 bnx2x_flr_clnup_reg_poll(struct bnx2x *bp, u32 reg, bp 1279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c while ((val = REG_RD(bp, reg)) != expected && cur_cnt--) bp 1285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_flr_clnup_poll_hw_counter(struct bnx2x *bp, u32 reg, bp 1288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = bnx2x_flr_clnup_reg_poll(bp, reg, 0, poll_cnt); bp 1297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bnx2x_flr_clnup_poll_count(struct bnx2x *bp) bp 1300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_EMUL(bp)) bp 1303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_FPGA(bp)) bp 1309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_tx_hw_flushed(struct bnx2x *bp, u32 poll_count) bp 1312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {0, (CHIP_IS_E3B0(bp)) ? bp 1315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {1, (CHIP_IS_E3B0(bp)) ? bp 1321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {4, (CHIP_IS_E3B0(bp)) ? bp 1327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {0, (CHIP_IS_E3B0(bp)) ? bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {1, (CHIP_IS_E3B0(bp)) ? bp 1345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c {4, (CHIP_IS_E3B0(bp)) ? bp 1354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E3B0(bp)) ? bp 1366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pbf_pN_cmd_flushed(bp, &cmd_regs[i], poll_count); bp 1370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pbf_pN_buf_flushed(bp, &buf_regs[i], poll_count); bp 1382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_send_final_clnup(struct bnx2x *bp, u8 clnup_func, u32 poll_cnt) bp 1389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, comp_addr)) { bp 1400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSDM_REG_OPERATION_GEN, op_gen_command); bp 1402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_reg_poll(bp, comp_addr, 1, poll_cnt) != 1) { bp 1405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (REG_RD(bp, comp_addr))); bp 1410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, comp_addr, 0); bp 1425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_poll_hw_usage_counters(struct bnx2x *bp, u32 poll_cnt) bp 1428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c QM_REG_PF_USG_CNT_0 + 4*BP_FUNC(bp), bp 1449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c TM_REG_LIN0_VNIC_UC + 4*BP_PORT(bp), bp 1454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c TM_REG_LIN0_NUM_SCANS + 4*BP_PORT(bp), bp 1461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_flr_clnup_poll_hw_counter(bp, bp 1462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dmae_reg_go_c[INIT_DMAE_C(bp)], bp 1470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_hw_enable_status(struct bnx2x *bp) bp 1474 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, CFC_REG_WEAK_ENABLE_PF); bp 1477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PBF_REG_DISABLE_PF); bp 1480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_PCI_PF_MSI_EN); bp 1483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_PCI_PF_MSIX_EN); bp 1486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_PCI_PF_MSIX_FUNC_MASK); bp 1489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PGLUE_B_REG_SHADOW_BME_PF_7_0_CLR); bp 1492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PGLUE_B_REG_FLR_REQUEST_PF_7_0_CLR); bp 1495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER); bp 1500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_pf_flr_clnup(struct bnx2x *bp) bp 1502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 poll_cnt = bnx2x_flr_clnup_poll_count(bp); bp 1504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(BNX2X_MSG_SP, "Cleanup after FLR PF[%d]\n", BP_ABS_FUNC(bp)); bp 1507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ, 1); bp 1511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_poll_hw_usage_counters(bp, poll_cnt)) bp 1517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_send_final_clnup(bp, (u8)BP_FUNC(bp), poll_cnt)) bp 1523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_tx_hw_flushed(bp, poll_cnt); bp 1529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_is_pcie_pending(bp->pdev)) bp 1533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_hw_enable_status(bp); bp 1539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 1); bp 1544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_hc_int_enable(struct bnx2x *bp) bp 1546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 1548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, addr); bp 1549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool msix = (bp->flags & USING_MSIX_FLAG) ? true : false; bp 1550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool single_msix = (bp->flags & USING_SINGLE_MSIX_FLAG) ? true : false; bp 1551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool msi = (bp->flags & USING_MSI_FLAG) ? true : false; bp 1571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 1575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, val); bp 1581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 1582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_INT_MASK + port*4, 0x1FFFF); bp 1588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, val); bp 1594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 1596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 1597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = (0xee0f | (1 << (BP_VN(bp) + 4))); bp 1598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf) bp 1604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, val); bp 1605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, val); bp 1609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_igu_int_enable(struct bnx2x *bp) bp 1612 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool msix = (bp->flags & USING_MSIX_FLAG) ? true : false; bp 1613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool single_msix = (bp->flags & USING_SINGLE_MSIX_FLAG) ? true : false; bp 1614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool msi = (bp->flags & USING_MSI_FLAG) ? true : false; bp 1616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_PF_CONFIGURATION); bp 1640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); bp 1641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_int(bp); bp 1649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); bp 1652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_intx(bp->pdev, true); bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 1658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = (0xee0f | (1 << (BP_VN(bp) + 4))); bp 1659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf) bp 1665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, val); bp 1666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, val); bp 1669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_int_enable(struct bnx2x *bp) bp 1671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) bp 1672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_hc_int_enable(bp); bp 1674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_int_enable(bp); bp 1677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_int_disable_sync(struct bnx2x *bp, int disable_hw) bp 1679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0; bp 1684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_int_disable(bp); bp 1688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c synchronize_irq(bp->msix_table[0].vector); bp 1690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 1692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) bp 1693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c synchronize_irq(bp->msix_table[offset++].vector); bp 1695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c synchronize_irq(bp->pdev->irq); bp 1698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_delayed_work(&bp->sp_task); bp 1699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_delayed_work(&bp->period_task); bp 1710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_trylock_hw_lock(struct bnx2x *bp, u32 resource) bp 1714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 1735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, hw_lock_control_reg + 4, resource_bit); bp 1736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lock_status = REG_RD(bp, hw_lock_control_reg); bp 1753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_get_leader_lock_resource(struct bnx2x *bp) bp 1755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_PATH(bp)) bp 1768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_trylock_leader_lock(struct bnx2x *bp) bp 1770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_trylock_hw_lock(bp, bnx2x_get_leader_lock_resource(bp)); bp 1773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_cnic_cfc_comp(struct bnx2x *bp, int cid, u8 err); bp 1776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_schedule_sp_task(struct bnx2x *bp) bp 1782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_set(&bp->interrupt_occurred, 1); bp 1791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return queue_delayed_work(bnx2x_wq, &bp->sp_task, 0); bp 1796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = fp->bp; bp 1800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_queue_sp_obj *q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 1804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp->index, cid, command, bp->state, bp 1812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_set_queue_sp_obj(bp, cid, &q_obj); bp 1857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c q_obj->complete_cmd(bp, q_obj, drv_cmd)) bp 1872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_inc(&bp->cq_spq_left); bp 1876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(BNX2X_MSG_SP, "bp->cq_spq_left %x\n", atomic_read(&bp->cq_spq_left)); bp 1879 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (!!test_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state))) { bp 1890 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(BNX2X_AFEX_PENDING_VIFSET_MCP_ACK, &bp->sp_state); bp 1892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c clear_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state); bp 1896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_task(bp); bp 1904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev_instance); bp 1905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u16 status = bnx2x_ack_int(bp); bp 1918 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->panic)) bp 1922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) { bp 1923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 1925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mask = 0x2 << (fp->index + CNIC_SUPPORT(bp)); bp 1931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c napi_schedule_irqoff(&bnx2x_fp(bp, fp->index, napi)); bp 1936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) { bp 1942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops = rcu_dereference(bp->cnic_ops); bp 1943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (c_ops && (bp->cnic_eth_dev.drv_state & bp 1945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops->cnic_handler(bp->cnic_data, NULL); bp 1957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_task(bp); bp 1977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_acquire_hw_lock(struct bnx2x *bp, u32 resource) bp 1981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 2000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lock_status = REG_RD(bp, hw_lock_control_reg); bp 2010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, hw_lock_control_reg + 4, resource_bit); bp 2011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lock_status = REG_RD(bp, hw_lock_control_reg); bp 2021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_release_leader_lock(struct bnx2x *bp) bp 2023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_release_hw_lock(bp, bnx2x_get_leader_lock_resource(bp)); bp 2026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_release_hw_lock(struct bnx2x *bp, u32 resource) bp 2030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 2048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lock_status = REG_RD(bp, hw_lock_control_reg); bp 2055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, hw_lock_control_reg, resource_bit); bp 2059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port) bp 2062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int gpio_port = (REG_RD(bp, NIG_REG_PORT_SWAP) && bp 2063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, NIG_REG_STRAP_OVERRIDE)) ^ port; bp 2076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c gpio_reg = REG_RD(bp, MISC_REG_GPIO); bp 2087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port) bp 2090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int gpio_port = (REG_RD(bp, NIG_REG_PORT_SWAP) && bp 2091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, NIG_REG_STRAP_OVERRIDE)) ^ port; bp 2102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c gpio_reg = (REG_RD(bp, MISC_REG_GPIO) & MISC_REGISTERS_GPIO_FLOAT); bp 2137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_GPIO, gpio_reg); bp 2138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_mult_gpio(struct bnx2x *bp, u8 pins, u32 mode) bp 2150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c gpio_reg = REG_RD(bp, MISC_REG_GPIO); bp 2183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_GPIO, gpio_reg); bp 2185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_gpio_int(struct bnx2x *bp, int gpio_num, u32 mode, u8 port) bp 2193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int gpio_port = (REG_RD(bp, NIG_REG_PORT_SWAP) && bp 2194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, NIG_REG_STRAP_OVERRIDE)) ^ port; bp 2205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c gpio_reg = REG_RD(bp, MISC_REG_GPIO_INT); bp 2232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_GPIO_INT, gpio_reg); bp 2233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_GPIO); bp 2238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_spio(struct bnx2x *bp, int spio, u32 mode) bp 2248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_SPIO); bp 2250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spio_reg = (REG_RD(bp, MISC_REG_SPIO) & MISC_SPIO_FLOAT); bp 2277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_SPIO, spio_reg); bp 2278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_SPIO); bp 2283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_calc_fc_adv(struct bnx2x *bp) bp 2285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 cfg_idx = bnx2x_get_link_cfg_idx(bp); bp 2287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[cfg_idx] &= ~(ADVERTISED_Asym_Pause | bp 2289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->link_vars.ieee_fc & bp 2292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[cfg_idx] |= (ADVERTISED_Asym_Pause | bp 2297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[cfg_idx] |= ADVERTISED_Asym_Pause; bp 2305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_requested_fc(struct bnx2x *bp) bp 2311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp) && (bp->dev->mtu > 5000)) bp 2312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_TX; bp 2314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_BOTH; bp 2317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_dropless_fc(struct bnx2x *bp) bp 2321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp) && bp->dropless_fc && bp->link_vars.link_up) { bp 2322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) bp 2325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BAR_USTRORM_INTMEM + bp 2326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c USTORM_ETH_PAUSE_ENABLED_OFFSET(BP_PORT(bp)), bp 2334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_initial_phy_init(struct bnx2x *bp, int load_mode) bp 2336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int rc, cfx_idx = bnx2x_get_link_cfg_idx(bp); bp 2337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u16 req_line_speed = bp->link_params.req_line_speed[cfx_idx]; bp 2339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 2340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_requested_fc(bp); bp 2341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 2344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct link_params *lp = &bp->link_params; bp 2363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct link_params *lp = &bp->link_params; bp 2367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars); bp 2369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 2371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_dropless_fc(bp); bp 2373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_calc_fc_adv(bp); bp 2375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.link_up) { bp 2376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP); bp 2377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 2379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c queue_delayed_work(bnx2x_wq, &bp->period_task, 0); bp 2380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[cfx_idx] = req_line_speed; bp 2387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_link_set(struct bnx2x *bp) bp 2389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 2390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 2391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_phy_init(&bp->link_params, &bp->link_vars); bp 2392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 2394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_dropless_fc(bp); bp 2396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_calc_fc_adv(bp); bp 2401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x__link_reset(struct bnx2x *bp) bp 2403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 2404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 2405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_lfa_reset(&bp->link_params, &bp->link_vars); bp 2406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 2411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_force_link_reset(struct bnx2x *bp) bp 2413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 2414 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_reset(&bp->link_params, &bp->link_vars, 1); bp 2415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 2418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 bnx2x_link_test(struct bnx2x *bp, u8 is_serdes) bp 2422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 2423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 2424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_test_link(&bp->link_params, &bp->link_vars, bp 2426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 2442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_calc_vn_min(struct bnx2x *bp, bp 2448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) { bp 2449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 vn_cfg = bp->mf_config[vn]; bp 2466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BNX2X_IS_ETS_ENABLED(bp)) { bp 2480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_calc_vn_max(struct bnx2x *bp, int vn, bp 2484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 vn_cfg = bp->mf_config[vn]; bp 2489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 maxCfg = bnx2x_extract_max_cfg(bp, vn_cfg); bp 2491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_PERCENT_BW(bp)) { bp 2493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vn_max_rate = (bp->link_vars.line_speed * maxCfg) / 100; bp 2504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_get_cmng_fns_mode(struct bnx2x *bp) bp 2506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_SLOW(bp)) bp 2508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) bp 2514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_read_mf_cfg(struct bnx2x *bp) bp 2516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int vn, n = (CHIP_MODE_IS_4_PORT(bp) ? 2 : 1); bp 2518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_NOMCP(bp)) bp 2532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) { bp 2533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int /*abs*/func = n * (2 * vn + BP_PORT(bp)) + BP_PATH(bp); bp 2538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = bp 2539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_mf_config[func].config); bp 2541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mf_config[BP_VN(bp)] & FUNC_MF_CFG_FUNC_DISABLED) { bp 2543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= MF_FUNC_DIS; bp 2546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags &= ~MF_FUNC_DIS; bp 2550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_cmng_fns_init(struct bnx2x *bp, u8 read_cfg, u8 cmng_type) bp 2555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c input.port_rate = bp->link_vars.line_speed; bp 2562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_mf_cfg(bp); bp 2565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_calc_vn_min(bp, &input); bp 2568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf) bp 2569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) bp 2570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_calc_vn_max(bp, vn, &input); bp 2576 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_cmng(&input, &bp->cmng); bp 2585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_cmng(struct bnx2x *bp, bp 2595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, (u32 *)&cmng->port); bp 2597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (vn = VN_0; vn < BP_MAX_VN_NUM(bp); vn++) { bp 2598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = func_by_vn(bp, vn); bp 2603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, bp 2609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, bp 2615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_local_cmng(struct bnx2x *bp) bp 2617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int cmng_fns = bnx2x_get_cmng_fns_mode(bp); bp 2620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cmng_fns_init(bp, false, cmng_fns); bp 2621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_cmng(bp, &bp->cmng, BP_PORT(bp)); bp 2630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_link_attn(struct bnx2x *bp) bp 2633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 2635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_update(&bp->link_params, &bp->link_vars); bp 2637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_dropless_fc(bp); bp 2639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.link_up) { bp 2641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.mac_type != MAC_TYPE_EMAC) { bp 2644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pstats = bnx2x_sp(bp, port_stats); bp 2649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->state == BNX2X_STATE_OPEN) bp 2650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP); bp 2653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.link_up && bp->link_vars.line_speed) bp 2654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_local_cmng(bp); bp 2656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_link_report(bp); bp 2658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) bp 2659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_sync_notify(bp); bp 2662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x__link_status_update(struct bnx2x *bp) bp 2664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->state != BNX2X_STATE_OPEN) bp 2668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 2669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_pmf_update(bp); bp 2670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_status_update(&bp->link_params, &bp->link_vars); bp 2671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.link_up) bp 2672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP); bp 2674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_STOP); bp 2676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 2679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] |= (SUPPORTED_10baseT_Half | bp 2691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[0] = bp->port.supported[0]; bp 2693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.bp = bp; bp 2694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.port = BP_PORT(bp); bp 2695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_duplex[0] = DUPLEX_FULL; bp 2696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_flow_ctrl[0] = BNX2X_FLOW_CTRL_NONE; bp 2697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[0] = SPEED_10000; bp 2698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[0] = 0x7f0000; bp 2699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.switch_cfg = SWITCH_CFG_10G; bp 2700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.mac_type = MAC_TYPE_BMAC; bp 2701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.line_speed = SPEED_10000; bp 2702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.link_status = bp 2705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.link_up = 1; bp 2706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.duplex = DUPLEX_FULL; bp 2707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.flow_ctrl = BNX2X_FLOW_CTRL_NONE; bp 2708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_link_report(bp); bp 2710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sample_bulletin(bp); bp 2717 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP); bp 2721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_afex_func_update(struct bnx2x *bp, u16 vifid, bp 2728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 2740 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_func_state_change(bp, &func_params) < 0) bp 2741 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_VIFSET_ACK, 0); bp 2746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_afex_handle_vif_list_cmd(struct bnx2x *bp, u8 cmd_type, bp 2760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 2777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_state_change(bp, &func_params); bp 2779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, drv_msg_code, 0); bp 2784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_afex_cmd(struct bnx2x *bp, u32 cmd) bp 2787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 func = BP_ABS_FUNC(bp); bp 2797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vifid = SHMEM2_RD(bp, afex_param1_to_driver[BP_FW_MB_IDX(bp)]); bp 2800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_afex_handle_vif_list_cmd(bp, VIF_LIST_RULE_GET, vifid, 0); bp 2804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vifid = SHMEM2_RD(bp, afex_param1_to_driver[BP_FW_MB_IDX(bp)]); bp 2805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c addrs = SHMEM2_RD(bp, afex_param2_to_driver[BP_FW_MB_IDX(bp)]); bp 2809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_afex_handle_vif_list_cmd(bp, VIF_LIST_RULE_SET, vifid, bp 2814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c addr_to_write = SHMEM2_RD(bp, bp 2815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c afex_scratchpad_addr_to_write[BP_FW_MB_IDX(bp)]); bp 2816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c stats_type = SHMEM2_RD(bp, bp 2817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c afex_param1_to_driver[BP_FW_MB_IDX(bp)]); bp 2823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_afex_collect_stats(bp, (void *)&afex_stats, stats_type); bp 2827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr_to_write + i*sizeof(u32), bp 2831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_STATSGET_ACK, 0); bp 2835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mf_config = MF_CFG_RD(bp, func_mf_config[func].config); bp 2836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[BP_VN(bp)] = mf_config; bp 2848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c XSTORM_RATE_SHAPING_PER_VN_VARS_OFFSET(BP_FUNC(bp)); bp 2850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[BP_VN(bp)] = mf_config; bp 2852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_calc_vn_max(bp, BP_VN(bp), &cmng_input); bp 2854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cmng_input.vnic_max_rate[BP_VN(bp)]; bp 2859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, (u32 *)&m_rs_vn); bp 2863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MF_CFG_RD(bp, func_mf_config[func].e1hov_tag) & bp 2867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MF_CFG_RD(bp, func_mf_config[func].e1hov_tag) & bp 2875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MF_CFG_RD(bp, bp 2880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MF_CFG_RD(bp, bp 2886 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_afex_func_update(bp, vif_id, vlan_val, bp 2890 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->afex_def_vlan_tag = vlan_val; bp 2891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->afex_vlan_mode = vlan_mode; bp 2894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 2897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_afex_func_update(bp, 0xFFFF, 0, 0); bp 2900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->afex_def_vlan_tag = -1; bp 2905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_update_svid_cmd(struct bnx2x *bp) bp 2912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 2919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_UFP(bp) || IS_MF_BD(bp)) { bp 2920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_ABS_FUNC(bp); bp 2924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_mf_config[func].e1hov_tag) & bp 2927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov = val; bp 2934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_VLAN_ID + BP_PORT(bp) * 8, bp 2935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov); bp 2940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch_update_params->vlan = bp->mf_ov; bp 2942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_func_state_change(bp, &func_params) < 0) { bp 2944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov); bp 2948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov); bp 2954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_OEM_UPDATE_SVID_OK, 0); bp 2957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_OEM_UPDATE_SVID_FAILURE, 0); bp 2960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pmf_update(struct bnx2x *bp) bp 2962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 2965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.pmf = 1; bp 2966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(BNX2X_MSG_MCP, "pmf %d\n", bp->port.pmf); bp 2975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c queue_delayed_work(bnx2x_wq, &bp->period_task, 0); bp 2977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_pmf_update(bp); bp 2980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = (0xff0f | (1 << (BP_VN(bp) + 4))); bp 2981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) { bp 2982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, val); bp 2983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, val); bp 2984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (!CHIP_IS_E1x(bp)) { bp 2985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, val); bp 2986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, val); bp 2989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_PMF); bp 3001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bnx2x_fw_command(struct bnx2x *bp, u32 command, u32 param) bp 3003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int mb_idx = BP_FW_MB_IDX(bp); bp 3007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 delay = CHIP_REV_IS_SLOW(bp) ? 100 : 10; bp 3009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_lock(&bp->fw_mb_mutex); bp 3010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c seq = ++bp->fw_seq; bp 3011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_WR(bp, func_mb[mb_idx].drv_mb_param, param); bp 3012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_WR(bp, func_mb[mb_idx].drv_mb_header, (command | seq)); bp 3021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = SHMEM_RD(bp, func_mb[mb_idx].fw_mb_header); bp 3035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_dump(bp); bp 3038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_unlock(&bp->fw_mb_mutex); bp 3043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void storm_memset_func_cfg(struct bnx2x *bp, bp 3052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __storm_memset_struct(bp, addr, size, (u32 *)tcfg); bp 3055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p) bp 3057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 3060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_func_cfg(bp, &tcfg, p->func_id); bp 3064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_vf_to_pf(bp, p->func_id, p->pf_id); bp 3065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_func_en(bp, p->func_id, 1); bp 3069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_spq_addr(bp, p->spq_map, p->func_id); bp 3070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSEM_REG_FAST_MEMORY + bp 3084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static unsigned long bnx2x_get_common_flags(struct bnx2x *bp, bp 3102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->flags & TX_SWITCHING) bp 3115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static unsigned long bnx2x_get_q_flags(struct bnx2x *bp, bp 3122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_SD(bp)) bp 3147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) bp 3150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return flags | bnx2x_get_common_flags(bp, fp, true); bp 3153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pf_q_prep_general(struct bnx2x *bp, bp 3164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c gen_init->mtu = bp->dev->mtu; bp 3171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pf_rx_q_prep(struct bnx2x *bp, bp 3180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->sge_th_lo = SGE_TH_LO(bp); bp 3181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->sge_th_hi = SGE_TH_HI(bp); bp 3184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c WARN_ON(bp->dropless_fc && bp 3189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c max_sge = SGE_PAGE_ALIGN(bp->dev->mtu) >> bp 3197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 3198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->bd_th_lo = BD_TH_LO(bp); bp 3199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->bd_th_hi = BD_TH_HI(bp); bp 3201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->rcq_th_lo = RCQ_TH_LO(bp); bp 3202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pause->rcq_th_hi = RCQ_TH_HI(bp); bp 3207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c WARN_ON(bp->dropless_fc && bp 3209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_ring_size); bp 3210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c WARN_ON(bp->dropless_fc && bp 3233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rxq_init->rss_engine_id = BP_FUNC(bp); bp 3234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rxq_init->mcast_engine_id = BP_FUNC(bp); bp 3241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rxq_init->max_tpa_queues = MAX_AGG_QS(bp); bp 3253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) { bp 3254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rxq_init->silent_removal_value = bp->afex_def_vlan_tag; bp 3259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pf_tx_q_prep(struct bnx2x *bp, bp 3272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c txq_init->tss_leading_cl_id = bnx2x_fp(bp, 0, cl_id); bp 3280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pf_init(struct bnx2x *bp) bp 3285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 3288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_STATISTIC_NUM_MESSAGE_SENT + bp 3290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_MODE_IS_4_PORT(bp) ? bp 3291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_FUNC(bp) : BP_VN(bp))*4, 0); bp 3293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_STATISTIC_NUM_MESSAGE_SENT + bp 3296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_MODE_IS_4_PORT(bp) ? bp 3297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_FUNC(bp) : BP_VN(bp))*4, 0); bp 3301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_init.pf_id = BP_FUNC(bp); bp 3302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_init.func_id = BP_FUNC(bp); bp 3303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_init.spq_map = bp->spq_mapping; bp 3304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_init.spq_prod = bp->spq_prod_idx; bp 3306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_func_init(bp, &func_init); bp 3308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(&(bp->cmng), 0, sizeof(struct cmng_struct_per_port)); bp 3316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.line_speed = SPEED_10000; bp 3317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cmng_fns_init(bp, true, bnx2x_get_cmng_fns_mode(bp)); bp 3320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf) bp 3321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_cmng(bp, &bp->cmng, BP_PORT(bp)); bp 3324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eq_data.base_addr.hi = U64_HI(bp->eq_mapping); bp 3325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eq_data.base_addr.lo = U64_LO(bp->eq_mapping); bp 3326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eq_data.producer = bp->eq_prod; bp 3329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_eq_data(bp, &eq_data, BP_FUNC(bp)); bp 3332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_e1h_disable(struct bnx2x *bp) bp 3334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 3336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_tx_disable(bp); bp 3338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0); bp 3341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_e1h_enable(struct bnx2x *bp) bp 3343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 3345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(IS_MF_UFP(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) bp 3346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port * 8, 1); bp 3349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_tx_wake_all_queues(bp->dev); bp 3359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_drv_info_ether_stat(struct bnx2x *bp) bp 3362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->slowpath->drv_info_to_mcp.ether_stat; bp 3364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_objs->mac_obj; bp 3381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mac_obj->get_n_elements(bp, &bp->sp_objs[0].mac_obj, bp 3385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->mtu_size = bp->dev->mtu; bp 3386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->dev->features & NETIF_F_RXCSUM) bp 3388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->dev->features & NETIF_F_TSO) bp 3390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->feature_flags |= bp->common.boot_mode; bp 3392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->promiscuous_mode = (bp->dev->flags & IFF_PROMISC) ? 1 : 0; bp 3394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->txq_size = bp->tx_ring_size; bp 3395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->rxq_size = bp->rx_ring_size; bp 3398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ether_stat->vf_cnt = IS_SRIOV(bp) ? bp->vfdb->sriov.nr_virtfn : 0; bp 3402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp) bp 3404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app; bp 3406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->slowpath->drv_info_to_mcp.fcoe_stat; bp 3408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_LOADED(bp)) bp 3411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(fcoe_stat->mac_local + MAC_PAD, bp->fip_mac, ETH_ALEN); bp 3417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp)) { bp 3419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->fw_stats_data->queue_stats[FCOE_IDX(bp)]. bp 3423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->fw_stats_data->queue_stats[FCOE_IDX(bp)]. bp 3427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->fw_stats_data->fcoe; bp 3501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD); bp 3504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp) bp 3506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app; bp 3508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->slowpath->drv_info_to_mcp.iscsi_stat; bp 3510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_LOADED(bp)) bp 3513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(iscsi_stat->mac_local + MAC_PAD, bp->cnic_eth_dev.iscsi_mac, bp 3520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD); bp 3528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_config_mf_bw(struct bnx2x *bp) bp 3534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!IS_MF(bp)) { bp 3540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.link_up) { bp 3541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cmng_fns_init(bp, true, CMNG_FNS_MINMAX); bp 3542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_sync_notify(bp); bp 3544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_cmng(bp, &bp->cmng, BP_PORT(bp)); bp 3547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_mf_bw(struct bnx2x *bp) bp 3549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_config_mf_bw(bp); bp 3550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_SET_MF_BW_ACK, 0); bp 3553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_eee_event(struct bnx2x *bp) bp 3556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_EEE_RESULTS_ACK, 0); bp 3562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_drv_info_req(struct bnx2x *bp) bp 3565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 drv_info_ctl = SHMEM2_RD(bp, drv_info_control); bp 3571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_DRV_INFO_NACK, 0); bp 3579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_lock(&bp->drv_info_mutex); bp 3581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(&bp->slowpath->drv_info_to_mcp, 0, bp 3586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_info_ether_stat(bp); bp 3589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_info_fcoe_stat(bp); bp 3592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_info_iscsi_stat(bp); bp 3596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_DRV_INFO_NACK, 0); bp 3603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_info_host_addr_lo, bp 3604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c U64_LO(bnx2x_sp_mapping(bp, drv_info_to_mcp))); bp 3605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_info_host_addr_hi, bp 3606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c U64_HI(bnx2x_sp_mapping(bp, drv_info_to_mcp))); bp 3608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_DRV_INFO_ACK, 0); bp 3614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!SHMEM2_HAS(bp, mfw_drv_indication)) { bp 3616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (!bp->drv_info_mng_owner) { bp 3617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bit = MFW_DRV_IND_READ_DONE_OFFSET((BP_ABS_FUNC(bp) >> 1)); bp 3620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 indication = SHMEM2_RD(bp, mfw_drv_indication); bp 3624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, mfw_drv_indication, bp 3635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->drv_info_mng_owner = true; bp 3639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_unlock(&bp->drv_info_mutex); bp 3663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_update_mng_version(struct bnx2x *bp) bp 3668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int idx = BP_FW_MB_IDX(bp); bp 3671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!SHMEM2_HAS(bp, func_os_drv_ver)) bp 3674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_lock(&bp->drv_info_mutex); bp 3676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->drv_info_mng_owner) bp 3679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->state != BNX2X_STATE_OPEN) bp 3684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_LOADED(bp)) bp 3688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(&bp->slowpath->drv_info_to_mcp, 0, bp 3690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_info_iscsi_stat(bp); bp 3691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c version = bp->slowpath->drv_info_to_mcp.iscsi_stat.version; bp 3694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(&bp->slowpath->drv_info_to_mcp, 0, bp 3696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_info_fcoe_stat(bp); bp 3697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c version = bp->slowpath->drv_info_to_mcp.fcoe_stat.version; bp 3701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, func_os_drv_ver[idx].versions[DRV_PERS_ETHERNET], ethver); bp 3702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, func_os_drv_ver[idx].versions[DRV_PERS_ISCSI], iscsiver); bp 3703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, func_os_drv_ver[idx].versions[DRV_PERS_FCOE], fcoever); bp 3705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_unlock(&bp->drv_info_mutex); bp 3711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_update_mfw_dump(struct bnx2x *bp) bp 3716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!SHMEM2_HAS(bp, drv_info)) bp 3720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_info.epoc, (u32)ktime_get_real_seconds()); bp 3723 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_info.drv_ver, drv_ver); bp 3725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_info.fw_ver, REG_RD(bp, XSEM_REG_PRAM)); bp 3728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c valid_dump = SHMEM2_RD(bp, drv_info.valid_dump); bp 3737 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_oem_event(struct bnx2x *bp, u32 event) bp 3764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mf_config[BP_VN(bp)] & FUNC_MF_CFG_FUNC_DISABLED) { bp 3766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= MF_FUNC_DIS; bp 3768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_e1h_disable(bp); bp 3771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags &= ~MF_FUNC_DIS; bp 3773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_e1h_enable(bp); bp 3781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_config_mf_bw(bp); bp 3788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, cmd_fail, 0); bp 3790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, cmd_ok, 0); bp 3794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static struct eth_spe *bnx2x_sp_get_next(struct bnx2x *bp) bp 3796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct eth_spe *next_spe = bp->spq_prod_bd; bp 3798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->spq_prod_bd == bp->spq_last_bd) { bp 3799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_bd = bp->spq; bp 3800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx = 0; bp 3803 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_bd++; bp 3804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx++; bp 3810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_sp_prod_update(struct bnx2x *bp) bp 3812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 3821 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR16_RELAXED(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func), bp 3822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx); bp 3859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_sp_post(struct bnx2x *bp, int command, int cid, bp 3867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->panic)) { bp 3873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_bh(&bp->spq_lock); bp 3876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!atomic_read(&bp->eq_spq_left)) { bp 3878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->spq_lock); bp 3882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (!atomic_read(&bp->cq_spq_left)) { bp 3884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->spq_lock); bp 3889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spe = bnx2x_sp_get_next(bp); bp 3894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c HW_CID(bp, cid)); bp 3903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c type |= ((BP_FUNC(bp) << SPE_HDR_FUNCTION_ID_SHIFT) & bp 3920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_dec(&bp->eq_spq_left); bp 3922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_dec(&bp->cq_spq_left); bp 3926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx, (u32)U64_HI(bp->spq_mapping), bp 3927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (u32)(U64_LO(bp->spq_mapping) + bp 3928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (void *)bp->spq_prod_bd - (void *)bp->spq), command, common, bp 3929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c HW_CID(bp, cid), data_hi, data_lo, type, bp 3930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_read(&bp->cq_spq_left), atomic_read(&bp->eq_spq_left)); bp 3932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_prod_update(bp); bp 3933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->spq_lock); bp 3938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_acquire_alr(struct bnx2x *bp) bp 3945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MCP_REG_MCPR_ACCESS_LOCK, MCPR_ACCESS_LOCK_LOCK); bp 3946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MCP_REG_MCPR_ACCESS_LOCK); bp 3961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_release_alr(struct bnx2x *bp) bp 3963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MCP_REG_MCPR_ACCESS_LOCK, 0); bp 3969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static u16 bnx2x_update_dsb_idx(struct bnx2x *bp) bp 3971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct host_sp_status_block *def_sb = bp->def_status_blk; bp 3975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->def_att_idx != def_sb->atten_status_block.attn_bits_index) { bp 3976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->def_att_idx = def_sb->atten_status_block.attn_bits_index; bp 3980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->def_idx != def_sb->sp_sb.running_index) { bp 3981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->def_idx = def_sb->sp_sb.running_index; bp 3994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_asserted(struct bnx2x *bp, u32 asserted) bp 3996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 4005 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->attn_state & asserted) bp 4008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_PORT0_ATT_MASK + port); bp 4009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c aeu_mask = REG_RD(bp, aeu_addr); bp 4016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, aeu_addr, aeu_mask); bp 4017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_PORT0_ATT_MASK + port); bp 4019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "attn_state %x\n", bp->attn_state); bp 4020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_state |= asserted; bp 4021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "new state %x\n", bp->attn_state); bp 4026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 4029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c nig_mask = REG_RD(bp, nig_int_mask_addr); bp 4035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, nig_int_mask_addr, 0); bp 4037 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_attn(bp); bp 4057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_1, 0x0); bp 4061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_2, 0x0); bp 4065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_3, 0x0); bp 4070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_4, 0x0); bp 4074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_5, 0x0); bp 4078 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_6, 0x0); bp 4084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) bp 4091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.int_block == INT_BLOCK_HC) ? "HC" : "IGU", reg_addr); bp 4092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_addr, asserted); bp 4099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block != INT_BLOCK_HC) { bp 4102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c igu_acked = REG_RD(bp, bp 4111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, nig_int_mask_addr, nig_mask); bp 4112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 4116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_fan_failure(struct bnx2x *bp) bp 4118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 4122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 4127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_WR(bp, dev_info.port_hw_config[port].external_phy_config, bp 4131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, "Fan Failure on Network Controller has caused the driver to shutdown the card to prevent permanent damage.\n" bp 4138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_FAN_FAILURE, 0); bp 4141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted0(struct bnx2x *bp, u32 attn) bp 4143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 4152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, reg_offset); bp 4154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset, val); bp 4159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_hw_reset_phy(&bp->link_params); bp 4160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fan_failure(bp); bp 4163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((attn & bp->link_vars.aeu_int_mask) && bp->port.pmf) { bp 4164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 4165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_module_detect_int(&bp->link_params); bp 4166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 4171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, reg_offset); bp 4173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset, val); bp 4181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted1(struct bnx2x *bp, u32 attn) bp 4187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, DORQ_REG_DORQ_INT_STS_CLR); bp 4196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 4202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, reg_offset); bp 4204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset, val); bp 4212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted2(struct bnx2x *bp, u32 attn) bp 4218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, CFC_REG_CFC_INT_STS_CLR); bp 4226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PXP_REG_PXP_INT_STS_CLR_0); bp 4232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 4233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PXP_REG_PXP_INT_STS_CLR_1); bp 4240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 4246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, reg_offset); bp 4248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset, val); bp 4256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted3(struct bnx2x *bp, u32 attn) bp 4263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 4265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_12 + func*4, 0); bp 4266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_mf_cfg(bp); bp 4267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[BP_VN(bp)] = MF_CFG_RD(bp, bp 4268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_mf_config[BP_ABS_FUNC(bp)].config); bp 4269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, bp 4270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_mb[BP_FW_MB_IDX(bp)].drv_status); bp 4274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_oem_event(bp, bp 4279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_mf_bw(bp); bp 4282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_drv_info_req(bp); bp 4285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_iov_task(bp, bp 4288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((bp->port.pmf == 0) && (val & DRV_STATUS_PMF)) bp 4289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pmf_update(bp); bp 4291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf && bp 4293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dcbx_enabled > 0) bp 4295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_set_params(bp, bp 4298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_afex_cmd(bp, bp 4301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_eee_event(bp); bp 4304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, bp 4307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_vars.periodic_flags & bp 4310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 4311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.periodic_flags &= bp 4313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 4314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) bp 4315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_sync_notify(bp); bp 4316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 4321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x__link_status_update(bp); bp 4325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_mc_assert(bp); bp 4326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_10, 0); bp 4327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_9, 0); bp 4328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_8, 0); bp 4329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_7, 0); bp 4335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_11, 0); bp 4336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_dump(bp); bp 4345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = CHIP_IS_E1(bp) ? 0 : bp 4346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, MISC_REG_GRC_TIMEOUT_ATTN); bp 4350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = CHIP_IS_E1(bp) ? 0 : bp 4351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, MISC_REG_GRC_RSV_ATTN); bp 4354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_CLR_LATCH_SIGNAL, 0x7ff); bp 4387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_reset_global(struct bnx2x *bp) bp 4390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val | BNX2X_GLOBAL_RESET_BIT); bp 4393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_clear_reset_global(struct bnx2x *bp) bp 4404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val & (~BNX2X_GLOBAL_RESET_BIT)); bp 4407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_reset_is_global(struct bnx2x *bp) bp 4417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_reset_done(struct bnx2x *bp) bp 4431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bit = BP_PATH(bp) ? bp 4433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val); bp 4440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_reset_in_progress(struct bnx2x *bp) bp 4451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bit = BP_PATH(bp) ? bp 4453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val); bp 4459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool bnx2x_reset_is_done(struct bnx2x *bp, int engine) bp 4468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_pf_load(struct bnx2x *bp) bp 4484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 mask = BP_PATH(bp) ? BNX2X_PATH1_LOAD_CNT_MASK : bp 4486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 shift = BP_PATH(bp) ? BNX2X_PATH1_LOAD_CNT_SHIFT : bp 4489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val1 |= (1 << bp->pf_num); bp 4506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val); bp 4507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool bnx2x_clear_pf_load(struct bnx2x *bp) bp 4522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 mask = BP_PATH(bp) ? BNX2X_PATH1_LOAD_CNT_MASK : bp 4524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 shift = BP_PATH(bp) ? BNX2X_PATH1_LOAD_CNT_SHIFT : bp 4527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val1 &= ~(1 << bp->pf_num); bp 4543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BNX2X_RECOVERY_GLOB_REG, val); bp 4544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG); bp 4553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_get_load_status(struct bnx2x *bp, int engine) bp 4559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG); bp 4571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void _print_parity(struct bnx2x *bp, u32 reg) bp 4573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pr_cont(" [0x%08x] ", REG_RD(bp, reg)); bp 4581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_check_blocks_with_parity0(struct bnx2x *bp, u32 sig, bp 4599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, PRS_REG_PRS_PRTY_STS); bp 4609 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, SRC_REG_SRC_PRTY_STS); bp 4619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, TCM_REG_TCM_PRTY_STS); bp 4624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, GRCBASE_XPB + bp 4645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_check_blocks_with_parity1(struct bnx2x *bp, u32 sig, bp 4663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, PBF_REG_PBF_PRTY_STS); bp 4669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, QM_REG_QM_PRTY_STS); bp 4675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, TM_REG_TM_PRTY_STS); bp 4681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, XCM_REG_XCM_PRTY_STS); bp 4695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 4713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, DBG_REG_DBG_PRTY_STS); bp 4739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, UCM_REG_UCM_PRTY_STS); bp 4753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, GRCBASE_UPB + bp 4769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, CCM_REG_CCM_PRTY_STS); bp 4789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_check_blocks_with_parity2(struct bnx2x *bp, u32 sig, bp 4807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, PXP_REG_PXP_PRTY_STS); bp 4815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, CDU_REG_CDU_PRTY_STS); bp 4835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 4841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_check_blocks_with_parity3(struct bnx2x *bp, u32 sig, bp 4899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_CLR_LATCH_SIGNAL, bp 4912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_check_blocks_with_parity4(struct bnx2x *bp, u32 sig, bp 4930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c _print_parity(bp, bp 4948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_parity_attn(struct bnx2x *bp, bool *global, bool print, bp 4973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, bp 4979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c res |= bnx2x_check_blocks_with_parity0(bp, bp 4981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c res |= bnx2x_check_blocks_with_parity1(bp, bp 4983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c res |= bnx2x_check_blocks_with_parity2(bp, bp 4985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c res |= bnx2x_check_blocks_with_parity3(bp, bp 4987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c res |= bnx2x_check_blocks_with_parity4(bp, bp 5004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool bnx2x_chk_parity_attn(struct bnx2x *bp, bool *global, bool print) bp 5007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 5009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[0] = REG_RD(bp, bp 5012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[1] = REG_RD(bp, bp 5015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[2] = REG_RD(bp, bp 5018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[3] = REG_RD(bp, bp 5024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[3] &= ((REG_RD(bp, bp 5030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 5031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[4] = REG_RD(bp, bp 5035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_parity_attn(bp, global, print, attn.sig); bp 5038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted4(struct bnx2x *bp, u32 attn) bp 5043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PGLUE_B_REG_PGLUE_B_INT_STS_CLR); bp 5067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, ATC_REG_ATC_INT_STS_CLR); bp 5091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int_deasserted(struct bnx2x *bp, u32 deasserted) bp 5094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 5103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_alr(bp); bp 5105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_chk_parity_attn(bp, &global, true)) { bp 5107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = BNX2X_RECOVERY_INIT; bp 5108 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c schedule_delayed_work(&bp->sp_rtnl_task, 0); bp 5110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_int_disable(bp); bp 5117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_alr(bp); bp 5121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[0] = REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_1_FUNC_0 + port*4); bp 5122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[1] = REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_2_FUNC_0 + port*4); bp 5123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[2] = REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_3_FUNC_0 + port*4); bp 5124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c attn.sig[3] = REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_4_FUNC_0 + port*4); bp 5125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 5127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_5_FUNC_0 + port*4); bp 5136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c group_mask = &bp->attn_group[index]; bp 5144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted4(bp, bp 5146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted3(bp, bp 5148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted1(bp, bp 5150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted2(bp, bp 5152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted0(bp, bp 5157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_alr(bp); bp 5159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) bp 5167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.int_block == INT_BLOCK_HC) ? "HC" : "IGU", reg_addr); bp 5168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_addr, val); bp 5170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (~bp->attn_state & deasserted) bp 5176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_PORT0_ATT_MASK + port); bp 5177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c aeu_mask = REG_RD(bp, reg_addr); bp 5184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_addr, aeu_mask); bp 5185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_PORT0_ATT_MASK + port); bp 5187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "attn_state %x\n", bp->attn_state); bp 5188 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_state &= ~deasserted; bp 5189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "new state %x\n", bp->attn_state); bp 5192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_attn_int(struct bnx2x *bp) bp 5195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 attn_bits = le32_to_cpu(bp->def_status_blk->atten_status_block. bp 5197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 attn_ack = le32_to_cpu(bp->def_status_blk->atten_status_block. bp 5199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 attn_state = bp->attn_state; bp 5214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_asserted(bp, asserted); bp 5217 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted(bp, deasserted); bp 5220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_igu_ack_sb(struct bnx2x *bp, u8 igu_sb_id, u8 segment, bp 5223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 igu_addr = bp->igu_base_addr; bp 5225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_ack_sb_gen(bp, igu_sb_id, segment, index, op, update, bp 5229 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_update_eq_prod(struct bnx2x *bp, u16 prod) bp 5232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c storm_memset_eq_prod(bp, prod, BP_FUNC(bp)); bp 5235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_cnic_handle_cfc_del(struct bnx2x *bp, u32 cid, bp 5240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_eth_dev.starting_cid || bp 5241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (cid < bp->cnic_eth_dev.starting_cid && bp 5242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cid != bp->cnic_eth_dev.iscsi_l2_cid)) bp 5251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_panic_dump(bp, false); bp 5253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_cfc_comp(bp, cid, err); bp 5257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_mcast_eqe(struct bnx2x *bp) bp 5264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rparam.mcast_obj = &bp->mcast_obj; bp 5266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_lock_bh(bp->dev); bp 5269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mcast_obj.raw.clear_pending(&bp->mcast_obj.raw); bp 5272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mcast_obj.check_pending(&bp->mcast_obj)) { bp 5273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_CONT); bp 5279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 5282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_classification_eqe(struct bnx2x *bp, bp 5297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp) && (cid == BNX2X_ISCSI_ETH_CID(bp))) bp 5298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vlan_mac_obj = &bp->iscsi_l2_mac_obj; bp 5300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vlan_mac_obj = &bp->sp_objs[cid].mac_obj; bp 5305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vlan_mac_obj = &bp->sp_objs[cid].vlan_obj; bp 5312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_mcast_eqe(bp); bp 5319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = vlan_mac_obj->complete(bp, vlan_mac_obj, elem, &ramrod_flags); bp 5327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_iscsi_eth_rx_mode(struct bnx2x *bp, bool start); bp 5329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_handle_rx_mode_eqe(struct bnx2x *bp) bp 5331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_lock_bh(bp->dev); bp 5333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c clear_bit(BNX2X_FILTER_RX_MODE_PENDING, &bp->sp_state); bp 5336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_FILTER_RX_MODE_SCHED, &bp->sp_state)) bp 5337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_storm_rx_mode(bp); bp 5339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_state)) bp 5340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_iscsi_eth_rx_mode(bp, true); bp 5342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_state)) bp 5343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_iscsi_eth_rx_mode(bp, false); bp 5345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 5348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_after_afex_vif_lists(struct bnx2x *bp, bp 5355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_LISTGET_ACK, bp 5360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_LISTSET_ACK, 0); bp 5365 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_after_function_update(struct bnx2x *bp) bp 5384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->afex_vlan_mode == FUNC_MF_CFG_AFEX_VLAN_ACCESS_MODE) { bp 5389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->afex_def_vlan_tag & VLAN_VID_MASK); bp 5393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, q) { bp 5395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp = &bp->fp[q]; bp 5396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 5399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &queue_params); bp 5405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp) && CNIC_ENABLED(bp)) { bp 5406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp = &bp->fp[FCOE_IDX(bp)]; bp 5407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 5414 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(BNX2X_AFEX_FCOE_Q_UPDATE_PENDING, &bp->sp_state); bp 5418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &queue_params); bp 5424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 5425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_VIFSET_ACK, 0); bp 5430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp, u32 cid) bp 5434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp) && (cid == BNX2X_FCOE_ETH_CID(bp))) bp 5435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return &bnx2x_fcoe_sp_obj(bp, q_obj); bp 5437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return &bp->sp_objs[CID_TO_FP(cid, bp)].q_obj; bp 5440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_eq_int(struct bnx2x *bp) bp 5449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_func_sp_obj *f_obj = &bp->func_obj; bp 5450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_raw_obj *rss_raw = &bp->rss_conf_obj.raw; bp 5452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c hw_cons = le16_to_cpu(*bp->eq_cons_sb); bp 5466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sw_cons = bp->eq_cons; bp 5467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sw_prod = bp->eq_prod; bp 5470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c hw_cons, sw_cons, atomic_read(&bp->eq_spq_left)); bp 5475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c elem = &bp->eq_ring[EQ_DESC(sw_cons)]; bp 5477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_iov_eq_sp_event(bp, elem); bp 5489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vf_mbx_schedule(bp, bp 5496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->stats_comp++); bp 5513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp) && bp 5514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !bnx2x_cnic_handle_cfc_del(bp, cid, elem)) bp 5517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c q_obj = bnx2x_cid_to_q_obj(bp, cid); bp 5519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (q_obj->complete_cmd(bp, q_obj, BNX2X_Q_CMD_CFC_DEL)) bp 5526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED); bp 5527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (f_obj->complete_cmd(bp, f_obj, bp 5534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED); bp 5535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (f_obj->complete_cmd(bp, f_obj, bp 5546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp, f_obj, BNX2X_F_CMD_SWITCH_UPDATE)) bp 5554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c f_obj->complete_cmd(bp, f_obj, bp 5561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, cmd, 0); bp 5567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c f_obj->complete_cmd(bp, f_obj, bp 5569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_after_afex_vif_lists(bp, elem); bp 5574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (f_obj->complete_cmd(bp, f_obj, BNX2X_F_CMD_START)) bp 5582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (f_obj->complete_cmd(bp, f_obj, BNX2X_F_CMD_STOP)) bp 5590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (f_obj->complete_cmd(bp, f_obj, bp 5596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (opcode | bp->state) { bp 5619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_classification_eqe(bp, elem); bp 5629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_mcast_eqe(bp); bp 5639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_rx_mode_eqe(bp); bp 5644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c elem->message.opcode, bp->state); bp 5651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_add(spqe_cnt, &bp->eq_spq_left); bp 5653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_cons = sw_cons; bp 5654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_prod = sw_prod; bp 5659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_eq_prod(bp, bp->eq_prod); bp 5664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(work, struct bnx2x, sp_task.work); bp 5670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (atomic_read(&bp->interrupt_occurred)) { bp 5673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u16 status = bnx2x_update_dsb_idx(bp); bp 5677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_set(&bp->interrupt_occurred, 0); bp 5681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int(bp); bp 5687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp); bp 5689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (FCOE_INIT(bp) && bp 5695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c napi_schedule(&bnx2x_fcoe(bp, napi)); bp 5700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_eq_int(bp); bp 5701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, USTORM_ID, bp 5702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c le16_to_cpu(bp->def_idx), IGU_INT_NOP, 1); bp 5713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, ATTENTION_ID, bp 5714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c le16_to_cpu(bp->def_att_idx), IGU_INT_ENABLE, 1); bp 5719 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_state)) { bp 5720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_report(bp); bp 5721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_AFEX_VIFSET_ACK, 0); bp 5728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 5730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, USTORM_ID, 0, bp 5734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->panic)) bp 5738 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) { bp 5742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops = rcu_dereference(bp->cnic_ops); bp 5744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops->cnic_handler(bp->cnic_data, NULL); bp 5751 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_task(bp); bp 5758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_drv_pulse(struct bnx2x *bp) bp 5760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_WR(bp, func_mb[BP_FW_MB_IDX(bp)].drv_pulse_mb, bp 5761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_drv_pulse_wr_seq); bp 5766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = from_timer(bp, t, timer); bp 5768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) bp 5771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && bp 5772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !BP_NOMCP(bp)) { bp 5773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int mb_idx = BP_FW_MB_IDX(bp); bp 5777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ++bp->fw_drv_pulse_wr_seq; bp 5778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_drv_pulse_wr_seq &= DRV_PULSE_SEQ_MASK; bp 5779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drv_pulse = bp->fw_drv_pulse_wr_seq; bp 5780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drv_pulse(bp); bp 5782 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mcp_pulse = (SHMEM_RD(bp, func_mb[mb_idx].mcp_pulse_mb) & bp 5794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->state == BNX2X_STATE_OPEN) bp 5795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_handle(bp, STATS_EVENT_UPDATE); bp 5798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 5799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_timer_sriov(bp); bp 5801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 5812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_fill(struct bnx2x *bp, u32 addr, int fill, u32 len) bp 5817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr + i, fill); bp 5820 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, addr + i, fill); bp 5824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_wr_fp_sb_data(struct bnx2x *bp, bp 5831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BAR_CSTRORM_INTMEM + bp 5837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_zero_fp_sb(struct bnx2x *bp, int fw_sb_id) bp 5845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 5859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_wr_fp_sb_data(bp, fw_sb_id, sb_data_p, data_size); bp 5861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fill(bp, BAR_CSTRORM_INTMEM + bp 5864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fill(bp, BAR_CSTRORM_INTMEM + bp 5870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_wr_sp_sb_data(struct bnx2x *bp, bp 5873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 5876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BAR_CSTRORM_INTMEM + bp 5882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_zero_sp_sb(struct bnx2x *bp) bp 5884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 5891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_wr_sp_sb_data(bp, &sp_sb_data); bp 5893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fill(bp, BAR_CSTRORM_INTMEM + bp 5896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fill(bp, BAR_CSTRORM_INTMEM + bp 5939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_init_sb(struct bnx2x *bp, dma_addr_t mapping, int vfid, bp 5950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_INT_MODE_IS_BC(bp)) bp 5955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_zero_fp_sb(bp, fw_sb_id); bp 5957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 5960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sb_data_e2.common.p_func.pf_id = BP_FUNC(bp); bp 5963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sb_data_e2.common.p_func.vnic_id = BP_VN(bp); bp 5975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sb_data_e1x.common.p_func.pf_id = BP_FUNC(bp); bp 5978 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sb_data_e1x.common.p_func.vnic_id = BP_VN(bp); bp 5996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_wr_fp_sb_data(bp, fw_sb_id, sb_data_p, data_size); bp 5999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_update_coalesce_sb(struct bnx2x *bp, u8 fw_sb_id, bp 6002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_coalesce_sb_index(bp, fw_sb_id, HC_INDEX_ETH_RX_CQ_CONS, bp 6004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_coalesce_sb_index(bp, fw_sb_id, bp 6007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_coalesce_sb_index(bp, fw_sb_id, bp 6010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_coalesce_sb_index(bp, fw_sb_id, bp 6015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_def_sb(struct bnx2x *bp) bp 6017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct host_sp_status_block *def_sb = bp->def_status_blk; bp 6018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dma_addr_t mapping = bp->def_status_blk_mapping; bp 6021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 6022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 6029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_INT_MODE_IS_BC(bp)) { bp 6033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c igu_sp_sb_index = bp->igu_dsb_id; bp 6042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_state = 0; bp 6052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_group[index].sig[sindex] = bp 6053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, reg_offset + sindex*0x4 + 0x10*index); bp 6055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 6061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_group[index].sig[4] = REG_RD(bp, bp 6064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->attn_group[index].sig[4] = 0; bp 6067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) { bp 6071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset, U64_LO(section)); bp 6072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_offset + 4, U64_HI(section)); bp 6073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (!CHIP_IS_E1x(bp)) { bp 6074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_ATTN_MSG_ADDR_L, U64_LO(section)); bp 6075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_ATTN_MSG_ADDR_H, U64_HI(section)); bp 6081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_zero_sp_sb(bp); bp 6090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sp_sb_data.p_func.vnic_id = BP_VN(bp); bp 6093 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_wr_sp_sb_data(bp, &sp_sb_data); bp 6095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, USTORM_ID, 0, IGU_INT_ENABLE, 0); bp 6098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_update_coalesce(struct bnx2x *bp) bp 6102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) bp 6103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_coalesce_sb(bp, bp->fp[i].fw_sb_id, bp 6104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->tx_ticks, bp->rx_ticks); bp 6107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_sp_ring(struct bnx2x *bp) bp 6109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_init(&bp->spq_lock); bp 6110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_set(&bp->cq_spq_left, MAX_SPQ_PENDING); bp 6112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_idx = 0; bp 6113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dsb_sp_prod = BNX2X_SP_DSB_INDEX; bp 6114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_prod_bd = bp->spq; bp 6115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq_last_bd = bp->spq_prod_bd + MAX_SP_DESC_CNT; bp 6118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_eq_ring(struct bnx2x *bp) bp 6123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->eq_ring[EQ_DESC_CNT_PAGE * i - 1]; bp 6126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cpu_to_le32(U64_HI(bp->eq_mapping + bp 6129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cpu_to_le32(U64_LO(bp->eq_mapping + bp 6132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_cons = 0; bp 6133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_prod = NUM_EQ_DESC; bp 6134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_cons_sb = BNX2X_EQ_INDEX; bp 6136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_set(&bp->eq_spq_left, bp 6141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_q_rx_mode(struct bnx2x *bp, u8 cl_id, bp 6155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ramrod_param.rx_mode_obj = &bp->rx_mode_obj; bp 6156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ramrod_param.func_id = BP_FUNC(bp); bp 6158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ramrod_param.pstate = &bp->sp_state; bp 6161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ramrod_param.rdata = bnx2x_sp(bp, rx_mode_rdata); bp 6162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ramrod_param.rdata_mapping = bnx2x_sp_mapping(bp, rx_mode_rdata); bp 6164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(BNX2X_FILTER_RX_MODE_PENDING, &bp->sp_state); bp 6172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_rx_mode(bp, &ramrod_param); bp 6174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_ERR("Set rx_mode %d failed\n", bp->rx_mode); bp 6181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_fill_accept_flags(struct bnx2x *bp, u32 rx_mode, bp 6206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->accept_any_vlan) { bp 6222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->accept_any_vlan) { bp 6242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_SI(bp)) bp 6260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_storm_rx_mode(struct bnx2x *bp) bp 6266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp)) bp 6270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_fill_accept_flags(bp, bp->rx_mode, &rx_accept_flags, bp 6278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_set_q_rx_mode(bp, bp->fp->cl_id, rx_mode_flags, bp 6283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_internal_common(struct bnx2x *bp) bp 6290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BAR_USTRORM_INTMEM + bp 6292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 6293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_IGU_MODE_OFFSET, bp 6294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_INT_MODE_IS_BC(bp) ? bp 6299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_internal(struct bnx2x *bp, u32 load_code) bp 6304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_internal_common(bp); bp 6324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return fp->bp->igu_base_sb + fp->index + CNIC_SUPPORT(fp->bp); bp 6329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return fp->bp->base_fw_ndsb + fp->index + CNIC_SUPPORT(fp->bp); bp 6334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(fp->bp)) bp 6335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return BP_L_ID(fp->bp) + fp->index; bp 6340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_eth_fp(struct bnx2x *bp, int fp_idx) bp 6342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[fp_idx]; bp 6368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_txdata(bp, fp->txdata_ptr[cos], bp 6369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CID_COS_TO_TX_ONLY_CID(fp->cid, cos, bp), bp 6370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c FP_COS_TO_TXQ(fp, cos, bp), bp 6376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 6379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_sb(bp, fp->status_blk_mapping, BNX2X_VF_ID_INVALID, false, bp 6382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id, cids, bp 6383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp->max_cos, BP_FUNC(bp), bnx2x_sp(bp, q_rdata), bp 6384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_mapping(bp, q_rdata), q_type); bp 6393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp_idx, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id, bp 6426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_tx_rings_cnic(struct bnx2x *bp) bp 6430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_tx_queue_cnic(bp, i) bp 6431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[0]); bp 6434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_tx_rings(struct bnx2x *bp) bp 6439 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) bp 6440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_cos_in_tx_queue(&bp->fp[i], cos) bp 6441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[cos]); bp 6444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_fcoe_fp(struct bnx2x *bp) bp 6446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp); bp 6449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, rx_queue) = BNX2X_NUM_ETH_QUEUES(bp); bp 6450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, cl_id) = bnx2x_cnic_eth_cl_id(bp, bp 6452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, cid) = BNX2X_FCOE_ETH_CID(bp); bp 6453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, fw_sb_id) = DEF_SB_ID; bp 6454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, igu_sb_id) = bp->igu_dsb_id; bp 6455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, rx_cons_sb) = BNX2X_FCOE_L2_RX_INDEX; bp 6456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_txdata(bp, bnx2x_fcoe(bp, txdata_ptr[0]), bp 6457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp->cid, FCOE_TXQ_IDX(bp), BNX2X_FCOE_L2_TX_INDEX, bp 6463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, cl_qzone_id) = bnx2x_fp_qzone_id(fp); bp 6465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fcoe(bp, ustorm_rx_prods_offset) = bp 6475 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id, bp 6476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &fp->cid, 1, BP_FUNC(bp), bnx2x_sp(bp, q_rdata), bp 6477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_mapping(bp, q_rdata), q_type); bp 6481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fp->index, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id, bp 6485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_nic_init_cnic(struct bnx2x *bp) bp 6487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp)) bp 6488 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_fcoe_fp(bp); bp 6490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_sb(bp, bp->cnic_sb_mapping, bp 6492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_fw_sb_id(bp), bnx2x_cnic_igu_sb_id(bp)); bp 6496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_rx_rings_cnic(bp); bp 6497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_tx_rings_cnic(bp); bp 6503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_pre_irq_nic_init(struct bnx2x *bp) bp 6508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) bp 6509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_eth_fp(bp, i); bp 6513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_rx_rings(bp); bp 6514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_tx_rings(bp); bp 6516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 6518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_mod_abs_int(bp, &bp->link_vars, bp->common.chip_id, bp 6519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem_base, bp 6520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem2_base, BP_PORT(bp)); bp 6523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_def_sb(bp); bp 6524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_dsb_idx(bp); bp 6525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_sp_ring(bp); bp 6527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_memset_stats(bp); bp 6531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_post_irq_nic_init(struct bnx2x *bp, u32 load_code) bp 6533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_eq_ring(bp); bp 6534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_internal(bp, load_code); bp 6535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_init(bp); bp 6536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stats_init(bp); bp 6541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_int_enable(bp); bp 6544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_attn_int_deasserted0(bp, bp 6545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, MISC_REG_AEU_AFTER_INVERT_1_FUNC_0 + BP_PORT(bp)*4) & bp 6550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_gunzip_init(struct bnx2x *bp) bp 6552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_buf = dma_alloc_coherent(&bp->pdev->dev, FW_BUF_SIZE, bp 6553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->gunzip_mapping, GFP_KERNEL); bp 6554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->gunzip_buf == NULL) bp 6557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm = kmalloc(sizeof(*bp->strm), GFP_KERNEL); bp 6558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->strm == NULL) bp 6561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->workspace = vmalloc(zlib_inflate_workspacesize()); bp 6562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->strm->workspace == NULL) bp 6568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->strm); bp 6569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm = NULL; bp 6572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dma_free_coherent(&bp->pdev->dev, FW_BUF_SIZE, bp->gunzip_buf, bp 6573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_mapping); bp 6574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_buf = NULL; bp 6581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_gunzip_end(struct bnx2x *bp) bp 6583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->strm) { bp 6584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vfree(bp->strm->workspace); bp 6585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->strm); bp 6586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm = NULL; bp 6589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->gunzip_buf) { bp 6590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dma_free_coherent(&bp->pdev->dev, FW_BUF_SIZE, bp->gunzip_buf, bp 6591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_mapping); bp 6592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_buf = NULL; bp 6596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_gunzip(struct bnx2x *bp, const u8 *zbuf, int len) bp 6613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->next_in = (typeof(bp->strm->next_in))zbuf + n; bp 6614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->avail_in = len - n; bp 6615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->next_out = bp->gunzip_buf; bp 6616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->avail_out = FW_BUF_SIZE; bp 6618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = zlib_inflateInit2(bp->strm, -MAX_WBITS); bp 6622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = zlib_inflate(bp->strm, Z_FINISH); bp 6624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, "Firmware decompression error: %s\n", bp 6625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->strm->msg); bp 6627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_outlen = (FW_BUF_SIZE - bp->strm->avail_out); bp 6628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->gunzip_outlen & 0x3) bp 6629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, bp 6631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_outlen); bp 6632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->gunzip_outlen >>= 2; bp 6634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c zlib_inflateEnd(bp->strm); bp 6649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_lb_pckt(struct bnx2x *bp) bp 6657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR_DMAE(bp, NIG_REG_DEBUG_PACKET_LB, wb_write, 3); bp 6663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR_DMAE(bp, NIG_REG_DEBUG_PACKET_LB, wb_write, 3); bp 6670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_int_mem_test(struct bnx2x *bp) bp 6676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_FPGA(bp)) bp 6678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_REV_IS_EMUL(bp)) bp 6684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSDM_REG_ENABLE_IN1, 0x0); bp 6685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TCM_REG_PRS_IFEN, 0x0); bp 6686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_DEBUG0, 0x1); bp 6687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_PRS_REQ_IN_EN, 0x0); bp 6690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_CFC_SEARCH_INITIAL_CREDIT, 0x0); bp 6693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_lb_pckt(bp); bp 6700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, NIG_REG_STAT2_BRB_OCTET, 2); bp 6701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = *bnx2x_sp(bp, wb_data[0]); bp 6716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PRS_REG_NUM_OF_PACKETS); bp 6729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR, 0x03); bp 6731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0x03); bp 6733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_BRB1, PHASE_COMMON); bp 6734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PRS, PHASE_COMMON); bp 6739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSDM_REG_ENABLE_IN1, 0x0); bp 6740 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TCM_REG_PRS_IFEN, 0x0); bp 6741 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_DEBUG0, 0x1); bp 6742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_PRS_REQ_IN_EN, 0x0); bp 6745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_CFC_SEARCH_INITIAL_CREDIT, 0x0); bp 6749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_lb_pckt(bp); bp 6756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, NIG_REG_STAT2_BRB_OCTET, 2); bp 6757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = *bnx2x_sp(bp, wb_data[0]); bp 6770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PRS_REG_NUM_OF_PACKETS); bp 6775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_CFC_SEARCH_INITIAL_CREDIT, 0x1); bp 6780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PRS_REG_NUM_OF_PACKETS); bp 6786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, NIG_REG_INGRESS_EOP_LB_FIFO); bp 6787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, NIG_REG_INGRESS_EOP_LB_EMPTY); bp 6794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR, 0x03); bp 6796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0x03); bp 6798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_BRB1, PHASE_COMMON); bp 6799 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PRS, PHASE_COMMON); bp 6800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_SUPPORT(bp)) bp 6802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_NIC_MODE, 1); bp 6805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSDM_REG_ENABLE_IN1, 0x7fffffff); bp 6806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TCM_REG_PRS_IFEN, 0x1); bp 6807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_DEBUG0, 0x0); bp 6808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_PRS_REQ_IN_EN, 0x1); bp 6815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_enable_blocks_attention(struct bnx2x *bp) bp 6819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_PXP_INT_MASK_0, 0); bp 6820 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 6821 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_PXP_INT_MASK_1, 0x40); bp 6823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_PXP_INT_MASK_1, 0); bp 6824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, DORQ_REG_DORQ_INT_MASK, 0); bp 6825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_CFC_INT_MASK, 0); bp 6832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BRB1_REG_BRB1_INT_MASK, 0xFC00); bp 6833 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, QM_REG_QM_INT_MASK, 0); bp 6834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TM_REG_TM_INT_MASK, 0); bp 6835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSDM_REG_XSDM_INT_MASK_0, 0); bp 6836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSDM_REG_XSDM_INT_MASK_1, 0); bp 6837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XCM_REG_XCM_INT_MASK, 0); bp 6840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, USDM_REG_USDM_INT_MASK_0, 0); bp 6841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, USDM_REG_USDM_INT_MASK_1, 0); bp 6842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, UCM_REG_UCM_INT_MASK, 0); bp 6845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_UPB + PB_REG_PB_INT_MASK, 0); bp 6846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CSDM_REG_CSDM_INT_MASK_0, 0); bp 6847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CSDM_REG_CSDM_INT_MASK_1, 0); bp 6848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CCM_REG_CCM_INT_MASK, 0); bp 6855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 6858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PXP2_INT_MASK_0, val); bp 6860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSDM_REG_TSDM_INT_MASK_0, 0); bp 6861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSDM_REG_TSDM_INT_MASK_1, 0); bp 6862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TCM_REG_TCM_INT_MASK, 0); bp 6865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 6867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSEM_REG_TSEM_INT_MASK_1, 0x07ff); bp 6869 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CDU_REG_CDU_INT_MASK, 0); bp 6870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, DMAE_REG_DMAE_INT_MASK, 0); bp 6872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_PBF_INT_MASK, 0x18); /* bit 3,4 masked */ bp 6875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reset_common(struct bnx2x *bp) bp 6880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR, bp 6883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) { bp 6888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, val); bp 6891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_setup_dmae(struct bnx2x *bp) bp 6893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dmae_ready = 0; bp 6894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_init(&bp->dmae_lock); bp 6897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_pxp(struct bnx2x *bp) bp 6902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pcie_capability_read_word(bp->pdev, PCI_EXP_DEVCTL, &devctl); bp 6905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mrrs == -1) bp 6908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "force read order to %d\n", bp->mrrs); bp 6909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c r_order = bp->mrrs; bp 6912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_pxp_arb(bp, r_order, w_order); bp 6915 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_setup_fan_failure_detection(struct bnx2x *bp) bp 6921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_NOMCP(bp)) bp 6925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.shared_hw_config.config2) & bp 6940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp, bp 6941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem_base, bp 6942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem2_base, bp 6952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_spio(bp, MISC_SPIO_SPIO5, MISC_SPIO_INPUT_HI_Z); bp 6955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_SPIO_INT); bp 6957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_SPIO_INT, val); bp 6960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_SPIO_EVENT_EN); bp 6962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_SPIO_EVENT_EN, val); bp 6965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_pf_disable(struct bnx2x *bp) bp 6967 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = REG_RD(bp, IGU_REG_PF_CONFIGURATION); bp 6970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); bp 6971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 0); bp 6972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_WEAK_ENABLE_PF, 0); bp 6975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x__common_init_phy(struct bnx2x *bp) bp 6979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_RD(bp, size) > bp 6980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (u32)offsetof(struct shmem2_region, lfa_host_addr[BP_PORT(bp)])) bp 6982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c shmem_base[0] = bp->common.shmem_base; bp 6983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c shmem2_base[0] = bp->common.shmem2_base; bp 6984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 6986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_RD(bp, other_shmem_base_addr); bp 6988 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_RD(bp, other_shmem2_base_addr); bp 6990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 6991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_common_init_phy(bp, shmem_base, shmem2_base, bp 6992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_id); bp 6993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 6996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_config_endianity(struct bnx2x *bp, u32 val) bp 6998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_QM_ENDIAN_M, val); bp 6999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_TM_ENDIAN_M, val); bp 7000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_SRC_ENDIAN_M, val); bp 7001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_CDU_ENDIAN_M, val); bp 7002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_DBG_ENDIAN_M, val); bp 7005 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_HC_ENDIAN_M, 0); bp 7007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_QM_SWAP_MODE, val); bp 7008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_TM_SWAP_MODE, val); bp 7009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_SRC_SWAP_MODE, val); bp 7010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_CDURD_SWAP_MODE, val); bp 7013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_endianity(struct bnx2x *bp) bp 7016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_config_endianity(bp, 1); bp 7018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_config_endianity(bp, 0); bp 7022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reset_endianity(struct bnx2x *bp) bp 7024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_config_endianity(bp, 0); bp 7032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_hw_common(struct bnx2x *bp) bp 7036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_HW, "starting common init func %d\n", BP_ABS_FUNC(bp)); bp 7042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RESET); bp 7044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_reset_common(bp); bp 7045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff); bp 7048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) { bp 7052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, val); bp 7054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RESET); bp 7056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC, PHASE_COMMON); bp 7058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (abs_func_id = BP_PATH(bp); bp 7070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (abs_func_id == BP_ABS_FUNC(bp)) { bp 7071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, bp 7077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pretend_func(bp, abs_func_id); bp 7079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_disable(bp); bp 7080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 7084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP, PHASE_COMMON); bp 7085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) { bp 7088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_PXP_INT_MASK_0, 0); bp 7091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP2, PHASE_COMMON); bp 7092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_pxp(bp); bp 7093 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_endianity(bp); bp 7094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_init_page_size(bp, INITOP_SET); bp 7096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_FPGA(bp) && CHIP_IS_E1H(bp)) bp 7097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_TAGS_LIMIT, 0x1); bp 7102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PXP2_REG_RQ_CFG_DONE); bp 7107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PXP2_REG_RD_INIT_DONE); bp 7118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pretend_func(bp, (BP_PATH(bp) + 6)); bp 7203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_client_init_op_ilt(bp, &ilt, &ilt_cli, INITOP_CLEAR); bp 7204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 7206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_DRAM_ALIGN, BNX2X_PXP_DRAM_ALIGN); bp 7207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_DRAM_ALIGN_RD, BNX2X_PXP_DRAM_ALIGN); bp 7208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_DRAM_ALIGN_SEL, 1); bp 7211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_DISABLE_INPUTS, 0); bp 7212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_DISABLE_INPUTS, 0); bp 7214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int factor = CHIP_REV_IS_EMUL(bp) ? 1000 : bp 7216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_REV_IS_FPGA(bp) ? 400 : 0); bp 7217 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PGLUE_B, PHASE_COMMON); bp 7219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_ATC, PHASE_COMMON); bp 7224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, ATC_REG_ATC_INIT_DONE); bp 7233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DMAE, PHASE_COMMON); bp 7235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_init_dmae(bp); bp 7238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dmae_ready = 1; bp 7239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_fill(bp, TSEM_REG_PRAM, 0, 8, 1); bp 7241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TCM, PHASE_COMMON); bp 7243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UCM, PHASE_COMMON); bp 7245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CCM, PHASE_COMMON); bp 7247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XCM, PHASE_COMMON); bp 7249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, XSEM_REG_PASSIVE_BUFFER, 3); bp 7250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, CSEM_REG_PASSIVE_BUFFER, 3); bp 7251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, TSEM_REG_PASSIVE_BUFFER, 3); bp 7252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, USEM_REG_PASSIVE_BUFFER, 3); bp 7254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_QM, PHASE_COMMON); bp 7257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_qm_init_ptr_table(bp, bp->qm_cid_count, INITOP_SET); bp 7260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, QM_REG_SOFT_RESET, 1); bp 7261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, QM_REG_SOFT_RESET, 0); bp 7263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 7264 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TM, PHASE_COMMON); bp 7266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DORQ, PHASE_COMMON); bp 7268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_REV_IS_SLOW(bp)) bp 7270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, DORQ_REG_DORQ_INT_MASK, 0); bp 7272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_BRB1, PHASE_COMMON); bp 7274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PRS, PHASE_COMMON); bp 7275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_A_PRSU_20, 0xf); bp 7277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) bp 7278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_E1HOV_MODE, bp->path_has_ovlan); bp 7280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp) && !CHIP_IS_E3B0(bp)) { bp 7281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) { bp 7285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_HDRS_AFTER_BASIC, 0xE); bp 7286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_MUST_HAVE_HDRS, 0xA); bp 7287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_HDRS_AFTER_TAG_0, 0x6); bp 7288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_TAG_ETHERTYPE_0, 0x8926); bp 7289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_TAG_LEN_0, 0x4); bp 7294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_HDRS_AFTER_BASIC, bp 7295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->path_has_ovlan ? 7 : 6); bp 7299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSDM, PHASE_COMMON); bp 7300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSDM, PHASE_COMMON); bp 7301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USDM, PHASE_COMMON); bp 7302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSDM, PHASE_COMMON); bp 7304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSEM_REG_FAST_MEMORY + VFC_REG_MEMORIES_RST, bp 7309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSEM_REG_FAST_MEMORY + VFC_REG_MEMORIES_RST, bp 7316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSEM, PHASE_COMMON); bp 7317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USEM, PHASE_COMMON); bp 7318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSEM, PHASE_COMMON); bp 7319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSEM, PHASE_COMMON); bp 7322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR, bp 7324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, bp 7327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UPB, PHASE_COMMON); bp 7328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XPB, PHASE_COMMON); bp 7329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PBF, PHASE_COMMON); bp 7331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) { bp 7336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_HDRS_AFTER_BASIC, 0xE); bp 7337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_MUST_HAVE_HDRS, 0xA); bp 7338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_HDRS_AFTER_TAG_0, 0x6); bp 7339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_TAG_ETHERTYPE_0, 0x8926); bp 7340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_TAG_LEN_0, 0x4); bp 7342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_HDRS_AFTER_BASIC, bp 7343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->path_has_ovlan ? 7 : 6); bp 7347 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_SOFT_RST, 1); bp 7349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_SRC, PHASE_COMMON); bp 7351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) { bp 7352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_0, 0x63285672); bp 7353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_1, 0x24b8f2cc); bp 7354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_2, 0x223aef9b); bp 7355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_3, 0x26001e3a); bp 7356 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_4, 0x7ae91116); bp 7357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_5, 0x5ce5230b); bp 7358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_6, 0x298d8adf); bp 7359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_7, 0x6eb0ff09); bp 7360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_8, 0x1830f82f); bp 7361 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_KEYSEARCH_9, 0x01e46be7); bp 7363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_SOFT_RST, 0); bp 7367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_alert(&bp->pdev->dev, bp 7371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CDU, PHASE_COMMON); bp 7373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CDU_REG_CDU_GLOBAL_PARAMS, val); bp 7375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CFC, PHASE_COMMON); bp 7376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_INIT_REG, 0x7FF); bp 7378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_CFC_INT_MASK, 0); bp 7381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_DEBUG0, 0x20020000); bp 7383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_HC, PHASE_COMMON); bp 7385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp) && BP_NOMCP(bp)) bp 7386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_RESET_MEMORIES, 0x36); bp 7388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_IGU, PHASE_COMMON); bp 7389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC_AEU, PHASE_COMMON); bp 7392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, 0x2814, 0xffffffff); bp 7393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, 0x3820, 0xffffffff); bp 7395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PCICFG_OFFSET + PXPCS_TL_CONTROL_5, bp 7399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PCICFG_OFFSET + PXPCS_TL_FUNC345_STAT, bp 7403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PCICFG_OFFSET + PXPCS_TL_FUNC678_STAT, bp 7409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_NIG, PHASE_COMMON); bp 7410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 7412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E3(bp)) bp 7413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH_MF_MODE, IS_MF(bp)); bp 7415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1H(bp)) bp 7417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH_E1HOV_MODE, IS_MF_SD(bp)); bp 7419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_SLOW(bp)) bp 7423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = reg_poll(bp, CFC_REG_LL_INIT_DONE, 1, 100, 10); bp 7428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = reg_poll(bp, CFC_REG_AC_INIT_DONE, 1, 100, 10); bp 7433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = reg_poll(bp, CFC_REG_CAM_INIT_DONE, 1, 100, 10); bp 7438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_DEBUG0, 0); bp 7440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) { bp 7443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, NIG_REG_STAT2_BRB_OCTET, 2); bp 7444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = *bnx2x_sp(bp, wb_data[0]); bp 7447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((val == 0) && bnx2x_int_mem_test(bp)) { bp 7453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_setup_fan_failure_detection(bp); bp 7456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, PXP2_REG_PXP2_INT_STS_CLR_0); bp 7458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_enable_blocks_attention(bp); bp 7459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_enable_blocks_parity(bp); bp 7461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 7462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 7463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x__common_init_phy(bp); bp 7467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_HAS(bp, netproc_fw_ver)) bp 7468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, netproc_fw_ver, REG_RD(bp, XSEM_REG_PRAM)); bp 7478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_hw_common_chip(struct bnx2x *bp) bp 7480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int rc = bnx2x_init_hw_common(bp); bp 7486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) bp 7487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x__common_init_phy(bp); bp 7492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_hw_port(struct bnx2x *bp) bp 7494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 7501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4, 0); bp 7503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC, init_phase); bp 7504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP, init_phase); bp 7505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP2, init_phase); bp 7512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 7513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 1); bp 7515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_ATC, init_phase); bp 7516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DMAE, init_phase); bp 7517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PGLUE_B, init_phase); bp 7518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_QM, init_phase); bp 7520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TCM, init_phase); bp 7521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UCM, init_phase); bp 7522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CCM, init_phase); bp 7523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XCM, init_phase); bp 7526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_qm_init_cid_count(bp, bp->qm_cid_count, INITOP_SET); bp 7528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) { bp 7529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TM, init_phase); bp 7530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TM_REG_LIN0_SCAN_TIME + port*4, 20); bp 7531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TM_REG_LIN0_MAX_ACTIVE_CID + port*4, 31); bp 7534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DORQ, init_phase); bp 7536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_BRB1, init_phase); bp 7538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp) || CHIP_IS_E1H(bp)) { bp 7540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) bp 7541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c low = ((bp->flags & ONE_PORT_FLAG) ? 160 : 246); bp 7542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (bp->dev->mtu > 4096) { bp 7543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->flags & ONE_PORT_FLAG) bp 7546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = bp->dev->mtu; bp 7552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c low = ((bp->flags & ONE_PORT_FLAG) ? 80 : 160); bp 7554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BRB1_REG_PAUSE_LOW_THRESHOLD_0 + port*4, low); bp 7555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BRB1_REG_PAUSE_HIGH_THRESHOLD_0 + port*4, high); bp 7558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_MODE_IS_4_PORT(bp)) bp 7559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, (BP_PORT(bp) ? bp 7563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PRS, init_phase); bp 7564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3B0(bp)) { bp 7565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) { bp 7567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->path_has_ovlan ? 7 : 6)); bp 7588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSDM, init_phase); bp 7589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSDM, init_phase); bp 7590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USDM, init_phase); bp 7591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSDM, init_phase); bp 7593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSEM, init_phase); bp 7594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USEM, init_phase); bp 7595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSEM, init_phase); bp 7596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSEM, init_phase); bp 7598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UPB, init_phase); bp 7599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XPB, init_phase); bp 7601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PBF, init_phase); bp 7603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 7605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_P0_PAUSE_ENABLE + port*4, 0); bp 7608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_P0_ARB_THRSH + port*4, (9040/16)); bp 7610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_P0_INIT_CRD + port*4, (9040/16) + 553 - 22); bp 7613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_INIT_P0 + port*4, 1); bp 7615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_INIT_P0 + port*4, 0); bp 7618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 7619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_SRC, init_phase); bp 7621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CDU, init_phase); bp 7622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CFC, init_phase); bp 7624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) { bp 7625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, 0); bp 7626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, 0); bp 7628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_HC, init_phase); bp 7630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_IGU, init_phase); bp 7632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC_AEU, init_phase); bp 7637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = IS_MF(bp) ? 0xF7 : 0x7; bp 7639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val |= CHIP_IS_E1(bp) ? 0 : 0x10; bp 7640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_MASK_ATTN_FUNC_0 + port*4, val); bp 7644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg, bp 7645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, reg) & bp 7649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg, bp 7650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, reg) & bp 7653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_NIG, init_phase); bp 7655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_AFEX(bp)) bp 7660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c IS_MF_SD(bp) ? 7 : 6); bp 7669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) bp 7670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BP_PORT(bp) ? bp 7672 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c NIG_REG_LLH_MF_MODE, IS_MF(bp)); bp 7674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E3(bp)) bp 7675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 1); bp 7677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 7679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK_MF + port*4, bp 7680 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (IS_MF_SD(bp) ? 0x1 : 0x2)); bp 7682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->mf_mode) { bp 7694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, (BP_PORT(bp) ? NIG_REG_LLH1_CLS_TYPE : bp 7698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLFC_ENABLE_0 + port*4, 0); bp 7699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLFC_OUT_EN_0 + port*4, 0); bp 7700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_PAUSE_ENABLE_0 + port*4, 1); bp 7705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_SPIO_EVENT_EN); bp 7709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, reg_addr); bp 7711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, reg_addr, val); bp 7714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3B0(bp)) bp 7715 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= PTP_SUPPORTED; bp 7720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_ilt_wr(struct bnx2x *bp, u32 index, dma_addr_t addr) bp 7725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 7732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR_DMAE(bp, reg, wb_write, 2); bp 7735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, bool is_pf) bp 7746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_INT_MODE_IS_BC(bp)) bp 7760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, igu_addr_data, data); bp 7764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, igu_addr_ctl, ctl); bp 7768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c while (!(REG_RD(bp, igu_addr_ack) & sb_bit) && --cnt) bp 7771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(REG_RD(bp, igu_addr_ack) & sb_bit)) { bp 7778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_igu_clear_sb(struct bnx2x *bp, u8 idu_sb_id) bp 7780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_clear_sb_gen(bp, BP_FUNC(bp), idu_sb_id, true /*PF*/); bp 7783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_clear_func_ilt(struct bnx2x *bp, u32 func) bp 7787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_wr(bp, i, 0); bp 7790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_searcher(struct bnx2x *bp) bp 7792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 7793 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_src_init_t2(bp, bp->t2, bp->t2_mapping, SRC_CONN_NUM); bp 7795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, SRC_REG_NUMBER_HASH_BITS0 + port*4, SRC_HASH_BITS); bp 7798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static inline int bnx2x_func_switch_update(struct bnx2x *bp, int suspend) bp 7809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 7819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_state_change(bp, &func_params); bp 7824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_reset_nic_mode(struct bnx2x *bp) bp 7826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int rc, i, port = BP_PORT(bp); bp 7830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mf_mode == SINGLE_FUNCTION) { bp 7831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_filter(&bp->link_params, 0); bp 7833 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vlan_en = REG_RD(bp, port ? NIG_REG_LLH1_FUNC_EN : bp 7835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_LLH1_FUNC_EN : bp 7838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mac_en[i] = REG_RD(bp, port ? bp 7843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? (NIG_REG_LLH1_FUNC_MEM_ENABLE + bp 7850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P0_TX_MNG_HOST_ENABLE : bp 7858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_switch_update(bp, 1); bp 7865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_NIC_MODE, 0); bp 7868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->mf_mode == SINGLE_FUNCTION) { bp 7869 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_filter(&bp->link_params, 1); bp 7871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_LLH1_FUNC_EN : bp 7874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? (NIG_REG_LLH1_FUNC_MEM_ENABLE + bp 7882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P0_TX_MNG_HOST_ENABLE : bp 7886 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_switch_update(bp, 0); bp 7896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_init_hw_func_cnic(struct bnx2x *bp) bp 7900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_init_op_cnic(bp, INITOP_SET); bp 7902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CONFIGURE_NIC_MODE(bp)) { bp 7904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_searcher(bp); bp 7907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_reset_nic_mode(bp); bp 7923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_clean_pglue_errors(struct bnx2x *bp) bp 7925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 7926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_WAS_ERROR_PF_7_0_CLR, bp 7927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 1 << BP_ABS_FUNC(bp)); bp 7930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_hw_func(struct bnx2x *bp) bp 7932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 7933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 7935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_ilt *ilt = BP_ILT(bp); bp 7944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_pf_flr_clnup(bp); bp 7947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_dump(bp); bp 7953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) { bp 7955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, addr); bp 7957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, val); bp 7960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP, init_phase); bp 7961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PXP2, init_phase); bp 7963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ilt = BP_ILT(bp); bp 7966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_SRIOV(bp)) bp 7968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cdu_ilt_start = bnx2x_iov_init_ilt(bp, cdu_ilt_start); bp 7974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (i = 0; i < L2_ILT_LINES(bp); i++) { bp 7975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ilt->lines[cdu_ilt_start + i].page = bp->context[i].vcxt; bp 7977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->context[i].cxt_mapping; bp 7978 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ilt->lines[cdu_ilt_start + i].size = bp->context[i].size; bp 7981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_init_op(bp, INITOP_SET); bp 7983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CONFIGURE_NIC_MODE(bp)) { bp 7984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_searcher(bp); bp 7985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_NIC_MODE, 0); bp 7989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PRS_REG_NIC_MODE, 1); bp 7993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 7999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->flags & USING_MSIX_FLAG)) bp 8013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 1); bp 8015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PF_CONFIGURATION, pf_conf); bp 8018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dmae_ready = 1; bp 8020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PGLUE_B, init_phase); bp 8022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clean_pglue_errors(bp); bp 8024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_ATC, init_phase); bp 8025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DMAE, init_phase); bp 8026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_NIG, init_phase); bp 8027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_SRC, init_phase); bp 8028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC, init_phase); bp 8029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TCM, init_phase); bp 8030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UCM, init_phase); bp 8031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CCM, init_phase); bp 8032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XCM, init_phase); bp 8033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSEM, init_phase); bp 8034 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USEM, init_phase); bp 8035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSEM, init_phase); bp 8036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSEM, init_phase); bp 8038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 8039 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, QM_REG_PF_EN, 1); bp 8041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 8042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TSEM_REG_VFPF_ERR_NUM, BNX2X_MAX_NUM_OF_VFS + func); bp 8043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, USEM_REG_VFPF_ERR_NUM, BNX2X_MAX_NUM_OF_VFS + func); bp 8044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CSEM_REG_VFPF_ERR_NUM, BNX2X_MAX_NUM_OF_VFS + func); bp 8045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, XSEM_REG_VFPF_ERR_NUM, BNX2X_MAX_NUM_OF_VFS + func); bp 8047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_QM, init_phase); bp 8049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TM, init_phase); bp 8050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_DORQ, init_phase); bp 8051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, DORQ_REG_MODE_ACT, 1); /* no dpm */ bp 8053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_init_dq(bp); bp 8055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_BRB1, init_phase); bp 8056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PRS, init_phase); bp 8057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_TSDM, init_phase); bp 8058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CSDM, init_phase); bp 8059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_USDM, init_phase); bp 8060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XSDM, init_phase); bp 8061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_UPB, init_phase); bp 8062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_XPB, init_phase); bp 8063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_PBF, init_phase); bp 8064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 8065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PBF_REG_DISABLE_PF, 0); bp 8067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CDU, init_phase); bp 8069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_CFC, init_phase); bp 8071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 8072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, CFC_REG_WEAK_ENABLE_PF, 1); bp 8074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 8075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(IS_MF_UFP(bp) && BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp))) { bp 8076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port * 8, 1); bp 8077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_VLAN_ID + port * 8, bp 8078 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov); bp 8082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_MISC_AEU, init_phase); bp 8085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) { bp 8086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1H(bp)) { bp 8087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_12 + func*4, 0); bp 8089 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, 0); bp 8090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, 0); bp 8092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_HC, init_phase); bp 8097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_12 + func*4, 0); bp 8099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 8100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, 0); bp 8101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, 0); bp 8104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_block(bp, BLOCK_IGU, init_phase); bp 8106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 8129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c num_segs = CHIP_INT_MODE_IS_BC(bp) ? bp 8131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (sb_idx = 0; sb_idx < bp->igu_sb_cnt; sb_idx++) { bp 8132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c prod_offset = (bp->igu_base_sb + sb_idx) * bp 8138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, 0); bp 8141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_base_sb + sb_idx, bp 8143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_clear_sb(bp, bp 8144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_sb + sb_idx); bp 8148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c num_segs = CHIP_INT_MODE_IS_BC(bp) ? bp 8151 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_MODE_IS_4_PORT(bp)) bp 8152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dsb_idx = BP_FUNC(bp); bp 8154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dsb_idx = BP_VN(bp); bp 8156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c prod_offset = (CHIP_INT_MODE_IS_BC(bp) ? bp 8168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, 0); bp 8171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_INT_MODE_IS_BC(bp)) { bp 8172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, bp->igu_dsb_id, bp 8188 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_igu_clear_sb(bp, bp->igu_dsb_id); bp 8192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_SB_INT_BEFORE_MASK_LSB, 0); bp 8193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_SB_INT_BEFORE_MASK_MSB, 0); bp 8194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_SB_MASK_LSB, 0); bp 8195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_SB_MASK_MSB, 0); bp 8196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PBA_STATUS_LSB, 0); bp 8197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_PBA_STATUS_MSB, 0); bp 8202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, 0x2114, 0xffffffff); bp 8203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, 0x2120, 0xffffffff); bp 8205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 8208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PORT(bp) * (main_mem_size * 4); bp 8212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, main_mem_prty_clr); bp 8222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_dmae(bp, i, main_mem_width / 4); bp 8223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_write_dmae(bp, bnx2x_sp_mapping(bp, wb_data), bp 8227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, main_mem_prty_clr); bp 8232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_USTRORM_INTMEM + bp 8233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c USTORM_RECORD_SLOW_PATH_OFFSET(BP_FUNC(bp)), 1); bp 8234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_TSTRORM_INTMEM + bp 8235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c TSTORM_RECORD_SLOW_PATH_OFFSET(BP_FUNC(bp)), 1); bp 8236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + bp 8237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CSTORM_RECORD_SLOW_PATH_OFFSET(BP_FUNC(bp)), 1); bp 8238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_XSTRORM_INTMEM + bp 8239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c XSTORM_RECORD_SLOW_PATH_OFFSET(BP_FUNC(bp)), 1); bp 8242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_phy_probe(&bp->link_params); bp 8247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_free_mem_cnic(struct bnx2x *bp) bp 8249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_mem_op_cnic(bp, ILT_MEMOP_FREE); bp 8251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 8252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->cnic_sb.e2_sb, bp->cnic_sb_mapping, bp 8255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->cnic_sb.e1x_sb, bp->cnic_sb_mapping, bp 8258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->t2, bp->t2_mapping, SRC_T2_SZ); bp 8261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_free_mem(struct bnx2x *bp) bp 8265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->fw_stats, bp->fw_stats_mapping, bp 8266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_stats_data_sz + bp->fw_stats_req_sz); bp 8268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 8271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->def_status_blk, bp->def_status_blk_mapping, bp 8274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->slowpath, bp->slowpath_mapping, bp 8277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (i = 0; i < L2_ILT_LINES(bp); i++) bp 8278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->context[i].vcxt, bp->context[i].cxt_mapping, bp 8279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->context[i].size); bp 8280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_mem_op(bp, ILT_MEMOP_FREE); bp 8282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_FREE(bp->ilt->lines); bp 8284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->spq, bp->spq_mapping, BCM_PAGE_SIZE); bp 8286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->eq_ring, bp->eq_mapping, bp 8289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_PCI_FREE(bp->t2, bp->t2_mapping, SRC_T2_SZ); bp 8291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_free_mem(bp); bp 8294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_alloc_mem_cnic(struct bnx2x *bp) bp 8296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 8298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_sb.e2_sb = BNX2X_PCI_ALLOC(&bp->cnic_sb_mapping, bp 8300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_sb.e2_sb) bp 8303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_sb.e1x_sb = BNX2X_PCI_ALLOC(&bp->cnic_sb_mapping, bp 8305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_sb.e1x_sb) bp 8309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CONFIGURE_NIC_MODE(bp) && !bp->t2) { bp 8311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->t2 = BNX2X_PCI_ALLOC(&bp->t2_mapping, SRC_T2_SZ); bp 8312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->t2) bp 8317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.addr_drv_info_to_mcp = bp 8318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->slowpath->drv_info_to_mcp; bp 8320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_ilt_mem_op_cnic(bp, ILT_MEMOP_ALLOC)) bp 8326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem_cnic(bp); bp 8331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_alloc_mem(struct bnx2x *bp) bp 8335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CONFIGURE_NIC_MODE(bp) && !bp->t2) { bp 8337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->t2 = BNX2X_PCI_ALLOC(&bp->t2_mapping, SRC_T2_SZ); bp 8338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->t2) bp 8342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->def_status_blk = BNX2X_PCI_ALLOC(&bp->def_status_blk_mapping, bp 8344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->def_status_blk) bp 8347 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->slowpath = BNX2X_PCI_ALLOC(&bp->slowpath_mapping, bp 8349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->slowpath) bp 8365 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c context_size = sizeof(union cdu_context) * BNX2X_L2_CID_COUNT(bp); bp 8368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->context[i].size = min(CDU_ILT_PAGE_SZ, bp 8370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->context[i].vcxt = BNX2X_PCI_ALLOC(&bp->context[i].cxt_mapping, bp 8371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->context[i].size); bp 8372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->context[i].vcxt) bp 8374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c allocated += bp->context[i].size; bp 8376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ilt->lines = kcalloc(ILT_MAX_LINES, sizeof(struct ilt_line), bp 8378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->ilt->lines) bp 8381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_ilt_mem_op(bp, ILT_MEMOP_ALLOC)) bp 8384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_iov_alloc_mem(bp)) bp 8388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->spq = BNX2X_PCI_ALLOC(&bp->spq_mapping, BCM_PAGE_SIZE); bp 8389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->spq) bp 8393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eq_ring = BNX2X_PCI_ALLOC(&bp->eq_mapping, bp 8395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->eq_ring) bp 8401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem(bp); bp 8410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac, bp 8436 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_vlan_mac(bp, &ramrod_param); bp 8448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan, bp 8472 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_vlan_mac(bp, &ramrod_param); bp 8485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_clear_vlan_info(struct bnx2x *bp) bp 8490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c list_for_each_entry(vlan, &bp->vlan_reg, link) bp 8493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->vlan_cnt = 0; bp 8496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_del_all_vlans(struct bnx2x *bp) bp 8498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_vlan_mac_obj *vlan_obj = &bp->sp_objs[0].vlan_obj; bp 8504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = vlan_obj->delete_all(bp, vlan_obj, &vlan_flags, &ramrod_flags); bp 8508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clear_vlan_info(bp); bp 8513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_del_all_macs(struct bnx2x *bp, bp 8527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = mac_obj->delete_all(bp, mac_obj, &vlan_mac_flags, &ramrod_flags); bp 8534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_eth_mac(struct bnx2x *bp, bool set) bp 8536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 8541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_set_mac_one(bp, bp->dev->dev_addr, bp 8542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_objs->mac_obj, set, bp 8545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_vfpf_config_mac(bp, bp->dev->dev_addr, bp 8546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fp->index, set); bp 8550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_setup_leading(struct bnx2x *bp) bp 8552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) bp 8553 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_setup_queue(bp, &bp->fp[0], true); bp 8555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_vfpf_setup_q(bp, &bp->fp[0], true); bp 8565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_set_int_mode(struct bnx2x *bp) bp 8569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp) && int_mode != BNX2X_INT_MODE_MSIX) { bp 8577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_enable_msix(bp); bp 8584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (rc && IS_VF(bp)) bp 8589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->num_queues, bp 8590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 1 + bp->num_cnic_queues); bp 8594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_enable_msi(bp); bp 8598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->num_ethernet_queues = 1; bp 8599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues; bp 8610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static inline u16 bnx2x_cid_ilt_lines(struct bnx2x *bp) bp 8612 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_SRIOV(bp)) bp 8614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return L2_ILT_LINES(bp); bp 8617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_ilt_set_info(struct bnx2x *bp) bp 8620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_ilt *ilt = BP_ILT(bp); bp 8623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ilt->start_line = FUNC_ILT_BASE(BP_FUNC(bp)); bp 8632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c line += bnx2x_cid_ilt_lines(bp); bp 8634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 8646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (QM_INIT(bp->qm_cid_count)) { bp 8654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c line += DIV_ROUND_UP(bp->qm_cid_count * QM_QUEUES_PER_FUNC * 4, bp 8668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) { bp 8718 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pf_q_prep_init(struct bnx2x *bp, bp 8736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c init_params->rx.hc_rate = bp->rx_ticks ? bp 8737 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (1000000 / bp->rx_ticks) : 0; bp 8738 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c init_params->tx.hc_rate = bp->tx_ticks ? bp 8739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (1000000 / bp->tx_ticks) : 0; bp 8765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->context[cxt_index].vcxt[cxt_offset].eth; bp 8769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_setup_tx_only(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 8780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tx_only_params->flags = bnx2x_get_common_flags(bp, fp, false); bp 8786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_q_prep_general(bp, fp, &tx_only_params->gen_params, tx_index); bp 8789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_tx_q_prep(bp, fp, &tx_only_params->txq_params, tx_index); bp 8798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_queue_state_change(bp, q_params); bp 8812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_setup_queue(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 8827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ack_sb(bp, fp->igu_sb_id, USTORM_ID, 0, bp 8830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 8835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_q_prep_init(bp, fp, &q_params.params.init); bp 8841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c setup_params->flags = bnx2x_get_q_flags(bp, fp, leading); bp 8856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_q_prep_general(bp, fp, &setup_params->gen_params, bp 8859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_rx_q_prep(bp, fp, &setup_params->pause_params, bp 8862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_tx_q_prep(bp, fp, &setup_params->txq_params, bp 8869 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fcoe_init = true; bp 8872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_setup_tx_only(bp, fp, &q_params, bp 8896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_stop_queue(struct bnx2x *bp, int index) bp 8898 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[index]; bp 8905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 8926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8951 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 8959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_queue_state_change(bp, &q_params); bp 8962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reset_func(struct bnx2x *bp) bp 8964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 8965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_FUNC(bp); bp 8969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_FUNC_EN_OFFSET(func), 0); bp 8970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_FUNC_EN_OFFSET(func), 0); bp 8971 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_FUNC_EN_OFFSET(func), 0); bp 8972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_FUNC_EN_OFFSET(func), 0); bp 8975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) { bp 8976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 8977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + bp 8982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) bp 8984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + bp 8986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bnx2x_cnic_fw_sb_id(bp)), SB_DISABLED); bp 8989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR8(bp, BAR_CSTRORM_INTMEM + bp 8994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_DATA_OFFSET(func), bp 8998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.int_block == INT_BLOCK_HC) { bp 8999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, 0); bp 9000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, 0); bp 9002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, 0); bp 9003 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, 0); bp 9006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) { bp 9008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, TM_REG_EN_LINEAR0_TIMER + port*4, 0); bp 9015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!REG_RD(bp, TM_REG_LIN0_SCAN_ON + port*4)) bp 9020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clear_func_ilt(bp, func); bp 9025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp) && BP_VN(bp) == 3) { bp 9033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_boundry_init_op(bp, &ilt_cli, 0, INITOP_CLEAR); bp 9037 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 9038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_disable(bp); bp 9040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dmae_ready = 0; bp 9043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reset_port(struct bnx2x *bp) bp 9045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 9049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x__link_reset(bp); bp 9051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4, 0); bp 9054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK + port*4, 0x0); bp 9056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, (port ? NIG_REG_LLH1_BRB1_NOT_MCP : bp 9060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_MASK_ATTN_FUNC_0 + port*4, 0); bp 9064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, BRB1_REG_PORT_NUM_OCC_BLOCKS_0 + port*4); bp 9072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_reset_hw(struct bnx2x *bp, u32 load_code) bp 9079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 9084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_func_state_change(bp, &func_params); bp 9087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_func_stop(struct bnx2x *bp) bp 9094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 9103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_state_change(bp, &func_params); bp 9110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_func_state_change(bp, &func_params); bp 9125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode) bp 9128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 9134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (bp->flags & NO_WOL_FLAG) bp 9137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (bp->wol) { bp 9139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 *mac_addr = bp->dev->dev_addr; bp 9140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct pci_dev *pdev = bp->pdev; bp 9147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 entry = (BP_VN(bp) + 1)*8; bp 9150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry, val); bp 9154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c EMAC_WR(bp, EMAC_REG_EMAC_MAC_MATCH + entry + 4, val); bp 9167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) bp 9168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c reset_code = bnx2x_fw_command(bp, reset_code, 0); bp 9170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int path = BP_PATH(bp); bp 9197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_send_unload_done(struct bnx2x *bp, bool keep_link) bp 9202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) bp 9203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, reset_param); bp 9206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_func_wait_started(struct bnx2x *bp) bp 9209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int msix = (bp->flags & USING_MSIX_FLAG) ? 1 : 0; bp 9211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->port.pmf) bp 9230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c synchronize_irq(bp->msix_table[0].vector); bp 9232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c synchronize_irq(bp->pdev->irq); bp 9237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c while (bnx2x_func_get_state(bp, &bp->func_obj) != bp 9241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_func_get_state(bp, &bp->func_obj) != bp 9256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 9262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_func_state_change(bp, &func_params); bp 9266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_func_state_change(bp, &func_params); bp 9273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_disable_ptp(struct bnx2x *bp) bp 9275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 9278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_TO_HOST : bp 9282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_PARAM_MASK : bp 9284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_RULE_MASK : bp 9286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_PARAM_MASK : bp 9288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_RULE_MASK : bp 9292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_PTP_EN : bp 9297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_stop_ptp(struct bnx2x *bp) bp 9302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_work_sync(&bp->ptp_task); bp 9304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->ptp_tx_skb) { bp 9305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_kfree_skb_any(bp->ptp_tx_skb); bp 9306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_tx_skb = NULL; bp 9310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_disable_ptp(bp); bp 9315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_chip_cleanup(struct bnx2x *bp, int unload_mode, bool keep_link) bp 9317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 9324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_tx_queue(bp, i) { bp 9325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 9328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_clean_tx_queue(bp, fp->txdata_ptr[cos]); bp 9339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_del_all_macs(bp, &bp->sp_objs[0].mac_obj, BNX2X_ETH_MAC, bp 9345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_del_all_macs(bp, &bp->sp_objs[0].mac_obj, BNX2X_UC_LIST_MAC, bp 9355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 9357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_del_all_vlans(bp); bp 9363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) bp 9364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0); bp 9370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_lock_bh(bp->dev); bp 9372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_bit(BNX2X_FILTER_RX_MODE_PENDING, &bp->sp_state)) bp 9373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(BNX2X_FILTER_RX_MODE_SCHED, &bp->sp_state); bp 9374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (bp->slowpath) bp 9375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_storm_rx_mode(bp); bp 9378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rparam.mcast_obj = &bp->mcast_obj; bp 9379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_DEL); bp 9383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 9385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_chip_cleanup(bp); bp 9392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c reset_code = bnx2x_send_unload_req(bp, unload_mode); bp 9398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_wait_started(bp); bp 9409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) bp 9410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_stop_queue(bp, i)) bp 9417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) { bp 9418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_cnic_queue(bp, i) bp 9419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_stop_queue(bp, i)) bp 9430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bnx2x_wait_sp_comp(bp, ~0x0UL)) bp 9436 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_stop(bp); bp 9449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->flags & PTP_SUPPORTED) { bp 9450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_stop_ptp(bp); bp 9451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->ptp_clock) { bp 9452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ptp_clock_unregister(bp->ptp_clock); bp 9453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock = NULL; bp 9458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_netif_stop(bp, 1); bp 9460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_del_all_napi(bp); bp 9461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) bp 9462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_del_all_napi_cnic(bp); bp 9465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_irq(bp); bp 9472 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!pci_channel_offline(bp->pdev)) { bp 9473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_reset_hw(bp, reset_code); bp 9479 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_send_unload_done(bp, keep_link); bp 9482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_disable_close_the_gate(struct bnx2x *bp) bp 9488 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) { bp 9489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 9493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, addr); bp 9495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, val); bp 9497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_AEU_GENERAL_MASK); bp 9500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_MASK, val); bp 9505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_234_gates(struct bnx2x *bp, bool close) bp 9510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 9512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_HST_DISCARD_DOORBELLS, !!close); bp 9514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP_REG_HST_DISCARD_INTERNAL_WRITES, !!close); bp 9518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 9520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, HC_REG_CONFIG_1); bp 9521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_CONFIG_1, bp 9525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, HC_REG_CONFIG_0); bp 9526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, HC_REG_CONFIG_0, bp 9531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_BLOCK_CONFIGURATION); bp 9533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_BLOCK_CONFIGURATION, bp 9545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_clp_reset_prep(struct bnx2x *bp, u32 *magic_val) bp 9548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = MF_CFG_RD(bp, shared_mf_config.clp_mb); bp 9550 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_WR(bp, shared_mf_config.clp_mb, val | SHARED_MF_CLP_MAGIC); bp 9559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_clp_reset_done(struct bnx2x *bp, u32 magic_val) bp 9562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 val = MF_CFG_RD(bp, shared_mf_config.clp_mb); bp 9563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_WR(bp, shared_mf_config.clp_mb, bp 9575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_reset_mcp_prep(struct bnx2x *bp, u32 *magic_val) bp 9583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) bp 9584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clp_reset_prep(bp, magic_val); bp 9587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c shmem = REG_RD(bp, MISC_REG_SHARED_MEM_ADDR); bp 9589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c offsetof(struct shmem_region, validity_map[BP_PORT(bp)]); bp 9593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, shmem + validity_offset, 0); bp 9604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_mcp_wait_one(struct bnx2x *bp) bp 9608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_SLOW(bp)) bp 9617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_shmem(struct bnx2x *bp) bp 9623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem_base = REG_RD(bp, MISC_REG_SHARED_MEM_ADDR); bp 9628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.shmem_base == 0xFFFFFFFF) { bp 9629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_MCP_FLAG; bp 9633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.shmem_base) { bp 9634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, validity_map[BP_PORT(bp)]); bp 9639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_mcp_wait_one(bp); bp 9648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_reset_mcp_comp(struct bnx2x *bp, u32 magic_val) bp 9650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int rc = bnx2x_init_shmem(bp); bp 9653 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) bp 9654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clp_reset_done(bp, magic_val); bp 9659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_pxp_prep(struct bnx2x *bp) bp 9661 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp)) { bp 9662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RD_START_INIT, 0); bp 9663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_RQ_RBC_DONE, 0); bp 9677 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_process_kill_chip_reset(struct bnx2x *bp, bool global) bp 9729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 9731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E1H(bp)) bp 9733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E2(bp)) bp 9756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, bp 9759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_CLEAR, bp 9764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, bp 9769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, reset_mask1); bp 9781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_er_poll_igu_vq(struct bnx2x *bp) bp 9787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pend_bits = REG_RD(bp, IGU_REG_PENDING_BITS_STATUS); bp 9804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_process_kill(struct bnx2x *bp, bool global) bp 9813 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sr_cnt = REG_RD(bp, PXP2_REG_RD_SR_CNT); bp 9814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c blk_cnt = REG_RD(bp, PXP2_REG_RD_BLK_CNT); bp 9815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c port_is_idle_0 = REG_RD(bp, PXP2_REG_RD_PORT_IS_IDLE_0); bp 9816 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c port_is_idle_1 = REG_RD(bp, PXP2_REG_RD_PORT_IS_IDLE_1); bp 9817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pgl_exp_rom2 = REG_RD(bp, PXP2_REG_PGL_EXP_ROM2); bp 9818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) bp 9819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tags_63_32 = REG_RD(bp, PGLUE_B_REG_TAGS_63_32); bp 9825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (!CHIP_IS_E3(bp) || (tags_63_32 == 0xffffffff))) bp 9841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_234_gates(bp, true); bp 9844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp) && bnx2x_er_poll_igu_vq(bp)) bp 9850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_UNPREPARED, 0); bp 9861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_reset_mcp_prep(bp, &val); bp 9864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pxp_prep(bp); bp 9868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_process_kill_chip_reset(bp, global); bp 9872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 9873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f); bp 9877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (global && bnx2x_reset_mcp_comp(bp, val)) bp 9883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_234_gates(bp, false); bp 9891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_leader_reset(struct bnx2x *bp) bp 9894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool global = bnx2x_reset_is_global(bp); bp 9900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!global && !BP_NOMCP(bp)) { bp 9901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, bp 9914 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0); bp 9923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_process_kill(bp, global)) { bp 9925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 9934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_reset_done(bp); bp 9936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clear_reset_global(bp); bp 9940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!global && !BP_NOMCP(bp)) { bp 9941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP, 0); bp 9942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, 0); bp 9945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->is_leader = 0; bp 9946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_leader_lock(bp); bp 9951 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_recovery_failed(struct bnx2x *bp) bp 9953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, "Recovery has failed. Power cycle is needed.\n"); bp 9956 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_device_detach(bp->dev); bp 9962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_reset_in_progress(bp); bp 9965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D3hot); bp 9967 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = BNX2X_RECOVERY_FAILED; bp 9977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_parity_recover(struct bnx2x *bp) bp 9984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (vf_idx = 0; vf_idx < bp->requested_nr_virtfn; vf_idx++) { bp 9985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_virtf *vf = BP_VF(bp, vf_idx); bp 9993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->recovery_state) { bp 9996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c is_parity = bnx2x_chk_parity_attn(bp, &global, false); bp 10000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_trylock_leader_lock(bp)) { bp 10001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_reset_in_progress(bp); bp 10009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_reset_global(bp); bp 10011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->is_leader = 1; bp 10016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_nic_unload(bp, UNLOAD_RECOVERY, false)) bp 10019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = BNX2X_RECOVERY_WAIT; bp 10030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->is_leader) { bp 10031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int other_engine = BP_PATH(bp) ? 0 : 1; bp 10033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_load_status(bp, other_engine); bp 10035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_load_status(bp, BP_PATH(bp)); bp 10036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c global = bnx2x_reset_is_global(bp); bp 10051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c schedule_delayed_work(&bp->sp_rtnl_task, bp 10060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_leader_reset(bp)) { bp 10061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_recovery_failed(bp); bp 10073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bnx2x_reset_is_done(bp, BP_PATH(bp))) { bp 10080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_trylock_leader_lock(bp)) { bp 10084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->is_leader = 1; bp 10088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c schedule_delayed_work(&bp->sp_rtnl_task, bp 10097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_reset_is_global(bp)) { bp 10099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_task, bp 10105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.recoverable_error; bp 10107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.unrecoverable_error; bp 10108 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = bp 10110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_nic_load(bp, LOAD_NORMAL)) { bp 10112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, bp 10115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_device_detach(bp->dev); bp 10118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp, PCI_D3hot); bp 10121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = bp 10126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.recoverable_error = bp 10128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.unrecoverable_error = bp 10140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_udp_port_update(struct bnx2x *bp) bp 10154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 10161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].count) { bp 10162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c udp_tunnel = &bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE]; bp 10167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].count) { bp 10168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c udp_tunnel = &bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN]; bp 10177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_func_state_change(bp, &func_params); bp 10189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void __bnx2x_add_udp_port(struct bnx2x *bp, u16 port, bp 10192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type]; bp 10194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev) || !IS_PF(bp) || CHIP_IS_E1x(bp)) bp 10211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_CHANGE_UDP_PORT, 0); bp 10214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void __bnx2x_del_udp_port(struct bnx2x *bp, u16 port, bp 10217 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type]; bp 10219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!IS_PF(bp) || CHIP_IS_E1x(bp)) bp 10234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (netif_running(bp->dev)) bp 10235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_CHANGE_UDP_PORT, 0); bp 10244 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(netdev); bp 10249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_add_udp_port(bp, t_port, BNX2X_UDP_PORT_VXLAN); bp 10252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_add_udp_port(bp, t_port, BNX2X_UDP_PORT_GENEVE); bp 10262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(netdev); bp 10267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_del_udp_port(bp, t_port, BNX2X_UDP_PORT_VXLAN); bp 10270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_del_udp_port(bp, t_port, BNX2X_UDP_PORT_GENEVE); bp 10284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(work, struct bnx2x, sp_rtnl_task.work); bp 10288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) { bp 10293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->recovery_state != BNX2X_RECOVERY_DONE)) { bp 10303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->sp_rtnl_state = 0; bp 10306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_parity_recover(bp); bp 10312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_TX_TIMEOUT, &bp->sp_rtnl_state)) { bp 10323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->sp_rtnl_state = 0; bp 10327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_vars.link_up = 0; bp 10328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->force_link_down = true; bp 10329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_carrier_off(bp->dev); bp 10332 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, true); bp 10337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_nic_load(bp, LOAD_NORMAL) == -ENOMEM) { bp 10338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_nic_unload(bp, UNLOAD_NORMAL, true); bp 10339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_nic_load(bp, LOAD_NORMAL)) bp 10348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_SETUP_TC, &bp->sp_rtnl_state)) bp 10349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_setup_tc(bp->dev, bp->dcbx_port_params.ets.num_of_cos); bp 10350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_AFEX_F_UPDATE, &bp->sp_rtnl_state)) bp 10351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_after_function_update(bp); bp 10357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_FAN_FAILURE, &bp->sp_rtnl_state)) { bp 10359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_device_detach(bp->dev); bp 10360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_close(bp->dev); bp 10365 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_VFPF_MCAST, &bp->sp_rtnl_state)) { bp 10368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vfpf_set_mcast(bp->dev); bp 10371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_state)){ bp 10372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (netif_carrier_ok(bp->dev)) { bp 10373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_tx_disable(bp); bp 10378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_RX_MODE, &bp->sp_rtnl_state)) { bp 10380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_mode_inner(bp); bp 10384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_state)) bp 10385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_pf_set_vfs_vlan(bp); bp 10387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_TX_STOP, &bp->sp_rtnl_state)) { bp 10388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_stop_hw_tx(bp); bp 10389 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_resume_hw_tx(bp); bp 10393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_state)) bp 10394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_update_mng_version(bp); bp 10396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_and_clear_bit(BNX2X_SP_RTNL_UPDATE_SVID, &bp->sp_rtnl_state)) bp 10397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_handle_update_svid_cmd(bp); bp 10400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_state)) { bp 10401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_udp_port_update(bp)) { bp 10403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(bp->udp_tunnel_ports, 0, bp 10411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].count && bp 10412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].count) bp 10413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c udp_tunnel_get_rx_info(bp->dev); bp 10423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_SRIOV(bp) && test_and_clear_bit(BNX2X_SP_RTNL_ENABLE_SRIOV, bp 10424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_rtnl_state)) { bp 10425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_disable_sriov(bp); bp 10426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_enable_sriov(bp); bp 10432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(work, struct bnx2x, period_task.work); bp 10434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) bp 10437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_SLOW(bp)) { bp 10442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 10449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.pmf) { bp 10450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_period_func(&bp->link_params, &bp->link_vars); bp 10453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c queue_delayed_work(bnx2x_wq, &bp->period_task, 1*HZ); bp 10456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 10465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static u32 bnx2x_get_pretend_reg(struct bnx2x *bp) bp 10469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return base + (BP_ABS_FUNC(bp)) * stride; bp 10472 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_prev_unload_close_umac(struct bnx2x *bp, bp 10485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vals->umac_val[port] = REG_RD(bp, vals->umac_addr[port]); bp 10486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, vals->umac_addr[port], 0); bp 10491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_prev_unload_close_mac(struct bnx2x *bp, bp 10496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 port = BP_PORT(bp); bp 10501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c reset_reg = REG_RD(bp, MISC_REG_RESET_REG_2); bp 10503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E3(bp)) { bp 10504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, NIG_REG_BMAC0_REGS_OUT_EN + port * 4); bp 10509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c base_addr = BP_PORT(bp) ? NIG_REG_INGRESS_BMAC1_MEM bp 10511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c offset = CHIP_IS_E2(bp) ? BIGMAC2_REGISTER_BMAC_CONTROL bp 10520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c wb_data[0] = REG_RD(bp, base_addr + offset); bp 10521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c wb_data[1] = REG_RD(bp, base_addr + offset + 0x4); bp 10526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, vals->bmac_addr, wb_data[0]); bp 10527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, vals->bmac_addr + 0x4, wb_data[1]); bp 10530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vals->emac_addr = NIG_REG_NIG_EMAC0_EN + BP_PORT(bp)*4; bp 10531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vals->emac_val = REG_RD(bp, vals->emac_addr); bp 10532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, vals->emac_addr, 0); bp 10537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c base_addr = BP_PORT(bp) ? GRCBASE_XMAC1 : GRCBASE_XMAC0; bp 10538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, base_addr + XMAC_REG_PFC_CTRL_HI); bp 10539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, bp 10541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, base_addr + XMAC_REG_PFC_CTRL_HI, bp 10544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vals->xmac_val = REG_RD(bp, vals->xmac_addr); bp 10545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, vals->xmac_addr, 0); bp 10549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mac_stopped |= bnx2x_prev_unload_close_umac(bp, 0, bp 10551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mac_stopped |= bnx2x_prev_unload_close_umac(bp, 1, bp 10570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_prev_is_after_undi(struct bnx2x *bp) bp 10575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(REG_RD(bp, MISC_REG_RESET_REG_1) & bp 10579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, DORQ_REG_NORM_CID_OFST) == 0x7) { bp 10587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 inc) bp 10592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_FUNC(bp) < 2) bp 10593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c addr = BNX2X_PREV_UNDI_PROD_ADDR(BP_PORT(bp)); bp 10595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c addr = BNX2X_PREV_UNDI_PROD_ADDR_H(BP_FUNC(bp) - 2); bp 10597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_reg = REG_RD(bp, addr); bp 10602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, addr, tmp_reg); bp 10605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PORT(bp), BP_FUNC(bp), addr, bd, rcq); bp 10608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_mcp_done(struct bnx2x *bp) bp 10610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 rc = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, bp 10621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_path_get_entry(struct bnx2x *bp) bp 10626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (PCI_SLOT(bp->pdev->devfn) == tmp_list->slot && bp 10627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pdev->bus->number == tmp_list->bus && bp 10628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp) == tmp_list->path) bp 10634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_path_mark_eeh(struct bnx2x *bp) bp 10645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list = bnx2x_prev_path_get_entry(bp); bp 10651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 10659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_prev_is_path_marked(struct bnx2x *bp) bp 10667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list = bnx2x_prev_path_get_entry(bp); bp 10671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 10675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 10684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bool bnx2x_port_after_undi(struct bnx2x *bp) bp 10691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c entry = bnx2x_prev_path_get_entry(bp); bp 10692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = !!(entry && (entry->undi & (1 << BP_PORT(bp)))); bp 10699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_mark_path(struct bnx2x *bp, bool after_undi) bp 10711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list = bnx2x_prev_path_get_entry(bp); bp 10717 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 10732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list->bus = bp->pdev->bus->number; bp 10733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list->slot = PCI_SLOT(bp->pdev->devfn); bp 10734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list->path = BP_PATH(bp); bp 10736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_list->undi = after_undi ? (1 << BP_PORT(bp)) : 0; bp 10744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BP_PATH(bp)); bp 10752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_do_flr(struct bnx2x *bp) bp 10754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct pci_dev *dev = bp->pdev; bp 10756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 10762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.bc_ver < REQ_BC_VER_4_INITIATE_FLR) { bp 10764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.bc_ver); bp 10772 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_INITIATE_FLR, 0); bp 10777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_unload_uncommon(struct bnx2x *bp) bp 10784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_prev_is_path_marked(bp)) bp 10785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_prev_mcp_done(bp); bp 10790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_prev_is_after_undi(bp)) bp 10797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_compare_fw_ver(bp, FW_MSG_CODE_DRV_LOAD_FUNCTION, false); bp 10802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_do_flr(bp); bp 10815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_prev_mcp_done(bp); bp 10822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_unload_common(struct bnx2x *bp) bp 10836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_prev_is_path_marked(bp)) bp 10837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_prev_mcp_done(bp); bp 10839 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c reset_reg = REG_RD(bp, MISC_REG_RESET_REG_1); bp 10846 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_unload_close_mac(bp, &mac_vals); bp 10849 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_filter(&bp->link_params, 0); bp 10850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.port ^= 1; bp 10851 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_filter(&bp->link_params, 0); bp 10852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.port ^= 1; bp 10855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_prev_is_after_undi(bp)) { bp 10858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, DORQ_REG_NORM_CID_OFST, 0); bp 10860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, NIG_REG_NIG_INT_STS_CLR_0); bp 10862 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 10864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 0); bp 10867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_reg = REG_RD(bp, BRB1_REG_NUM_OF_FULL_BLOCKS); bp 10871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp_reg = REG_RD(bp, BRB1_REG_NUM_OF_FULL_BLOCKS); bp 10885 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_unload_undi_inc(bp, 1); bp 10895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_reset_common(bp); bp 10898 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.xmac_addr, mac_vals.xmac_val); bp 10900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.umac_addr[0], mac_vals.umac_val[0]); bp 10902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.umac_addr[1], mac_vals.umac_val[1]); bp 10904 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.emac_addr, mac_vals.emac_val); bp 10906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.bmac_addr, mac_vals.bmac_val[0]); bp 10907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, mac_vals.bmac_addr + 4, mac_vals.bmac_val[1]); bp 10910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_prev_mark_path(bp, prev_undi); bp 10912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_mcp_done(bp); bp 10916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_prev_mcp_done(bp); bp 10919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_prev_unload(struct bnx2x *bp) bp 10928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_clean_pglue_errors(bp); bp 10931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c hw_lock_reg = (BP_FUNC(bp) <= 5) ? bp 10932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MISC_REG_DRIVER_CONTROL_1 + BP_FUNC(bp) * 8) : bp 10933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MISC_REG_DRIVER_CONTROL_7 + (BP_FUNC(bp) - 6) * 8); bp 10935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c hw_lock_val = REG_RD(bp, hw_lock_reg); bp 10939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MCP_REG_MCPR_NVM_SW_ARB, bp 10940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MCPR_NVM_SW_ARB_ARB_REQ_CLR1 << BP_PORT(bp))); bp 10944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, hw_lock_reg, 0xffffffff); bp 10948 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (MCPR_ACCESS_LOCK_LOCK & REG_RD(bp, MCP_REG_MCPR_ACCESS_LOCK)) { bp 10950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_alr(bp); bp 10956 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fw = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_DIS, 0); bp 10969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c aer = !!(bnx2x_prev_path_get_entry(bp) && bp 10970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_path_get_entry(bp)->aer); bp 10975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_prev_unload_common(bp); bp 10980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_prev_unload_uncommon(bp); bp 10993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_port_after_undi(bp)) bp 10994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_common_hwinfo(struct bnx2x *bp) bp 11009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_CHIP_NUM); bp 11011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_CHIP_REV); bp 11017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, PCICFG_OFFSET + PCI_ID_VAL3); bp 11019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_BOND_ID); bp 11021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_id = id; bp 11024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, MISC_REG_CHIP_TYPE) & MISC_REG_CHIP_TYPE_57811_MASK) { bp 11025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_57810(bp)) bp 11026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_id = (CHIP_NUM_57811 << 16) | bp 11027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.chip_id & 0x0000FFFF); bp 11028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_57810_MF(bp)) bp 11029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_id = (CHIP_NUM_57811_MF << 16) | bp 11030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->common.chip_id & 0x0000FFFF); bp 11031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_id |= 0x1; bp 11035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->db_size = (1 << BNX2X_DB_SHIFT); bp 11037 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) { bp 11038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_PORT4MODE_EN_OVWR); bp 11040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MISC_REG_PORT4MODE_EN); bp 11045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_port_mode = val ? CHIP_4_PORT_MODE : bp 11048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_MODE_IS_4_PORT(bp)) bp 11049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pfid = (bp->pf_num >> 1); /* 0..3 */ bp 11051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pfid = (bp->pf_num & 0x6); /* 0, 2, 4, 6 */ bp 11053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.chip_port_mode = CHIP_PORT_MODE_NONE; /* N/A */ bp 11054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pfid = bp->pf_num; /* 0..7 */ bp 11057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("pf_id: %x", bp->pfid); bp 11059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.chip_id = bp->common.chip_id; bp 11062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = (REG_RD(bp, 0x2874) & 0x55); bp 11063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((bp->common.chip_id & 0x1) || bp 11064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_IS_E1(bp) && val) || (CHIP_IS_E1H(bp) && (val == 0x55))) { bp 11065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= ONE_PORT_FLAG; bp 11069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, MCP_REG_MCPR_NVM_CFG4); bp 11070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.flash_size = (BNX2X_NVRAM_1MB_SIZE << bp 11073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.flash_size, bp->common.flash_size); bp 11075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_shmem(bp); bp 11077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem2_base = REG_RD(bp, (BP_PATH(bp) ? bp 11081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.shmem_base = bp->common.shmem_base; bp 11082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.shmem2_base = bp->common.shmem2_base; bp 11083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_RD(bp, size) > bp 11084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (u32)offsetof(struct shmem2_region, lfa_host_addr[BP_PORT(bp)])) bp 11085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.lfa_base = bp 11086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, bp->common.shmem2_base + bp 11088 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lfa_host_addr[BP_PORT(bp)])); bp 11090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.lfa_base = 0; bp 11092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem_base, bp->common.shmem2_base); bp 11094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->common.shmem_base) { bp 11096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_MCP_FLAG; bp 11100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.hw_config = SHMEM_RD(bp, dev_info.shared_hw_config.config); bp 11101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("hw_config 0x%08x\n", bp->common.hw_config); bp 11103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.hw_led_mode = ((bp->common.hw_config & bp 11107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags = 0; bp 11108 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.shared_feature_config.config); bp 11110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags &= bp 11116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.bc_rev) >> 8; bp 11117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.bc_ver = val; bp 11125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.feature_config_flags |= bp 11143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= (val >= REQ_BC_VER_4_PFC_STATS_SUPPORTED) ? bp 11146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= (val >= REQ_BC_VER_4_FCOE_FEATURES) ? bp 11149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= (val >= REQ_BC_VER_4_DCBX_ADMIN_MSG_NON_PMF) ? bp 11152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= (val >= REQ_BC_VER_4_RMMOD_CMD) ? bp 11155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c boot_mode = SHMEM_RD(bp, bp 11156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_info.port_feature_config[BP_PORT(bp)].mba_config) & bp 11160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.boot_mode = FEATURE_ETH_BOOTMODE_PXE; bp 11163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.boot_mode = FEATURE_ETH_BOOTMODE_ISCSI; bp 11166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.boot_mode = FEATURE_ETH_BOOTMODE_FCOE; bp 11169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.boot_mode = FEATURE_ETH_BOOTMODE_NONE; bp 11173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_read_config_word(bp->pdev, bp->pdev->pm_cap + PCI_PM_PMC, &pmc); bp 11174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= (pmc & PCI_PM_CAP_PME_D3cold) ? 0 : NO_WOL_FLAG; bp 11177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->flags & NO_WOL_FLAG) ? "not " : ""); bp 11179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.shared_hw_config.part_num); bp 11180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[4]); bp 11181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val3 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[8]); bp 11182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val4 = SHMEM_RD(bp, dev_info.shared_hw_config.part_num[12]); bp 11184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_info(&bp->pdev->dev, "part number %X-%X-%X-%X\n", bp 11191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_get_igu_cam_info(struct bnx2x *bp) bp 11193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int pfid = BP_FUNC(bp); bp 11198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_sb = 0xff; bp 11199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_INT_MODE_IS_BC(bp)) { bp 11200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int vn = BP_VN(bp); bp 11201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c igu_sb_cnt = bp->igu_sb_cnt; bp 11202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_sb = (CHIP_MODE_IS_4_PORT(bp) ? pfid : vn) * bp 11205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_dsb_id = E1HVN_MAX * FP_SB_MAX_E1x + bp 11206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_MODE_IS_4_PORT(bp) ? pfid : vn); bp 11214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_MAPPING_MEMORY + igu_sb_id * 4); bp 11223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_dsb_id = igu_sb_id; bp 11225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->igu_base_sb == 0xff) bp 11226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_sb = igu_sb_id; bp 11239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt); bp 11250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_link_settings_supported(struct bnx2x *bp, u32 switch_cfg) bp 11252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int cfg_size = 0, idx, port = BP_PORT(bp); bp 11255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] = 0; bp 11256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[1] = 0; bp 11257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->link_params.num_phys) { bp 11259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] = bp->link_params.phy[INT_PHY].supported; bp 11263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] = bp->link_params.phy[EXT_PHY1].supported; bp 11267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_params.multi_phy_config & bp 11269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[1] = bp 11270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.phy[EXT_PHY1].supported; bp 11271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] = bp 11272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.phy[EXT_PHY2].supported; bp 11274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[0] = bp 11275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.phy[EXT_PHY1].supported; bp 11276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[1] = bp 11277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.phy[EXT_PHY2].supported; bp 11283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->port.supported[0] || bp->port.supported[1])) { bp 11285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) bp 11293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.phy_addr = REG_RD(bp, MISC_REG_WC0_CTRL_PHY_ADDR); bp 11297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.phy_addr = REG_RD( bp 11298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp, NIG_REG_SERDES0_CTRL_PHY_ADDR + port*0x10); bp 11301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.phy_addr = REG_RD( bp 11302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp, NIG_REG_XGXS0_CTRL_PHY_ADDR + port*0x18); bp 11306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.link_config[0]); bp 11310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("phy_addr 0x%x\n", bp->port.phy_addr); bp 11313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_10baseT_Half; bp 11317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_10baseT_Full; bp 11321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_100baseT_Half; bp 11325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_100baseT_Full; bp 11329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~(SUPPORTED_1000baseT_Half | bp 11334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_2500baseX_Full; bp 11338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_10000baseT_Full; bp 11342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->link_params.speed_cap_mask[idx] & bp 11344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx] &= ~SUPPORTED_20000baseKR2_Full; bp 11347 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("supported 0x%x 0x%x\n", bp->port.supported[0], bp 11348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[1]); bp 11351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_link_settings_requested(struct bnx2x *bp) bp 11354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[0] = 0; bp 11355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[1] = 0; bp 11356 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->link_params.num_phys) { bp 11366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_duplex[idx] = DUPLEX_FULL; bp 11367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c link_config = bp->port.link_config[idx]; bp 11370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & SUPPORTED_Autoneg) { bp 11371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx]; bp 11375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_params.phy[EXT_PHY1].type == bp 11377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & SUPPORTED_10baseT_Full) { bp 11393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & SUPPORTED_10baseT_Half) { bp 11408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_duplex[idx] = bp 11412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & bp 11426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & bp 11442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_duplex[idx] = bp 11446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & bp 11460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (bp->port.supported[idx] & bp 11467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11474 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & bp 11482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->port.supported[idx] & bp 11498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (bp->port.supported[idx] & bp 11505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] |= bp 11513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[idx]); bp 11518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = SPEED_20000; bp 11524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx] = bp 11526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx] = bp 11527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.supported[idx]; bp 11531 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_flow_ctrl[idx] = (link_config & bp 11533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->link_params.req_flow_ctrl[idx] == bp 11535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->port.supported[idx] & SUPPORTED_Autoneg)) bp 11536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_flow_ctrl[idx] = bp 11539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_requested_fc(bp); bp 11543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_line_speed[idx], bp 11544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_duplex[idx], bp 11545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.req_flow_ctrl[idx], bp 11546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.advertising[idx]); bp 11558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_port_hwinfo(struct bnx2x *bp) bp 11560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 11564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.bp = bp; bp 11565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.port = port; bp 11567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.lane_config = bp 11568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, dev_info.port_hw_config[port].lane_config); bp 11570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[0] = bp 11571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[1] = bp 11575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.link_config[0] = bp 11579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, dev_info.port_feature_config[port].link_config); bp 11581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.link_config[1] = bp 11582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, dev_info.port_feature_config[port].link_config2); bp 11584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.multi_phy_config = bp 11585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, dev_info.port_hw_config[port].multi_phy_config); bp 11589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c config = SHMEM_RD(bp, dev_info.port_feature_config[port].config); bp 11590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->wol = (!(bp->flags & NO_WOL_FLAG) && bp 11594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c PORT_FEAT_CFG_STORAGE_PERSONALITY_FCOE && !IS_MF(bp)) bp 11595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_ISCSI_FLAG; bp 11597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c PORT_FEAT_CFG_STORAGE_PERSONALITY_ISCSI && !(IS_MF(bp))) bp 11598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 11601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.lane_config, bp 11602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.speed_cap_mask[0], bp 11603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.link_config[0]); bp 11605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.switch_cfg = (bp->port.link_config[0] & bp 11607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_phy_probe(&bp->link_params); bp 11608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_settings_supported(bp, bp->link_params.switch_cfg); bp 11610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_link_settings_requested(bp); bp 11617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.prtad = bp->port.phy_addr; bp 11625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.prtad = bp 11629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eee_mode = (((SHMEM_RD(bp, dev_info. bp 11634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.eee_mode = EEE_MODE_ADV_LPI | bp 11638 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->link_params.eee_mode = 0; bp 11642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_get_iscsi_info(struct bnx2x *bp) bp 11645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 11646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 max_iscsi_conn = FW_ENCODE_32BIT_PATTERN ^ SHMEM_RD(bp, bp 11649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_SUPPORT(bp)) { bp 11650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= no_flags; bp 11655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_iscsi_conn = bp 11660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_iscsi_conn); bp 11666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_eth_dev.max_iscsi_conn) bp 11667 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= no_flags; bp 11670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func) bp 11673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_port_name_hi = bp 11674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_port_name_upper); bp 11675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_port_name_lo = bp 11676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_port_name_lower); bp 11679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_node_name_hi = bp 11680 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_node_name_upper); bp 11681 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_node_name_lo = bp 11682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_node_name_lower); bp 11685 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_shared_fcoe_funcs(struct bnx2x *bp) bp 11689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 11693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (fid = BP_PATH(bp); fid < E2_FUNC_MAX * 2; fid += 2) { bp 11694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_SD(bp)) { bp 11695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 cfg = MF_CFG_RD(bp, bp 11703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 cfg = MF_CFG_RD(bp, bp 11713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port, port_cnt = CHIP_MODE_IS_4_PORT(bp) ? 2 : 1; bp 11716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 lic = SHMEM_RD(bp, bp 11727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_fcoe_info(struct bnx2x *bp) bp 11729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 11730 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_ABS_FUNC(bp); bp 11731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 max_fcoe_conn = FW_ENCODE_32BIT_PATTERN ^ SHMEM_RD(bp, bp 11733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 num_fcoe_func = bnx2x_shared_fcoe_funcs(bp); bp 11735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_SUPPORT(bp)) { bp 11736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 11741 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_fcoe_conn = bp 11746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_fcoe_exchanges = MAX_NUM_FCOE_TASKS_PER_ENGINE; bp 11750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_fcoe_exchanges /= num_fcoe_func; bp 11753 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!IS_MF(bp)) { bp 11755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_port_name_hi = bp 11756 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_port_name_lo = bp 11760 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11765 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_node_name_hi = bp 11766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.fcoe_wwn_node_name_lo = bp 11770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, bp 11773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (!IS_MF_SD(bp)) { bp 11777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BNX2X_HAS_MF_EXT_PROTOCOL_FCOE(bp)) bp 11778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_ext_wwn_info(bp, func); bp 11780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp) && !CHIP_IS_E1x(bp)) bp 11781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_ext_wwn_info(bp, func); bp 11784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("max_fcoe_conn 0x%x\n", bp->cnic_eth_dev.max_fcoe_conn); bp 11790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_eth_dev.max_fcoe_conn) { bp 11791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 11792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eth_zero_addr(bp->fip_mac); bp 11796 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_cnic_info(struct bnx2x *bp) bp 11803 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_iscsi_info(bp); bp 11804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_fcoe_info(bp); bp 11807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp) bp 11810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_ABS_FUNC(bp); bp 11811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 11812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 *iscsi_mac = bp->cnic_eth_dev.iscsi_mac; bp 11813 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 *fip_mac = bp->fip_mac; bp 11815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 11821 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!IS_MF_SD(bp)) { bp 11822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 cfg = MF_CFG_RD(bp, func_ext_config[func].func_cfg); bp 11824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = MF_CFG_RD(bp, func_ext_config[func]. bp 11826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_ext_config[func]. bp 11832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG; bp 11836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = MF_CFG_RD(bp, func_ext_config[func]. bp 11838 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_ext_config[func]. bp 11844 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 11847 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ext_config = cfg; bp 11850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BNX2X_IS_MF_SD_PROTOCOL_ISCSI(bp)) { bp 11852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(iscsi_mac, bp->dev->dev_addr, ETH_ALEN); bp 11857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (BNX2X_IS_MF_SD_PROTOCOL_FCOE(bp)) { bp 11859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(fip_mac, bp->dev->dev_addr, ETH_ALEN); bp 11870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_FCOE_AFEX(bp)) bp 11871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(bp->dev->dev_addr, fip_mac, ETH_ALEN); bp 11873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, dev_info.port_hw_config[port]. bp 11875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.port_hw_config[port]. bp 11879 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, dev_info.port_hw_config[port]. bp 11881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.port_hw_config[port]. bp 11888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG; bp 11894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 11895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eth_zero_addr(bp->fip_mac); bp 11899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_get_mac_hwinfo(struct bnx2x *bp) bp 11902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int func = BP_ABS_FUNC(bp); bp 11903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 11906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eth_zero_addr(bp->dev->dev_addr); bp 11908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_NOMCP(bp)) { bp 11910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eth_hw_addr_random(bp->dev); bp 11911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if (IS_MF(bp)) { bp 11912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = MF_CFG_RD(bp, func_mf_config[func].mac_upper); bp 11913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_mf_config[func].mac_lower); bp 11916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_mac_buf(bp->dev->dev_addr, val, val2); bp 11918 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 11919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_cnic_mac_hwinfo(bp); bp 11922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, dev_info.port_hw_config[port].mac_upper); bp 11923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.port_hw_config[port].mac_lower); bp 11924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_mac_buf(bp->dev->dev_addr, val, val2); bp 11926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 11927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_cnic_mac_hwinfo(bp); bp 11930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!BP_NOMCP(bp)) { bp 11932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, dev_info.port_hw_config[port].mac_upper); bp 11933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, dev_info.port_hw_config[port].mac_lower); bp 11934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_mac_buf(bp->phys_port_id, val, val2); bp 11935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= HAS_PHYS_PORT_ID; bp 11938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(bp->link_params.mac_addr, bp->dev->dev_addr, ETH_ALEN); bp 11940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!is_valid_ether_addr(bp->dev->dev_addr)) bp 11941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 11944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dev->dev_addr); bp 11947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static bool bnx2x_get_dropless_info(struct bnx2x *bp) bp 11952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 11955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp) && !CHIP_IS_E1x(bp)) { bp 11957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp = BP_ABS_FUNC(bp); bp 11958 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cfg = MF_CFG_RD(bp, func_ext_config[tmp].func_cfg); bp 11962 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c tmp = BP_PORT(bp); bp 11963 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cfg = SHMEM_RD(bp, bp 11970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void validate_set_si_mode(struct bnx2x *bp) bp 11972 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 func = BP_ABS_FUNC(bp); bp 11975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_mf_config[func].mac_upper); bp 11979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = MULTI_FUNCTION_SI; bp 11980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[BP_VN(bp)] = bp 11981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, func_mf_config[func].config); bp 11986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_get_hwinfo(struct bnx2x *bp) bp 11988 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int /*abs*/func = BP_ABS_FUNC(bp); bp 11994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, MISC_REG_CHIP_NUM) == 0xffffffff) { bp 11995 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 12000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_common_hwinfo(bp); bp 12005 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) { bp 12006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.int_block = INT_BLOCK_HC; bp 12008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_dsb_id = DEF_SB_IGU_ID; bp 12009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_sb = 0; bp 12011 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.int_block = INT_BLOCK_IGU; bp 12014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RESET); bp 12016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = REG_RD(bp, IGU_REG_BLOCK_CONFIGURATION); bp 12024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_BLOCK_CONFIGURATION, val); bp 12025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, IGU_REG_RESET_MEMORIES, 0x7f); bp 12027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c while (tout && REG_RD(bp, IGU_REG_RESET_MEMORIES)) { bp 12032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (REG_RD(bp, IGU_REG_RESET_MEMORIES)) { bp 12033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 12035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, bp 12043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.int_block |= INT_BLOCK_MODE_BW_COMP; bp 12047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_get_igu_cam_info(bp); bp 12048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_RESET); bp 12058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 12059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->base_fw_ndsb = BP_PORT(bp) * FP_SB_MAX_E1x + BP_L_ID(bp); bp 12065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->base_fw_ndsb = bp->igu_base_sb; bp 12068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c "base_fw_ndsb %d\n", bp->igu_dsb_id, bp->igu_base_sb, bp 12069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_sb_cnt, bp->base_fw_ndsb); bp 12074 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov = 0; bp 12075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = 0; bp 12076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_sub_mode = 0; bp 12077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c vn = BP_VN(bp); bp 12079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1(bp) && !BP_NOMCP(bp)) { bp 12081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.shmem2_base, SHMEM2_RD(bp, size), bp 12084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_HAS(bp, mf_cfg_addr)) bp 12085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.mf_cfg_base = SHMEM2_RD(bp, mf_cfg_addr); bp 12087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.mf_cfg_base = bp->common.shmem_base + bp 12098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->common.mf_cfg_base != SHMEM_MF_CFG_ADDR_NONE) { bp 12100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = SHMEM_RD(bp, bp 12106 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c validate_set_si_mode(bp); bp 12109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((!CHIP_IS_E1x(bp)) && bp 12110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (MF_CFG_RD(bp, func_mf_config[func]. bp 12112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (SHMEM2_HAS(bp, bp 12114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = MULTI_FUNCTION_AFEX; bp 12115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = MF_CFG_RD(bp, bp 12123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, bp 12128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = MULTI_FUNCTION_SD; bp 12129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = MF_CFG_RD(bp, bp 12135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = MULTI_FUNCTION_SD; bp 12136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_sub_mode = SUB_MF_MODE_BD; bp 12137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = bp 12138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, bp 12141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_HAS(bp, mtu_size)) { bp 12142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int mtu_idx = BP_FW_MB_IDX(bp); bp 12146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mtu = SHMEM2_RD(bp, mtu_size[mtu_idx]); bp 12155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dev->mtu = mtu_size; bp 12159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_mode = MULTI_FUNCTION_SD; bp 12160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_sub_mode = SUB_MF_MODE_UFP; bp 12161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = bp 12162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c MF_CFG_RD(bp, bp 12166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = 0; bp 12169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val2 = SHMEM_RD(bp, bp 12174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c validate_set_si_mode(bp); bp 12175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_sub_mode = bp 12180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = 0; bp 12187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_config[vn] = 0; bp 12193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c IS_MF(bp) ? "multi" : "single"); bp 12195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->mf_mode) { bp 12197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, func_mf_config[func].e1hov_tag) & bp 12200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mf_ov = val; bp 12201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->path_has_ovlan = true; bp 12204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func, bp->mf_ov, bp->mf_ov); bp 12205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if ((bp->mf_sub_mode == SUB_MF_MODE_UFP) || bp 12206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->mf_sub_mode == SUB_MF_MODE_BD)) { bp 12207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 12210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->path_has_ovlan = true; bp 12212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 12227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 12240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_MODE_IS_4_PORT(bp) && bp 12241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !bp->path_has_ovlan && bp 12242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !IS_MF(bp) && bp 12243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->common.mf_cfg_base != SHMEM_MF_CFG_ADDR_NONE) { bp 12244 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 other_port = !BP_PORT(bp); bp 12245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 other_func = BP_PATH(bp) + 2*other_port; bp 12246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val = MF_CFG_RD(bp, bp 12249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->path_has_ovlan = true; bp 12254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1H(bp) && IS_MF(bp)) bp 12255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_sb_cnt = min_t(u8, bp->igu_sb_cnt, E1H_MAX_MF_SB_COUNT); bp 12258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_port_hwinfo(bp); bp 12261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_mac_hwinfo(bp); bp 12263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_get_cnic_info(bp); bp 12268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_read_fwinfo(struct bnx2x *bp) bp 12278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cnt = pci_read_vpd(bp->pdev, 0, BNX2X_VPD_LEN, vpd_start); bp 12279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(bp->fw_ver, 0, sizeof(bp->fw_ver)); bp 12304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cnt = pci_read_vpd(bp->pdev, BNX2X_VPD_LEN, bp 12341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(bp->fw_ver, &vpd_data[rodi], len); bp 12342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_ver[len] = ' '; bp 12353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_modes_bitmap(struct bnx2x *bp) bp 12357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_FPGA(bp)) bp 12359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_REV_IS_EMUL(bp)) bp 12364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_MODE_IS_4_PORT(bp)) bp 12369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E2(bp)) bp 12371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E3(bp)) { bp 12373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV(bp) == CHIP_REV_Ax) bp 12379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF(bp)) { bp 12381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->mf_mode) { bp 12400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_MODE_FLAGS(bp) = flags; bp 12403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_bp(struct bnx2x *bp) bp 12408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_init(&bp->port.phy_mutex); bp 12409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_init(&bp->fw_mb_mutex); bp 12410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_init(&bp->drv_info_mutex); bp 12411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c sema_init(&bp->stats_lock, 1); bp 12412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->drv_info_mng_owner = false; bp 12413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_LIST_HEAD(&bp->vlan_reg); bp 12415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_DELAYED_WORK(&bp->sp_task, bnx2x_sp_task); bp 12416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_DELAYED_WORK(&bp->sp_rtnl_task, bnx2x_sp_rtnl_task); bp 12417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_DELAYED_WORK(&bp->period_task, bnx2x_period_task); bp 12418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_DELAYED_WORK(&bp->iov_task, bnx2x_iov_task); bp 12419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 12420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_get_hwinfo(bp); bp 12424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c eth_zero_addr(bp->dev->dev_addr); bp 12427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_modes_bitmap(bp); bp 12429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_alloc_mem_bp(bp); bp 12433 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_read_fwinfo(bp); bp 12435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func = BP_FUNC(bp); bp 12438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && !BP_NOMCP(bp)) { bp 12440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_seq = bp 12441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) & bp 12443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("fw_seq 0x%08x\n", bp->fw_seq); bp 12445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_prev_unload(bp); bp 12447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem_bp(bp); bp 12452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_REV_IS_FPGA(bp)) bp 12453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, "FPGA detected\n"); bp 12455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (BP_NOMCP(bp) && (func == 0)) bp 12456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, "MCP disabled, must load devices in order!\n"); bp 12458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->disable_tpa = disable_tpa; bp 12459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->disable_tpa |= !!IS_MF_STORAGE_ONLY(bp); bp 12461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->disable_tpa |= is_kdump_kernel(); bp 12464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->disable_tpa) { bp 12465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dev->hw_features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); bp 12466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dev->features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); bp 12469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 12470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dropless_fc = 0; bp 12472 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dropless_fc = dropless_fc | bnx2x_get_dropless_info(bp); bp 12474 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mrrs = mrrs; bp 12476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->tx_ring_size = IS_MF_STORAGE_ONLY(bp) ? 0 : MAX_TX_AVAIL; bp 12477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 12478 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_ring_size = MAX_RX_AVAIL; bp 12481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->tx_ticks = (50 / BNX2X_BTR) * BNX2X_BTR; bp 12482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_ticks = (25 / BNX2X_BTR) * BNX2X_BTR; bp 12484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->current_interval = CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ; bp 12486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timer_setup(&bp->timer, bnx2x_timer, 0); bp 12487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->timer.expires = jiffies + bp->current_interval; bp 12489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (SHMEM2_HAS(bp, dcbx_lldp_params_offset) && bp 12490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_HAS(bp, dcbx_lldp_dcbx_stat_offset) && bp 12491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_HAS(bp, dcbx_en) && bp 12492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_RD(bp, dcbx_lldp_params_offset) && bp 12493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_RD(bp, dcbx_lldp_dcbx_stat_offset) && bp 12494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_RD(bp, dcbx_en[BP_PORT(bp)])) { bp 12495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_set_state(bp, true, BNX2X_DCBX_ENABLED_ON_NEG_ON); bp 12496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_init_params(bp); bp 12498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbx_set_state(bp, false, BNX2X_DCBX_ENABLED_OFF); bp 12501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 12502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_base_cl_id = FP_SB_MAX_E1x; bp 12504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_base_cl_id = FP_SB_MAX_E2; bp 12507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 12508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->max_cos = 1; bp 12509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E1x(bp)) bp 12510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->max_cos = BNX2X_MULTI_TX_COS_E1X; bp 12511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E2(bp) || CHIP_IS_E3A0(bp)) bp 12512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->max_cos = BNX2X_MULTI_TX_COS_E2_E3A0; bp 12513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E3B0(bp)) bp 12514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->max_cos = BNX2X_MULTI_TX_COS_E3B0; bp 12517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_NUM(bp), CHIP_REV(bp)); bp 12518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("set bp->max_cos to %d\n", bp->max_cos); bp 12524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 12525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->min_msix_vec_cnt = 1; bp 12526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CNIC_SUPPORT(bp)) bp 12527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->min_msix_vec_cnt = 3; bp 12529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->min_msix_vec_cnt = 2; bp 12530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("bp->min_msix_vec_cnt %d", bp->min_msix_vec_cnt); bp 12532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dump_preset_idx = 1; bp 12548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 12551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->stats_init = true; bp 12555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D0); bp 12563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 12564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int other_engine = BP_PATH(bp) ? 0 : 1; bp 12568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c other_load_status = bnx2x_get_load_status(bp, other_engine); bp 12569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c load_status = bnx2x_get_load_status(bp, BP_PATH(bp)); bp 12570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bnx2x_reset_is_done(bp, BP_PATH(bp)) || bp 12571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_chk_parity_attn(bp, &global, true)) { bp 12579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_reset_global(bp); bp 12588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_trylock_leader_lock(bp) && bp 12589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !bnx2x_leader_reset(bp)) { bp 12590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_info(bp->dev, bp 12596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D3hot); bp 12597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = BNX2X_RECOVERY_FAILED; bp 12607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->recovery_state = BNX2X_RECOVERY_DONE; bp 12608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_nic_load(bp, LOAD_OPEN); bp 12612 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) bp 12621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 12624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_nic_unload(bp, UNLOAD_CLOSE, false); bp 12652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_mcast_macs_list(struct bnx2x *bp, bp 12659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int mc_count = netdev_mc_count(bp->dev); bp 12663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_for_each_mc_addr(ha, bp->dev) { bp 12694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_uc_list(struct bnx2x *bp) bp 12697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct net_device *dev = bp->dev; bp 12699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_vlan_mac_obj *mac_obj = &bp->sp_objs->mac_obj; bp 12703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_del_all_macs(bp, mac_obj, BNX2X_UC_LIST_MAC, false); bp 12710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, bp 12728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_set_mac_one(bp, NULL, mac_obj, false /* don't care */, bp 12732 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_mc_list_e1x(struct bnx2x *bp) bp 12735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct net_device *dev = bp->dev; bp 12739 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rparam.mcast_obj = &bp->mcast_obj; bp 12742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_DEL); bp 12750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_init_mcast_macs_list(bp, &rparam, &mcast_group_list); bp 12755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, bp 12767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_mc_list(struct bnx2x *bp) bp 12771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct net_device *dev = bp->dev; bp 12775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 12776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_set_mc_list_e1x(bp); bp 12778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rparam.mcast_obj = &bp->mcast_obj; bp 12781 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_init_mcast_macs_list(bp, &rparam, &mcast_group_list); bp 12786 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, bp 12795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_DEL); bp 12807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 12809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->state != BNX2X_STATE_OPEN) { bp 12810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_IFUP, "state is %x, returning\n", bp->state); bp 12814 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_RX_MODE, bp 12819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_rx_mode_inner(struct bnx2x *bp) bp 12823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c DP(NETIF_MSG_IFUP, "dev->flags = %x\n", bp->dev->flags); bp 12825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_lock_bh(bp->dev); bp 12827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->dev->flags & IFF_PROMISC) { bp 12829 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c } else if ((bp->dev->flags & IFF_ALLMULTI) || bp 12830 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ((netdev_mc_count(bp->dev) > BNX2X_MAX_MULTICAST) && bp 12831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c CHIP_IS_E1(bp))) { bp 12834 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 12836 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_set_mc_list(bp) < 0) bp 12840 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 12841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_set_uc_list(bp) < 0) bp 12843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_lock_bh(bp->dev); bp 12848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, bp 12853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_mode = rx_mode; bp 12855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_ISCSI_ONLY(bp)) bp 12856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_mode = BNX2X_RX_MODE_NONE; bp 12859 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_bit(BNX2X_FILTER_RX_MODE_PENDING, &bp->sp_state)) { bp 12860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(BNX2X_FILTER_RX_MODE_SCHED, &bp->sp_state); bp 12861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 12865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 12866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_storm_rx_mode(bp); bp 12867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 12873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_addr_unlock_bh(bp->dev); bp 12874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vfpf_storm_rx_mode(bp); bp 12882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(netdev); bp 12892 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 12893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_phy_read(&bp->link_params, prtad, devad, addr, &value); bp 12894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 12906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(netdev); bp 12916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_acquire_phy_lock(bp); bp 12917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_phy_write(&bp->link_params, prtad, devad, addr, value); bp 12918 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_phy_lock(bp); bp 12925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 12933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_hwtstamp_ioctl(bp, ifr); bp 12937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return mdio_mii_ioctl(&bp->mdio, mdio, cmd); bp 12943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 12946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 12947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sample_bulletin(bp); bp 12959 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(netdev); bp 12961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!(bp->flags & HAS_PHYS_PORT_ID)) bp 12964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ppid->id_len = sizeof(bp->phys_port_id); bp 12965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memcpy(ppid->id, bp->phys_port_id, ppid->id_len); bp 12996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int __bnx2x_vlan_configure_vid(struct bnx2x *bp, u16 vid, bool add) bp 13000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 13004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_vlan_one(bp, vid, &bp->sp_objs->vlan_obj, bp 13007 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_vfpf_update_vlan(bp, vid, bp->fp->index, add); bp 13013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_vlan_configure_vid_list(struct bnx2x *bp) bp 13019 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c list_for_each_entry(vlan, &bp->vlan_reg, link) { bp 13023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->vlan_cnt >= bp->vlan_credit) bp 13026 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = __bnx2x_vlan_configure_vid(bp, vlan->vid, true); bp 13034 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->vlan_cnt++; bp 13040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_vlan_configure(struct bnx2x *bp, bool set_rx_mode) bp 13044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c need_accept_any_vlan = !!bnx2x_vlan_configure_vid_list(bp); bp 13046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->accept_any_vlan != need_accept_any_vlan) { bp 13047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->accept_any_vlan = need_accept_any_vlan; bp 13049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->accept_any_vlan ? "raised" : "cleared"); bp 13051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) bp 13052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_rx_mode_inner(bp); bp 13054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vfpf_storm_rx_mode(bp); bp 13059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp) bp 13062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vlan_configure(bp, false); bp 13069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 13080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c list_add_tail(&vlan->link, &bp->vlan_reg); bp 13083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vlan_configure(bp, true); bp 13090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 13097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c list_for_each_entry(vlan, &bp->vlan_reg, link) bp 13109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = __bnx2x_vlan_configure_vid(bp, vid, false); bp 13111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->vlan_cnt--; bp 13118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vlan_configure(bp, true); bp 13158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_coherency_mask(struct bnx2x *bp) bp 13160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct device *dev = &bp->pdev->dev; bp 13171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_disable_pcie_error_reporting(struct bnx2x *bp) bp 13173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->flags & AER_ENABLED) { bp 13174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_disable_pcie_error_reporting(bp->pdev); bp 13175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags &= ~AER_ENABLED; bp 13179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev, bp 13190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->dev = dev; bp 13191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pdev = pdev; bp 13195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 13201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 13207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && !(pci_resource_flags(pdev, 2) & IORESOURCE_MEM)) { bp 13208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, "Cannot find second PCI device base address, aborting\n"); bp 13224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 13233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 13235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 13243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, "Not PCI Express, aborting\n"); bp 13248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_coherency_mask(bp); bp 13258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->regview = pci_ioremap_bar(pdev, 0); bp 13259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->regview) { bp 13260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 13272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pf_num = PCI_FUNC(pdev->devfn); bp 13275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_read_config_dword(bp->pdev, bp 13277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->pf_num = (u8)((pci_cfg_dword & ME_REG_ABS_PF_NUM) >> bp 13280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("me reg PF num: %d\n", bp->pf_num); bp 13283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, bp 13292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= AER_ENABLED; bp 13300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 13301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0, 0); bp 13302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0, 0); bp 13303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0, 0); bp 13304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0, 0); bp 13307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_88_F1, 0); bp 13308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F1, 0); bp 13309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_90_F1, 0); bp 13310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, PXP2_REG_PGL_ADDR_94_F1, 0); bp 13318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, bp 13325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_ethtool_ops(bp, dev); bp 13355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 13357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->accept_any_vlan = true; bp 13382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.prtad = MDIO_PRTAD_NONE; bp 13383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.mmds = 0; bp 13384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; bp 13385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.dev = dev; bp 13386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.mdio_read = bnx2x_mdio_read; bp 13387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->mdio.mdio_write = bnx2x_mdio_write; bp 13402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_check_firmware(struct bnx2x *bp) bp 13404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c const struct firmware *firmware = bp->firmware; bp 13526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->arr = kmalloc(len, GFP_KERNEL); \ bp 13527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->arr) \ bp 13529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func(bp->firmware->data + be32_to_cpu(fw_hdr->arr.offset), \ bp 13530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (u8 *)bp->arr, len); \ bp 13533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_init_firmware(struct bnx2x *bp) bp 13539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->firmware) bp 13542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1(bp)) bp 13544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (CHIP_IS_E1H(bp)) bp 13546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (!CHIP_IS_E1x(bp)) bp 13554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->dev); bp 13561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_check_firmware(bp); bp 13567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c fw_hdr = (struct bnx2x_fw_file_hdr *)bp->firmware->data; bp 13582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_TSEM_INT_TABLE_DATA(bp) = bp->firmware->data + bp 13584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_TSEM_PRAM_DATA(bp) = bp->firmware->data + bp 13586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_USEM_INT_TABLE_DATA(bp) = bp->firmware->data + bp 13588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_USEM_PRAM_DATA(bp) = bp->firmware->data + bp 13590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_XSEM_INT_TABLE_DATA(bp) = bp->firmware->data + bp 13592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_XSEM_PRAM_DATA(bp) = bp->firmware->data + bp 13594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_CSEM_INT_TABLE_DATA(bp) = bp->firmware->data + bp 13596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_CSEM_PRAM_DATA(bp) = bp->firmware->data + bp 13604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_ops_offsets); bp 13606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_ops); bp 13608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_data); bp 13610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c release_firmware(bp->firmware); bp 13611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->firmware = NULL; bp 13616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_release_firmware(struct bnx2x *bp) bp 13618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_ops_offsets); bp 13619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_ops); bp 13620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->init_data); bp 13621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c release_firmware(bp->firmware); bp 13622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->firmware = NULL; bp 13642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x__init_func_obj(struct bnx2x *bp) bp 13645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_setup_dmae(bp); bp 13647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_func_obj(bp, &bp->func_obj, bp 13648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp(bp, func_rdata), bp 13649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_mapping(bp, func_rdata), bp 13650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp(bp, func_afex_rdata), bp 13651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_mapping(bp, func_afex_rdata), bp 13656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_qm_cid_count(struct bnx2x *bp) bp 13658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int cid_count = BNX2X_L2_MAX_CID(bp); bp 13660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_SRIOV(bp)) bp 13663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_SUPPORT(bp)) bp 13763 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_send_update_drift_ramrod(struct bnx2x *bp, int drift_dir, bp 13774 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 13785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_func_state_change(bp, &func_params); bp 13790 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bp 13798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) { bp 13843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_send_update_drift_ramrod(bp, drift_dir, best_val, bp 13858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bp 13860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) { bp 13868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timecounter_adjtime(&bp->timecounter, delta); bp 13875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bp 13878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) { bp 13884 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ns = timecounter_read(&bp->timecounter); bp 13896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bp 13899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!netif_running(bp->dev)) { bp 13910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timecounter_init(&bp->timecounter, &bp->cyclecounter, ns); bp 13919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); bp 13925 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_register_phc(struct bnx2x *bp) bp 13928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.owner = THIS_MODULE; bp 13929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c snprintf(bp->ptp_clock_info.name, 16, "%s", bp->dev->name); bp 13930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.max_adj = BNX2X_MAX_PHC_DRIFT; /* In PPB */ bp 13931 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.n_alarm = 0; bp 13932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.n_ext_ts = 0; bp 13933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.n_per_out = 0; bp 13934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.pps = 0; bp 13935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.adjfreq = bnx2x_ptp_adjfreq; bp 13936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.adjtime = bnx2x_ptp_adjtime; bp 13937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.gettime64 = bnx2x_ptp_gettime; bp 13938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.settime64 = bnx2x_ptp_settime; bp 13939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock_info.enable = bnx2x_ptp_enable; bp 13941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &bp->pdev->dev); bp 13942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_ERR(bp->ptp_clock)) { bp 13943 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_clock = NULL; bp 13952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp; bp 14004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev = alloc_etherdev_mqs(sizeof(*bp), tx_count, rx_count); bp 14008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp = netdev_priv(dev); bp 14010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags = 0; bp 14012 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= IS_VF_FLAG; bp 14014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_sb_cnt = max_non_def_sbs; bp 14015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->igu_base_addr = IS_VF(bp) ? PXP_VF_ADDR_IGU_START : BAR_IGU_INTMEM; bp 14016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->msg_enable = debug; bp 14017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_support = cnic_cnt; bp 14018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_probe = bnx2x_cnic_probe; bp 14022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_init_dev(bp, pdev, dev, ent->driver_data); bp 14029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c IS_PF(bp) ? "physical" : "virtual"); bp 14030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("Cnic support is %s\n", CNIC_SUPPORT(bp) ? "on" : "off"); bp 14035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_init_bp(bp); bp 14043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) { bp 14044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->doorbells = bnx2x_vf_doorbells(bp); bp 14045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_vf_pci_alloc(bp); bp 14049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c doorbell_size = BNX2X_L2_MAX_CID(bp) * (1 << BNX2X_DB_SHIFT); bp 14051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 14056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->doorbells = ioremap_nocache(pci_resource_start(pdev, 2), bp 14059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->doorbells) { bp 14060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_err(&bp->pdev->dev, bp 14066 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) { bp 14067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_vfpf_acquire(bp, tx_count, rx_count); bp 14073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) { bp 14081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_iov_init_one(bp, int_mode, BNX2X_MAX_NUM_OF_VFS); bp 14086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->qm_cid_count = bnx2x_set_qm_cid_count(bp); bp 14087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_DEV_INFO("qm_cid_count %d\n", bp->qm_cid_count); bp 14090 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1x(bp)) bp 14091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= NO_FCOE_FLAG; bp 14094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_num_queues(bp); bp 14099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_int_mode(bp); bp 14114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp)) { bp 14117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_addr_add(bp->dev, bp->fip_mac, NETDEV_HW_ADDR_T_SAN); bp 14123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (CHIP_REV(bp) >> 12) + 'A', (CHIP_METAL(bp) >> 4), bp 14124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev->base_addr, bp->pdev->irq, dev->dev_addr); bp 14125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pcie_print_link_status(bp->pdev); bp 14127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp)) bp 14128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_DISABLED); bp 14133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem_bp(bp); bp 14136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_disable_pcie_error_reporting(bp); bp 14138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->regview) bp 14139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c iounmap(bp->regview); bp 14141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && bp->doorbells) bp 14142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c iounmap(bp->doorbells); bp 14156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp, bp 14160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!NO_FCOE(bp)) { bp 14162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_addr_del(bp->dev, bp->fip_mac, NETDEV_HW_ADDR_T_SAN); bp 14168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_dcbnl_update_applist(bp, true); bp 14171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && bp 14172 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c !BP_NOMCP(bp) && bp 14173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->flags & BC_SUPPORTS_RMMOD_CMD)) bp 14174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_fw_command(bp, DRV_MSG_CODE_RMMOD, 0); bp 14185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_iov_remove_one(bp); bp 14188 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 14189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D0); bp 14190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_os_driver_state(bp, OS_DRIVER_STATE_NOT_LOADED); bp 14195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_reset_endianity(bp); bp 14199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_disable_msi(bp); bp 14202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) bp 14203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D3hot); bp 14206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_delayed_work_sync(&bp->sp_rtnl_task); bp 14209 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 14210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vfpf_release(bp); bp 14214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pci_wake_from_d3(pdev, bp->wol); bp 14218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_disable_pcie_error_reporting(bp); bp 14220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->regview) bp 14221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c iounmap(bp->regview); bp 14226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp)) { bp 14227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->doorbells) bp 14228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c iounmap(bp->doorbells); bp 14230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_release_firmware(bp); bp 14232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_vf_pci_dealloc(bp); bp 14234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem_bp(bp); bp 14248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp; bp 14254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp = netdev_priv(dev); bp 14256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_remove(pdev, dev, bp, true); bp 14259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_eeh_nic_unload(struct bnx2x *bp) bp 14261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->state = BNX2X_STATE_CLOSING_WAIT4_HALT; bp 14263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_mode = BNX2X_RX_MODE_NONE; bp 14265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) bp 14266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD); bp 14269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_tx_disable(bp); bp 14271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_del_all_napi(bp); bp 14272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CNIC_LOADED(bp)) bp 14273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_del_all_napi_cnic(bp); bp 14274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_reset_tc(bp->dev); bp 14276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c del_timer_sync(&bp->timer); bp 14277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_delayed_work_sync(&bp->sp_task); bp 14278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cancel_delayed_work_sync(&bp->period_task); bp 14280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!down_timeout(&bp->stats_lock, HZ / 10)) { bp 14281 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->stats_state = STATS_STATE_DISABLED; bp 14282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c up(&bp->stats_lock); bp 14285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_save_statistics(bp); bp 14287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netif_carrier_off(bp->dev); bp 14304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_eeh_nic_unload(bp); bp 14320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_path_mark_eeh(bp); bp 14339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14356 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_power_state(bp, PCI_D0); bp 14362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_init_shmem(bp)) { bp 14367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_PF(bp) && SHMEM2_HAS(bp, drv_capabilities_flag)) { bp 14370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c v = SHMEM2_RD(bp, bp 14371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c drv_capabilities_flag[BP_FW_MB_IDX(bp)]); bp 14372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_capabilities_flag[BP_FW_MB_IDX(bp)], bp 14375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_drain_tx_queues(bp); bp 14376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_send_unload_req(bp, UNLOAD_RECOVERY); bp 14377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_netif_stop(bp, 1); bp 14378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_irq(bp); bp 14381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_send_unload_done(bp, true); bp 14383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->sp_state = 0; bp 14384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->port.pmf = 0; bp 14386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_prev_unload(bp); bp 14391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_squeeze_objects(bp); bp 14392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_skbs(bp); bp 14393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_rx_queue(bp, i) bp 14394 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_rx_sge_range(bp, bp->fp + i, NUM_RX_SGE); bp 14395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_fp_mem(bp); bp 14396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_free_mem(bp); bp 14398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->state = BNX2X_STATE_CLOSED; bp 14416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->recovery_state != BNX2X_RECOVERY_DONE) { bp 14419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c netdev_err(bp->dev, "Handling parity error recovery. Try again later\n"); bp 14425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->fw_seq = SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) & bp 14429 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_nic_load(bp, LOAD_NORMAL); bp 14445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp; bp 14450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp = netdev_priv(dev); bp 14451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp) bp 14462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c __bnx2x_remove(pdev, dev, bp, false); bp 14524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_notify_link_changed(struct bnx2x *bp) bp 14526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, MISC_REG_AEU_GENERAL_ATTN_12 + BP_FUNC(bp)*sizeof(u32), 1); bp 14541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_set_iscsi_eth_mac_addr(struct bnx2x *bp) bp 14546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_set_mac_one(bp, bp->cnic_eth_dev.iscsi_mac, bp 14547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->iscsi_l2_mac_obj, true, bp 14552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_cnic_sp_post(struct bnx2x *bp, int count) bp 14558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->panic)) bp 14562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_bh(&bp->spq_lock); bp 14563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BUG_ON(bp->cnic_spq_pending < count); bp 14564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_spq_pending -= count; bp 14566 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for (; bp->cnic_kwq_pending; bp->cnic_kwq_pending--) { bp 14567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u16 type = (le16_to_cpu(bp->cnic_kwq_cons->hdr.type) bp 14570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 cmd = (le32_to_cpu(bp->cnic_kwq_cons->hdr.conn_and_cmd_data) bp 14578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cxt_index = BNX2X_ISCSI_ETH_CID(bp) / bp 14580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cxt_offset = BNX2X_ISCSI_ETH_CID(bp) - bp 14582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_ctx_validation(bp, bp 14583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->context[cxt_index]. bp 14585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_ISCSI_ETH_CID(bp)); bp 14596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!atomic_read(&bp->cq_spq_left)) bp 14599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_dec(&bp->cq_spq_left); bp 14601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!atomic_read(&bp->eq_spq_left)) bp 14604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_dec(&bp->eq_spq_left); bp 14607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->cnic_spq_pending >= bp 14608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_eth_dev.max_kwqe_pending) bp 14611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_spq_pending++; bp 14618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spe = bnx2x_sp_get_next(bp); bp 14619 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c *spe = *bp->cnic_kwq_cons; bp 14622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_spq_pending, bp->cnic_kwq_pending, count); bp 14624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->cnic_kwq_cons == bp->cnic_kwq_last) bp 14625 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_cons = bp->cnic_kwq; bp 14627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_cons++; bp 14629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_prod_update(bp); bp 14630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->spq_lock); bp 14636 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (unlikely(bp->panic)) { bp 14646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if ((bp->recovery_state != BNX2X_RECOVERY_DONE) && bp 14647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (bp->recovery_state != BNX2X_RECOVERY_NIC_LOADING)) { bp 14652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_lock_bh(&bp->spq_lock); bp 14657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->cnic_kwq_pending == MAX_SP_DESC_CNT) bp 14660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c *bp->cnic_kwq_prod = *spe; bp 14662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_pending++; bp 14668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_pending); bp 14670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->cnic_kwq_prod == bp->cnic_kwq_last) bp 14671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_prod = bp->cnic_kwq; bp 14673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_prod++; bp 14676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c spin_unlock_bh(&bp->spq_lock); bp 14678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->cnic_spq_pending < bp->cnic_eth_dev.max_kwqe_pending) bp 14679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_sp_post(bp, 0); bp 14684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_cnic_ctl_send(struct bnx2x *bp, struct cnic_ctl_info *ctl) bp 14689 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_lock(&bp->cnic_mutex); bp 14690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops = rcu_dereference_protected(bp->cnic_ops, bp 14691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c lockdep_is_held(&bp->cnic_mutex)); bp 14693 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = c_ops->cnic_ctl(bp->cnic_data, ctl); bp 14694 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_unlock(&bp->cnic_mutex); bp 14699 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_cnic_ctl_send_bh(struct bnx2x *bp, struct cnic_ctl_info *ctl) bp 14705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c c_ops = rcu_dereference(bp->cnic_ops); bp 14707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = c_ops->cnic_ctl(bp->cnic_data, ctl); bp 14716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_cnic_notify(struct bnx2x *bp, int cmd) bp 14722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_cnic_ctl_send(bp, &ctl); bp 14725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_cnic_cfc_comp(struct bnx2x *bp, int cid, u8 err) bp 14734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_ctl_send_bh(bp, &ctl); bp 14735 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_sp_post(bp, 0); bp 14743 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_set_iscsi_eth_rx_mode(struct bnx2x *bp, bool start) bp 14746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u8 cl_id = bnx2x_cnic_eth_cl_id(bp, BNX2X_ISCSI_ETH_CL_ID_IDX); bp 14762 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c clear_bit(BNX2X_FILTER_ISCSI_ETH_STOP_SCHED, &bp->sp_state); bp 14767 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c clear_bit(BNX2X_FILTER_ISCSI_ETH_START_SCHED, &bp->sp_state); bp 14769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (test_bit(BNX2X_FILTER_RX_MODE_PENDING, &bp->sp_state)) bp 14770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c set_bit(sched_state, &bp->sp_state); bp 14773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_q_rx_mode(bp, cl_id, 0, accept_flags, 0, bp 14780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_ilt_wr(bp, index, addr); bp 14795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_sp_post(bp, count); bp 14801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 14805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_mac_obj(bp, &bp->iscsi_l2_mac_obj, bp 14807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid, BP_FUNC(bp), bp 14808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp(bp, mac_rdata), bp 14809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_sp_mapping(bp, mac_rdata), bp 14811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->sp_state, BNX2X_OBJ_TYPE_RX, bp 14812 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c &bp->macs_pool); bp 14815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_set_iscsi_eth_mac_addr(bp); bp 14824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_iscsi_eth_rx_mode(bp, true); bp 14831 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bnx2x_wait_sp_comp(bp, sp_bits)) bp 14843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_iscsi_eth_rx_mode(bp, false); bp 14850 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bnx2x_wait_sp_comp(bp, sp_bits)) bp 14856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_del_all_macs(bp, &bp->iscsi_l2_mac_obj, bp 14864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c atomic_add(count, &bp->cq_spq_left); bp 14871 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) { bp 14872 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int idx = BP_FW_MB_IDX(bp); bp 14873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c u32 cap = SHMEM2_RD(bp, drv_capabilities_flag[idx]); bp 14874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int path = BP_PATH(bp); bp 14875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 14885 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_capabilities_flag[idx], cap); bp 14888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (!SHMEM2_HAS(bp, ncsi_oem_data_addr)) || bp 14889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c (!(bp->flags & BC_SUPPORTS_FCOE_FEATURES))) bp 14893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c scratch_offset = SHMEM2_RD(bp, ncsi_oem_data_addr); bp 14902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, scratch_offset + i, bp 14905 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_GET_DRV_VERSION, 0); bp 14912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E3(bp)) { bp 14913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int idx = BP_FW_MB_IDX(bp); bp 14916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cap = SHMEM2_RD(bp, drv_capabilities_flag[idx]); bp 14921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c SHMEM2_WR(bp, drv_capabilities_flag[idx], cap); bp 14923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_GET_DRV_VERSION, 0); bp 14933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp)) { bp 14938 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_os_driver_state(bp, bp 14942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_os_driver_state(bp, bp 14946 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_set_os_driver_state(bp, bp 14960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 14966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!SHMEM2_HAS(bp, fc_npiv_nvram_tbl_addr[0])) bp 14977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c offset = SHMEM2_RD(bp, fc_npiv_nvram_tbl_addr[BP_PORT(bp)]); bp 14985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bnx2x_nvram_read(bp, offset, (u8 *)tbl, sizeof(*tbl))) { bp 15023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_setup_cnic_irq_info(struct bnx2x *bp) bp 15025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 15027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (bp->flags & USING_MSIX_FLAG) { bp 15030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].vector = bp->msix_table[1].vector; bp 15035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CHIP_IS_E1x(bp)) bp 15036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk = (void *)bp->cnic_sb.e2_sb; bp 15038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk = (void *)bp->cnic_sb.e1x_sb; bp 15040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk_num = bnx2x_cnic_fw_sb_id(bp); bp 15041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk_num2 = bnx2x_cnic_igu_sb_id(bp); bp 15042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[1].status_blk = bp->def_status_blk; bp 15049 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_setup_cnic_info(struct bnx2x *bp) bp 15051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 15053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_offset = FUNC_ILT_BASE(BP_FUNC(bp)) + bp 15054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cid_ilt_lines(bp); bp 15055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->starting_cid = bnx2x_cid_ilt_lines(bp) * ILT_PAGE_CIDS; bp 15056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->fcoe_init_cid = BNX2X_FCOE_ETH_CID(bp); bp 15057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid = BNX2X_ISCSI_ETH_CID(bp); bp 15060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_1st_NON_L2_ETH_CID(bp), cp->starting_cid, cp->fcoe_init_cid, bp 15063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (NO_ISCSI_OOO(bp)) bp 15070 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 15071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 15081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_SUPPORT(bp)) { bp 15086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!CNIC_LOADED(bp)) { bp 15087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_load_cnic(bp); bp 15094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_enabled = true; bp 15096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq = kzalloc(PAGE_SIZE, GFP_KERNEL); bp 15097 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->cnic_kwq) bp 15100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_cons = bp->cnic_kwq; bp 15101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_prod = bp->cnic_kwq; bp 15102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_last = bp->cnic_kwq + MAX_SP_DESC_CNT; bp 15104 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_spq_pending = 0; bp 15105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq_pending = 0; bp 15107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_data = data; bp 15111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iro_arr = bp->iro_arr; bp 15113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_setup_cnic_irq_info(bp); bp 15115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rcu_assign_pointer(bp->cnic_ops, ops); bp 15118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_GET_DRV_VERSION, 0); bp 15125 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 15126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 15128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_lock(&bp->cnic_mutex); bp 15130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c RCU_INIT_POINTER(bp->cnic_ops, NULL); bp 15131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c mutex_unlock(&bp->cnic_mutex); bp 15133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_enabled = false; bp 15134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c kfree(bp->cnic_kwq); bp 15135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cnic_kwq = NULL; bp 15142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = netdev_priv(dev); bp 15143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; bp 15149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (NO_ISCSI(bp) && NO_FCOE(bp)) bp 15153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->chip_id = CHIP_ID(bp); bp 15154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->pdev = bp->pdev; bp 15155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->io_base = bp->regview; bp 15156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->io_base2 = bp->doorbells; bp 15159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_offset = FUNC_ILT_BASE(BP_FUNC(bp)) + bp 15160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cid_ilt_lines(bp); bp 15162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->starting_cid = bnx2x_cid_ilt_lines(bp) * ILT_PAGE_CIDS; bp 15168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->fcoe_init_cid = BNX2X_FCOE_ETH_CID(bp); bp 15170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_cnic_eth_cl_id(bp, BNX2X_ISCSI_ETH_CL_ID_IDX); bp 15171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid = BNX2X_ISCSI_ETH_CID(bp); bp 15173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (NO_ISCSI_OOO(bp)) bp 15176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (NO_ISCSI(bp)) bp 15179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (NO_FCOE(bp)) bp 15193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = fp->bp; bp 15196 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (IS_VF(bp)) bp 15197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_vf_ustorm_prods_offset(bp, fp); bp 15198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c else if (!CHIP_IS_E1x(bp)) bp 15201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c offset += USTORM_RX_PRODS_E1X_OFFSET(BP_PORT(bp), fp->cl_id); bp 15211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_pretend_func(struct bnx2x *bp, u16 pretend_func_val) bp 15215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (CHIP_IS_E1H(bp) && pretend_func_val >= E1H_FUNC_MAX) bp 15219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c pretend_reg = bnx2x_get_pretend_reg(bp); bp 15220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, pretend_reg, pretend_func_val); bp 15221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD(bp, pretend_reg); bp 15227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(work, struct bnx2x, ptp_task); bp 15228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 15240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c val_seq = REG_RD(bp, port ? NIG_REG_P1_TLLH_PTP_BUF_SEQID : bp 15251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timestamp = REG_RD(bp, port ? NIG_REG_P1_TLLH_PTP_BUF_TS_MSB : bp 15254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timestamp |= REG_RD(bp, port ? NIG_REG_P1_TLLH_PTP_BUF_TS_LSB : bp 15257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_BUF_SEQID : bp 15259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ns = timecounter_cyc2time(&bp->timecounter, timestamp); bp 15263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c skb_tstamp_tx(bp->ptp_tx_skb, &shhwtstamps); bp 15271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->eth_stats.ptp_skip_tx_ts++; bp 15274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c dev_kfree_skb_any(bp->ptp_tx_skb); bp 15275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->ptp_tx_skb = NULL; bp 15278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_set_rx_ts(struct bnx2x *bp, struct sk_buff *skb) bp 15280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 15283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timestamp = REG_RD(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_TS_MSB : bp 15286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timestamp |= REG_RD(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_TS_LSB : bp 15290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_SEQID : bp 15293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c ns = timecounter_cyc2time(&bp->timecounter, timestamp); bp 15304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x *bp = container_of(cc, struct bnx2x, cyclecounter); bp 15305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 15309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_RD_DMAE(bp, port ? NIG_REG_TIMESYNC_GEN_REG + tsgen_synctime_t1 : bp 15319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static void bnx2x_init_cyclecounter(struct bnx2x *bp) bp 15321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c memset(&bp->cyclecounter, 0, sizeof(bp->cyclecounter)); bp 15322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cyclecounter.read = bnx2x_cyclecounter_read; bp 15323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cyclecounter.mask = CYCLECOUNTER_MASK(64); bp 15324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cyclecounter.shift = 0; bp 15325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->cyclecounter.mult = 1; bp 15328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_send_reset_timesync_ramrod(struct bnx2x *bp) bp 15338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c func_params.f_obj = &bp->func_obj; bp 15345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return bnx2x_func_state_change(bp, &func_params); bp 15348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_enable_ptp_packets(struct bnx2x *bp) bp 15363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c for_each_eth_queue(bp, i) { bp 15364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 15367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 15370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_queue_state_change(bp, &q_params); bp 15393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int bnx2x_configure_ptp_filters(struct bnx2x *bp) bp 15395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int port = BP_PORT(bp); bp 15399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->hwtstamp_ioctl_called) bp 15406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->tx_type) { bp 15408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->flags |= TX_TIMESTAMPING_EN; bp 15409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, param, BNX2X_PTP_TX_ON_PARAM_MASK); bp 15410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, rule, BNX2X_PTP_TX_ON_RULE_MASK); bp 15421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c switch (bp->rx_filter) { bp 15427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = HWTSTAMP_FILTER_NONE; bp 15432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = HWTSTAMP_FILTER_PTP_V1_L4_EVENT; bp 15434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, param, BNX2X_PTP_V1_L4_PARAM_MASK); bp 15435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, rule, BNX2X_PTP_V1_L4_RULE_MASK); bp 15440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L4_EVENT; bp 15442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, param, BNX2X_PTP_V2_L4_PARAM_MASK); bp 15443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, rule, BNX2X_PTP_V2_L4_RULE_MASK); bp 15448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT; bp 15450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, param, BNX2X_PTP_V2_L2_PARAM_MASK); bp 15451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, rule, BNX2X_PTP_V2_L2_RULE_MASK); bp 15457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT; bp 15459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, param, BNX2X_PTP_V2_PARAM_MASK); bp 15460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, rule, BNX2X_PTP_V2_RULE_MASK); bp 15465 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_enable_ptp_packets(bp); bp 15470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_TO_HOST : bp 15476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_hwtstamp_ioctl(struct bnx2x *bp, struct ifreq *ifr) bp 15494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->hwtstamp_ioctl_called = 1; bp 15495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->tx_type = config.tx_type; bp 15496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->rx_filter = config.rx_filter; bp 15498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_configure_ptp_filters(bp); bp 15502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c config.rx_filter = bp->rx_filter; bp 15509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c static int bnx2x_configure_ptp(struct bnx2x *bp) bp 15511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c int rc, port = BP_PORT(bp); bp 15515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_PARAM_MASK : bp 15517 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_RULE_MASK : bp 15519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_PARAM_MASK : bp 15521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_RULE_MASK : bp 15525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_TO_HOST : bp 15529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_PTP_EN : bp 15535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR_DMAE(bp, NIG_REG_TIMESYNC_GEN_REG + tsgen_ctrl, wb_data, 2); bp 15538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_send_reset_timesync_ramrod(bp); bp 15545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_LLH_PTP_HOST_BUF_SEQID : bp 15547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c REG_WR(bp, port ? NIG_REG_P1_TLLH_PTP_BUF_SEQID : bp 15554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c void bnx2x_init_ptp(struct bnx2x *bp) bp 15559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c rc = bnx2x_configure_ptp(bp); bp 15566 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c INIT_WORK(&bp->ptp_task, bnx2x_ptp_task); bp 15572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c if (!bp->timecounter_init_done) { bp 15573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bnx2x_init_cyclecounter(bp); bp 15574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c timecounter_init(&bp->timecounter, &bp->cyclecounter, bp 15576 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c bp->timecounter_init_done = 1; bp 48 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_exe_queue_init(struct bnx2x *bp, bp 79 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_exe_queue_free_elem(struct bnx2x *bp, bp 111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_exe_queue_add(struct bnx2x *bp, bp 122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->optimize(bp, o->owner, elem); bp 127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->validate(bp, o->owner, elem); bp 142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_free_elem(bp, elem); bp 150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, bp 160 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_free_elem(bp, elem); bp 173 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_exe_queue_step(struct bnx2x *bp, bp 191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_exe_queue_reset_pending(bp, o); bp 223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->execute(bp, o->owner, &o->pending_comp, ramrod_flags); bp 233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_exe_queue_reset_pending(bp, o); bp 249 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp) bp 283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_state_wait(struct bnx2x *bp, int state, bp 289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_REV_IS_EMUL(bp)) bp 305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (bp->panic) bp 318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_raw_wait(struct bnx2x *bp, struct bnx2x_raw_obj *raw) bp 320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_state_wait(bp, raw->state, raw->pstate); bp 430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int __bnx2x_vlan_mac_h_write_trylock(struct bnx2x *bp, bp 451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void __bnx2x_vlan_mac_h_exec_pending(struct bnx2x *bp, bp 461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_exe_queue_step(bp, &o->exe_queue, &ramrod_flags); bp 480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void __bnx2x_vlan_mac_h_pend(struct bnx2x *bp, bp 500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void __bnx2x_vlan_mac_h_write_unlock(struct bnx2x *bp, bp 508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_vlan_mac_h_exec_pending(bp, o); bp 522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int __bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, bp 541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = __bnx2x_vlan_mac_h_read_lock(bp, o); bp 563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void __bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, bp 584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_vlan_mac_h_write_unlock(bp, o); bp 598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, bp 602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_vlan_mac_h_read_unlock(bp, o); bp 606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_get_n_elements(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o, bp 615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); bp 632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_h_read_unlock(bp, o); bp 639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_check_mac_add(struct bnx2x *bp, bp 659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_check_vlan_add(struct bnx2x *bp, bp 674 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_check_vlan_mac_add(struct bnx2x *bp, bp 696 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_check_mac_del(struct bnx2x *bp, bp 713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_check_vlan_del(struct bnx2x *bp, bp 729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_check_vlan_mac_del(struct bnx2x *bp, bp 750 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static bool bnx2x_check_move(struct bnx2x *bp, bp 761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c pos = src_o->check_del(bp, src_o, data); bp 764 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = dst_o->check_add(bp, dst_o, data); bp 776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, bp 800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_mac_in_nig(struct bnx2x *bp, bp 804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c u32 reg_offset = BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM : bp 807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (!IS_MF_SI(bp) && !IS_MF_AFEX(bp)) bp 824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c REG_WR_DMAE(bp, reg_offset, wb_data, 2); bp 827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c REG_WR(bp, (BP_PORT(bp) ? NIG_REG_LLH1_FUNC_MEM_ENABLE : bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_vlan_mac_set_cmd_hdr_e2(struct bnx2x *bp, bp 881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_one_mac_e2(struct bnx2x *bp, bp 914 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_set_mac_in_nig(bp, add, mac, bp 917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_set_mac_in_nig(bp, add, mac, bp 926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_MAC, bp 945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, bp 977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_vlan_mac_set_rdata_hdr_e1x(struct bnx2x *bp, bp 990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_vlan_mac_set_cfg_entry_e1x(struct bnx2x *bp, bp 1016 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_vlan_mac_set_rdata_e1x(struct bnx2x *bp, bp 1023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_rdata_hdr_e1x(bp, o, type, cam_offset, bp 1025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cfg_entry_e1x(bp, o, add, opcode, mac, vlan_id, bp 1042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_one_mac_e1x(struct bnx2x *bp, bp 1059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_rdata_e1x(bp, o, raw->state, bp 1065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_one_vlan_e2(struct bnx2x *bp, bp 1084 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_VLAN, bp 1099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, bp 1115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_one_vlan_mac_e2(struct bnx2x *bp, bp 1136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, o, add, CLASSIFY_RULE_OPCODE_PAIR, bp 1155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_cmd_hdr_e2(bp, target_obj, bp 1181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_set_one_vlan_mac_e1h(struct bnx2x *bp, bp 1198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_set_rdata_e1x(bp, o, BNX2X_FILTER_VLAN_MAC_PENDING, bp 1224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_vlan_mac_restore(struct bnx2x *bp, bp 1263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_config_vlan_mac(bp, p); bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_validate_vlan_mac_add(struct bnx2x *bp, bp 1345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->check_add(bp, o, &elem->cmd_data.vlan_mac.u); bp 1384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_validate_vlan_mac_del(struct bnx2x *bp, bp 1396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c pos = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp, bp 1456 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (!src_o->check_move(bp, src_o, dest_o, bp 1505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_validate_vlan_mac(struct bnx2x *bp, bp 1511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_validate_vlan_mac_add(bp, qo, elem); bp 1513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_validate_vlan_mac_del(bp, qo, elem); bp 1515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_validate_vlan_mac_move(bp, qo, elem); bp 1521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_remove_vlan_mac(struct bnx2x *bp, bp 1557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_wait_vlan_mac(struct bnx2x *bp, bp 1566 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = raw->wait_comp(bp, raw); bp 1580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int __bnx2x_vlan_mac_execute_step(struct bnx2x *bp, bp 1589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = __bnx2x_vlan_mac_h_write_trylock(bp, o); bp 1592 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_vlan_mac_h_pend(bp, o, *ramrod_flags); bp 1599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_exe_queue_step(bp, &o->exe_queue, ramrod_flags); bp 1615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_complete_vlan_mac(struct bnx2x *bp, bp 1629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __bnx2x_exe_queue_reset_pending(bp, &o->exe_queue); bp 1642 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = __bnx2x_vlan_mac_execute_step(bp, o, ramrod_flags); bp 1662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_optimize_vlan_mac(struct bnx2x *bp, bp 1706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_free_elem(bp, pos); bp 1725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, bp 1761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c reg_elem = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u); bp 1777 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_execute_vlan_mac(struct bnx2x *bp, bp 1811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_vlan_mac_get_registry_elem(bp, cam_obj, bp 1826 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, elem, idx, bp 1843 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_sp_post(bp, o->ramrod_cmd, r->cid, bp 1856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c reg_elem = o->check_del(bp, o, bp 1888 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c reg_elem = o->check_del(bp, cam_obj, bp 1901 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, bp 1909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c elem = bnx2x_exe_queue_alloc_elem(bp); bp 1926 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_exe_queue_add(bp, &o->exe_queue, elem, restore); bp 1936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_config_vlan_mac(struct bnx2x *bp, bp 1949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_vlan_mac_push_new_cmd(bp, p); bp 1968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = __bnx2x_vlan_mac_execute_step(bp, p->vlan_mac_obj, bp 1987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = raw->wait_comp(bp, raw); bp 1992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = __bnx2x_vlan_mac_execute_step(bp, bp 2018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_vlan_mac_del_all(struct bnx2x *bp, bp 2039 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = exeq->remove(bp, exeq->owner, exeq_pos); bp 2046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_free_elem(bp, exeq_pos); bp 2066 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c read_lock = bnx2x_vlan_mac_h_read_lock(bp, o); bp 2076 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_config_vlan_mac(bp, &p); bp 2079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_h_read_unlock(bp, o); bp 2086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_vlan_mac_h_read_unlock(bp, o); bp 2091 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_config_vlan_mac(bp, &p); bp 2135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_mac_obj(struct bnx2x *bp, bp 2154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1x(bp)) { bp 2162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_init(bp, bp 2179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_init(bp, bp 2189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_vlan_obj(struct bnx2x *bp, bp 2207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1x(bp)) { bp 2220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_init(bp, bp 2230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_vlan_mac_obj(struct bnx2x *bp, bp 2255 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1(bp)) { bp 2258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c } else if (CHIP_IS_E1H(bp)) { bp 2266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_init(bp, bp 2282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_exe_queue_init(bp, bp 2293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void __storm_memset_mac_filters(struct bnx2x *bp, bp 2302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __storm_memset_struct(bp, addr, size, (u32 *)mac_filters); bp 2305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_set_rx_mode_e1x(struct bnx2x *bp, bp 2377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c __storm_memset_mac_filters(bp, mac_filters, p->func_id); bp 2395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_rx_mode_set_cmd_state_e2(struct bnx2x *bp, bp 2444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_set_rx_mode_e2(struct bnx2x *bp, bp 2464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, bp 2477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, bp 2491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); bp 2497 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_rx_mode_set_cmd_state_e2(bp, &p->tx_accept_flags, bp 2505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c data->rules[rule_idx].client_id = bnx2x_fcoe(bp, cl_id); bp 2511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_rx_mode_set_cmd_state_e2(bp, &p->rx_accept_flags, bp 2535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_FILTER_RULES, p->cid, bp 2546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_wait_rx_mode_comp_e2(struct bnx2x *bp, bp 2549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_state_wait(bp, p->state, p->pstate); bp 2552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_empty_rx_mode_wait(struct bnx2x *bp, bp 2559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_config_rx_mode(struct bnx2x *bp, bp 2565 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = p->rx_mode_obj->config_rx_mode(bp, p); bp 2571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = p->rx_mode_obj->wait_comp(bp, p); bp 2579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_rx_mode_obj(struct bnx2x *bp, bp 2582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1x(bp)) { bp 2646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_wait(struct bnx2x *bp, bp 2649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (bnx2x_state_wait(bp, o->sched_state, o->raw.pstate) || bp 2650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->raw.wait_comp(bp, &o->raw)) bp 2669 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp, bp 2828 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_mcast_set_one_rule_e2(struct bnx2x *bp, bp 2902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_bin, bp 2913 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, &cfg_data, bp 2932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_pending_add_e2(struct bnx2x *bp, bp 2944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); bp 2967 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_pending_del_e2(struct bnx2x *bp, bp 2974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, NULL, cmd_pos->type); bp 2997 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_pending_restore_e2(struct bnx2x *bp, bp 3001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cmd_pos->data.next_bin = o->hdl_restore(bp, o, cmd_pos->data.next_bin, bp 3013 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_set_e2_convert(struct bnx2x *bp, bp 3080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_set_e2(struct bnx2x *bp, bp 3096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_set_e2_convert(bp, o, cmd_pos); bp 3101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, *cnt, &cfg_data, p_item->type); bp 3116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_mcast_handle_pending_cmds_e2(struct bnx2x *bp, bp 3127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_add_e2(bp, o, cmd_pos, &cnt); bp 3131 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_del_e2(bp, o, cmd_pos, &cnt); bp 3135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_restore_e2(bp, o, cmd_pos, bp 3140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_pending_set_e2(bp, o, cmd_pos, &cnt); bp 3165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_add(struct bnx2x *bp, bp 3175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, &cfg_data, BNX2X_MCAST_CMD_ADD); bp 3186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_del(struct bnx2x *bp, bp 3193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, NULL, BNX2X_MCAST_CMD_DEL); bp 3216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_mcast_handle_current_cmd(struct bnx2x *bp, bp 3228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_add(bp, o, p, &cnt); bp 3232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_del(bp, o, p, &cnt); bp 3236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->hdl_restore(bp, o, 0, &cnt); bp 3250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_validate_e2(struct bnx2x *bp, bp 3308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_mcast_revert_e2(struct bnx2x *bp, bp 3329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_set_rdata_hdr_e2(struct bnx2x *bp, bp 3354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_mcast_refresh_registry_e2(struct bnx2x *bp, bp 3371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_setup_e2(struct bnx2x *bp, bp 3384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cnt = bnx2x_mcast_handle_pending_cmds_e2(bp, p); bp 3397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, cnt); bp 3408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_set_rdata_hdr_e2(bp, p, (u8)cnt); bp 3426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_refresh_registry_e2(bp, o); bp 3445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_MULTICAST_RULES, bp 3457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_validate_e1h(struct bnx2x *bp, bp 3473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_mcast_revert_e1h(struct bnx2x *bp, bp 3486 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_add_e1h(struct bnx2x *bp, bp 3507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_hdl_restore_e1h(struct bnx2x *bp, bp 3525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_setup_e1h(struct bnx2x *bp, bp 3544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_add_e1h(bp, o, p, mc_filter); bp 3557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_hdl_restore_e1h(bp, o, p, mc_filter); bp 3567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c REG_WR(bp, MC_HASH_OFFSET(bp, i), mc_filter[i]); bp 3579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_validate_e1(struct bnx2x *bp, bp 3639 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_mcast_revert_e1(struct bnx2x *bp, bp 3656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_mcast_set_one_rule_e1(struct bnx2x *bp, bp 3690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_mcast_set_rdata_hdr_e1(struct bnx2x *bp, bp 3698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c u8 offset = (CHIP_REV_IS_SLOW(bp) ? bp 3724 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, struct bnx2x_mcast_obj *o , int start_idx, bp 3734 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, i, &cfg_data, BNX2X_MCAST_CMD_RESTORE); bp 3748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c struct bnx2x *bp, struct bnx2x_mcast_ramrod_params *p) bp 3768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->set_one_rule(bp, o, cnt, &cfg_data, cmd_pos->type); bp 3783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->hdl_restore(bp, o, 0, &cnt); bp 3828 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_mcast_refresh_registry_e1(struct bnx2x *bp, bp 3875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_mcast_setup_e1(struct bnx2x *bp, bp 3895 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cnt = bnx2x_mcast_handle_pending_cmds_e1(bp, p); bp 3903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cnt = bnx2x_mcast_handle_current_cmd(bp, p, cmd, 0); bp 3915 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_mcast_set_rdata_hdr_e1(bp, p, (u8)cnt); bp 3923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_mcast_refresh_registry_e1(bp, o); bp 3942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_SET_MAC, raw->cid, bp 3976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_config_mcast(struct bnx2x *bp, bp 3990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->validate(bp, p, cmd); bp 4006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->enqueue_cmd(bp, p->mcast_obj, p, cmd); bp 4022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->config_mcast(bp, p, cmd); bp 4028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->wait_comp(bp, o); bp 4037 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->revert(bp, p, old_reg_size, cmd); bp 4066 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_mcast_obj(struct bnx2x *bp, bp 4086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1(bp)) { bp 4093 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_REV_IS_SLOW(bp)) bp 4112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c } else if (CHIP_IS_E1H(bp)) { bp 4364 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_mac_credit_pool(struct bnx2x *bp, bp 4373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1(bp)) { bp 4375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (!CHIP_REV_IS_SLOW(bp)) bp 4382 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c } else if (CHIP_IS_E1H(bp)) { bp 4387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (!CHIP_REV_IS_SLOW(bp)) bp 4403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (!CHIP_REV_IS_SLOW(bp)) bp 4404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cam_sz = PF_MAC_CREDIT_E2(bp, func_num); bp 4419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_vlan_credit_pool(struct bnx2x *bp, bp 4424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1x(bp)) { bp 4434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int credit = PF_VLAN_CREDIT_E2(bp, func_num); bp 4452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_debug_print_ind_table(struct bnx2x *bp, bp 4481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_setup_rss(struct bnx2x *bp, bp 4571 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (netif_msg_ifup(bp)) bp 4572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_debug_print_ind_table(bp, p); bp 4582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_RSS_UPDATE, r->cid, bp 4599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_config_rss(struct bnx2x *bp, bp 4615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->config_rss(bp, p); bp 4622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = r->wait_comp(bp, r); bp 4627 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_rss_config_obj(struct bnx2x *bp, bp 4655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_queue_state_change(struct bnx2x *bp, bp 4663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->check_transition(bp, o, params); bp 4676 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->complete_cmd(bp, o, pending_bit); bp 4679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->send_cmd(bp, params); bp 4688 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->wait_comp(bp, o, pending_bit); bp 4717 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_queue_wait_comp(struct bnx2x *bp, bp 4721 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_state_wait(bp, cmd, &o->pending); bp 4733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_queue_comp_cmd(struct bnx2x *bp, bp 4776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_setup_data_e2(struct bnx2x *bp, bp 4789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_init_general_data(struct bnx2x *bp, bp 4945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_setup_data_cmn(struct bnx2x *bp, bp 4949 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, bp 4970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_setup_tx_only(struct bnx2x *bp, bp 4974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_init_general_data(bp, cmd_params->q_obj, bp 5001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_init(struct bnx2x *bp, bp 5014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_update_coalesce_sb_index(bp, init->tx.fw_sb_id, bp 5025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_update_coalesce_sb_index(bp, init->rx.fw_sb_id, bp 5036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_set_ctx_validation(bp, init->cxts[cos], o->cids[cos]); bp 5040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->complete_cmd(bp, o, BNX2X_Q_CMD_INIT); bp 5047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_setup_e1x(struct bnx2x *bp, bp 5060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_setup_data_cmn(bp, params, rdata); bp 5068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], bp 5073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_setup_e2(struct bnx2x *bp, bp 5086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_setup_data_cmn(bp, params, rdata); bp 5087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_setup_data_e2(bp, params, rdata); bp 5095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, ramrod, o->cids[BNX2X_PRIMARY_CID_INDEX], bp 5100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_setup_tx_only(struct bnx2x *bp, bp 5126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_setup_tx_only(bp, params, rdata); bp 5138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, ramrod, o->cids[cid_index], bp 5143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_update_data(struct bnx2x *bp, bp 5215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_update(struct bnx2x *bp, bp 5236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_update_data(bp, o, update_params, rdata); bp 5244 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_CLIENT_UPDATE, bp 5257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_deactivate(struct bnx2x *bp, bp 5266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_update(bp, params); bp 5277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_activate(struct bnx2x *bp, bp 5287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_update(bp, params); bp 5290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static void bnx2x_q_fill_update_tpa_data(struct bnx2x *bp, bp 5312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_update_tpa(struct bnx2x *bp, bp 5327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_q_fill_update_tpa_data(bp, o, update_tpa_params, rdata); bp 5342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TPA_UPDATE, bp 5348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_halt(struct bnx2x *bp, bp 5353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_HALT, bp 5358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_cfc_del(struct bnx2x *bp, bp 5370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_CFC_DEL, bp 5374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_terminate(struct bnx2x *bp, bp 5386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_TERMINATE, bp 5390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_q_send_empty(struct bnx2x *bp, bp 5395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_ETH_EMPTY, bp 5400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_queue_send_cmd_cmn(struct bnx2x *bp, bp 5405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_init(bp, params); bp 5407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_setup_tx_only(bp, params); bp 5409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_deactivate(bp, params); bp 5411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_activate(bp, params); bp 5413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_update(bp, params); bp 5415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_update_tpa(bp, params); bp 5417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_halt(bp, params); bp 5419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_cfc_del(bp, params); bp 5421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_terminate(bp, params); bp 5423 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_empty(bp, params); bp 5430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_queue_send_cmd_e1x(struct bnx2x *bp, bp 5435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_setup_e1x(bp, params); bp 5446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_queue_send_cmd_cmn(bp, params); bp 5453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_queue_send_cmd_e2(struct bnx2x *bp, bp 5458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_q_send_setup_e2(bp, params); bp 5469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_queue_send_cmd_cmn(bp, params); bp 5492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_queue_chk_transition(struct bnx2x *bp, bp 5658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_queue_obj(struct bnx2x *bp, bp 5678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c if (CHIP_IS_E1x(bp)) bp 5691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_get_q_logical_state(struct bnx2x *bp, bp 5712 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c enum bnx2x_func_state bnx2x_func_get_state(struct bnx2x *bp, bp 5727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_func_wait_comp(struct bnx2x *bp, bp 5731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_state_wait(bp, cmd, &o->pending); bp 5744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_state_change_comp(struct bnx2x *bp, bp 5752 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cmd, BP_FUNC(bp), o->state, bp 5759 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c cmd, BP_FUNC(bp), o->next_state); bp 5784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_func_comp_cmd(struct bnx2x *bp, bp 5791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int rc = bnx2x_func_state_change_comp(bp, o, cmd); bp 5810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_func_chk_transition(struct bnx2x *bp, bp 5916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_init_func(struct bnx2x *bp, bp 5919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return drv->init_hw_func(bp); bp 5933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_init_port(struct bnx2x *bp, bp 5936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int rc = drv->init_hw_port(bp); bp 5940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_init_func(bp, drv); bp 5953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_init_cmn_chip(struct bnx2x *bp, bp 5956 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int rc = drv->init_hw_cmn_chip(bp); bp 5960 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_init_port(bp, drv); bp 5973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_init_cmn(struct bnx2x *bp, bp 5976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int rc = drv->init_hw_cmn(bp); bp 5980 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_init_port(bp, drv); bp 5983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_func_hw_init(struct bnx2x *bp, bp 5992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c BP_ABS_FUNC(bp), load_code); bp 5995 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = drv->gunzip_init(bp); bp 6000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = drv->init_fw(bp); bp 6009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_func_init_cmn_chip(bp, drv); bp 6015 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_func_init_cmn(bp, drv); bp 6021 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_func_init_port(bp, drv); bp 6027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = bnx2x_func_init_func(bp, drv); bp 6038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c drv->gunzip_end(bp); bp 6044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->complete_cmd(bp, o, BNX2X_F_CMD_HW_INIT); bp 6058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_func_reset_func(struct bnx2x *bp, bp 6061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c drv->reset_hw_func(bp); bp 6079 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_func_reset_port(struct bnx2x *bp, bp 6082 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c drv->reset_hw_port(bp); bp 6083 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_reset_func(bp, drv); bp 6096 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline void bnx2x_func_reset_cmn(struct bnx2x *bp, bp 6099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_reset_port(bp, drv); bp 6100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c drv->reset_hw_cmn(bp); bp 6103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_hw_reset(struct bnx2x *bp, bp 6110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c DP(BNX2X_MSG_SP, "function %d reset_phase %x\n", BP_ABS_FUNC(bp), bp 6115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_reset_cmn(bp, drv); bp 6118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_reset_port(bp, drv); bp 6121 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_reset_func(bp, drv); bp 6130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c o->complete_cmd(bp, o, BNX2X_F_CMD_HW_RESET); bp 6135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_start(struct bnx2x *bp, bp 6149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rdata->path_id = BP_PATH(bp); bp 6192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_START, 0, bp 6197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_switch_update(struct bnx2x *bp, bp 6271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, bp 6276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_afex_update(struct bnx2x *bp, bp 6309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0, bp 6315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c inline int bnx2x_func_send_afex_viflists(struct bnx2x *bp, bp 6348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_AFEX_VIF_LISTS, 0, bp 6353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_stop(struct bnx2x *bp, bp 6356 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_FUNCTION_STOP, 0, 0, 0, bp 6360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_tx_stop(struct bnx2x *bp, bp 6363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_STOP_TRAFFIC, 0, 0, 0, bp 6366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static inline int bnx2x_func_send_tx_start(struct bnx2x *bp, bp 6395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_START_TRAFFIC, 0, bp 6401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_func_send_set_timesync(struct bnx2x *bp, bp 6431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_SET_TIMESYNC, 0, bp 6436 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c static int bnx2x_func_send_cmd(struct bnx2x *bp, bp 6441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_hw_init(bp, params); bp 6443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_start(bp, params); bp 6445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_stop(bp, params); bp 6447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_hw_reset(bp, params); bp 6449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_afex_update(bp, params); bp 6451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_afex_viflists(bp, params); bp 6453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_tx_stop(bp, params); bp 6455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_tx_start(bp, params); bp 6457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_switch_update(bp, params); bp 6459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c return bnx2x_func_send_set_timesync(bp, params); bp 6466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c void bnx2x_init_func_obj(struct bnx2x *bp, bp 6501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c int bnx2x_func_state_change(struct bnx2x *bp, bp 6512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->check_transition(bp, o, params); bp 6519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->check_transition(bp, o, params); bp 6536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c bnx2x_func_state_change_comp(bp, o, cmd); bp 6540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->send_cmd(bp, params); bp 6552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c rc = o->wait_comp(bp, o, cmd); bp 93 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait_comp)(struct bnx2x *bp, bp 170 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h typedef int (*exe_q_validate)(struct bnx2x *bp, bp 174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h typedef int (*exe_q_remove)(struct bnx2x *bp, bp 181 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h typedef int (*exe_q_optimize)(struct bnx2x *bp, bp 184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h typedef int (*exe_q_execute)(struct bnx2x *bp, bp 328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*get_n_elements)(struct bnx2x *bp, bp 338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*check_add)(struct bnx2x *bp, bp 348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h (*check_del)(struct bnx2x *bp, bp 357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h bool (*check_move)(struct bnx2x *bp, bp 374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*set_one_rule)(struct bnx2x *bp, bp 396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*delete_all)(struct bnx2x *bp, bp 416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*restore)(struct bnx2x *bp, bp 437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*complete)(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o, bp 446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait)(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o); bp 499 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*config_rx_mode)(struct bnx2x *bp, bp 502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait_comp)(struct bnx2x *bp, bp 593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*config_mcast)(struct bnx2x *bp, bp 608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*hdl_restore)(struct bnx2x *bp, struct bnx2x_mcast_obj *o, bp 611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*enqueue_cmd)(struct bnx2x *bp, struct bnx2x_mcast_obj *o, bp 615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*set_one_rule)(struct bnx2x *bp, bp 633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait_comp)(struct bnx2x *bp, struct bnx2x_mcast_obj *o); bp 640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*validate)(struct bnx2x *bp, bp 647 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*revert)(struct bnx2x *bp, bp 769 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*config_rss)(struct bnx2x *bp, bp 1086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*send_cmd)(struct bnx2x *bp, bp 1098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*check_transition)(struct bnx2x *bp, bp 1105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*complete_cmd)(struct bnx2x *bp, bp 1109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait_comp)(struct bnx2x *bp, bp 1310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*init_hw_cmn_chip)(struct bnx2x *bp); bp 1311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*init_hw_cmn)(struct bnx2x *bp); bp 1312 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*init_hw_port)(struct bnx2x *bp); bp 1313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*init_hw_func)(struct bnx2x *bp); bp 1316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*reset_hw_cmn)(struct bnx2x *bp); bp 1317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*reset_hw_port)(struct bnx2x *bp); bp 1318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*reset_hw_func)(struct bnx2x *bp); bp 1321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*gunzip_init)(struct bnx2x *bp); bp 1322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*gunzip_end)(struct bnx2x *bp); bp 1325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*init_fw)(struct bnx2x *bp); bp 1326 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void (*release_fw)(struct bnx2x *bp); bp 1363 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*send_cmd)(struct bnx2x *bp, bp 1369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*check_transition)(struct bnx2x *bp, bp 1376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*complete_cmd)(struct bnx2x *bp, bp 1380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int (*wait_comp)(struct bnx2x *bp, struct bnx2x_func_sp_obj *o, bp 1390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_func_obj(struct bnx2x *bp, bp 1396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_func_state_change(struct bnx2x *bp, bp 1399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h enum bnx2x_func_state bnx2x_func_get_state(struct bnx2x *bp, bp 1402 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_queue_obj(struct bnx2x *bp, bp 1407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_queue_state_change(struct bnx2x *bp, bp 1410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_get_q_logical_state(struct bnx2x *bp, bp 1414 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_mac_obj(struct bnx2x *bp, bp 1421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_vlan_obj(struct bnx2x *bp, bp 1428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_vlan_mac_obj(struct bnx2x *bp, bp 1436 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, bp 1438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, bp 1440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_vlan_mac_h_write_lock(struct bnx2x *bp, bp 1442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_config_vlan_mac(struct bnx2x *bp, bp 1445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_vlan_mac_move(struct bnx2x *bp, bp 1451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_rx_mode_obj(struct bnx2x *bp, bp 1463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_config_rx_mode(struct bnx2x *bp, bp 1468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_mcast_obj(struct bnx2x *bp, bp 1495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_config_mcast(struct bnx2x *bp, bp 1500 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_mac_credit_pool(struct bnx2x *bp, bp 1503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_vlan_credit_pool(struct bnx2x *bp, bp 1510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h void bnx2x_init_rss_config_obj(struct bnx2x *bp, bp 1522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h int bnx2x_config_rss(struct bnx2x *bp, bp 1535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h #define PF_MAC_CREDIT_E2(bp, func_num) \ bp 1536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h ((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_MAC_CREDIT_CNT) / \ bp 1537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h func_num + GET_NUM_VFS_PER_PF(bp) * VF_MAC_CREDIT_CNT) bp 1539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h #define PF_VLAN_CREDIT_E2(bp, func_num) \ bp 1540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h ((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) / \ bp 1541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h func_num + GET_NUM_VFS_PER_PF(bp) * VF_VLAN_CREDIT_CNT) bp 29 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_op_prep(struct bnx2x *bp, int vfidx, bp 35 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void storm_memset_vf_to_pf(struct bnx2x *bp, u16 abs_fid, bp 38 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_VF_TO_PF_OFFSET(abs_fid), bp 40 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_VF_TO_PF_OFFSET(abs_fid), bp 42 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_VF_TO_PF_OFFSET(abs_fid), bp 44 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_VF_TO_PF_OFFSET(abs_fid), bp 48 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void storm_memset_func_en(struct bnx2x *bp, u16 abs_fid, bp 51 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_FUNC_EN_OFFSET(abs_fid), bp 53 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_FUNC_EN_OFFSET(abs_fid), bp 55 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_FUNC_EN_OFFSET(abs_fid), bp 57 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_FUNC_EN_OFFSET(abs_fid), bp 61 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_idx_by_abs_fid(struct bnx2x *bp, u16 abs_vfid) bp 65 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, idx) bp 66 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_vf(bp, idx, abs_vfid) == abs_vfid) bp 72 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *bnx2x_vf_by_abs_fid(struct bnx2x *bp, u16 abs_vfid) bp 74 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u16 idx = (u16)bnx2x_vf_idx_by_abs_fid(bp, abs_vfid); bp 75 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return (idx < BNX2X_NR_VIRTFN(bp)) ? BP_VF(bp, idx) : NULL; bp 78 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_igu_ack_sb(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 102 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, igu_addr_data, cmd_data.sb_id_and_flags); bp 107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, igu_addr_ctl, ctl); bp 111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static bool bnx2x_validate_vf_sp_objs(struct bnx2x *bp, bp 126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vfop_qctor_dump_tx(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vfop_qctor_dump_rx(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vfop_qctor_prep(struct bnx2x *bp, bp 234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_queue_create(struct bnx2x *bp, bp 248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_get_q_logical_state(bp, q_params->q_obj) == bp 256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, q_params); bp 263 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, q_params); bp 268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_igu_ack_sb(bp, vf, vf_igu_sb(vf, bnx2x_vfq(vf, qid, sb_idx)), bp 274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_queue_destroy(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_get_q_logical_state(bp, q_params.q_obj) == bp 299 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &q_params); bp 316 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_set_igu_info(struct bnx2x *bp, u8 igu_sb_id, u8 abs_vfid) bp 318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = bnx2x_vf_by_abs_fid(bp, abs_vfid); bp 321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!BP_VFDB(bp)->first_vf_igu_entry) bp 322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->first_vf_igu_entry = igu_sb_id; bp 331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->vf_sbs_pool++; bp 334 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static inline void bnx2x_vf_vlan_credit(struct bnx2x *bp, bp 342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c read_lock = bnx2x_vlan_mac_h_read_lock(bp, obj); bp 350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vlan_mac_h_read_unlock(bp, obj); bp 355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_vlan_mac_clear(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 385 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = ramrod.vlan_mac_obj->delete_all(bp, bp 399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_mac_vlan_config(struct bnx2x *bp, bp 437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_config_vlan_mac(bp, &ramrod); bp 455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_mac_vlan_config_list(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_validate_vf_sp_objs(bp, vf, true)) bp 468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_mac_vlan_config(bp, vf, qid, bp 482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_mac_vlan_config(bp, vf, qid, bp 494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_queue_setup(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid, bp 501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_queue_create(bp, vf, qid, qctor); bp 506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_HYPERVISOR_VLAN, bp 514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_queue_flr(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_validate_vf_sp_objs(bp, vf, false)) { bp 524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, true, bp 528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, true, bp 532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, true, bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &qstate); bp 558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_config_mcast(bp, &mcast, BNX2X_MCAST_CMD_SET); bp 598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_config_mcast(bp, &mcast, BNX2X_MCAST_CMD_DEL); bp 608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_prep_rx_mode(struct bnx2x *bp, u8 qid, bp 618 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c ramrod->rx_mode_obj = &bp->rx_mode_obj; bp 629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c ramrod->rdata = bnx2x_vf_sp(bp, vf, rx_mode_rdata.e2); bp 630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c ramrod->rdata_mapping = bnx2x_vf_sp_map(bp, vf, rx_mode_rdata.e2); bp 633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_rxmode(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_prep_rx_mode(bp, qid, &ramrod, vf, accept_flags); bp 643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bnx2x_config_rx_mode(bp, &ramrod); bp 646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_queue_teardown(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid) bp 654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_rxmode(bp, vf, qid, 0); bp 659 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_validate_vf_sp_objs(bp, vf, true)) { bp 660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, bp 665 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, bp 670 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_vlan_mac_clear(bp, vf, qid, bp 675 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_mcast(bp, vf, NULL, 0, false); bp 682 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_queue_destroy(bp, vf, qid); bp 700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_enable_internal(struct bnx2x *bp, u8 enable) bp 702 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, PGLUE_B_REG_INTERNAL_VFID_ENABLE, enable ? 1 : 0); bp 706 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_semi_clear_err(struct bnx2x *bp, u8 abs_vfid) bp 708 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, TSEM_REG_VFPF_ERR_NUM, abs_vfid); bp 709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, USEM_REG_VFPF_ERR_NUM, abs_vfid); bp 710 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, CSEM_REG_VFPF_ERR_NUM, abs_vfid); bp 711 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, XSEM_REG_VFPF_ERR_NUM, abs_vfid); bp 714 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_pglue_clear_err(struct bnx2x *bp, u8 abs_vfid) bp 716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u32 was_err_group = (2 * BP_PATH(bp) + abs_vfid) >> 5; bp 733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, was_err_reg, 1 << (abs_vfid & 0x1f)); bp 736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_igu_reset(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf->abs_vfid)); bp 744 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_SB_INT_BEFORE_MASK_LSB, 0); bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_SB_INT_BEFORE_MASK_MSB, 0); bp 746 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_SB_MASK_LSB, 0); bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_SB_MASK_MSB, 0); bp 748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_PBA_STATUS_LSB, 0); bp 749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_PBA_STATUS_MSB, 0); bp 751 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c val = REG_RD(bp, IGU_REG_VF_CONFIGURATION); bp 754 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c val |= (BP_ABS_FUNC(bp) >> 1) << IGU_VF_CONF_PARENT_SHIFT; bp 755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_VF_CONFIGURATION, val); bp 761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_PROD_CONS_MEMORY + igu_sb_id * 4, 0); bp 771 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_igu_clear_sb_gen(bp, vf->abs_vfid, igu_sb_id, bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_igu_ack_sb(bp, vf, igu_sb_id, USTORM_ID, 0, bp 780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid) bp 783 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c storm_memset_vf_to_pf(bp, FW_VF_HANDLE(abs_vfid), BP_FUNC(bp)); bp 784 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c storm_memset_func_en(bp, FW_VF_HANDLE(abs_vfid), 1); bp 787 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_semi_clear_err(bp, abs_vfid); bp 788 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_pglue_clear_err(bp, abs_vfid); bp 791 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, abs_vfid)); bp 793 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_internal(bp, true); bp 794 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_enable_traffic(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 800 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_igu_reset(bp, vf); bp 803 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf->abs_vfid)); bp 804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, PBF_REG_DISABLE_VF, 0); bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 808 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static u8 bnx2x_vf_is_pcie_pending(struct bnx2x *bp, u8 abs_vfid) bp 811 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = bnx2x_vf_by_abs_fid(bp, abs_vfid); bp 822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_flr_clnup_epilog(struct bnx2x *bp, u8 abs_vfid) bp 825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_vf_is_pcie_pending(bp, abs_vfid)) bp 835 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_iov_static_resc(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 854 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_free_resc(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_iov_static_resc(bp, vf); bp 861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_flr_clnup_hw(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u32 poll_cnt = bnx2x_flr_clnup_poll_count(bp); bp 866 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf->abs_vfid)); bp 867 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_flr_clnup_poll_hw_counter(bp, DORQ_REG_VF_USAGE_CNT, bp 870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_send_final_clnup(bp, (u8)FW_VF_HANDLE(vf->abs_vfid), bp 878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_tx_hw_flushed(bp, poll_cnt); bp 881 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_flr(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_queue_flr(bp, vf, i); bp 897 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_mcast(bp, vf, NULL, 0, true); bp 900 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_flr_clnup_hw(bp, vf); bp 903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_free_resc(bp, vf); bp 908 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_mbx(bp, vf->abs_vfid); bp 915 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_flr_clnup(struct bnx2x *bp) bp 920 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for (i = 0; i < BNX2X_NR_VIRTFN(bp); i++) { bp 922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_vf(bp, i, state) != VF_RESET || bp 923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c !bnx2x_vf(bp, i, flr_clnup_stage)) bp 927 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c i, BNX2X_NR_VIRTFN(bp)); bp 929 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf = BP_VF(bp, i); bp 932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_lock_vf_pf_channel(bp, vf, CHANNEL_TLV_FLR); bp 935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_flr(bp, vf); bp 939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_unlock_vf_pf_channel(bp, vf, CHANNEL_TLV_FLR); bp 950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->flrd_vfs[0], bp->vfdb->flrd_vfs[1]); bp 952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c SHMEM2_WR(bp, drv_ack_vf_disabled[BP_FW_MB_IDX(bp)][i], bp 953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->flrd_vfs[i]); bp 955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_fw_command(bp, DRV_MSG_CODE_VF_DISABLED_DONE, 0); bp 961 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c SHMEM2_WR(bp, drv_ack_vf_disabled[BP_FW_MB_IDX(bp)][i], 0); bp 964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_handle_flr_event(struct bnx2x *bp) bp 970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->flrd_vfs[i] = SHMEM2_RD(bp, mcp_vf_disabled[i]); bp 974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->flrd_vfs[0], bp->vfdb->flrd_vfs[1]); bp 976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, i) { bp 977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, i); bp 981 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c reset = bp->vfdb->flrd_vfs[0] & (1 << vf->abs_vfid); bp 983 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c reset = bp->vfdb->flrd_vfs[1] & bp 998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_flr_clnup(bp); bp 1002 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_init_dq(struct bnx2x *bp) bp 1004 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1008 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_NORM_VF_BASE, 0); bp 1009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_MAX_RVFID_SIZE, ilog2(BNX2X_MAX_NUM_OF_VFS)); bp 1014 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_NORM_CID_BASE, BNX2X_FIRST_VF_CID); bp 1017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_NORM_CID_WND_SIZE, BNX2X_VF_CID_WND); bp 1022 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_NORM_CID_OFST, 3); bp 1028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_TYPE_MASK_0, 1); bp 1029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_TYPE_VALUE_0, 0); bp 1030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_TYPE_MIN_MCID_0, 0); bp 1031 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_TYPE_MAX_MCID_0, 0x1ffff); bp 1036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DORQ_REG_VF_USAGE_CT_LIMIT, 64); bp 1039 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_init_dmae(struct bnx2x *bp) bp 1041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (pci_find_ext_capability(bp->pdev, PCI_EXT_CAP_ID_SRIOV)) bp 1042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, DMAE_REG_BACKWARD_COMP_EN, 0); bp 1045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_domain(struct bnx2x *bp, int vfid) bp 1047 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1052 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_bus(struct bnx2x *bp, int vfid) bp 1054 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_sriov *iov = &bp->vfdb->sriov; bp 1061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_devfn(struct bnx2x *bp, int vfid) bp 1063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_sriov *iov = &bp->vfdb->sriov; bp 1069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_set_bars(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 1072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1073 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_sriov *iov = &bp->vfdb->sriov; bp 1086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_get_vf_igu_cam_info(struct bnx2x *bp) bp 1094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c val = REG_RD(bp, IGU_REG_MAPPING_MEMORY + sb_id * 4); bp 1100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c else if (current_pf == BP_FUNC(bp)) bp 1101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_set_igu_info(bp, sb_id, bp 1109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c DP(BNX2X_MSG_IOV, "vf_sbs_pool is %d\n", BP_VFDB(bp)->vf_sbs_pool); bp 1110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return BP_VFDB(bp)->vf_sbs_pool; bp 1113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void __bnx2x_iov_free_vfdb(struct bnx2x *bp) bp 1115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->vfdb) { bp 1116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c kfree(bp->vfdb->vfqs); bp 1117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c kfree(bp->vfdb->vfs); bp 1118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c kfree(bp->vfdb); bp 1120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb = NULL; bp 1123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_sriov_pci_cfg_info(struct bnx2x *bp, struct bnx2x_sriov *iov) bp 1126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_sriov_info(struct bnx2x *bp, struct bnx2x_sriov *iov) bp 1156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_sriov_pci_cfg_info(bp, iov)) bp 1163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c val = REG_RD(bp, PCICFG_OFFSET + GRC_CONFIG_REG_PF_INIT_VF); bp 1165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c * 8) - (BNX2X_MAX_NUM_OF_VFS * BP_PATH(bp)); bp 1169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_FUNC(bp), bp 1177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, bp 1182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct pci_dev *dev = bp->pdev; bp 1184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb = NULL; bp 1187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (IS_VF(bp)) bp 1195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (CHIP_IS_E1x(bp)) bp 1203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (BNX2X_L2_MAX_CID(bp) >= BNX2X_FIRST_VF_CID) { bp 1205 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_L2_MAX_CID(bp), BNX2X_FIRST_VF_CID); bp 1218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!pci_ari_enabled(bp->pdev->bus)) { bp 1224 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (CHIP_INT_MODE_IS_BC(bp)) { bp 1230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb = kzalloc(sizeof(*(bp->vfdb)), GFP_KERNEL); bp 1231 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bp->vfdb) { bp 1242 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c iov = &(bp->vfdb->sriov); bp 1243 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c err = bnx2x_sriov_info(bp, iov); bp 1257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->vfs = kcalloc(BNX2X_NR_VIRTFN(bp), bp 1260 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bp->vfdb->vfs) { bp 1267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, i) { bp 1268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf(bp, i, index) = i; bp 1269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf(bp, i, abs_vfid) = iov->first_vf_in_pf + i; bp 1270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf(bp, i, state) = VF_FREE; bp 1271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_init(&bnx2x_vf(bp, i, op_mutex)); bp 1272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf(bp, i, op_current) = CHANNEL_TLV_NONE; bp 1274 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf(bp, i, spoofchk) = 1; bp 1278 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_get_vf_igu_cam_info(bp)) { bp 1285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->vfqs = kcalloc(BNX2X_MAX_NUM_VF_QUEUES, bp 1289 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bp->vfdb->vfqs) { bp 1296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_init(&bp->vfdb->event_mutex); bp 1298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_init(&bp->vfdb->bulletin_mutex); bp 1300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (SHMEM2_HAS(bp, sriov_switch_mode)) bp 1301 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c SHMEM2_WR(bp, sriov_switch_mode, SRIOV_SWITCH_MODE_VEB); bp 1306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c __bnx2x_iov_free_vfdb(bp); bp 1310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_remove_one(struct bnx2x *bp) bp 1315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_disable_sriov(bp); bp 1321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for (vf_idx = 0; vf_idx < bp->vfdb->sriov.total; vf_idx++) { bp 1322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, bp 1323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c HW_VF_HANDLE(bp, bp 1324 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->sriov.first_vf_in_pf + bp 1327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->sriov.first_vf_in_pf + vf_idx); bp 1328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_internal(bp, 0); bp 1329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 1333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c __bnx2x_iov_free_vfdb(bp); bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_free_mem(struct bnx2x *bp) bp 1340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct hw_dma *cxt = &bp->vfdb->context[i]; bp 1349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_PCI_FREE(BP_VFDB(bp)->sp_dma.addr, bp 1350 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->sp_dma.mapping, bp 1351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->sp_dma.size); bp 1353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_PCI_FREE(BP_VF_MBX_DMA(bp)->addr, bp 1354 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX_DMA(bp)->mapping, bp 1355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX_DMA(bp)->size); bp 1357 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_PCI_FREE(BP_VF_BULLETIN_DMA(bp)->addr, bp 1358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_BULLETIN_DMA(bp)->mapping, bp 1359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_BULLETIN_DMA(bp)->size); bp 1362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_alloc_mem(struct bnx2x *bp) bp 1367 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c tot_size = (BP_VFDB(bp)->sriov.first_vf_in_pf + BNX2X_NR_VIRTFN(bp)) * bp 1375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct hw_dma *cxt = BP_VF_CXT_PAGE(bp, i); bp 1390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c tot_size = BNX2X_NR_VIRTFN(bp) * sizeof(struct bnx2x_vf_sp); bp 1391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->sp_dma.addr = BNX2X_PCI_ALLOC(&BP_VFDB(bp)->sp_dma.mapping, bp 1393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!BP_VFDB(bp)->sp_dma.addr) bp 1395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->sp_dma.size = tot_size; bp 1398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c tot_size = BNX2X_NR_VIRTFN(bp) * MBX_MSG_ALIGNED_SIZE; bp 1399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX_DMA(bp)->addr = BNX2X_PCI_ALLOC(&BP_VF_MBX_DMA(bp)->mapping, bp 1401 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!BP_VF_MBX_DMA(bp)->addr) bp 1404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX_DMA(bp)->size = tot_size; bp 1407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c tot_size = BNX2X_NR_VIRTFN(bp) * BULLETIN_CONTENT_SIZE; bp 1408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_BULLETIN_DMA(bp)->addr = BNX2X_PCI_ALLOC(&BP_VF_BULLETIN_DMA(bp)->mapping, bp 1410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!BP_VF_BULLETIN_DMA(bp)->addr) bp 1413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_BULLETIN_DMA(bp)->size = tot_size; bp 1421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vfq_init(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_init_queue_obj(bp, &q->sp_obj, bp 1434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_sp(bp, vf, q_data), bp 1435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_sp_map(bp, vf, q_data), bp 1446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_max_speed_cap(struct bnx2x *bp) bp 1448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u32 supported = bp->port.supported[bnx2x_get_link_cfg_idx(bp)]; bp 1457 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_link_update_vf(struct bnx2x *bp, int idx) bp 1459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_link_report_data *state = &bp->last_reported_link; bp 1466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_op_prep(bp, idx, &vf, &bulletin, false); bp 1470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_lock(&bp->vfdb->bulletin_mutex); bp 1496 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bulletin->link_speed = bnx2x_max_speed_cap(bp); bp 1508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_post_vf_bulletin(bp, idx); bp 1516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_unlock(&bp->vfdb->bulletin_mutex); bp 1522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(dev); bp 1523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, idx); bp 1533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bnx2x_iov_link_update_vf(bp, idx); bp 1536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_link_update(struct bnx2x *bp) bp 1540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vfid) bp 1544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_iov_link_update_vf(bp, vfid); bp 1548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_nic_init(struct bnx2x *bp) bp 1552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) { bp 1557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c DP(BNX2X_MSG_IOV, "num of vfs: %d\n", (bp)->vfdb->sriov.nr_virtfn); bp 1563 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vfid) { bp 1564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, vfid); bp 1566 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int base_vf_cid = (BP_VFDB(bp)->sriov.first_vf_in_pf + vfid) * bp 1570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_CXT_PAGE(bp, base_vf_cid/ILT_PAGE_CIDS)->addr + bp 1579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_iov_static_resc(bp, vf); bp 1583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf->sp_cl_id = bnx2x_fp(bp, 0, cl_id); bp 1595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_init_mcast_obj(bp, &vf->mcast_obj, 0xFF, bp 1597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_sp(bp, vf, mcast_rdata), bp 1598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_sp_map(bp, vf, mcast_rdata), bp 1604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX(bp, vfid)->msg = (struct bnx2x_vf_mbx_msg *) bp 1605 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c (((u8 *)BP_VF_MBX_DMA(bp)->addr) + vfid * bp 1608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_MBX(bp, vfid)->msg_mapping = BP_VF_MBX_DMA(bp)->mapping + bp 1612 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_mbx(bp, vf->abs_vfid); bp 1616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vfid) { bp 1617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, vfid); bp 1620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf->domain = bnx2x_vf_domain(bp, vfid); bp 1621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf->bus = bnx2x_vf_bus(bp, vfid); bp 1622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf->devfn = bnx2x_vf_devfn(bp, vfid); bp 1623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_set_bars(bp, vf); bp 1637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_chip_cleanup(struct bnx2x *bp) bp 1641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, i) bp 1646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_release(bp, BP_VF(bp, i)); bp 1652 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line) bp 1655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_ilt *ilt = BP_ILT(bp); bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct hw_dma *hw_cxt = BP_VF_CXT_PAGE(bp, i); bp 1671 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static u8 bnx2x_iov_is_vf_cid(struct bnx2x *bp, u16 cid) bp 1678 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_handle_classification_eqe(struct bnx2x *bp, bp 1691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = vfq->mac_obj.complete(bp, &vfq->mac_obj, elem, bp 1695 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = vfq->vlan_obj.complete(bp, &vfq->vlan_obj, elem, bp 1709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_handle_mcast_eqe(struct bnx2x *bp, bp 1720 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_config_mcast(bp, &rparam, BNX2X_MCAST_CMD_CONT); bp 1728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_handle_filters_eqe(struct bnx2x *bp, bp 1736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_handle_rss_update_eqe(struct bnx2x *bp, bp 1742 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem) bp 1749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_iov_is_vf_cid(bp, cid)) { bp 1797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf = bnx2x_vf_by_abs_fid(bp, abs_vfid); bp 1809 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vfq_get(vf, qidx)->sp_obj.complete_cmd(bp, bp 1817 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_handle_classification_eqe(bp, vfq_get(vf, qidx), elem); bp 1822 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_handle_mcast_eqe(bp, vf); bp 1827 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_handle_filters_eqe(bp, vf); bp 1832 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_handle_rss_update_eqe(bp, vf); bp 1845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static struct bnx2x_virtf *bnx2x_vf_by_cid(struct bnx2x *bp, int vf_cid) bp 1852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bnx2x_vf_by_abs_fid(bp, abs_vfid); bp 1855 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid, bp 1860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf = bnx2x_vf_by_cid(bp, vf_cid); bp 1877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_adjust_stats_req(struct bnx2x *bp) bp 1886 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 1889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!NO_FCOE(bp)) bp 1893 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c num_queues_req = BNX2X_NUM_ETH_QUEUES(bp) + is_fcoe; bp 1899 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_NUM_ETH_QUEUES(bp), is_fcoe, first_queue_query_index, bp 1902 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c cur_data_offset = bp->fw_stats_data_mapping + bp 1906 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c cur_query_entry = &bp->fw_stats_req-> bp 1909 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, i) { bp 1911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, i); bp 1936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_get_q_logical_state(bp, &rxq->sp_obj) == bp 1964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->fw_stats_req->hdr.cmd_num = bp->fw_stats_num + stats_count; bp 1968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_qtbl_set_q(struct bnx2x *bp, u8 abs_vfid, u8 qid, bp 1974 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, reg, val); bp 1977 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_clr_qtbl(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 1982 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_qtbl_set_q(bp, vf->abs_vfid, bp 1986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_vf_igu_disable(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 1991 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf->abs_vfid)); bp 1992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c val = REG_RD(bp, IGU_REG_VF_CONFIGURATION); bp 1995 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_VF_CONFIGURATION, val); bp 1996 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 1999 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u8 bnx2x_vf_max_queue_cnt(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 2006 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_chk_avail_resc(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2009 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u8 rxq_cnt = vf_rxq_count(vf) ? : bnx2x_vf_max_queue_cnt(bp, vf); bp 2010 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c u8 txq_cnt = vf_txq_count(vf) ? : bnx2x_vf_max_queue_cnt(bp, vf); bp 2020 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2023 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int base_vf_cid = (BP_VFDB(bp)->sriov.first_vf_in_pf + vf->index) * bp 2027 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VF_CXT_PAGE(bp, base_vf_cid/ILT_PAGE_CIDS)->addr + bp 2040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_vf_chk_avail_resc(bp, vf, resc)) { bp 2059 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_vf_chk_avail_resc(bp, vf, resc)) { bp 2068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf_rxq_count(vf) = resc->num_rxqs ? : bnx2x_vf_max_queue_cnt(bp, vf); bp 2069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf_txq_count(vf) = resc->num_txqs ? : bnx2x_vf_max_queue_cnt(bp, vf); bp 2099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vfq_init(bp, vf, q); bp 2105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf, dma_addr_t *sb_map) bp 2114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_init_sb(bp, (dma_addr_t)sb_map[i], vf->abs_vfid, true, bp 2128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_vf_flr_clnup_epilog(bp, vf->abs_vfid)) bp 2132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, IGU_REG_STATISTIC_NUM_MESSAGE_SENT + vf->abs_vfid * 4 , 0); bp 2135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c func_init.pf_id = BP_FUNC(bp); bp 2137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_func_init(bp, &func_init); bp 2140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_access(bp, vf->abs_vfid); bp 2141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_enable_traffic(bp, vf); bp 2145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_qtbl_set_q(bp, vf->abs_vfid, bp 2151 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_post_vf_bulletin(bp, vf->index); bp 2168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_close(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 2176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_queue_teardown(bp, vf, i); bp 2183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_igu_disable(bp, vf); bp 2187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_clr_qtbl(bp, vf); bp 2198 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_stats_safe_exec(bp, bnx2x_set_vf_state, &cookie); bp 2215 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 2228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_close(bp, vf); bp 2234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_free_resc(bp, vf); bp 2248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_rss_update(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bnx2x_config_rss(bp, rss); bp 2256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_tpa_update(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &qstate); bp 2295 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_release(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 2300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_lock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_RELEASE_VF); bp 2302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_free(bp, vf); bp 2307 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_unlock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_RELEASE_VF); bp 2311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_lock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2331 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_unlock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable) bp 2369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c prev_flags = bp->flags; bp 2371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->flags |= TX_SWITCHING; bp 2373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->flags &= ~TX_SWITCHING; bp 2374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (prev_flags == bp->flags) bp 2378 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if ((bp->state != BNX2X_STATE_OPEN) || bp 2379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c (bnx2x_get_q_logical_state(bp, bp 2380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bnx2x_sp_obj(bp, &bp->fp[0]).q_obj) != bp 2398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_eth_queue(bp, i) { bp 2399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 2403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c q_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; bp 2410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &q_params); bp 2424 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(pci_get_drvdata(dev)); bp 2426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) { bp 2432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c num_vfs_param, BNX2X_NR_VIRTFN(bp)); bp 2435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->state != BNX2X_STATE_OPEN) { bp 2441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (num_vfs_param > BNX2X_NR_VIRTFN(bp)) { bp 2443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c num_vfs_param, BNX2X_NR_VIRTFN(bp)); bp 2444 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c num_vfs_param = BNX2X_NR_VIRTFN(bp); bp 2447 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->requested_nr_virtfn = num_vfs_param; bp 2449 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_set_pf_tx_switching(bp, false); bp 2450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_disable_sriov(bp); bp 2453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bnx2x_enable_sriov(bp); bp 2459 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_enable_sriov(struct bnx2x *bp) bp 2461 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int rc = 0, req_vfs = bp->requested_nr_virtfn; bp 2469 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c first_vf = bp->vfdb->sriov.first_vf_in_pf; bp 2473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->vf_sbs_pool / req_vfs); bp 2477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, vf_idx); bp 2480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf_sb_count(BP_VF(bp, vf_idx)) = 0; bp 2482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vfdb->vf_sbs_pool = 0; bp 2485 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c sb_idx = BP_VFDB(bp)->first_vf_igu_entry; bp 2494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, address, igu_entry); bp 2501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_get_vf_igu_cam_info(bp); bp 2504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BP_VFDB(bp)->vf_sbs_pool, num_vf_queues); bp 2507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vf_idx) { bp 2508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x_virtf *vf = BP_VF(bp, vf_idx); bp 2511 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf->vfqs = &bp->vfdb->vfqs[qcount]; bp 2513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_iov_static_resc(bp, vf); bp 2521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx)); bp 2522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL, bp 2527 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bp 2533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_disable_sriov(bp); bp 2535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_set_pf_tx_switching(bp, true); bp 2539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = pci_enable_sriov(bp->pdev, req_vfs); bp 2548 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp) bp 2554 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vfidx) { bp 2555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bulletin = BP_VF_BULLETIN(bp, vfidx); bp 2557 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_set_vf_vlan(bp->dev, vfidx, bulletin->vlan, 0, bp 2562 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_disable_sriov(struct bnx2x *bp) bp 2564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (pci_vfs_assigned(bp->pdev)) { bp 2570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c pci_disable_sriov(bp->pdev); bp 2573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_vf_op_prep(struct bnx2x *bp, int vfidx, bp 2578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->state != BNX2X_STATE_OPEN) { bp 2583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) { bp 2588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (vfidx >= BNX2X_NR_VIRTFN(bp)) { bp 2590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vfidx, BNX2X_NR_VIRTFN(bp)); bp 2595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c *vf = BP_VF(bp, vfidx); bp 2596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c *bulletin = BP_VF_BULLETIN(bp, vfidx); bp 2621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(dev); bp 2629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_op_prep(bp, vfidx, &vf, &bulletin, true); bp 2648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_validate_vf_sp_objs(bp, vf, false)) { bp 2649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mac_obj->get_n_elements(bp, mac_obj, 1, (u8 *)&ivi->mac, bp 2651 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vlan_obj->get_n_elements(bp, vlan_obj, 1, bp 2656 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_lock(&bp->vfdb->bulletin_mutex); bp 2673 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_unlock(&bp->vfdb->bulletin_mutex); bp 2698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(dev); bp 2709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_op_prep(bp, vfidx, &vf, &bulletin, true); bp 2713 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_lock(&bp->vfdb->bulletin_mutex); bp 2722 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_post_vf_bulletin(bp, vfidx); bp 2725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_unlock(&bp->vfdb->bulletin_mutex); bp 2733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_get_q_logical_state(bp, &bnx2x_leading_vfq(vf, sp_obj)); bp 2741 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_validate_vf_sp_objs(bp, vf, true)) bp 2745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_lock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_SET_MAC); bp 2749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_del_all_macs(bp, mac_obj, BNX2X_ETH_MAC, true); bp 2757 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_del_all_macs(bp, mac_obj, BNX2X_UC_LIST_MAC, true); bp 2766 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_set_mac_one(bp, (u8 *)&bulletin->mac, mac_obj, true, bp 2770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_unlock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_SET_MAC); bp 2776 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static void bnx2x_set_vf_vlan_acceptance(struct bnx2x *bp, bp 2789 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_prep_rx_mode(bp, LEADING_IDX, &rx_ramrod, vf, bp 2792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_config_rx_mode(bp, &rx_ramrod); bp 2795 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c static int bnx2x_set_vf_vlan_filter(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_config_vlan_mac(bp, &ramrod_param); bp 2823 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(dev); bp 2842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_vf_op_prep(bp, vfidx, &vf, &bulletin, true); bp 2852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_lock(&bp->vfdb->bulletin_mutex); bp 2861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_post_vf_bulletin(bp, vfidx); bp 2864 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_unlock(&bp->vfdb->bulletin_mutex); bp 2868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_get_q_logical_state(bp, &bnx2x_leading_vfq(vf, sp_obj)) != bp 2873 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_validate_vf_sp_objs(bp, vf, true)) bp 2877 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_lock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_SET_VLAN); bp 2882 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = vlan_obj->delete_all(bp, vlan_obj, &vlan_mac_flags, bp 2894 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_set_vf_vlan_acceptance(bp, vf, !vlan); bp 2896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_set_vf_vlan_filter(bp, vf, vlan, true); bp 2910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_get_q_logical_state(bp, q_params.q_obj) != bp 2945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &q_params); bp 2953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_unlock_vf_pf_channel(bp, vf, CHANNEL_TLV_PF_SET_VLAN); bp 2965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = netdev_priv(dev); bp 2969 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c vf = BP_VF(bp, idx); bp 2984 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_get_q_logical_state(bp, &bnx2x_leading_vfq(vf, sp_obj)) != bp 2989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bnx2x_validate_vf_sp_objs(bp, vf, true)) bp 3000 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bnx2x_get_q_logical_state(bp, q_params.q_obj) != bp 3018 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c rc = bnx2x_queue_state_change(bp, &q_params); bp 3048 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp) bp 3060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c memcpy(&bp->shadow_bulletin, bp->pf2vf_bulletin, bp 3063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c crc = bnx2x_crc_vf_bulletin(&bp->shadow_bulletin.content); bp 3065 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->shadow_bulletin.content.crc == crc) bp 3069 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->shadow_bulletin.content.crc, crc); bp 3077 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bulletin = &bp->shadow_bulletin.content; bp 3080 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->old_bulletin.version == bulletin->version) bp 3085 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c !ether_addr_equal(bulletin->mac, bp->old_bulletin.mac)) { bp 3087 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c memcpy(bp->dev->dev_addr, bulletin->mac, ETH_ALEN); bp 3094 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vf_link_vars.line_speed = bulletin->link_speed; bp 3095 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vf_link_vars.link_report_flags = 0; bp 3099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->vf_link_vars.link_report_flags); bp 3103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->vf_link_vars.link_report_flags); bp 3107 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->vf_link_vars.link_report_flags); bp 3111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->vf_link_vars.link_report_flags); bp 3112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c __bnx2x_link_report(bp); bp 3116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c memcpy(&bp->old_bulletin, bulletin, bp 3122 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_timer_sriov(struct bnx2x *bp) bp 3124 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_sample_bulletin(bp); bp 3127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) bp 3128 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_VFPF_CHANNEL_DOWN, bp 3132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) bp 3135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c return bp->regview + PXP_VF_ADDR_DB_START; bp 3138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_vf_pci_dealloc(struct bnx2x *bp) bp 3140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_PCI_FREE(bp->vf2pf_mbox, bp->vf2pf_mbox_mapping, bp 3142 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c BNX2X_PCI_FREE(bp->pf2vf_bulletin, bp->pf2vf_bulletin_mapping, bp 3146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c int bnx2x_vf_pci_alloc(struct bnx2x *bp) bp 3148 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c mutex_init(&bp->vf2pf_mutex); bp 3151 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->vf2pf_mbox = BNX2X_PCI_ALLOC(&bp->vf2pf_mbox_mapping, bp 3153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bp->vf2pf_mbox) bp 3157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bp->pf2vf_bulletin = BNX2X_PCI_ALLOC(&bp->pf2vf_bulletin_mapping, bp 3159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!bp->pf2vf_bulletin) bp 3162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_bulletin_finalize(&bp->pf2vf_bulletin->content, true); bp 3167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_pci_dealloc(bp); bp 3171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_iov_channel_down(struct bnx2x *bp) bp 3176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!IS_SRIOV(bp)) bp 3179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c for_each_vf(bp, vf_idx) { bp 3183 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bulletin = BP_VF_BULLETIN(bp, vf_idx); bp 3187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_post_vf_bulletin(bp, vf_idx); bp 3193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c struct bnx2x *bp = container_of(work, struct bnx2x, iov_task.work); bp 3195 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c if (!netif_running(bp->dev)) bp 3199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->iov_task_state)) bp 3200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_handle_flr_event(bp); bp 3203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c &bp->iov_task_state)) bp 3204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c bnx2x_vf_mbx(bp); bp 3207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag) bp 3210 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c set_bit(flag, &bp->iov_task_state); bp 3213 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c queue_delayed_work(bnx2x_iov_wq, &bp->iov_task, 0); bp 219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BNX2X_NR_VIRTFN(bp) ((bp)->vfdb->sriov.nr_virtfn) bp 221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define for_each_vf(bp, var) \ bp 222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h for ((var) = 0; (var) < BNX2X_NR_VIRTFN(bp); (var)++) bp 232 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define HW_VF_HANDLE(bp, abs_vfid) \ bp 233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h (u16)(BP_ABS_FUNC((bp)) | (1<<3) | ((u16)(abs_vfid) << 4)) bp 240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define GET_NUM_VFS_PER_PATH(bp) 64 /* use max possible value */ bp 241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define GET_NUM_VFS_PER_PF(bp) ((bp)->vfdb ? (bp)->vfdb->sriov.total \ bp 247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_lock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_unlock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 318 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VFDB(bp) ((bp)->vfdb) bp 321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF(bp, idx) ((BP_VFDB(bp) && (bp)->vfdb->vfs) ? \ bp 322 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h &((bp)->vfdb->vfs[idx]) : NULL) bp 323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define bnx2x_vf(bp, idx, var) ((bp)->vfdb->vfs[idx].var) bp 330 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF_CXT_PAGE(bp, i) (&(bp)->vfdb->context[i]) bp 335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF_MBX_DMA(bp) (&((bp)->vfdb->mbx_dma)) bp 337 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF_MBX(bp, vfid) (&((bp)->vfdb->mbxs[vfid])) bp 340 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF_BULLETIN_DMA(bp) (&((bp)->vfdb->bulletin_dma)) bp 341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define BP_VF_BULLETIN(bp, vf) \ bp 342 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h (((struct pf_vf_bulletin_content *)(BP_VF_BULLETIN_DMA(bp)->addr)) \ bp 346 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define bnx2x_vf_sp(bp, vf, field) ((bp)->vfdb->sp_dma.addr + \ bp 349 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define bnx2x_vf_sp_map(bp, vf, field) ((bp)->vfdb->sp_dma.mapping + \ bp 404 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line); bp 405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, int num_vfs_param); bp 406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_remove_one(struct bnx2x *bp); bp 407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_free_mem(struct bnx2x *bp); bp 408 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_alloc_mem(struct bnx2x *bp); bp 409 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_nic_init(struct bnx2x *bp); bp 410 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_chip_cleanup(struct bnx2x *bp); bp 411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_init_dq(struct bnx2x *bp); bp 412 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_init_dmae(struct bnx2x *bp); bp 413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid, bp 415 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem); bp 416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_adjust_stats_req(struct bnx2x *bp); bp 417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_storm_stats_update(struct bnx2x *bp); bp 419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_mbx(struct bnx2x *bp); bp 420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_mbx_schedule(struct bnx2x *bp, bp 422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_enable_mbx(struct bnx2x *bp, u8 abs_vfid); bp 428 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 431 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 435 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vfop_qctor_dump_tx(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vfop_qctor_dump_rx(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vfop_qctor_prep(struct bnx2x *bp, bp 451 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_mac_vlan_config_list(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_queue_setup(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid, bp 458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_queue_teardown(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid); bp 460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_rxmode(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 466 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_close(struct bnx2x *bp, struct bnx2x_virtf *vf); bp 468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf); bp 470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_rss_update(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 473 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_tpa_update(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 482 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_release(struct bnx2x *bp, struct bnx2x_virtf *vf); bp 483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_idx_by_abs_fid(struct bnx2x *bp, u16 abs_vfid); bp 484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h u8 bnx2x_vf_max_queue_cnt(struct bnx2x *bp, struct bnx2x_virtf *vf); bp 489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_flr_clnup_epilog(struct bnx2x *bp, u8 abs_vfid); bp 490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid); bp 493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_handle_flr_event(struct bnx2x *bp); bp 498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_post_vf_bulletin(struct bnx2x *bp, int vf); bp 502 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); bp 505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_acquire(struct bnx2x *bp, u8 tx_count, u8 rx_count); bp 506 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_release(struct bnx2x *bp); bp 507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_release(struct bnx2x *bp); bp 508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_init(struct bnx2x *bp); bp 509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vfpf_close_vf(struct bnx2x *bp); bp 510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set); bp 513 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_config_rss(struct bnx2x *bp, bp 516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp); bp 518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_fill_fw_str(struct bnx2x *bp, char *buf, bp 521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h strlcpy(buf, bp->acquire_resp.pfdev_info.fw_ver, buf_len); bp 524 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp, bp 528 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h bp->acquire_resp.resc.hw_qid[fp->index] * bp 532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp); bp 533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_timer_sriov(struct bnx2x *bp); bp 534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp); bp 535 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_vf_pci_dealloc(struct bnx2x *bp); bp 536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vf_pci_alloc(struct bnx2x *bp); bp 537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_enable_sriov(struct bnx2x *bp); bp 538 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_disable_sriov(struct bnx2x *bp); bp 539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vf_headroom(struct bnx2x *bp) bp 541 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h return bp->vfdb->sriov.nr_virtfn * BNX2X_CIDS_PER_VF; bp 543 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp); bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_channel_down(struct bnx2x *bp); bp 549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag); bp 551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h void bnx2x_iov_link_update(struct bnx2x *bp); bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_iov_link_update_vf(struct bnx2x *bp, int idx); bp 556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h int bnx2x_vfpf_update_vlan(struct bnx2x *bp, u16 vid, u8 vf_qid, bool add); bp 559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define GET_NUM_VFS_PER_PATH(bp) 0 bp 560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h #define GET_NUM_VFS_PER_PF(bp) 0 bp 564 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid, bp 566 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_handle_flr_event(struct bnx2x *bp) {} bp 567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_eq_sp_event(struct bnx2x *bp, bp 569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_mbx(struct bnx2x *bp) {} bp 570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_mbx_schedule(struct bnx2x *bp, bp 572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line) {return line; } bp 573 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_init_dq(struct bnx2x *bp) {} bp 574 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_alloc_mem(struct bnx2x *bp) {return 0; } bp 575 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_free_mem(struct bnx2x *bp) {} bp 576 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_chip_cleanup(struct bnx2x *bp) {return 0; } bp 577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_init_dmae(struct bnx2x *bp) {} bp 578 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param, bp 580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_remove_one(struct bnx2x *bp) {} bp 581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_enable_sriov(struct bnx2x *bp) {return 0; } bp 582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_disable_sriov(struct bnx2x *bp) {} bp 583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_acquire(struct bnx2x *bp, bp 585 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_release(struct bnx2x *bp) {return 0; } bp 586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_init(struct bnx2x *bp) {return 0; } bp 587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vfpf_close_vf(struct bnx2x *bp) {} bp 588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bool is_leading) {return 0; } bp 589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, bp 591 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_config_rss(struct bnx2x *bp, bp 594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp) {return 0; } bp 595 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_nic_init(struct bnx2x *bp) {return 0; } bp 596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vf_headroom(struct bnx2x *bp) {return 0; } bp 597 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_adjust_stats_req(struct bnx2x *bp) {} bp 598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_fill_fw_str(struct bnx2x *bp, char *buf, bp 600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vf_ustorm_prods_offset(struct bnx2x *bp, bp 602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp) bp 606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_timer_sriov(struct bnx2x *bp) {} bp 608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp) bp 613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_vf_pci_dealloc(struct bnx2x *bp) {} bp 614 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vf_pci_alloc(struct bnx2x *bp) {return 0; } bp 615 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp) {} bp 617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_channel_down(struct bnx2x *bp) {} bp 620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag) {} bp 621 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline void bnx2x_iov_link_update(struct bnx2x *bp) {} bp 622 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_iov_link_update_vf(struct bnx2x *bp, int idx) {return 0; } bp 630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h static inline int bnx2x_vfpf_update_vlan(struct bnx2x *bp, u16 vid, u8 vf_qid, bool add) {return 0; } bp 44 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static inline u16 bnx2x_get_port_stats_dma_len(struct bnx2x *bp) bp 49 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (SHMEM2_HAS(bp, sizeof_port_stats)) { bp 50 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 size = SHMEM2_RD(bp, sizeof_port_stats); bp 66 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->flags & BC_SUPPORTS_PFC_STATS) { bp 84 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_dp_stats(struct bnx2x *bp) bp 96 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.cmd_num, bp 97 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.reserved0, bp 98 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.drv_stats_counter, bp 99 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.reserved1, bp 100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.stats_counters_addrs.hi, bp 101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.stats_counters_addrs.lo); bp 103 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for (i = 0; i < bp->fw_stats_req->hdr.cmd_num; i++) { bp 111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c i, bp->fw_stats_req->query[i].kind, bp 112 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->query[i].index, bp 113 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->query[i].funcID, bp 114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->query[i].reserved, bp 115 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->query[i].address.hi, bp 116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->query[i].address.lo); bp 126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_storm_stats_post(struct bnx2x *bp) bp 130 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_pending) bp 133 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->fw_stats_req->hdr.drv_stats_counter = bp 134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cpu_to_le16(bp->stats_counter++); bp 137 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c le16_to_cpu(bp->fw_stats_req->hdr.drv_stats_counter)); bp 140 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_iov_adjust_stats_req(bp); bp 141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_dp_stats(bp); bp 144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c rc = bnx2x_sp_post(bp, RAMROD_CMD_ID_COMMON_STAT_QUERY, 0, bp 145 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_HI(bp->fw_stats_req_mapping), bp 146 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_LO(bp->fw_stats_req_mapping), bp 149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_pending = 1; bp 152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_hw_stats_post(struct bnx2x *bp) bp 154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct dmae_command *dmae = &bp->stats_dmae; bp 155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (CHIP_REV_IS_SLOW(bp)) bp 162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) bp 163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats, bp 164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c sizeof(bp->func_stats)); bp 167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->executer_idx) { bp 168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int loader_idx = PMF_DMAE_C(bp); bp 169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, bp 175 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, dmae[0])); bp 176 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, dmae[0])); bp 182 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (CHIP_IS_E1(bp)) bp 189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_post_dmae(bp, dmae, loader_idx); bp 191 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c } else if (bp->func_stx) { bp 193 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_issue_dmae_with_comp(bp, dmae, stats_comp); bp 197 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_comp(struct bnx2x *bp) bp 199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_pmf_update(struct bnx2x *bp) bp 222 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int loader_idx = PMF_DMAE_C(bp); bp 223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!bp->port.pmf || !bp->port.port_stx) { bp 231 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 233 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, false, 0); bp 235 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 237 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = bp->port.port_stx >> 2; bp 239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); bp 240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); bp 246 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = (bp->port.port_stx >> 2) + DMAE_LEN32_RD_MAX; bp 250 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats) + bp 252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats) + bp 254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->len = bnx2x_get_port_stats_dma_len(bp) - DMAE_LEN32_RD_MAX; bp 256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 257 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 261 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_port_stats_init(struct bnx2x *bp) bp 268 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int port = BP_PORT(bp); bp 270 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int loader_idx = PMF_DMAE_C(bp); bp 272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!bp->link_vars.link_up || !bp->port.pmf) { bp 280 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, bp 286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.port_stx) { bp 288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); bp 291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); bp 292 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->port.port_stx >> 2; bp 294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->len = bnx2x_get_port_stats_dma_len(bp); bp 300 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) { bp 302 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); bp 305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); bp 306 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->func_stx >> 2; bp 315 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, bp 319 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->link_vars.mac_type == MAC_TYPE_EMAC) { bp 323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); bp 329 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); bp 336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + bp 343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + bp 351 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 356 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + bp 358 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + bp 369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c switch (bp->link_vars.mac_type) { bp 376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (CHIP_IS_E1x(bp)) { bp 405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c tx_len = sizeof(bp->slowpath-> bp 407 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c rx_len = sizeof(bp->slowpath-> bp 413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); bp 419 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); bp 425 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 430 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_LO(bnx2x_sp_mapping(bp, mac_stats) + (tx_len << 2)); bp 432 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_HI(bnx2x_sp_mapping(bp, mac_stats) + (tx_len << 2)); bp 440 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!CHIP_IS_E3(bp)) { bp 441 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + bp 448 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + bp 455 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 460 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + bp 462 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + bp 470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 471 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, bp 476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats)); bp 477 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats)); bp 480 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_func_stats_init(struct bnx2x *bp) bp 489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct dmae_command *dmae = &bp->stats_dmae; bp 490 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 493 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!bp->func_stx) { bp 498 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 501 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, bp 503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); bp 504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); bp 505 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->func_stx >> 2; bp 508 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 509 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 516 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_start(struct bnx2x *bp) bp 518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_PF(bp)) { bp 519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf) bp 520 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_port_stats_init(bp); bp 522 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c else if (bp->func_stx) bp 523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_func_stats_init(bp); bp 525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 526 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_storm_stats_post(bp); bp 530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_pmf_start(struct bnx2x *bp) bp 532 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 533 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_pmf_update(bp); bp 534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_start(bp); bp 537 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_restart(struct bnx2x *bp) bp 542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_VF(bp)) bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_start(bp); bp 549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_bmac_stats_update(struct bnx2x *bp) bp 551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct host_port_stats *pstats = bnx2x_sp(bp, port_stats); bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (CHIP_IS_E1x(bp)) { bp 559 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bmac1_stats *new = bnx2x_sp(bp, mac_stats.bmac1_stats); bp 594 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bmac2_stats *new = bnx2x_sp(bp, mac_stats.bmac2_stats); bp 655 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_mstat_stats_update(struct bnx2x *bp) bp 657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct host_port_stats *pstats = bnx2x_sp(bp, port_stats); bp 658 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct mstat_stats *new = bnx2x_sp(bp, mac_stats.mstat_stats); bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_emac_stats_update(struct bnx2x *bp) bp 747 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct emac_stats *new = bnx2x_sp(bp, mac_stats.emac_stats); bp 748 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct host_port_stats *pstats = bnx2x_sp(bp, port_stats); bp 749 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static int bnx2x_hw_stats_update(struct bnx2x *bp) bp 804 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct nig_stats *new = bnx2x_sp(bp, nig_stats); bp 805 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct nig_stats *old = &(bp->port.old_nig_stats); bp 806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct host_port_stats *pstats = bnx2x_sp(bp, port_stats); bp 807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 813 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c switch (bp->link_vars.mac_type) { bp 815 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_bmac_stats_update(bp); bp 819 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_emac_stats_update(bp); bp 824 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_mstat_stats_update(bp); bp 841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!CHIP_IS_E3(bp)) { bp 857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (CHIP_IS_E3(bp)) { bp 858 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 lpi_reg = BP_PORT(bp) ? MISC_REG_CPMU_LP_SM_ENT_CNT_P1 bp 860 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c estats->eee_tx_lpi += REG_RD(bp, lpi_reg); bp 863 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!BP_NOMCP(bp)) { bp 865 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c SHMEM_RD(bp, port_mb[BP_PORT(bp)].stat_nig_timer); bp 876 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static int bnx2x_storm_stats_validate_counters(struct bnx2x *bp) bp 878 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct stats_counter *counters = &bp->fw_stats_data->storm_counters; bp 883 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_stats_counter = bp->stats_counter - 1; bp 889 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c le16_to_cpu(counters->xstats_counter), bp->stats_counter); bp 896 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c le16_to_cpu(counters->ustats_counter), bp->stats_counter); bp 903 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c le16_to_cpu(counters->cstats_counter), bp->stats_counter); bp 910 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c le16_to_cpu(counters->tstats_counter), bp->stats_counter); bp 916 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static int bnx2x_storm_stats_update(struct bnx2x *bp) bp 919 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->port.tstorm_port_statistics; bp 921 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->pf.tstorm_pf_statistics; bp 922 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct host_func_stats *fstats = &bp->func_stats; bp 923 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats_old *estats_old = &bp->eth_stats_old; bp 928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_PF(bp) && bnx2x_storm_stats_validate_counters(bp)) bp 934 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_eth_queue(bp, i) { bp 935 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->queue_stats[i]. bp 940 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->old_tclient; bp 942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->queue_stats[i]. bp 945 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->old_uclient; bp 947 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->queue_stats[i]. bp 950 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->old_xclient; bp 952 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->eth_q_stats; bp 954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->eth_q_stats_old; bp 1099 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf) { bp 1100 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_fw_port_stats_old *fwstats = &bp->fw_stats_old; bp 1109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_pending = 0; bp 1114 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_net_stats_update(struct bnx2x *bp) bp 1116 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 1117 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct net_device_stats *nstats = &bp->dev->stats; bp 1136 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_rx_queue(bp, i) { bp 1138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fp_stats[i].old_tclient; bp 1141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c nstats->rx_dropped = tmp + bp->net_stats_old.rx_dropped; bp 1184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_drv_stats_update(struct bnx2x *bp) bp 1186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 1189 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_queue(bp, i) { bp 1190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_q_stats *qstats = &bp->fp_stats[i].eth_q_stats; bp 1192 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fp_stats[i].eth_q_stats_old; bp 1202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static bool bnx2x_edebug_stats_stopped(struct bnx2x *bp) bp 1206 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (SHMEM2_HAS(bp, edebug_driver_if[1])) { bp 1207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c val = SHMEM2_RD(bp, edebug_driver_if[1]); bp 1216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_update(struct bnx2x *bp) bp 1218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 1220 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bnx2x_edebug_stats_stopped(bp)) bp 1223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_PF(bp)) { bp 1227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf) bp 1228 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_update(bp); bp 1230 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bnx2x_storm_stats_update(bp)) { bp 1231 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_pending++ == 3) { bp 1241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_storm_stats_update(bp); bp 1244 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_net_stats_update(bp); bp 1245 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_drv_stats_update(bp); bp 1248 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_VF(bp)) bp 1251 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (netif_msg_timer(bp)) { bp 1252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 1254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c netdev_dbg(bp->dev, "brb drops %u brb truncate %u\n", bp 1258 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 1259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_storm_stats_post(bp); bp 1262 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_port_stats_stop(struct bnx2x *bp) bp 1266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int loader_idx = PMF_DMAE_C(bp); bp 1267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 1269 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 1271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, false, 0); bp 1273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.port_stx) { bp 1275 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 1276 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) bp 1283 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); bp 1284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); bp 1285 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->port.port_stx >> 2; bp 1287 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->len = bnx2x_get_port_stats_dma_len(bp); bp 1288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) { bp 1294 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 1296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 1303 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) { bp 1305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 1308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); bp 1309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); bp 1310 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->func_stx >> 2; bp 1313 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 1314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 1321 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_stop(struct bnx2x *bp) bp 1325 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 1327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf) bp 1328 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c update = (bnx2x_hw_stats_update(bp) == 0); bp 1330 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c update |= (bnx2x_storm_stats_update(bp) == 0); bp 1333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_net_stats_update(bp); bp 1335 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf) bp 1336 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_port_stats_stop(bp); bp 1338 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 1339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 1343 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_stats_do_nothing(struct bnx2x *bp) bp 1348 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void (*action)(struct bnx2x *bp); bp 1366 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event) bp 1368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c enum bnx2x_stats_state state = bp->stats_state; bp 1370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (unlikely(bp->panic)) bp 1377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (down_trylock(&bp->stats_lock)) { bp 1383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (unlikely(down_timeout(&bp->stats_lock, HZ / 10))) { bp 1390 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_stm[state][event].action(bp); bp 1391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_state = bnx2x_stats_stm[state][event].next_state; bp 1393 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c up(&bp->stats_lock); bp 1395 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if ((event != STATS_EVENT_UPDATE) || netif_msg_timer(bp)) bp 1397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c state, event, bp->stats_state); bp 1400 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_port_stats_base_init(struct bnx2x *bp) bp 1403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c u32 *stats_comp = bnx2x_sp(bp, stats_comp); bp 1406 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!bp->port.pmf || !bp->port.port_stx) { bp 1411 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 1413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); bp 1414 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, bp 1416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); bp 1417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); bp 1418 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->dst_addr_lo = bp->port.port_stx >> 2; bp 1420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->len = bnx2x_get_port_stats_dma_len(bp); bp 1421 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); bp 1422 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); bp 1426 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 1427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 1434 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c static void bnx2x_prep_fw_stats_req(struct bnx2x *bp) bp 1438 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct stats_query_header *stats_hdr = &bp->fw_stats_req->hdr; bp 1443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c stats_hdr->cmd_num = bp->fw_stats_num; bp 1452 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_data_offset = bp->fw_stats_data_mapping + bp 1463 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->fw_stats_data->storm_counters, 0xff, bp 1467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_data_offset = bp->fw_stats_data_mapping + bp 1470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry = &bp->fw_stats_req->query[BNX2X_PORT_QUERY_IDX]; bp 1474 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->index = BP_PORT(bp); bp 1476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->funcID = cpu_to_le16(BP_FUNC(bp)); bp 1481 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_data_offset = bp->fw_stats_data_mapping + bp 1484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry = &bp->fw_stats_req->query[BNX2X_PF_QUERY_IDX]; bp 1488 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->index = BP_PORT(bp); bp 1489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->funcID = cpu_to_le16(BP_FUNC(bp)); bp 1494 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!NO_FCOE(bp)) { bp 1495 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_data_offset = bp->fw_stats_data_mapping + bp 1499 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_req->query[BNX2X_FCOE_QUERY_IDX]; bp 1503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->index = BP_PORT(bp); bp 1504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->funcID = cpu_to_le16(BP_FUNC(bp)); bp 1512 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_data_offset = bp->fw_stats_data_mapping + bp 1518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!NO_FCOE(bp)) bp 1523 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_eth_queue(bp, i) { bp 1525 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_req-> bp 1529 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->index = bnx2x_stats_id(&bp->fp[i]); bp 1530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->funcID = cpu_to_le16(BP_FUNC(bp)); bp 1540 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!NO_FCOE(bp)) { bp 1542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_req-> bp 1546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->index = bnx2x_stats_id(&bp->fp[FCOE_IDX(bp)]); bp 1547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c cur_query_entry->funcID = cpu_to_le16(BP_FUNC(bp)); bp 1555 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void bnx2x_memset_stats(struct bnx2x *bp) bp 1560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_queue(bp, i) { bp 1561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_fp_stats *fp_stats = &bp->fp_stats[i]; bp 1569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_init) { bp 1577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->dev->stats, 0, sizeof(bp->dev->stats)); bp 1579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_init) { bp 1580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->net_stats_old, 0, sizeof(bp->net_stats_old)); bp 1581 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->fw_stats_old, 0, sizeof(bp->fw_stats_old)); bp 1582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->eth_stats_old, 0, sizeof(bp->eth_stats_old)); bp 1583 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->eth_stats, 0, sizeof(bp->eth_stats)); bp 1584 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&bp->func_stats, 0, sizeof(bp->func_stats)); bp 1587 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_state = STATS_STATE_DISABLED; bp 1589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf && bp->port.port_stx) bp 1590 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_port_stats_base_init(bp); bp 1593 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_init = false; bp 1596 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void bnx2x_stats_init(struct bnx2x *bp) bp 1598 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int /*abs*/port = BP_PORT(bp); bp 1599 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int mb_idx = BP_FW_MB_IDX(bp); bp 1601 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (IS_VF(bp)) { bp 1602 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_memset_stats(bp); bp 1606 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_pending = 0; bp 1607 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->executer_idx = 0; bp 1608 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->stats_counter = 0; bp 1611 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!BP_NOMCP(bp)) { bp 1612 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->port.port_stx = SHMEM_RD(bp, port_mb[port].port_stx); bp 1613 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->func_stx = SHMEM_RD(bp, func_mb[mb_idx].fw_mb_param); bp 1616 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->port.port_stx = 0; bp 1617 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->func_stx = 0; bp 1620 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->port.port_stx, bp->func_stx); bp 1623 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!bp->stats_init && bp->port.pmf && bp->port.port_stx) bp 1624 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_handle(bp, STATS_EVENT_PMF); bp 1626 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c port = BP_PORT(bp); bp 1628 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(&(bp->port.old_nig_stats), 0, sizeof(struct nig_stats)); bp 1629 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->port.old_nig_stats.brb_discard = bp 1630 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c REG_RD(bp, NIG_REG_STAT0_BRB_DISCARD + port*0x38); bp 1631 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->port.old_nig_stats.brb_truncate = bp 1632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c REG_RD(bp, NIG_REG_STAT0_BRB_TRUNCATE + port*0x38); bp 1633 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!CHIP_IS_E3(bp)) { bp 1634 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c REG_RD_DMAE(bp, NIG_REG_STAT0_EGRESS_MAC_PKT0 + port*0x50, bp 1635 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &(bp->port.old_nig_stats.egress_mac_pkt0_lo), 2); bp 1636 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c REG_RD_DMAE(bp, NIG_REG_STAT0_EGRESS_MAC_PKT1 + port*0x50, bp 1637 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &(bp->port.old_nig_stats.egress_mac_pkt1_lo), 2); bp 1641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_prep_fw_stats_req(bp); bp 1644 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_init) { bp 1645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->func_stx) { bp 1646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c memset(bnx2x_sp(bp, func_stats), 0, bp 1648 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_func_stats_init(bp); bp 1649 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_hw_stats_post(bp); bp 1650 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 1654 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_memset_stats(bp); bp 1657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void bnx2x_save_statistics(struct bnx2x *bp) bp 1660 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct net_device_stats *nstats = &bp->dev->stats; bp 1663 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_eth_queue(bp, i) { bp 1664 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_fastpath *fp = &bp->fp[i]; bp 1666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->eth_q_stats; bp 1668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bnx2x_fp_stats(bp, fp)->eth_q_stats_old; bp 1687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bp->net_stats_old.rx_dropped = nstats->rx_dropped; bp 1690 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->port.pmf && IS_MF(bp)) { bp 1691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 1692 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_fw_port_stats_old *fwstats = &bp->fw_stats_old; bp 1700 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c void bnx2x_afex_collect_stats(struct bnx2x *bp, void *void_afex_stats, bp 1705 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_stats *estats = &bp->eth_stats; bp 1707 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->queue_stats[FCOE_IDX(bp)]; bp 1719 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c &bp->fw_stats_data->fcoe; bp 1723 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c for_each_eth_queue(bp, i) { bp 1724 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c struct bnx2x_eth_q_stats *qstats = &bp->fp_stats[i].eth_q_stats; bp 1818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (!NO_FCOE(bp)) { bp 1954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if ((bp->port.pmf) && (stats_type == VICSTATST_UIF_INDEX)) { bp 1970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c int bnx2x_stats_safe_exec(struct bnx2x *bp, bp 1979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c rc = down_timeout(&bp->stats_lock, HZ / 10); bp 1985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c bnx2x_stats_comp(bp); bp 1986 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c while (bp->stats_pending && cnt--) bp 1987 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bnx2x_storm_stats_update(bp)) bp 1989 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c if (bp->stats_pending) { bp 2001 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c up(&bp->stats_lock); bp 544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h void bnx2x_memset_stats(struct bnx2x *bp); bp 545 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h void bnx2x_stats_init(struct bnx2x *bp); bp 546 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h void bnx2x_stats_handle(struct bnx2x *bp, enum bnx2x_stats_event event); bp 547 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h int bnx2x_stats_safe_exec(struct bnx2x *bp, bp 556 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h void bnx2x_save_statistics(struct bnx2x *bp); bp 558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.h void bnx2x_afex_collect_stats(struct bnx2x *bp, void *void_afex_stats, bp 26 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx); bp 29 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list, bp 40 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv, bp 43 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c mutex_lock(&bp->vf2pf_mutex); bp 49 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memset(bp->vf2pf_mbox, 0, sizeof(struct bnx2x_vf_mbx_msg)); bp 52 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, &first_tlv->tl, 0, type, length); bp 55 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c first_tlv->resp_msg_offset = sizeof(bp->vf2pf_mbox->req); bp 59 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vfpf_finalize(struct bnx2x *bp, bp 65 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c mutex_unlock(&bp->vf2pf_mutex); bp 69 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void *bnx2x_search_tlv_list(struct bnx2x *bp, void *tlvs_list, bp 93 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_dp_tlv_list(struct bnx2x *bp, void *tlvs_list) bp 141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping) bp 144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c REG_ADDR(bp, PXP_VF_ADDR_CSDM_GLOBAL_START); bp 156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_sample_bulletin(bp); bp 157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bp->old_bulletin.valid_bitmap & 1 << CHANNEL_DOWN) { bp 194 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_get_vf_id(struct bnx2x *bp, u32 *vf_id) bp 201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c me_reg = readl(bp->doorbells); bp 223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_acquire(struct bnx2x *bp, u8 tx_count, u8 rx_count) bp 226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_acquire_tlv *req = &bp->vf2pf_mbox->req.acquire; bp 227 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_acquire_resp_tlv *resp = &bp->vf2pf_mbox->resp.acquire_resp; bp 234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_ACQUIRE, sizeof(*req)); bp 236 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_get_vf_id(bp, &vf_id)) { bp 247 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->resc_request.num_sbs = bp->igu_sb_cnt; bp 253 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->bulletin_addr = bp->pf2vf_bulletin_mapping; bp 256 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, bp 265 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, bp 271 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 277 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, bp 279 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->vf2pf_mbox_mapping); bp 286 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(&bp->acquire_resp, resp, sizeof(bp->acquire_resp)); bp 293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bp->acquire_resp.hdr.status == PFVF_STATUS_SUCCESS) { bp 296 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c } else if (bp->acquire_resp.hdr.status == bp 305 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_txqs); bp 308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_rxqs); bp 311 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_sbs); bp 314 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_mac_filters); bp 317 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_vlan_filters); bp 320 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.num_mc_filters); bp 323 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memset(&bp->vf2pf_mbox->resp, 0, bp 327 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c fp_hsi_resp = bnx2x_search_tlv_list(bp, resp, bp 333 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.hdr.status); bp 341 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_search_tlv_list(bp, resp, bp 344 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(bp->phys_port_id, phys_port_resp->id, ETH_ALEN); bp 345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->flags |= HAS_PHYS_PORT_ID; bp 352 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c fp_hsi_resp = bnx2x_search_tlv_list(bp, resp, bp 360 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 361 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_release(bp); bp 368 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->common.chip_id |= (bp->acquire_resp.pfdev_info.chip_num & 0xffff); bp 369 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->link_params.chip_id = bp->common.chip_id; bp 370 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->db_size = bp->acquire_resp.pfdev_info.db_size; bp 371 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->common.int_block = INT_BLOCK_IGU; bp 372 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->common.chip_port_mode = CHIP_2_PORT_MODE; bp 373 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->igu_dsb_id = -1; bp 374 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->mf_ov = 0; bp 375 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->mf_mode = 0; bp 376 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->common.flash_size = 0; bp 377 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->flags |= bp 379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->igu_sb_cnt = bp->acquire_resp.resc.num_sbs; bp 380 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->igu_base_sb = bp->acquire_resp.resc.hw_sbs[0].hw_sb_id; bp 381 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->vlan_credit = bp->acquire_resp.resc.num_vlan_filters; bp 383 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c strlcpy(bp->fw_ver, bp->acquire_resp.pfdev_info.fw_ver, bp 384 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c sizeof(bp->fw_ver)); bp 386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (is_valid_ether_addr(bp->acquire_resp.resc.current_mac_addr)) bp 387 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(bp->dev->dev_addr, bp 388 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->acquire_resp.resc.current_mac_addr, bp 392 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 396 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_release(struct bnx2x *bp) bp 398 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_release_tlv *req = &bp->vf2pf_mbox->req.release; bp 399 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 403 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_RELEASE, sizeof(*req)); bp 405 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_get_vf_id(bp, &vf_id)) { bp 413 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 417 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 420 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 437 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 443 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_init(struct bnx2x *bp) bp 445 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_init_tlv *req = &bp->vf2pf_mbox->req.init; bp 446 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 450 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_INIT, sizeof(*req)); bp 453 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c for_each_eth_queue(bp, i) bp 454 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->sb_addr[i] = (dma_addr_t)bnx2x_fp(bp, i, bp 458 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->stats_addr = bp->fw_stats_data_mapping + bp 464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 468 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 470 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 483 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 489 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c void bnx2x_vfpf_close_vf(struct bnx2x *bp) bp 491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_close_tlv *req = &bp->vf2pf_mbox->req.close; bp 492 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 499 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_get_vf_id(bp, &vf_id)) bp 503 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c for_each_queue(bp, i) bp 504 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_teardown_queue(bp, i); bp 507 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_config_mac(bp, bp->dev->dev_addr, bp->fp->index, false); bp 510 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_CLOSE, sizeof(*req)); bp 515 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 519 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 521 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 530 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 534 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_netif_stop(bp, 0); bp 536 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_del_all_napi(bp); bp 539 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_free_irq(bp); bp 542 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_leading_vfq_init(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 549 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_init_mac_obj(bp, &q->mac_obj, bp 551 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp(bp, vf, mac_rdata), bp 552 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp_map(bp, vf, mac_rdata), bp 558 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_init_vlan_obj(bp, &q->vlan_obj, bp 560 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp(bp, vf, vlan_rdata), bp 561 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp_map(bp, vf, vlan_rdata), bp 567 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_init_vlan_mac_obj(bp, &q->vlan_mac_obj, bp 569 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp(bp, vf, vlan_mac_rdata), bp 570 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp_map(bp, vf, vlan_mac_rdata), bp 577 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_init_mcast_obj(bp, &vf->mcast_obj, cl_id, bp 579 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp(bp, vf, mcast_rdata), bp 580 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp_map(bp, vf, mcast_rdata), bp 586 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_init_rss_config_obj(bp, &vf->rss_conf_obj, cl_id, q->cid, bp 588 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp(bp, vf, rss_rdata), bp 589 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_sp_map(bp, vf, rss_rdata), bp 600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bp 603 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_setup_q_tlv *req = &bp->vf2pf_mbox->req.setup_q; bp 604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 610 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SETUP_Q, sizeof(*req)); bp 640 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->rxq.hc_rate = bp->rx_ticks ? 1000000/bp->rx_ticks : 0; bp 641 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->rxq.mtu = bp->dev->mtu; bp 645 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->rxq.max_sge_pkt = SGE_PAGE_ALIGN(bp->dev->mtu) >> SGE_PAGE_SHIFT; bp 657 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c req->txq.hc_rate = bp->tx_ticks ? 1000000/bp->tx_ticks : 0; bp 662 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 666 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 668 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 679 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 684 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx) bp 686 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_q_op_tlv *req = &bp->vf2pf_mbox->req.q_op; bp 687 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 691 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_TEARDOWN_Q, bp 697 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 701 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 703 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 719 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 725 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set) bp 727 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters; bp 728 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 729 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pf_vf_bulletin_content bulletin = bp->pf2vf_bulletin->content; bp 733 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SET_Q_FILTERS, bp 745 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_sample_bulletin(bp); bp 751 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 755 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 758 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 770 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(bp->dev->dev_addr, bulletin.mac, ETH_ALEN); bp 773 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_sample_bulletin(bp) == PFVF_BULLETIN_UPDATED) { bp 775 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(req->filters[0].mac, bp->dev->dev_addr, bp 779 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp 780 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bp->vf2pf_mbox_mapping); bp 792 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 798 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_config_rss(struct bnx2x *bp, bp 801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 802 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_rss_tlv *req = &bp->vf2pf_mbox->req.update_rss; bp 806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_UPDATE_RSS, bp 810 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 842 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 845 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 861 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 868 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x *bp = netdev_priv(dev); bp 869 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters; bp 870 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 874 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bp->state != BNX2X_STATE_OPEN) { bp 875 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c DP(NETIF_MSG_IFUP, "state is %x, returning\n", bp->state); bp 880 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SET_Q_FILTERS, bp 907 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 911 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 912 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 930 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_update_vlan(struct bnx2x *bp, u16 vid, u8 vf_qid, bool add) bp 932 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters; bp 933 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 936 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (!(bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER)) { bp 942 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SET_Q_FILTERS, bp 955 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_sample_bulletin(bp); bp 957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bp->shadow_bulletin.content.valid_bitmap & 1 << VLAN_VALID) { bp 966 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 970 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 973 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 985 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 990 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_vfpf_storm_rx_mode(struct bnx2x *bp) bp 992 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int mode = bp->rx_mode; bp 993 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters; bp 994 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; bp 998 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_prep(bp, &req->first_tlv, CHANNEL_TLV_SET_Q_FILTERS, bp 1017 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bp->accept_any_vlan) bp 1024 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, req, req->first_tlv.tl.length, CHANNEL_TLV_LIST_END, bp 1028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, req); bp 1030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_send_msg2pf(bp, &resp->hdr.status, bp->vf2pf_mbox_mapping); bp 1039 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfpf_finalize(bp, &req->first_tlv); bp 1045 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void storm_memset_vf_mbx_ack(struct bnx2x *bp, u16 abs_fid) bp 1050 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c REG_WR8(bp, addr, VF_PF_CHANNEL_STATE_READY); bp 1053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void storm_memset_vf_mbx_valid(struct bnx2x *bp, u16 abs_fid) bp 1058 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c REG_WR8(bp, addr, 1); bp 1062 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c void bnx2x_vf_enable_mbx(struct bnx2x *bp, u8 abs_vfid) bp 1064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_flr_clnup_epilog(bp, abs_vfid); bp 1067 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c storm_memset_vf_mbx_ack(bp, abs_vfid); bp 1068 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c storm_memset_vf_mbx_valid(bp, abs_vfid); bp 1071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_enable_access(bp, abs_vfid); bp 1075 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_copy32_vf_dmae(struct bnx2x *bp, u8 from_vf, bp 1081 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (CHIP_IS_E1x(bp)) { bp 1086 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (!bp->dmae_ready) { bp 1092 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_prep_dmae_with_comp(bp, &dmae, DMAE_SRC_PCI, DMAE_DST_PCI); bp 1120 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c return bnx2x_issue_dmae_with_comp(bp, &dmae, bnx2x_sp(bp, wb_comp)); bp 1123 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_resp_single_tlv(struct bnx2x *bp, bp 1126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x_vf_mbx *mbx = BP_VF_MBX(bp, vf->index); bp 1134 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, &mbx->msg->resp, 0, type, length); bp 1135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, &mbx->msg->resp, length, CHANNEL_TLV_LIST_END, bp 1139 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_resp_send_msg(struct bnx2x *bp, bp 1143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x_vf_mbx *mbx = BP_VF_MBX(bp, vf->index); bp 1149 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_dp_tlv_list(bp, resp); bp 1166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_copy32_vf_dmae(bp, false, pf_addr, vf->abs_vfid, bp 1179 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c storm_memset_vf_mbx_ack(bp, vf->abs_vfid); bp 1184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_copy32_vf_dmae(bp, false, pf_addr, vf->abs_vfid, bp 1190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); bp 1200 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_release(bp, vf); bp 1203 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_resp(struct bnx2x *bp, bp 1207 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp_single_tlv(bp, vf); bp 1208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp_send_msg(bp, vf, rc); bp 1211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_resp_phys_port(struct bnx2x *bp, bp 1218 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (!(bp->flags & HAS_PHYS_PORT_ID)) bp 1221 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, buffer, *offset, CHANNEL_TLV_PHYS_PORT_ID, bp 1226 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c memcpy(port_id->id, bp->phys_port_id, ETH_ALEN); bp 1234 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_resp_fp_hsi_ver(struct bnx2x *bp, bp 1241 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, buffer, *offset, CHANNEL_TLV_FP_HSI_SUPPORT, bp 1254 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_acquire_resp(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1266 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c resp->pfdev_info.chip_num = bp->common.chip_id; bp 1267 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c resp->pfdev_info.db_size = bp->db_size; bp 1273 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_fill_fw_str(bp, resp->pfdev_info.fw_ver, bp 1282 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_max_queue_cnt(bp, vf); bp 1284 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_max_queue_cnt(bp, vf); bp 1293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BP_VF_BULLETIN(bp, vf->index); bp 1339 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, &mbx->msg->resp, 0, CHANNEL_TLV_ACQUIRE, length); bp 1345 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_search_tlv_list(bp, &mbx->msg->req, bp 1347 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp_phys_port(bp, vf, &mbx->msg->resp, &length); bp 1353 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp_fp_hsi_ver(bp, vf, &mbx->msg->resp, &length); bp 1355 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_add_tlv(bp, &mbx->msg->resp, length, CHANNEL_TLV_LIST_END, bp 1359 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp_send_msg(bp, vf, vfop_status); bp 1362 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static bool bnx2x_vf_mbx_is_windows_vm(struct bnx2x *bp, bp 1379 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_vf_mbx_acquire_chk_dorq(struct bnx2x *bp, bp 1386 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_search_tlv_list(bp, &mbx->msg->req, bp 1391 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_vf_mbx_is_windows_vm(bp, &mbx->msg->req.acquire)) bp 1397 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1416 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mbx_acquire_chk_dorq(bp, vf, mbx); bp 1427 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_vf_mbx_is_windows_vm(bp, &mbx->msg->req.acquire)) bp 1442 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_acquire(bp, vf, &acquire->resc_request); bp 1464 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_acquire_resp(bp, vf, mbx, rc); bp 1467 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_init_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1476 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_init(bp, vf, (dma_addr_t *)init->sb_addr); bp 1484 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_iov_link_update_vf(bp, vf->index); bp 1487 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1491 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_set_q_flags(struct bnx2x *bp, u32 mbx_q_flags, bp 1514 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (IS_MF_SD(bp)) bp 1518 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_setup_q(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1544 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_leading_vfq_init(bp, vf, q); bp 1568 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_set_q_flags(bp, setup_q->txq.flags, bp 1572 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_set_q_flags(bp, setup_q->txq.flags, bp 1582 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfop_qctor_dump_tx(bp, vf, init_p, setup_p, bp 1600 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_set_q_flags(bp, setup_q->rxq.flags, bp 1604 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_set_q_flags(bp, setup_q->rxq.flags, bp 1632 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfop_qctor_dump_rx(bp, vf, init_p, setup_p, bp 1636 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vfop_qctor_prep(bp, vf, q, &qctor, q_type); bp 1638 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_queue_setup(bp, vf, q->index, &qctor); bp 1643 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1646 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_vf_mbx_macvlan_list(struct bnx2x *bp, bp 1698 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_dp_q_filter(struct bnx2x *bp, int msglvl, int idx, bp 1709 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_dp_q_filters(struct bnx2x *bp, int msglvl, bp 1716 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_dp_q_filter(bp, msglvl, i, bp 1731 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_vf_mbx_qfilters(struct bnx2x *bp, struct bnx2x_virtf *vf) bp 1736 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c &BP_VF_MBX(bp, vf->index)->msg->req.set_q_filters; bp 1743 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mbx_macvlan_list(bp, vf, msg, &fl, bp 1751 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mac_vlan_config_list(bp, vf, fl, bp 1761 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mbx_macvlan_list(bp, vf, msg, &fl, bp 1768 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mac_vlan_config_list(bp, vf, fl, bp 1778 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mbx_macvlan_list(bp, vf, msg, &fl, bp 1785 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mac_vlan_config_list(bp, vf, fl, bp 1797 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BP_VF_BULLETIN(bp, vf->index); bp 1818 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_rxmode(bp, vf, msg->vf_qid, accept); bp 1825 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mcast(bp, vf, msg->multicast, bp 1837 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_filters_validate_mac(struct bnx2x *bp, bp 1841 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf->index); bp 1887 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_filters_validate_vlan(struct bnx2x *bp, bp 1891 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf->index); bp 1917 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_set_q_filters(struct bnx2x *bp, bp 1924 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_filters_validate_mac(bp, vf, filters); bp 1928 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_filters_validate_vlan(bp, vf, filters); bp 1937 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_dp_q_filters(bp, BNX2X_MSG_IOV, filters); bp 1939 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_mbx_qfilters(bp, vf); bp 1941 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1944 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_teardown_q(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1953 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_queue_teardown(bp, vf, qid); bp 1954 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1957 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_close_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1964 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_close(bp, vf); bp 1965 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1968 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_release_vf(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 1975 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_free(bp, vf); bp 1976 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 1979 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_update_rss(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2035 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_rss_update(bp, vf, &rss); bp 2037 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 2040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static int bnx2x_validate_tpa_params(struct bnx2x *bp, bp 2053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (tpa_tlv->tpa_client_info.max_tpa_queues > MAX_AGG_QS(bp)) { bp 2057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c MAX_AGG_QS(bp)); bp 2063 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_update_tpa(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2072 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_validate_tpa_params(bp, tpa_tlv)) bp 2098 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_vf_tpa_update(bp, vf, tpa_tlv, &vf_op_params); bp 2101 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, rc); bp 2105 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, bp 2118 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c storm_memset_vf_mbx_ack(bp, vf->abs_vfid); bp 2127 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_lock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); bp 2132 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_acquire(bp, vf, mbx); bp 2135 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_init_vf(bp, vf, mbx); bp 2138 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_setup_q(bp, vf, mbx); bp 2141 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_set_q_filters(bp, vf, mbx); bp 2144 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_teardown_q(bp, vf, mbx); bp 2147 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_close_vf(bp, vf, mbx); bp 2150 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_release_vf(bp, vf, mbx); bp 2153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_update_rss(bp, vf, mbx); bp 2156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_update_tpa(bp, vf, mbx); bp 2178 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_resp(bp, vf, PFVF_STATUS_NOT_SUPPORTED); bp 2184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c storm_memset_vf_mbx_ack(bp, vf->abs_vfid); bp 2186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); bp 2190 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c void bnx2x_vf_mbx_schedule(struct bnx2x *bp, bp 2201 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (vfpf_event->vf_id - BP_VFDB(bp)->sriov.first_vf_in_pf > bp 2202 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BNX2X_NR_VIRTFN(bp)) { bp 2204 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c vfpf_event->vf_id, BNX2X_NR_VIRTFN(bp)); bp 2208 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c vf_idx = bnx2x_vf_idx_by_abs_fid(bp, vfpf_event->vf_id); bp 2211 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c mutex_lock(&BP_VFDB(bp)->event_mutex); bp 2212 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BP_VF_MBX(bp, vf_idx)->vf_addr_hi = bp 2214 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BP_VF_MBX(bp, vf_idx)->vf_addr_lo = bp 2216 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c BP_VFDB(bp)->event_occur |= (1ULL << vf_idx); bp 2217 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c mutex_unlock(&BP_VFDB(bp)->event_mutex); bp 2219 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_schedule_iov_task(bp, BNX2X_IOV_HANDLE_VF_MSG); bp 2223 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c void bnx2x_vf_mbx(struct bnx2x *bp) bp 2225 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x_vfdb *vfdb = BP_VFDB(bp); bp 2238 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c for_each_vf(bp, vf_idx) { bp 2239 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x_vf_mbx *mbx = BP_VF_MBX(bp, vf_idx); bp 2240 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct bnx2x_virtf *vf = BP_VF(bp, vf_idx); bp 2252 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_copy32_vf_dmae(bp, true, mbx->msg_mapping, bp 2259 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_release(bp, vf); bp 2272 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf_mbx_request(bp, vf, mbx); bp 2288 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c int bnx2x_post_vf_bulletin(struct bnx2x *bp, int vf) bp 2290 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c struct pf_vf_bulletin_content *bulletin = BP_VF_BULLETIN(bp, vf); bp 2291 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c dma_addr_t pf_addr = BP_VF_BULLETIN_DMA(bp)->mapping + bp 2293 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c dma_addr_t vf_addr = bnx2x_vf(bp, vf, bulletin_map); bp 2297 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c if (bnx2x_vf(bp, vf, state) != VF_ENABLED && bp 2298 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf(bp, vf, state) != VF_ACQUIRED) bp 2304 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c (bnx2x_vf(bp, vf, cfg_flags) & bp 2308 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c rc = bnx2x_copy32_vf_dmae(bp, false, pf_addr, bp 2309 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c bnx2x_vf(bp, vf, abs_vfid), U64_HI(vf_addr), bp 288 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_db_nq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) bp 290 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 296 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_db_nq_arm(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) bp 298 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 304 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_db_cq(struct bnxt *bp, struct bnxt_db_info *db, u32 idx) bp 306 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 347 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 356 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 361 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (unlikely(i >= bp->tx_nr_rings)) { bp 367 drivers/net/ethernet/broadcom/bnxt/bnxt.c txr = &bp->tx_ring[bp->tx_ring_map[i]]; bp 370 drivers/net/ethernet/broadcom/bnxt/bnxt.c free_size = bnxt_tx_avail(bp, txr); bp 400 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (free_size == bp->tx_ring_size && length <= bp->tx_push_thresh) { bp 574 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &txr->tx_db, prod); bp 578 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) { bp 580 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &txr->tx_db, prod); bp 590 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh) bp 619 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts) bp 622 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, txr->txq_index); bp 624 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 675 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh)) { bp 678 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tx_avail(bp, txr) > bp->tx_wake_thresh && bp 685 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping, bp 689 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct device *dev = &bp->pdev->dev; bp 696 drivers/net/ethernet/broadcom/bnxt/bnxt.c *mapping = dma_map_page_attrs(dev, page, 0, PAGE_SIZE, bp->rx_dir, bp 702 drivers/net/ethernet/broadcom/bnxt/bnxt.c *mapping += bp->rx_dma_offset; bp 706 drivers/net/ethernet/broadcom/bnxt/bnxt.c static inline u8 *__bnxt_alloc_rx_data(struct bnxt *bp, dma_addr_t *mapping, bp 710 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 712 drivers/net/ethernet/broadcom/bnxt/bnxt.c data = kmalloc(bp->rx_buf_size, gfp); bp 716 drivers/net/ethernet/broadcom/bnxt/bnxt.c *mapping = dma_map_single_attrs(&pdev->dev, data + bp->rx_dma_offset, bp 717 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_use_size, bp->rx_dir, bp 727 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, bp 734 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_RX_PAGE_MODE(bp)) { bp 736 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_alloc_rx_page(bp, &mapping, rxr, gfp); bp 742 drivers/net/ethernet/broadcom/bnxt/bnxt.c rx_buf->data_ptr = page_address(page) + bp->rx_offset; bp 744 drivers/net/ethernet/broadcom/bnxt/bnxt.c u8 *data = __bnxt_alloc_rx_data(bp, &mapping, gfp); bp 750 drivers/net/ethernet/broadcom/bnxt/bnxt.c rx_buf->data_ptr = data + bp->rx_offset; bp 788 drivers/net/ethernet/broadcom/bnxt/bnxt.c static inline int bnxt_alloc_rx_page(struct bnxt *bp, bp 795 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 845 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct rx_agg_cmp *bnxt_get_agg(struct bnxt *bp, bp 857 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct rx_agg_cmp *bnxt_get_tpa_agg_p5(struct bnxt *bp, bp 870 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 877 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_CHIP_P5) && tpa) bp 888 drivers/net/ethernet/broadcom/bnxt/bnxt.c agg = bnxt_get_tpa_agg_p5(bp, rxr, idx, start + i); bp 890 drivers/net/ethernet/broadcom/bnxt/bnxt.c agg = bnxt_get_agg(bp, cpr, idx, start + i); bp 923 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, bp 937 drivers/net/ethernet/broadcom/bnxt/bnxt.c err = bnxt_alloc_rx_data(bp, rxr, prod, GFP_ATOMIC); bp 942 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_addr -= bp->rx_dma_offset; bp 943 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir, bp 948 drivers/net/ethernet/broadcom/bnxt/bnxt.c payload = eth_get_headlen(bp->dev, data_ptr, len); bp 970 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct sk_buff *bnxt_rx_skb(struct bnxt *bp, bp 980 drivers/net/ethernet/broadcom/bnxt/bnxt.c err = bnxt_alloc_rx_data(bp, rxr, prod, GFP_ATOMIC); bp 987 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_unmap_single_attrs(&bp->pdev->dev, dma_addr, bp->rx_buf_use_size, bp 988 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir, DMA_ATTR_WEAK_ORDERING); bp 994 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb_reserve(skb, bp->rx_offset); bp 999 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct sk_buff *bnxt_rx_pages(struct bnxt *bp, bp 1005 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 1011 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_CHIP_P5) && tpa) bp 1022 drivers/net/ethernet/broadcom/bnxt/bnxt.c agg = bnxt_get_tpa_agg_p5(bp, rxr, idx, i); bp 1024 drivers/net/ethernet/broadcom/bnxt/bnxt.c agg = bnxt_get_agg(bp, cpr, idx, i); bp 1042 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_alloc_rx_page(bp, rxr, prod, GFP_ATOMIC) != 0) { bp 1076 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 1093 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 1094 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 1101 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_sync_single_for_cpu(&pdev->dev, mapping, bp->rx_copy_thresh, bp 1102 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir); bp 1107 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_sync_single_for_device(&pdev->dev, mapping, bp->rx_copy_thresh, bp 1108 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir); bp 1114 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_discard_rx(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 1130 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 1137 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) bp 1144 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_queue_fw_reset_work(struct bnxt *bp, unsigned long delay) bp 1146 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 1147 drivers/net/ethernet/broadcom/bnxt/bnxt.c queue_delayed_work(bnxt_pf_wq, &bp->fw_reset_task, delay); bp 1149 drivers/net/ethernet/broadcom/bnxt/bnxt.c schedule_delayed_work(&bp->fw_reset_task, delay); bp 1152 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_queue_sp_work(struct bnxt *bp) bp 1154 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 1155 drivers/net/ethernet/broadcom/bnxt/bnxt.c queue_work(bnxt_pf_wq, &bp->sp_task); bp 1157 drivers/net/ethernet/broadcom/bnxt/bnxt.c schedule_work(&bp->sp_task); bp 1160 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_cancel_sp_work(struct bnxt *bp) bp 1162 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 1165 drivers/net/ethernet/broadcom/bnxt/bnxt.c cancel_work_sync(&bp->sp_task); bp 1168 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_sched_reset(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) bp 1172 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event); bp 1173 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 1205 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, bp 1215 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 1229 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "TPA cons %x, expected cons %x, error code %x\n", bp 1232 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_sched_reset(bp, rxr); bp 1270 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_msg_rx_err(bp)) bp 1271 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "TPA packet without valid hash\n"); bp 1461 drivers/net/ethernet/broadcom/bnxt/bnxt.c static inline struct sk_buff *bnxt_gro_skb(struct bnxt *bp, bp 1479 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 1483 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bp->gro_func(tpa_info, payload_off, TPA_END_GRO_TS(tpa_end), skb); bp 1493 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct net_device *bnxt_get_pkt_dev(struct bnxt *bp, u16 cfa_code) bp 1495 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bnxt_get_vf_rep(bp, cfa_code); bp 1498 drivers/net/ethernet/broadcom/bnxt/bnxt.c return dev ? dev : bp->dev; bp 1501 drivers/net/ethernet/broadcom/bnxt/bnxt.c static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp, bp 1520 drivers/net/ethernet/broadcom/bnxt/bnxt.c int rc = bnxt_discard_rx(bp, cpr, raw_cons, tpa_end); bp 1527 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 1533 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "TPA end agg_buf %d != expected agg_bufs %d\n", bp 1541 drivers/net/ethernet/broadcom/bnxt/bnxt.c gro = !!(bp->flags & BNXT_FLAG_GRO); bp 1548 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, raw_cons)) bp 1565 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "TPA frags %d exceeded MAX_SKB_FRAGS %d\n", bp 1570 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (len <= bp->rx_copy_thresh) { bp 1580 drivers/net/ethernet/broadcom/bnxt/bnxt.c new_data = __bnxt_alloc_rx_data(bp, &new_mapping, GFP_ATOMIC); bp 1587 drivers/net/ethernet/broadcom/bnxt/bnxt.c tpa_info->data_ptr = new_data + bp->rx_offset; bp 1591 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_unmap_single_attrs(&bp->pdev->dev, mapping, bp 1592 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_use_size, bp->rx_dir, bp 1600 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb_reserve(skb, bp->rx_offset); bp 1605 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bnxt_rx_pages(bp, cpr, skb, idx, agg_bufs, true); bp 1613 drivers/net/ethernet/broadcom/bnxt/bnxt.c eth_type_trans(skb, bnxt_get_pkt_dev(bp, tpa_info->cfa_code)); bp 1635 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bnxt_gro_skb(bp, tpa_info, tpa_end, tpa_end1, skb); bp 1640 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_tpa_agg(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, bp 1652 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_deliver_skb(struct bnxt *bp, struct bnxt_napi *bnapi, bp 1655 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (skb->dev != bp->dev) { bp 1657 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_vf_rep_rx(bp, skb); bp 1671 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 1676 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 1696 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tpa_agg(bp, rxr, (struct rx_agg_cmp *)rxcmp); bp 1711 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tpa_start(bp, rxr, (struct rx_tpa_start_cmp *)rxcmp, bp 1718 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bnxt_tpa_end(bp, cpr, &tmp_raw_cons, bp 1727 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_deliver_skb(bp, bnapi, skb); bp 1736 drivers/net/ethernet/broadcom/bnxt/bnxt.c int rc1 = bnxt_discard_rx(bp, cpr, raw_cons, rxcmp); bp 1738 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "RX cons %x != expected cons %x\n", bp 1740 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_sched_reset(bp, rxr); bp 1752 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) bp 1772 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) { bp 1773 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "RX buffer error %x\n", bp 1775 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_sched_reset(bp, rxr); bp 1784 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_rx_xdp(bp, rxr, cons, data, &data_ptr, &len, event)) { bp 1789 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (len <= bp->rx_copy_thresh) { bp 1806 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bp->rx_skb_func(bp, rxr, cons, data, data_ptr, dma_addr, bp 1815 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb = bnxt_rx_pages(bp, cpr, skb, cp_cons, agg_bufs, false); bp 1833 drivers/net/ethernet/broadcom/bnxt/bnxt.c skb->protocol = eth_type_trans(skb, bnxt_get_pkt_dev(bp, cfa_code)); bp 1858 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_deliver_skb(bp, bnapi, skb); bp 1878 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_force_rx_discard(struct bnxt *bp, bp 1911 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_rx_pkt(bp, cpr, raw_cons, event); bp 1914 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 bnxt_fw_health_readl(struct bnxt *bp, int reg_idx) bp 1916 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 1924 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_read_config_dword(bp->pdev, reg_off, &val); bp 1930 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = readl(bp->bar0 + reg_off); bp 1933 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = readl(bp->bar1 + reg_off); bp 1945 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_async_event_process(struct bnxt *bp, bp 1954 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 1956 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) bp 1966 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Link speed %d no longer supported\n", bp 1969 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event); bp 1973 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event); bp 1976 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event); bp 1982 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) bp 1985 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->pf.port_id != port_id) bp 1988 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event); bp 1992 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 1994 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event); bp 1999 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->fw_health) bp 2002 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_timestamp = jiffies; bp 2003 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_min_dsecs = cmpl->timestamp_lo; bp 2004 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->fw_reset_min_dsecs) bp 2005 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_min_dsecs = BNXT_DFLT_FW_RST_MIN_DSECS; bp 2006 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_max_dsecs = le16_to_cpu(cmpl->timestamp_hi); bp 2007 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->fw_reset_max_dsecs) bp 2008 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_max_dsecs = BNXT_DFLT_FW_RST_MAX_DSECS; bp 2010 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Firmware fatal reset event received\n"); bp 2011 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state); bp 2013 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Firmware non-fatal reset event received, max wait time %d msec\n", bp 2014 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_max_dsecs * 100); bp 2016 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event); bp 2020 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 2031 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_msg_drv(bp)) bp 2032 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "Error recovery info: error recovery[%d], master[%d], reset count[0x%x], health status: 0x%x\n", bp 2034 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_health_readl(bp, bp 2036 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_health_readl(bp, bp 2040 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->current_interval * 10); bp 2043 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG); bp 2045 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG); bp 2051 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 2053 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_async_events(bp, cmpl); bp 2057 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_handler(struct bnxt *bp, struct tx_cmp *txcmp) bp 2067 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (seq_id == bp->hwrm_intr_seq_id) bp 2068 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_intr_seq_id = (u16)~bp->hwrm_intr_seq_id; bp 2070 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Invalid hwrm seq id %d\n", seq_id); bp 2076 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((vf_id < bp->pf.first_vf_id) || bp 2077 drivers/net/ethernet/broadcom/bnxt/bnxt.c (vf_id >= bp->pf.first_vf_id + bp->pf.active_vfs)) { bp 2078 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Msg contains invalid VF id %x\n", bp 2083 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(vf_id - bp->pf.first_vf_id, bp->pf.vf_event_bmap); bp 2084 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event); bp 2085 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 2089 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_async_event_process(bp, bp 2102 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 2112 drivers/net/ethernet/broadcom/bnxt/bnxt.c static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) bp 2126 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 2133 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_has_work(bp, cpr)) { bp 2134 drivers/net/ethernet/broadcom/bnxt/bnxt.c int_status = readl(bp->bar0 + BNXT_CAG_REG_LEGACY_INT_STATUS); bp 2144 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (unlikely(atomic_read(&bp->intr_sem) != 0)) bp 2151 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 2180 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (unlikely(tx_pkts > bp->tx_wake_thresh)) { bp 2189 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_rx_pkt(bp, cpr, &raw_cons, &event); bp 2191 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_force_rx_discard(bp, cpr, &raw_cons, bp 2210 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_handler(bp, txcmp); bp 2230 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write_relaxed(bp, &txr->tx_db, prod); bp 2239 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi) bp 2242 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi->tx_int(bp, bnapi, bnapi->tx_pkts); bp 2250 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_agg_db, rxr->rx_agg_prod); bp 2251 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod); bp 2256 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_poll_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 2262 drivers/net/ethernet/broadcom/bnxt/bnxt.c rx_pkts = __bnxt_poll_work(bp, cpr, budget); bp 2268 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_cq(bp, &cpr->cp_db, cpr->cp_raw_cons); bp 2270 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_work_done(bp, bnapi); bp 2277 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 2309 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_rx_pkt(bp, cpr, &raw_cons, &event); bp 2316 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_handler(bp, txcmp); bp 2318 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, bp 2329 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod); bp 2332 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_agg_db, rxr->rx_agg_prod); bp 2334 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) { bp 2344 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 2349 drivers/net/ethernet/broadcom/bnxt/bnxt.c work_done += bnxt_poll_work(bp, cpr, budget - work_done); bp 2357 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_has_work(bp, cpr)) { bp 2363 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_DIM) { bp 2375 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_poll_cqs(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) bp 2384 drivers/net/ethernet/broadcom/bnxt/bnxt.c work_done += __bnxt_poll_work(bp, cpr2, bp 2392 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void __bnxt_poll_cqs_done(struct bnxt *bp, struct bnxt_napi *bnapi, bp 2409 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_work_done(bp, bnapi); bp 2417 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = bnapi->bp; bp 2424 drivers/net/ethernet/broadcom/bnxt/bnxt.c work_done = __bnxt_poll_cqs(bp, bnapi, budget); bp 2426 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ, false); bp 2429 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL, true); bp 2439 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ_ARMALL, bp 2458 drivers/net/ethernet/broadcom/bnxt/bnxt.c work_done += __bnxt_poll_work(bp, cpr2, bp 2462 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_handler(bp, (struct tx_cmp *)nqcmp); bp 2468 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_poll_cqs_done(bp, bnapi, DBR_TYPE_CQ, true); bp 2473 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_tx_skbs(struct bnxt *bp) bp 2476 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2478 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->tx_ring) bp 2481 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_idx = bp->tx_nr_pages * TX_DESC_CNT; bp 2482 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 2483 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 2491 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (i < bp->tx_nr_rings_xdp && bp 2526 drivers/net/ethernet/broadcom/bnxt/bnxt.c int ring_idx = j & bp->tx_ring_mask; bp 2537 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_tx_reset_queue(netdev_get_tx_queue(bp->dev, i)); bp 2541 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_rx_skbs(struct bnxt *bp) bp 2544 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2546 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->rx_ring) bp 2549 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_idx = bp->rx_nr_pages * RX_DESC_CNT; bp 2550 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_agg_idx = bp->rx_agg_nr_pages * RX_DESC_CNT; bp 2551 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 2552 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 2557 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (j = 0; j < bp->max_tpa; j++) { bp 2567 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_use_size, bp 2568 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir, bp 2587 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_RX_PAGE_MODE(bp)) { bp 2588 drivers/net/ethernet/broadcom/bnxt/bnxt.c mapping -= bp->rx_dma_offset; bp 2590 drivers/net/ethernet/broadcom/bnxt/bnxt.c PAGE_SIZE, bp->rx_dir, bp 2595 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_use_size, bp 2596 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir, bp 2630 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_skbs(struct bnxt *bp) bp 2632 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_tx_skbs(bp); bp 2633 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_rx_skbs(bp); bp 2636 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) bp 2638 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2665 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem) bp 2667 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2715 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_tpa_info(struct bnxt *bp) bp 2719 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 2720 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 2733 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_tpa_info(struct bnxt *bp) bp 2737 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tpa = MAX_TPA; bp 2738 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 2739 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->max_tpa_v2) bp 2741 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tpa = max_t(u16, bp->max_tpa_v2, MAX_TPA_P5); bp 2742 drivers/net/ethernet/broadcom/bnxt/bnxt.c total_aggs = bp->max_tpa * MAX_SKB_FRAGS; bp 2745 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 2746 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 2749 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr->rx_tpa = kcalloc(bp->max_tpa, sizeof(struct bnxt_tpa_info), bp 2754 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 2760 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (j = 1; j < bp->max_tpa; j++) bp 2770 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_rx_rings(struct bnxt *bp) bp 2774 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->rx_ring) bp 2777 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_tpa_info(bp); bp 2778 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 2779 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 2795 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, &ring->ring_mem); bp 2798 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, &ring->ring_mem); bp 2802 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_rx_page_pool(struct bnxt *bp, bp 2807 drivers/net/ethernet/broadcom/bnxt/bnxt.c pp.pool_size = bp->rx_ring_size; bp 2808 drivers/net/ethernet/broadcom/bnxt/bnxt.c pp.nid = dev_to_node(&bp->pdev->dev); bp 2809 drivers/net/ethernet/broadcom/bnxt/bnxt.c pp.dev = &bp->pdev->dev; bp 2822 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_rx_rings(struct bnxt *bp) bp 2826 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->rx_ring) bp 2829 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 2832 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 2833 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 2838 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_rx_page_pool(bp, rxr); bp 2842 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = xdp_rxq_info_reg(&rxr->xdp_rxq, bp->dev, i); bp 2854 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ring(bp, &ring->ring_mem); bp 2863 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ring(bp, &ring->ring_mem); bp 2868 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr->rx_agg_bmap_size = bp->rx_agg_ring_mask + 1; bp 2875 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_TPA) bp 2876 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_tpa_info(bp); bp 2880 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_tx_rings(struct bnxt *bp) bp 2883 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2885 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->tx_ring) bp 2888 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 2889 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 2893 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_free_coherent(&pdev->dev, bp->tx_push_size, bp 2900 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, &ring->ring_mem); bp 2904 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_tx_rings(struct bnxt *bp) bp 2907 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 2909 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_size = 0; bp 2910 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->tx_push_thresh) { bp 2914 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_thresh); bp 2918 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_thresh = 0; bp 2921 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_size = push_size; bp 2924 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0, j = 0; i < bp->tx_nr_rings; i++) { bp 2925 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 2931 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ring(bp, &ring->ring_mem); bp 2936 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->tx_push_size) { bp 2943 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_size, bp 2954 drivers/net/ethernet/broadcom/bnxt/bnxt.c qidx = bp->tc_to_qidx[j]; bp 2955 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring->queue_id = bp->q_info[qidx].queue_id; bp 2956 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (i < bp->tx_nr_rings_xdp) bp 2958 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (i % bp->tx_nr_rings_per_tc == (bp->tx_nr_rings_per_tc - 1)) bp 2964 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_cp_rings(struct bnxt *bp) bp 2968 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 2971 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 2972 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 2983 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, &ring->ring_mem); bp 2990 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, &ring->ring_mem); bp 2998 drivers/net/ethernet/broadcom/bnxt/bnxt.c static struct bnxt_cp_ring_info *bnxt_alloc_cp_sub_ring(struct bnxt *bp) bp 3011 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->nr_pages = bp->cp_nr_pages; bp 3016 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ring(bp, rmem); bp 3018 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, rmem); bp 3025 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_cp_rings(struct bnxt *bp) bp 3027 drivers/net/ethernet/broadcom/bnxt/bnxt.c bool sh = !!(bp->flags & BNXT_FLAG_SHARED_RINGS); bp 3030 drivers/net/ethernet/broadcom/bnxt/bnxt.c ulp_msix = bnxt_get_ulp_msix_num(bp); bp 3031 drivers/net/ethernet/broadcom/bnxt/bnxt.c ulp_base_vec = bnxt_get_ulp_msix_base(bp); bp 3032 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3033 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 3044 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ring(bp, &ring->ring_mem); bp 3053 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 3056 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (i < bp->rx_nr_rings) { bp 3058 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_alloc_cp_sub_ring(bp); bp 3065 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((sh && i < bp->tx_nr_rings) || bp 3066 drivers/net/ethernet/broadcom/bnxt/bnxt.c (!sh && i >= bp->rx_nr_rings)) { bp 3068 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_alloc_cp_sub_ring(bp); bp 3079 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_init_ring_struct(struct bnxt *bp) bp 3083 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3084 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 3097 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->nr_pages = bp->cp_nr_pages; bp 3109 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->nr_pages = bp->rx_nr_pages; bp 3113 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->vmem_size = SW_RXBD_RING_SIZE * bp->rx_nr_pages; bp 3118 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->nr_pages = bp->rx_agg_nr_pages; bp 3122 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->vmem_size = SW_RXBD_AGG_RING_SIZE * bp->rx_agg_nr_pages; bp 3132 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->nr_pages = bp->tx_nr_pages; bp 3136 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmem->vmem_size = SW_TXBD_RING_SIZE * bp->tx_nr_pages; bp 3163 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr) bp 3165 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 3171 drivers/net/ethernet/broadcom/bnxt/bnxt.c type = (bp->rx_buf_use_size << RX_BD_LEN_SHIFT) | bp 3177 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr = &bp->rx_ring[ring_nr]; bp 3181 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_RX_PAGE_MODE(bp) && bp->xdp_prog) { bp 3182 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr->xdp_prog = bpf_prog_add(bp->xdp_prog, 1); bp 3191 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_ring_size; i++) { bp 3192 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_alloc_rx_data(bp, rxr, prod, GFP_KERNEL) != 0) { bp 3194 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_nr, i, bp->rx_ring_size); bp 3205 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_AGG_RINGS)) bp 3214 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_agg_ring_size; i++) { bp 3215 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_alloc_rx_page(bp, rxr, prod, GFP_KERNEL) != 0) { bp 3217 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_nr, i, bp->rx_ring_size); bp 3224 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_TPA) { bp 3229 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->max_tpa; i++) { bp 3230 drivers/net/ethernet/broadcom/bnxt/bnxt.c data = __bnxt_alloc_rx_data(bp, &mapping, bp 3236 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr->rx_tpa[i].data_ptr = data + bp->rx_offset; bp 3240 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "No resource allocated for LRO/GRO\n"); bp 3248 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_init_cp_rings(struct bnxt *bp) bp 3252 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3253 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; bp 3257 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpr->rx_ring_coal.coal_ticks = bp->rx_coal.coal_ticks; bp 3258 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpr->rx_ring_coal.coal_bufs = bp->rx_coal.coal_bufs; bp 3267 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpr2->rx_ring_coal.coal_ticks = bp->rx_coal.coal_ticks; bp 3268 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpr2->rx_ring_coal.coal_bufs = bp->rx_coal.coal_bufs; bp 3273 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_rx_rings(struct bnxt *bp) bp 3277 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_RX_PAGE_MODE(bp)) { bp 3278 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_offset = NET_IP_ALIGN + XDP_PACKET_HEADROOM; bp 3279 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dma_offset = XDP_PACKET_HEADROOM; bp 3281 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_offset = BNXT_RX_OFFSET; bp 3282 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dma_offset = BNXT_RX_DMA_OFFSET; bp 3285 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 3286 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_one_rx_ring(bp, i); bp 3294 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_tx_rings(struct bnxt *bp) bp 3298 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_wake_thresh = max_t(int, bp->tx_ring_size / 2, bp 3301 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 3302 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 3311 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ring_grps(struct bnxt *bp) bp 3313 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->grp_info); bp 3314 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info = NULL; bp 3317 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_ring_grps(struct bnxt *bp, bool irq_re_init) bp 3322 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info = kcalloc(bp->cp_nr_rings, bp 3325 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->grp_info) bp 3328 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3330 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].fw_stats_ctx = INVALID_HW_RING_ID; bp 3331 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].fw_grp_id = INVALID_HW_RING_ID; bp 3332 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].rx_fw_ring_id = INVALID_HW_RING_ID; bp 3333 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].agg_fw_ring_id = INVALID_HW_RING_ID; bp 3334 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].cp_fw_ring_id = INVALID_HW_RING_ID; bp 3339 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_vnics(struct bnxt *bp) bp 3341 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->vnic_info); bp 3342 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info = NULL; bp 3343 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nr_vnics = 0; bp 3346 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_vnics(struct bnxt *bp) bp 3351 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS) bp 3352 drivers/net/ethernet/broadcom/bnxt/bnxt.c num_vnics += bp->rx_nr_rings; bp 3355 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 3358 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info = kcalloc(num_vnics, sizeof(struct bnxt_vnic_info), bp 3360 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->vnic_info) bp 3363 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nr_vnics = num_vnics; bp 3367 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_init_vnics(struct bnxt *bp) bp 3371 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) { bp 3372 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; bp 3381 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vnic_info[i].rss_hash_key) { bp 3387 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[0].rss_hash_key, bp 3410 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_set_tpa_flags(struct bnxt *bp) bp 3412 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_TPA; bp 3413 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NO_AGG_RINGS) bp 3415 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->dev->features & NETIF_F_LRO) bp 3416 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_LRO; bp 3417 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (bp->dev->features & NETIF_F_GRO_HW) bp 3418 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_GRO; bp 3424 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_set_ring_params(struct bnxt *bp) bp 3430 drivers/net/ethernet/broadcom/bnxt/bnxt.c rx_size = SKB_DATA_ALIGN(bp->dev->mtu + ETH_HLEN + NET_IP_ALIGN + 8); bp 3435 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_copy_thresh = BNXT_RX_COPY_THRESH; bp 3436 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_size = bp->rx_ring_size; bp 3437 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_ring_size = 0; bp 3438 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_nr_pages = 0; bp 3440 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_TPA) bp 3443 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_JUMBO; bp 3444 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (rx_space > PAGE_SIZE && !(bp->flags & BNXT_FLAG_NO_AGG_RINGS)) { bp 3447 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_JUMBO; bp 3448 drivers/net/ethernet/broadcom/bnxt/bnxt.c jumbo_factor = PAGE_ALIGN(bp->dev->mtu - 40) >> PAGE_SHIFT; bp 3455 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_nr_pages = bnxt_calc_nr_ring_pages(agg_ring_size, bp 3457 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->rx_agg_nr_pages > MAX_RX_AGG_PAGES) { bp 3460 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_nr_pages = MAX_RX_AGG_PAGES; bp 3462 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "rx agg ring size %d reduced to %d.\n", bp 3465 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_ring_size = agg_ring_size; bp 3466 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_agg_ring_mask = (bp->rx_agg_nr_pages * RX_DESC_CNT) - 1; bp 3472 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_use_size = rx_size; bp 3473 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_buf_size = rx_space; bp 3475 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_pages = bnxt_calc_nr_ring_pages(ring_size, RX_DESC_CNT); bp 3476 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_ring_mask = (bp->rx_nr_pages * RX_DESC_CNT) - 1; bp 3478 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_size = bp->tx_ring_size; bp 3479 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_pages = bnxt_calc_nr_ring_pages(ring_size, TX_DESC_CNT); bp 3480 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring_mask = (bp->tx_nr_pages * TX_DESC_CNT) - 1; bp 3482 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_size = bp->rx_ring_size * (2 + agg_factor) + bp->tx_ring_size; bp 3483 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_ring_size = ring_size; bp 3485 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_pages = bnxt_calc_nr_ring_pages(ring_size, CP_DESC_CNT); bp 3486 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->cp_nr_pages > MAX_CP_PAGES) { bp 3487 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_pages = MAX_CP_PAGES; bp 3488 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_ring_size = MAX_CP_PAGES * CP_DESC_CNT - 1; bp 3489 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "completion ring size %d reduced to %d.\n", bp 3490 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_size, bp->cp_ring_size); bp 3492 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_bit = bp->cp_nr_pages * CP_DESC_CNT; bp 3493 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_ring_mask = bp->cp_bit - 1; bp 3499 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode) bp 3502 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->dev->mtu > BNXT_MAX_PAGE_MODE_MTU) bp 3504 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->max_mtu = bp 3505 drivers/net/ethernet/broadcom/bnxt/bnxt.c min_t(u16, bp->max_mtu, BNXT_MAX_PAGE_MODE_MTU); bp 3506 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_AGG_RINGS; bp 3507 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_NO_AGG_RINGS | BNXT_FLAG_RX_PAGE_MODE; bp 3508 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir = DMA_BIDIRECTIONAL; bp 3509 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_skb_func = bnxt_rx_page_skb; bp 3511 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_update_features(bp->dev); bp 3513 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->max_mtu = bp->max_mtu; bp 3514 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_RX_PAGE_MODE; bp 3515 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_dir = DMA_FROM_DEVICE; bp 3516 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_skb_func = bnxt_rx_skb; bp 3521 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_vnic_attributes(struct bnxt *bp) bp 3525 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3527 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->vnic_info) bp 3530 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) { bp 3531 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[i]; bp 3557 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_vnic_attributes(struct bnxt *bp) bp 3561 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3564 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) { bp 3565 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[i]; bp 3592 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 3596 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_rings = bp->rx_nr_rings; bp 3606 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_NEW_RSS_CAP) && bp 3630 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_hwrm_resources(struct bnxt *bp) bp 3632 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3634 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_cmd_resp_addr) { bp 3635 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_free_coherent(&pdev->dev, PAGE_SIZE, bp->hwrm_cmd_resp_addr, bp 3636 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_dma_addr); bp 3637 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_addr = NULL; bp 3640 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_cmd_kong_resp_addr) { bp 3642 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_kong_resp_addr, bp 3643 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_kong_resp_dma_addr); bp 3644 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_kong_resp_addr = NULL; bp 3648 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_kong_hwrm_resources(struct bnxt *bp) bp 3650 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3652 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_cmd_kong_resp_addr) bp 3655 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_kong_resp_addr = bp 3657 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hwrm_cmd_kong_resp_dma_addr, bp 3659 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hwrm_cmd_kong_resp_addr) bp 3665 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_hwrm_resources(struct bnxt *bp) bp 3667 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3669 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_addr = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, bp 3670 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hwrm_cmd_resp_dma_addr, bp 3672 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hwrm_cmd_resp_addr) bp 3678 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_hwrm_short_cmd_req(struct bnxt *bp) bp 3680 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_short_cmd_req_addr) { bp 3681 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3683 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_free_coherent(&pdev->dev, bp->hwrm_max_ext_req_len, bp 3684 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_short_cmd_req_addr, bp 3685 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_short_cmd_req_dma_addr); bp 3686 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_short_cmd_req_addr = NULL; bp 3690 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_hwrm_short_cmd_req(struct bnxt *bp) bp 3692 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3694 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_short_cmd_req_addr) bp 3697 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_short_cmd_req_addr = bp 3698 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_alloc_coherent(&pdev->dev, bp->hwrm_max_ext_req_len, bp 3699 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hwrm_short_cmd_req_dma_addr, bp 3701 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hwrm_short_cmd_req_addr) bp 3707 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_port_stats(struct bnxt *bp) bp 3709 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3711 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_PORT_STATS; bp 3712 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_PORT_STATS_EXT; bp 3714 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_rx_port_stats) { bp 3715 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_free_coherent(&pdev->dev, bp->hw_port_stats_size, bp 3716 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats, bp 3717 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats_map); bp 3718 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats = NULL; bp 3721 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_tx_port_stats_ext) { bp 3723 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats_ext, bp 3724 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats_ext_map); bp 3725 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats_ext = NULL; bp 3728 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_rx_port_stats_ext) { bp 3730 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats_ext, bp 3731 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats_ext_map); bp 3732 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats_ext = NULL; bp 3735 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_pcie_stats) { bp 3737 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_pcie_stats, bp->hw_pcie_stats_map); bp 3738 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_pcie_stats = NULL; bp 3742 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ring_stats(struct bnxt *bp) bp 3744 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3747 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 3750 drivers/net/ethernet/broadcom/bnxt/bnxt.c size = bp->hw_ring_stats_size; bp 3752 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3753 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 3764 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_stats(struct bnxt *bp) bp 3767 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 3769 drivers/net/ethernet/broadcom/bnxt/bnxt.c size = bp->hw_ring_stats_size; bp 3771 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3772 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 3784 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp) || bp->chip_num == CHIP_NUM_58700) bp 3787 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_rx_port_stats) bp 3790 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_port_stats_size = sizeof(struct rx_port_stats) + bp 3793 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats = bp 3794 drivers/net/ethernet/broadcom/bnxt/bnxt.c dma_alloc_coherent(&pdev->dev, bp->hw_port_stats_size, bp 3795 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hw_rx_port_stats_map, bp 3797 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hw_rx_port_stats) bp 3800 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats = (void *)(bp->hw_rx_port_stats + 1) + 512; bp 3801 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats_map = bp->hw_rx_port_stats_map + bp 3803 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_PORT_STATS; bp 3807 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10804 || bp->hwrm_spec_code == 0x10900) bp 3808 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->fw_cap & BNXT_FW_CAP_EXT_STATS_SUPPORTED)) bp 3811 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_rx_port_stats_ext) bp 3814 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_rx_port_stats_ext = bp 3816 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hw_rx_port_stats_ext_map, GFP_KERNEL); bp 3817 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hw_rx_port_stats_ext) bp 3821 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_tx_port_stats_ext) bp 3824 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10902 || bp 3825 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bp->fw_cap & BNXT_FW_CAP_EXT_STATS_SUPPORTED)) { bp 3826 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_tx_port_stats_ext = bp 3829 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hw_tx_port_stats_ext_map, bp 3832 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_PORT_STATS_EXT; bp 3835 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hw_pcie_stats || bp 3836 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->fw_cap & BNXT_FW_CAP_PCIE_STATS_SUPPORTED)) bp 3839 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_pcie_stats = bp 3841 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->hw_pcie_stats_map, GFP_KERNEL); bp 3842 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hw_pcie_stats) bp 3845 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_PCIE_STATS; bp 3849 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_clear_ring_indices(struct bnxt *bp) bp 3853 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 3856 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 3857 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 3884 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ntp_fltrs(struct bnxt *bp, bool irq_reinit) bp 3897 drivers/net/ethernet/broadcom/bnxt/bnxt.c head = &bp->ntp_fltr_hash_tbl[i]; bp 3904 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->ntp_fltr_bmap); bp 3905 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_bmap = NULL; bp 3907 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_count = 0; bp 3911 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_ntp_fltrs(struct bnxt *bp) bp 3916 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_RFS)) bp 3920 drivers/net/ethernet/broadcom/bnxt/bnxt.c INIT_HLIST_HEAD(&bp->ntp_fltr_hash_tbl[i]); bp 3922 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_count = 0; bp 3923 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_bmap = kcalloc(BITS_TO_LONGS(BNXT_NTP_FLTR_MAX_FLTR), bp 3927 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->ntp_fltr_bmap) bp 3936 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_mem(struct bnxt *bp, bool irq_re_init) bp 3938 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_vnic_attributes(bp); bp 3939 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_tx_rings(bp); bp 3940 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_rx_rings(bp); bp 3941 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_cp_rings(bp); bp 3942 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ntp_fltrs(bp, irq_re_init); bp 3944 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring_stats(bp); bp 3945 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring_grps(bp); bp 3946 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_vnics(bp); bp 3947 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->tx_ring_map); bp 3948 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring_map = NULL; bp 3949 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->tx_ring); bp 3950 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring = NULL; bp 3951 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->rx_ring); bp 3952 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_ring = NULL; bp 3953 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->bnapi); bp 3954 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi = NULL; bp 3956 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_ring_indices(bp); bp 3960 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_mem(struct bnxt *bp, bool irq_re_init) bp 3970 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings); bp 3972 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi = kzalloc(arr_size + size * bp->cp_nr_rings, GFP_KERNEL); bp 3976 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi = bnapi; bp 3978 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++, bnapi += size) { bp 3979 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i] = bnapi; bp 3980 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i]->index = i; bp 3981 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i]->bp = bp; bp 3982 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 3984 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->bnapi[i]->cp_ring; bp 3991 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_ring = kcalloc(bp->rx_nr_rings, bp 3994 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->rx_ring) bp 3997 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 3998 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 4000 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 4006 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr->bnapi = bp->bnapi[i]; bp 4007 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i]->rx_ring = &bp->rx_ring[i]; bp 4010 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring = kcalloc(bp->tx_nr_rings, bp 4013 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->tx_ring) bp 4016 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring_map = kcalloc(bp->tx_nr_rings, sizeof(u16), bp 4019 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->tx_ring_map) bp 4022 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_SHARED_RINGS) bp 4025 drivers/net/ethernet/broadcom/bnxt/bnxt.c j = bp->rx_nr_rings; bp 4027 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++, j++) { bp 4028 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 4030 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 4033 drivers/net/ethernet/broadcom/bnxt/bnxt.c txr->bnapi = bp->bnapi[j]; bp 4034 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[j]->tx_ring = txr; bp 4035 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring_map[i] = bp->tx_nr_rings_xdp + i; bp 4036 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (i >= bp->tx_nr_rings_xdp) { bp 4037 drivers/net/ethernet/broadcom/bnxt/bnxt.c txr->txq_index = i - bp->tx_nr_rings_xdp; bp 4038 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[j]->tx_int = bnxt_tx_int; bp 4040 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[j]->flags |= BNXT_NAPI_FLAG_XDP; bp 4041 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[j]->tx_int = bnxt_tx_int_xdp; bp 4045 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_stats(bp); bp 4049 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ntp_fltrs(bp); bp 4053 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_vnics(bp); bp 4058 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_ring_struct(bp); bp 4060 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_rx_rings(bp); bp 4064 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_tx_rings(bp); bp 4068 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_cp_rings(bp); bp 4072 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[0].flags |= BNXT_VNIC_RSS_FLAG | BNXT_VNIC_MCAST_FLAG | bp 4074 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_vnic_attributes(bp); bp 4080 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_mem(bp, true); bp 4084 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_disable_int(struct bnxt *bp) bp 4088 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 4091 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 4092 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 4097 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); bp 4101 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_cp_num_to_irq_num(struct bnxt *bp, int n) bp 4103 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[n]; bp 4110 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_disable_int_sync(struct bnxt *bp) bp 4114 drivers/net/ethernet/broadcom/bnxt/bnxt.c atomic_inc(&bp->intr_sem); bp 4116 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_disable_int(bp); bp 4117 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 4118 drivers/net/ethernet/broadcom/bnxt/bnxt.c int map_idx = bnxt_cp_num_to_irq_num(bp, i); bp 4120 drivers/net/ethernet/broadcom/bnxt/bnxt.c synchronize_irq(bp->irq_tbl[map_idx].vector); bp 4124 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_enable_int(struct bnxt *bp) bp 4128 drivers/net/ethernet/broadcom/bnxt/bnxt.c atomic_set(&bp->intr_sem, 0); bp 4129 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 4130 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 4133 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons); bp 4137 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_hwrm_cmd_hdr_init(struct bnxt *bp, void *request, u16 req_type, bp 4145 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_kong_hwrm_message(bp, req)) bp 4146 drivers/net/ethernet/broadcom/bnxt/bnxt.c req->resp_addr = cpu_to_le64(bp->hwrm_cmd_kong_resp_dma_addr); bp 4148 drivers/net/ethernet/broadcom/bnxt/bnxt.c req->resp_addr = cpu_to_le64(bp->hwrm_cmd_resp_dma_addr); bp 4177 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len, bp 4186 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_err_output *resp = bp->hwrm_cmd_resp_addr; bp 4190 drivers/net/ethernet/broadcom/bnxt/bnxt.c u8 *resp_addr = (u8 *)bp->hwrm_cmd_resp_addr; bp 4194 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) bp 4198 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (msg_len > bp->hwrm_max_ext_req_len || bp 4199 drivers/net/ethernet/broadcom/bnxt/bnxt.c !bp->hwrm_short_cmd_req_addr) bp 4203 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_hwrm_kong_chnl(bp, req)) { bp 4207 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp = bp->hwrm_cmd_kong_resp_addr; bp 4208 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp_addr = (u8 *)bp->hwrm_cmd_kong_resp_addr; bp 4215 drivers/net/ethernet/broadcom/bnxt/bnxt.c req->seq_id = cpu_to_le16(bnxt_get_hwrm_seq_id(bp, dst)); bp 4218 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_intr_seq_id = le16_to_cpu(req->seq_id); bp 4220 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->fw_cap & BNXT_FW_CAP_SHORT_CMD) || bp 4222 drivers/net/ethernet/broadcom/bnxt/bnxt.c void *short_cmd_req = bp->hwrm_short_cmd_req_addr; bp 4229 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_msg_len = bp->hwrm_max_ext_req_len; bp 4241 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le64(bp->hwrm_short_cmd_req_dma_addr); bp 4253 drivers/net/ethernet/broadcom/bnxt/bnxt.c __iowrite32_copy(bp->bar0 + bar_offset, data, msg_len / 4); bp 4256 drivers/net/ethernet/broadcom/bnxt/bnxt.c writel(0, bp->bar0 + bar_offset + i); bp 4259 drivers/net/ethernet/broadcom/bnxt/bnxt.c writel(1, bp->bar0 + doorbell_offset); bp 4261 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!pci_is_enabled(bp->pdev)) bp 4280 drivers/net/ethernet/broadcom/bnxt/bnxt.c u16 seq_id = bp->hwrm_intr_seq_id; bp 4283 drivers/net/ethernet/broadcom/bnxt/bnxt.c while (bp->hwrm_intr_seq_id != (u16)~seq_id && bp 4294 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_intr_seq_id != (u16)~seq_id) { bp 4296 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Resp cmpl intr err msg: 0x%x\n", bp 4323 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Error (timeout: %d) msg {0x%x 0x%x} len:%d\n", bp 4342 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Error (timeout: %d) msg {0x%x 0x%x} len:%d v:%d\n", bp 4358 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm req_type 0x%x seq id 0x%x error 0x%x\n", bp 4364 drivers/net/ethernet/broadcom/bnxt/bnxt.c int _hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout) bp 4366 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, false); bp 4369 drivers/net/ethernet/broadcom/bnxt/bnxt.c int _hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len, bp 4372 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, true); bp 4375 drivers/net/ethernet/broadcom/bnxt/bnxt.c int hwrm_send_message(struct bnxt *bp, void *msg, u32 msg_len, int timeout) bp 4379 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4380 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, msg, msg_len, timeout); bp 4381 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4385 drivers/net/ethernet/broadcom/bnxt/bnxt.c int hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 msg_len, bp 4390 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4391 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_do_send_msg(bp, msg, msg_len, timeout, true); bp 4392 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4396 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_func_rgtr_async_events(struct bnxt *bp, unsigned long *bmap, bp 4404 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_RGTR, -1, -1); bp 4414 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) bp 4428 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4431 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp) bp 4433 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_drv_rgtr_output *resp = bp->hwrm_cmd_resp_addr; bp 4438 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_RGTR, -1, -1); bp 4446 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_HOT_RESET) bp 4448 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY) bp 4458 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 4479 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE) bp 4483 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4484 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4487 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_IF_CHANGE; bp 4488 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4492 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_drv_unrgtr(struct bnxt *bp) bp 4496 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_UNRGTR, -1, -1); bp 4497 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4500 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_tunnel_dst_port_free(struct bnxt *bp, u8 tunnel_type) bp 4505 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_TUNNEL_DST_PORT_FREE, -1, -1); bp 4510 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.tunnel_dst_port_id = bp->vxlan_fw_dst_port_id; bp 4513 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.tunnel_dst_port_id = bp->nge_fw_dst_port_id; bp 4519 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4521 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm_tunnel_dst_port_free failed. rc:%d\n", bp 4526 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, __be16 port, bp 4531 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_tunnel_dst_port_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 4533 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_TUNNEL_DST_PORT_ALLOC, -1, -1); bp 4538 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4539 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4541 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm_tunnel_dst_port_alloc failed. rc:%d\n", bp 4548 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vxlan_fw_dst_port_id = resp->tunnel_dst_port_id; bp 4551 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nge_fw_dst_port_id = resp->tunnel_dst_port_id; bp 4558 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4562 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, u16 vnic_id) bp 4565 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4567 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_L2_SET_RX_MASK, -1, -1); bp 4573 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4577 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_cfa_ntuple_filter_free(struct bnxt *bp, bp 4582 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_NTUPLE_FILTER_FREE, -1, -1); bp 4584 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4606 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_cfa_ntuple_filter_alloc(struct bnxt *bp, bp 4616 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_NTUPLE_FILTER_ALLOC, -1, -1); bp 4617 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.l2_filter_id = bp->vnic_info[0].fw_l2_filter_id[fltr->l2_fltr_idx]; bp 4619 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX) { bp 4622 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[0]; bp 4624 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[fltr->rxq + 1]; bp 4665 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4666 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4668 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp = bnxt_get_hwrm_resp_addr(bp, &req); bp 4671 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4676 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_set_vnic_filter(struct bnxt *bp, u16 vnic_id, u16 idx, bp 4681 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_cfa_l2_filter_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 4683 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_L2_FILTER_ALLOC, -1, -1); bp 4685 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 4688 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.dst_id = cpu_to_le16(bp->vnic_info[vnic_id].fw_vnic_id); bp 4701 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4702 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4704 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[vnic_id].fw_l2_filter_id[idx] = bp 4706 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4710 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_clear_vnic_filter(struct bnxt *bp) bp 4716 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4718 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; bp 4723 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, bp 4728 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 4733 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4738 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags) bp 4740 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4747 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_TPA_CFG, -1, -1); bp 4750 drivers/net/ethernet/broadcom/bnxt/bnxt.c u16 mss = bp->dev->mtu - 40; bp 4781 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 4783 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_aggs = bp->max_tpa; bp 4794 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4797 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u16 bnxt_cp_ring_from_grp(struct bnxt *bp, struct bnxt_ring_struct *ring) bp 4801 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_info = &bp->grp_info[ring->grp_idx]; bp 4805 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u16 bnxt_cp_ring_for_rx(struct bnxt *bp, struct bnxt_rx_ring_info *rxr) bp 4807 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 4814 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_cp_ring_from_grp(bp, &rxr->rx_ring_struct); bp 4818 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u16 bnxt_cp_ring_for_tx(struct bnxt *bp, struct bnxt_tx_ring_info *txr) bp 4820 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 4827 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_cp_ring_from_grp(bp, &txr->tx_ring_struct); bp 4831 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_set_rss(struct bnxt *bp, u16 vnic_id, bool set_rss) bp 4834 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4837 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_CHIP_P5) || bp 4841 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1); bp 4843 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.hash_type = cpu_to_le32(bp->rss_hash_cfg); bp 4846 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 4847 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_rings = bp->rx_nr_rings - 1; bp 4849 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_rings = bp->rx_nr_rings; bp 4866 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4869 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_set_rss_p5(struct bnxt *bp, u16 vnic_id, bool set_rss) bp 4871 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4872 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 i, j, k, nr_ctxs, max_rings = bp->rx_nr_rings; bp 4873 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[0]; bp 4876 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_CFG, -1, -1); bp 4879 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4882 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.hash_type = cpu_to_le32(bp->rss_hash_cfg); bp 4886 drivers/net/ethernet/broadcom/bnxt/bnxt.c nr_ctxs = DIV_ROUND_UP(bp->rx_nr_rings, 64); bp 4898 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_id = bnxt_cp_ring_for_rx(bp, rxr); bp 4904 drivers/net/ethernet/broadcom/bnxt/bnxt.c rxr = &bp->rx_ring[0]; bp 4907 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4914 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_set_hds(struct bnxt *bp, u16 vnic_id) bp 4916 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4919 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_PLCMODES_CFG, -1, -1); bp 4927 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.jumbo_thresh = cpu_to_le16(bp->rx_copy_thresh); bp 4928 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.hds_threshold = cpu_to_le16(bp->rx_copy_thresh); bp 4930 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4933 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_vnic_ctx_free_one(struct bnxt *bp, u16 vnic_id, bp 4938 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_COS_LB_CTX_FREE, -1, -1); bp 4940 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le16(bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx]); bp 4942 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4943 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx] = INVALID_HW_RING_ID; bp 4946 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_vnic_ctx_free(struct bnxt *bp) bp 4950 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) { bp 4951 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; bp 4955 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_ctx_free_one(bp, i, j); bp 4958 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rsscos_nr_ctxs = 0; bp 4961 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, u16 vnic_id, u16 ctx_idx) bp 4966 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_addr; bp 4968 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_RSS_COS_LB_CTX_ALLOC, -1, bp 4971 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 4972 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 4974 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[vnic_id].fw_rss_cos_lb_ctx[ctx_idx] = bp 4976 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 4981 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u32 bnxt_get_roce_vnic_mode(struct bnxt *bp) bp 4983 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_ROCE_MIRROR_CAP) bp 4988 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id) bp 4991 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 4995 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_CFG, -1, -1); bp 4997 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 4998 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[0]; bp 5003 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le16(bnxt_cp_ring_for_rx(bp, rxr)); bp 5017 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le16(bp->vnic_info[0].fw_rss_cos_lb_ctx[0]); bp 5025 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp) && bp 5037 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if ((vnic_id == 1) && BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 5038 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring = bp->rx_nr_rings - 1; bp 5040 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_idx = bp->rx_ring[ring].bnapi->index; bp 5041 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.dflt_ring_grp = cpu_to_le16(bp->grp_info[grp_idx].fw_grp_id); bp 5044 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.mru = cpu_to_le16(bp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + bp 5049 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) bp 5050 drivers/net/ethernet/broadcom/bnxt/bnxt.c def_vlan = bp->vf.vlan; bp 5052 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_STRIP_VLAN) || def_vlan) bp 5054 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!vnic_id && bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) bp 5055 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.flags |= cpu_to_le32(bnxt_get_roce_vnic_mode(bp)); bp 5057 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5060 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_free_one(struct bnxt *bp, u16 vnic_id) bp 5064 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vnic_info[vnic_id].fw_vnic_id != INVALID_HW_RING_ID) { bp 5067 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_FREE, -1, -1); bp 5069 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le32(bp->vnic_info[vnic_id].fw_vnic_id); bp 5071 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5072 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vnic_info[vnic_id].fw_vnic_id = INVALID_HW_RING_ID; bp 5077 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_vnic_free(struct bnxt *bp) bp 5081 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) bp 5082 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_free_one(bp, i); bp 5085 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_alloc(struct bnxt *bp, u16 vnic_id, bp 5092 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_vnic_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 5093 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 5095 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 5100 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_idx = bp->rx_ring[i].bnapi->index; bp 5101 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->grp_info[grp_idx].fw_grp_id == INVALID_HW_RING_ID) { bp 5102 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Not enough ring groups avail:%x req:%x\n", bp 5106 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic->fw_grp_ids[j] = bp->grp_info[grp_idx].fw_grp_id; bp 5115 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_ALLOC, -1, -1); bp 5117 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5118 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5121 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5125 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_vnic_qcaps(struct bnxt *bp) bp 5127 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_vnic_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 5131 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_ring_stats_size = sizeof(struct ctx_hw_stats); bp 5132 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~(BNXT_FLAG_NEW_RSS_CAP | BNXT_FLAG_ROCE_MIRROR_CAP); bp 5133 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10600) bp 5136 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_QCAPS, -1, -1); bp 5137 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5138 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5142 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5) && bp 5144 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_NEW_RSS_CAP; bp 5147 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_ROCE_MIRROR_CAP; bp 5148 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tpa_v2 = le16_to_cpu(resp->max_aggs_supported); bp 5149 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->max_tpa_v2) bp 5150 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_ring_stats_size = bp 5153 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5157 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp) bp 5162 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 5165 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5166 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 5169 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_addr; bp 5170 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int grp_idx = bp->rx_ring[i].bnapi->index; bp 5172 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_GRP_ALLOC, -1, -1); bp 5174 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.cr = cpu_to_le16(bp->grp_info[grp_idx].cp_fw_ring_id); bp 5175 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.rr = cpu_to_le16(bp->grp_info[grp_idx].rx_fw_ring_id); bp 5176 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.ar = cpu_to_le16(bp->grp_info[grp_idx].agg_fw_ring_id); bp 5177 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.sc = cpu_to_le16(bp->grp_info[grp_idx].fw_stats_ctx); bp 5179 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 5184 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[grp_idx].fw_grp_id = bp 5187 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5191 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_ring_grp_free(struct bnxt *bp) bp 5197 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->grp_info || (bp->flags & BNXT_FLAG_CHIP_P5)) bp 5200 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_GRP_FREE, -1, -1); bp 5202 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5203 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 5204 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->grp_info[i].fw_grp_id == INVALID_HW_RING_ID) bp 5207 drivers/net/ethernet/broadcom/bnxt/bnxt.c cpu_to_le32(bp->grp_info[i].fw_grp_id); bp 5209 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 5211 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].fw_grp_id = INVALID_HW_RING_ID; bp 5213 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5217 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int hwrm_ring_alloc_send_msg(struct bnxt *bp, bp 5223 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_ring_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 5228 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_ALLOC, -1, -1); bp 5251 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_info = &bp->grp_info[ring->grp_idx]; bp 5252 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.cmpl_ring_id = cpu_to_le16(bnxt_cp_ring_for_tx(bp, txr)); bp 5253 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.length = cpu_to_le32(bp->tx_ring_mask + 1); bp 5260 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.length = cpu_to_le32(bp->rx_ring_mask + 1); bp 5261 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5265 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_info = &bp->grp_info[ring->grp_idx]; bp 5266 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.rx_buf_size = cpu_to_le16(bp->rx_buf_use_size); bp 5276 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5279 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_info = &bp->grp_info[ring->grp_idx]; bp 5289 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.length = cpu_to_le32(bp->rx_agg_ring_mask + 1); bp 5293 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.length = cpu_to_le32(bp->cp_ring_mask + 1); bp 5294 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5296 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp_info = &bp->grp_info[map_index]; bp 5301 drivers/net/ethernet/broadcom/bnxt/bnxt.c } else if (bp->flags & BNXT_FLAG_USING_MSIX) { bp 5307 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.length = cpu_to_le32(bp->cp_ring_mask + 1); bp 5308 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_USING_MSIX) bp 5312 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm alloc invalid ring type %d\n", bp 5317 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5318 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5321 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5324 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm_ring_alloc type %d failed. rc:%x err:%x\n", bp 5332 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_set_async_event_cr(struct bnxt *bp, int idx) bp 5336 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 5339 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 5343 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5347 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_CFG, -1, -1); bp 5351 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5356 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type, bp 5359 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5360 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 5361 drivers/net/ethernet/broadcom/bnxt/bnxt.c db->doorbell = bp->bar1 + 0x10000; bp 5363 drivers/net/ethernet/broadcom/bnxt/bnxt.c db->doorbell = bp->bar1 + 0x4000; bp 5381 drivers/net/ethernet/broadcom/bnxt/bnxt.c db->doorbell = bp->bar1 + map_idx * 0x80; bp 5397 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_ring_alloc(struct bnxt *bp) bp 5399 drivers/net/ethernet/broadcom/bnxt/bnxt.c bool agg_rings = !!(bp->flags & BNXT_FLAG_AGG_RINGS); bp 5403 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 5407 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 5408 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 5414 drivers/net/ethernet/broadcom/bnxt/bnxt.c vector = bp->irq_tbl[map_idx].vector; bp 5416 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); bp 5421 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &cpr->cp_db, type, map_idx, ring->fw_ring_id); bp 5422 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_nq(bp, &cpr->cp_db, cpr->cp_raw_cons); bp 5424 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].cp_fw_ring_id = ring->fw_ring_id; bp 5427 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_async_event_cr(bp, ring->fw_ring_id); bp 5429 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Failed to set async event completion ring.\n"); bp 5434 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 5435 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 5439 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5449 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type2, map_idx); bp 5452 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &cpr2->cp_db, type2, map_idx, bp 5454 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_cq(bp, &cpr2->cp_db, cpr2->cp_raw_cons); bp 5458 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); bp 5461 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &txr->tx_db, type, map_idx, ring->fw_ring_id); bp 5465 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 5466 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 5471 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); bp 5474 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &rxr->rx_db, type, map_idx, ring->fw_ring_id); bp 5477 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod); bp 5478 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[map_idx].rx_fw_ring_id = ring->fw_ring_id; bp 5479 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5487 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type2, map_idx); bp 5490 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &cpr2->cp_db, type2, map_idx, bp 5492 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_cq(bp, &cpr2->cp_db, cpr2->cp_raw_cons); bp 5498 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 5499 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 5503 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 map_idx = grp_idx + bp->rx_nr_rings; bp 5505 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_ring_alloc_send_msg(bp, ring, type, map_idx); bp 5509 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_db(bp, &rxr->rx_agg_db, type, map_idx, bp 5511 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_agg_db, rxr->rx_agg_prod); bp 5512 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod); bp 5513 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[grp_idx].agg_fw_ring_id = ring->fw_ring_id; bp 5520 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int hwrm_ring_free_send_msg(struct bnxt *bp, bp 5526 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_ring_free_output *resp = bp->hwrm_cmd_resp_addr; bp 5529 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) bp 5532 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_FREE, cmpl_ring_id, -1); bp 5536 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5537 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5539 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5542 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm_ring_free type %d failed. rc:%x err:%x\n", bp 5549 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path) bp 5554 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 5557 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 5558 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[i]; bp 5562 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr); bp 5564 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ring_free_send_msg(bp, ring, bp 5572 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 5573 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 5578 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr); bp 5580 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ring_free_send_msg(bp, ring, bp 5585 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[grp_idx].rx_fw_ring_id = bp 5590 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 5594 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 5595 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i]; bp 5600 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr); bp 5602 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ring_free_send_msg(bp, ring, type, bp 5606 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[grp_idx].agg_fw_ring_id = bp 5615 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_disable_int_sync(bp); bp 5617 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 5621 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 5622 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 5634 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ring_free_send_msg(bp, ring, bp 5642 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwrm_ring_free_send_msg(bp, ring, type, bp 5645 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].cp_fw_ring_id = INVALID_HW_RING_ID; bp 5650 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max, bp 5653 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_get_rings(struct bnxt *bp) bp 5655 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 5656 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 5660 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10601) bp 5663 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); bp 5665 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 5666 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5668 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5673 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 5683 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5687 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 5690 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_trim_rings(bp, &rx, &tx, cp, false); bp 5691 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 5702 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 5707 drivers/net/ethernet/broadcom/bnxt/bnxt.c int __bnxt_hwrm_get_tx_rings(struct bnxt *bp, u16 fid, int *tx_rings) bp 5709 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 5713 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10601) bp 5716 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); bp 5718 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5725 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_rfs_supported(struct bnxt *bp); bp 5728 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req, bp 5734 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, req, HWRM_FUNC_CFG, -1, -1); bp 5738 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 5741 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5757 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5766 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_NEW_RSS_CAP) && bp 5767 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rfs_supported(bp)) bp 5778 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, bp 5785 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, req, HWRM_FUNC_VF_CFG, -1, -1); bp 5790 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5805 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 5820 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, bp 5826 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_pf_rings(bp, &req, tx_rings, rx_rings, ring_grps, bp 5831 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5835 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10601) bp 5836 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_resc.resv_tx_rings = tx_rings; bp 5838 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_get_rings(bp); bp 5843 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_reserve_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, bp 5849 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_NEW_RM(bp)) { bp 5850 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_resc.resv_tx_rings = tx_rings; bp 5854 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_vf_rings(bp, &req, tx_rings, rx_rings, ring_grps, bp 5856 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 5860 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_get_rings(bp); bp 5864 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_reserve_rings(struct bnxt *bp, int tx, int rx, int grp, bp 5867 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 5868 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_reserve_pf_rings(bp, tx, rx, grp, cp, stat, bp 5871 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_reserve_vf_rings(bp, tx, rx, grp, cp, stat, bp 5875 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_nq_rings_in_use(struct bnxt *bp) bp 5877 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bp->cp_nr_rings; bp 5880 drivers/net/ethernet/broadcom/bnxt/bnxt.c ulp_msix = bnxt_get_ulp_msix_num(bp); bp 5882 drivers/net/ethernet/broadcom/bnxt/bnxt.c ulp_base = bnxt_get_ulp_msix_base(bp); bp 5890 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_cp_rings_in_use(struct bnxt *bp) bp 5894 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 5895 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_nq_rings_in_use(bp); bp 5897 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = bp->tx_nr_rings + bp->rx_nr_rings; bp 5901 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_get_func_stat_ctxs(struct bnxt *bp) bp 5903 drivers/net/ethernet/broadcom/bnxt/bnxt.c int ulp_stat = bnxt_get_ulp_stat_ctxs(bp); bp 5904 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bp->cp_nr_rings; bp 5909 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_nq_rings_in_use(bp) > cp + bnxt_get_ulp_msix_num(bp)) bp 5910 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_get_ulp_msix_base(bp) + ulp_stat; bp 5915 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_need_reserve_rings(struct bnxt *bp) bp 5917 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 5918 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bnxt_cp_rings_in_use(bp); bp 5919 drivers/net/ethernet/broadcom/bnxt/bnxt.c int nq = bnxt_nq_rings_in_use(bp); bp 5920 drivers/net/ethernet/broadcom/bnxt/bnxt.c int rx = bp->rx_nr_rings, stat; bp 5923 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10601) bp 5926 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (hw_resc->resv_tx_rings != bp->tx_nr_rings) bp 5929 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_RFS) && !(bp->flags & BNXT_FLAG_CHIP_P5)) bp 5931 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 5933 drivers/net/ethernet/broadcom/bnxt/bnxt.c stat = bnxt_get_func_stat_ctxs(bp); bp 5934 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp) && bp 5938 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->flags & BNXT_FLAG_CHIP_P5)))) bp 5940 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_CHIP_P5) && BNXT_PF(bp) && bp 5946 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_reserve_rings(struct bnxt *bp) bp 5948 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 5949 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bnxt_nq_rings_in_use(bp); bp 5950 drivers/net/ethernet/broadcom/bnxt/bnxt.c int tx = bp->tx_nr_rings; bp 5951 drivers/net/ethernet/broadcom/bnxt/bnxt.c int rx = bp->rx_nr_rings; bp 5956 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_need_reserve_rings(bp)) bp 5959 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_SHARED_RINGS) bp 5961 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_RFS) && !(bp->flags & BNXT_FLAG_CHIP_P5)) bp 5963 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 5965 drivers/net/ethernet/broadcom/bnxt/bnxt.c grp = bp->rx_nr_rings; bp 5966 drivers/net/ethernet/broadcom/bnxt/bnxt.c stat = bnxt_get_func_stat_ctxs(bp); bp 5968 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_reserve_rings(bp, tx, rx, grp, cp, stat, vnic); bp 5973 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 5982 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) { bp 5986 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) bp 5989 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_AGG_RINGS; bp 5990 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_NO_AGG_RINGS; bp 5991 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->hw_features &= ~NETIF_F_LRO; bp 5992 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->features &= ~NETIF_F_LRO; bp 5993 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 5997 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = min_t(int, cp, bp->cp_nr_rings); bp 5998 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (stat > bnxt_get_ulp_stat_ctxs(bp)) bp 5999 drivers/net/ethernet/broadcom/bnxt/bnxt.c stat -= bnxt_get_ulp_stat_ctxs(bp); bp 6001 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_trim_rings(bp, &rx_rings, &tx, cp, sh); bp 6002 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 6005 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = tx; bp 6006 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = rx_rings; bp 6007 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = cp; bp 6015 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_check_vf_rings(struct bnxt *bp, int tx_rings, int rx_rings, bp 6023 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_NEW_RM(bp)) bp 6026 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_vf_rings(bp, &req, tx_rings, rx_rings, ring_grps, bp 6034 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 6038 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6042 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_check_pf_rings(struct bnxt *bp, int tx_rings, int rx_rings, bp 6050 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_reserve_pf_rings(bp, &req, tx_rings, rx_rings, ring_grps, bp 6053 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 6058 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 6066 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6070 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_check_rings(struct bnxt *bp, int tx_rings, int rx_rings, bp 6074 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10801) bp 6077 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 6078 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_check_pf_rings(bp, tx_rings, rx_rings, bp 6082 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_check_vf_rings(bp, tx_rings, rx_rings, ring_grps, bp 6086 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_coal_params_qcaps(struct bnxt *bp) bp 6088 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_ring_aggint_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 6089 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_coal_cap *coal_cap = &bp->coal_cap; bp 6103 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10902) bp 6106 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_AGGINT_QCAPS, -1, -1); bp 6107 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6108 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6128 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6131 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u16 bnxt_usec_to_coal_tmr(struct bnxt *bp, u16 usec) bp 6133 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_coal_cap *coal_cap = &bp->coal_cap; bp 6138 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_set_coal_params(struct bnxt *bp, bp 6142 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_coal_cap *coal_cap = &bp->coal_cap; bp 6161 drivers/net/ethernet/broadcom/bnxt/bnxt.c tmr = bnxt_usec_to_coal_tmr(bp, hw_coal->coal_ticks); bp 6179 drivers/net/ethernet/broadcom/bnxt/bnxt.c tmr = bnxt_usec_to_coal_tmr(bp, hw_coal->coal_ticks_irq); bp 6197 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_hwrm_set_coal_nq(struct bnxt *bp, struct bnxt_napi *bnapi, bp 6202 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_coal_cap *coal_cap = &bp->coal_cap; bp 6209 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS, bp 6215 drivers/net/ethernet/broadcom/bnxt/bnxt.c tmr = bnxt_usec_to_coal_tmr(bp, hw_coal->coal_ticks) / 2; bp 6219 drivers/net/ethernet/broadcom/bnxt/bnxt.c return _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6222 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_set_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi) bp 6231 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(&coal, &bp->rx_coal, sizeof(struct bnxt_coal)); bp 6239 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req_rx, bp 6242 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_coal_params(bp, &coal, &req_rx); bp 6244 drivers/net/ethernet/broadcom/bnxt/bnxt.c req_rx.ring_id = cpu_to_le16(bnxt_cp_ring_for_rx(bp, bnapi->rx_ring)); bp 6246 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req_rx, sizeof(req_rx), bp 6250 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_set_coal(struct bnxt *bp) bp 6256 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req_rx, bp 6258 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req_tx, bp 6261 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_coal_params(bp, &bp->rx_coal, &req_rx); bp 6262 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_coal_params(bp, &bp->tx_coal, &req_tx); bp 6264 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6265 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 6266 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 6272 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_id = bnxt_cp_ring_for_tx(bp, bnapi->tx_ring); bp 6275 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_id = bnxt_cp_ring_for_rx(bp, bnapi->rx_ring); bp 6279 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, req, sizeof(*req), bp 6284 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 6289 drivers/net/ethernet/broadcom/bnxt/bnxt.c ring_id = bnxt_cp_ring_for_tx(bp, bnapi->tx_ring); bp 6291 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, req, sizeof(*req), bp 6297 drivers/net/ethernet/broadcom/bnxt/bnxt.c hw_coal = &bp->rx_coal; bp 6299 drivers/net/ethernet/broadcom/bnxt/bnxt.c hw_coal = &bp->tx_coal; bp 6300 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_hwrm_set_coal_nq(bp, bnapi, hw_coal); bp 6302 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6306 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_stat_ctx_free(struct bnxt *bp) bp 6311 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 6314 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 6317 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_STAT_CTX_FREE, -1, -1); bp 6319 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6320 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 6321 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 6327 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 6333 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6337 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp) bp 6341 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_stat_ctx_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 6343 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 6346 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_STAT_CTX_ALLOC, -1, -1); bp 6348 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.stats_dma_length = cpu_to_le16(bp->hw_ring_stats_size); bp 6349 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.update_period_ms = cpu_to_le32(bp->stats_coal_ticks / 1000); bp 6351 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6352 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 6353 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 6358 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 6365 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id; bp 6367 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6371 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_qcfg(struct bnxt *bp) bp 6374 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 6378 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); bp 6380 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6381 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6386 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) { bp 6387 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vf_info *vf = &bp->vf; bp 6391 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pf.registered_vfs = le16_to_cpu(resp->registered_vfs); bp 6397 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_LLDP_AGENT; bp 6399 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_DCBX_AGENT; bp 6401 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp) && (flags & FUNC_QCFG_RESP_FLAGS_MULTI_HOST)) bp 6402 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_MULTI_HOST; bp 6408 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->port_partition_type = resp->port_partition_type; bp 6411 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10707 || bp 6413 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->br_mode = BRIDGE_MODE_VEB; bp 6415 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->br_mode = BRIDGE_MODE_VEPA; bp 6417 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->br_mode = BRIDGE_MODE_UNDEF; bp 6419 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_mtu = le16_to_cpu(resp->max_mtu_configured); bp 6420 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->max_mtu) bp 6421 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_mtu = BNXT_MAX_MTU; bp 6424 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6428 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp) bp 6432 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_resp_addr; bp 6435 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10902 || BNXT_VF(bp) || bp->ctx) bp 6438 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_BACKING_STORE_QCAPS, -1, -1); bp 6439 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6440 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6451 drivers/net/ethernet/broadcom/bnxt/bnxt.c ctx_pg = kzalloc(sizeof(*ctx_pg) * (bp->max_q + 1), GFP_KERNEL); bp 6457 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->max_q + 1; i++, ctx_pg++) bp 6460 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ctx = ctx; bp 6496 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6529 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_backing_store_cfg(struct bnxt *bp, u32 enables) bp 6532 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_ctx_mem_info *ctx = bp->ctx; bp 6544 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_BACKING_STORE_CFG, -1, -1); bp 6626 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6630 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_ctx_mem_blk(struct bnxt *bp, bp 6641 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_alloc_ring(bp, rmem); bp 6644 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp, bp 6669 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg); bp 6690 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_mem_blk(bp, pg_tbl); bp 6698 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg); bp 6703 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ctx_pg_tbls(struct bnxt *bp, bp 6720 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, rmem2); bp 6728 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ring(bp, rmem); bp 6732 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_ctx_mem(struct bnxt *bp) bp 6734 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_ctx_mem_info *ctx = bp->ctx; bp 6741 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->max_q + 1; i++) bp 6742 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, ctx->tqm_mem[i]); bp 6747 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->tim_mem); bp 6748 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->mrav_mem); bp 6749 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->stat_mem); bp 6750 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->vnic_mem); bp 6751 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->cq_mem); bp 6752 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->srq_mem); bp 6753 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_pg_tbls(bp, &ctx->qp_mem); bp 6757 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_ctx_mem(struct bnxt *bp) bp 6768 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_backing_store_qcaps(bp); bp 6770 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Failed querying context mem capability, rc = %d.\n", bp 6774 drivers/net/ethernet/broadcom/bnxt/bnxt.c ctx = bp->ctx; bp 6778 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_ROCE_CAP) && !is_kdump_kernel()) { bp 6788 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, pg_lvl); bp 6795 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, pg_lvl); bp 6802 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, pg_lvl); bp 6810 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, 1); bp 6817 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, 1); bp 6822 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_ROCE_CAP)) bp 6833 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, 2); bp 6845 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, 1); bp 6855 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->max_q + 1; i++) { bp 6859 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_pg_tbls(bp, ctx_pg, mem_size, 1); bp 6865 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_backing_store_cfg(bp, ena); bp 6867 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Failed configuring context mem, rc = %d.\n", bp 6875 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all) bp 6877 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_resource_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 6879 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 6882 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_RESOURCE_QCAPS, -1, -1); bp 6885 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6886 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message_silent(bp, &req, sizeof(req), bp 6912 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 6919 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 6920 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 6928 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 6932 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) bp 6936 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 6937 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 6940 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCAPS, -1, -1); bp 6943 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 6944 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 6950 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_ROCEV1_CAP; bp 6952 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_ROCEV2_CAP; bp 6954 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_PCIE_STATS_SUPPORTED; bp 6956 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_EXT_STATS_SUPPORTED; bp 6958 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_ERROR_RECOVERY; bp 6960 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_ERR_RECOVER_RELOAD; bp 6962 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_thresh = 0; bp 6964 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_push_thresh = BNXT_TX_PUSH_THRESH; bp 6977 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 6978 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 6982 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->dev_port = pf->port_id; bp 6992 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_WOL_CAP; bp 6994 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_WOL_CAP; bp 6997 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vf_info *vf = &bp->vf; bp 7005 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7009 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp); bp 7011 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_qcaps(struct bnxt *bp) bp 7015 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_hwrm_func_qcaps(bp); bp 7018 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_queue_qportcfg(bp); bp 7020 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm query qportcfg failure rc: %d\n", rc); bp 7023 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10803) { bp 7024 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_ctx_mem(bp); bp 7027 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_resc_qcaps(bp, true); bp 7029 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_NEW_RM; bp 7034 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_cfa_adv_flow_mgnt_qcaps(struct bnxt *bp) bp 7041 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->fw_cap & BNXT_FW_CAP_CFA_ADV_FLOW)) bp 7044 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp = bp->hwrm_cmd_resp_addr; bp 7045 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, -1, -1); bp 7047 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 7048 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7055 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX; bp 7058 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7062 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_map_fw_health_regs(struct bnxt *bp) bp 7064 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 7084 drivers/net/ethernet/broadcom/bnxt/bnxt.c writel(reg_base, bp->bar0 + BNXT_GRCPF_REG_WINDOW_BASE_OUT + bp 7089 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp) bp 7091 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_error_recovery_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 7092 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 7096 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) bp 7099 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_ERROR_RECOVERY_QCFG, -1, -1); bp 7100 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 7101 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7106 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->fw_cap & BNXT_FW_CAP_KONG_MB_CHNL)) { bp 7143 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7145 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_map_fw_health_regs(bp); bp 7147 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY; bp 7151 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_func_reset(struct bnxt *bp) bp 7155 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_RESET, -1, -1); bp 7158 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_RESET_TIMEOUT); bp 7161 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_queue_qportcfg(struct bnxt *bp) bp 7165 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_queue_qportcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 7169 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_QPORTCFG, -1, -1); bp 7171 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 7172 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7180 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tc = resp->max_configurable_queues; bp 7181 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_lltc = resp->max_configurable_lossless_queues; bp 7182 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->max_tc > BNXT_MAX_QUEUE) bp 7183 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tc = BNXT_MAX_QUEUE; bp 7185 drivers/net/ethernet/broadcom/bnxt/bnxt.c no_rdma = !(bp->flags & BNXT_FLAG_ROCE_CAP); bp 7187 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0, j = 0; i < bp->max_tc; i++) { bp 7188 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->q_info[j].queue_id = *qptr; bp 7189 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->q_ids[i] = *qptr++; bp 7190 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->q_info[j].queue_profile = *qptr++; bp 7191 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tc_to_qidx[j] = j; bp 7192 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_CNPQ(bp->q_info[j].queue_profile) || bp 7193 drivers/net/ethernet/broadcom/bnxt/bnxt.c (no_rdma && BNXT_PF(bp))) bp 7196 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_q = bp->max_tc; bp 7197 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tc = max_t(u8, j, 1); bp 7200 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_tc = 1; bp 7202 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->max_lltc > bp->max_tc) bp 7203 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->max_lltc = bp->max_tc; bp 7206 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7210 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_hwrm_ver_get(struct bnxt *bp, bool silent) bp 7215 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VER_GET, -1, -1); bp 7220 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_do_send_msg(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT, bp 7225 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_ver_get(struct bnxt *bp) bp 7227 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_ver_get_output *resp = bp->hwrm_cmd_resp_addr; bp 7231 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_max_req_len = HWRM_MAX_REQ_LEN; bp 7232 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 7233 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_hwrm_ver_get(bp, false); bp 7237 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(&bp->ver_resp, resp, sizeof(struct hwrm_ver_get_output)); bp 7239 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_spec_code = resp->hwrm_intf_maj_8b << 16 | bp 7243 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "HWRM interface %d.%d.%d is older than 1.0.0.\n", bp 7246 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Please update firmware with HWRM interface 1.0.0 or newer.\n"); bp 7248 drivers/net/ethernet/broadcom/bnxt/bnxt.c snprintf(bp->fw_ver_str, BC_HWRM_STR_LEN, "%d.%d.%d.%d", bp 7253 drivers/net/ethernet/broadcom/bnxt/bnxt.c int fw_ver_len = strlen(bp->fw_ver_str); bp 7255 drivers/net/ethernet/broadcom/bnxt/bnxt.c snprintf(bp->fw_ver_str + fw_ver_len, bp 7258 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_PKG_VER; bp 7261 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_timeout = le16_to_cpu(resp->def_req_timeout); bp 7262 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->hwrm_cmd_timeout) bp 7263 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT; bp 7266 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_max_req_len = le16_to_cpu(resp->max_req_win_len); bp 7267 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_max_ext_req_len = le16_to_cpu(resp->max_ext_req_len); bp 7269 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_max_ext_req_len < HWRM_MAX_REQ_LEN) bp 7270 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_max_ext_req_len = HWRM_MAX_REQ_LEN; bp 7272 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->chip_num = le16_to_cpu(resp->chip_num); bp 7273 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->chip_num == CHIP_NUM_58700 && !resp->chip_rev && bp 7275 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_CHIP_NITRO_A0; bp 7280 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_SHORT_CMD; bp 7283 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_KONG_MB_CHNL; bp 7287 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_OVS_64BIT_HANDLE; bp 7291 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_TRUSTED_VF; bp 7295 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap |= BNXT_FW_CAP_CFA_ADV_FLOW; bp 7298 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7302 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_fw_set_time(struct bnxt *bp) bp 7308 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((BNXT_VF(bp) && bp->hwrm_spec_code < 0x10901) || bp 7309 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_spec_code < 0x10400) bp 7313 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FW_SET_TIME, -1, -1); bp 7320 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7323 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_port_qstats(struct bnxt *bp) bp 7326 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 7329 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_PORT_STATS)) bp 7332 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_QSTATS, -1, -1); bp 7334 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.tx_stat_host_addr = cpu_to_le64(bp->hw_tx_port_stats_map); bp 7335 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.rx_stat_host_addr = cpu_to_le64(bp->hw_rx_port_stats_map); bp 7336 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7340 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp) bp 7342 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_port_qstats_ext_output *resp = bp->hwrm_cmd_resp_addr; bp 7345 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 7349 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_PORT_STATS_EXT)) bp 7352 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_QSTATS_EXT, -1, -1); bp 7355 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.rx_stat_host_addr = cpu_to_le64(bp->hw_rx_port_stats_ext_map); bp 7356 drivers/net/ethernet/broadcom/bnxt/bnxt.c tx_stat_size = bp->hw_tx_port_stats_ext ? bp 7357 drivers/net/ethernet/broadcom/bnxt/bnxt.c sizeof(*bp->hw_tx_port_stats_ext) : 0; bp 7359 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.tx_stat_host_addr = cpu_to_le64(bp->hw_tx_port_stats_ext_map); bp 7360 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 7361 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7363 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_rx_stats_ext_size = le16_to_cpu(resp->rx_stat_size) / 8; bp 7364 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_tx_stats_ext_size = tx_stat_size ? bp 7367 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_rx_stats_ext_size = 0; bp 7368 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_tx_stats_ext_size = 0; bp 7370 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_tx_stats_ext_size <= bp 7372 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7373 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pri2cos_valid = 0; bp 7377 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req2, HWRM_QUEUE_PRI2COS_QCFG, -1, -1); bp 7380 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req2, sizeof(req2), HWRM_CMD_TIMEOUT); bp 7386 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp2 = bp->hwrm_cmd_resp_addr; bp 7395 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pri2cos_valid = false; bp 7398 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (j = 0; j < bp->max_q; j++) { bp 7399 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->q_ids[j] == queue_id) bp 7400 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pri2cos_idx[i] = queue_idx; bp 7403 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pri2cos_valid = 1; bp 7406 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 7410 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_pcie_qstats(struct bnxt *bp) bp 7414 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_PCIE_STATS)) bp 7417 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PCIE_QSTATS, -1, -1); bp 7419 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.pcie_stat_host_addr = cpu_to_le64(bp->hw_pcie_stats_map); bp 7420 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7423 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_free_tunnel_ports(struct bnxt *bp) bp 7425 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vxlan_port_cnt) { bp 7427 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN); bp 7429 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vxlan_port_cnt = 0; bp 7430 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->nge_port_cnt) { bp 7432 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE); bp 7434 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nge_port_cnt = 0; bp 7437 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_set_tpa(struct bnxt *bp, bool set_tpa) bp 7443 drivers/net/ethernet/broadcom/bnxt/bnxt.c tpa_flags = bp->flags & BNXT_FLAG_TPA; bp 7444 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) bp 7446 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) { bp 7447 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_set_tpa(bp, i, tpa_flags); bp 7449 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic set tpa failure rc for vnic %d: %x\n", bp 7457 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_clear_vnic_rss(struct bnxt *bp) bp 7461 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->nr_vnics; i++) bp 7462 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_set_rss(bp, i, false); bp 7465 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_clear_vnic(struct bnxt *bp) bp 7467 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->vnic_info) bp 7470 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_clear_vnic_filter(bp); bp 7471 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) { bp 7473 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_clear_vnic_rss(bp); bp 7474 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_ctx_free(bp); bp 7477 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_TPA) bp 7478 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_tpa(bp, false); bp 7479 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_free(bp); bp 7480 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 7481 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_ctx_free(bp); bp 7484 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_resource_free(struct bnxt *bp, bool close_path, bp 7487 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_vnic(bp); bp 7488 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_ring_free(bp, close_path); bp 7489 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_ring_grp_free(bp); bp 7491 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_stat_ctx_free(bp); bp 7492 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_free_tunnel_ports(bp); bp 7496 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_set_br_mode(struct bnxt *bp, u16 br_mode) bp 7501 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 7510 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7514 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_set_cache_line_size(struct bnxt *bp, int size) bp 7519 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp) || bp->hwrm_spec_code < 0x10803) bp 7522 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 7529 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 7533 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) bp 7535 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id]; bp 7542 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, 0); bp 7544 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d alloc failure rc: %x\n", bp 7548 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rsscos_nr_ctxs++; bp 7550 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) { bp 7551 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, 1); bp 7553 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d cos ctx alloc failure rc: %x\n", bp 7557 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rsscos_nr_ctxs++; bp 7562 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_cfg(bp, vnic_id); bp 7564 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d cfg failure rc: %x\n", bp 7570 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_set_rss(bp, vnic_id, true); bp 7572 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d set rss failure rc: %x\n", bp 7577 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) { bp 7578 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_set_hds(bp, vnic_id); bp 7580 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d set hds failure rc: %x\n", bp 7589 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_setup_vnic_p5(struct bnxt *bp, u16 vnic_id) bp 7593 drivers/net/ethernet/broadcom/bnxt/bnxt.c nr_ctxs = DIV_ROUND_UP(bp->rx_nr_rings, 64); bp 7595 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic_id, i); bp 7597 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d ctx %d alloc failure rc: %x\n", bp 7601 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rsscos_nr_ctxs++; bp 7606 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic_id, true); bp 7608 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d set rss failure rc: %d\n", bp 7612 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_cfg(bp, vnic_id); bp 7614 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d cfg failure rc: %x\n", bp 7618 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) { bp 7619 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_set_hds(bp, vnic_id); bp 7621 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d set hds failure rc: %x\n", bp 7628 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_setup_vnic(struct bnxt *bp, u16 vnic_id) bp 7630 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 7631 drivers/net/ethernet/broadcom/bnxt/bnxt.c return __bnxt_setup_vnic_p5(bp, vnic_id); bp 7633 drivers/net/ethernet/broadcom/bnxt/bnxt.c return __bnxt_setup_vnic(bp, vnic_id); bp 7636 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_alloc_rfs_vnics(struct bnxt *bp) bp 7641 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 7644 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->rx_nr_rings; i++) { bp 7649 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (vnic_id >= bp->nr_vnics) bp 7652 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[vnic_id]; bp 7654 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NEW_RSS_CAP) bp 7656 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_alloc(bp, vnic_id, ring_id, 1); bp 7658 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic %d alloc failure rc: %x\n", bp 7662 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_setup_vnic(bp, vnic_id); bp 7673 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_promisc_ok(struct bnxt *bp) bp 7676 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp) && !bp->vf.vlan) bp 7682 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_setup_nitroa0_vnic(struct bnxt *bp) bp 7686 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_alloc(bp, 1, bp->rx_nr_rings - 1, 1); bp 7688 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Cannot allocate special vnic for NS2 A0: %x\n", bp 7693 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_cfg(bp, 1); bp 7695 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Cannot allocate special vnic for NS2 A0: %x\n", bp 7705 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init) bp 7707 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; bp 7709 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int rx_nr_rings = bp->rx_nr_rings; bp 7712 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_stat_ctx_alloc(bp); bp 7714 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm stat ctx alloc failure rc: %x\n", bp 7720 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_ring_alloc(bp); bp 7722 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm ring alloc failure rc: %x\n", rc); bp 7726 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_ring_grp_alloc(bp); bp 7728 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm_ring_grp alloc failure: %x\n", rc); bp 7732 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 7736 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_vnic_alloc(bp, 0, 0, rx_nr_rings); bp 7738 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm vnic alloc failure rc: %x\n", rc); bp 7742 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_setup_vnic(bp, 0); bp 7746 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_RFS) { bp 7747 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_rfs_vnics(bp); bp 7752 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_TPA) { bp 7753 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_set_tpa(bp, true); bp 7758 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) bp 7759 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_update_vf_mac(bp); bp 7762 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_vnic_filter(bp, 0, 0, bp->dev->dev_addr); bp 7764 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "HWRM vnic filter failure rc: %x\n", rc); bp 7770 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->dev->flags & IFF_BROADCAST) bp 7773 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->dev->flags & IFF_PROMISC) && bnxt_promisc_ok(bp)) bp 7776 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->dev->flags & IFF_ALLMULTI) { bp 7782 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_mc_list_updated(bp, &mask); bp 7786 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_cfg_rx_mode(bp); bp 7790 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_coal(bp); bp 7792 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "HWRM set coalescing failure rc: %x\n", bp 7795 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) { bp 7796 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_setup_nitroa0_vnic(bp); bp 7798 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Special vnic setup failure for NS2 A0 rc: %x\n", bp 7802 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) { bp 7803 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_qcfg(bp); bp 7804 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_update_features(bp->dev); bp 7810 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_resource_free(bp, 0, true); bp 7815 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_shutdown_nic(struct bnxt *bp, bool irq_re_init) bp 7817 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_resource_free(bp, 1, irq_re_init); bp 7821 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_nic(struct bnxt *bp, bool irq_re_init) bp 7823 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_cp_rings(bp); bp 7824 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_rx_rings(bp); bp 7825 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_tx_rings(bp); bp 7826 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_ring_grps(bp, irq_re_init); bp 7827 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_vnics(bp); bp 7829 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_init_chip(bp, irq_re_init); bp 7832 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_set_real_num_queues(struct bnxt *bp) bp 7835 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 7837 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = netif_set_real_num_tx_queues(dev, bp->tx_nr_rings - bp 7838 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_xdp); bp 7842 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = netif_set_real_num_rx_queues(dev, bp->rx_nr_rings); bp 7847 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_RFS) bp 7848 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev->rx_cpu_rmap = alloc_irq_cpu_rmap(bp->rx_nr_rings); bp 7854 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_trim_rings(struct bnxt *bp, int *rx, int *tx, int max, bp 7878 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_setup_msix(struct bnxt *bp) bp 7880 drivers/net/ethernet/broadcom/bnxt/bnxt.c const int len = sizeof(bp->irq_tbl[0].name); bp 7881 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 7889 drivers/net/ethernet/broadcom/bnxt/bnxt.c count = bp->tx_nr_rings_per_tc; bp 7895 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 7896 drivers/net/ethernet/broadcom/bnxt/bnxt.c int map_idx = bnxt_cp_num_to_irq_num(bp, i); bp 7899 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_SHARED_RINGS) bp 7901 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (i < bp->rx_nr_rings) bp 7906 drivers/net/ethernet/broadcom/bnxt/bnxt.c snprintf(bp->irq_tbl[map_idx].name, len, "%s-%s-%d", dev->name, bp 7908 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl[map_idx].handler = bnxt_msix; bp 7912 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_setup_inta(struct bnxt *bp) bp 7914 drivers/net/ethernet/broadcom/bnxt/bnxt.c const int len = sizeof(bp->irq_tbl[0].name); bp 7916 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netdev_get_num_tc(bp->dev)) bp 7917 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_reset_tc(bp->dev); bp 7919 drivers/net/ethernet/broadcom/bnxt/bnxt.c snprintf(bp->irq_tbl[0].name, len, "%s-%s-%d", bp->dev->name, "TxRx", bp 7921 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl[0].handler = bnxt_inta; bp 7924 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_setup_int_mode(struct bnxt *bp) bp 7928 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_USING_MSIX) bp 7929 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_setup_msix(bp); bp 7931 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_setup_inta(bp); bp 7933 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_set_real_num_queues(bp); bp 7938 drivers/net/ethernet/broadcom/bnxt/bnxt.c static unsigned int bnxt_get_max_func_rss_ctxs(struct bnxt *bp) bp 7940 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bp->hw_resc.max_rsscos_ctxs; bp 7943 drivers/net/ethernet/broadcom/bnxt/bnxt.c static unsigned int bnxt_get_max_func_vnics(struct bnxt *bp) bp 7945 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bp->hw_resc.max_vnics; bp 7949 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp) bp 7951 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bp->hw_resc.max_stat_ctxs; bp 7954 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp) bp 7956 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bp->hw_resc.max_cp_rings; bp 7959 drivers/net/ethernet/broadcom/bnxt/bnxt.c static unsigned int bnxt_get_max_func_cp_rings_for_en(struct bnxt *bp) bp 7961 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int cp = bp->hw_resc.max_cp_rings; bp 7963 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 7964 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp -= bnxt_get_ulp_msix_num(bp); bp 7969 drivers/net/ethernet/broadcom/bnxt/bnxt.c static unsigned int bnxt_get_max_func_irqs(struct bnxt *bp) bp 7971 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 7973 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 7979 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_set_max_func_irqs(struct bnxt *bp, unsigned int max_irqs) bp 7981 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hw_resc.max_irqs = max_irqs; bp 7984 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int bnxt_get_avail_cp_rings_for_en(struct bnxt *bp) bp 7988 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = bnxt_get_max_func_cp_rings_for_en(bp); bp 7989 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 7990 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp - bp->rx_nr_rings - bp->tx_nr_rings; bp 7992 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp - bp->cp_nr_rings; bp 7995 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int bnxt_get_avail_stat_ctxs_for_en(struct bnxt *bp) bp 7997 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_get_max_func_stat_ctxs(bp) - bnxt_get_func_stat_ctxs(bp); bp 8000 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_get_avail_msix(struct bnxt *bp, int num) bp 8002 drivers/net/ethernet/broadcom/bnxt/bnxt.c int max_cp = bnxt_get_max_func_cp_rings(bp); bp 8003 drivers/net/ethernet/broadcom/bnxt/bnxt.c int max_irq = bnxt_get_max_func_irqs(bp); bp 8004 drivers/net/ethernet/broadcom/bnxt/bnxt.c int total_req = bp->cp_nr_rings + num; bp 8007 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_idx = bp->total_irqs; bp 8008 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 8009 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_idx = min_t(int, bp->total_irqs, max_cp); bp 8010 drivers/net/ethernet/broadcom/bnxt/bnxt.c avail_msix = max_idx - bp->cp_nr_rings; bp 8011 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_NEW_RM(bp) || avail_msix >= num) bp 8015 drivers/net/ethernet/broadcom/bnxt/bnxt.c num = max_irq - bp->cp_nr_rings; bp 8022 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_get_num_msix(struct bnxt *bp) bp 8024 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_NEW_RM(bp)) bp 8025 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_get_max_func_irqs(bp); bp 8027 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_nq_rings_in_use(bp); bp 8030 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_msix(struct bnxt *bp) bp 8035 drivers/net/ethernet/broadcom/bnxt/bnxt.c total_vecs = bnxt_get_num_msix(bp); bp 8036 drivers/net/ethernet/broadcom/bnxt/bnxt.c max = bnxt_get_max_func_irqs(bp); bp 8052 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_SHARED_RINGS)) bp 8055 drivers/net/ethernet/broadcom/bnxt/bnxt.c total_vecs = pci_enable_msix_range(bp->pdev, msix_ent, min, total_vecs); bp 8056 drivers/net/ethernet/broadcom/bnxt/bnxt.c ulp_msix = bnxt_get_ulp_msix_num(bp); bp 8062 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl = kcalloc(total_vecs, sizeof(struct bnxt_irq), GFP_KERNEL); bp 8063 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->irq_tbl) { bp 8065 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl[i].vector = msix_ent[i].vector; bp 8067 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->total_irqs = total_vecs; bp 8069 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_trim_rings(bp, &bp->rx_nr_rings, &bp->tx_nr_rings, bp 8074 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = (min == 1) ? bp 8075 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_t(int, bp->tx_nr_rings, bp->rx_nr_rings) : bp 8076 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings + bp->rx_nr_rings; bp 8082 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_USING_MSIX; bp 8087 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_init_msix err: %x\n", rc); bp 8088 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->irq_tbl); bp 8089 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl = NULL; bp 8090 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_disable_msix(bp->pdev); bp 8095 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_inta(struct bnxt *bp) bp 8097 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl = kcalloc(1, sizeof(struct bnxt_irq), GFP_KERNEL); bp 8098 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->irq_tbl) bp 8101 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->total_irqs = 1; bp 8102 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = 1; bp 8103 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = 1; bp 8104 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = 1; bp 8105 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_SHARED_RINGS; bp 8106 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl[0].vector = bp->pdev->irq; bp 8110 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_int_mode(struct bnxt *bp) bp 8114 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_MSIX_CAP) bp 8115 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_msix(bp); bp 8117 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_USING_MSIX) && BNXT_PF(bp)) { bp 8119 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_inta(bp); bp 8124 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_clear_int_mode(struct bnxt *bp) bp 8126 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_USING_MSIX) bp 8127 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_disable_msix(bp->pdev); bp 8129 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->irq_tbl); bp 8130 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->irq_tbl = NULL; bp 8131 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_USING_MSIX; bp 8134 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init) bp 8136 drivers/net/ethernet/broadcom/bnxt/bnxt.c int tcs = netdev_get_num_tc(bp->dev); bp 8140 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_need_reserve_rings(bp)) bp 8143 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (irq_re_init && BNXT_NEW_RM(bp) && bp 8144 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_num_msix(bp) != bp->total_irqs) { bp 8145 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_stop(bp); bp 8146 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 8149 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_reserve_rings(bp); bp 8152 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_int_mode(bp); bp 8153 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_restart(bp, rc); bp 8156 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "ring reservation/IRQ init failure rc: %d\n", rc); bp 8159 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (tcs && (bp->tx_nr_rings_per_tc * tcs != bp->tx_nr_rings)) { bp 8160 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "tx ring reservation failure\n"); bp 8161 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_reset_tc(bp->dev); bp 8162 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->tx_nr_rings; bp 8168 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_free_irq(struct bnxt *bp) bp 8174 drivers/net/ethernet/broadcom/bnxt/bnxt.c free_irq_cpu_rmap(bp->dev->rx_cpu_rmap); bp 8175 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->rx_cpu_rmap = NULL; bp 8177 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->irq_tbl || !bp->bnapi) bp 8180 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 8181 drivers/net/ethernet/broadcom/bnxt/bnxt.c int map_idx = bnxt_cp_num_to_irq_num(bp, i); bp 8183 drivers/net/ethernet/broadcom/bnxt/bnxt.c irq = &bp->irq_tbl[map_idx]; bp 8190 drivers/net/ethernet/broadcom/bnxt/bnxt.c free_irq(irq->vector, bp->bnapi[i]); bp 8197 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_request_irq(struct bnxt *bp) bp 8205 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_setup_int_mode(bp); bp 8207 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_setup_int_mode err: %x\n", bp 8212 drivers/net/ethernet/broadcom/bnxt/bnxt.c rmap = bp->dev->rx_cpu_rmap; bp 8214 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_USING_MSIX)) bp 8217 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0, j = 0; i < bp->cp_nr_rings; i++) { bp 8218 drivers/net/ethernet/broadcom/bnxt/bnxt.c int map_idx = bnxt_cp_num_to_irq_num(bp, i); bp 8219 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_irq *irq = &bp->irq_tbl[map_idx]; bp 8222 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (rmap && bp->bnapi[i]->rx_ring) { bp 8225 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "failed adding irq rmap for ring %d\n", bp 8231 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i]); bp 8238 drivers/net/ethernet/broadcom/bnxt/bnxt.c int numa_node = dev_to_node(&bp->pdev->dev); bp 8245 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, bp 8255 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_del_napi(struct bnxt *bp) bp 8259 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 8262 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 8263 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 8274 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_init_napi(struct bnxt *bp) bp 8277 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int cp_nr_rings = bp->cp_nr_rings; bp 8280 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_USING_MSIX) { bp 8283 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 8285 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 8288 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi = bp->bnapi[i]; bp 8289 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_napi_add(bp->dev, &bnapi->napi, poll_fn, 64); bp 8291 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) { bp 8292 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi = bp->bnapi[cp_nr_rings]; bp 8293 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_napi_add(bp->dev, &bnapi->napi, bp 8297 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi = bp->bnapi[0]; bp 8298 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_napi_add(bp->dev, &bnapi->napi, bnxt_poll, 64); bp 8302 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_disable_napi(struct bnxt *bp) bp 8306 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bnapi) bp 8309 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 8310 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; bp 8312 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bnapi[i]->rx_ring) bp 8315 drivers/net/ethernet/broadcom/bnxt/bnxt.c napi_disable(&bp->bnapi[i]->napi); bp 8319 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_enable_napi(struct bnxt *bp) bp 8323 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 8324 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; bp 8325 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bnapi[i]->in_reset = false; bp 8327 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bnapi[i]->rx_ring) { bp 8331 drivers/net/ethernet/broadcom/bnxt/bnxt.c napi_enable(&bp->bnapi[i]->napi); bp 8335 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_tx_disable(struct bnxt *bp) bp 8340 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->tx_ring) { bp 8341 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 8342 drivers/net/ethernet/broadcom/bnxt/bnxt.c txr = &bp->tx_ring[i]; bp 8347 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_tx_disable(bp->dev); bp 8348 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_carrier_off(bp->dev); bp 8351 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_tx_enable(struct bnxt *bp) bp 8356 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->tx_nr_rings; i++) { bp 8357 drivers/net/ethernet/broadcom/bnxt/bnxt.c txr = &bp->tx_ring[i]; bp 8360 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_tx_wake_all_queues(bp->dev); bp 8361 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.link_up) bp 8362 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_carrier_on(bp->dev); bp 8365 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_report_link(struct bnxt *bp) bp 8367 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.link_up) { bp 8373 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_carrier_on(bp->dev); bp 8374 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL) bp 8378 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.pause == BNXT_LINK_PAUSE_BOTH) bp 8380 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (bp->link_info.pause == BNXT_LINK_PAUSE_TX) bp 8382 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (bp->link_info.pause == BNXT_LINK_PAUSE_RX) bp 8386 drivers/net/ethernet/broadcom/bnxt/bnxt.c speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed); bp 8387 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "NIC Link is Up, %u Mbps %s duplex, Flow control: %s\n", bp 8389 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_EEE_CAP) bp 8390 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "EEE is %s\n", bp 8391 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->eee.eee_active ? "active" : bp 8393 drivers/net/ethernet/broadcom/bnxt/bnxt.c fec = bp->link_info.fec_cfg; bp 8395 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "FEC autoneg %s encodings: %s\n", bp 8400 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_carrier_off(bp->dev); bp 8401 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "NIC Link is Down\n"); bp 8405 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_phy_qcaps(struct bnxt *bp) bp 8409 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_port_phy_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 8410 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 8412 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_EEE_CAP; bp 8413 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->test_info) bp 8414 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->test_info->flags &= ~BNXT_TEST_FL_EXT_LPBK; bp 8415 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10201) bp 8418 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_QCAPS, -1, -1); bp 8420 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8421 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8426 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct ethtool_eee *eee = &bp->eee; bp 8429 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_EEE_CAP; bp 8431 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->lpi_tmr_lo = le32_to_cpu(resp->tx_lpi_timer_low) & bp 8433 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->lpi_tmr_hi = le32_to_cpu(resp->valid_tx_lpi_timer_high) & bp 8437 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->test_info) bp 8438 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->test_info->flags |= BNXT_TEST_FL_EXT_LPBK; bp 8444 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->port_count = resp->port_cnt; bp 8447 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8451 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_update_link(struct bnxt *bp, bool chng_link_state) bp 8454 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 8456 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_port_phy_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 8460 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_QCFG, -1, -1); bp 8462 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8463 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8465 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8472 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10800) bp 8500 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_EEE_CAP) { bp 8501 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct ethtool_eee *eee = &bp->eee; bp 8537 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10504) bp 8547 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_report_link(bp); bp 8552 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8554 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_SINGLE_PF(bp)) bp 8566 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_link_setting(bp, true, false); bp 8571 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_get_port_module_status(struct bnxt *bp) bp 8573 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 8577 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_update_link(bp, true)) bp 8585 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Unqualified SFP+ module detected on port %d\n", bp 8586 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pf.port_id); bp 8587 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10201) { bp 8588 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Module part number %s\n", bp 8592 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "TX is disabled\n"); bp 8594 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "SFP+ module is shutdown\n"); bp 8599 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) bp 8601 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL) { bp 8602 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10201) bp 8605 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_RX) bp 8607 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_TX) bp 8612 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_RX) bp 8614 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.req_flow_ctrl & BNXT_LINK_PAUSE_TX) bp 8618 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10201) { bp 8626 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_set_link_common(struct bnxt *bp, bp 8629 drivers/net/ethernet/broadcom/bnxt/bnxt.c u8 autoneg = bp->link_info.autoneg; bp 8630 drivers/net/ethernet/broadcom/bnxt/bnxt.c u16 fw_link_speed = bp->link_info.req_link_speed; bp 8631 drivers/net/ethernet/broadcom/bnxt/bnxt.c u16 advertising = bp->link_info.advertising; bp 8653 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_set_pause(struct bnxt *bp) bp 8658 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_CFG, -1, -1); bp 8659 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_pause_common(bp, &req); bp 8661 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL) || bp 8662 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.force_link_chng) bp 8663 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_link_common(bp, &req); bp 8665 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8666 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8667 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!rc && !(bp->link_info.autoneg & BNXT_AUTONEG_FLOW_CTRL)) { bp 8672 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.pause = bp 8673 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.force_pause_setting = bp->link_info.req_flow_ctrl; bp 8674 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.auto_pause_setting = 0; bp 8675 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->link_info.force_link_chng) bp 8676 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_report_link(bp); bp 8678 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.force_link_chng = false; bp 8679 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8683 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwrm_set_eee(struct bnxt *bp, bp 8686 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct ethtool_eee *eee = &bp->eee; bp 8706 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_set_link_setting(struct bnxt *bp, bool set_pause, bool set_eee) bp 8710 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_CFG, -1, -1); bp 8712 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_pause_common(bp, &req); bp 8714 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_link_common(bp, &req); bp 8717 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_eee(bp, &req); bp 8718 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8721 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_shutdown_link(struct bnxt *bp) bp 8725 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_SINGLE_PF(bp)) bp 8728 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (pci_num_vf(bp->pdev)) bp 8731 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_CFG, -1, -1); bp 8733 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8736 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_fw_init_one(struct bnxt *bp); bp 8738 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_if_change(struct bnxt *bp, bool up) bp 8740 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_func_drv_if_change_output *resp = bp->hwrm_cmd_resp_addr; bp 8746 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->fw_cap & BNXT_FW_CAP_IF_CHANGE)) bp 8749 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_DRV_IF_CHANGE, -1, -1); bp 8752 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8753 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8756 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8768 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state) && !fw_reset) { bp 8769 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "RESET_DONE not set during FW reset.\n"); bp 8774 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_mem(bp); bp 8775 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->ctx); bp 8776 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ctx = NULL; bp 8777 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_fw_init_one(bp); bp 8779 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_ABORT_ERR, &bp->state); bp 8782 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 8783 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_int_mode(bp); bp 8785 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "init int mode failed\n"); bp 8788 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_FW_RESET_DET, &bp->state); bp 8790 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 8791 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 8793 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_resc_qcaps(bp, true); bp 8802 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = 0; bp 8803 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = 0; bp 8810 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_port_led_qcaps(struct bnxt *bp) bp 8812 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_port_led_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 8814 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 8817 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->num_leds = 0; bp 8818 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp) || bp->hwrm_spec_code < 0x10601) bp 8821 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_LED_QCAPS, -1, -1); bp 8823 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8824 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8826 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8832 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->num_leds = resp->num_leds; bp 8833 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(bp->leds, &resp->led0_id, sizeof(bp->leds[0]) * bp 8834 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->num_leds); bp 8835 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->num_leds; i++) { bp 8836 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_led_info *led = &bp->leds[i]; bp 8841 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->num_leds = 0; bp 8846 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8850 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp) bp 8853 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_wol_filter_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 8856 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_WOL_FILTER_ALLOC, -1, -1); bp 8857 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 8860 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(req.mac_address, bp->dev->dev_addr, ETH_ALEN); bp 8861 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8862 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8864 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->wol_filter_id = resp->wol_filter_id; bp 8865 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8869 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_hwrm_free_wol_fltr(struct bnxt *bp) bp 8874 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_WOL_FILTER_FREE, -1, -1); bp 8875 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 8877 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.wol_filter_id = bp->wol_filter_id; bp 8878 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8882 drivers/net/ethernet/broadcom/bnxt/bnxt.c static u16 bnxt_hwrm_get_wol_fltrs(struct bnxt *bp, u16 handle) bp 8885 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_wol_filter_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 8889 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_WOL_FILTER_QCFG, -1, -1); bp 8890 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 8892 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8893 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 8899 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->wol = 1; bp 8900 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->wol_filter_id = resp->wol_filter_id; bp 8904 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8908 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_get_wol_settings(struct bnxt *bp) bp 8912 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->wol = 0; bp 8913 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_PF(bp) || !(bp->flags & BNXT_FLAG_WOL_CAP)) bp 8917 drivers/net/ethernet/broadcom/bnxt/bnxt.c handle = bnxt_hwrm_get_wol_fltrs(bp, handle); bp 8927 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = dev_get_drvdata(dev); bp 8930 drivers/net/ethernet/broadcom/bnxt/bnxt.c resp = bp->hwrm_cmd_resp_addr; bp 8931 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_TEMP_MONITOR_QUERY, -1, -1); bp 8932 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 8933 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!_hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT)) bp 8935 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 8947 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwmon_close(struct bnxt *bp) bp 8949 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwmon_dev) { bp 8950 drivers/net/ethernet/broadcom/bnxt/bnxt.c hwmon_device_unregister(bp->hwmon_dev); bp 8951 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwmon_dev = NULL; bp 8955 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwmon_open(struct bnxt *bp) bp 8957 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 8959 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwmon_dev) bp 8962 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, bp 8963 drivers/net/ethernet/broadcom/bnxt/bnxt.c DRV_MODULE_NAME, bp, bp 8965 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (IS_ERR(bp->hwmon_dev)) { bp 8966 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwmon_dev = NULL; bp 8971 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwmon_close(struct bnxt *bp) bp 8975 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_hwmon_open(struct bnxt *bp) bp 8980 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_eee_config_ok(struct bnxt *bp) bp 8982 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct ethtool_eee *eee = &bp->eee; bp 8983 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 8985 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_EEE_CAP)) bp 9004 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_update_phy_setting(struct bnxt *bp) bp 9010 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 9012 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_update_link(bp, true); bp 9014 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "failed to update link (rc: %x)\n", bp 9018 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_SINGLE_PF(bp)) bp 9045 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!netif_carrier_ok(bp->dev)) bp 9048 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_eee_config_ok(bp)) bp 9052 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_link_setting(bp, update_pause, update_eee); bp 9054 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_pause(bp); bp 9056 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "failed to update phy setting (rc: %x)\n", bp 9069 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_preset_reg_win(struct bnxt *bp) bp 9071 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 9074 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar0 + BNXT_GRCPF_REG_WINDOW_BASE_OUT + 12); bp 9078 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_dflt_ring_mode(struct bnxt *bp); bp 9080 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) bp 9084 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_preset_reg_win(bp); bp 9085 drivers/net/ethernet/broadcom/bnxt/bnxt.c netif_carrier_off(bp->dev); bp 9088 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_dflt_ring_mode(bp); bp 9090 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Failed to reserve default rings at open\n"); bp 9094 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_reserve_rings(bp, irq_re_init); bp 9097 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_RFS) && bp 9098 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->flags & BNXT_FLAG_USING_MSIX)) { bp 9100 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->hw_features &= ~NETIF_F_NTUPLE; bp 9101 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_RFS; bp 9104 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_mem(bp, irq_re_init); bp 9106 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_alloc_mem err: %x\n", rc); bp 9111 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_napi(bp); bp 9112 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_request_irq(bp); bp 9114 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_request_irq err: %x\n", rc); bp 9119 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_enable_napi(bp); bp 9120 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_debug_dev_init(bp); bp 9122 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_nic(bp, irq_re_init); bp 9124 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_init_nic err: %x\n", rc); bp 9129 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->link_lock); bp 9130 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_update_phy_setting(bp); bp 9131 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->link_lock); bp 9133 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "failed to update phy settings\n"); bp 9134 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_SINGLE_PF(bp)) { bp 9135 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.phy_retry = true; bp 9136 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.phy_retry_expires = bp 9143 drivers/net/ethernet/broadcom/bnxt/bnxt.c udp_tunnel_get_rx_info(bp->dev); bp 9145 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_OPEN, &bp->state); bp 9146 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_enable_int(bp); bp 9148 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tx_enable(bp); bp 9149 drivers/net/ethernet/broadcom/bnxt/bnxt.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 9151 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_port_module_status(bp); bp 9154 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 9155 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_vf_reps_open(bp); bp 9159 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_debug_dev_exit(bp); bp 9160 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_disable_napi(bp); bp 9163 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_del_napi(bp); bp 9166 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_skbs(bp); bp 9167 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_irq(bp); bp 9168 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_mem(bp, true); bp 9173 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) bp 9177 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_open_nic(bp, irq_re_init, link_re_init); bp 9179 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "nic open fail (rc: %x)\n", rc); bp 9180 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 9189 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_half_open_nic(struct bnxt *bp) bp 9193 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_mem(bp, false); bp 9195 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_alloc_mem err: %x\n", rc); bp 9198 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_nic(bp, false); bp 9200 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_init_nic err: %x\n", rc); bp 9206 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_skbs(bp); bp 9207 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_mem(bp, false); bp 9208 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 9215 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_half_close_nic(struct bnxt *bp) bp 9217 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_resource_free(bp, false, false); bp 9218 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_skbs(bp); bp 9219 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_mem(bp, false); bp 9224 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9227 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_ABORT_ERR, &bp->state)) { bp 9228 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "A previous firmware reset did not complete, aborting\n"); bp 9232 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_if_change(bp, true); bp 9235 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_open_nic(bp, true, true); bp 9237 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_if_change(bp, false); bp 9239 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state) && bp 9240 drivers/net/ethernet/broadcom/bnxt/bnxt.c BNXT_PF(bp)) { bp 9241 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_pf_info *pf = &bp->pf; bp 9245 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cfg_hw_sriov(bp, &n, true); bp 9247 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwmon_open(bp); bp 9253 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_drv_busy(struct bnxt *bp) bp 9255 drivers/net/ethernet/broadcom/bnxt/bnxt.c return (test_bit(BNXT_STATE_IN_SP_TASK, &bp->state) || bp 9256 drivers/net/ethernet/broadcom/bnxt/bnxt.c test_bit(BNXT_STATE_READ_STATS, &bp->state)); bp 9259 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_get_ring_stats(struct bnxt *bp, bp 9262 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void __bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bp 9266 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 9267 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_vf_reps_close(bp); bp 9270 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tx_disable(bp); bp 9272 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_OPEN, &bp->state); bp 9274 drivers/net/ethernet/broadcom/bnxt/bnxt.c while (bnxt_drv_busy(bp)) bp 9278 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_shutdown_nic(bp, irq_re_init); bp 9282 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_debug_dev_exit(bp); bp 9283 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_disable_napi(bp); bp 9284 drivers/net/ethernet/broadcom/bnxt/bnxt.c del_timer_sync(&bp->timer); bp 9285 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_skbs(bp); bp 9288 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bnapi && irq_re_init) bp 9289 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_ring_stats(bp, &bp->net_stats_prev); bp 9291 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_irq(bp); bp 9292 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_del_napi(bp); bp 9294 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_mem(bp, irq_re_init); bp 9297 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_close_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) bp 9301 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) { bp 9309 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "FW reset in progress during close, FW reset will be aborted\n"); bp 9310 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_ABORT_ERR, &bp->state); bp 9314 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->sriov_cfg) { bp 9315 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = wait_event_interruptible_timeout(bp->sriov_cfg_wait, bp 9316 drivers/net/ethernet/broadcom/bnxt/bnxt.c !bp->sriov_cfg, bp 9319 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "timeout waiting for SRIOV config operation to complete!\n"); bp 9322 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_close_nic(bp, irq_re_init, link_re_init); bp 9328 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9330 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwmon_close(bp); bp 9331 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, true, true); bp 9332 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_shutdown_link(bp); bp 9333 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_if_change(bp, false); bp 9337 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_port_phy_read(struct bnxt *bp, u16 phy_addr, u16 reg, bp 9340 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_port_phy_mdio_read_output *resp = bp->hwrm_cmd_resp_addr; bp 9344 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10a00) bp 9347 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_MDIO_READ, -1, -1); bp 9348 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 9358 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 9359 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 9362 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 9366 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_hwrm_port_phy_write(struct bnxt *bp, u16 phy_addr, u16 reg, bp 9371 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10a00) bp 9374 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_MDIO_WRITE, -1, -1); bp 9375 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 9386 drivers/net/ethernet/broadcom/bnxt/bnxt.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 9393 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9398 drivers/net/ethernet/broadcom/bnxt/bnxt.c mdio->phy_id = bp->link_info.phy_addr; bp 9407 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_port_phy_read(bp, mdio->phy_id, mdio->reg_num, bp 9417 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_port_phy_write(bp, mdio->phy_id, mdio->reg_num, bp 9427 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_get_ring_stats(struct bnxt *bp, bp 9433 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 9434 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 9463 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_add_prev_stats(struct bnxt *bp, bp 9466 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct rtnl_link_stats64 *prev_stats = &bp->net_stats_prev; bp 9480 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9482 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_READ_STATS, &bp->state); bp 9487 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_OPEN, &bp->state)) { bp 9488 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_READ_STATS, &bp->state); bp 9489 drivers/net/ethernet/broadcom/bnxt/bnxt.c *stats = bp->net_stats_prev; bp 9493 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_ring_stats(bp, stats); bp 9494 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_add_prev_stats(bp, stats); bp 9496 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_PORT_STATS) { bp 9497 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct rx_port_stats *rx = bp->hw_rx_port_stats; bp 9498 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct tx_port_stats *tx = bp->hw_tx_port_stats; bp 9511 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_READ_STATS, &bp->state); bp 9514 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_mc_list_updated(struct bnxt *bp, u32 *rx_mask) bp 9516 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 9517 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; bp 9548 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_uc_list_updated(struct bnxt *bp) bp 9550 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 9551 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; bp 9569 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9575 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_OPEN, &bp->state)) bp 9578 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnic = &bp->vnic_info[0]; bp 9585 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((dev->flags & IFF_PROMISC) && bnxt_promisc_ok(bp)) bp 9588 drivers/net/ethernet/broadcom/bnxt/bnxt.c uc_update = bnxt_uc_list_updated(bp); bp 9596 drivers/net/ethernet/broadcom/bnxt/bnxt.c mc_update = bnxt_mc_list_updated(bp, &mask); bp 9602 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RX_MASK_SP_EVENT, &bp->sp_event); bp 9603 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 9607 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_cfg_rx_mode(struct bnxt *bp) bp 9609 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 9610 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; bp 9616 drivers/net/ethernet/broadcom/bnxt/bnxt.c uc_update = bnxt_uc_list_updated(bp); bp 9622 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 9626 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_L2_FILTER_FREE, -1, bp 9631 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 9634 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 9651 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_vnic_filter(bp, 0, i, vnic->uc_list + off); bp 9653 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "HWRM vnic filter failure rc: %x\n", bp 9661 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0); bp 9663 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "Failed setting MC filters rc: %d, turning on ALL_MCAST mode\n", bp 9667 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0); bp 9670 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %d\n", bp 9676 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_can_reserve_rings(struct bnxt *bp) bp 9679 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp) && BNXT_VF(bp)) { bp 9680 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 9688 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!netif_running(bp->dev)) bp 9696 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_rfs_supported(struct bnxt *bp) bp 9698 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 9699 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX) bp 9703 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp) && !BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 9705 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NEW_RSS_CAP) bp 9711 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool bnxt_rfs_capable(struct bnxt *bp) bp 9716 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 9717 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_rfs_supported(bp); bp 9718 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_MSIX_CAP) || !bnxt_can_reserve_rings(bp)) bp 9721 drivers/net/ethernet/broadcom/bnxt/bnxt.c vnics = 1 + bp->rx_nr_rings; bp 9722 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_vnics = bnxt_get_max_func_vnics(bp); bp 9723 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_rss_ctxs = bnxt_get_max_func_rss_ctxs(bp); bp 9726 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NEW_RSS_CAP) bp 9729 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->rx_nr_rings > 1) bp 9730 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, bp 9736 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_NEW_RM(bp)) bp 9739 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (vnics == bp->hw_resc.resv_vnics) bp 9742 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_reserve_rings(bp, 0, 0, 0, 0, 0, vnics); bp 9743 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (vnics <= bp->hw_resc.resv_vnics) bp 9746 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Unable to reserve resources to support NTUPLE filters.\n"); bp 9747 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_reserve_rings(bp, 0, 0, 0, 0, 0, 1); bp 9757 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9760 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((features & NETIF_F_NTUPLE) && !bnxt_rfs_capable(bp)) bp 9763 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NO_AGG_RINGS) bp 9787 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_VF(bp)) { bp 9788 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vf.vlan) { bp 9799 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9800 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 flags = bp->flags; bp 9812 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_NO_AGG_RINGS) bp 9821 drivers/net/ethernet/broadcom/bnxt/bnxt.c changes = flags ^ bp->flags; bp 9824 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_TPA) == 0 || bp 9826 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bp->flags & BNXT_FLAG_CHIP_P5)) bp 9833 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (flags != bp->flags) { bp 9834 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 old_flags = bp->flags; bp 9836 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_OPEN, &bp->state)) { bp 9837 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags = flags; bp 9839 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 9844 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, false, false); bp 9845 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags = flags; bp 9847 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 9849 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_open_nic(bp, false, false); bp 9852 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags = flags; bp 9853 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_set_tpa(bp, bp 9857 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags = old_flags; bp 9863 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_dbg_hwrm_ring_info_get(struct bnxt *bp, u8 ring_type, bp 9866 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct hwrm_dbg_ring_info_get_output *resp = bp->hwrm_cmd_resp_addr; bp 9870 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_DBG_RING_INFO_GET, -1, -1); bp 9873 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->hwrm_cmd_lock); bp 9874 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 9879 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->hwrm_cmd_lock); bp 9891 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bnapi->bp->dev, "[%d]: tx{fw_ring: %d prod: %x cons: %x}\n", bp 9904 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bnapi->bp->dev, "[%d]: rx{fw_ring: %d prod: %x} rx_agg{fw_ring: %d agg_prod: %x sw_agg_prod: %x}\n", bp 9915 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bnapi->bp->dev, "[%d]: cp{fw_ring: %d raw_cons: %x}\n", bp 9919 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_dbg_dump_states(struct bnxt *bp) bp 9924 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 9925 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnapi = bp->bnapi[i]; bp 9926 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_msg_drv(bp)) { bp 9934 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_reset_task(struct bnxt *bp, bool silent) bp 9937 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dbg_dump_states(bp); bp 9938 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) { bp 9942 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_stop(bp); bp 9943 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, false, false); bp 9944 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_open_nic(bp, false, false); bp 9946 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_start(bp); bp 9952 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 9954 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "TX timeout detected, starting reset task!\n"); bp 9955 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event); bp 9956 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 9959 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_fw_health_check(struct bnxt *bp) bp 9961 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 9964 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) bp 9972 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG); bp 9978 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG); bp 9986 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_FW_EXCEPTION_SP_EVENT, &bp->sp_event); bp 9987 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 9992 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = from_timer(bp, t, timer); bp 9993 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 9998 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (atomic_read(&bp->intr_sem) != 0) bp 10001 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY) bp 10002 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_health_check(bp); bp 10004 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS) && bp 10005 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->stats_coal_ticks) { bp 10006 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event); bp 10007 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 10010 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_tc_flower_enabled(bp)) { bp 10011 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_FLOW_STATS_SP_EVENT, &bp->sp_event); bp 10012 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 10015 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->link_info.phy_retry) { bp 10016 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (time_after(jiffies, bp->link_info.phy_retry_expires)) { bp 10017 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.phy_retry = 0; bp 10018 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "failed to update phy settings after maximum retries.\n"); bp 10020 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_UPDATE_PHY_SP_EVENT, &bp->sp_event); bp 10021 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 10025 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & BNXT_FLAG_CHIP_P5) && netif_carrier_ok(dev)) { bp 10026 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RING_COAL_NOW_SP_EVENT, &bp->sp_event); bp 10027 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 10030 drivers/net/ethernet/broadcom/bnxt/bnxt.c mod_timer(&bp->timer, jiffies + bp->current_interval); bp 10033 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_rtnl_lock_sp(struct bnxt *bp) bp 10040 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state); bp 10044 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_rtnl_unlock_sp(struct bnxt *bp) bp 10046 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_IN_SP_TASK, &bp->state); bp 10051 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_reset(struct bnxt *bp, bool silent) bp 10053 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_lock_sp(bp); bp 10054 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_OPEN, &bp->state)) bp 10055 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_reset_task(bp, silent); bp 10056 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_unlock_sp(bp); bp 10059 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_fw_reset_close(struct bnxt *bp) bp 10061 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_close_nic(bp, true, false); bp 10062 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_stop(bp); bp 10066 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) bp 10067 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_disable_device(bp->pdev); bp 10068 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 10069 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_drv_unrgtr(bp); bp 10070 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (pci_is_enabled(bp->pdev)) bp 10071 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_disable_device(bp->pdev); bp 10072 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_mem(bp); bp 10073 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->ctx); bp 10074 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ctx = NULL; bp 10077 drivers/net/ethernet/broadcom/bnxt/bnxt.c static bool is_bnxt_fw_ok(struct bnxt *bp) bp 10079 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 10083 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG); bp 10087 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG); bp 10098 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_force_fw_reset(struct bnxt *bp) bp 10100 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 10103 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_OPEN, &bp->state) || bp 10104 drivers/net/ethernet/broadcom/bnxt/bnxt.c test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) bp 10107 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10108 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_reset_close(bp); bp 10113 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW; bp 10115 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_timestamp = jiffies + wait_dsecs * HZ / 10; bp 10117 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp 10120 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_min_dsecs = fw_health->post_reset_wait_dsecs; bp 10121 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_max_dsecs = fw_health->post_reset_max_wait_dsecs; bp 10122 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10); bp 10125 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_fw_exception(struct bnxt *bp) bp 10127 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_FW_FATAL_COND, &bp->state); bp 10128 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_lock_sp(bp); bp 10129 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_force_fw_reset(bp); bp 10130 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_unlock_sp(bp); bp 10136 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_get_registered_vfs(struct bnxt *bp) bp 10141 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_PF(bp)) bp 10144 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_qcfg(bp); bp 10146 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "func_qcfg cmd failed, rc = %d\n", rc); bp 10149 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->pf.registered_vfs) bp 10150 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bp->pf.registered_vfs; bp 10151 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->sriov_cfg) bp 10157 drivers/net/ethernet/broadcom/bnxt/bnxt.c void bnxt_fw_reset(struct bnxt *bp) bp 10159 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_lock_sp(bp); bp 10160 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_OPEN, &bp->state) && bp 10161 drivers/net/ethernet/broadcom/bnxt/bnxt.c !test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) { bp 10164 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10165 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->pf.active_vfs && bp 10166 drivers/net/ethernet/broadcom/bnxt/bnxt.c !test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) bp 10167 drivers/net/ethernet/broadcom/bnxt/bnxt.c n = bnxt_get_registered_vfs(bp); bp 10169 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware reset aborted, rc = %d\n", bp 10171 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10172 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 10177 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_reset_max_dsecs < vf_tmo_dsecs) bp 10178 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_max_dsecs = vf_tmo_dsecs; bp 10179 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = bp 10181 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, HZ / 10); bp 10184 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_reset_close(bp); bp 10185 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) { bp 10186 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN; bp 10189 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp 10190 drivers/net/ethernet/broadcom/bnxt/bnxt.c tmo = bp->fw_reset_min_dsecs * HZ / 10; bp 10192 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, tmo); bp 10195 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_rtnl_unlock_sp(bp); bp 10198 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_chk_missed_irq(struct bnxt *bp) bp 10202 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 10205 drivers/net/ethernet/broadcom/bnxt/bnxt.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 10206 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 10220 drivers/net/ethernet/broadcom/bnxt/bnxt.c !bnxt_has_work(bp, cpr2)) bp 10228 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dbg_hwrm_ring_info_get(bp, bp 10240 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = container_of(work, struct bnxt, sp_task); bp 10242 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_STATE_IN_SP_TASK, &bp->state); bp 10244 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_OPEN, &bp->state)) { bp 10245 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state); bp 10249 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_RX_MASK_SP_EVENT, &bp->sp_event)) bp 10250 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cfg_rx_mode(bp); bp 10252 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_RX_NTP_FLTR_SP_EVENT, &bp->sp_event)) bp 10253 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cfg_ntp_filters(bp); bp 10254 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_HWRM_EXEC_FWD_REQ_SP_EVENT, &bp->sp_event)) bp 10255 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_exec_fwd_req(bp); bp 10256 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event)) { bp 10258 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, bp->vxlan_port, bp 10261 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_VXLAN_DEL_PORT_SP_EVENT, &bp->sp_event)) { bp 10263 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN); bp 10265 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_GENEVE_ADD_PORT_SP_EVENT, &bp->sp_event)) { bp 10267 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, bp->nge_port, bp 10270 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_GENEVE_DEL_PORT_SP_EVENT, &bp->sp_event)) { bp 10272 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE); bp 10274 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event)) { bp 10275 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_port_qstats(bp); bp 10276 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_port_qstats_ext(bp); bp 10277 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_pcie_qstats(bp); bp 10280 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event)) { bp 10283 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->link_lock); bp 10285 drivers/net/ethernet/broadcom/bnxt/bnxt.c &bp->sp_event)) bp 10286 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_phy_qcaps(bp); bp 10288 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_update_link(bp, true); bp 10289 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->link_lock); bp 10291 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "SP task can't update link (rc: %x)\n", bp 10294 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_UPDATE_PHY_SP_EVENT, &bp->sp_event)) { bp 10297 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->link_lock); bp 10298 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_update_phy_setting(bp); bp 10299 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->link_lock); bp 10301 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "update phy settings retry failed\n"); bp 10303 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->link_info.phy_retry = false; bp 10304 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "update phy settings retry succeeded\n"); bp 10307 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event)) { bp 10308 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_lock(&bp->link_lock); bp 10309 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_port_module_status(bp); bp 10310 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_unlock(&bp->link_lock); bp 10313 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_FLOW_STATS_SP_EVENT, &bp->sp_event)) bp 10314 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_tc_flow_stats_work(bp); bp 10316 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_RING_COAL_NOW_SP_EVENT, &bp->sp_event)) bp 10317 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_chk_missed_irq(bp); bp 10322 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event)) bp 10323 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_reset(bp, false); bp 10325 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_RESET_TASK_SILENT_SP_EVENT, &bp->sp_event)) bp 10326 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_reset(bp, true); bp 10328 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_FW_RESET_NOTIFY_SP_EVENT, &bp->sp_event)) bp 10329 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_devlink_health_report(bp, BNXT_FW_RESET_NOTIFY_SP_EVENT); bp 10331 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_FW_EXCEPTION_SP_EVENT, &bp->sp_event)) { bp 10332 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!is_bnxt_fw_ok(bp)) bp 10333 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_devlink_health_report(bp, bp 10338 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_SP_TASK, &bp->state); bp 10342 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, bp 10353 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_get_max_rings(bp, &max_rx, &max_tx, sh); bp 10365 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->flags & (BNXT_FLAG_RFS | BNXT_FLAG_CHIP_P5)) == BNXT_FLAG_RFS) bp 10368 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 10372 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_NEW_RM(bp)) { bp 10373 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp += bnxt_get_ulp_msix_num(bp); bp 10374 drivers/net/ethernet/broadcom/bnxt/bnxt.c stats += bnxt_get_ulp_stat_ctxs(bp); bp 10376 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_check_rings(bp, tx_rings_needed, rx_rings, rx, cp, bp 10380 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_unmap_bars(struct bnxt *bp, struct pci_dev *pdev) bp 10382 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bar2) { bp 10383 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_iounmap(pdev, bp->bar2); bp 10384 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar2 = NULL; bp 10387 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bar1) { bp 10388 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_iounmap(pdev, bp->bar1); bp 10389 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar1 = NULL; bp 10392 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->bar0) { bp 10393 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_iounmap(pdev, bp->bar0); bp 10394 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar0 = NULL; bp 10398 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_cleanup_pci(struct bnxt *bp) bp 10400 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_unmap_bars(bp, bp->pdev); bp 10401 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_release_regions(bp->pdev); bp 10402 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (pci_is_enabled(bp->pdev)) bp 10403 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_disable_device(bp->pdev); bp 10406 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_init_dflt_coal(struct bnxt *bp) bp 10413 drivers/net/ethernet/broadcom/bnxt/bnxt.c coal = &bp->rx_coal; bp 10422 drivers/net/ethernet/broadcom/bnxt/bnxt.c coal = &bp->tx_coal; bp 10429 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->stats_coal_ticks = BNXT_DEF_STATS_COAL_TICKS; bp 10432 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_alloc_fw_health(struct bnxt *bp) bp 10434 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_health) bp 10437 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->fw_cap & BNXT_FW_CAP_HOT_RESET) && bp 10438 drivers/net/ethernet/broadcom/bnxt/bnxt.c !(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) bp 10441 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_health = kzalloc(sizeof(*bp->fw_health), GFP_KERNEL); bp 10442 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->fw_health) { bp 10443 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Failed to allocate fw_health\n"); bp 10444 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap &= ~BNXT_FW_CAP_HOT_RESET; bp 10445 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY; bp 10449 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_fw_init_one_p1(struct bnxt *bp) bp 10453 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap = 0; bp 10454 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_ver_get(bp); bp 10458 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_KONG_MB_CHNL) { bp 10459 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_kong_hwrm_resources(bp); bp 10461 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_cap &= ~BNXT_FW_CAP_KONG_MB_CHNL; bp 10464 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((bp->fw_cap & BNXT_FW_CAP_SHORT_CMD) || bp 10465 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_max_ext_req_len > BNXT_HWRM_MAX_REQ_LEN) { bp 10466 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_hwrm_short_cmd_req(bp); bp 10470 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_reset(bp); bp 10474 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_fw_set_time(bp); bp 10478 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_fw_init_one_p2(struct bnxt *bp) bp 10483 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_qcaps(bp); bp 10485 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "hwrm query capability failure rc: %x\n", bp 10490 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_cfa_adv_flow_mgnt_qcaps(bp); bp 10492 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "hwrm query adv flow mgnt failure rc: %d\n", bp 10495 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_alloc_fw_health(bp); bp 10496 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_error_recovery_qcfg(bp); bp 10498 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "hwrm query error recovery failure rc: %d\n", bp 10501 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_drv_rgtr(bp); bp 10505 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_rgtr_async_events(bp, NULL, 0); bp 10509 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_qcfg(bp); bp 10510 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_vnic_qcaps(bp); bp 10511 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_port_led_qcaps(bp); bp 10512 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ethtool_init(bp); bp 10513 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dcb_init(bp); bp 10517 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_set_dflt_rss_hash_type(struct bnxt *bp) bp 10519 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_UDP_RSS_CAP; bp 10520 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rss_hash_cfg = VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4 | bp 10524 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_P4(bp) && bp->hwrm_spec_code >= 0x10501) { bp 10525 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_UDP_RSS_CAP; bp 10526 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4 | bp 10531 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_set_dflt_rfs(struct bnxt *bp) bp 10533 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct net_device *dev = bp->dev; bp 10537 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_RFS; bp 10538 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_rfs_supported(bp)) { bp 10540 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_rfs_capable(bp)) { bp 10541 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_RFS; bp 10547 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_fw_init_one_p3(struct bnxt *bp) bp 10549 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 10551 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_dflt_rss_hash_type(bp); bp 10552 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_dflt_rfs(bp); bp 10554 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_wol_settings(bp); bp 10555 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_WOL_CAP) bp 10556 drivers/net/ethernet/broadcom/bnxt/bnxt.c device_set_wakeup_enable(&pdev->dev, bp->wol); bp 10560 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_set_cache_line_size(bp, cache_line_size()); bp 10561 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_coal_params_qcaps(bp); bp 10564 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_fw_init_one(struct bnxt *bp) bp 10568 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_fw_init_one_p1(bp); bp 10570 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware init phase 1 failed\n"); bp 10573 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_fw_init_one_p2(bp); bp 10575 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware init phase 2 failed\n"); bp 10578 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_approve_mac(bp, bp->dev->dev_addr, false); bp 10585 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_fw_reporters_destroy(bp, false); bp 10586 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_fw_reporters_create(bp); bp 10587 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_init_one_p3(bp); bp 10591 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_fw_reset_writel(struct bnxt *bp, int reg_idx) bp 10593 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 10603 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_write_config_dword(bp->pdev, reg_off, val); bp 10607 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar0 + BNXT_GRCPF_REG_WINDOW_BASE_OUT + 4); bp 10611 drivers/net/ethernet/broadcom/bnxt/bnxt.c writel(val, bp->bar0 + reg_off); bp 10614 drivers/net/ethernet/broadcom/bnxt/bnxt.c writel(val, bp->bar1 + reg_off); bp 10618 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_read_config_dword(bp->pdev, 0, &val); bp 10623 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_reset_all(struct bnxt *bp) bp 10625 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 10630 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_reset_writel(bp, i); bp 10635 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FW_RESET, -1, -1); bp 10636 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.resp_addr = cpu_to_le64(bp->hwrm_cmd_kong_resp_dma_addr); bp 10640 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 10642 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Unable to reset FW rc=%d\n", rc); bp 10644 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_timestamp = jiffies; bp 10649 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = container_of(work, struct bnxt, fw_reset_task.work); bp 10652 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) { bp 10653 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_fw_reset_task() called when not in fw reset mode!\n"); bp 10657 drivers/net/ethernet/broadcom/bnxt/bnxt.c switch (bp->fw_reset_state) { bp 10659 drivers/net/ethernet/broadcom/bnxt/bnxt.c int n = bnxt_get_registered_vfs(bp); bp 10663 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware reset aborted, subsequent func_qcfg cmd failed, rc = %d, %d msecs since reset timestamp\n", bp 10665 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_timestamp)); bp 10668 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (time_after(jiffies, bp->fw_reset_timestamp + bp 10669 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bp->fw_reset_max_dsecs * HZ / 10))) { bp 10670 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10671 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = 0; bp 10672 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware reset aborted, bnxt_get_registered_vfs() returns %d\n", bp 10676 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, HZ / 10); bp 10679 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_timestamp = jiffies; bp 10681 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_reset_close(bp); bp 10682 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) { bp 10683 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN; bp 10686 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp 10687 drivers/net/ethernet/broadcom/bnxt/bnxt.c tmo = bp->fw_reset_min_dsecs * HZ / 10; bp 10690 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, tmo); bp 10696 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG); bp 10698 drivers/net/ethernet/broadcom/bnxt/bnxt.c !time_after(jiffies, bp->fw_reset_timestamp + bp 10699 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bp->fw_reset_max_dsecs * HZ / 10))) { bp 10700 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, HZ / 5); bp 10704 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->fw_health->master) { bp 10705 drivers/net/ethernet/broadcom/bnxt/bnxt.c u32 wait_dsecs = bp->fw_health->normal_func_wait_dsecs; bp 10707 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp 10708 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10); bp 10711 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW; bp 10715 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_reset_all(bp); bp 10716 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; bp 10717 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, bp->fw_reset_min_dsecs * HZ / 10); bp 10720 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) { bp 10723 drivers/net/ethernet/broadcom/bnxt/bnxt.c val = bnxt_fw_health_readl(bp, bp 10726 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "FW reset inprog %x after min wait time.\n", bp 10729 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_FW_FATAL_COND, &bp->state); bp 10730 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (pci_enable_device(bp->pdev)) { bp 10731 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Cannot re-enable PCI device\n"); bp 10734 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_set_master(bp->pdev); bp 10735 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW; bp 10738 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_timeout = SHORT_HWRM_CMD_TIMEOUT; bp 10739 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_hwrm_ver_get(bp, true); bp 10741 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (time_after(jiffies, bp->fw_reset_timestamp + bp 10742 drivers/net/ethernet/broadcom/bnxt/bnxt.c (bp->fw_reset_max_dsecs * HZ / 10))) { bp 10743 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Firmware reset aborted\n"); bp 10746 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, HZ / 5); bp 10749 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT; bp 10750 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = BNXT_FW_RESET_STATE_OPENING; bp 10754 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_fw_reset_work(bp, HZ / 10); bp 10757 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_open(bp->dev); bp 10759 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "bnxt_open_nic() failed\n"); bp 10760 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10761 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 10763 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_restart(bp, rc); bp 10766 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = 0; bp 10769 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10775 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); bp 10776 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_reset_state = 0; bp 10778 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 10785 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 10817 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev = dev; bp 10818 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->pdev = pdev; bp 10820 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar0 = pci_ioremap_bar(pdev, 0); bp 10821 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bar0) { bp 10827 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar1 = pci_ioremap_bar(pdev, 2); bp 10828 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bar1) { bp 10834 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->bar2 = pci_ioremap_bar(pdev, 4); bp 10835 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->bar2) { bp 10843 drivers/net/ethernet/broadcom/bnxt/bnxt.c INIT_WORK(&bp->sp_task, bnxt_sp_task); bp 10844 drivers/net/ethernet/broadcom/bnxt/bnxt.c INIT_DELAYED_WORK(&bp->fw_reset_task, bnxt_fw_reset_task); bp 10846 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_lock_init(&bp->ntp_fltr_lock); bp 10848 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_lock_init(&bp->db_lock); bp 10851 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_ring_size = BNXT_DEFAULT_RX_RING_SIZE; bp 10852 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_ring_size = BNXT_DEFAULT_TX_RING_SIZE; bp 10854 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_dflt_coal(bp); bp 10856 drivers/net/ethernet/broadcom/bnxt/bnxt.c timer_setup(&bp->timer, bnxt_timer, 0); bp 10857 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->current_interval = BNXT_TIMER_INTERVAL; bp 10859 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(BNXT_STATE_OPEN, &bp->state); bp 10863 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_unmap_bars(bp, pdev); bp 10877 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 10886 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_approve_mac(bp, addr->sa_data, true); bp 10892 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, false, false); bp 10893 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_open_nic(bp, false, false); bp 10902 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 10905 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, true, false); bp 10908 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 10911 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_open_nic(bp, true, false); bp 10918 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 10922 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (tc > bp->max_tc) { bp 10924 drivers/net/ethernet/broadcom/bnxt/bnxt.c tc, bp->max_tc); bp 10931 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_SHARED_RINGS) bp 10934 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_check_rings(bp, bp->tx_nr_rings_per_tc, bp->rx_nr_rings, bp 10935 drivers/net/ethernet/broadcom/bnxt/bnxt.c sh, tc, bp->tx_nr_rings_xdp); bp 10940 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) bp 10941 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_close_nic(bp, true, false); bp 10944 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc * tc; bp 10947 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc; bp 10950 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings += bp->tx_nr_rings_xdp; bp 10951 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = sh ? max_t(int, bp->tx_nr_rings, bp->rx_nr_rings) : bp 10952 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings + bp->rx_nr_rings; bp 10954 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) bp 10955 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_open_nic(bp, true, false); bp 10963 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = cb_priv; bp 10965 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_tc_flower_enabled(bp) || bp 10966 drivers/net/ethernet/broadcom/bnxt/bnxt.c !tc_cls_can_offload_and_chain0(bp->dev, type_data)) bp 10971 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_tc_setup_flower(bp, bp->pf.fw_fid, type_data); bp 10982 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 10989 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp, bp, true); bp 11037 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11045 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; bp 11078 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_spec_code < 0x10601) { bp 11083 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->hwrm_spec_code < 0x10601) { bp 11092 drivers/net/ethernet/broadcom/bnxt/bnxt.c head = &bp->ntp_fltr_hash_tbl[idx]; bp 11103 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_lock_bh(&bp->ntp_fltr_lock); bp 11104 drivers/net/ethernet/broadcom/bnxt/bnxt.c bit_id = bitmap_find_free_region(bp->ntp_fltr_bmap, bp 11107 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_unlock_bh(&bp->ntp_fltr_lock); bp 11117 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_count++; bp 11118 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_unlock_bh(&bp->ntp_fltr_lock); bp 11120 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_RX_NTP_FLTR_SP_EVENT, &bp->sp_event); bp 11121 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 11130 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_cfg_ntp_filters(struct bnxt *bp) bp 11140 drivers/net/ethernet/broadcom/bnxt/bnxt.c head = &bp->ntp_fltr_hash_tbl[i]; bp 11145 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (rps_may_expire_flow(bp->dev, fltr->rxq, bp 11148 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_cfa_ntuple_filter_free(bp, bp 11153 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_cfa_ntuple_filter_alloc(bp, bp 11162 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_lock_bh(&bp->ntp_fltr_lock); bp 11164 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ntp_fltr_count--; bp 11165 drivers/net/ethernet/broadcom/bnxt/bnxt.c spin_unlock_bh(&bp->ntp_fltr_lock); bp 11167 drivers/net/ethernet/broadcom/bnxt/bnxt.c clear_bit(fltr->sw_id, bp->ntp_fltr_bmap); bp 11172 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (test_and_clear_bit(BNXT_HWRM_PF_UNLOAD_SP_EVENT, &bp->sp_event)) bp 11173 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "Receive PF driver unload event!"); bp 11178 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_cfg_ntp_filters(struct bnxt *bp) bp 11187 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11197 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vxlan_port_cnt && bp->vxlan_port != ti->port) bp 11200 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vxlan_port_cnt++; bp 11201 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vxlan_port_cnt == 1) { bp 11202 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vxlan_port = ti->port; bp 11203 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_VXLAN_ADD_PORT_SP_EVENT, &bp->sp_event); bp 11204 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 11208 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->nge_port_cnt && bp->nge_port != ti->port) bp 11211 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nge_port_cnt++; bp 11212 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->nge_port_cnt == 1) { bp 11213 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nge_port = ti->port; bp 11214 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_GENEVE_ADD_PORT_SP_EVENT, &bp->sp_event); bp 11221 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 11227 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11237 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->vxlan_port_cnt || bp->vxlan_port != ti->port) bp 11239 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->vxlan_port_cnt--; bp 11241 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->vxlan_port_cnt != 0) bp 11244 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_VXLAN_DEL_PORT_SP_EVENT, &bp->sp_event); bp 11247 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp->nge_port_cnt || bp->nge_port != ti->port) bp 11249 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->nge_port_cnt--; bp 11251 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->nge_port_cnt != 0) bp 11254 drivers/net/ethernet/broadcom/bnxt/bnxt.c set_bit(BNXT_GENEVE_DEL_PORT_SP_EVENT, &bp->sp_event); bp 11260 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_queue_sp_work(bp); bp 11267 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11269 drivers/net/ethernet/broadcom/bnxt/bnxt.c return ndo_dflt_bridge_getlink(skb, pid, seq, dev, bp->br_mode, 0, 0, bp 11276 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11280 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code < 0x10708 || !BNXT_SINGLE_PF(bp)) bp 11297 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (mode == bp->br_mode) bp 11300 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_set_br_mode(bp, mode); bp 11302 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->br_mode = mode; bp 11311 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11313 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) bp 11317 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_PF(bp) || !(bp->flags & BNXT_FLAG_DSN_VALID)) bp 11320 drivers/net/ethernet/broadcom/bnxt/bnxt.c ppid->id_len = sizeof(bp->switch_id); bp 11321 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(ppid->id, bp->switch_id, ppid->id_len); bp 11328 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11330 drivers/net/ethernet/broadcom/bnxt/bnxt.c return &bp->dl_port; bp 11371 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11373 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 11374 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_sriov_disable(bp); bp 11376 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_fw_reporters_destroy(bp, true); bp 11379 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_unregister(bp); bp 11380 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_shutdown_tc(bp); bp 11381 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cancel_sp_work(bp); bp 11382 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->sp_event = 0; bp 11384 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 11385 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_drv_unrgtr(bp); bp 11386 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_hwrm_resources(bp); bp 11387 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_hwrm_short_cmd_req(bp); bp 11388 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ethtool_free(bp); bp 11389 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dcb_free(bp); bp 11390 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->edev); bp 11391 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->edev = NULL; bp 11392 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->fw_health); bp 11393 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_health = NULL; bp 11394 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cleanup_pci(bp); bp 11395 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_mem(bp); bp 11396 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->ctx); bp 11397 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ctx = NULL; bp 11398 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_port_stats(bp); bp 11402 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt) bp 11405 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_link_info *link_info = &bp->link_info; bp 11407 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_phy_qcaps(bp); bp 11409 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Probe phy can't get phy capabilities (rc: %x)\n", bp 11413 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_update_link(bp, false); bp 11415 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Probe phy can't update link (rc: %x)\n", bp 11432 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->hwrm_spec_code >= 0x10201) { bp 11463 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void _bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bp 11466 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 11471 drivers/net/ethernet/broadcom/bnxt/bnxt.c *max_cp = bnxt_get_max_func_cp_rings_for_en(bp); bp 11472 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_irq = min_t(int, bnxt_get_max_func_irqs(bp) - bp 11473 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_ulp_msix_num(bp), bp 11474 drivers/net/ethernet/broadcom/bnxt/bnxt.c hw_resc->max_stat_ctxs - bnxt_get_ulp_stat_ctxs(bp)); bp 11475 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 11478 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp) && BNXT_PF(bp)) { bp 11482 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 11484 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 11485 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_trim_rings(bp, max_rx, max_tx, *max_cp, false); bp 11492 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_get_max_rings(struct bnxt *bp, int *max_rx, int *max_tx, bool shared) bp 11496 drivers/net/ethernet/broadcom/bnxt/bnxt.c _bnxt_get_max_rings(bp, &rx, &tx, &cp); bp 11502 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_trim_rings(bp, max_rx, max_tx, cp, shared); bp 11505 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx, bp 11510 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_get_max_rings(bp, max_rx, max_tx, shared); bp 11511 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (rc && (bp->flags & BNXT_FLAG_AGG_RINGS)) { bp 11513 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags &= ~BNXT_FLAG_AGG_RINGS; bp 11514 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_get_max_rings(bp, max_rx, max_tx, shared); bp 11517 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_AGG_RINGS; bp 11520 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_NO_AGG_RINGS; bp 11521 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->hw_features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); bp 11522 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->features &= ~(NETIF_F_LRO | NETIF_F_GRO_HW); bp 11523 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 11526 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->flags & BNXT_FLAG_ROCE_CAP) { bp 11530 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_cp = bnxt_get_max_func_cp_rings(bp); bp 11531 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_stat = bnxt_get_max_func_stat_ctxs(bp); bp 11532 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_irq = bnxt_get_max_func_irqs(bp); bp 11543 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_trim_rings(bp, max_rx, max_tx, max_cp, shared); bp 11553 drivers/net/ethernet/broadcom/bnxt/bnxt.c static void bnxt_trim_dflt_sh_rings(struct bnxt *bp) bp 11555 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = min_t(int, bp->tx_nr_rings_per_tc, bp->rx_nr_rings); bp 11556 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = bp->cp_nr_rings; bp 11557 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->cp_nr_rings; bp 11558 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc; bp 11561 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh) bp 11565 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bnxt_can_reserve_rings(bp)) bp 11569 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_SHARED_RINGS; bp 11574 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->port_count > 1) { bp 11576 drivers/net/ethernet/broadcom/bnxt/bnxt.c max_t(int, num_online_cpus() / bp->port_count, 1); bp 11580 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_get_dflt_rings(bp, &max_rx_rings, &max_tx_rings, sh); bp 11583 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = min_t(int, dflt_rings, max_rx_rings); bp 11584 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = min_t(int, dflt_rings, max_tx_rings); bp 11586 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_trim_dflt_sh_rings(bp); bp 11588 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = bp->tx_nr_rings_per_tc + bp->rx_nr_rings; bp 11589 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc; bp 11591 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_reserve_rings(bp); bp 11593 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "Unable to reserve tx rings\n"); bp 11594 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->tx_nr_rings; bp 11596 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_trim_dflt_sh_rings(bp); bp 11599 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_need_reserve_rings(bp)) { bp 11600 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = __bnxt_reserve_rings(bp); bp 11602 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_warn(bp->dev, "2nd rings reservation failed.\n"); bp 11603 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->tx_nr_rings; bp 11605 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) { bp 11606 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings++; bp 11607 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings++; bp 11610 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings = 0; bp 11611 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->rx_nr_rings = 0; bp 11616 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_dflt_ring_mode(struct bnxt *bp) bp 11620 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bp->tx_nr_rings) bp 11623 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_stop(bp); bp 11624 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 11625 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_set_dflt_rings(bp, true); bp 11627 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Not enough rings available.\n"); bp 11630 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_int_mode(bp); bp 11634 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->tx_nr_rings; bp 11635 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_rfs_supported(bp) && bnxt_rfs_capable(bp)) { bp 11636 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_RFS; bp 11637 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->dev->features |= NETIF_F_NTUPLE; bp 11640 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_restart(bp, rc); bp 11644 drivers/net/ethernet/broadcom/bnxt/bnxt.c int bnxt_restore_pf_fw_resources(struct bnxt *bp) bp 11649 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_qcaps(bp); bp 11651 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) bp 11652 drivers/net/ethernet/broadcom/bnxt/bnxt.c __bnxt_close_nic(bp, true, false); bp 11654 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_stop(bp); bp 11655 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 11656 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_int_mode(bp); bp 11657 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_irq_restart(bp, rc); bp 11659 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (netif_running(bp->dev)) { bp 11661 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev_close(bp->dev); bp 11663 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_open_nic(bp, true, false); bp 11669 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_init_mac_addr(struct bnxt *bp) bp 11673 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 11674 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(bp->dev->dev_addr, bp->pf.mac_addr, ETH_ALEN); bp 11677 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt_vf_info *vf = &bp->vf; bp 11682 drivers/net/ethernet/broadcom/bnxt/bnxt.c memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN); bp 11688 drivers/net/ethernet/broadcom/bnxt/bnxt.c eth_hw_addr_random(bp->dev); bp 11690 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_approve_mac(bp, bp->dev->dev_addr, strict_approval); bp 11696 drivers/net/ethernet/broadcom/bnxt/bnxt.c static int bnxt_pcie_dsn_get(struct bnxt *bp, u8 dsn[]) bp 11698 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct pci_dev *pdev = bp->pdev; bp 11703 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "Unable do read adapter's DSN"); bp 11713 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_DSN_VALID; bp 11721 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp; bp 11739 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev = alloc_etherdev_mq(sizeof(*bp), max_irqs); bp 11743 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp = netdev_priv(dev); bp 11744 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_max_func_irqs(bp, max_irqs); bp 11747 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_VF; bp 11750 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_MSIX_CAP; bp 11761 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_alloc_hwrm_resources(bp); bp 11765 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_init(&bp->hwrm_cmd_lock); bp 11766 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_init(&bp->link_lock); bp 11768 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_fw_init_one_p1(bp); bp 11772 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_P5(bp)) bp 11773 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_CHIP_P5; bp 11775 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_fw_init_one_p2(bp); bp 11787 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_SUPPORTS_TPA(bp)) bp 11801 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_SUPPORTS_TPA(bp)) bp 11809 drivers/net/ethernet/broadcom/bnxt/bnxt.c init_waitqueue_head(&bp->sriov_cfg_wait); bp 11810 drivers/net/ethernet/broadcom/bnxt/bnxt.c mutex_init(&bp->sriov_lock); bp 11812 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_SUPPORTS_TPA(bp)) { bp 11813 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->gro_func = bnxt_gro_func_5730x; bp 11814 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_CHIP_P4(bp)) bp 11815 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->gro_func = bnxt_gro_func_5731x; bp 11816 drivers/net/ethernet/broadcom/bnxt/bnxt.c else if (BNXT_CHIP_P5(bp)) bp 11817 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->gro_func = bnxt_gro_func_5750x; bp 11819 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!BNXT_CHIP_P4_PLUS(bp)) bp 11820 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_DOUBLE_DB; bp 11822 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ulp_probe = bnxt_ulp_probe; bp 11824 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_mac_addr(bp); bp 11831 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 11833 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_pcie_dsn_get(bp, bp->switch_id); bp 11838 drivers/net/ethernet/broadcom/bnxt/bnxt.c dev->max_mtu = bp->max_mtu; bp 11840 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_probe_phy(bp, true); bp 11844 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_rx_skb_mode(bp, false); bp 11845 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_tpa_flags(bp); bp 11846 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_set_ring_params(bp); bp 11847 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_set_dflt_rings(bp, true); bp 11849 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_err(bp->dev, "Not enough rings available.\n"); bp 11854 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_fw_init_one_p3(bp); bp 11857 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->flags |= BNXT_FLAG_STRIP_VLAN; bp 11859 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_init_int_mode(bp); bp 11866 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->tx_nr_rings_per_tc = bp->tx_nr_rings; bp 11868 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) { bp 11877 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_init_tc(bp); bp 11880 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_register(bp); bp 11886 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (BNXT_PF(bp)) bp 11887 drivers/net/ethernet/broadcom/bnxt/bnxt.c devlink_port_type_eth_set(&bp->dl_port, bp->dev); bp 11888 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_fw_reporters_create(bp); bp 11898 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_dl_unregister(bp); bp 11899 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_shutdown_tc(bp); bp 11900 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 11903 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_hwrm_short_cmd_req(bp); bp 11904 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_hwrm_resources(bp); bp 11905 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->fw_health); bp 11906 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->fw_health = NULL; bp 11907 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_cleanup_pci(bp); bp 11908 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_free_ctx_mem(bp); bp 11909 drivers/net/ethernet/broadcom/bnxt/bnxt.c kfree(bp->ctx); bp 11910 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->ctx = NULL; bp 11920 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp; bp 11926 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp = netdev_priv(dev); bp 11927 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!bp) bp 11933 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_shutdown(bp); bp 11934 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_clear_int_mode(bp); bp 11938 drivers/net/ethernet/broadcom/bnxt/bnxt.c pci_wake_from_d3(pdev, bp->wol); bp 11950 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11958 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_hwrm_func_drv_unrgtr(bp); bp 11966 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(dev); bp 11970 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_hwrm_ver_get(bp) || bnxt_hwrm_func_drv_rgtr(bp)) { bp 11974 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_func_reset(bp); bp 11979 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_get_wol_settings(bp); bp 12012 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(netdev); bp 12019 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_stop(bp); bp 12048 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct bnxt *bp = netdev_priv(netdev); bp 12052 drivers/net/ethernet/broadcom/bnxt/bnxt.c netdev_info(bp->dev, "PCI Slot Reset\n"); bp 12062 drivers/net/ethernet/broadcom/bnxt/bnxt.c err = bnxt_hwrm_func_reset(bp); bp 12068 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_ulp_start(bp); bp 615 drivers/net/ethernet/broadcom/bnxt/bnxt.h !((raw_cons) & bp->cp_bit)) bp 619 drivers/net/ethernet/broadcom/bnxt/bnxt.h !((raw_cons) & bp->cp_bit)) bp 623 drivers/net/ethernet/broadcom/bnxt/bnxt.h !((raw_cons) & bp->cp_bit)) bp 626 drivers/net/ethernet/broadcom/bnxt/bnxt.h (!!((nqcmp)->v & cpu_to_le32(NQ_CN_V)) == !((raw_cons) & bp->cp_bit)) bp 634 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define NEXT_RX(idx) (((idx) + 1) & bp->rx_ring_mask) bp 636 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define NEXT_RX_AGG(idx) (((idx) + 1) & bp->rx_agg_ring_mask) bp 638 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define NEXT_TX(idx) (((idx) + 1) & bp->tx_ring_mask) bp 642 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define RING_CMP(idx) ((idx) & bp->cp_ring_mask) bp 645 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_HWRM_MAX_REQ_LEN (bp->hwrm_max_req_len) bp 649 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define HWRM_CMD_TIMEOUT (bp->hwrm_cmd_timeout) bp 942 drivers/net/ethernet/broadcom/bnxt/bnxt.h struct bnxt *bp; bp 1289 drivers/net/ethernet/broadcom/bnxt/bnxt.h struct bnxt *bp; bp 1524 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF)) bp 1525 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF) bp 1526 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_NPAR(bp) ((bp)->port_partition_type) bp 1527 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_MH(bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST) bp 1528 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp)) bp 1529 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_CHIP_TYPE_NITRO_A0(bp) ((bp)->flags & BNXT_FLAG_CHIP_NITRO_A0) bp 1530 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_RX_PAGE_MODE(bp) ((bp)->flags & BNXT_FLAG_RX_PAGE_MODE) bp 1531 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_SUPPORTS_TPA(bp) (!BNXT_CHIP_TYPE_NITRO_A0(bp) && \ bp 1532 drivers/net/ethernet/broadcom/bnxt/bnxt.h (!((bp)->flags & BNXT_FLAG_CHIP_P5) || \ bp 1533 drivers/net/ethernet/broadcom/bnxt/bnxt.h (bp)->max_tpa_v2) && !is_kdump_kernel()) bp 1536 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_CHIP_P5(bp) \ bp 1537 drivers/net/ethernet/broadcom/bnxt/bnxt.h ((bp)->chip_num == CHIP_NUM_57508 || \ bp 1538 drivers/net/ethernet/broadcom/bnxt/bnxt.h (bp)->chip_num == CHIP_NUM_57504 || \ bp 1539 drivers/net/ethernet/broadcom/bnxt/bnxt.h (bp)->chip_num == CHIP_NUM_57502) bp 1542 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_CHIP_P4(bp) \ bp 1543 drivers/net/ethernet/broadcom/bnxt/bnxt.h (BNXT_CHIP_NUM_57X1X((bp)->chip_num) || \ bp 1544 drivers/net/ethernet/broadcom/bnxt/bnxt.h BNXT_CHIP_NUM_5745X((bp)->chip_num) || \ bp 1545 drivers/net/ethernet/broadcom/bnxt/bnxt.h BNXT_CHIP_NUM_588XX((bp)->chip_num) || \ bp 1546 drivers/net/ethernet/broadcom/bnxt/bnxt.h (BNXT_CHIP_NUM_58700((bp)->chip_num) && \ bp 1547 drivers/net/ethernet/broadcom/bnxt/bnxt.h !BNXT_CHIP_TYPE_NITRO_A0(bp))) bp 1549 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_CHIP_P4_PLUS(bp) \ bp 1550 drivers/net/ethernet/broadcom/bnxt/bnxt.h (BNXT_CHIP_P4(bp) || BNXT_CHIP_P5(bp)) bp 1663 drivers/net/ethernet/broadcom/bnxt/bnxt.h #define BNXT_NEW_RM(bp) ((bp)->fw_cap & BNXT_FW_CAP_NEW_RM) bp 1849 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline u32 bnxt_tx_avail(struct bnxt *bp, struct bnxt_tx_ring_info *txr) bp 1854 drivers/net/ethernet/broadcom/bnxt/bnxt.h return bp->tx_ring_size - bp 1855 drivers/net/ethernet/broadcom/bnxt/bnxt.h ((txr->tx_prod - txr->tx_cons) & bp->tx_ring_mask); bp 1861 drivers/net/ethernet/broadcom/bnxt/bnxt.h spin_lock(&bp->db_lock); \ bp 1864 drivers/net/ethernet/broadcom/bnxt/bnxt.h spin_unlock(&bp->db_lock); \ bp 1871 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline void bnxt_db_write_relaxed(struct bnxt *bp, bp 1874 drivers/net/ethernet/broadcom/bnxt/bnxt.h if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 1880 drivers/net/ethernet/broadcom/bnxt/bnxt.h if (bp->flags & BNXT_FLAG_DOUBLE_DB) bp 1886 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline void bnxt_db_write(struct bnxt *bp, struct bnxt_db_info *db, bp 1889 drivers/net/ethernet/broadcom/bnxt/bnxt.h if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 1895 drivers/net/ethernet/broadcom/bnxt/bnxt.h if (bp->flags & BNXT_FLAG_DOUBLE_DB) bp 1926 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline bool bnxt_kong_hwrm_message(struct bnxt *bp, struct input *req) bp 1928 drivers/net/ethernet/broadcom/bnxt/bnxt.h return (bp->fw_cap & BNXT_FW_CAP_KONG_MB_CHNL && bp 1932 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline bool bnxt_hwrm_kong_chnl(struct bnxt *bp, struct input *req) bp 1934 drivers/net/ethernet/broadcom/bnxt/bnxt.h return (bp->fw_cap & BNXT_FW_CAP_KONG_MB_CHNL && bp 1935 drivers/net/ethernet/broadcom/bnxt/bnxt.h req->resp_addr == cpu_to_le64(bp->hwrm_cmd_kong_resp_dma_addr)); bp 1938 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline void *bnxt_get_hwrm_resp_addr(struct bnxt *bp, void *req) bp 1940 drivers/net/ethernet/broadcom/bnxt/bnxt.h if (bnxt_hwrm_kong_chnl(bp, (struct input *)req)) bp 1941 drivers/net/ethernet/broadcom/bnxt/bnxt.h return bp->hwrm_cmd_kong_resp_addr; bp 1943 drivers/net/ethernet/broadcom/bnxt/bnxt.h return bp->hwrm_cmd_resp_addr; bp 1946 drivers/net/ethernet/broadcom/bnxt/bnxt.h static inline u16 bnxt_get_hwrm_seq_id(struct bnxt *bp, u16 dst) bp 1951 drivers/net/ethernet/broadcom/bnxt/bnxt.h seq_id = bp->hwrm_cmd_seq++; bp 1953 drivers/net/ethernet/broadcom/bnxt/bnxt.h seq_id = bp->hwrm_cmd_kong_seq++; bp 1959 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_alloc_rx_data(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, bp 1962 drivers/net/ethernet/broadcom/bnxt/bnxt.h u32 bnxt_fw_health_readl(struct bnxt *bp, int reg_idx); bp 1963 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_set_tpa_flags(struct bnxt *bp); bp 1965 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode); bp 1968 drivers/net/ethernet/broadcom/bnxt/bnxt.h int _hwrm_send_message_silent(struct bnxt *bp, void *msg, u32 len, int timeout); bp 1971 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_func_rgtr_async_events(struct bnxt *bp, unsigned long *bmap, bp 1973 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id); bp 1974 drivers/net/ethernet/broadcom/bnxt/bnxt.h int __bnxt_hwrm_get_tx_rings(struct bnxt *bp, u16 fid, int *tx_rings); bp 1975 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_nq_rings_in_use(struct bnxt *bp); bp 1977 drivers/net/ethernet/broadcom/bnxt/bnxt.h unsigned int bnxt_get_max_func_stat_ctxs(struct bnxt *bp); bp 1978 drivers/net/ethernet/broadcom/bnxt/bnxt.h unsigned int bnxt_get_avail_stat_ctxs_for_en(struct bnxt *bp); bp 1979 drivers/net/ethernet/broadcom/bnxt/bnxt.h unsigned int bnxt_get_max_func_cp_rings(struct bnxt *bp); bp 1980 drivers/net/ethernet/broadcom/bnxt/bnxt.h unsigned int bnxt_get_avail_cp_rings_for_en(struct bnxt *bp); bp 1981 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_get_avail_msix(struct bnxt *bp, int num); bp 1982 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init); bp 1983 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_tx_disable(struct bnxt *bp); bp 1984 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_tx_enable(struct bnxt *bp); bp 1987 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp); bp 1988 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_free_wol_fltr(struct bnxt *bp); bp 1989 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all); bp 1992 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_half_open_nic(struct bnxt *bp); bp 1993 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_half_close_nic(struct bnxt *bp); bp 1995 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_fw_exception(struct bnxt *bp); bp 1996 drivers/net/ethernet/broadcom/bnxt/bnxt.h void bnxt_fw_reset(struct bnxt *bp); bp 1997 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_check_rings(struct bnxt *bp, int tx, int rx, bool sh, int tcs, bp 2001 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_restore_pf_fw_resources(struct bnxt *bp); bp 2005 drivers/net/ethernet/broadcom/bnxt/bnxt.h int bnxt_hwrm_set_ring_coal(struct bnxt *bp, struct bnxt_napi *bnapi); bp 24 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_queue_to_tc(struct bnxt *bp, u8 queue_id) bp 28 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c for (i = 0; i < bp->max_tc; i++) { bp 29 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->q_info[i].queue_id == queue_id) { bp 30 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c for (j = 0; j < bp->max_tc; j++) { bp 31 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->tc_to_qidx[j] == i) bp 39 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_pri2cos_cfg(struct bnxt *bp, struct ieee_ets *ets) bp 45 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PRI2COS_CFG, -1, -1); bp 56 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c qidx = bp->tc_to_qidx[ets->prio_tc[i]]; bp 57 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c pri2cos[i] = bp->q_info[qidx].queue_id; bp 59 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 63 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_pri2cos_qcfg(struct bnxt *bp, struct ieee_ets *ets) bp 65 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct hwrm_queue_pri2cos_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 69 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PRI2COS_QCFG, -1, -1); bp 72 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_lock(&bp->hwrm_cmd_lock); bp 73 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 82 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c tc = bnxt_queue_to_tc(bp, queue_id); bp 87 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 91 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_cos2bw_cfg(struct bnxt *bp, struct ieee_ets *ets, bp 99 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_COS2BW_CFG, -1, -1); bp 101 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c u8 qidx = bp->tc_to_qidx[i]; bp 108 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c cos2bw.queue_id = bp->q_info[qidx].queue_id; bp 131 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 135 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_cos2bw_qcfg(struct bnxt *bp, struct ieee_ets *ets) bp 137 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct hwrm_queue_cos2bw_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 143 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_COS2BW_QCFG, -1, -1); bp 145 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_lock(&bp->hwrm_cmd_lock); bp 146 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 148 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 153 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c for (i = 0; i < bp->max_tc; i++, data += sizeof(cos2bw) - 4) { bp 160 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c tc = bnxt_queue_to_tc(bp, cos2bw.queue_id); bp 172 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 176 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_queue_remap(struct bnxt *bp, unsigned int lltc_mask) bp 179 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c int max = bp->max_tc; bp 185 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (BNXT_LLQ(bp->q_info[j].queue_profile)) { bp 186 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->tc_to_qidx[i] = j; bp 200 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->tc_to_qidx[i] = j; bp 205 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (netif_running(bp->dev)) { bp 206 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_close_nic(bp, false, false); bp 207 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_open_nic(bp, false, false); bp 209 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c netdev_warn(bp->dev, "failed to open NIC, rc = %d\n", rc); bp 213 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->ieee_ets) { bp 214 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c int tc = netdev_get_num_tc(bp->dev); bp 218 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_cos2bw_cfg(bp, bp->ieee_ets, tc); bp 220 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c netdev_warn(bp->dev, "failed to config BW, rc = %d\n", rc); bp 223 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_pri2cos_cfg(bp, bp->ieee_ets); bp 225 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c netdev_warn(bp->dev, "failed to config prio, rc = %d\n", rc); bp 232 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_pfc_cfg(struct bnxt *bp, struct ieee_pfc *pfc) bp 235 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct ieee_ets *my_ets = bp->ieee_ets; bp 244 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c for (i = 0; i < bp->max_tc; i++) { bp 255 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (lltc_count > bp->max_lltc) bp 258 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c for (i = 0; i < bp->max_tc; i++) { bp 260 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c u8 qidx = bp->tc_to_qidx[i]; bp 262 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!BNXT_LLQ(bp->q_info[qidx].queue_profile)) { bp 270 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_queue_remap(bp, tc_mask); bp 272 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PFCENABLE_CFG, -1, -1); bp 274 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 281 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_pfc_qcfg(struct bnxt *bp, struct ieee_pfc *pfc) bp 283 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct hwrm_queue_pfcenable_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 288 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_PFCENABLE_QCFG, -1, -1); bp 290 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_lock(&bp->hwrm_cmd_lock); bp 291 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 293 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 299 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 303 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_set_dcbx_app(struct bnxt *bp, struct dcb_app *app, bp 314 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->hwrm_spec_code < 0x10601) bp 319 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c data = dma_alloc_coherent(&bp->pdev->dev, data_len, &mapping, bp 324 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &get, HWRM_FW_GET_STRUCTURED_DATA, -1, -1); bp 329 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &get, sizeof(get), HWRM_CMD_TIMEOUT); bp 375 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &set, HWRM_FW_SET_STRUCTURED_DATA, -1, -1); bp 379 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &set, sizeof(set), HWRM_CMD_TIMEOUT); bp 382 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c dma_free_coherent(&bp->pdev->dev, data_len, data, mapping); bp 386 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_dscp_qcaps(struct bnxt *bp) bp 388 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct hwrm_queue_dscp_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 392 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->max_dscp_value = 0; bp 393 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->hwrm_spec_code < 0x10800 || BNXT_VF(bp)) bp 396 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_DSCP_QCAPS, -1, -1); bp 397 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_lock(&bp->hwrm_cmd_lock); bp 398 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = _hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 400 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->max_dscp_value = (1 << resp->num_dscp_bits) - 1; bp 401 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->max_dscp_value < 0x3f) bp 402 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->max_dscp_value = 0; bp 405 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c mutex_unlock(&bp->hwrm_cmd_lock); bp 409 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_hwrm_queue_dscp2pri_cfg(struct bnxt *bp, struct dcb_app *app, bp 417 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->hwrm_spec_code < 0x10800) bp 420 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_DSCP2PRI_CFG, -1, -1); bp 421 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c dscp2pri = dma_alloc_coherent(&bp->pdev->dev, sizeof(*dscp2pri), bp 434 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 435 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c dma_free_coherent(&bp->pdev->dev, sizeof(*dscp2pri), dscp2pri, bp 440 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc) bp 447 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (ets->prio_tc[i] > bp->max_tc) { bp 448 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c netdev_err(bp->dev, "priority to TC mapping exceeds TC count %d\n", bp 455 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if ((ets->tc_tx_bw[i] || ets->tc_tsa[i]) && i > bp->max_tc) bp 471 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (max_tc >= bp->max_tc) bp 472 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c *tc = bp->max_tc; bp 480 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 481 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct ieee_ets *my_ets = bp->ieee_ets; bp 484 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c ets->ets_cap = bp->max_tc; bp 487 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->dcbx_cap & DCB_CAP_DCBX_HOST) bp 493 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_cos2bw_qcfg(bp, my_ets); bp 496 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_pri2cos_qcfg(bp, my_ets); bp 501 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_ets = my_ets; bp 517 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 518 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct ieee_ets *my_ets = bp->ieee_ets; bp 522 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!(bp->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) || bp 523 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c !(bp->dcbx_cap & DCB_CAP_DCBX_HOST)) bp 526 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_ets_validate(bp, ets, &max_tc); bp 535 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_ets = my_ets; bp 540 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_cos2bw_cfg(bp, ets, max_tc); bp 543 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_pri2cos_cfg(bp, ets); bp 553 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 554 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c __le64 *stats = (__le64 *)bp->hw_rx_port_stats; bp 555 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct ieee_pfc *my_pfc = bp->ieee_pfc; bp 559 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c pfc->pfc_cap = bp->max_lltc; bp 562 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->dcbx_cap & DCB_CAP_DCBX_HOST) bp 568 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_pfc = my_pfc; bp 569 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_pfc_qcfg(bp, my_pfc); bp 593 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 594 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct ieee_pfc *my_pfc = bp->ieee_pfc; bp 597 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!(bp->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) || bp 598 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c !(bp->dcbx_cap & DCB_CAP_DCBX_HOST)) bp 605 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_pfc = my_pfc; bp 607 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_pfc_cfg(bp, pfc); bp 614 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c static int bnxt_dcbnl_ieee_dscp_app_prep(struct bnxt *bp, struct dcb_app *app) bp 617 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!bp->max_dscp_value) bp 619 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (app->protocol > bp->max_dscp_value) bp 627 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 630 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!(bp->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) || bp 631 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c !(bp->dcbx_cap & DCB_CAP_DCBX_HOST)) bp 634 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_dcbnl_ieee_dscp_app_prep(bp, app); bp 646 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_set_dcbx_app(bp, app, true); bp 649 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_dscp2pri_cfg(bp, app, true); bp 656 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 659 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (!(bp->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) || bp 660 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c !(bp->dcbx_cap & DCB_CAP_DCBX_HOST)) bp 663 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_dcbnl_ieee_dscp_app_prep(bp, app); bp 674 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_set_dcbx_app(bp, app, false); bp 677 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c rc = bnxt_hwrm_queue_dscp2pri_cfg(bp, app, false); bp 684 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 686 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c return bp->dcbx_cap; bp 691 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c struct bnxt *bp = netdev_priv(dev); bp 694 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) bp 698 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (BNXT_VF(bp) || (bp->fw_cap & BNXT_FW_CAP_LLDP_AGENT)) bp 707 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (mode == bp->dcbx_cap) bp 710 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dcbx_cap = mode; bp 725 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c void bnxt_dcb_init(struct bnxt *bp) bp 727 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dcbx_cap = 0; bp 728 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (bp->hwrm_spec_code < 0x10501) bp 731 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bnxt_hwrm_queue_dscp_qcaps(bp); bp 732 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dcbx_cap = DCB_CAP_DCBX_VER_IEEE; bp 733 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c if (BNXT_PF(bp) && !(bp->fw_cap & BNXT_FW_CAP_LLDP_AGENT)) bp 734 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dcbx_cap |= DCB_CAP_DCBX_HOST; bp 735 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c else if (bp->fw_cap & BNXT_FW_CAP_DCBX_AGENT) bp 736 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dcbx_cap |= DCB_CAP_DCBX_LLD_MANAGED; bp 737 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->dev->dcbnl_ops = &dcbnl_ops; bp 740 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c void bnxt_dcb_free(struct bnxt *bp) bp 742 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c kfree(bp->ieee_pfc); bp 743 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c kfree(bp->ieee_ets); bp 744 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_pfc = NULL; bp 745 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c bp->ieee_ets = NULL; bp 750 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c void bnxt_dcb_init(struct bnxt *bp) bp 754 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c void bnxt_dcb_free(struct bnxt *bp) bp 52 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h void bnxt_dcb_init(struct bnxt *bp); bp 53 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.h void bnxt_dcb_free(struct bnxt *bp); bp 73 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c void bnxt_debug_dev_init(struct bnxt *bp) bp 75 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c const char *pname = pci_name(bp->pdev); bp 79 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c bp->debugfs_pdev = debugfs_create_dir(pname, bnxt_debug_mnt); bp 80 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c dir = debugfs_create_dir("dim", bp->debugfs_pdev); bp 83 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 84 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; bp 86 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c if (cpr && bp->bnapi[i]->rx_ring) bp 91 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c void bnxt_debug_dev_exit(struct bnxt *bp) bp 93 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c if (bp) { bp 94 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c debugfs_remove_recursive(bp->debugfs_pdev); bp 95 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c bp->debugfs_pdev = NULL; bp 16 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.h void bnxt_debug_dev_init(struct bnxt *bp); bp 17 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.h void bnxt_debug_dev_exit(struct bnxt *bp); bp 21 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.h static inline void bnxt_debug_dev_init(struct bnxt *bp) {} bp 22 drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.h static inline void bnxt_debug_dev_exit(struct bnxt *bp) {} bp 21 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt *bp = devlink_health_reporter_priv(reporter); bp 25 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) bp 28 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c val = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG); bp 49 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG); bp 65 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt *bp = devlink_health_reporter_priv(reporter); bp 70 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_fw_reset(bp); bp 83 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt *bp = devlink_health_reporter_priv(reporter); bp 92 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_fw_reset(bp); bp 94 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_fw_exception(bp); bp 105 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c void bnxt_dl_fw_reporters_create(struct bnxt *bp) bp 107 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt_fw_health *health = bp->fw_health; bp 109 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (!bp->dl || !health) bp 112 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (!(bp->fw_cap & BNXT_FW_CAP_HOT_RESET) || health->fw_reset_reporter) bp 116 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_health_reporter_create(bp->dl, bp 118 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 0, true, bp); bp 120 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "Failed to create FW fatal health reporter, rc = %ld\n", bp 123 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->fw_cap &= ~BNXT_FW_CAP_HOT_RESET; bp 127 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) bp 132 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_health_reporter_create(bp->dl, bp 134 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 0, false, bp); bp 136 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "Failed to create FW health reporter, rc = %ld\n", bp 139 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY; bp 148 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_health_reporter_create(bp->dl, bp 150 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c 0, true, bp); bp 152 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "Failed to create FW fatal health reporter, rc = %ld\n", bp 155 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY; bp 159 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c void bnxt_dl_fw_reporters_destroy(struct bnxt *bp, bool all) bp 161 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt_fw_health *health = bp->fw_health; bp 163 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (!bp->dl || !health) bp 166 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if ((all || !(bp->fw_cap & BNXT_FW_CAP_HOT_RESET)) && bp 172 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if ((bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY) && !all) bp 186 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c void bnxt_devlink_health_report(struct bnxt *bp, unsigned long event) bp 188 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt_fw_health *fw_health = bp->fw_health; bp 194 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state)) { bp 292 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg, bp 302 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (BNXT_VF(bp)) bp 316 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c idx = bp->pf.port_id; bp 318 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c idx = bp->pf.fw_fid - BNXT_FIRST_PF_FID; bp 320 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c data = dma_alloc_coherent(&bp->pdev->dev, sizeof(*data), bp 335 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT); bp 337 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = hwrm_send_message_silent(bp, msg, msg_len, bp 344 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct hwrm_err_output *resp = bp->hwrm_cmd_resp_addr; bp 351 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c dma_free_coherent(&bp->pdev->dev, sizeof(*data), data, data_dma_addr); bp 353 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_err(bp->dev, "PF does not have admin privileges to modify NVM config\n"); bp 361 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt *bp = bnxt_get_bp_from_dl(dl); bp 364 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_VARIABLE, -1, -1); bp 365 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val); bp 377 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct bnxt *bp = bnxt_get_bp_from_dl(dl); bp 379 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_SET_VARIABLE, -1, -1); bp 384 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c return bnxt_hwrm_nvm_req(bp, id, &req, sizeof(req), &ctx->val); bp 434 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c int bnxt_dl_register(struct bnxt *bp) bp 439 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (bp->hwrm_spec_code < 0x10600) { bp 440 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "Firmware does not support NVM params"); bp 444 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (BNXT_PF(bp)) bp 449 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "devlink_alloc failed"); bp 453 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_link_bp_to_dl(bp, dl); bp 456 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (pci_find_ext_capability(bp->pdev, PCI_EXT_CAP_ID_SRIOV) && bp 457 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->hwrm_spec_code > 0x10803) bp 458 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->eswitch_mode = DEVLINK_ESWITCH_MODE_LEGACY; bp 460 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = devlink_register(dl, &bp->pdev->dev); bp 462 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "devlink_register failed. rc=%d", rc); bp 466 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (!BNXT_PF(bp)) bp 472 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_warn(bp->dev, "devlink_params_register failed. rc=%d", bp 477 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL, bp 478 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->pf.port_id, false, 0, bp 479 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bp->switch_id, sizeof(bp->switch_id)); bp 480 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id); bp 482 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_err(bp->dev, "devlink_port_register failed"); bp 486 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c rc = devlink_port_params_register(&bp->dl_port, bnxt_dl_port_params, bp 489 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c netdev_err(bp->dev, "devlink_port_params_register failed"); bp 498 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_port_unregister(&bp->dl_port); bp 505 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c bnxt_link_bp_to_dl(bp, NULL); bp 510 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c void bnxt_dl_unregister(struct bnxt *bp) bp 512 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c struct devlink *dl = bp->dl; bp 517 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c if (BNXT_PF(bp)) { bp 518 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_port_params_unregister(&bp->dl_port, bp 521 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c devlink_port_unregister(&bp->dl_port); bp 15 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h struct bnxt *bp; /* back ptr to the controlling dev */ bp 20 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h return ((struct bnxt_dl *)devlink_priv(dl))->bp; bp 24 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl) bp 26 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h bp->dl = dl; bp 32 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h bp_dl->bp = bp; bp 59 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h void bnxt_devlink_health_report(struct bnxt *bp, unsigned long event); bp 60 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h void bnxt_dl_fw_reporters_create(struct bnxt *bp); bp 61 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h void bnxt_dl_fw_reporters_destroy(struct bnxt *bp, bool all); bp 62 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h int bnxt_dl_register(struct bnxt *bp); bp 63 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h void bnxt_dl_unregister(struct bnxt *bp); bp 29 drivers/net/ethernet/broadcom/bnxt/bnxt_dim.c bnxt_hwrm_set_ring_coal(bnapi->bp, bnapi); bp 34 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 36 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bp->msg_enable; bp 41 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 43 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->msg_enable = value; bp 49 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 55 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c coal->use_adaptive_rx_coalesce = bp->flags & BNXT_FLAG_DIM; bp 57 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c hw_coal = &bp->rx_coal; bp 64 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c hw_coal = &bp->tx_coal; bp 71 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c coal->stats_block_coalesce_usecs = bp->stats_coal_ticks; bp 79 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 86 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->flags |= BNXT_FLAG_DIM; bp 88 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_DIM) { bp 89 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->flags &= ~(BNXT_FLAG_DIM); bp 94 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c hw_coal = &bp->rx_coal; bp 101 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c hw_coal = &bp->tx_coal; bp 108 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->stats_coal_ticks != coal->stats_block_coalesce_usecs) { bp 117 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->stats_coal_ticks = stats_ticks; bp 118 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->stats_coal_ticks) bp 119 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->current_interval = bp 120 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->stats_coal_ticks * HZ / 1000000; bp 122 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->current_interval = BNXT_TIMER_INTERVAL; bp 129 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_close_nic(bp, true, false); bp 131 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_open_nic(bp, true, false); bp 133 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_set_coal(bp); bp 473 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_get_num_tpa_ring_stats(struct bnxt *bp) bp 475 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_SUPPORTS_TPA(bp)) { bp 476 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->max_tpa_v2) bp 483 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_get_num_ring_stats(struct bnxt *bp) bp 489 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_get_num_tpa_ring_stats(bp); bp 490 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return num_stats * bp->cp_nr_rings; bp 493 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_get_num_stats(struct bnxt *bp) bp 495 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c int num_stats = bnxt_get_num_ring_stats(bp); bp 499 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS) bp 502 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS_EXT) { bp 503 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c num_stats += bp->fw_rx_stats_ext_size + bp 504 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->fw_tx_stats_ext_size; bp 505 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->pri2cos_valid) bp 509 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PCIE_STATS) bp 517 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 521 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_get_num_stats(bp); bp 523 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->num_tests) bp 525 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bp->num_tests; bp 535 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 537 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_get_num_tpa_ring_stats(bp); bp 539 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->bnapi) { bp 540 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c j += bnxt_get_num_ring_stats(bp) + BNXT_NUM_SW_FUNC_STATS; bp 547 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 548 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_napi *bnapi = bp->bnapi[i]; bp 569 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS) { bp 570 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c __le64 *port_stats = (__le64 *)bp->hw_rx_port_stats; bp 577 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS_EXT) { bp 578 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c __le64 *rx_port_stats_ext = (__le64 *)bp->hw_rx_port_stats_ext; bp 579 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c __le64 *tx_port_stats_ext = (__le64 *)bp->hw_tx_port_stats_ext; bp 581 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->fw_rx_stats_ext_size; i++, j++) { bp 585 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->fw_tx_stats_ext_size; i++, j++) { bp 589 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->pri2cos_valid) { bp 592 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->pri2cos_idx[i]; bp 598 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->pri2cos_idx[i]; bp 604 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->pri2cos_idx[i]; bp 610 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->pri2cos_idx[i]; bp 616 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PCIE_STATS) { bp 617 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c __le64 *pcie_stats = (__le64 *)bp->hw_pcie_stats; bp 628 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 634 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 641 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_SUPPORTS_TPA(bp)) bp 644 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->max_tpa_v2) { bp 668 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS) { bp 674 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PORT_STATS_EXT) { bp 675 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->fw_rx_stats_ext_size; i++) { bp 679 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->fw_tx_stats_ext_size; i++) { bp 684 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->pri2cos_valid) { bp 707 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_PCIE_STATS) { bp 715 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->num_tests) bp 716 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c memcpy(buf, bp->test_info->string, bp 717 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->num_tests * ETH_GSTRING_LEN); bp 720 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, "bnxt_get_strings invalid request %x\n", bp 729 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 735 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ering->rx_pending = bp->rx_ring_size; bp 736 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ering->rx_jumbo_pending = bp->rx_agg_ring_size; bp 737 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ering->tx_pending = bp->tx_ring_size; bp 743 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 751 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_close_nic(bp, false, false); bp 753 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->rx_ring_size = ering->rx_pending; bp 754 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_ring_size = ering->tx_pending; bp 755 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_set_ring_params(bp); bp 758 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_open_nic(bp, false, false); bp 766 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 767 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 772 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_NEW_RM(bp)) bp 773 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_func_resc_qcaps(bp, false); bp 776 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, true); bp 781 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_get_max_rings(bp, &max_rx_rings, &max_tx_rings, false)) { bp 795 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_SHARED_RINGS) { bp 796 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c channel->combined_count = bp->rx_nr_rings; bp 797 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_CHIP_TYPE_NITRO_A0(bp)) bp 800 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_CHIP_TYPE_NITRO_A0(bp)) { bp 801 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c channel->rx_count = bp->rx_nr_rings; bp 802 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c channel->tx_count = bp->tx_nr_rings_per_tc; bp 810 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 827 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_CHIP_TYPE_NITRO_A0(bp) && (channel->rx_count || bp 838 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->tx_nr_rings_xdp) { bp 845 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_check_rings(bp, req_tx_rings, req_rx_rings, sh, tcs, tx_xdp); bp 852 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_PF(bp)) { bp 857 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_close_nic(bp, true, false); bp 859 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, "Set channel failure rc :%x\n", bp 866 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->flags |= BNXT_FLAG_SHARED_RINGS; bp 867 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->rx_nr_rings = channel->combined_count; bp 868 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings_per_tc = channel->combined_count; bp 870 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->flags &= ~BNXT_FLAG_SHARED_RINGS; bp 871 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->rx_nr_rings = channel->rx_count; bp 872 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings_per_tc = channel->tx_count; bp 874 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings_xdp = tx_xdp; bp 875 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc + tx_xdp; bp 877 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc * tcs + tx_xdp; bp 879 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->cp_nr_rings = sh ? max_t(int, bp->tx_nr_rings, bp->rx_nr_rings) : bp 880 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->tx_nr_rings + bp->rx_nr_rings; bp 885 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_open_nic(bp, true, false); bp 886 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if ((!rc) && BNXT_PF(bp)) { bp 892 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_reserve_rings(bp, true); bp 899 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_grxclsrlall(struct bnxt *bp, struct ethtool_rxnfc *cmd, bp 904 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data = bp->ntp_fltr_count; bp 909 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c head = &bp->ntp_fltr_hash_tbl[i]; bp 924 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_grxclsrule(struct bnxt *bp, struct ethtool_rxnfc *cmd) bp 938 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c head = &bp->ntp_fltr_hash_tbl[i]; bp 1004 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static u64 get_ethtool_ipv4_rss(struct bnxt *bp) bp 1006 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_IPV4) bp 1011 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static u64 get_ethtool_ipv6_rss(struct bnxt *bp) bp 1013 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6) bp 1018 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_grxfh(struct bnxt *bp, struct ethtool_rxnfc *cmd) bp 1023 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4) bp 1026 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data |= get_ethtool_ipv4_rss(bp); bp 1029 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4) bp 1038 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data |= get_ethtool_ipv4_rss(bp); bp 1042 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV6) bp 1045 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data |= get_ethtool_ipv6_rss(bp); bp 1048 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6) bp 1057 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data |= get_ethtool_ipv6_rss(bp); bp 1066 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_srxfh(struct bnxt *bp, struct ethtool_rxnfc *cmd) bp 1068 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c u32 rss_hash_cfg = bp->rss_hash_cfg; bp 1085 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (tuple == 4 && !(bp->flags & BNXT_FLAG_UDP_RSS_CAP)) bp 1095 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (tuple == 4 && !(bp->flags & BNXT_FLAG_UDP_RSS_CAP)) bp 1132 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->rss_hash_cfg == rss_hash_cfg) bp 1135 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->rss_hash_cfg = rss_hash_cfg; bp 1136 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (netif_running(bp->dev)) { bp 1137 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_close_nic(bp, false, false); bp 1138 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_open_nic(bp, false, false); bp 1146 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1152 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->data = bp->rx_nr_rings; bp 1156 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c cmd->rule_cnt = bp->ntp_fltr_count; bp 1161 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_grxclsrlall(bp, cmd, (u32 *)rule_locs); bp 1165 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_grxclsrule(bp, cmd); bp 1170 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_grxfh(bp, cmd); bp 1183 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1188 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_srxfh(bp, cmd); bp 1211 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1218 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->vnic_info) bp 1221 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c vnic = &bp->vnic_info[0]; bp 1236 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1240 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c strlcpy(info->fw_version, bp->fw_ver_str, sizeof(info->fw_version)); bp 1241 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c strlcpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info)); bp 1242 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c info->n_stats = bnxt_get_num_stats(bp); bp 1243 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c info->testinfo_len = bp->num_tests; bp 1252 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1257 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_WOL_CAP) { bp 1259 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->wol) bp 1266 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1272 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!(bp->flags & BNXT_FLAG_WOL_CAP)) bp 1274 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->wol) { bp 1275 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_hwrm_alloc_wol_fltr(bp)) bp 1277 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->wol = 1; bp 1280 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->wol) { bp 1281 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_hwrm_free_wol_fltr(bp)) bp 1283 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->wol = 0; bp 1450 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1451 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 1456 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->link_lock); bp 1504 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->link_lock); bp 1511 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1512 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 1585 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1586 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 1593 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_SINGLE_PF(bp)) bp 1596 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->link_lock); bp 1638 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_set_link_setting(bp, set_pause, false); bp 1641 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->link_lock); bp 1648 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1649 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 1651 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_VF(bp)) bp 1662 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1663 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 1665 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_SINGLE_PF(bp)) bp 1673 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code >= 0x10201) bp 1692 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_set_pause(bp); bp 1698 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1701 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bp->link_info.link_up; bp 1704 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static void bnxt_print_admin_err(struct bnxt *bp) bp 1706 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_info(bp->dev, "PF does not have admin privileges to flash or reset the device\n"); bp 1721 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1727 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_WRITE, -1, -1); bp 1735 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c kmem = dma_alloc_coherent(&bp->pdev->dev, data_len, &dma_handle, bp 1745 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &req, sizeof(req), FLASH_NVRAM_TIMEOUT); bp 1746 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_free_coherent(&bp->pdev->dev, data_len, kmem, dma_handle); bp 1749 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_print_admin_err(bp); bp 1757 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 1760 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FW_RESET, -1, -1); bp 1798 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 1800 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_print_admin_err(bp); bp 2004 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2005 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_nvm_install_update_output *resp = bp->hwrm_cmd_resp_addr; bp 2012 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_fw_set_time(bp); bp 2037 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &modify, HWRM_NVM_MODIFY, -1, -1); bp 2042 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c kmem = dma_alloc_coherent(&bp->pdev->dev, fw->size, bp 2053 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &modify, sizeof(modify), bp 2055 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_free_coherent(&bp->pdev->dev, fw->size, kmem, bp 2065 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &install, HWRM_NVM_INSTALL_UPDATE, -1, -1); bp 2068 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2069 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &install, sizeof(install), bp 2078 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &install, sizeof(install), bp 2091 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2094 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_print_admin_err(bp); bp 2116 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2119 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_nvm_get_dir_info_output *output = bp->hwrm_cmd_resp_addr; bp 2121 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_DIR_INFO, -1, -1); bp 2123 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2124 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2129 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2135 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2137 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (BNXT_VF(bp)) bp 2148 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2171 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c buf = dma_alloc_coherent(&bp->pdev->dev, buflen, &dma_handle, bp 2178 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_DIR_ENTRIES, -1, -1); bp 2180 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2183 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_free_coherent(&bp->pdev->dev, buflen, buf, dma_handle); bp 2190 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2199 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c buf = dma_alloc_coherent(&bp->pdev->dev, length, &dma_handle, bp 2206 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_READ, -1, -1); bp 2212 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2215 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_free_coherent(&bp->pdev->dev, length, buf, dma_handle); bp 2223 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2226 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_nvm_find_dir_entry_output *output = bp->hwrm_cmd_resp_addr; bp 2228 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_FIND_DIR_ENTRY, -1, -1); bp 2235 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2236 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message_silent(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2245 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2284 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2298 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dev_err(&bp->pdev->dev, "Unable to allocate memory for pkg version, length = %u\n", bp 2309 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c len = strlen(bp->fw_ver_str); bp 2310 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1, bp 2340 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2343 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_ERASE_DIR_ENTRY, -1, -1); bp 2345 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2352 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2356 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_PF(bp)) { bp 2391 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2392 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct ethtool_eee *eee = &bp->eee; bp 2393 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 2398 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_SINGLE_PF(bp)) bp 2401 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!(bp->flags & BNXT_FLAG_EEE_CAP)) bp 2412 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->lpi_tmr_hi && (edata->tx_lpi_timer > bp->lpi_tmr_hi || bp 2413 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c edata->tx_lpi_timer < bp->lpi_tmr_lo)) { bp 2415 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->lpi_tmr_lo, bp->lpi_tmr_hi); bp 2417 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c } else if (!bp->lpi_tmr_hi) { bp 2436 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_set_link_setting(bp, false, true); bp 2443 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2445 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!(bp->flags & BNXT_FLAG_EEE_CAP)) bp 2448 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c *edata = bp->eee; bp 2449 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->eee.eee_enabled) { bp 2457 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->eee.eee_active) bp 2463 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_read_sfp_module_eeprom_info(struct bnxt *bp, u16 i2c_addr, bp 2468 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_port_phy_i2c_read_output *output = bp->hwrm_cmd_resp_addr; bp 2471 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_I2C_READ, -1, -1); bp 2474 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c req.port_id = cpu_to_le16(bp->pf.port_id); bp 2484 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2485 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 2489 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2500 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2507 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->link_info.module_status > bp 2512 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10202) bp 2515 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A0, 0, 0, bp 2550 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2560 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A0, 0, bp 2572 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 1, bp 2582 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2583 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 2585 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_SINGLE_PF(bp)) bp 2592 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_set_link_setting(bp, true, false); bp 2601 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2602 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_pf_info *pf = &bp->pf; bp 2608 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->num_leds || BNXT_VF(bp)) bp 2620 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_LED_CFG, -1, -1); bp 2622 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c req.num_leds = bp->num_leds; bp 2624 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->num_leds; i++, led_cfg++) { bp 2626 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c led_cfg->led_id = bp->leds[i].led_id; bp 2630 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c led_cfg->led_group_id = bp->leds[i].led_group_id; bp 2632 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2636 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_selftest_irq(struct bnxt *bp, u16 cmpl_ring) bp 2640 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_SELFTEST_IRQ, cmpl_ring, -1); bp 2641 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2644 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_test_irq(struct bnxt *bp) bp 2648 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->cp_nr_rings; i++) { bp 2649 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c u16 cmpl_ring = bp->grp_info[i].cp_fw_ring_id; bp 2652 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_selftest_irq(bp, cmpl_ring); bp 2659 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_mac_loopback(struct bnxt *bp, bool enable) bp 2663 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_MAC_CFG, -1, -1); bp 2670 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2673 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_query_force_speeds(struct bnxt *bp, u16 *force_speeds) bp 2675 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_port_phy_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 2679 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_QCAPS, -1, -1); bp 2680 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2681 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2685 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2689 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_disable_an_for_lpbk(struct bnxt *bp, bp 2692 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_link_info *link_info = &bp->link_info; bp 2700 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_query_force_speeds(bp, &fw_advertising); bp 2705 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (netif_carrier_ok(bp->dev)) bp 2706 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c fw_speed = bp->link_info.link_speed; bp 2719 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = hwrm_send_message(bp, req, sizeof(*req), HWRM_CMD_TIMEOUT); bp 2725 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_phy_loopback(struct bnxt *bp, bool enable, bool ext) bp 2729 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_PORT_PHY_CFG, -1, -1); bp 2732 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_disable_an_for_lpbk(bp, &req); bp 2741 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 2744 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_rx_loopback(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 2767 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!ether_addr_equal(data + i, bnapi->bp->dev->dev_addr)) bp 2777 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_poll_loopback(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, bp 2801 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_rx_loopback(bp, cpr, raw_cons, pkt_size); bp 2812 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_run_loopback(struct bnxt *bp) bp 2814 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_tx_ring_info *txr = &bp->tx_ring[0]; bp 2815 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt_rx_ring_info *rxr = &bp->rx_ring[0]; bp 2824 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 2826 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c pkt_size = min(bp->dev->mtu + ETH_HLEN, bp->rx_copy_thresh); bp 2827 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c skb = netdev_alloc_skb(bp->dev, pkt_size); bp 2833 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c ether_addr_copy(&data[i], bp->dev->dev_addr); bp 2838 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c map = dma_map_single(&bp->pdev->dev, skb->data, pkt_size, bp 2840 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (dma_mapping_error(&bp->pdev->dev, map)) { bp 2844 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_xmit_bd(bp, txr, map, pkt_size); bp 2849 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_db_write(bp, &txr->tx_db, txr->tx_prod); bp 2850 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_poll_loopback(bp, cpr, pkt_size); bp 2852 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_unmap_single(&bp->pdev->dev, map, pkt_size, PCI_DMA_TODEVICE); bp 2857 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_run_fw_tests(struct bnxt *bp, u8 test_mask, u8 *test_results) bp 2859 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_selftest_exec_output *resp = bp->hwrm_cmd_resp_addr; bp 2863 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_SELFTEST_EXEC, -1, -1); bp 2864 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 2867 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp->test_info->timeout); bp 2869 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 2874 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c #define BNXT_MACLPBK_TEST_IDX (bp->num_tests - BNXT_DRV_TESTS) bp 2882 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2889 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!bp->num_tests || !BNXT_SINGLE_PF(bp)) bp 2891 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c memset(buf, 0, sizeof(u64) * bp->num_tests); bp 2898 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c (bp->test_info->flags & BNXT_TEST_FL_EXT_LPBK)) bp 2902 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->pf.active_vfs) { bp 2910 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->num_tests - BNXT_DRV_TESTS; i++) { bp 2913 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!(bp->test_info->offline_mask & bit_val)) bp 2919 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_run_fw_tests(bp, test_mask, &test_results); bp 2921 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_close_nic(bp, false, false); bp 2924 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_run_fw_tests(bp, test_mask, &test_results); bp 2927 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_mac_loopback(bp, true); bp 2929 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_half_open_nic(bp); bp 2931 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_mac_loopback(bp, false); bp 2935 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_run_loopback(bp)) bp 2940 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_mac_loopback(bp, false); bp 2941 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_phy_loopback(bp, true, false); bp 2943 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_run_loopback(bp)) { bp 2949 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_phy_loopback(bp, true, true); bp 2951 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bnxt_run_loopback(bp)) { bp 2956 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_phy_loopback(bp, false, false); bp 2957 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_half_close_nic(bp); bp 2958 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_open_nic(bp, false, true); bp 2960 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (rc || bnxt_test_irq(bp)) { bp 2964 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->num_tests - BNXT_DRV_TESTS; i++) { bp 2976 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 2979 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!BNXT_PF(bp)) { bp 2984 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (pci_vfs_assigned(bp->pdev)) { bp 2992 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10803) bp 3002 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10803) bp 3017 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_dbg_dma_data(struct bnxt *bp, void *msg, int msg_len, bp 3020 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_dbg_cmn_output *cmn_resp = bp->hwrm_cmd_resp_addr; bp 3029 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_buf = dma_alloc_coherent(&bp->pdev->dev, info->dma_len, &dma_handle, bp 3038 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 3041 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT); bp 3085 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 3086 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dma_free_coherent(&bp->pdev->dev, info->dma_len, dma_buf, dma_handle); bp 3090 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_dbg_coredump_list(struct bnxt *bp, bp 3097 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_DBG_COREDUMP_LIST, -1, -1); bp 3104 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_dbg_dma_data(bp, &req, sizeof(req), &info); bp 3113 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_dbg_coredump_initiate(struct bnxt *bp, u16 component_id, bp 3118 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_DBG_COREDUMP_INITIATE, -1, -1); bp 3122 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_COREDUMP_TIMEOUT); bp 3125 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_hwrm_dbg_coredump_retrieve(struct bnxt *bp, u16 component_id, bp 3133 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_DBG_COREDUMP_RETRIEVE, -1, -1); bp 3148 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_dbg_dma_data(bp, &req, sizeof(req), &info); bp 3156 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_fill_coredump_seg_hdr(struct bnxt *bp, bp 3175 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c seg_hdr->function_id = cpu_to_le16(bp->pdev->devfn); bp 3184 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_fill_coredump_record(struct bnxt *bp, struct bnxt_coredump_record *record, bp 3224 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->asic_id1 = cpu_to_le32(bp->chip_num << 16 | bp 3225 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->ver_resp.chip_rev << 8 | bp 3226 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->ver_resp.chip_metal); bp 3233 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c static int bnxt_get_coredump(struct bnxt *bp, void *buf, u32 *dump_len) bp 3254 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_fill_coredump_seg_hdr(bp, &seg_hdr, NULL, ver_get_resp_len, bp 3258 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c memcpy(buf + offset, &bp->ver_resp, ver_get_resp_len); bp 3262 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_dbg_coredump_list(bp, &coredump); bp 3264 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, "Failed to get coredump segment list\n"); bp 3287 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_dbg_coredump_initiate(bp, comp_id, seg_id); bp 3289 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, bp 3296 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = bnxt_hwrm_dbg_coredump_retrieve(bp, comp_id, seg_id, bp 3302 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, bp 3309 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_fill_coredump_seg_hdr(bp, &seg_hdr, seg_record, seg_len, bp 3326 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_fill_coredump_record(bp, buf + offset, start_time, bp 3332 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c netdev_err(bp->dev, "Firmware returned large coredump buffer"); bp 3338 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 3340 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10801) bp 3343 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c dump->version = bp->ver_resp.hwrm_fw_maj_8b << 24 | bp 3344 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->ver_resp.hwrm_fw_min_8b << 16 | bp 3345 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->ver_resp.hwrm_fw_bld_8b << 8 | bp 3346 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->ver_resp.hwrm_fw_rsvd_8b; bp 3348 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_get_coredump(bp, NULL, &dump->len); bp 3354 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct bnxt *bp = netdev_priv(dev); bp 3356 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10801) bp 3361 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c return bnxt_get_coredump(bp, buf, &dump->len); bp 3364 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c void bnxt_ethtool_init(struct bnxt *bp) bp 3366 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct hwrm_selftest_qlist_output *resp = bp->hwrm_cmd_resp_addr; bp 3369 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct net_device *dev = bp->dev; bp 3372 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (!(bp->fw_cap & BNXT_FW_CAP_PKG_VER)) bp 3375 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->num_tests = 0; bp 3376 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->hwrm_spec_code < 0x10704 || !BNXT_SINGLE_PF(bp)) bp 3379 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_SELFTEST_QLIST, -1, -1); bp 3380 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_lock(&bp->hwrm_cmd_lock); bp 3381 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 3385 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c test_info = bp->test_info; bp 3387 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c test_info = kzalloc(sizeof(*bp->test_info), GFP_KERNEL); bp 3391 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->test_info = test_info; bp 3392 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->num_tests = resp->num_tests + BNXT_DRV_TESTS; bp 3393 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c if (bp->num_tests > BNXT_MAX_TEST) bp 3394 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->num_tests = BNXT_MAX_TEST; bp 3400 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c for (i = 0; i < bp->num_tests; i++) { bp 3425 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c mutex_unlock(&bp->hwrm_cmd_lock); bp 3428 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c void bnxt_ethtool_free(struct bnxt *bp) bp 3430 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c kfree(bp->test_info); bp 3431 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c bp->test_info = NULL; bp 86 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h void bnxt_ethtool_init(struct bnxt *bp); bp 87 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h void bnxt_ethtool_free(struct bnxt *bp); bp 25 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_fwd_async_event_cmpl(struct bnxt *bp, bp 32 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_ASYNC_EVENT_CMPL, -1, -1); bp 42 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 44 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "hwrm_fwd_async_event_cmpl failed. rc:%d\n", bp 49 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_vf_ndo_prep(struct bnxt *bp, int vf_id) bp 51 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!test_bit(BNXT_STATE_OPEN, &bp->state)) { bp 52 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "vf ndo called though PF is down\n"); bp 55 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!bp->pf.active_vfs) { bp 56 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "vf ndo called though sriov is disabled\n"); bp 59 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (vf_id >= bp->pf.active_vfs) { bp 60 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "Invalid VF id %d\n", vf_id); bp 69 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 75 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->hwrm_spec_code < 0x10701) bp 78 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 82 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 95 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 98 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 108 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_func_qcfg_flags(struct bnxt *bp, struct bnxt_vf_info *vf) bp 110 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 114 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); bp 116 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 117 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 119 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 123 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 127 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static bool bnxt_is_trusted_vf(struct bnxt *bp, struct bnxt_vf_info *vf) bp 129 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!(bp->fw_cap & BNXT_FW_CAP_TRUSTED_VF)) bp 132 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_func_qcfg_flags(bp, vf); bp 136 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_set_trusted_vf(struct bnxt *bp, struct bnxt_vf_info *vf) bp 141 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!(bp->fw_cap & BNXT_FW_CAP_TRUSTED_VF)) bp 144 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 150 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 156 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 159 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bnxt_vf_ndo_prep(bp, vf_id)) bp 162 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 168 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_set_trusted_vf(bp, vf); bp 175 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 179 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 184 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 198 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c ivi->trusted = bnxt_is_trusted_vf(bp, vf); bp 212 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 216 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 226 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 229 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 233 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 240 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 245 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->hwrm_spec_code < 0x10201) bp 251 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 261 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 266 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 270 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 280 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 285 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 289 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 290 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c pf_link_speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed); bp 292 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_info(bp->dev, "max tx rate %d exceed PF link speed for VF %d\n", bp 298 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_info(bp->dev, "min tx rate %d is invalid for VF %d\n", bp 304 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 310 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 320 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 324 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_ndo_prep(bp, vf_id); bp 328 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 342 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "Invalid link option\n"); bp 347 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_hwrm_fwd_async_event_cmpl(bp, vf, bp 352 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_set_vf_attr(struct bnxt *bp, int num_vfs) bp 358 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[i]; bp 364 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_func_vf_resource_free(struct bnxt *bp, int num_vfs) bp 367 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_pf_info *pf = &bp->pf; bp 370 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESC_FREE, -1, -1); bp 372 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 375 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 380 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 384 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static void bnxt_free_vf_resources(struct bnxt *bp) bp 386 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct pci_dev *pdev = bp->pdev; bp 389 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c kfree(bp->pf.vf_event_bmap); bp 390 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.vf_event_bmap = NULL; bp 393 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->pf.hwrm_cmd_req_addr[i]) { bp 395 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_addr[i], bp 396 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_dma_addr[i]); bp 397 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_addr[i] = NULL; bp 401 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c kfree(bp->pf.vf); bp 402 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.vf = NULL; bp 405 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_alloc_vf_resources(struct bnxt *bp, int num_vfs) bp 407 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct pci_dev *pdev = bp->pdev; bp 410 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.vf = kcalloc(num_vfs, sizeof(struct bnxt_vf_info), GFP_KERNEL); bp 411 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!bp->pf.vf) bp 414 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_set_vf_attr(bp, num_vfs); bp 422 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_addr[i] = bp 424 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c &bp->pf.hwrm_cmd_req_dma_addr[i], bp 427 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!bp->pf.hwrm_cmd_req_addr[i]) bp 431 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_vf_info *vf = &bp->pf.vf[k]; bp 433 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf->hwrm_cmd_req_addr = bp->pf.hwrm_cmd_req_addr[i] + bp 436 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_dma_addr[i] + j * bp 443 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.vf_event_bmap = kzalloc(16, GFP_KERNEL); bp 444 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!bp->pf.vf_event_bmap) bp 447 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.hwrm_cmd_req_pages = nr_pages; bp 451 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_func_buf_rgtr(struct bnxt *bp) bp 455 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_BUF_RGTR, -1, -1); bp 457 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c req.req_buf_num_pages = cpu_to_le16(bp->pf.hwrm_cmd_req_pages); bp 460 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c req.req_buf_page_addr0 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[0]); bp 461 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c req.req_buf_page_addr1 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[1]); bp 462 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c req.req_buf_page_addr2 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[2]); bp 463 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c req.req_buf_page_addr3 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[3]); bp 465 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 469 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static void __bnxt_set_vf_params(struct bnxt *bp, int vf_id) bp 474 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf = &bp->pf.vf[vf_id]; bp 475 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 497 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 503 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_func_vf_resc_cfg(struct bnxt *bp, int num_vfs, bool reset) bp 506 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 509 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_pf_info *pf = &bp->pf; bp 513 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_RESOURCE_CFG, -1, -1); bp 515 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_CHIP_P5) { bp 516 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_msix = hw_resc->max_nqs - bnxt_nq_rings_in_use(bp); bp 519 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_ring_grps = hw_resc->max_hw_ring_grps - bp->rx_nr_rings; bp 521 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_cp_rings = bnxt_get_avail_cp_rings_for_en(bp); bp 522 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_stat_ctx = bnxt_get_avail_stat_ctxs_for_en(bp); bp 523 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 524 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings * 2; bp 526 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_rx_rings = hw_resc->max_rx_rings - bp->rx_nr_rings; bp 527 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_tx_rings = hw_resc->max_tx_rings - bp->tx_nr_rings; bp 528 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_vnics = hw_resc->max_vnics - bp->nr_vnics; bp 545 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!(bp->flags & BNXT_FLAG_CHIP_P5)) bp 570 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 573 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 576 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c __bnxt_set_vf_params(bp, i); bp 579 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 586 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 598 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_CHIP_P5) bp 609 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_func_cfg(struct bnxt *bp, int num_vfs) bp 613 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 615 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_pf_info *pf = &bp->pf; bp 619 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_CFG, -1, -1); bp 622 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_cp_rings = bnxt_get_avail_cp_rings_for_en(bp) / num_vfs; bp 623 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_stat_ctx = bnxt_get_avail_stat_ctxs_for_en(bp) / num_vfs; bp 624 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_AGG_RINGS) bp 625 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings * 2) / bp 628 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_rx_rings = (hw_resc->max_rx_rings - bp->rx_nr_rings) / bp 630 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_ring_grps = (hw_resc->max_hw_ring_grps - bp->rx_nr_rings) / num_vfs; bp 631 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_tx_rings = (hw_resc->max_tx_rings - bp->tx_nr_rings) / num_vfs; bp 632 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_vnics = (hw_resc->max_vnics - bp->nr_vnics) / num_vfs; bp 646 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mtu = bp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; bp 661 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 666 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = _hwrm_send_message(bp, &req, sizeof(req), bp 672 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = __bnxt_hwrm_get_tx_rings(bp, pf->vf[i].fw_fid, bp 678 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 692 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_func_cfg(struct bnxt *bp, int num_vfs, bool reset) bp 694 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (BNXT_NEW_RM(bp)) bp 695 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_func_vf_resc_cfg(bp, num_vfs, reset); bp 697 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_func_cfg(bp, num_vfs); bp 700 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset) bp 705 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_hwrm_func_buf_rgtr(bp); bp 710 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_func_cfg(bp, *num_vfs, reset); bp 713 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_warn(bp->dev, "Unable to reserve resources for SRIOV.\n"); bp 717 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_warn(bp->dev, "Only able to reserve resources for %d VFs.\n", bp 722 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_ulp_sriov_cfg(bp, *num_vfs); bp 726 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_sriov_enable(struct bnxt *bp, int *num_vfs) bp 730 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt_hw_resc *hw_resc = &bp->hw_resc; bp 740 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c avail_cp = bnxt_get_avail_cp_rings_for_en(bp); bp 741 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c avail_stat = bnxt_get_avail_stat_ctxs_for_en(bp); bp 749 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->flags & BNXT_FLAG_AGG_RINGS) { bp 750 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (hw_resc->max_rx_rings - bp->rx_nr_rings * 2 >= bp 754 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (hw_resc->max_rx_rings - bp->rx_nr_rings >= bp 758 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (hw_resc->max_vnics - bp->nr_vnics < min_rx_rings || bp 762 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (hw_resc->max_tx_rings - bp->tx_nr_rings >= min_tx_rings && bp 766 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (hw_resc->max_rsscos_ctxs - bp->rsscos_nr_ctxs >= bp 777 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "Cannot enable VF's as all resources are used by PF\n"); bp 782 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_info(bp->dev, "Requested VFs %d, can enable %d\n", bp 787 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_alloc_vf_resources(bp, *num_vfs); bp 791 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_cfg_hw_sriov(bp, num_vfs, false); bp 795 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = pci_enable_sriov(bp->pdev, *num_vfs); bp 803 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_func_vf_resource_free(bp, *num_vfs); bp 806 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_free_vf_resources(bp); bp 811 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_sriov_disable(struct bnxt *bp) bp 813 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c u16 num_vfs = pci_num_vf(bp->pdev); bp 819 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->sriov_lock); bp 820 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_vf_reps_destroy(bp); bp 822 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (pci_vfs_assigned(bp->pdev)) { bp 824 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp, NULL, ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD); bp 825 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_warn(bp->dev, "Unable to free %d VFs because some are assigned to VMs.\n", bp 828 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c pci_disable_sriov(bp->pdev); bp 830 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_func_vf_resource_free(bp, num_vfs); bp 832 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->sriov_lock); bp 834 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_free_vf_resources(bp); bp 836 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->pf.active_vfs = 0; bp 839 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_restore_pf_fw_resources(bp); bp 842 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_ulp_sriov_cfg(bp, 0); bp 848 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct bnxt *bp = netdev_priv(dev); bp 850 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!(bp->flags & BNXT_FLAG_USING_MSIX)) { bp 861 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) { bp 866 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->sriov_cfg = true; bp 869 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (pci_vfs_assigned(bp->pdev)) { bp 876 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (num_vfs && num_vfs == bp->pf.active_vfs) bp 880 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_sriov_disable(bp); bp 884 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_sriov_enable(bp, &num_vfs); bp 887 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp->sriov_cfg = false; bp 888 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c wake_up(&bp->sriov_cfg_wait); bp 893 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_fwd_resp(struct bnxt *bp, struct bnxt_vf_info *vf, bp 903 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FWD_RESP, -1, -1); bp 913 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 915 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "hwrm_fwd_resp failed. rc:%d\n", rc); bp 919 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_fwd_err_resp(struct bnxt *bp, struct bnxt_vf_info *vf, bp 928 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_REJECT_FWD_RESP, -1, -1); bp 934 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 936 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "hwrm_fwd_err_resp failed. rc:%d\n", rc); bp 940 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_hwrm_exec_fwd_resp(struct bnxt *bp, struct bnxt_vf_info *vf, bp 949 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_EXEC_FWD_RESP, -1, -1); bp 955 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 957 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "hwrm_exec_fw_resp failed. rc:%d\n", rc); bp 961 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_vf_configure_mac(struct bnxt *bp, struct bnxt_vf_info *vf) bp 971 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bool trust = bnxt_is_trusted_vf(bp, vf); bp 977 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_exec_fwd_resp(bp, vf, msg_size); bp 979 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_fwd_err_resp(bp, vf, msg_size); bp 981 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_exec_fwd_resp(bp, vf, msg_size); bp 984 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_vf_validate_set_mac(struct bnxt *bp, struct bnxt_vf_info *vf) bp 992 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_fwd_err_resp(bp, vf, msg_size); bp 999 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bnxt_is_trusted_vf(bp, vf)) { bp 1017 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_exec_fwd_resp(bp, vf, msg_size); bp 1018 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c return bnxt_hwrm_fwd_err_resp(bp, vf, msg_size); bp 1021 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf) bp 1028 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp, vf, sizeof(struct hwrm_port_phy_qcfg_input)); bp 1035 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 1036 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c memcpy(&phy_qcfg_resp, &bp->link_info.phy_qcfg_resp, bp 1038 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 1067 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_hwrm_fwd_resp(bp, vf, &phy_qcfg_resp, bp 1075 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c static int bnxt_vf_req_validate_snd(struct bnxt *bp, struct bnxt_vf_info *vf) bp 1083 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_configure_mac(bp, vf); bp 1086 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_validate_set_mac(bp, vf); bp 1093 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bp, vf, sizeof(struct hwrm_func_cfg_input)); bp 1096 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = bnxt_vf_set_link(bp, vf); bp 1104 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_hwrm_exec_fwd_req(struct bnxt *bp) bp 1106 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c u32 i = 0, active_vfs = bp->pf.active_vfs, vf_id; bp 1110 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c vf_id = find_next_bit(bp->pf.vf_event_bmap, active_vfs, i); bp 1114 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c clear_bit(vf_id, bp->pf.vf_event_bmap); bp 1115 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_vf_req_validate_snd(bp, &bp->pf.vf[vf_id]); bp 1120 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_update_vf_mac(struct bnxt *bp) bp 1123 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr; bp 1125 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCAPS, -1, -1); bp 1128 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_lock(&bp->hwrm_cmd_lock); bp 1129 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (_hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT)) bp 1139 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!ether_addr_equal(resp->mac_address, bp->vf.mac_addr)) bp 1140 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c memcpy(bp->vf.mac_addr, resp->mac_address, ETH_ALEN); bp 1143 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (is_valid_ether_addr(bp->vf.mac_addr)) bp 1144 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c memcpy(bp->dev->dev_addr, bp->vf.mac_addr, ETH_ALEN); bp 1146 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c mutex_unlock(&bp->hwrm_cmd_lock); bp 1149 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c int bnxt_approve_mac(struct bnxt *bp, u8 *mac, bool strict) bp 1154 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (!BNXT_VF(bp)) bp 1157 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (bp->hwrm_spec_code < 0x10202) { bp 1158 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c if (is_valid_ether_addr(bp->vf.mac_addr)) bp 1162 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_VF_CFG, -1, -1); bp 1165 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 1169 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_warn(bp->dev, "VF MAC address %pM not approved by the PF\n", bp 1177 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset) bp 1184 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_sriov_disable(struct bnxt *bp) bp 1188 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_hwrm_exec_fwd_req(struct bnxt *bp) bp 1190 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c netdev_err(bp->dev, "Invalid VF message received when SRIOV is not enable\n"); bp 1193 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c void bnxt_update_vf_mac(struct bnxt *bp) bp 1197 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c int bnxt_approve_mac(struct bnxt *bp, u8 *mac, bool strict) bp 39 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset); bp 45 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt *bp; bp 58 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bp = netdev_priv(dev); bp 59 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bp->pf.fw_fid; bp 62 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_parse_redir(struct bnxt *bp, bp 69 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "no dev in mirred action"); bp 78 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_parse_vlan(struct bnxt *bp, bp 97 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_parse_tunnel_set(struct bnxt *bp, bp 105 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "only IPv4 tunnel-encap is supported"); bp 114 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_parse_actions(struct bnxt *bp, bp 122 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "no actions"); bp 132 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_parse_redir(bp, actions, act); bp 139 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_parse_vlan(bp, actions, act); bp 144 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_parse_tunnel_set(bp, actions, act); bp 159 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c actions->dst_fid = bp->pf.fw_fid; bp 163 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_flow_get_dst_fid(bp, actions->dst_dev); bp 172 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_parse_flow(struct bnxt *bp, bp 182 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "cannot form TC key: used_keys = 0x%x", bp 303 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_parse_actions(bp, &flow->actions, &rule->action); bp 306 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_hwrm_cfa_flow_free(struct bnxt *bp, bp 312 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_FLOW_FREE, -1, -1); bp 313 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE) bp 318 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 320 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "%s: Error rc=%d", __func__, rc); bp 386 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_hwrm_cfa_flow_alloc(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 399 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_FLOW_ALLOC, -1, -1); bp 496 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_lock(&bp->hwrm_cmd_lock); bp 497 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 499 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c resp = bnxt_get_hwrm_resp_addr(bp, &req); bp 510 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE) { bp 515 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_unlock(&bp->hwrm_cmd_lock); bp 519 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int hwrm_cfa_decap_filter_alloc(struct bnxt *bp, bp 531 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_DECAP_FILTER_ALLOC, -1, -1); bp 577 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_lock(&bp->hwrm_cmd_lock); bp 578 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 580 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c resp = bnxt_get_hwrm_resp_addr(bp, &req); bp 583 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "%s: Error rc=%d", __func__, rc); bp 585 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_unlock(&bp->hwrm_cmd_lock); bp 590 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int hwrm_cfa_decap_filter_free(struct bnxt *bp, bp 596 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_DECAP_FILTER_FREE, -1, -1); bp 599 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 601 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "%s: Error rc=%d", __func__, rc); bp 606 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int hwrm_cfa_encap_record_alloc(struct bnxt *bp, bp 619 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_ENCAP_RECORD_ALLOC, -1, -1); bp 642 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_lock(&bp->hwrm_cmd_lock); bp 643 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 645 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c resp = bnxt_get_hwrm_resp_addr(bp, &req); bp 648 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "%s: Error rc=%d", __func__, rc); bp 650 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_unlock(&bp->hwrm_cmd_lock); bp 655 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int hwrm_cfa_encap_record_free(struct bnxt *bp, bp 661 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_ENCAP_RECORD_FREE, -1, -1); bp 664 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 666 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "%s: Error rc=%d", __func__, rc); bp 671 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_put_l2_node(struct bnxt *bp, bp 675 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 684 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, bp 693 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_get_l2_node(struct bnxt *bp, struct rhashtable *l2_table, bp 713 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, bp 727 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_get_ref_flow_handle(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 731 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 735 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c l2_node = bnxt_tc_get_l2_node(bp, &tc_info->l2_table, bp 767 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static bool bnxt_tc_can_offload(struct bnxt *bp, struct bnxt_tc_flow *flow) bp 773 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Cannot offload non-TCP/UDP (%d) ports", bp 781 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Wildcard match unsupported for Source MAC\n"); bp 786 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Wildcard match unsupported for Dest MAC\n"); bp 795 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Unsupported VLAN TCI\n"); bp 802 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Wildcard match unsupported for VLAN TPID\n"); bp 809 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "Wildcard match unsupported for Ethertype\n"); bp 819 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_put_tunnel_node(struct bnxt *bp, bp 830 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, "rhashtable_remove_fast rc=%d", rc); bp 844 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_get_tunnel_node(struct bnxt *bp, struct rhashtable *tunnel_table, bp 871 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "error rc=%d", rc); bp 875 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_get_ref_decap_handle(struct bnxt *bp, bp 881 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 885 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c decap_l2_node = bnxt_tc_get_l2_node(bp, &tc_info->decap_l2_table, bp 915 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_put_decap_l2_node(struct bnxt *bp, bp 919 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 929 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, "rhashtable_remove_fast rc=%d", rc); bp 934 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_put_decap_handle(struct bnxt *bp, bp 938 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 942 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_decap_l2_node(bp, flow_node); bp 944 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, bp 948 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c hwrm_cfa_decap_filter_free(bp, decap_handle); bp 951 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp, bp 956 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct net_device *real_dst_dev = bp->dev; bp 969 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "no route to %pI4b", &flow.daddr); bp 982 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, bp 994 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, bp 1004 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "can't lookup neighbor for %pI4b", bp 1026 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_get_decap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 1031 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1045 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table, bp 1062 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_resolve_tunnel_hdrs(bp, &tun_key, &l2_info); bp 1081 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_get_ref_decap_handle(bp, flow, decap_l2_info, flow_node, bp 1087 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = hwrm_cfa_decap_filter_alloc(bp, flow, decap_l2_info, bp 1098 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_decap_l2_node(bp, flow_node); bp 1100 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table, bp 1106 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_put_encap_handle(struct bnxt *bp, bp 1110 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1113 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, bp 1116 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c hwrm_cfa_encap_record_free(bp, encap_handle); bp 1124 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_get_encap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 1129 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1137 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c encap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->encap_table, bp 1148 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_resolve_tunnel_hdrs(bp, encap_key, &encap_node->l2_info); bp 1153 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = hwrm_cfa_encap_record_alloc(bp, encap_key, &encap_node->l2_info, bp 1163 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_tunnel_node(bp, &tc_info->encap_table, bp 1168 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_put_tunnel_handle(struct bnxt *bp, bp 1173 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_decap_handle(bp, flow_node); bp 1175 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_encap_handle(bp, flow_node->encap_node); bp 1178 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_get_tunnel_handle(struct bnxt *bp, bp 1184 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_get_decap_handle(bp, flow, flow_node, bp 1187 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_get_encap_handle(bp, flow, flow_node, bp 1192 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int __bnxt_tc_del_flow(struct bnxt *bp, bp 1195 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1199 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cfa_flow_free(bp, flow_node); bp 1204 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_tunnel_handle(bp, &flow_node->flow, flow_node); bp 1207 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_l2_node(bp, flow_node); bp 1214 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, "Error: %s: rhashtable_remove_fast rc=%d", bp 1221 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_set_flow_dir(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 1224 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c flow->l2_key.dir = (bp->pf.fw_fid == src_fid) ? BNXT_DIR_RX : BNXT_DIR_TX; bp 1227 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_tc_set_src_fid(struct bnxt *bp, struct bnxt_tc_flow *flow, bp 1231 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c flow->src_fid = bp->pf.fw_fid; bp 1249 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid, bp 1253 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1268 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_parse_flow(bp, tc_flow_cmd, flow); bp 1272 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_set_src_fid(bp, flow, src_fid); bp 1273 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_set_flow_dir(bp, flow, flow->src_fid); bp 1275 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (!bnxt_tc_can_offload(bp, flow)) { bp 1285 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c __bnxt_tc_del_flow(bp, old_node); bp 1291 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_get_ref_flow_handle(bp, flow, new_node, &ref_flow_handle); bp 1296 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_get_tunnel_handle(bp, flow, new_node, &tunnel_handle); bp 1301 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_hwrm_cfa_flow_alloc(bp, flow, ref_flow_handle, bp 1318 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cfa_flow_free(bp, new_node); bp 1320 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_tunnel_handle(bp, flow, new_node); bp 1322 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_put_l2_node(bp, new_node); bp 1328 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_err(bp->dev, "Error: %s: cookie=0x%lx error=%d", bp 1333 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_del_flow(struct bnxt *bp, bp 1336 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1345 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return __bnxt_tc_del_flow(bp, flow_node); bp 1348 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static int bnxt_tc_get_flow_stats(struct bnxt *bp, bp 1352 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1379 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c static void bnxt_fill_cfa_stats_req(struct bnxt *bp, bp 1385 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE) { bp 1406 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cfa_flow_stats_get(struct bnxt *bp, int num_flows, bp 1415 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_FLOW_STATS, -1, -1); bp 1420 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_fill_cfa_stats_req(bp, flow_node, bp 1424 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_lock(&bp->hwrm_cmd_lock); bp 1425 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 1430 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c resp = bnxt_get_hwrm_resp_addr(bp, &req); bp 1441 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_info(bp->dev, "error rc=%d", rc); bp 1443 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c mutex_unlock(&bp->hwrm_cmd_lock); bp 1476 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_flow_stats_batch_update(struct bnxt *bp, int num_flows, bp 1479 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1482 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_hwrm_cfa_flow_stats_get(bp, num_flows, stats_batch); bp 1502 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_flow_stats_batch_prep(struct bnxt *bp, bp 1506 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1538 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c void bnxt_tc_flow_stats_work(struct bnxt *bp) bp 1540 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1550 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c rc = bnxt_tc_flow_stats_batch_prep(bp, tc_info->stats_batch, bp 1561 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bnxt_tc_flow_stats_batch_update(bp, num_flows, bp 1568 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid, bp 1573 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_add_flow(bp, src_fid, cls_flower); bp 1575 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_del_flow(bp, cls_flower); bp 1577 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c return bnxt_tc_get_flow_stats(bp, cls_flower); bp 1614 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c int bnxt_init_tc(struct bnxt *bp) bp 1619 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (bp->hwrm_spec_code < 0x10803) { bp 1620 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c netdev_warn(bp->dev, bp 1663 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bp->dev->hw_features |= NETIF_F_HW_TC; bp 1664 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bp->dev->features |= NETIF_F_HW_TC; bp 1665 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bp->tc_info = tc_info; bp 1681 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c void bnxt_shutdown_tc(struct bnxt *bp) bp 1683 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c struct bnxt_tc_info *tc_info = bp->tc_info; bp 1685 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c if (!bnxt_tc_flower_enabled(bp)) bp 1694 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c bp->tc_info = NULL; bp 198 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid, bp 200 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h int bnxt_init_tc(struct bnxt *bp); bp 201 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h void bnxt_shutdown_tc(struct bnxt *bp); bp 202 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h void bnxt_tc_flow_stats_work(struct bnxt *bp); bp 204 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline bool bnxt_tc_flower_enabled(struct bnxt *bp) bp 206 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h return bp->tc_info && bp->tc_info->enabled; bp 211 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline int bnxt_tc_setup_flower(struct bnxt *bp, u16 src_fid, bp 217 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline int bnxt_init_tc(struct bnxt *bp) bp 222 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline void bnxt_shutdown_tc(struct bnxt *bp) bp 226 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline void bnxt_tc_flow_stats_work(struct bnxt *bp) bp 230 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h static inline bool bnxt_tc_flower_enabled(struct bnxt *bp) bp 31 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 40 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c netdev_err(bp->dev, "ulp id %d already registered\n", ulp_id); bp 46 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c max_stat_ctxs = bnxt_get_max_func_stat_ctxs(bp); bp 48 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bp->cp_nr_rings == max_stat_ctxs) bp 57 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (test_bit(BNXT_STATE_OPEN, &bp->state)) bp 58 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_hwrm_vnic_cfg(bp, 0); bp 67 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 77 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c netdev_err(bp->dev, "ulp id %d not registered\n", ulp_id); bp 84 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_hwrm_func_rgtr_async_events(bp, NULL, 0); bp 97 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c static void bnxt_fill_msix_vecs(struct bnxt *bp, struct bnxt_msix_entry *ent) bp 99 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 105 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c ent[i].vector = bp->irq_tbl[idx + i].vector; bp 115 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 126 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (!(bp->flags & BNXT_FLAG_USING_MSIX)) bp 132 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c max_cp_rings = bnxt_get_max_func_cp_rings(bp); bp 133 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c avail_msix = bnxt_get_avail_msix(bp, num_msix); bp 139 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (BNXT_NEW_RM(bp)) { bp 140 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c idx = bp->cp_nr_rings; bp 142 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c max_idx = min_t(int, bp->total_irqs, max_cp_rings); bp 147 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c hw_resc = &bp->hw_resc; bp 149 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bp->total_irqs < total_vecs || bp 150 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c (BNXT_NEW_RM(bp) && hw_resc->resv_irqs < total_vecs)) { bp 152 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_close_nic(bp, true, false); bp 153 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c rc = bnxt_open_nic(bp, true, false); bp 155 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c rc = bnxt_reserve_rings(bp, true); bp 163 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (BNXT_NEW_RM(bp)) { bp 166 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c resv_msix = hw_resc->resv_irqs - bp->cp_nr_rings; bp 170 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_fill_msix_vecs(bp, ent); bp 178 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 190 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_close_nic(bp, true, false); bp 191 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_open_nic(bp, true, false); bp 196 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c int bnxt_get_ulp_msix_num(struct bnxt *bp) bp 198 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) { bp 199 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 206 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c int bnxt_get_ulp_msix_base(struct bnxt *bp) bp 208 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) { bp 209 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 217 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c int bnxt_get_ulp_stat_ctxs(struct bnxt *bp) bp 219 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) bp 229 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 233 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (ulp_id != BNXT_ROCE_ULP && bp->fw_reset_state) bp 236 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c mutex_lock(&bp->hwrm_cmd_lock); bp 238 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c req->resp_addr = cpu_to_le64(bp->hwrm_cmd_resp_dma_addr); bp 239 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c rc = _hwrm_send_message(bp, fw_msg->msg, fw_msg->msg_len, bp 242 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct output *resp = bp->hwrm_cmd_resp_addr; bp 250 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c mutex_unlock(&bp->hwrm_cmd_lock); bp 264 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_stop(struct bnxt *bp) bp 266 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 283 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_start(struct bnxt *bp) bp 285 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 302 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_sriov_cfg(struct bnxt *bp, int num_vfs) bp 304 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 327 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_shutdown(struct bnxt *bp) bp 329 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 346 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_irq_stop(struct bnxt *bp) bp 348 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 354 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) { bp 367 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_irq_restart(struct bnxt *bp, int err) bp 369 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 375 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bnxt_ulp_registered(bp->edev, BNXT_ROCE_ULP)) { bp 391 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_fill_msix_vecs(bp, ent); bp 398 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c void bnxt_ulp_async_events(struct bnxt *bp, struct hwrm_async_event_cmpl *cmpl) bp 401 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt_en_dev *edev = bp->edev; bp 431 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 442 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bnxt_hwrm_func_rgtr_async_events(bp, events_bmap, max_id + 1); bp 457 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c struct bnxt *bp = netdev_priv(dev); bp 460 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c edev = bp->edev; bp 466 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bp->flags & BNXT_FLAG_ROCEV1_CAP) bp 468 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c if (bp->flags & BNXT_FLAG_ROCEV2_CAP) bp 471 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c edev->pdev = bp->pdev; bp 472 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c bp->edev = edev; bp 474 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c return bp->edev; bp 91 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h int bnxt_get_ulp_msix_num(struct bnxt *bp); bp 92 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h int bnxt_get_ulp_msix_base(struct bnxt *bp); bp 93 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h int bnxt_get_ulp_stat_ctxs(struct bnxt *bp); bp 94 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_stop(struct bnxt *bp); bp 95 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_start(struct bnxt *bp); bp 96 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_sriov_cfg(struct bnxt *bp, int num_vfs); bp 97 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_shutdown(struct bnxt *bp); bp 98 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_irq_stop(struct bnxt *bp); bp 99 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_irq_restart(struct bnxt *bp, int err); bp 100 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h void bnxt_ulp_async_events(struct bnxt *bp, struct hwrm_async_event_cmpl *cmpl); bp 27 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static int hwrm_cfa_vfr_alloc(struct bnxt *bp, u16 vf_idx, bp 30 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct hwrm_cfa_vfr_alloc_output *resp = bp->hwrm_cmd_resp_addr; bp 34 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_VFR_ALLOC, -1, -1); bp 38 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_lock(&bp->hwrm_cmd_lock); bp 39 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 43 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_dbg(bp->dev, "tx_cfa_action=0x%x, rx_cfa_code=0x%x", bp 46 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_info(bp->dev, "%s error rc=%d", __func__, rc); bp 49 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_unlock(&bp->hwrm_cmd_lock); bp 53 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static int hwrm_cfa_vfr_free(struct bnxt *bp, u16 vf_idx) bp 58 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_CFA_VFR_FREE, -1, -1); bp 61 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 63 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_info(bp->dev, "%s error rc=%d", __func__, rc); bp 67 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static int bnxt_hwrm_vfr_qcfg(struct bnxt *bp, struct bnxt_vf_rep *vf_rep, bp 70 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr; bp 75 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_FUNC_QCFG, -1, -1); bp 76 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c req.fid = cpu_to_le16(bp->pf.vf[vf_rep->vf_idx].fw_fid); bp 78 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_lock(&bp->hwrm_cmd_lock); bp 80 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT); bp 88 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_unlock(&bp->hwrm_cmd_lock); bp 95 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct bnxt *bp = vf_rep->bp; bp 98 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (netif_running(bp->dev)) { bp 149 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct bnxt *bp = vf_rep->bp; bp 150 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c int vf_fid = bp->pf.vf[vf_rep->vf_idx].fw_fid; bp 152 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (!bnxt_tc_flower_enabled(vf_rep->bp) || bp 153 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c !tc_cls_can_offload_and_chain0(bp->dev, type_data)) bp 158 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c return bnxt_tc_setup_flower(bp, vf_fid, type_data); bp 182 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code) bp 186 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (cfa_code && bp->cfa_code_map && BNXT_PF(bp)) { bp 187 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c vf_idx = bp->cfa_code_map[cfa_code]; bp 189 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c return bp->vf_reps[vf_idx]->dev; bp 194 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb) bp 208 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct pci_dev *pf_pdev = vf_rep->bp->pdev; bp 233 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c return bnxt_get_port_parent_id(vf_rep->bp->dev, ppid); bp 260 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c void bnxt_vf_reps_close(struct bnxt *bp) bp 265 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (bp->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) bp 268 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c num_vfs = pci_num_vf(bp->pdev); bp 270 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c vf_rep = bp->vf_reps[i]; bp 281 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c void bnxt_vf_reps_open(struct bnxt *bp) bp 285 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (bp->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) bp 288 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c for (i = 0; i < pci_num_vf(bp->pdev); i++) bp 289 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_vf_rep_open(bp->vf_reps[i]->dev); bp 292 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static void __bnxt_vf_reps_destroy(struct bnxt *bp) bp 294 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c u16 num_vfs = pci_num_vf(bp->pdev); bp 299 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c vf_rep = bp->vf_reps[i]; bp 304 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c hwrm_cfa_vfr_free(bp, vf_rep->vf_idx); bp 317 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c kfree(bp->vf_reps); bp 318 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->vf_reps = NULL; bp 321 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c void bnxt_vf_reps_destroy(struct bnxt *bp) bp 325 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (bp->eswitch_mode != DEVLINK_ESWITCH_MODE_SWITCHDEV) bp 328 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (!bp->vf_reps) bp 335 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (netif_running(bp->dev)) { bp 336 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_close_nic(bp, false, false); bp 340 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c kfree(bp->cfa_code_map); bp 341 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->cfa_code_map = NULL; bp 342 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->eswitch_mode = DEVLINK_ESWITCH_MODE_LEGACY; bp 345 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_open_nic(bp, false, false); bp 351 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c __bnxt_vf_reps_destroy(bp); bp 369 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static void bnxt_vf_rep_netdev_init(struct bnxt *bp, struct bnxt_vf_rep *vf_rep, bp 372 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct net_device *pf_dev = bp->dev; bp 385 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_vf_rep_eth_addr_gen(bp->pf.mac_addr, vf_rep->vf_idx, bp 389 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (!bnxt_hwrm_vfr_qcfg(bp, vf_rep, &max_mtu)) bp 394 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c static int bnxt_vf_reps_create(struct bnxt *bp) bp 396 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c u16 *cfa_code_map = NULL, num_vfs = pci_num_vf(bp->pdev); bp 401 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (!(bp->flags & BNXT_FLAG_DSN_VALID)) bp 404 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->vf_reps = kcalloc(num_vfs, sizeof(vf_rep), GFP_KERNEL); bp 405 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (!bp->vf_reps) bp 409 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c cfa_code_map = kmalloc_array(MAX_CFA_CODE, sizeof(*bp->cfa_code_map), bp 426 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->vf_reps[i] = vf_rep; bp 428 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c vf_rep->bp = bp; bp 433 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c rc = hwrm_cfa_vfr_alloc(bp, vf_rep->vf_idx, bp 450 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c vf_rep->dst->u.port_info.lower_dev = bp->dev; bp 452 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_vf_rep_netdev_init(bp, vf_rep, dev); bp 462 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->cfa_code_map = cfa_code_map; bp 463 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bp->eswitch_mode = DEVLINK_ESWITCH_MODE_SWITCHDEV; bp 464 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netif_keep_dst(bp->dev); bp 468 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_info(bp->dev, "%s error=%d", __func__, rc); bp 470 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c __bnxt_vf_reps_destroy(bp); bp 477 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct bnxt *bp = bnxt_get_bp_from_dl(devlink); bp 479 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c *mode = bp->eswitch_mode; bp 486 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c struct bnxt *bp = bnxt_get_bp_from_dl(devlink); bp 489 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_lock(&bp->sriov_lock); bp 490 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (bp->eswitch_mode == mode) { bp 491 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_info(bp->dev, "already in %s eswitch mode", bp 500 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c bnxt_vf_reps_destroy(bp); bp 504 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (bp->hwrm_spec_code < 0x10803) { bp 505 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_warn(bp->dev, "FW does not support SRIOV E-Switch SWITCHDEV mode\n"); bp 510 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c if (pci_num_vf(bp->pdev) == 0) { bp 511 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c netdev_info(bp->dev, "Enable VFs before setting switchdev mode"); bp 515 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c rc = bnxt_vf_reps_create(bp); bp 523 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c mutex_unlock(&bp->sriov_lock); bp 17 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h void bnxt_vf_reps_destroy(struct bnxt *bp); bp 18 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h void bnxt_vf_reps_close(struct bnxt *bp); bp 19 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h void bnxt_vf_reps_open(struct bnxt *bp); bp 20 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb); bp 21 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code); bp 26 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h struct bnxt *bp = vf_rep->bp; bp 28 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h return bp->pf.vf[vf_rep->vf_idx].fw_fid; bp 38 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h static inline void bnxt_vf_reps_close(struct bnxt *bp) bp 42 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h static inline void bnxt_vf_reps_open(struct bnxt *bp) bp 46 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h static inline void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb) bp 50 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h static inline struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code) bp 23 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct bnxt_sw_tx_bd *bnxt_xmit_bd(struct bnxt *bp, bp 47 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c static void __bnxt_xmit_xdp(struct bnxt *bp, struct bnxt_tx_ring_info *txr, bp 52 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c tx_buf = bnxt_xmit_bd(bp, txr, mapping, len); bp 57 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c static void __bnxt_xmit_xdp_redirect(struct bnxt *bp, bp 64 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c tx_buf = bnxt_xmit_bd(bp, txr, mapping, len); bp 71 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts) bp 85 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct pci_dev *pdev = bp->pdev; bp 103 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_db_write(bp, &rxr->rx_db, tx_buf->rx_prod); bp 111 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, bp 128 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c pdev = bp->pdev; bp 130 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c offset = bp->rx_offset; bp 132 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c mapping = rx_buf->mapping - bp->rx_dma_offset; bp 133 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c dma_sync_single_for_cpu(&pdev->dev, mapping + offset, *len, bp->rx_dir); bp 147 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c tx_avail = bnxt_tx_avail(bp, txr); bp 151 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (tx_avail != bp->tx_ring_size) bp 165 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c trace_xdp_exception(bp->dev, xdp_prog, act); bp 172 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->rx_dir); bp 173 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c __bnxt_xmit_xdp(bp, txr, mapping + offset, *len, bp 183 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c PAGE_SIZE, bp->rx_dir, bp 187 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (bnxt_alloc_rx_data(bp, rxr, rxr->rx_prod, GFP_ATOMIC)) { bp 188 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c trace_xdp_exception(bp->dev, xdp_prog, act); bp 193 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (xdp_do_redirect(bp->dev, &xdp, xdp_prog)) { bp 194 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c trace_xdp_exception(bp->dev, xdp_prog, act); bp 205 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c trace_xdp_exception(bp->dev, xdp_prog, act); bp 217 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct bnxt *bp = netdev_priv(dev); bp 218 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct bpf_prog *xdp_prog = READ_ONCE(bp->xdp_prog); bp 219 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct pci_dev *pdev = bp->pdev; bp 226 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (!test_bit(BNXT_STATE_OPEN, &bp->state) || bp 227 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c !bp->tx_nr_rings_xdp || bp 231 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c ring = smp_processor_id() % bp->tx_nr_rings_xdp; bp 232 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c txr = &bp->tx_ring[ring]; bp 237 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (!txr || !bnxt_tx_avail(bp, txr) || bp 238 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c !(bp->bnapi[ring]->flags & BNXT_NAPI_FLAG_XDP)) { bp 252 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c __bnxt_xmit_xdp_redirect(bp, txr, mapping, xdp->len, xdp); bp 258 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_db_write(bp, &txr->tx_db, txr->tx_prod); bp 265 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog) bp 267 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct net_device *dev = bp->dev; bp 271 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (prog && bp->dev->mtu > BNXT_MAX_PAGE_MODE_MTU) { bp 273 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->dev->mtu, BNXT_MAX_PAGE_MODE_MTU); bp 276 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c if (!(bp->flags & BNXT_FLAG_SHARED_RINGS)) { bp 281 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c tx_xdp = bp->rx_nr_rings; bp 286 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c rc = bnxt_check_rings(bp, bp->tx_nr_rings_per_tc, bp->rx_nr_rings, bp 293 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_close_nic(bp, true, false); bp 295 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c old = xchg(&bp->xdp_prog, prog); bp 300 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_set_rx_skb_mode(bp, true); bp 304 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_set_rx_skb_mode(bp, false); bp 305 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_get_max_rings(bp, &rx, &tx, true); bp 307 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->flags &= ~BNXT_FLAG_NO_AGG_RINGS; bp 308 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->dev->hw_features |= NETIF_F_LRO; bp 311 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->tx_nr_rings_xdp = tx_xdp; bp 312 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->tx_nr_rings = bp->tx_nr_rings_per_tc * tc + tx_xdp; bp 313 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bp->cp_nr_rings = max_t(int, bp->tx_nr_rings, bp->rx_nr_rings); bp 314 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_set_tpa_flags(bp); bp 315 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c bnxt_set_ring_params(bp); bp 318 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c return bnxt_open_nic(bp, true, false); bp 325 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c struct bnxt *bp = netdev_priv(dev); bp 330 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c rc = bnxt_xdp_set(bp, xdp->prog); bp 333 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c xdp->prog_id = bp->xdp_prog ? bp->xdp_prog->aux->id : 0; bp 13 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h struct bnxt_sw_tx_bd *bnxt_xmit_bd(struct bnxt *bp, bp 16 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts); bp 17 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, bp 1193 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1211 drivers/net/ethernet/broadcom/cnic.c if (!CHIP_IS_E1(bp)) bp 1241 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1251 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 1299 drivers/net/ethernet/broadcom/cnic.c if (CNIC_SUPPORTS_FCOE(bp)) { bp 1393 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1401 drivers/net/ethernet/broadcom/cnic.c BNX2X_HW_CID(bp, cid))); bp 1404 drivers/net/ethernet/broadcom/cnic.c type_16 |= (bp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) & bp 1442 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1454 drivers/net/ethernet/broadcom/cnic.c XSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(bp->pfid), xstorm_flags); bp 1457 drivers/net/ethernet/broadcom/cnic.c TSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(bp->pfid), tstorm_flags); bp 1463 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1466 drivers/net/ethernet/broadcom/cnic.c u32 pfid = bp->pfid; bp 1549 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1550 drivers/net/ethernet/broadcom/cnic.c u32 pfid = bp->pfid; bp 1689 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1698 drivers/net/ethernet/broadcom/cnic.c u32 hw_cid = BNX2X_HW_CID(bp, cid); bp 1702 drivers/net/ethernet/broadcom/cnic.c u8 port = BP_PORT(bp); bp 1756 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp) && bp 1757 drivers/net/ethernet/broadcom/cnic.c bp->common.chip_port_mode == CHIP_2_PORT_MODE) { bp 1878 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1932 drivers/net/ethernet/broadcom/cnic.c kcqe.iscsi_conn_context_id = BNX2X_HW_CID(bp, cp->ctx_tbl[l5_cid].cid); bp 1968 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 1977 drivers/net/ethernet/broadcom/cnic.c hw_cid = BNX2X_HW_CID(bp, ctx->cid); bp 2085 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2086 drivers/net/ethernet/broadcom/cnic.c u32 pfid = bp->pfid; bp 2123 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2192 drivers/net/ethernet/broadcom/cnic.c XSTORM_ISCSI_LOCAL_VLAN_OFFSET(bp->pfid), csk->vlan_id); bp 2261 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2266 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); bp 2285 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2330 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); bp 2343 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2386 drivers/net/ethernet/broadcom/cnic.c u32 hw_cid = BNX2X_HW_CID(bp, cid); bp 2410 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cid); bp 2567 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2573 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); bp 2730 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 2738 drivers/net/ethernet/broadcom/cnic.c if (!BNX2X_CHIP_IS_E2_PLUS(bp)) bp 3054 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 3055 drivers/net/ethernet/broadcom/cnic.c u32 hc_addr = (HC_REG_COMMAND_REG + BP_PORT(bp) * 32 + bp 3142 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 3154 drivers/net/ethernet/broadcom/cnic.c if (!CNIC_SUPPORTS_FCOE(bp)) { bp 4237 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 4238 drivers/net/ethernet/broadcom/cnic.c u32 pfid = bp->pfid; bp 4239 drivers/net/ethernet/broadcom/cnic.c u32 port = BP_PORT(bp); bp 4884 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 4902 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 4921 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 4950 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) bp 4987 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 4996 drivers/net/ethernet/broadcom/cnic.c int cl_qzone_id = BNX2X_CL_QZONE_ID(bp, cli); bp 5005 drivers/net/ethernet/broadcom/cnic.c data->general.func_id = bp->pfid; bp 5054 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 5055 drivers/net/ethernet/broadcom/cnic.c u32 pfid = bp->pfid; bp 5061 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 5077 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 5093 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 5099 drivers/net/ethernet/broadcom/cnic.c cp->func = bp->pf_num; bp 5101 drivers/net/ethernet/broadcom/cnic.c pfid = bp->pfid; bp 5109 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 5168 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 5191 drivers/net/ethernet/broadcom/cnic.c cl_qzone_id = BNX2X_CL_QZONE_ID(bp, cli); bp 5194 drivers/net/ethernet/broadcom/cnic.c (BNX2X_CHIP_IS_E2_PLUS(bp) ? bp 5196 drivers/net/ethernet/broadcom/cnic.c USTORM_RX_PRODS_E1X_OFFSET(BP_PORT(bp), cli)); bp 5230 drivers/net/ethernet/broadcom/cnic.c *(cid_ptr + 1) = cid * bp->db_size; bp 5381 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 5388 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 5405 drivers/net/ethernet/broadcom/cnic.c CSTORM_ISCSI_EQ_CONS_OFFSET(bp->pfid, 0), 0); bp 5455 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev->netdev); bp 5461 drivers/net/ethernet/broadcom/cnic.c if (!BNX2X_CHIP_IS_E2_PLUS(bp)) bp 5506 drivers/net/ethernet/broadcom/cnic.c struct bnx2 *bp = netdev_priv(dev); bp 5509 drivers/net/ethernet/broadcom/cnic.c if (bp->cnic_probe) bp 5510 drivers/net/ethernet/broadcom/cnic.c ethdev = (bp->cnic_probe)(dev); bp 5566 drivers/net/ethernet/broadcom/cnic.c struct bnx2x *bp = netdev_priv(dev); bp 5569 drivers/net/ethernet/broadcom/cnic.c if (bp->cnic_probe) bp 5570 drivers/net/ethernet/broadcom/cnic.c ethdev = bp->cnic_probe(dev); bp 5598 drivers/net/ethernet/broadcom/cnic.c if (CNIC_SUPPORTS_FCOE(bp)) { bp 5618 drivers/net/ethernet/broadcom/cnic.c if (BNX2X_CHIP_IS_E2_PLUS(bp)) { bp 368 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_CHIP_IS_E2_PLUS(bp) (CHIP_IS_E2(bp) || CHIP_IS_E3(bp)) bp 405 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_HW_CID(bp, x) ((BP_PORT(bp) << 23) | \ bp 406 drivers/net/ethernet/broadcom/cnic.h (BP_VN(bp) << 17) | (x)) bp 410 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_CL_QZONE_ID(bp, cli) \ bp 411 drivers/net/ethernet/broadcom/cnic.h (BNX2X_CHIP_IS_E2_PLUS(bp) ? cli : \ bp 412 drivers/net/ethernet/broadcom/cnic.h cli + (BP_PORT(bp) * ETH_MAX_RX_CLIENTS_E1H)) bp 416 drivers/net/ethernet/broadcom/cnic.h (CHIP_IS_E1H(bp) ? MAX_STAT_COUNTER_ID_E1H : \ bp 417 drivers/net/ethernet/broadcom/cnic.h ((BNX2X_CHIP_IS_E2_PLUS(bp)) ? MAX_STAT_COUNTER_ID_E2 : \ bp 422 drivers/net/ethernet/broadcom/cnic.h (BNX2X_CHIP_IS_E2_PLUS(bp) && !NO_FCOE(bp)) bp 1386 drivers/net/ethernet/broadcom/tg3.c static int tg3_mdio_read(struct mii_bus *bp, int mii_id, int reg) bp 1388 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = bp->priv; bp 1401 drivers/net/ethernet/broadcom/tg3.c static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int reg, u16 val) bp 1403 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = bp->priv; bp 689 drivers/net/ethernet/cadence/macb.h #define queue_readl(queue, reg) (queue)->bp->macb_reg_readl((queue)->bp, (queue)->reg) bp 690 drivers/net/ethernet/cadence/macb.h #define queue_writel(queue, reg, value) (queue)->bp->macb_reg_writel((queue)->bp, (queue)->reg, (value)) bp 719 drivers/net/ethernet/cadence/macb.h #define MACB_READ_NSR(bp) macb_readl(bp, NSR) bp 1067 drivers/net/ethernet/cadence/macb.h int (*mog_alloc_rx_buffers)(struct macb *bp); bp 1068 drivers/net/ethernet/cadence/macb.h void (*mog_free_rx_buffers)(struct macb *bp); bp 1069 drivers/net/ethernet/cadence/macb.h void (*mog_init_rings)(struct macb *bp); bp 1079 drivers/net/ethernet/cadence/macb.h unsigned int (*get_tsu_rate)(struct macb *bp); bp 1109 drivers/net/ethernet/cadence/macb.h struct macb *bp; bp 1160 drivers/net/ethernet/cadence/macb.h u32 (*macb_reg_readl)(struct macb *bp, int offset); bp 1161 drivers/net/ethernet/cadence/macb.h void (*macb_reg_writel)(struct macb *bp, int offset, u32 value); bp 1252 drivers/net/ethernet/cadence/macb.h void gem_ptp_rxstamp(struct macb *bp, struct sk_buff *skb, struct macb_dma_desc *desc); bp 1255 drivers/net/ethernet/cadence/macb.h if (queue->bp->tstamp_config.tx_type == TSTAMP_DISABLED) bp 1261 drivers/net/ethernet/cadence/macb.h static inline void gem_ptp_do_rxstamp(struct macb *bp, struct sk_buff *skb, struct macb_dma_desc *desc) bp 1263 drivers/net/ethernet/cadence/macb.h if (bp->tstamp_config.rx_filter == TSTAMP_DISABLED) bp 1266 drivers/net/ethernet/cadence/macb.h gem_ptp_rxstamp(bp, skb, desc); bp 1279 drivers/net/ethernet/cadence/macb.h static inline void gem_ptp_do_rxstamp(struct macb *bp, struct sk_buff *skb, struct macb_dma_desc *desc) { } bp 1282 drivers/net/ethernet/cadence/macb.h static inline bool macb_is_gem(struct macb *bp) bp 1284 drivers/net/ethernet/cadence/macb.h return !!(bp->caps & MACB_CAPS_MACB_IS_GEM); bp 1287 drivers/net/ethernet/cadence/macb.h static inline bool gem_has_ptp(struct macb *bp) bp 1289 drivers/net/ethernet/cadence/macb.h return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP); bp 54 drivers/net/ethernet/cadence/macb_main.c #define RX_RING_BYTES(bp) (macb_dma_desc_get_size(bp) \ bp 55 drivers/net/ethernet/cadence/macb_main.c * (bp)->rx_ring_size) bp 60 drivers/net/ethernet/cadence/macb_main.c #define TX_RING_BYTES(bp) (macb_dma_desc_get_size(bp) \ bp 61 drivers/net/ethernet/cadence/macb_main.c * (bp)->tx_ring_size) bp 64 drivers/net/ethernet/cadence/macb_main.c #define MACB_TX_WAKEUP_THRESH(bp) (3 * (bp)->tx_ring_size / 4) bp 124 drivers/net/ethernet/cadence/macb_main.c static unsigned int macb_dma_desc_get_size(struct macb *bp) bp 129 drivers/net/ethernet/cadence/macb_main.c switch (bp->hw_dma_cap) { bp 151 drivers/net/ethernet/cadence/macb_main.c static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx) bp 154 drivers/net/ethernet/cadence/macb_main.c switch (bp->hw_dma_cap) { bp 170 drivers/net/ethernet/cadence/macb_main.c static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc) bp 178 drivers/net/ethernet/cadence/macb_main.c static unsigned int macb_tx_ring_wrap(struct macb *bp, unsigned int index) bp 180 drivers/net/ethernet/cadence/macb_main.c return index & (bp->tx_ring_size - 1); bp 186 drivers/net/ethernet/cadence/macb_main.c index = macb_tx_ring_wrap(queue->bp, index); bp 187 drivers/net/ethernet/cadence/macb_main.c index = macb_adj_dma_desc_idx(queue->bp, index); bp 194 drivers/net/ethernet/cadence/macb_main.c return &queue->tx_skb[macb_tx_ring_wrap(queue->bp, index)]; bp 201 drivers/net/ethernet/cadence/macb_main.c offset = macb_tx_ring_wrap(queue->bp, index) * bp 202 drivers/net/ethernet/cadence/macb_main.c macb_dma_desc_get_size(queue->bp); bp 207 drivers/net/ethernet/cadence/macb_main.c static unsigned int macb_rx_ring_wrap(struct macb *bp, unsigned int index) bp 209 drivers/net/ethernet/cadence/macb_main.c return index & (bp->rx_ring_size - 1); bp 214 drivers/net/ethernet/cadence/macb_main.c index = macb_rx_ring_wrap(queue->bp, index); bp 215 drivers/net/ethernet/cadence/macb_main.c index = macb_adj_dma_desc_idx(queue->bp, index); bp 221 drivers/net/ethernet/cadence/macb_main.c return queue->rx_buffers + queue->bp->rx_buffer_size * bp 222 drivers/net/ethernet/cadence/macb_main.c macb_rx_ring_wrap(queue->bp, index); bp 226 drivers/net/ethernet/cadence/macb_main.c static u32 hw_readl_native(struct macb *bp, int offset) bp 228 drivers/net/ethernet/cadence/macb_main.c return __raw_readl(bp->regs + offset); bp 231 drivers/net/ethernet/cadence/macb_main.c static void hw_writel_native(struct macb *bp, int offset, u32 value) bp 233 drivers/net/ethernet/cadence/macb_main.c __raw_writel(value, bp->regs + offset); bp 236 drivers/net/ethernet/cadence/macb_main.c static u32 hw_readl(struct macb *bp, int offset) bp 238 drivers/net/ethernet/cadence/macb_main.c return readl_relaxed(bp->regs + offset); bp 241 drivers/net/ethernet/cadence/macb_main.c static void hw_writel(struct macb *bp, int offset, u32 value) bp 243 drivers/net/ethernet/cadence/macb_main.c writel_relaxed(value, bp->regs + offset); bp 275 drivers/net/ethernet/cadence/macb_main.c static void macb_set_hwaddr(struct macb *bp) bp 280 drivers/net/ethernet/cadence/macb_main.c bottom = cpu_to_le32(*((u32 *)bp->dev->dev_addr)); bp 281 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA1B, bottom); bp 282 drivers/net/ethernet/cadence/macb_main.c top = cpu_to_le16(*((u16 *)(bp->dev->dev_addr + 4))); bp 283 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA1T, top); bp 286 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA2B, 0); bp 287 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA2T, 0); bp 288 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA3B, 0); bp 289 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA3T, 0); bp 290 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA4B, 0); bp 291 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, SA4T, 0); bp 294 drivers/net/ethernet/cadence/macb_main.c static void macb_get_hwaddr(struct macb *bp) bp 303 drivers/net/ethernet/cadence/macb_main.c bottom = macb_or_gem_readl(bp, SA1B + i * 8); bp 304 drivers/net/ethernet/cadence/macb_main.c top = macb_or_gem_readl(bp, SA1T + i * 8); bp 314 drivers/net/ethernet/cadence/macb_main.c memcpy(bp->dev->dev_addr, addr, sizeof(addr)); bp 319 drivers/net/ethernet/cadence/macb_main.c dev_info(&bp->pdev->dev, "invalid hw address, using random\n"); bp 320 drivers/net/ethernet/cadence/macb_main.c eth_hw_addr_random(bp->dev); bp 323 drivers/net/ethernet/cadence/macb_main.c static int macb_mdio_wait_for_idle(struct macb *bp) bp 327 drivers/net/ethernet/cadence/macb_main.c return readx_poll_timeout(MACB_READ_NSR, bp, val, val & MACB_BIT(IDLE), bp 333 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = bus->priv; bp 336 drivers/net/ethernet/cadence/macb_main.c status = pm_runtime_get_sync(&bp->pdev->dev); bp 338 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_noidle(&bp->pdev->dev); bp 342 drivers/net/ethernet/cadence/macb_main.c status = macb_mdio_wait_for_idle(bp); bp 346 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, MAN, (MACB_BF(SOF, MACB_MAN_SOF) bp 352 drivers/net/ethernet/cadence/macb_main.c status = macb_mdio_wait_for_idle(bp); bp 356 drivers/net/ethernet/cadence/macb_main.c status = MACB_BFEXT(DATA, macb_readl(bp, MAN)); bp 359 drivers/net/ethernet/cadence/macb_main.c pm_runtime_mark_last_busy(&bp->pdev->dev); bp 360 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_autosuspend(&bp->pdev->dev); bp 368 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = bus->priv; bp 371 drivers/net/ethernet/cadence/macb_main.c status = pm_runtime_get_sync(&bp->pdev->dev); bp 373 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_noidle(&bp->pdev->dev); bp 377 drivers/net/ethernet/cadence/macb_main.c status = macb_mdio_wait_for_idle(bp); bp 381 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, MAN, (MACB_BF(SOF, MACB_MAN_SOF) bp 388 drivers/net/ethernet/cadence/macb_main.c status = macb_mdio_wait_for_idle(bp); bp 393 drivers/net/ethernet/cadence/macb_main.c pm_runtime_mark_last_busy(&bp->pdev->dev); bp 394 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_autosuspend(&bp->pdev->dev); bp 445 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 450 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 453 drivers/net/ethernet/cadence/macb_main.c if ((bp->speed != phydev->speed) || bp 454 drivers/net/ethernet/cadence/macb_main.c (bp->duplex != phydev->duplex)) { bp 457 drivers/net/ethernet/cadence/macb_main.c reg = macb_readl(bp, NCFGR); bp 459 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 467 drivers/net/ethernet/cadence/macb_main.c bp->caps & MACB_CAPS_GIGABIT_MODE_AVAILABLE) bp 470 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, NCFGR, reg); bp 472 drivers/net/ethernet/cadence/macb_main.c bp->speed = phydev->speed; bp 473 drivers/net/ethernet/cadence/macb_main.c bp->duplex = phydev->duplex; bp 478 drivers/net/ethernet/cadence/macb_main.c if (phydev->link != bp->link) { bp 480 drivers/net/ethernet/cadence/macb_main.c bp->speed = 0; bp 481 drivers/net/ethernet/cadence/macb_main.c bp->duplex = -1; bp 483 drivers/net/ethernet/cadence/macb_main.c bp->link = phydev->link; bp 488 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 495 drivers/net/ethernet/cadence/macb_main.c macb_set_tx_clk(bp->tx_clk, phydev->speed, dev); bp 512 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 517 drivers/net/ethernet/cadence/macb_main.c np = bp->pdev->dev.of_node; bp 522 drivers/net/ethernet/cadence/macb_main.c bp->phy_node = of_node_get(np); bp 524 drivers/net/ethernet/cadence/macb_main.c bp->phy_node = of_parse_phandle(np, "phy-handle", 0); bp 529 drivers/net/ethernet/cadence/macb_main.c if (!bp->phy_node && !phy_find_first(bp->mii_bus)) { bp 531 drivers/net/ethernet/cadence/macb_main.c phydev = mdiobus_scan(bp->mii_bus, i); bp 545 drivers/net/ethernet/cadence/macb_main.c if (bp->phy_node) { bp 546 drivers/net/ethernet/cadence/macb_main.c phydev = of_phy_connect(dev, bp->phy_node, bp 548 drivers/net/ethernet/cadence/macb_main.c bp->phy_interface); bp 552 drivers/net/ethernet/cadence/macb_main.c phydev = phy_find_first(bp->mii_bus); bp 560 drivers/net/ethernet/cadence/macb_main.c bp->phy_interface); bp 568 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp) && bp->caps & MACB_CAPS_GIGABIT_MODE_AVAILABLE) bp 573 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_NO_GIGABIT_HALF) bp 577 drivers/net/ethernet/cadence/macb_main.c bp->link = 0; bp 578 drivers/net/ethernet/cadence/macb_main.c bp->speed = 0; bp 579 drivers/net/ethernet/cadence/macb_main.c bp->duplex = -1; bp 584 drivers/net/ethernet/cadence/macb_main.c static int macb_mii_init(struct macb *bp) bp 590 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, MACB_BIT(MPE)); bp 592 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus = mdiobus_alloc(); bp 593 drivers/net/ethernet/cadence/macb_main.c if (!bp->mii_bus) { bp 598 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus->name = "MACB_mii_bus"; bp 599 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus->read = &macb_mdio_read; bp 600 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus->write = &macb_mdio_write; bp 601 drivers/net/ethernet/cadence/macb_main.c snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", bp 602 drivers/net/ethernet/cadence/macb_main.c bp->pdev->name, bp->pdev->id); bp 603 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus->priv = bp; bp 604 drivers/net/ethernet/cadence/macb_main.c bp->mii_bus->parent = &bp->pdev->dev; bp 606 drivers/net/ethernet/cadence/macb_main.c dev_set_drvdata(&bp->dev->dev, bp->mii_bus); bp 608 drivers/net/ethernet/cadence/macb_main.c np = bp->pdev->dev.of_node; bp 611 drivers/net/ethernet/cadence/macb_main.c dev_err(&bp->pdev->dev, bp 616 drivers/net/ethernet/cadence/macb_main.c err = mdiobus_register(bp->mii_bus); bp 618 drivers/net/ethernet/cadence/macb_main.c err = of_mdiobus_register(bp->mii_bus, np); bp 624 drivers/net/ethernet/cadence/macb_main.c err = macb_mii_probe(bp->dev); bp 631 drivers/net/ethernet/cadence/macb_main.c mdiobus_unregister(bp->mii_bus); bp 636 drivers/net/ethernet/cadence/macb_main.c of_node_put(bp->phy_node); bp 637 drivers/net/ethernet/cadence/macb_main.c mdiobus_free(bp->mii_bus); bp 642 drivers/net/ethernet/cadence/macb_main.c static void macb_update_stats(struct macb *bp) bp 644 drivers/net/ethernet/cadence/macb_main.c u32 *p = &bp->hw_stats.macb.rx_pause_frames; bp 645 drivers/net/ethernet/cadence/macb_main.c u32 *end = &bp->hw_stats.macb.tx_pause_frames + 1; bp 651 drivers/net/ethernet/cadence/macb_main.c *p += bp->macb_reg_readl(bp, offset); bp 654 drivers/net/ethernet/cadence/macb_main.c static int macb_halt_tx(struct macb *bp) bp 659 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(THALT)); bp 664 drivers/net/ethernet/cadence/macb_main.c status = macb_readl(bp, TSR); bp 674 drivers/net/ethernet/cadence/macb_main.c static void macb_tx_unmap(struct macb *bp, struct macb_tx_skb *tx_skb) bp 678 drivers/net/ethernet/cadence/macb_main.c dma_unmap_page(&bp->pdev->dev, tx_skb->mapping, bp 681 drivers/net/ethernet/cadence/macb_main.c dma_unmap_single(&bp->pdev->dev, tx_skb->mapping, bp 692 drivers/net/ethernet/cadence/macb_main.c static void macb_set_addr(struct macb *bp, struct macb_dma_desc *desc, dma_addr_t addr) bp 697 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) { bp 698 drivers/net/ethernet/cadence/macb_main.c desc_64 = macb_64b_desc(bp, desc); bp 710 drivers/net/ethernet/cadence/macb_main.c static dma_addr_t macb_get_addr(struct macb *bp, struct macb_dma_desc *desc) bp 716 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) { bp 717 drivers/net/ethernet/cadence/macb_main.c desc_64 = macb_64b_desc(bp, desc); bp 729 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 736 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "macb_tx_error_task: q = %u, t = %u, h = %u\n", bp 737 drivers/net/ethernet/cadence/macb_main.c (unsigned int)(queue - bp->queues), bp 746 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 749 drivers/net/ethernet/cadence/macb_main.c netif_tx_stop_all_queues(bp->dev); bp 755 drivers/net/ethernet/cadence/macb_main.c if (macb_halt_tx(bp)) bp 757 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, "BUG: halt tx timed out\n"); bp 773 drivers/net/ethernet/cadence/macb_main.c macb_tx_unmap(bp, tx_skb); bp 783 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "txerr skb %u (data %p) TX complete\n", bp 784 drivers/net/ethernet/cadence/macb_main.c macb_tx_ring_wrap(bp, tail), bp 786 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.tx_packets++; bp 788 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.tx_bytes += skb->len; bp 797 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, bp 803 drivers/net/ethernet/cadence/macb_main.c macb_tx_unmap(bp, tx_skb); bp 808 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, 0); bp 817 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 825 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, TSR, macb_readl(bp, TSR)); bp 829 drivers/net/ethernet/cadence/macb_main.c netif_tx_start_all_queues(bp->dev); bp 830 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART)); bp 832 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 840 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 841 drivers/net/ethernet/cadence/macb_main.c u16 queue_index = queue - bp->queues; bp 843 drivers/net/ethernet/cadence/macb_main.c status = macb_readl(bp, TSR); bp 844 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, TSR, status); bp 846 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 849 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "macb_tx_interrupt status = 0x%03lx\n", bp 887 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "skb %u (data %p) TX complete\n", bp 888 drivers/net/ethernet/cadence/macb_main.c macb_tx_ring_wrap(bp, tail), bp 890 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.tx_packets++; bp 892 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.tx_bytes += skb->len; bp 897 drivers/net/ethernet/cadence/macb_main.c macb_tx_unmap(bp, tx_skb); bp 909 drivers/net/ethernet/cadence/macb_main.c if (__netif_subqueue_stopped(bp->dev, queue_index) && bp 911 drivers/net/ethernet/cadence/macb_main.c bp->tx_ring_size) <= MACB_TX_WAKEUP_THRESH(bp)) bp 912 drivers/net/ethernet/cadence/macb_main.c netif_wake_subqueue(bp->dev, queue_index); bp 920 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 924 drivers/net/ethernet/cadence/macb_main.c bp->rx_ring_size) > 0) { bp 925 drivers/net/ethernet/cadence/macb_main.c entry = macb_rx_ring_wrap(bp, queue->rx_prepared_head); bp 935 drivers/net/ethernet/cadence/macb_main.c skb = netdev_alloc_skb(bp->dev, bp->rx_buffer_size); bp 937 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, bp 943 drivers/net/ethernet/cadence/macb_main.c paddr = dma_map_single(&bp->pdev->dev, skb->data, bp 944 drivers/net/ethernet/cadence/macb_main.c bp->rx_buffer_size, bp 946 drivers/net/ethernet/cadence/macb_main.c if (dma_mapping_error(&bp->pdev->dev, paddr)) { bp 953 drivers/net/ethernet/cadence/macb_main.c if (entry == bp->rx_ring_size - 1) bp 960 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, paddr); bp 974 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "rx ring: queue: %p, prepared head %d, tail %d\n", bp 1002 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1014 drivers/net/ethernet/cadence/macb_main.c entry = macb_rx_ring_wrap(bp, queue->rx_tail); bp 1021 drivers/net/ethernet/cadence/macb_main.c addr = macb_get_addr(bp, desc); bp 1035 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, bp 1037 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_dropped++; bp 1043 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, bp 1045 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_dropped++; bp 1051 drivers/net/ethernet/cadence/macb_main.c len = ctrl & bp->rx_frm_len_mask; bp 1053 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "gem_rx %u (len %u)\n", entry, len); bp 1056 drivers/net/ethernet/cadence/macb_main.c dma_unmap_single(&bp->pdev->dev, addr, bp 1057 drivers/net/ethernet/cadence/macb_main.c bp->rx_buffer_size, DMA_FROM_DEVICE); bp 1059 drivers/net/ethernet/cadence/macb_main.c skb->protocol = eth_type_trans(skb, bp->dev); bp 1061 drivers/net/ethernet/cadence/macb_main.c if (bp->dev->features & NETIF_F_RXCSUM && bp 1062 drivers/net/ethernet/cadence/macb_main.c !(bp->dev->flags & IFF_PROMISC) && bp 1066 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_packets++; bp 1068 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_bytes += skb->len; bp 1071 drivers/net/ethernet/cadence/macb_main.c gem_ptp_do_rxstamp(bp, skb, desc); bp 1074 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "received skb of length %u, csum: %08x\n", bp 1098 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1101 drivers/net/ethernet/cadence/macb_main.c len = desc->ctrl & bp->rx_frm_len_mask; bp 1103 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "macb_rx_frame frags %u - %u (len %u)\n", bp 1104 drivers/net/ethernet/cadence/macb_main.c macb_rx_ring_wrap(bp, first_frag), bp 1105 drivers/net/ethernet/cadence/macb_main.c macb_rx_ring_wrap(bp, last_frag), len); bp 1115 drivers/net/ethernet/cadence/macb_main.c skb = netdev_alloc_skb(bp->dev, len + NET_IP_ALIGN); bp 1117 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_dropped++; bp 1137 drivers/net/ethernet/cadence/macb_main.c unsigned int frag_len = bp->rx_buffer_size; bp 1149 drivers/net/ethernet/cadence/macb_main.c offset += bp->rx_buffer_size; bp 1161 drivers/net/ethernet/cadence/macb_main.c skb->protocol = eth_type_trans(skb, bp->dev); bp 1163 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_packets++; bp 1164 drivers/net/ethernet/cadence/macb_main.c bp->dev->stats.rx_bytes += skb->len; bp 1165 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "received skb of length %u, csum: %08x\n", bp 1174 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1180 drivers/net/ethernet/cadence/macb_main.c for (i = 0; i < bp->rx_ring_size; i++) { bp 1182 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, addr); bp 1184 drivers/net/ethernet/cadence/macb_main.c addr += bp->rx_buffer_size; bp 1193 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1245 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, "RX queue corruption: reset it\n"); bp 1247 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 1249 drivers/net/ethernet/cadence/macb_main.c ctrl = macb_readl(bp, NCR); bp 1250 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE)); bp 1255 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); bp 1257 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 1272 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1276 drivers/net/ethernet/cadence/macb_main.c status = macb_readl(bp, RSR); bp 1277 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, RSR, status); bp 1279 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "poll: status = %08lx, budget = %d\n", bp 1282 drivers/net/ethernet/cadence/macb_main.c work_done = bp->macbgem_ops.mog_rx(queue, napi, budget); bp 1287 drivers/net/ethernet/cadence/macb_main.c status = macb_readl(bp, RSR); bp 1289 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1293 drivers/net/ethernet/cadence/macb_main.c queue_writel(queue, IER, bp->rx_intr_mask); bp 1304 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = (struct macb *)data; bp 1305 drivers/net/ethernet/cadence/macb_main.c struct net_device *dev = bp->dev; bp 1306 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = bp->queues; bp 1310 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 1311 drivers/net/ethernet/cadence/macb_main.c queue_writel(queue, IDR, bp->rx_intr_mask | bp 1315 drivers/net/ethernet/cadence/macb_main.c ctrl = macb_readl(bp, NCR); bp 1317 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl); bp 1322 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_init_rings(bp); bp 1325 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 1328 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 1334 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 1341 drivers/net/ethernet/cadence/macb_main.c bp->rx_intr_mask | bp 1347 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl); bp 1357 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1359 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1365 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART)); bp 1371 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = queue->bp; bp 1372 drivers/net/ethernet/cadence/macb_main.c struct net_device *dev = bp->dev; bp 1380 drivers/net/ethernet/cadence/macb_main.c spin_lock(&bp->lock); bp 1386 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1391 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "queue = %u, isr = 0x%08lx\n", bp 1392 drivers/net/ethernet/cadence/macb_main.c (unsigned int)(queue - bp->queues), bp 1395 drivers/net/ethernet/cadence/macb_main.c if (status & bp->rx_intr_mask) { bp 1402 drivers/net/ethernet/cadence/macb_main.c queue_writel(queue, IDR, bp->rx_intr_mask); bp 1403 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1407 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, "scheduling RX softirq\n"); bp 1416 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1440 drivers/net/ethernet/cadence/macb_main.c ctrl = macb_readl(bp, NCR); bp 1441 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl & ~MACB_BIT(RE)); bp 1443 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl | MACB_BIT(RE)); bp 1445 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1451 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 1452 drivers/net/ethernet/cadence/macb_main.c bp->hw_stats.gem.rx_overruns++; bp 1454 drivers/net/ethernet/cadence/macb_main.c bp->hw_stats.macb.rx_overruns++; bp 1456 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1461 drivers/net/ethernet/cadence/macb_main.c tasklet_schedule(&bp->hresp_err_tasklet); bp 1464 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 1470 drivers/net/ethernet/cadence/macb_main.c spin_unlock(&bp->lock); bp 1481 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 1487 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) bp 1493 drivers/net/ethernet/cadence/macb_main.c static unsigned int macb_tx_map(struct macb *bp, bp 1525 drivers/net/ethernet/cadence/macb_main.c entry = macb_tx_ring_wrap(bp, tx_head); bp 1528 drivers/net/ethernet/cadence/macb_main.c mapping = dma_map_single(&bp->pdev->dev, bp 1531 drivers/net/ethernet/cadence/macb_main.c if (dma_mapping_error(&bp->pdev->dev, mapping)) bp 1545 drivers/net/ethernet/cadence/macb_main.c size = min(len, bp->max_tx_length); bp 1555 drivers/net/ethernet/cadence/macb_main.c size = min(len, bp->max_tx_length); bp 1556 drivers/net/ethernet/cadence/macb_main.c entry = macb_tx_ring_wrap(bp, tx_head); bp 1559 drivers/net/ethernet/cadence/macb_main.c mapping = skb_frag_dma_map(&bp->pdev->dev, frag, bp 1561 drivers/net/ethernet/cadence/macb_main.c if (dma_mapping_error(&bp->pdev->dev, mapping)) bp 1579 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, "BUG! empty skb!\n"); bp 1594 drivers/net/ethernet/cadence/macb_main.c entry = macb_tx_ring_wrap(bp, i); bp 1616 drivers/net/ethernet/cadence/macb_main.c entry = macb_tx_ring_wrap(bp, i); bp 1625 drivers/net/ethernet/cadence/macb_main.c if (unlikely(entry == (bp->tx_ring_size - 1))) bp 1632 drivers/net/ethernet/cadence/macb_main.c if ((bp->dev->features & NETIF_F_HW_CSUM) && bp 1642 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, tx_skb->mapping); bp 1655 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, "TX DMA map failed\n"); bp 1660 drivers/net/ethernet/cadence/macb_main.c macb_tx_unmap(bp, tx_skb); bp 1779 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 1780 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = &bp->queues[queue_index]; bp 1809 drivers/net/ethernet/cadence/macb_main.c netdev_err(bp->dev, "Error - LSO headers fragmented!!!\n"); bp 1814 drivers/net/ethernet/cadence/macb_main.c hdrlen = min(skb_headlen(skb), bp->max_tx_length); bp 1817 drivers/net/ethernet/cadence/macb_main.c netdev_vdbg(bp->dev, bp 1831 drivers/net/ethernet/cadence/macb_main.c desc_cnt = DIV_ROUND_UP((skb_headlen(skb) - hdrlen), bp->max_tx_length) + 1; bp 1833 drivers/net/ethernet/cadence/macb_main.c desc_cnt = DIV_ROUND_UP(skb_headlen(skb), bp->max_tx_length); bp 1837 drivers/net/ethernet/cadence/macb_main.c desc_cnt += DIV_ROUND_UP(frag_size, bp->max_tx_length); bp 1840 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 1844 drivers/net/ethernet/cadence/macb_main.c bp->tx_ring_size) < desc_cnt) { bp 1846 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 1847 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, "tx_head = %u, tx_tail = %u\n", bp 1853 drivers/net/ethernet/cadence/macb_main.c if (!macb_tx_map(bp, queue, skb, hdrlen)) { bp 1862 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART)); bp 1864 drivers/net/ethernet/cadence/macb_main.c if (CIRC_SPACE(queue->tx_head, queue->tx_tail, bp->tx_ring_size) < 1) bp 1868 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 1873 drivers/net/ethernet/cadence/macb_main.c static void macb_init_rx_buffer_size(struct macb *bp, size_t size) bp 1875 drivers/net/ethernet/cadence/macb_main.c if (!macb_is_gem(bp)) { bp 1876 drivers/net/ethernet/cadence/macb_main.c bp->rx_buffer_size = MACB_RX_BUFFER_SIZE; bp 1878 drivers/net/ethernet/cadence/macb_main.c bp->rx_buffer_size = size; bp 1880 drivers/net/ethernet/cadence/macb_main.c if (bp->rx_buffer_size % RX_BUFFER_MULTIPLE) { bp 1881 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, bp 1884 drivers/net/ethernet/cadence/macb_main.c bp->rx_buffer_size = bp 1885 drivers/net/ethernet/cadence/macb_main.c roundup(bp->rx_buffer_size, RX_BUFFER_MULTIPLE); bp 1889 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, "mtu [%u] rx_buffer_size [%zu]\n", bp 1890 drivers/net/ethernet/cadence/macb_main.c bp->dev->mtu, bp->rx_buffer_size); bp 1893 drivers/net/ethernet/cadence/macb_main.c static void gem_free_rx_buffers(struct macb *bp) bp 1902 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 1906 drivers/net/ethernet/cadence/macb_main.c for (i = 0; i < bp->rx_ring_size; i++) { bp 1913 drivers/net/ethernet/cadence/macb_main.c addr = macb_get_addr(bp, desc); bp 1915 drivers/net/ethernet/cadence/macb_main.c dma_unmap_single(&bp->pdev->dev, addr, bp->rx_buffer_size, bp 1926 drivers/net/ethernet/cadence/macb_main.c static void macb_free_rx_buffers(struct macb *bp) bp 1928 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = &bp->queues[0]; bp 1931 drivers/net/ethernet/cadence/macb_main.c dma_free_coherent(&bp->pdev->dev, bp 1932 drivers/net/ethernet/cadence/macb_main.c bp->rx_ring_size * bp->rx_buffer_size, bp 1938 drivers/net/ethernet/cadence/macb_main.c static void macb_free_consistent(struct macb *bp) bp 1944 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_free_rx_buffers(bp); bp 1946 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 1950 drivers/net/ethernet/cadence/macb_main.c size = TX_RING_BYTES(bp) + bp->tx_bd_rd_prefetch; bp 1951 drivers/net/ethernet/cadence/macb_main.c dma_free_coherent(&bp->pdev->dev, size, bp 1956 drivers/net/ethernet/cadence/macb_main.c size = RX_RING_BYTES(bp) + bp->rx_bd_rd_prefetch; bp 1957 drivers/net/ethernet/cadence/macb_main.c dma_free_coherent(&bp->pdev->dev, size, bp 1964 drivers/net/ethernet/cadence/macb_main.c static int gem_alloc_rx_buffers(struct macb *bp) bp 1970 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 1971 drivers/net/ethernet/cadence/macb_main.c size = bp->rx_ring_size * sizeof(struct sk_buff *); bp 1976 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, bp 1978 drivers/net/ethernet/cadence/macb_main.c bp->rx_ring_size, queue->rx_skbuff); bp 1983 drivers/net/ethernet/cadence/macb_main.c static int macb_alloc_rx_buffers(struct macb *bp) bp 1985 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = &bp->queues[0]; bp 1988 drivers/net/ethernet/cadence/macb_main.c size = bp->rx_ring_size * bp->rx_buffer_size; bp 1989 drivers/net/ethernet/cadence/macb_main.c queue->rx_buffers = dma_alloc_coherent(&bp->pdev->dev, size, bp 1994 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, bp 2000 drivers/net/ethernet/cadence/macb_main.c static int macb_alloc_consistent(struct macb *bp) bp 2006 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2007 drivers/net/ethernet/cadence/macb_main.c size = TX_RING_BYTES(bp) + bp->tx_bd_rd_prefetch; bp 2008 drivers/net/ethernet/cadence/macb_main.c queue->tx_ring = dma_alloc_coherent(&bp->pdev->dev, size, bp 2013 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, bp 2018 drivers/net/ethernet/cadence/macb_main.c size = bp->tx_ring_size * sizeof(struct macb_tx_skb); bp 2023 drivers/net/ethernet/cadence/macb_main.c size = RX_RING_BYTES(bp) + bp->rx_bd_rd_prefetch; bp 2024 drivers/net/ethernet/cadence/macb_main.c queue->rx_ring = dma_alloc_coherent(&bp->pdev->dev, size, bp 2028 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, bp 2032 drivers/net/ethernet/cadence/macb_main.c if (bp->macbgem_ops.mog_alloc_rx_buffers(bp)) bp 2038 drivers/net/ethernet/cadence/macb_main.c macb_free_consistent(bp); bp 2042 drivers/net/ethernet/cadence/macb_main.c static void gem_init_rings(struct macb *bp) bp 2049 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2050 drivers/net/ethernet/cadence/macb_main.c for (i = 0; i < bp->tx_ring_size; i++) { bp 2052 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, 0); bp 2067 drivers/net/ethernet/cadence/macb_main.c static void macb_init_rings(struct macb *bp) bp 2072 drivers/net/ethernet/cadence/macb_main.c macb_init_rx_ring(&bp->queues[0]); bp 2074 drivers/net/ethernet/cadence/macb_main.c for (i = 0; i < bp->tx_ring_size; i++) { bp 2075 drivers/net/ethernet/cadence/macb_main.c desc = macb_tx_desc(&bp->queues[0], i); bp 2076 drivers/net/ethernet/cadence/macb_main.c macb_set_addr(bp, desc, 0); bp 2079 drivers/net/ethernet/cadence/macb_main.c bp->queues[0].tx_head = 0; bp 2080 drivers/net/ethernet/cadence/macb_main.c bp->queues[0].tx_tail = 0; bp 2084 drivers/net/ethernet/cadence/macb_main.c static void macb_reset_hw(struct macb *bp) bp 2088 drivers/net/ethernet/cadence/macb_main.c u32 ctrl = macb_readl(bp, NCR); bp 2098 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, ctrl); bp 2101 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, TSR, -1); bp 2102 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, RSR, -1); bp 2105 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2108 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE) bp 2113 drivers/net/ethernet/cadence/macb_main.c static u32 gem_mdc_clk_div(struct macb *bp) bp 2116 drivers/net/ethernet/cadence/macb_main.c unsigned long pclk_hz = clk_get_rate(bp->pclk); bp 2134 drivers/net/ethernet/cadence/macb_main.c static u32 macb_mdc_clk_div(struct macb *bp) bp 2139 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 2140 drivers/net/ethernet/cadence/macb_main.c return gem_mdc_clk_div(bp); bp 2142 drivers/net/ethernet/cadence/macb_main.c pclk_hz = clk_get_rate(bp->pclk); bp 2159 drivers/net/ethernet/cadence/macb_main.c static u32 macb_dbw(struct macb *bp) bp 2161 drivers/net/ethernet/cadence/macb_main.c if (!macb_is_gem(bp)) bp 2164 drivers/net/ethernet/cadence/macb_main.c switch (GEM_BFEXT(DBWDEF, gem_readl(bp, DCFG1))) { bp 2182 drivers/net/ethernet/cadence/macb_main.c static void macb_configure_dma(struct macb *bp) bp 2189 drivers/net/ethernet/cadence/macb_main.c buffer_size = bp->rx_buffer_size / RX_BUFFER_MULTIPLE; bp 2190 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) { bp 2191 drivers/net/ethernet/cadence/macb_main.c dmacfg = gem_readl(bp, DMACFG) & ~GEM_BF(RXBS, -1L); bp 2192 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2198 drivers/net/ethernet/cadence/macb_main.c if (bp->dma_burst_length) bp 2199 drivers/net/ethernet/cadence/macb_main.c dmacfg = GEM_BFINS(FBLDO, bp->dma_burst_length, dmacfg); bp 2203 drivers/net/ethernet/cadence/macb_main.c if (bp->native_io) bp 2208 drivers/net/ethernet/cadence/macb_main.c if (bp->dev->features & NETIF_F_HW_CSUM) bp 2215 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 2219 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_PTP) bp 2222 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, "Cadence configure DMA with 0x%08x\n", bp 2224 drivers/net/ethernet/cadence/macb_main.c gem_writel(bp, DMACFG, dmacfg); bp 2228 drivers/net/ethernet/cadence/macb_main.c static void macb_init_hw(struct macb *bp) bp 2235 drivers/net/ethernet/cadence/macb_main.c macb_reset_hw(bp); bp 2236 drivers/net/ethernet/cadence/macb_main.c macb_set_hwaddr(bp); bp 2238 drivers/net/ethernet/cadence/macb_main.c config = macb_mdc_clk_div(bp); bp 2239 drivers/net/ethernet/cadence/macb_main.c if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) bp 2244 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_JUMBO) bp 2248 drivers/net/ethernet/cadence/macb_main.c if (bp->dev->flags & IFF_PROMISC) bp 2250 drivers/net/ethernet/cadence/macb_main.c else if (macb_is_gem(bp) && bp->dev->features & NETIF_F_RXCSUM) bp 2252 drivers/net/ethernet/cadence/macb_main.c if (!(bp->dev->flags & IFF_BROADCAST)) bp 2254 drivers/net/ethernet/cadence/macb_main.c config |= macb_dbw(bp); bp 2255 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCFGR, config); bp 2256 drivers/net/ethernet/cadence/macb_main.c if ((bp->caps & MACB_CAPS_JUMBO) && bp->jumbo_max_len) bp 2257 drivers/net/ethernet/cadence/macb_main.c gem_writel(bp, JML, bp->jumbo_max_len); bp 2258 drivers/net/ethernet/cadence/macb_main.c bp->speed = SPEED_10; bp 2259 drivers/net/ethernet/cadence/macb_main.c bp->duplex = DUPLEX_HALF; bp 2260 drivers/net/ethernet/cadence/macb_main.c bp->rx_frm_len_mask = MACB_RX_FRMLEN_MASK; bp 2261 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_JUMBO) bp 2262 drivers/net/ethernet/cadence/macb_main.c bp->rx_frm_len_mask = MACB_RX_JFRMLEN_MASK; bp 2264 drivers/net/ethernet/cadence/macb_main.c macb_configure_dma(bp); bp 2267 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2270 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 2275 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) bp 2281 drivers/net/ethernet/cadence/macb_main.c bp->rx_intr_mask | bp 2287 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE)); bp 2352 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2362 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRB, mc_filter[0]); bp 2363 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRT, mc_filter[1]); bp 2370 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2372 drivers/net/ethernet/cadence/macb_main.c cfg = macb_readl(bp, NCFGR); bp 2379 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 2386 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp) && dev->features & NETIF_F_RXCSUM) bp 2392 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRB, -1); bp 2393 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRT, -1); bp 2401 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRB, 0); bp 2402 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, HRT, 0); bp 2406 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCFGR, cfg); bp 2411 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2417 drivers/net/ethernet/cadence/macb_main.c netdev_dbg(bp->dev, "open\n"); bp 2419 drivers/net/ethernet/cadence/macb_main.c err = pm_runtime_get_sync(&bp->pdev->dev); bp 2433 drivers/net/ethernet/cadence/macb_main.c macb_init_rx_buffer_size(bp, bufsz); bp 2435 drivers/net/ethernet/cadence/macb_main.c err = macb_alloc_consistent(bp); bp 2442 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) bp 2445 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_init_rings(bp); bp 2446 drivers/net/ethernet/cadence/macb_main.c macb_init_hw(bp); bp 2453 drivers/net/ethernet/cadence/macb_main.c if (bp->ptp_info) bp 2454 drivers/net/ethernet/cadence/macb_main.c bp->ptp_info->ptp_init(dev); bp 2458 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_sync(&bp->pdev->dev); bp 2466 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2473 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) bp 2479 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 2480 drivers/net/ethernet/cadence/macb_main.c macb_reset_hw(bp); bp 2482 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 2484 drivers/net/ethernet/cadence/macb_main.c macb_free_consistent(bp); bp 2486 drivers/net/ethernet/cadence/macb_main.c if (bp->ptp_info) bp 2487 drivers/net/ethernet/cadence/macb_main.c bp->ptp_info->ptp_remove(dev); bp 2489 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put(&bp->pdev->dev); bp 2504 drivers/net/ethernet/cadence/macb_main.c static void gem_update_stats(struct macb *bp) bp 2510 drivers/net/ethernet/cadence/macb_main.c u32 *p = &bp->hw_stats.gem.tx_octets_31_0; bp 2514 drivers/net/ethernet/cadence/macb_main.c u64 val = bp->macb_reg_readl(bp, offset); bp 2516 drivers/net/ethernet/cadence/macb_main.c bp->ethtool_stats[i] += val; bp 2521 drivers/net/ethernet/cadence/macb_main.c val = bp->macb_reg_readl(bp, offset + 4); bp 2522 drivers/net/ethernet/cadence/macb_main.c bp->ethtool_stats[i] += ((u64)val) << 32; bp 2528 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) bp 2530 drivers/net/ethernet/cadence/macb_main.c bp->ethtool_stats[idx++] = *stat; bp 2533 drivers/net/ethernet/cadence/macb_main.c static struct net_device_stats *gem_get_stats(struct macb *bp) bp 2535 drivers/net/ethernet/cadence/macb_main.c struct gem_stats *hwstat = &bp->hw_stats.gem; bp 2536 drivers/net/ethernet/cadence/macb_main.c struct net_device_stats *nstat = &bp->dev->stats; bp 2538 drivers/net/ethernet/cadence/macb_main.c gem_update_stats(bp); bp 2574 drivers/net/ethernet/cadence/macb_main.c struct macb *bp; bp 2576 drivers/net/ethernet/cadence/macb_main.c bp = netdev_priv(dev); bp 2577 drivers/net/ethernet/cadence/macb_main.c gem_update_stats(bp); bp 2578 drivers/net/ethernet/cadence/macb_main.c memcpy(data, &bp->ethtool_stats, sizeof(u64) bp 2584 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2588 drivers/net/ethernet/cadence/macb_main.c return GEM_STATS_LEN + bp->num_queues * QUEUE_STATS_LEN; bp 2597 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2608 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 2621 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2622 drivers/net/ethernet/cadence/macb_main.c struct net_device_stats *nstat = &bp->dev->stats; bp 2623 drivers/net/ethernet/cadence/macb_main.c struct macb_stats *hwstat = &bp->hw_stats.macb; bp 2625 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 2626 drivers/net/ethernet/cadence/macb_main.c return gem_get_stats(bp); bp 2629 drivers/net/ethernet/cadence/macb_main.c macb_update_stats(bp); bp 2674 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2678 drivers/net/ethernet/cadence/macb_main.c regs->version = (macb_readl(bp, MID) & ((1 << MACB_REV_SIZE) - 1)) bp 2681 drivers/net/ethernet/cadence/macb_main.c tail = macb_tx_ring_wrap(bp, bp->queues[0].tx_tail); bp 2682 drivers/net/ethernet/cadence/macb_main.c head = macb_tx_ring_wrap(bp, bp->queues[0].tx_head); bp 2684 drivers/net/ethernet/cadence/macb_main.c regs_buff[0] = macb_readl(bp, NCR); bp 2685 drivers/net/ethernet/cadence/macb_main.c regs_buff[1] = macb_or_gem_readl(bp, NCFGR); bp 2686 drivers/net/ethernet/cadence/macb_main.c regs_buff[2] = macb_readl(bp, NSR); bp 2687 drivers/net/ethernet/cadence/macb_main.c regs_buff[3] = macb_readl(bp, TSR); bp 2688 drivers/net/ethernet/cadence/macb_main.c regs_buff[4] = macb_readl(bp, RBQP); bp 2689 drivers/net/ethernet/cadence/macb_main.c regs_buff[5] = macb_readl(bp, TBQP); bp 2690 drivers/net/ethernet/cadence/macb_main.c regs_buff[6] = macb_readl(bp, RSR); bp 2691 drivers/net/ethernet/cadence/macb_main.c regs_buff[7] = macb_readl(bp, IMR); bp 2695 drivers/net/ethernet/cadence/macb_main.c regs_buff[10] = macb_tx_dma(&bp->queues[0], tail); bp 2696 drivers/net/ethernet/cadence/macb_main.c regs_buff[11] = macb_tx_dma(&bp->queues[0], head); bp 2698 drivers/net/ethernet/cadence/macb_main.c if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) bp 2699 drivers/net/ethernet/cadence/macb_main.c regs_buff[12] = macb_or_gem_readl(bp, USRIO); bp 2700 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) bp 2701 drivers/net/ethernet/cadence/macb_main.c regs_buff[13] = gem_readl(bp, DMACFG); bp 2706 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 2711 drivers/net/ethernet/cadence/macb_main.c if (bp->wol & MACB_WOL_HAS_MAGIC_PACKET) { bp 2714 drivers/net/ethernet/cadence/macb_main.c if (bp->wol & MACB_WOL_ENABLED) bp 2721 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 2723 drivers/net/ethernet/cadence/macb_main.c if (!(bp->wol & MACB_WOL_HAS_MAGIC_PACKET) || bp 2728 drivers/net/ethernet/cadence/macb_main.c bp->wol |= MACB_WOL_ENABLED; bp 2730 drivers/net/ethernet/cadence/macb_main.c bp->wol &= ~MACB_WOL_ENABLED; bp 2732 drivers/net/ethernet/cadence/macb_main.c device_set_wakeup_enable(&bp->pdev->dev, bp->wol & MACB_WOL_ENABLED); bp 2740 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 2745 drivers/net/ethernet/cadence/macb_main.c ring->rx_pending = bp->rx_ring_size; bp 2746 drivers/net/ethernet/cadence/macb_main.c ring->tx_pending = bp->tx_ring_size; bp 2752 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 2767 drivers/net/ethernet/cadence/macb_main.c if ((new_tx_size == bp->tx_ring_size) && bp 2768 drivers/net/ethernet/cadence/macb_main.c (new_rx_size == bp->rx_ring_size)) { bp 2773 drivers/net/ethernet/cadence/macb_main.c if (netif_running(bp->dev)) { bp 2775 drivers/net/ethernet/cadence/macb_main.c macb_close(bp->dev); bp 2778 drivers/net/ethernet/cadence/macb_main.c bp->rx_ring_size = new_rx_size; bp 2779 drivers/net/ethernet/cadence/macb_main.c bp->tx_ring_size = new_tx_size; bp 2782 drivers/net/ethernet/cadence/macb_main.c macb_open(bp->dev); bp 2788 drivers/net/ethernet/cadence/macb_main.c static unsigned int gem_get_tsu_rate(struct macb *bp) bp 2793 drivers/net/ethernet/cadence/macb_main.c tsu_clk = devm_clk_get(&bp->pdev->dev, "tsu_clk"); bp 2797 drivers/net/ethernet/cadence/macb_main.c else if (!IS_ERR(bp->pclk)) { bp 2798 drivers/net/ethernet/cadence/macb_main.c tsu_clk = bp->pclk; bp 2813 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 2815 drivers/net/ethernet/cadence/macb_main.c if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0) { bp 2835 drivers/net/ethernet/cadence/macb_main.c info->phc_index = bp->ptp_clock ? ptp_clock_index(bp->ptp_clock) : -1; bp 2854 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 2856 drivers/net/ethernet/cadence/macb_main.c if (bp->ptp_info) bp 2857 drivers/net/ethernet/cadence/macb_main.c return bp->ptp_info->get_ts_info(netdev, info); bp 2862 drivers/net/ethernet/cadence/macb_main.c static void gem_enable_flow_filters(struct macb *bp, bool enable) bp 2864 drivers/net/ethernet/cadence/macb_main.c struct net_device *netdev = bp->dev; bp 2872 drivers/net/ethernet/cadence/macb_main.c num_t2_scr = GEM_BFEXT(T2SCR, gem_readl(bp, DCFG8)); bp 2874 drivers/net/ethernet/cadence/macb_main.c list_for_each_entry(item, &bp->rx_fs_list.list, list) { bp 2881 drivers/net/ethernet/cadence/macb_main.c t2_scr = gem_readl_n(bp, SCRT2, fs->location); bp 2904 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, SCRT2, fs->location, t2_scr); bp 2908 drivers/net/ethernet/cadence/macb_main.c static void gem_prog_cmp_regs(struct macb *bp, struct ethtool_rx_flow_spec *fs) bp 2929 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW0, T2CMP_OFST(GEM_IP4SRC_CMP(index)), w0); bp 2930 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW1, T2CMP_OFST(GEM_IP4SRC_CMP(index)), w1); bp 2943 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW0, T2CMP_OFST(GEM_IP4DST_CMP(index)), w0); bp 2944 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW1, T2CMP_OFST(GEM_IP4DST_CMP(index)), w1); bp 2971 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW0, T2CMP_OFST(GEM_PORT_CMP(index)), w0); bp 2972 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, T2CMPW1, T2CMP_OFST(GEM_PORT_CMP(index)), w1); bp 2985 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, SCRT2, index, t2_scr); bp 2991 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3010 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->rx_fs_lock, flags); bp 3013 drivers/net/ethernet/cadence/macb_main.c list_for_each_entry(item, &bp->rx_fs_list.list, list) { bp 3026 drivers/net/ethernet/cadence/macb_main.c list_add_tail(&newfs->list, &bp->rx_fs_list.list); bp 3028 drivers/net/ethernet/cadence/macb_main.c gem_prog_cmp_regs(bp, fs); bp 3029 drivers/net/ethernet/cadence/macb_main.c bp->rx_fs_list.count++; bp 3031 drivers/net/ethernet/cadence/macb_main.c gem_enable_flow_filters(bp, 1); bp 3033 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->rx_fs_lock, flags); bp 3037 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->rx_fs_lock, flags); bp 3045 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3050 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->rx_fs_lock, flags); bp 3052 drivers/net/ethernet/cadence/macb_main.c list_for_each_entry(item, &bp->rx_fs_list.list, list) { bp 3064 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, SCRT2, fs->location, 0); bp 3067 drivers/net/ethernet/cadence/macb_main.c bp->rx_fs_list.count--; bp 3068 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->rx_fs_lock, flags); bp 3074 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->rx_fs_lock, flags); bp 3081 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3084 drivers/net/ethernet/cadence/macb_main.c list_for_each_entry(item, &bp->rx_fs_list.list, list) { bp 3096 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3100 drivers/net/ethernet/cadence/macb_main.c list_for_each_entry(item, &bp->rx_fs_list.list, list) { bp 3106 drivers/net/ethernet/cadence/macb_main.c cmd->data = bp->max_tuples; bp 3115 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3120 drivers/net/ethernet/cadence/macb_main.c cmd->data = bp->num_queues; bp 3123 drivers/net/ethernet/cadence/macb_main.c cmd->rule_cnt = bp->rx_fs_list.count; bp 3142 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3147 drivers/net/ethernet/cadence/macb_main.c if ((cmd->fs.location >= bp->max_tuples) bp 3148 drivers/net/ethernet/cadence/macb_main.c || (cmd->fs.ring_cookie >= bp->num_queues)) { bp 3198 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 3206 drivers/net/ethernet/cadence/macb_main.c if (!bp->ptp_info) bp 3211 drivers/net/ethernet/cadence/macb_main.c return bp->ptp_info->set_hwtst(dev, rq, cmd); bp 3213 drivers/net/ethernet/cadence/macb_main.c return bp->ptp_info->get_hwtst(dev, rq); bp 3219 drivers/net/ethernet/cadence/macb_main.c static inline void macb_set_txcsum_feature(struct macb *bp, bp 3224 drivers/net/ethernet/cadence/macb_main.c if (!macb_is_gem(bp)) bp 3227 drivers/net/ethernet/cadence/macb_main.c val = gem_readl(bp, DMACFG); bp 3233 drivers/net/ethernet/cadence/macb_main.c gem_writel(bp, DMACFG, val); bp 3236 drivers/net/ethernet/cadence/macb_main.c static inline void macb_set_rxcsum_feature(struct macb *bp, bp 3239 drivers/net/ethernet/cadence/macb_main.c struct net_device *netdev = bp->dev; bp 3242 drivers/net/ethernet/cadence/macb_main.c if (!macb_is_gem(bp)) bp 3245 drivers/net/ethernet/cadence/macb_main.c val = gem_readl(bp, NCFGR); bp 3251 drivers/net/ethernet/cadence/macb_main.c gem_writel(bp, NCFGR, val); bp 3254 drivers/net/ethernet/cadence/macb_main.c static inline void macb_set_rxflow_feature(struct macb *bp, bp 3257 drivers/net/ethernet/cadence/macb_main.c if (!macb_is_gem(bp)) bp 3260 drivers/net/ethernet/cadence/macb_main.c gem_enable_flow_filters(bp, !!(features & NETIF_F_NTUPLE)); bp 3266 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 3271 drivers/net/ethernet/cadence/macb_main.c macb_set_txcsum_feature(bp, features); bp 3275 drivers/net/ethernet/cadence/macb_main.c macb_set_rxcsum_feature(bp, features); bp 3279 drivers/net/ethernet/cadence/macb_main.c macb_set_rxflow_feature(bp, features); bp 3284 drivers/net/ethernet/cadence/macb_main.c static void macb_restore_features(struct macb *bp) bp 3286 drivers/net/ethernet/cadence/macb_main.c struct net_device *netdev = bp->dev; bp 3290 drivers/net/ethernet/cadence/macb_main.c macb_set_txcsum_feature(bp, features); bp 3293 drivers/net/ethernet/cadence/macb_main.c macb_set_rxcsum_feature(bp, features); bp 3296 drivers/net/ethernet/cadence/macb_main.c macb_set_rxflow_feature(bp, features); bp 3319 drivers/net/ethernet/cadence/macb_main.c static void macb_configure_caps(struct macb *bp, bp 3325 drivers/net/ethernet/cadence/macb_main.c bp->caps = dt_conf->caps; bp 3327 drivers/net/ethernet/cadence/macb_main.c if (hw_is_gem(bp->regs, bp->native_io)) { bp 3328 drivers/net/ethernet/cadence/macb_main.c bp->caps |= MACB_CAPS_MACB_IS_GEM; bp 3330 drivers/net/ethernet/cadence/macb_main.c dcfg = gem_readl(bp, DCFG1); bp 3332 drivers/net/ethernet/cadence/macb_main.c bp->caps |= MACB_CAPS_ISR_CLEAR_ON_WRITE; bp 3333 drivers/net/ethernet/cadence/macb_main.c dcfg = gem_readl(bp, DCFG2); bp 3335 drivers/net/ethernet/cadence/macb_main.c bp->caps |= MACB_CAPS_FIFO_MODE; bp 3337 drivers/net/ethernet/cadence/macb_main.c if (gem_has_ptp(bp)) { bp 3338 drivers/net/ethernet/cadence/macb_main.c if (!GEM_BFEXT(TSU, gem_readl(bp, DCFG5))) bp 3341 drivers/net/ethernet/cadence/macb_main.c bp->hw_dma_cap |= HW_DMA_CAP_PTP; bp 3342 drivers/net/ethernet/cadence/macb_main.c bp->ptp_info = &gem_ptp_info; bp 3348 drivers/net/ethernet/cadence/macb_main.c dev_dbg(&bp->pdev->dev, "Cadence caps 0x%08x\n", bp->caps); bp 3477 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 3482 drivers/net/ethernet/cadence/macb_main.c bp->tx_ring_size = DEFAULT_TX_RING_SIZE; bp 3483 drivers/net/ethernet/cadence/macb_main.c bp->rx_ring_size = DEFAULT_RX_RING_SIZE; bp 3490 drivers/net/ethernet/cadence/macb_main.c if (!(bp->queue_mask & (1 << hw_q))) bp 3493 drivers/net/ethernet/cadence/macb_main.c queue = &bp->queues[q]; bp 3494 drivers/net/ethernet/cadence/macb_main.c queue->bp = bp; bp 3505 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) { bp 3519 drivers/net/ethernet/cadence/macb_main.c if (bp->hw_dma_cap & HW_DMA_CAP_64B) { bp 3548 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp)) { bp 3549 drivers/net/ethernet/cadence/macb_main.c bp->max_tx_length = GEM_MAX_TX_LEN; bp 3550 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_alloc_rx_buffers = gem_alloc_rx_buffers; bp 3551 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_free_rx_buffers = gem_free_rx_buffers; bp 3552 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_init_rings = gem_init_rings; bp 3553 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_rx = gem_rx; bp 3556 drivers/net/ethernet/cadence/macb_main.c bp->max_tx_length = MACB_MAX_TX_LEN; bp 3557 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_alloc_rx_buffers = macb_alloc_rx_buffers; bp 3558 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_free_rx_buffers = macb_free_rx_buffers; bp 3559 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_init_rings = macb_init_rings; bp 3560 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_rx = macb_rx; bp 3568 drivers/net/ethernet/cadence/macb_main.c if (GEM_BFEXT(PBUF_LSO, gem_readl(bp, DCFG6))) bp 3572 drivers/net/ethernet/cadence/macb_main.c if (macb_is_gem(bp) && !(bp->caps & MACB_CAPS_FIFO_MODE)) bp 3574 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_SG_DISABLED) bp 3582 drivers/net/ethernet/cadence/macb_main.c reg = gem_readl(bp, DCFG8); bp 3583 drivers/net/ethernet/cadence/macb_main.c bp->max_tuples = min((GEM_BFEXT(SCR2CMP, reg) / 3), bp 3585 drivers/net/ethernet/cadence/macb_main.c if (bp->max_tuples > 0) { bp 3591 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, ETHT, SCRT2_ETHT, reg); bp 3595 drivers/net/ethernet/cadence/macb_main.c INIT_LIST_HEAD(&bp->rx_fs_list.list); bp 3596 drivers/net/ethernet/cadence/macb_main.c bp->rx_fs_list.count = 0; bp 3597 drivers/net/ethernet/cadence/macb_main.c spin_lock_init(&bp->rx_fs_lock); bp 3599 drivers/net/ethernet/cadence/macb_main.c bp->max_tuples = 0; bp 3602 drivers/net/ethernet/cadence/macb_main.c if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) { bp 3604 drivers/net/ethernet/cadence/macb_main.c if (bp->phy_interface == PHY_INTERFACE_MODE_RGMII) bp 3606 drivers/net/ethernet/cadence/macb_main.c else if (bp->phy_interface == PHY_INTERFACE_MODE_RMII && bp 3607 drivers/net/ethernet/cadence/macb_main.c (bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII)) bp 3609 drivers/net/ethernet/cadence/macb_main.c else if (!(bp->caps & MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII)) bp 3612 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_USRIO_HAS_CLKEN) bp 3615 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, USRIO, val); bp 3619 drivers/net/ethernet/cadence/macb_main.c val = macb_mdc_clk_div(bp); bp 3620 drivers/net/ethernet/cadence/macb_main.c val |= macb_dbw(bp); bp 3621 drivers/net/ethernet/cadence/macb_main.c if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) bp 3623 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCFGR, val); bp 3944 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(dev); bp 3948 drivers/net/ethernet/cadence/macb_main.c bp->queues[0].bp = bp; bp 3958 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, 0); bp 3961 drivers/net/ethernet/cadence/macb_main.c if (bp->phy_interface == PHY_INTERFACE_MODE_RMII) bp 3964 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCFGR, reg); bp 4195 drivers/net/ethernet/cadence/macb_main.c struct macb *bp; bp 4226 drivers/net/ethernet/cadence/macb_main.c dev = alloc_etherdev_mq(sizeof(*bp), num_queues); bp 4236 drivers/net/ethernet/cadence/macb_main.c bp = netdev_priv(dev); bp 4237 drivers/net/ethernet/cadence/macb_main.c bp->pdev = pdev; bp 4238 drivers/net/ethernet/cadence/macb_main.c bp->dev = dev; bp 4239 drivers/net/ethernet/cadence/macb_main.c bp->regs = mem; bp 4240 drivers/net/ethernet/cadence/macb_main.c bp->native_io = native_io; bp 4242 drivers/net/ethernet/cadence/macb_main.c bp->macb_reg_readl = hw_readl_native; bp 4243 drivers/net/ethernet/cadence/macb_main.c bp->macb_reg_writel = hw_writel_native; bp 4245 drivers/net/ethernet/cadence/macb_main.c bp->macb_reg_readl = hw_readl; bp 4246 drivers/net/ethernet/cadence/macb_main.c bp->macb_reg_writel = hw_writel; bp 4248 drivers/net/ethernet/cadence/macb_main.c bp->num_queues = num_queues; bp 4249 drivers/net/ethernet/cadence/macb_main.c bp->queue_mask = queue_mask; bp 4251 drivers/net/ethernet/cadence/macb_main.c bp->dma_burst_length = macb_config->dma_burst_length; bp 4252 drivers/net/ethernet/cadence/macb_main.c bp->pclk = pclk; bp 4253 drivers/net/ethernet/cadence/macb_main.c bp->hclk = hclk; bp 4254 drivers/net/ethernet/cadence/macb_main.c bp->tx_clk = tx_clk; bp 4255 drivers/net/ethernet/cadence/macb_main.c bp->rx_clk = rx_clk; bp 4256 drivers/net/ethernet/cadence/macb_main.c bp->tsu_clk = tsu_clk; bp 4258 drivers/net/ethernet/cadence/macb_main.c bp->jumbo_max_len = macb_config->jumbo_max_len; bp 4260 drivers/net/ethernet/cadence/macb_main.c bp->wol = 0; bp 4262 drivers/net/ethernet/cadence/macb_main.c bp->wol |= MACB_WOL_HAS_MAGIC_PACKET; bp 4263 drivers/net/ethernet/cadence/macb_main.c device_init_wakeup(&pdev->dev, bp->wol & MACB_WOL_HAS_MAGIC_PACKET); bp 4265 drivers/net/ethernet/cadence/macb_main.c spin_lock_init(&bp->lock); bp 4268 drivers/net/ethernet/cadence/macb_main.c macb_configure_caps(bp, macb_config); bp 4271 drivers/net/ethernet/cadence/macb_main.c if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) { bp 4273 drivers/net/ethernet/cadence/macb_main.c bp->hw_dma_cap |= HW_DMA_CAP_64B; bp 4286 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_JUMBO) bp 4287 drivers/net/ethernet/cadence/macb_main.c dev->max_mtu = gem_readl(bp, JML) - ETH_HLEN - ETH_FCS_LEN; bp 4291 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_BD_RD_PREFETCH) { bp 4292 drivers/net/ethernet/cadence/macb_main.c val = GEM_BFEXT(RXBD_RDBUFF, gem_readl(bp, DCFG10)); bp 4294 drivers/net/ethernet/cadence/macb_main.c bp->rx_bd_rd_prefetch = (2 << (val - 1)) * bp 4295 drivers/net/ethernet/cadence/macb_main.c macb_dma_desc_get_size(bp); bp 4297 drivers/net/ethernet/cadence/macb_main.c val = GEM_BFEXT(TXBD_RDBUFF, gem_readl(bp, DCFG10)); bp 4299 drivers/net/ethernet/cadence/macb_main.c bp->tx_bd_rd_prefetch = (2 << (val - 1)) * bp 4300 drivers/net/ethernet/cadence/macb_main.c macb_dma_desc_get_size(bp); bp 4303 drivers/net/ethernet/cadence/macb_main.c bp->rx_intr_mask = MACB_RX_INT_FLAGS; bp 4304 drivers/net/ethernet/cadence/macb_main.c if (bp->caps & MACB_CAPS_NEEDS_RSTONUBR) bp 4305 drivers/net/ethernet/cadence/macb_main.c bp->rx_intr_mask |= MACB_BIT(RXUBR); bp 4312 drivers/net/ethernet/cadence/macb_main.c ether_addr_copy(bp->dev->dev_addr, mac); bp 4314 drivers/net/ethernet/cadence/macb_main.c macb_get_hwaddr(bp); bp 4320 drivers/net/ethernet/cadence/macb_main.c bp->phy_interface = PHY_INTERFACE_MODE_MII; bp 4322 drivers/net/ethernet/cadence/macb_main.c bp->phy_interface = err; bp 4329 drivers/net/ethernet/cadence/macb_main.c err = macb_mii_init(bp); bp 4343 drivers/net/ethernet/cadence/macb_main.c tasklet_init(&bp->hresp_err_tasklet, macb_hresp_error_task, bp 4344 drivers/net/ethernet/cadence/macb_main.c (unsigned long)bp); bp 4349 drivers/net/ethernet/cadence/macb_main.c macb_is_gem(bp) ? "GEM" : "MACB", macb_readl(bp, MID), bp 4352 drivers/net/ethernet/cadence/macb_main.c pm_runtime_mark_last_busy(&bp->pdev->dev); bp 4353 drivers/net/ethernet/cadence/macb_main.c pm_runtime_put_autosuspend(&bp->pdev->dev); bp 4359 drivers/net/ethernet/cadence/macb_main.c mdiobus_unregister(bp->mii_bus); bp 4360 drivers/net/ethernet/cadence/macb_main.c of_node_put(bp->phy_node); bp 4363 drivers/net/ethernet/cadence/macb_main.c mdiobus_free(bp->mii_bus); bp 4384 drivers/net/ethernet/cadence/macb_main.c struct macb *bp; bp 4390 drivers/net/ethernet/cadence/macb_main.c bp = netdev_priv(dev); bp 4393 drivers/net/ethernet/cadence/macb_main.c mdiobus_unregister(bp->mii_bus); bp 4397 drivers/net/ethernet/cadence/macb_main.c mdiobus_free(bp->mii_bus); bp 4400 drivers/net/ethernet/cadence/macb_main.c tasklet_kill(&bp->hresp_err_tasklet); bp 4404 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->tx_clk); bp 4405 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->hclk); bp 4406 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->pclk); bp 4407 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->rx_clk); bp 4408 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->tsu_clk); bp 4411 drivers/net/ethernet/cadence/macb_main.c of_node_put(bp->phy_node); bp 4421 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 4422 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = bp->queues; bp 4430 drivers/net/ethernet/cadence/macb_main.c if (bp->wol & MACB_WOL_ENABLED) { bp 4431 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, IER, MACB_BIT(WOL)); bp 4432 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, WOL, MACB_BIT(MAG)); bp 4433 drivers/net/ethernet/cadence/macb_main.c enable_irq_wake(bp->queues[0].irq); bp 4437 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; bp 4442 drivers/net/ethernet/cadence/macb_main.c spin_lock_irqsave(&bp->lock, flags); bp 4443 drivers/net/ethernet/cadence/macb_main.c macb_reset_hw(bp); bp 4444 drivers/net/ethernet/cadence/macb_main.c spin_unlock_irqrestore(&bp->lock, flags); bp 4446 drivers/net/ethernet/cadence/macb_main.c if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) bp 4447 drivers/net/ethernet/cadence/macb_main.c bp->pm_data.usrio = macb_or_gem_readl(bp, USRIO); bp 4450 drivers/net/ethernet/cadence/macb_main.c bp->pm_data.scrt2 = gem_readl_n(bp, ETHT, SCRT2_ETHT); bp 4454 drivers/net/ethernet/cadence/macb_main.c if (bp->ptp_info) bp 4455 drivers/net/ethernet/cadence/macb_main.c bp->ptp_info->ptp_remove(netdev); bp 4464 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 4465 drivers/net/ethernet/cadence/macb_main.c struct macb_queue *queue = bp->queues; bp 4473 drivers/net/ethernet/cadence/macb_main.c if (bp->wol & MACB_WOL_ENABLED) { bp 4474 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, IDR, MACB_BIT(WOL)); bp 4475 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, WOL, 0); bp 4476 drivers/net/ethernet/cadence/macb_main.c disable_irq_wake(bp->queues[0].irq); bp 4478 drivers/net/ethernet/cadence/macb_main.c macb_writel(bp, NCR, MACB_BIT(MPE)); bp 4481 drivers/net/ethernet/cadence/macb_main.c gem_writel_n(bp, ETHT, SCRT2_ETHT, bp->pm_data.scrt2); bp 4483 drivers/net/ethernet/cadence/macb_main.c if (!(bp->caps & MACB_CAPS_USRIO_DISABLED)) bp 4484 drivers/net/ethernet/cadence/macb_main.c macb_or_gem_writel(bp, USRIO, bp->pm_data.usrio); bp 4486 drivers/net/ethernet/cadence/macb_main.c for (q = 0, queue = bp->queues; q < bp->num_queues; bp 4494 drivers/net/ethernet/cadence/macb_main.c bp->macbgem_ops.mog_init_rings(bp); bp 4495 drivers/net/ethernet/cadence/macb_main.c macb_init_hw(bp); bp 4497 drivers/net/ethernet/cadence/macb_main.c macb_restore_features(bp); bp 4499 drivers/net/ethernet/cadence/macb_main.c if (bp->ptp_info) bp 4500 drivers/net/ethernet/cadence/macb_main.c bp->ptp_info->ptp_init(netdev); bp 4508 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 4510 drivers/net/ethernet/cadence/macb_main.c if (!(device_may_wakeup(&bp->dev->dev))) { bp 4511 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->tx_clk); bp 4512 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->hclk); bp 4513 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->pclk); bp 4514 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->rx_clk); bp 4516 drivers/net/ethernet/cadence/macb_main.c clk_disable_unprepare(bp->tsu_clk); bp 4524 drivers/net/ethernet/cadence/macb_main.c struct macb *bp = netdev_priv(netdev); bp 4526 drivers/net/ethernet/cadence/macb_main.c if (!(device_may_wakeup(&bp->dev->dev))) { bp 4527 drivers/net/ethernet/cadence/macb_main.c clk_prepare_enable(bp->pclk); bp 4528 drivers/net/ethernet/cadence/macb_main.c clk_prepare_enable(bp->hclk); bp 4529 drivers/net/ethernet/cadence/macb_main.c clk_prepare_enable(bp->tx_clk); bp 4530 drivers/net/ethernet/cadence/macb_main.c clk_prepare_enable(bp->rx_clk); bp 4532 drivers/net/ethernet/cadence/macb_main.c clk_prepare_enable(bp->tsu_clk); bp 28 drivers/net/ethernet/cadence/macb_ptp.c static struct macb_dma_desc_ptp *macb_ptp_desc(struct macb *bp, bp 31 drivers/net/ethernet/cadence/macb_ptp.c if (bp->hw_dma_cap == HW_DMA_CAP_PTP) bp 34 drivers/net/ethernet/cadence/macb_ptp.c if (bp->hw_dma_cap == HW_DMA_CAP_64B_PTP) bp 43 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); bp 48 drivers/net/ethernet/cadence/macb_ptp.c spin_lock_irqsave(&bp->tsu_clk_lock, flags); bp 49 drivers/net/ethernet/cadence/macb_ptp.c first = gem_readl(bp, TN); bp 50 drivers/net/ethernet/cadence/macb_ptp.c secl = gem_readl(bp, TSL); bp 51 drivers/net/ethernet/cadence/macb_ptp.c sech = gem_readl(bp, TSH); bp 52 drivers/net/ethernet/cadence/macb_ptp.c second = gem_readl(bp, TN); bp 59 drivers/net/ethernet/cadence/macb_ptp.c ts->tv_nsec = gem_readl(bp, TN); bp 60 drivers/net/ethernet/cadence/macb_ptp.c secl = gem_readl(bp, TSL); bp 61 drivers/net/ethernet/cadence/macb_ptp.c sech = gem_readl(bp, TSH); bp 66 drivers/net/ethernet/cadence/macb_ptp.c spin_unlock_irqrestore(&bp->tsu_clk_lock, flags); bp 75 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); bp 83 drivers/net/ethernet/cadence/macb_ptp.c spin_lock_irqsave(&bp->tsu_clk_lock, flags); bp 86 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TN, 0); /* clear to avoid overflow */ bp 87 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TSH, sech); bp 89 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TSL, secl); bp 90 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TN, ns); bp 92 drivers/net/ethernet/cadence/macb_ptp.c spin_unlock_irqrestore(&bp->tsu_clk_lock, flags); bp 97 drivers/net/ethernet/cadence/macb_ptp.c static int gem_tsu_incr_set(struct macb *bp, struct tsu_incr *incr_spec) bp 106 drivers/net/ethernet/cadence/macb_ptp.c spin_lock_irqsave(&bp->tsu_clk_lock, flags); bp 108 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TISUBN, GEM_BF(SUBNSINCRL, incr_spec->sub_ns) | bp 111 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TI, GEM_BF(NSINCR, incr_spec->ns)); bp 112 drivers/net/ethernet/cadence/macb_ptp.c spin_unlock_irqrestore(&bp->tsu_clk_lock, flags); bp 119 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); bp 131 drivers/net/ethernet/cadence/macb_ptp.c incr_spec.sub_ns = bp->tsu_incr.sub_ns; bp 132 drivers/net/ethernet/cadence/macb_ptp.c incr_spec.ns = bp->tsu_incr.ns; bp 148 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_incr_set(bp, &incr_spec); bp 154 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); bp 164 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_get_time(&bp->ptp_clock_info, &now); bp 167 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_set_time(&bp->ptp_clock_info, bp 172 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TA, adj); bp 200 drivers/net/ethernet/cadence/macb_ptp.c static void gem_ptp_init_timer(struct macb *bp) bp 205 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_incr.ns = div_u64_rem(NSEC_PER_SEC, bp->tsu_rate, &rem); bp 209 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_incr.sub_ns = div_u64(adj, bp->tsu_rate); bp 211 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_incr.sub_ns = 0; bp 215 drivers/net/ethernet/cadence/macb_ptp.c static void gem_ptp_init_tsu(struct macb *bp) bp 223 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_set_time(&bp->ptp_clock_info, &ts); bp 226 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_incr_set(bp, &bp->tsu_incr); bp 228 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TA, 0); bp 231 drivers/net/ethernet/cadence/macb_ptp.c static void gem_ptp_clear_timer(struct macb *bp) bp 233 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_incr.sub_ns = 0; bp 234 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_incr.ns = 0; bp 236 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TISUBN, GEM_BF(SUBNSINCR, 0)); bp 237 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TI, GEM_BF(NSINCR, 0)); bp 238 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TA, 0); bp 241 drivers/net/ethernet/cadence/macb_ptp.c static int gem_hw_timestamp(struct macb *bp, u32 dma_desc_ts_1, bp 254 drivers/net/ethernet/cadence/macb_ptp.c gem_tsu_get_time(&bp->ptp_clock_info, &tsu); bp 269 drivers/net/ethernet/cadence/macb_ptp.c void gem_ptp_rxstamp(struct macb *bp, struct sk_buff *skb, bp 277 drivers/net/ethernet/cadence/macb_ptp.c desc_ptp = macb_ptp_desc(bp, desc); bp 278 drivers/net/ethernet/cadence/macb_ptp.c gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts); bp 284 drivers/net/ethernet/cadence/macb_ptp.c static void gem_tstamp_tx(struct macb *bp, struct sk_buff *skb, bp 290 drivers/net/ethernet/cadence/macb_ptp.c gem_hw_timestamp(bp, desc_ptp->ts_1, desc_ptp->ts_2, &ts); bp 311 drivers/net/ethernet/cadence/macb_ptp.c desc_ptp = macb_ptp_desc(queue->bp, desc); bp 339 drivers/net/ethernet/cadence/macb_ptp.c gem_tstamp_tx(queue->bp, tx_ts->skb, &tx_ts->desc_ptp); bp 351 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = netdev_priv(dev); bp 355 drivers/net/ethernet/cadence/macb_ptp.c bp->ptp_clock_info = gem_ptp_caps_template; bp 358 drivers/net/ethernet/cadence/macb_ptp.c bp->tsu_rate = bp->ptp_info->get_tsu_rate(bp); bp 359 drivers/net/ethernet/cadence/macb_ptp.c bp->ptp_clock_info.max_adj = bp->ptp_info->get_ptp_max_adj(); bp 360 drivers/net/ethernet/cadence/macb_ptp.c gem_ptp_init_timer(bp); bp 361 drivers/net/ethernet/cadence/macb_ptp.c bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &dev->dev); bp 362 drivers/net/ethernet/cadence/macb_ptp.c if (IS_ERR(bp->ptp_clock)) { bp 364 drivers/net/ethernet/cadence/macb_ptp.c PTR_ERR(bp->ptp_clock)); bp 365 drivers/net/ethernet/cadence/macb_ptp.c bp->ptp_clock = NULL; bp 367 drivers/net/ethernet/cadence/macb_ptp.c } else if (bp->ptp_clock == NULL) { bp 372 drivers/net/ethernet/cadence/macb_ptp.c spin_lock_init(&bp->tsu_clk_lock); bp 373 drivers/net/ethernet/cadence/macb_ptp.c for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { bp 379 drivers/net/ethernet/cadence/macb_ptp.c gem_ptp_init_tsu(bp); bp 381 drivers/net/ethernet/cadence/macb_ptp.c dev_info(&bp->pdev->dev, "%s ptp clock registered.\n", bp 387 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = netdev_priv(ndev); bp 389 drivers/net/ethernet/cadence/macb_ptp.c if (bp->ptp_clock) bp 390 drivers/net/ethernet/cadence/macb_ptp.c ptp_clock_unregister(bp->ptp_clock); bp 392 drivers/net/ethernet/cadence/macb_ptp.c gem_ptp_clear_timer(bp); bp 394 drivers/net/ethernet/cadence/macb_ptp.c dev_info(&bp->pdev->dev, "%s ptp clock unregistered.\n", bp 398 drivers/net/ethernet/cadence/macb_ptp.c static int gem_ptp_set_ts_mode(struct macb *bp, bp 402 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, TXBDCTRL, GEM_BF(TXTSMODE, tx_bd_control)); bp 403 drivers/net/ethernet/cadence/macb_ptp.c gem_writel(bp, RXBDCTRL, GEM_BF(RXTSMODE, rx_bd_control)); bp 411 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = netdev_priv(dev); bp 413 drivers/net/ethernet/cadence/macb_ptp.c tstamp_config = &bp->tstamp_config; bp 414 drivers/net/ethernet/cadence/macb_ptp.c if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0) bp 423 drivers/net/ethernet/cadence/macb_ptp.c static int gem_ptp_set_one_step_sync(struct macb *bp, u8 enable) bp 427 drivers/net/ethernet/cadence/macb_ptp.c reg_val = macb_readl(bp, NCR); bp 430 drivers/net/ethernet/cadence/macb_ptp.c macb_writel(bp, NCR, reg_val | MACB_BIT(OSSMODE)); bp 432 drivers/net/ethernet/cadence/macb_ptp.c macb_writel(bp, NCR, reg_val & ~MACB_BIT(OSSMODE)); bp 442 drivers/net/ethernet/cadence/macb_ptp.c struct macb *bp = netdev_priv(dev); bp 445 drivers/net/ethernet/cadence/macb_ptp.c tstamp_config = &bp->tstamp_config; bp 446 drivers/net/ethernet/cadence/macb_ptp.c if ((bp->hw_dma_cap & HW_DMA_CAP_PTP) == 0) bp 461 drivers/net/ethernet/cadence/macb_ptp.c if (gem_ptp_set_one_step_sync(bp, 1) != 0) bp 489 drivers/net/ethernet/cadence/macb_ptp.c regval = macb_readl(bp, NCR); bp 490 drivers/net/ethernet/cadence/macb_ptp.c macb_writel(bp, NCR, (regval | MACB_BIT(SRTSM))); bp 502 drivers/net/ethernet/cadence/macb_ptp.c if (gem_ptp_set_ts_mode(bp, tx_bd_control, rx_bd_control) != 0) bp 580 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned char *bp; bp 586 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c for (bp = (unsigned char *)buf, i = off; i < 4; i++) bp 587 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c bp[i] = last.byte[i]; bp 1852 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c u32 *bp = regbuf + start - T4VF_REGMAP_START; bp 1861 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c *bp++ = 0xffff; bp 1863 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c *bp++ = t4_read_reg(adapter, start); bp 422 drivers/net/ethernet/cirrus/cs89x0.c unsigned char *bp = lp->rx_dma_ptr; bp 424 drivers/net/ethernet/cirrus/cs89x0.c status = bp[0] + (bp[1] << 8); bp 425 drivers/net/ethernet/cirrus/cs89x0.c length = bp[2] + (bp[3] << 8); bp 426 drivers/net/ethernet/cirrus/cs89x0.c bp += 4; bp 429 drivers/net/ethernet/cirrus/cs89x0.c dev->name, (unsigned long)bp, status, length); bp 443 drivers/net/ethernet/cirrus/cs89x0.c bp += (length + 3) & ~3; bp 444 drivers/net/ethernet/cirrus/cs89x0.c if (bp >= lp->end_dma_buff) bp 445 drivers/net/ethernet/cirrus/cs89x0.c bp -= lp->dmasize * 1024; bp 446 drivers/net/ethernet/cirrus/cs89x0.c lp->rx_dma_ptr = bp; bp 451 drivers/net/ethernet/cirrus/cs89x0.c if (bp + length > lp->end_dma_buff) { bp 452 drivers/net/ethernet/cirrus/cs89x0.c int semi_cnt = lp->end_dma_buff - bp; bp 453 drivers/net/ethernet/cirrus/cs89x0.c skb_put_data(skb, bp, semi_cnt); bp 456 drivers/net/ethernet/cirrus/cs89x0.c skb_put_data(skb, bp, length); bp 458 drivers/net/ethernet/cirrus/cs89x0.c bp += (length + 3) & ~3; bp 459 drivers/net/ethernet/cirrus/cs89x0.c if (bp >= lp->end_dma_buff) bp 460 drivers/net/ethernet/cirrus/cs89x0.c bp -= lp->dmasize*1024; bp 461 drivers/net/ethernet/cirrus/cs89x0.c lp->rx_dma_ptr = bp; bp 302 drivers/net/ethernet/dec/tulip/eeprom.c unsigned char *bp = leaf->leafdata; bp 305 drivers/net/ethernet/dec/tulip/eeprom.c bp[0], bp[1], bp[2 + bp[1]*2], bp 306 drivers/net/ethernet/dec/tulip/eeprom.c bp[5 + bp[2 + bp[1]*2]*2], bp 307 drivers/net/ethernet/dec/tulip/eeprom.c bp[4 + bp[2 + bp[1]*2]*2]); bp 27 drivers/net/ethernet/dnet.c static u16 dnet_readw_mac(struct dnet *bp, u16 reg) bp 32 drivers/net/ethernet/dnet.c dnet_writel(bp, reg, MACREG_ADDR); bp 39 drivers/net/ethernet/dnet.c data_read = dnet_readl(bp, MACREG_DATA); bp 46 drivers/net/ethernet/dnet.c static void dnet_writew_mac(struct dnet *bp, u16 reg, u16 val) bp 49 drivers/net/ethernet/dnet.c dnet_writel(bp, val, MACREG_DATA); bp 52 drivers/net/ethernet/dnet.c dnet_writel(bp, reg | DNET_INTERNAL_WRITE, MACREG_ADDR); bp 59 drivers/net/ethernet/dnet.c static void __dnet_set_hwaddr(struct dnet *bp) bp 63 drivers/net/ethernet/dnet.c tmp = be16_to_cpup((__be16 *)bp->dev->dev_addr); bp 64 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_0_REG, tmp); bp 65 drivers/net/ethernet/dnet.c tmp = be16_to_cpup((__be16 *)(bp->dev->dev_addr + 2)); bp 66 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_1_REG, tmp); bp 67 drivers/net/ethernet/dnet.c tmp = be16_to_cpup((__be16 *)(bp->dev->dev_addr + 4)); bp 68 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_2_REG, tmp); bp 71 drivers/net/ethernet/dnet.c static void dnet_get_hwaddr(struct dnet *bp) bp 88 drivers/net/ethernet/dnet.c tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_0_REG); bp 90 drivers/net/ethernet/dnet.c tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_1_REG); bp 92 drivers/net/ethernet/dnet.c tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_2_REG); bp 96 drivers/net/ethernet/dnet.c memcpy(bp->dev->dev_addr, addr, sizeof(addr)); bp 101 drivers/net/ethernet/dnet.c struct dnet *bp = bus->priv; bp 104 drivers/net/ethernet/dnet.c while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) bp 117 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG, value); bp 120 drivers/net/ethernet/dnet.c while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) bp 124 drivers/net/ethernet/dnet.c value = dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_DAT_REG); bp 134 drivers/net/ethernet/dnet.c struct dnet *bp = bus->priv; bp 139 drivers/net/ethernet/dnet.c while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) bp 158 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_DAT_REG, value); bp 161 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG, tmp); bp 163 drivers/net/ethernet/dnet.c while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) bp 172 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 179 drivers/net/ethernet/dnet.c spin_lock_irqsave(&bp->lock, flags); bp 181 drivers/net/ethernet/dnet.c mode_reg = dnet_readw_mac(bp, DNET_INTERNAL_MODE_REG); bp 182 drivers/net/ethernet/dnet.c ctl_reg = dnet_readw_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG); bp 185 drivers/net/ethernet/dnet.c if (bp->duplex != phydev->duplex) { bp 193 drivers/net/ethernet/dnet.c bp->duplex = phydev->duplex; bp 197 drivers/net/ethernet/dnet.c if (bp->speed != phydev->speed) { bp 214 drivers/net/ethernet/dnet.c bp->speed = phydev->speed; bp 218 drivers/net/ethernet/dnet.c if (phydev->link != bp->link) { bp 226 drivers/net/ethernet/dnet.c bp->speed = 0; bp 227 drivers/net/ethernet/dnet.c bp->duplex = -1; bp 229 drivers/net/ethernet/dnet.c bp->link = phydev->link; bp 235 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG, ctl_reg); bp 236 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_MODE_REG, mode_reg); bp 239 drivers/net/ethernet/dnet.c spin_unlock_irqrestore(&bp->lock, flags); bp 253 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 257 drivers/net/ethernet/dnet.c phydev = phy_find_first(bp->mii_bus); bp 267 drivers/net/ethernet/dnet.c if (bp->capabilities & DNET_HAS_RMII) { bp 283 drivers/net/ethernet/dnet.c if (bp->capabilities & DNET_HAS_GIGABIT) bp 290 drivers/net/ethernet/dnet.c bp->link = 0; bp 291 drivers/net/ethernet/dnet.c bp->speed = 0; bp 292 drivers/net/ethernet/dnet.c bp->duplex = -1; bp 297 drivers/net/ethernet/dnet.c static int dnet_mii_init(struct dnet *bp) bp 301 drivers/net/ethernet/dnet.c bp->mii_bus = mdiobus_alloc(); bp 302 drivers/net/ethernet/dnet.c if (bp->mii_bus == NULL) bp 305 drivers/net/ethernet/dnet.c bp->mii_bus->name = "dnet_mii_bus"; bp 306 drivers/net/ethernet/dnet.c bp->mii_bus->read = &dnet_mdio_read; bp 307 drivers/net/ethernet/dnet.c bp->mii_bus->write = &dnet_mdio_write; bp 309 drivers/net/ethernet/dnet.c snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", bp 310 drivers/net/ethernet/dnet.c bp->pdev->name, bp->pdev->id); bp 312 drivers/net/ethernet/dnet.c bp->mii_bus->priv = bp; bp 314 drivers/net/ethernet/dnet.c if (mdiobus_register(bp->mii_bus)) { bp 319 drivers/net/ethernet/dnet.c if (dnet_mii_probe(bp->dev) != 0) { bp 327 drivers/net/ethernet/dnet.c mdiobus_unregister(bp->mii_bus); bp 329 drivers/net/ethernet/dnet.c mdiobus_free(bp->mii_bus); bp 339 drivers/net/ethernet/dnet.c static void dnet_update_stats(struct dnet *bp) bp 341 drivers/net/ethernet/dnet.c u32 __iomem *reg = bp->regs + DNET_RX_PKT_IGNR_CNT; bp 342 drivers/net/ethernet/dnet.c u32 *p = &bp->hw_stats.rx_pkt_ignr; bp 343 drivers/net/ethernet/dnet.c u32 *end = &bp->hw_stats.rx_byte + 1; bp 351 drivers/net/ethernet/dnet.c reg = bp->regs + DNET_TX_UNICAST_CNT; bp 352 drivers/net/ethernet/dnet.c p = &bp->hw_stats.tx_unicast; bp 353 drivers/net/ethernet/dnet.c end = &bp->hw_stats.tx_byte + 1; bp 364 drivers/net/ethernet/dnet.c struct dnet *bp = container_of(napi, struct dnet, napi); bp 365 drivers/net/ethernet/dnet.c struct net_device *dev = bp->dev; bp 379 drivers/net/ethernet/dnet.c if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) bp 382 drivers/net/ethernet/dnet.c cmd_word = dnet_readl(bp, RX_LEN_FIFO); bp 399 drivers/net/ethernet/dnet.c *data_ptr++ = dnet_readl(bp, RX_DATA_FIFO); bp 414 drivers/net/ethernet/dnet.c int_enable = dnet_readl(bp, INTR_ENB); bp 416 drivers/net/ethernet/dnet.c dnet_writel(bp, int_enable, INTR_ENB); bp 425 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 430 drivers/net/ethernet/dnet.c spin_lock_irqsave(&bp->lock, flags); bp 433 drivers/net/ethernet/dnet.c int_src = dnet_readl(bp, INTR_SRC); bp 434 drivers/net/ethernet/dnet.c int_enable = dnet_readl(bp, INTR_ENB); bp 439 drivers/net/ethernet/dnet.c int_enable = dnet_readl(bp, INTR_ENB); bp 441 drivers/net/ethernet/dnet.c dnet_writel(bp, int_enable, INTR_ENB); bp 450 drivers/net/ethernet/dnet.c dnet_readl(bp, RX_STATUS), int_current); bp 452 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_SYS_CTL_RXFIFOFLUSH, SYS_CTL); bp 454 drivers/net/ethernet/dnet.c dnet_writel(bp, 0, SYS_CTL); bp 462 drivers/net/ethernet/dnet.c dnet_readl(bp, TX_STATUS), int_current); bp 464 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_SYS_CTL_TXFIFOFLUSH, SYS_CTL); bp 466 drivers/net/ethernet/dnet.c dnet_writel(bp, 0, SYS_CTL); bp 471 drivers/net/ethernet/dnet.c if (napi_schedule_prep(&bp->napi)) { bp 477 drivers/net/ethernet/dnet.c int_enable = dnet_readl(bp, INTR_ENB); bp 479 drivers/net/ethernet/dnet.c dnet_writel(bp, int_enable, INTR_ENB); bp 480 drivers/net/ethernet/dnet.c __napi_schedule(&bp->napi); bp 488 drivers/net/ethernet/dnet.c spin_unlock_irqrestore(&bp->lock, flags); bp 509 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 515 drivers/net/ethernet/dnet.c tx_status = dnet_readl(bp, TX_STATUS); bp 524 drivers/net/ethernet/dnet.c spin_lock_irqsave(&bp->lock, flags); bp 526 drivers/net/ethernet/dnet.c tx_status = dnet_readl(bp, TX_STATUS); bp 535 drivers/net/ethernet/dnet.c if (wrsz < (DNET_FIFO_SIZE - dnet_readl(bp, TX_FIFO_WCNT))) { bp 537 drivers/net/ethernet/dnet.c dnet_writel(bp, *bufp++, TX_DATA_FIFO); bp 543 drivers/net/ethernet/dnet.c dnet_writel(bp, tx_cmd, TX_LEN_FIFO); bp 546 drivers/net/ethernet/dnet.c if (dnet_readl(bp, TX_FIFO_WCNT) > DNET_FIFO_TX_DATA_AF_TH) { bp 548 drivers/net/ethernet/dnet.c tx_status = dnet_readl(bp, INTR_SRC); bp 549 drivers/net/ethernet/dnet.c irq_enable = dnet_readl(bp, INTR_ENB); bp 551 drivers/net/ethernet/dnet.c dnet_writel(bp, irq_enable, INTR_ENB); bp 559 drivers/net/ethernet/dnet.c spin_unlock_irqrestore(&bp->lock, flags); bp 564 drivers/net/ethernet/dnet.c static void dnet_reset_hw(struct dnet *bp) bp 567 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_MODE_REG, DNET_INTERNAL_MODE_FCEN); bp 573 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_FIFO_RX_CMD_AF_TH, RX_FIFO_TH); bp 578 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_FIFO_TX_DATA_AE_TH, TX_FIFO_TH); bp 581 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_SYS_CTL_RXFIFOFLUSH | DNET_SYS_CTL_TXFIFOFLUSH, bp 584 drivers/net/ethernet/dnet.c dnet_writel(bp, 0, SYS_CTL); bp 587 drivers/net/ethernet/dnet.c static void dnet_init_hw(struct dnet *bp) bp 591 drivers/net/ethernet/dnet.c dnet_reset_hw(bp); bp 592 drivers/net/ethernet/dnet.c __dnet_set_hwaddr(bp); bp 594 drivers/net/ethernet/dnet.c config = dnet_readw_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG); bp 596 drivers/net/ethernet/dnet.c if (bp->dev->flags & IFF_PROMISC) bp 599 drivers/net/ethernet/dnet.c if (!(bp->dev->flags & IFF_BROADCAST)) bp 608 drivers/net/ethernet/dnet.c dnet_writew_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG, config); bp 611 drivers/net/ethernet/dnet.c config = dnet_readl(bp, INTR_SRC); bp 614 drivers/net/ethernet/dnet.c dnet_writel(bp, DNET_INTR_ENB_GLOBAL_ENABLE | DNET_INTR_ENB_RX_SUMMARY | bp 623 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 629 drivers/net/ethernet/dnet.c napi_enable(&bp->napi); bp 630 drivers/net/ethernet/dnet.c dnet_init_hw(bp); bp 644 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 647 drivers/net/ethernet/dnet.c napi_disable(&bp->napi); bp 652 drivers/net/ethernet/dnet.c dnet_reset_hw(bp); bp 694 drivers/net/ethernet/dnet.c struct dnet *bp = netdev_priv(dev); bp 696 drivers/net/ethernet/dnet.c struct dnet_stats *hwstat = &bp->hw_stats; bp 699 drivers/net/ethernet/dnet.c dnet_update_stats(bp); bp 771 drivers/net/ethernet/dnet.c struct dnet *bp; bp 778 drivers/net/ethernet/dnet.c dev = alloc_etherdev(sizeof(*bp)); bp 785 drivers/net/ethernet/dnet.c bp = netdev_priv(dev); bp 786 drivers/net/ethernet/dnet.c bp->dev = dev; bp 791 drivers/net/ethernet/dnet.c spin_lock_init(&bp->lock); bp 794 drivers/net/ethernet/dnet.c bp->regs = devm_ioremap_resource(&pdev->dev, res); bp 795 drivers/net/ethernet/dnet.c if (IS_ERR(bp->regs)) { bp 796 drivers/net/ethernet/dnet.c err = PTR_ERR(bp->regs); bp 809 drivers/net/ethernet/dnet.c netif_napi_add(dev, &bp->napi, dnet_poll, 64); bp 812 drivers/net/ethernet/dnet.c dev->base_addr = (unsigned long)bp->regs; bp 814 drivers/net/ethernet/dnet.c bp->capabilities = dnet_readl(bp, VERCAPS) & DNET_CAPS_MASK; bp 816 drivers/net/ethernet/dnet.c dnet_get_hwaddr(bp); bp 821 drivers/net/ethernet/dnet.c __dnet_set_hwaddr(bp); bp 837 drivers/net/ethernet/dnet.c err = dnet_mii_init(bp); bp 842 drivers/net/ethernet/dnet.c bp->regs, (unsigned int)res->start, dev->irq, dev->dev_addr); bp 844 drivers/net/ethernet/dnet.c (bp->capabilities & DNET_HAS_MDIO) ? "" : "no ", bp 845 drivers/net/ethernet/dnet.c (bp->capabilities & DNET_HAS_IRQ) ? "" : "no ", bp 846 drivers/net/ethernet/dnet.c (bp->capabilities & DNET_HAS_GIGABIT) ? "" : "no ", bp 847 drivers/net/ethernet/dnet.c (bp->capabilities & DNET_HAS_DMA) ? "" : "no "); bp 866 drivers/net/ethernet/dnet.c struct dnet *bp; bp 871 drivers/net/ethernet/dnet.c bp = netdev_priv(dev); bp 874 drivers/net/ethernet/dnet.c mdiobus_unregister(bp->mii_bus); bp 875 drivers/net/ethernet/dnet.c mdiobus_free(bp->mii_bus); bp 546 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c static void dpaa_bp_drain(struct dpaa_bp *bp) bp 555 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c ret = bman_acquire(bp->pool, bmb, num); bp 570 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (bp->free_buf_cb) bp 572 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c bp->free_buf_cb(bp, &bmb[i]); bp 578 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c struct dpaa_bp *bp = dpaa_bpid2pool(dpaa_bp->bpid); bp 584 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (!bp) bp 587 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (!refcount_dec_and_test(&bp->refs)) bp 590 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c if (bp->free_buf_cb) bp 591 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c dpaa_bp_drain(bp); bp 593 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c dpaa_bp_array[bp->bpid] = NULL; bp 594 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c bman_free_pool(bp->pool); bp 2674 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c static inline void dpaa_bp_free_pf(const struct dpaa_bp *bp, bp 2679 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c dma_unmap_single(bp->dev, addr, bp->size, DMA_FROM_DEVICE); bp 772 drivers/net/ethernet/freescale/fman/fman_port.c const struct fman_port_bpools *bp) bp 792 drivers/net/ethernet/freescale/fman/fman_port.c for (i = 0; (i < (bp->count - 1) && bp 794 drivers/net/ethernet/freescale/fman/fman_port.c if (bp->bpool[i].size > bp->bpool[i + 1].size) bp 800 drivers/net/ethernet/freescale/fman/fman_port.c for (i = 0; i < bp->count; i++) { bp 802 drivers/net/ethernet/freescale/fman/fman_port.c tmp |= ((u32)bp->bpool[i].bpid << bp 806 drivers/net/ethernet/freescale/fman/fman_port.c if (bp->counters_enable) bp 809 drivers/net/ethernet/freescale/fman/fman_port.c if (bp->bpool[i].is_backup) bp 812 drivers/net/ethernet/freescale/fman/fman_port.c tmp |= (u32)bp->bpool[i].size; bp 819 drivers/net/ethernet/freescale/fman/fman_port.c for (i = bp->count; i < max_bp_num; i++) bp 825 drivers/net/ethernet/freescale/fman/fman_port.c if (bp->bpool[i].grp_bp_depleted) { bp 830 drivers/net/ethernet/freescale/fman/fman_port.c if (bp->bpool[i].single_bp_depleted) bp 835 drivers/net/ethernet/freescale/fman/fman_port.c tmp |= ((u32)bp->grp_bp_depleted_num - 1) << bp 72 drivers/net/ethernet/intel/i40e/i40e_hmc.c sd_entry->u.bp.addr = mem; bp 73 drivers/net/ethernet/intel/i40e/i40e_hmc.c sd_entry->u.bp.sd_pd_index = sd_index; bp 83 drivers/net/ethernet/intel/i40e/i40e_hmc.c I40E_INC_BP_REFCNT(&sd_entry->u.bp); bp 152 drivers/net/ethernet/intel/i40e/i40e_hmc.c pd_entry->bp.addr = *page; bp 153 drivers/net/ethernet/intel/i40e/i40e_hmc.c pd_entry->bp.sd_pd_index = pd_index; bp 154 drivers/net/ethernet/intel/i40e/i40e_hmc.c pd_entry->bp.entry_type = I40E_SD_TYPE_PAGED; bp 168 drivers/net/ethernet/intel/i40e/i40e_hmc.c I40E_INC_BP_REFCNT(&pd_entry->bp); bp 216 drivers/net/ethernet/intel/i40e/i40e_hmc.c I40E_DEC_BP_REFCNT(&pd_entry->bp); bp 217 drivers/net/ethernet/intel/i40e/i40e_hmc.c if (pd_entry->bp.ref_cnt) bp 230 drivers/net/ethernet/intel/i40e/i40e_hmc.c ret_code = i40e_free_dma_mem(hw, &pd_entry->bp.addr); bp 252 drivers/net/ethernet/intel/i40e/i40e_hmc.c I40E_DEC_BP_REFCNT(&sd_entry->u.bp); bp 253 drivers/net/ethernet/intel/i40e/i40e_hmc.c if (sd_entry->u.bp.ref_cnt) { bp 285 drivers/net/ethernet/intel/i40e/i40e_hmc.c return i40e_free_dma_mem(hw, &sd_entry->u.bp.addr); bp 40 drivers/net/ethernet/intel/i40e/i40e_hmc.h struct i40e_hmc_bp bp; bp 61 drivers/net/ethernet/intel/i40e/i40e_hmc.h struct i40e_hmc_bp bp; bp 86 drivers/net/ethernet/intel/i40e/i40e_hmc.h #define I40E_INC_BP_REFCNT(bp) ((bp)->ref_cnt++) bp 90 drivers/net/ethernet/intel/i40e/i40e_hmc.h #define I40E_DEC_BP_REFCNT(bp) ((bp)->ref_cnt--) bp 392 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c I40E_SET_PF_SD_ENTRY(hw, sd_entry->u.bp.addr.pa, bp 1030 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c *object_base = (u8 *)pd_entry->bp.addr.va + obj_offset_in_pd; bp 1034 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c *object_base = (u8 *)sd_entry->u.bp.addr.va + obj_offset_in_sd; bp 3684 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c } *bp = buffer; bp 3710 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c bp->u32arr[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); bp 3711 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c le32_to_cpus(&bp->u32arr[bi]); bp 3715 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c buf_len = bp->hdr.buf_len; bp 3730 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c bp->u32arr[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); bp 3731 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c le32_to_cpus(&bp->u32arr[bi]); bp 195 drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h u64 bp : 8; bp 201 drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h u64 bp : 8; bp 98 drivers/net/ethernet/sun/sunbmac.c static void qec_init(struct bigmac *bp) bp 100 drivers/net/ethernet/sun/sunbmac.c struct platform_device *qec_op = bp->qec_op; bp 101 drivers/net/ethernet/sun/sunbmac.c void __iomem *gregs = bp->gregs; bp 102 drivers/net/ethernet/sun/sunbmac.c u8 bsizes = bp->bigmac_bursts; bp 165 drivers/net/ethernet/sun/sunbmac.c static void bigmac_stop(struct bigmac *bp) bp 167 drivers/net/ethernet/sun/sunbmac.c bigmac_tx_reset(bp->bregs); bp 168 drivers/net/ethernet/sun/sunbmac.c bigmac_rx_reset(bp->bregs); bp 171 drivers/net/ethernet/sun/sunbmac.c static void bigmac_get_counters(struct bigmac *bp, void __iomem *bregs) bp 173 drivers/net/ethernet/sun/sunbmac.c struct net_device_stats *stats = &bp->dev->stats; bp 193 drivers/net/ethernet/sun/sunbmac.c static void bigmac_clean_rings(struct bigmac *bp) bp 198 drivers/net/ethernet/sun/sunbmac.c if (bp->rx_skbs[i] != NULL) { bp 199 drivers/net/ethernet/sun/sunbmac.c dev_kfree_skb_any(bp->rx_skbs[i]); bp 200 drivers/net/ethernet/sun/sunbmac.c bp->rx_skbs[i] = NULL; bp 205 drivers/net/ethernet/sun/sunbmac.c if (bp->tx_skbs[i] != NULL) { bp 206 drivers/net/ethernet/sun/sunbmac.c dev_kfree_skb_any(bp->tx_skbs[i]); bp 207 drivers/net/ethernet/sun/sunbmac.c bp->tx_skbs[i] = NULL; bp 212 drivers/net/ethernet/sun/sunbmac.c static void bigmac_init_rings(struct bigmac *bp, int from_irq) bp 214 drivers/net/ethernet/sun/sunbmac.c struct bmac_init_block *bb = bp->bmac_block; bp 221 drivers/net/ethernet/sun/sunbmac.c bp->rx_new = bp->rx_old = bp->tx_new = bp->tx_old = 0; bp 224 drivers/net/ethernet/sun/sunbmac.c bigmac_clean_rings(bp); bp 234 drivers/net/ethernet/sun/sunbmac.c bp->rx_skbs[i] = skb; bp 241 drivers/net/ethernet/sun/sunbmac.c dma_map_single(&bp->bigmac_op->dev, bp 268 drivers/net/ethernet/sun/sunbmac.c static void write_tcvr_bit(struct bigmac *bp, void __iomem *tregs, int bit) bp 270 drivers/net/ethernet/sun/sunbmac.c if (bp->tcvr_type == internal) { bp 278 drivers/net/ethernet/sun/sunbmac.c } else if (bp->tcvr_type == external) { bp 291 drivers/net/ethernet/sun/sunbmac.c static int read_tcvr_bit(struct bigmac *bp, void __iomem *tregs) bp 295 drivers/net/ethernet/sun/sunbmac.c if (bp->tcvr_type == internal) { bp 302 drivers/net/ethernet/sun/sunbmac.c } else if (bp->tcvr_type == external) { bp 314 drivers/net/ethernet/sun/sunbmac.c static int read_tcvr_bit2(struct bigmac *bp, void __iomem *tregs) bp 318 drivers/net/ethernet/sun/sunbmac.c if (bp->tcvr_type == internal) { bp 324 drivers/net/ethernet/sun/sunbmac.c } else if (bp->tcvr_type == external) { bp 336 drivers/net/ethernet/sun/sunbmac.c static void put_tcvr_byte(struct bigmac *bp, bp 343 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, ((byte >> shift) & 1)); bp 348 drivers/net/ethernet/sun/sunbmac.c static void bigmac_tcvr_write(struct bigmac *bp, void __iomem *tregs, bp 355 drivers/net/ethernet/sun/sunbmac.c switch(bp->tcvr_type) { bp 366 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 0); bp 367 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 1); bp 368 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 0); bp 369 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 1); bp 371 drivers/net/ethernet/sun/sunbmac.c put_tcvr_byte(bp, tregs, bp 372 drivers/net/ethernet/sun/sunbmac.c ((bp->tcvr_type == internal) ? bp 375 drivers/net/ethernet/sun/sunbmac.c put_tcvr_byte(bp, tregs, reg); bp 377 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 1); bp 378 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 0); bp 382 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, (val >> shift) & 1); bp 387 drivers/net/ethernet/sun/sunbmac.c static unsigned short bigmac_tcvr_read(struct bigmac *bp, bp 394 drivers/net/ethernet/sun/sunbmac.c switch(bp->tcvr_type) { bp 405 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 0); bp 406 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 1); bp 407 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 1); bp 408 drivers/net/ethernet/sun/sunbmac.c write_tcvr_bit(bp, tregs, 0); bp 410 drivers/net/ethernet/sun/sunbmac.c put_tcvr_byte(bp, tregs, bp 411 drivers/net/ethernet/sun/sunbmac.c ((bp->tcvr_type == internal) ? bp 414 drivers/net/ethernet/sun/sunbmac.c put_tcvr_byte(bp, tregs, reg); bp 416 drivers/net/ethernet/sun/sunbmac.c if (bp->tcvr_type == external) { bp 419 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit2(bp, tregs); bp 420 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit2(bp, tregs); bp 425 drivers/net/ethernet/sun/sunbmac.c tmp = read_tcvr_bit2(bp, tregs); bp 430 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit2(bp, tregs); bp 431 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit2(bp, tregs); bp 432 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit2(bp, tregs); bp 436 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit(bp, tregs); bp 437 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit(bp, tregs); bp 442 drivers/net/ethernet/sun/sunbmac.c tmp = read_tcvr_bit(bp, tregs); bp 447 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit(bp, tregs); bp 448 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit(bp, tregs); bp 449 drivers/net/ethernet/sun/sunbmac.c (void) read_tcvr_bit(bp, tregs); bp 454 drivers/net/ethernet/sun/sunbmac.c static void bigmac_tcvr_init(struct bigmac *bp) bp 456 drivers/net/ethernet/sun/sunbmac.c void __iomem *tregs = bp->tregs; bp 473 drivers/net/ethernet/sun/sunbmac.c bp->tcvr_type = external; bp 478 drivers/net/ethernet/sun/sunbmac.c bp->tcvr_type = internal; bp 494 drivers/net/ethernet/sun/sunbmac.c static int try_next_permutation(struct bigmac *bp, void __iomem *tregs) bp 496 drivers/net/ethernet/sun/sunbmac.c if (bp->sw_bmcr & BMCR_SPEED100) { bp 500 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = (BMCR_ISOLATE | BMCR_PDOWN | BMCR_LOOPBACK); bp 501 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 502 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = (BMCR_RESET); bp 503 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 507 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 508 drivers/net/ethernet/sun/sunbmac.c if ((bp->sw_bmcr & BMCR_RESET) == 0) bp 513 drivers/net/ethernet/sun/sunbmac.c printk(KERN_ERR "%s: PHY reset failed.\n", bp->dev->name); bp 515 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 518 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr &= ~(BMCR_SPEED100); bp 519 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 529 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = from_timer(bp, t, bigmac_timer); bp 530 drivers/net/ethernet/sun/sunbmac.c void __iomem *tregs = bp->tregs; bp 533 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks++; bp 534 drivers/net/ethernet/sun/sunbmac.c if (bp->timer_state == ltrywait) { bp 535 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmsr = bigmac_tcvr_read(bp, tregs, MII_BMSR); bp 536 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 537 drivers/net/ethernet/sun/sunbmac.c if (bp->sw_bmsr & BMSR_LSTATUS) { bp 539 drivers/net/ethernet/sun/sunbmac.c bp->dev->name, bp 540 drivers/net/ethernet/sun/sunbmac.c (bp->sw_bmcr & BMCR_SPEED100) ? bp 542 drivers/net/ethernet/sun/sunbmac.c bp->timer_state = asleep; bp 545 drivers/net/ethernet/sun/sunbmac.c if (bp->timer_ticks >= 4) { bp 548 drivers/net/ethernet/sun/sunbmac.c ret = try_next_permutation(bp, tregs); bp 551 drivers/net/ethernet/sun/sunbmac.c bp->dev->name); bp 552 drivers/net/ethernet/sun/sunbmac.c ret = bigmac_init_hw(bp, 0); bp 555 drivers/net/ethernet/sun/sunbmac.c "BigMAC.\n", bp->dev->name); bp 559 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks = 0; bp 568 drivers/net/ethernet/sun/sunbmac.c bp->dev->name); bp 570 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks = 0; bp 571 drivers/net/ethernet/sun/sunbmac.c bp->timer_state = asleep; /* foo on you */ bp 575 drivers/net/ethernet/sun/sunbmac.c bp->bigmac_timer.expires = jiffies + ((12 * HZ)/10); /* 1.2 sec. */ bp 576 drivers/net/ethernet/sun/sunbmac.c add_timer(&bp->bigmac_timer); bp 583 drivers/net/ethernet/sun/sunbmac.c static void bigmac_begin_auto_negotiation(struct bigmac *bp) bp 585 drivers/net/ethernet/sun/sunbmac.c void __iomem *tregs = bp->tregs; bp 589 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmsr = bigmac_tcvr_read(bp, tregs, MII_BMSR); bp 590 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 593 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = (BMCR_ISOLATE | BMCR_PDOWN | BMCR_LOOPBACK); bp 594 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 595 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = (BMCR_RESET); bp 596 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 600 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 601 drivers/net/ethernet/sun/sunbmac.c if ((bp->sw_bmcr & BMCR_RESET) == 0) bp 606 drivers/net/ethernet/sun/sunbmac.c printk(KERN_ERR "%s: PHY reset failed.\n", bp->dev->name); bp 608 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr = bigmac_tcvr_read(bp, tregs, MII_BMCR); bp 611 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmcr |= BMCR_SPEED100; bp 612 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_write(bp, tregs, MII_BMCR, bp->sw_bmcr); bp 614 drivers/net/ethernet/sun/sunbmac.c bp->timer_state = ltrywait; bp 615 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks = 0; bp 616 drivers/net/ethernet/sun/sunbmac.c bp->bigmac_timer.expires = jiffies + (12 * HZ) / 10; bp 617 drivers/net/ethernet/sun/sunbmac.c add_timer(&bp->bigmac_timer); bp 620 drivers/net/ethernet/sun/sunbmac.c static int bigmac_init_hw(struct bigmac *bp, int from_irq) bp 622 drivers/net/ethernet/sun/sunbmac.c void __iomem *gregs = bp->gregs; bp 623 drivers/net/ethernet/sun/sunbmac.c void __iomem *cregs = bp->creg; bp 624 drivers/net/ethernet/sun/sunbmac.c void __iomem *bregs = bp->bregs; bp 625 drivers/net/ethernet/sun/sunbmac.c __u32 bblk_dvma = (__u32)bp->bblock_dvma; bp 626 drivers/net/ethernet/sun/sunbmac.c unsigned char *e = &bp->dev->dev_addr[0]; bp 629 drivers/net/ethernet/sun/sunbmac.c bigmac_get_counters(bp, bregs); bp 635 drivers/net/ethernet/sun/sunbmac.c qec_init(bp); bp 638 drivers/net/ethernet/sun/sunbmac.c bigmac_init_rings(bp, from_irq); bp 641 drivers/net/ethernet/sun/sunbmac.c bigmac_tcvr_init(bp); bp 644 drivers/net/ethernet/sun/sunbmac.c bigmac_stop(bp); bp 710 drivers/net/ethernet/sun/sunbmac.c bigmac_begin_auto_negotiation(bp); bp 717 drivers/net/ethernet/sun/sunbmac.c static void bigmac_is_medium_rare(struct bigmac *bp, u32 qec_status, u32 bmac_status) bp 752 drivers/net/ethernet/sun/sunbmac.c bigmac_init_hw(bp, 1); bp 756 drivers/net/ethernet/sun/sunbmac.c static void bigmac_tx(struct bigmac *bp) bp 758 drivers/net/ethernet/sun/sunbmac.c struct be_txd *txbase = &bp->bmac_block->be_txd[0]; bp 759 drivers/net/ethernet/sun/sunbmac.c struct net_device *dev = bp->dev; bp 762 drivers/net/ethernet/sun/sunbmac.c spin_lock(&bp->lock); bp 764 drivers/net/ethernet/sun/sunbmac.c elem = bp->tx_old; bp 766 drivers/net/ethernet/sun/sunbmac.c while (elem != bp->tx_new) { bp 775 drivers/net/ethernet/sun/sunbmac.c skb = bp->tx_skbs[elem]; bp 778 drivers/net/ethernet/sun/sunbmac.c dma_unmap_single(&bp->bigmac_op->dev, bp 783 drivers/net/ethernet/sun/sunbmac.c bp->tx_skbs[elem] = NULL; bp 789 drivers/net/ethernet/sun/sunbmac.c bp->tx_old = elem; bp 792 drivers/net/ethernet/sun/sunbmac.c TX_BUFFS_AVAIL(bp) > 0) bp 793 drivers/net/ethernet/sun/sunbmac.c netif_wake_queue(bp->dev); bp 795 drivers/net/ethernet/sun/sunbmac.c spin_unlock(&bp->lock); bp 799 drivers/net/ethernet/sun/sunbmac.c static void bigmac_rx(struct bigmac *bp) bp 801 drivers/net/ethernet/sun/sunbmac.c struct be_rxd *rxbase = &bp->bmac_block->be_rxd[0]; bp 803 drivers/net/ethernet/sun/sunbmac.c int elem = bp->rx_new, drops = 0; bp 813 drivers/net/ethernet/sun/sunbmac.c bp->dev->stats.rx_errors++; bp 814 drivers/net/ethernet/sun/sunbmac.c bp->dev->stats.rx_length_errors++; bp 818 drivers/net/ethernet/sun/sunbmac.c bp->dev->stats.rx_dropped++; bp 823 drivers/net/ethernet/sun/sunbmac.c skb = bp->rx_skbs[elem]; bp 833 drivers/net/ethernet/sun/sunbmac.c dma_unmap_single(&bp->bigmac_op->dev, bp 837 drivers/net/ethernet/sun/sunbmac.c bp->rx_skbs[elem] = new_skb; bp 841 drivers/net/ethernet/sun/sunbmac.c dma_map_single(&bp->bigmac_op->dev, bp 851 drivers/net/ethernet/sun/sunbmac.c struct sk_buff *copy_skb = netdev_alloc_skb(bp->dev, len + 2); bp 859 drivers/net/ethernet/sun/sunbmac.c dma_sync_single_for_cpu(&bp->bigmac_op->dev, bp 863 drivers/net/ethernet/sun/sunbmac.c dma_sync_single_for_device(&bp->bigmac_op->dev, bp 875 drivers/net/ethernet/sun/sunbmac.c skb->protocol = eth_type_trans(skb, bp->dev); bp 877 drivers/net/ethernet/sun/sunbmac.c bp->dev->stats.rx_packets++; bp 878 drivers/net/ethernet/sun/sunbmac.c bp->dev->stats.rx_bytes += len; bp 883 drivers/net/ethernet/sun/sunbmac.c bp->rx_new = elem; bp 885 drivers/net/ethernet/sun/sunbmac.c printk(KERN_NOTICE "%s: Memory squeeze, deferring packet.\n", bp->dev->name); bp 890 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = (struct bigmac *) dev_id; bp 896 drivers/net/ethernet/sun/sunbmac.c bmac_status = sbus_readl(bp->creg + CREG_STAT); bp 897 drivers/net/ethernet/sun/sunbmac.c qec_status = sbus_readl(bp->gregs + GLOB_STAT); bp 902 drivers/net/ethernet/sun/sunbmac.c bigmac_is_medium_rare(bp, qec_status, bmac_status); bp 905 drivers/net/ethernet/sun/sunbmac.c bigmac_tx(bp); bp 908 drivers/net/ethernet/sun/sunbmac.c bigmac_rx(bp); bp 915 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 918 drivers/net/ethernet/sun/sunbmac.c ret = request_irq(dev->irq, bigmac_interrupt, IRQF_SHARED, dev->name, bp); bp 923 drivers/net/ethernet/sun/sunbmac.c timer_setup(&bp->bigmac_timer, bigmac_timer, 0); bp 924 drivers/net/ethernet/sun/sunbmac.c ret = bigmac_init_hw(bp, 0); bp 926 drivers/net/ethernet/sun/sunbmac.c free_irq(dev->irq, bp); bp 932 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 934 drivers/net/ethernet/sun/sunbmac.c del_timer(&bp->bigmac_timer); bp 935 drivers/net/ethernet/sun/sunbmac.c bp->timer_state = asleep; bp 936 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks = 0; bp 938 drivers/net/ethernet/sun/sunbmac.c bigmac_stop(bp); bp 939 drivers/net/ethernet/sun/sunbmac.c bigmac_clean_rings(bp); bp 940 drivers/net/ethernet/sun/sunbmac.c free_irq(dev->irq, bp); bp 946 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 948 drivers/net/ethernet/sun/sunbmac.c bigmac_init_hw(bp, 0); bp 956 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 961 drivers/net/ethernet/sun/sunbmac.c mapping = dma_map_single(&bp->bigmac_op->dev, skb->data, bp 965 drivers/net/ethernet/sun/sunbmac.c spin_lock_irq(&bp->lock); bp 966 drivers/net/ethernet/sun/sunbmac.c entry = bp->tx_new; bp 968 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block->be_txd[entry].tx_flags = TXD_UPDATE; bp 969 drivers/net/ethernet/sun/sunbmac.c bp->tx_skbs[entry] = skb; bp 970 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block->be_txd[entry].tx_addr = mapping; bp 971 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block->be_txd[entry].tx_flags = bp 973 drivers/net/ethernet/sun/sunbmac.c bp->tx_new = NEXT_TX(entry); bp 974 drivers/net/ethernet/sun/sunbmac.c if (TX_BUFFS_AVAIL(bp) <= 0) bp 976 drivers/net/ethernet/sun/sunbmac.c spin_unlock_irq(&bp->lock); bp 979 drivers/net/ethernet/sun/sunbmac.c sbus_writel(CREG_CTRL_TWAKEUP, bp->creg + CREG_CTRL); bp 987 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 989 drivers/net/ethernet/sun/sunbmac.c bigmac_get_counters(bp, bp->bregs); bp 995 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 996 drivers/net/ethernet/sun/sunbmac.c void __iomem *bregs = bp->bregs; bp 1047 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = netdev_priv(dev); bp 1049 drivers/net/ethernet/sun/sunbmac.c spin_lock_irq(&bp->lock); bp 1050 drivers/net/ethernet/sun/sunbmac.c bp->sw_bmsr = bigmac_tcvr_read(bp, bp->tregs, MII_BMSR); bp 1051 drivers/net/ethernet/sun/sunbmac.c spin_unlock_irq(&bp->lock); bp 1053 drivers/net/ethernet/sun/sunbmac.c return (bp->sw_bmsr & BMSR_LSTATUS); bp 1078 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp; bp 1093 drivers/net/ethernet/sun/sunbmac.c bp = netdev_priv(dev); bp 1094 drivers/net/ethernet/sun/sunbmac.c bp->qec_op = qec_op; bp 1095 drivers/net/ethernet/sun/sunbmac.c bp->bigmac_op = op; bp 1099 drivers/net/ethernet/sun/sunbmac.c spin_lock_init(&bp->lock); bp 1102 drivers/net/ethernet/sun/sunbmac.c bp->gregs = of_ioremap(&qec_op->resource[0], 0, bp 1104 drivers/net/ethernet/sun/sunbmac.c if (!bp->gregs) { bp 1110 drivers/net/ethernet/sun/sunbmac.c if ((sbus_readl(bp->gregs + GLOB_CTRL) & 0xf0000000) != GLOB_CTRL_BMODE) { bp 1116 drivers/net/ethernet/sun/sunbmac.c if (qec_global_reset(bp->gregs)) bp 1129 drivers/net/ethernet/sun/sunbmac.c bp->bigmac_bursts = bsizes; bp 1132 drivers/net/ethernet/sun/sunbmac.c qec_init(bp); bp 1135 drivers/net/ethernet/sun/sunbmac.c bp->creg = of_ioremap(&op->resource[0], 0, bp 1137 drivers/net/ethernet/sun/sunbmac.c if (!bp->creg) { bp 1143 drivers/net/ethernet/sun/sunbmac.c bp->bregs = of_ioremap(&op->resource[1], 0, bp 1145 drivers/net/ethernet/sun/sunbmac.c if (!bp->bregs) { bp 1153 drivers/net/ethernet/sun/sunbmac.c bp->tregs = of_ioremap(&op->resource[2], 0, bp 1155 drivers/net/ethernet/sun/sunbmac.c if (!bp->tregs) { bp 1161 drivers/net/ethernet/sun/sunbmac.c bigmac_stop(bp); bp 1164 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block = dma_alloc_coherent(&bp->bigmac_op->dev, bp 1166 drivers/net/ethernet/sun/sunbmac.c &bp->bblock_dvma, GFP_ATOMIC); bp 1167 drivers/net/ethernet/sun/sunbmac.c if (bp->bmac_block == NULL || bp->bblock_dvma == 0) bp 1171 drivers/net/ethernet/sun/sunbmac.c bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, bp 1175 drivers/net/ethernet/sun/sunbmac.c timer_setup(&bp->bigmac_timer, bigmac_timer, 0); bp 1176 drivers/net/ethernet/sun/sunbmac.c bp->timer_state = asleep; bp 1177 drivers/net/ethernet/sun/sunbmac.c bp->timer_ticks = 0; bp 1180 drivers/net/ethernet/sun/sunbmac.c bp->dev = dev; bp 1188 drivers/net/ethernet/sun/sunbmac.c dev->irq = bp->bigmac_op->archdata.irqs[0]; bp 1196 drivers/net/ethernet/sun/sunbmac.c dev_set_drvdata(&bp->bigmac_op->dev, bp); bp 1206 drivers/net/ethernet/sun/sunbmac.c if (bp->gregs) bp 1207 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&qec_op->resource[0], bp->gregs, GLOB_REG_SIZE); bp 1208 drivers/net/ethernet/sun/sunbmac.c if (bp->creg) bp 1209 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[0], bp->creg, CREG_REG_SIZE); bp 1210 drivers/net/ethernet/sun/sunbmac.c if (bp->bregs) bp 1211 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[1], bp->bregs, BMAC_REG_SIZE); bp 1212 drivers/net/ethernet/sun/sunbmac.c if (bp->tregs) bp 1213 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[2], bp->tregs, TCVR_REG_SIZE); bp 1215 drivers/net/ethernet/sun/sunbmac.c if (bp->bmac_block) bp 1216 drivers/net/ethernet/sun/sunbmac.c dma_free_coherent(&bp->bigmac_op->dev, bp 1218 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block, bp 1219 drivers/net/ethernet/sun/sunbmac.c bp->bblock_dvma); bp 1241 drivers/net/ethernet/sun/sunbmac.c struct bigmac *bp = platform_get_drvdata(op); bp 1243 drivers/net/ethernet/sun/sunbmac.c struct net_device *net_dev = bp->dev; bp 1250 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&qec_op->resource[0], bp->gregs, GLOB_REG_SIZE); bp 1251 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[0], bp->creg, CREG_REG_SIZE); bp 1252 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[1], bp->bregs, BMAC_REG_SIZE); bp 1253 drivers/net/ethernet/sun/sunbmac.c of_iounmap(&op->resource[2], bp->tregs, TCVR_REG_SIZE); bp 1256 drivers/net/ethernet/sun/sunbmac.c bp->bmac_block, bp 1257 drivers/net/ethernet/sun/sunbmac.c bp->bblock_dvma); bp 259 drivers/net/ethernet/sun/sunbmac.h #define TX_BUFFS_AVAIL(bp) \ bp 260 drivers/net/ethernet/sun/sunbmac.h (((bp)->tx_old <= (bp)->tx_new) ? \ bp 261 drivers/net/ethernet/sun/sunbmac.h (bp)->tx_old + (TX_RING_SIZE - 1) - (bp)->tx_new : \ bp 262 drivers/net/ethernet/sun/sunbmac.h (bp)->tx_old - (bp)->tx_new - 1) bp 266 drivers/net/fddi/defxx.c static void dfx_bus_config_check(DFX_board_t *bp); bp 271 drivers/net/fddi/defxx.c static int dfx_adap_init(DFX_board_t *bp, int get_buffers); bp 276 drivers/net/fddi/defxx.c static void dfx_int_pr_halt_id(DFX_board_t *bp); bp 277 drivers/net/fddi/defxx.c static void dfx_int_type_0_process(DFX_board_t *bp); bp 284 drivers/net/fddi/defxx.c static int dfx_ctl_update_cam(DFX_board_t *bp); bp 285 drivers/net/fddi/defxx.c static int dfx_ctl_update_filters(DFX_board_t *bp); bp 287 drivers/net/fddi/defxx.c static int dfx_hw_dma_cmd_req(DFX_board_t *bp); bp 288 drivers/net/fddi/defxx.c static int dfx_hw_port_ctrl_req(DFX_board_t *bp, PI_UINT32 command, PI_UINT32 data_a, PI_UINT32 data_b, PI_UINT32 *host_data); bp 289 drivers/net/fddi/defxx.c static void dfx_hw_adap_reset(DFX_board_t *bp, PI_UINT32 type); bp 290 drivers/net/fddi/defxx.c static int dfx_hw_adap_state_rd(DFX_board_t *bp); bp 291 drivers/net/fddi/defxx.c static int dfx_hw_dma_uninit(DFX_board_t *bp, PI_UINT32 type); bp 293 drivers/net/fddi/defxx.c static int dfx_rcv_init(DFX_board_t *bp, int get_buffers); bp 294 drivers/net/fddi/defxx.c static void dfx_rcv_queue_process(DFX_board_t *bp); bp 296 drivers/net/fddi/defxx.c static void dfx_rcv_flush(DFX_board_t *bp); bp 298 drivers/net/fddi/defxx.c static inline void dfx_rcv_flush(DFX_board_t *bp) {} bp 303 drivers/net/fddi/defxx.c static int dfx_xmt_done(DFX_board_t *bp); bp 304 drivers/net/fddi/defxx.c static void dfx_xmt_flush(DFX_board_t *bp); bp 363 drivers/net/fddi/defxx.c static inline void dfx_writel(DFX_board_t *bp, int offset, u32 data) bp 365 drivers/net/fddi/defxx.c writel(data, bp->base.mem + offset); bp 369 drivers/net/fddi/defxx.c static inline void dfx_outl(DFX_board_t *bp, int offset, u32 data) bp 371 drivers/net/fddi/defxx.c outl(data, bp->base.port + offset); bp 374 drivers/net/fddi/defxx.c static void dfx_port_write_long(DFX_board_t *bp, int offset, u32 data) bp 376 drivers/net/fddi/defxx.c struct device __maybe_unused *bdev = bp->bus_dev; bp 381 drivers/net/fddi/defxx.c dfx_writel(bp, offset, data); bp 383 drivers/net/fddi/defxx.c dfx_outl(bp, offset, data); bp 387 drivers/net/fddi/defxx.c static inline void dfx_readl(DFX_board_t *bp, int offset, u32 *data) bp 390 drivers/net/fddi/defxx.c *data = readl(bp->base.mem + offset); bp 393 drivers/net/fddi/defxx.c static inline void dfx_inl(DFX_board_t *bp, int offset, u32 *data) bp 395 drivers/net/fddi/defxx.c *data = inl(bp->base.port + offset); bp 398 drivers/net/fddi/defxx.c static void dfx_port_read_long(DFX_board_t *bp, int offset, u32 *data) bp 400 drivers/net/fddi/defxx.c struct device __maybe_unused *bdev = bp->bus_dev; bp 405 drivers/net/fddi/defxx.c dfx_readl(bp, offset, data); bp 407 drivers/net/fddi/defxx.c dfx_inl(bp, offset, data); bp 535 drivers/net/fddi/defxx.c DFX_board_t *bp; /* board pointer */ bp 547 drivers/net/fddi/defxx.c dev = alloc_fddidev(sizeof(*bp)); bp 566 drivers/net/fddi/defxx.c bp = netdev_priv(dev); bp 567 drivers/net/fddi/defxx.c bp->bus_dev = bdev; bp 617 drivers/net/fddi/defxx.c bp->base.mem = ioremap_nocache(bar_start[0], bar_len[0]); bp 618 drivers/net/fddi/defxx.c if (!bp->base.mem) { bp 624 drivers/net/fddi/defxx.c bp->base.port = bar_start[0]; bp 650 drivers/net/fddi/defxx.c (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) + bp 654 drivers/net/fddi/defxx.c if (bp->kmalloced) bp 656 drivers/net/fddi/defxx.c bp->kmalloced, bp->kmalloced_dma); bp 660 drivers/net/fddi/defxx.c iounmap(bp->base.mem); bp 719 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 720 drivers/net/fddi/defxx.c struct device *bdev = bp->bus_dev; bp 730 drivers/net/fddi/defxx.c bp->dev = dev; bp 845 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL, val); bp 879 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 880 drivers/net/fddi/defxx.c struct device *bdev = bp->bus_dev; bp 905 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL, 0); bp 940 drivers/net/fddi/defxx.c static void dfx_bus_config_check(DFX_board_t *bp) bp 942 drivers/net/fddi/defxx.c struct device __maybe_unused *bdev = bp->bus_dev; bp 964 drivers/net/fddi/defxx.c status = dfx_hw_port_ctrl_req(bp, bp 979 drivers/net/fddi/defxx.c switch (bp->burst_size) bp 983 drivers/net/fddi/defxx.c bp->burst_size = PI_PDATA_B_DMA_BURST_SIZE_8; bp 992 drivers/net/fddi/defxx.c bp->full_duplex_enb = PI_SNMP_K_FALSE; bp 1039 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 1040 drivers/net/fddi/defxx.c struct device *bdev = bp->bus_dev; bp 1067 drivers/net/fddi/defxx.c bp->full_duplex_enb = PI_SNMP_K_FALSE; bp 1068 drivers/net/fddi/defxx.c bp->req_ttrt = 8 * 12500; /* 8ms in 80 nanosec units */ bp 1069 drivers/net/fddi/defxx.c bp->burst_size = PI_PDATA_B_DMA_BURST_SIZE_DEF; bp 1070 drivers/net/fddi/defxx.c bp->rcv_bufs_to_post = RCV_BUFS_DEF; bp 1081 drivers/net/fddi/defxx.c dfx_bus_config_check(bp); bp 1085 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_DISABLE_ALL_INTS); bp 1089 drivers/net/fddi/defxx.c (void) dfx_hw_dma_uninit(bp, PI_PDATA_A_RESET_M_SKIP_ST); bp 1093 drivers/net/fddi/defxx.c if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0, bp 1100 drivers/net/fddi/defxx.c memcpy(&bp->factory_mac_addr[0], &le32, sizeof(u32)); bp 1102 drivers/net/fddi/defxx.c if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0, bp 1109 drivers/net/fddi/defxx.c memcpy(&bp->factory_mac_addr[4], &le32, sizeof(u16)); bp 1118 drivers/net/fddi/defxx.c memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN); bp 1138 drivers/net/fddi/defxx.c (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) + bp 1142 drivers/net/fddi/defxx.c bp->kmalloced = top_v = dma_alloc_coherent(bp->bus_dev, alloc_size, bp 1143 drivers/net/fddi/defxx.c &bp->kmalloced_dma, bp 1148 drivers/net/fddi/defxx.c top_p = bp->kmalloced_dma; /* get physical address of buffer */ bp 1167 drivers/net/fddi/defxx.c bp->descr_block_virt = (PI_DESCR_BLOCK *) curr_v; bp 1168 drivers/net/fddi/defxx.c bp->descr_block_phys = curr_p; bp 1174 drivers/net/fddi/defxx.c bp->cmd_req_virt = (PI_DMA_CMD_REQ *) curr_v; bp 1175 drivers/net/fddi/defxx.c bp->cmd_req_phys = curr_p; bp 1181 drivers/net/fddi/defxx.c bp->cmd_rsp_virt = (PI_DMA_CMD_RSP *) curr_v; bp 1182 drivers/net/fddi/defxx.c bp->cmd_rsp_phys = curr_p; bp 1188 drivers/net/fddi/defxx.c bp->rcv_block_virt = curr_v; bp 1189 drivers/net/fddi/defxx.c bp->rcv_block_phys = curr_p; bp 1192 drivers/net/fddi/defxx.c curr_v += (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX); bp 1193 drivers/net/fddi/defxx.c curr_p += (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX); bp 1198 drivers/net/fddi/defxx.c bp->cons_block_virt = (PI_CONSUMER_BLOCK *) curr_v; bp 1199 drivers/net/fddi/defxx.c bp->cons_block_phys = curr_p; bp 1204 drivers/net/fddi/defxx.c print_name, bp->descr_block_virt, &bp->descr_block_phys); bp 1206 drivers/net/fddi/defxx.c print_name, bp->cmd_req_virt, &bp->cmd_req_phys); bp 1208 drivers/net/fddi/defxx.c print_name, bp->cmd_rsp_virt, &bp->cmd_rsp_phys); bp 1210 drivers/net/fddi/defxx.c print_name, bp->rcv_block_virt, &bp->rcv_block_phys); bp 1212 drivers/net/fddi/defxx.c print_name, bp->cons_block_virt, &bp->cons_block_phys); bp 1251 drivers/net/fddi/defxx.c static int dfx_adap_init(DFX_board_t *bp, int get_buffers) bp 1257 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_DISABLE_ALL_INTS); bp 1261 drivers/net/fddi/defxx.c if (dfx_hw_dma_uninit(bp, bp->reset_type) != DFX_K_SUCCESS) bp 1263 drivers/net/fddi/defxx.c printk("%s: Could not uninitialize/reset adapter!\n", bp->dev->name); bp 1272 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_0_STATUS, PI_HOST_INT_K_ACK_ALL_TYPE_0); bp 1281 drivers/net/fddi/defxx.c bp->cmd_req_reg.lword = 0; bp 1282 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.lword = 0; bp 1283 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.lword = 0; bp 1287 drivers/net/fddi/defxx.c memset(bp->cons_block_virt, 0, sizeof(PI_CONSUMER_BLOCK)); bp 1291 drivers/net/fddi/defxx.c if (dfx_hw_port_ctrl_req(bp, bp 1294 drivers/net/fddi/defxx.c bp->burst_size, bp 1297 drivers/net/fddi/defxx.c printk("%s: Could not set adapter burst size!\n", bp->dev->name); bp 1308 drivers/net/fddi/defxx.c if (dfx_hw_port_ctrl_req(bp, bp 1310 drivers/net/fddi/defxx.c bp->cons_block_phys, bp 1314 drivers/net/fddi/defxx.c printk("%s: Could not set consumer block address!\n", bp->dev->name); bp 1328 drivers/net/fddi/defxx.c if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_INIT, bp 1329 drivers/net/fddi/defxx.c (u32)(bp->descr_block_phys | bp 1333 drivers/net/fddi/defxx.c bp->dev->name); bp 1339 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_CHARS_SET; bp 1340 drivers/net/fddi/defxx.c bp->cmd_req_virt->char_set.item[0].item_code = PI_ITEM_K_FLUSH_TIME; bp 1341 drivers/net/fddi/defxx.c bp->cmd_req_virt->char_set.item[0].value = 3; /* 3 seconds */ bp 1342 drivers/net/fddi/defxx.c bp->cmd_req_virt->char_set.item[0].item_index = 0; bp 1343 drivers/net/fddi/defxx.c bp->cmd_req_virt->char_set.item[1].item_code = PI_ITEM_K_EOL; bp 1344 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 1346 drivers/net/fddi/defxx.c printk("%s: DMA command request failed!\n", bp->dev->name); bp 1352 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_SNMP_SET; bp 1353 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[0].item_code = PI_ITEM_K_FDX_ENB_DIS; bp 1354 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[0].value = bp->full_duplex_enb; bp 1355 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[0].item_index = 0; bp 1356 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[1].item_code = PI_ITEM_K_MAC_T_REQ; bp 1357 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[1].value = bp->req_ttrt; bp 1358 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[1].item_index = 0; bp 1359 drivers/net/fddi/defxx.c bp->cmd_req_virt->snmp_set.item[2].item_code = PI_ITEM_K_EOL; bp 1360 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 1362 drivers/net/fddi/defxx.c printk("%s: DMA command request failed!\n", bp->dev->name); bp 1368 drivers/net/fddi/defxx.c if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS) bp 1370 drivers/net/fddi/defxx.c printk("%s: Adapter CAM update failed!\n", bp->dev->name); bp 1376 drivers/net/fddi/defxx.c if (dfx_ctl_update_filters(bp) != DFX_K_SUCCESS) bp 1378 drivers/net/fddi/defxx.c printk("%s: Adapter filters update failed!\n", bp->dev->name); bp 1388 drivers/net/fddi/defxx.c dfx_rcv_flush(bp); bp 1392 drivers/net/fddi/defxx.c if (dfx_rcv_init(bp, get_buffers)) bp 1394 drivers/net/fddi/defxx.c printk("%s: Receive buffer allocation failed\n", bp->dev->name); bp 1396 drivers/net/fddi/defxx.c dfx_rcv_flush(bp); bp 1402 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_START; bp 1403 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 1405 drivers/net/fddi/defxx.c printk("%s: Start command failed\n", bp->dev->name); bp 1407 drivers/net/fddi/defxx.c dfx_rcv_flush(bp); bp 1413 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_ENABLE_DEF_INTS); bp 1450 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 1475 drivers/net/fddi/defxx.c memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN); bp 1479 drivers/net/fddi/defxx.c memset(bp->uc_table, 0, sizeof(bp->uc_table)); bp 1480 drivers/net/fddi/defxx.c memset(bp->mc_table, 0, sizeof(bp->mc_table)); bp 1481 drivers/net/fddi/defxx.c bp->uc_count = 0; bp 1482 drivers/net/fddi/defxx.c bp->mc_count = 0; bp 1486 drivers/net/fddi/defxx.c bp->ind_group_prom = PI_FSTATE_K_BLOCK; bp 1487 drivers/net/fddi/defxx.c bp->group_prom = PI_FSTATE_K_BLOCK; bp 1489 drivers/net/fddi/defxx.c spin_lock_init(&bp->lock); bp 1493 drivers/net/fddi/defxx.c bp->reset_type = PI_PDATA_A_RESET_M_SKIP_ST; /* skip self-test */ bp 1494 drivers/net/fddi/defxx.c if (dfx_adap_init(bp, 1) != DFX_K_SUCCESS) bp 1541 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 1547 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_DISABLE_ALL_INTS); bp 1551 drivers/net/fddi/defxx.c (void) dfx_hw_dma_uninit(bp, PI_PDATA_A_RESET_M_SKIP_ST); bp 1562 drivers/net/fddi/defxx.c dfx_xmt_flush(bp); bp 1575 drivers/net/fddi/defxx.c bp->cmd_req_reg.lword = 0; bp 1576 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.lword = 0; bp 1577 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.lword = 0; bp 1581 drivers/net/fddi/defxx.c memset(bp->cons_block_virt, 0, sizeof(PI_CONSUMER_BLOCK)); bp 1585 drivers/net/fddi/defxx.c dfx_rcv_flush(bp); bp 1626 drivers/net/fddi/defxx.c static void dfx_int_pr_halt_id(DFX_board_t *bp) bp 1633 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_STATUS, &port_status); bp 1641 drivers/net/fddi/defxx.c printk("%s: Halt ID: Selftest Timeout\n", bp->dev->name); bp 1645 drivers/net/fddi/defxx.c printk("%s: Halt ID: Host Bus Parity Error\n", bp->dev->name); bp 1649 drivers/net/fddi/defxx.c printk("%s: Halt ID: Host-Directed Halt\n", bp->dev->name); bp 1653 drivers/net/fddi/defxx.c printk("%s: Halt ID: Adapter Software Fault\n", bp->dev->name); bp 1657 drivers/net/fddi/defxx.c printk("%s: Halt ID: Adapter Hardware Fault\n", bp->dev->name); bp 1661 drivers/net/fddi/defxx.c printk("%s: Halt ID: FDDI Network PC Trace Path Test\n", bp->dev->name); bp 1665 drivers/net/fddi/defxx.c printk("%s: Halt ID: Adapter DMA Error\n", bp->dev->name); bp 1669 drivers/net/fddi/defxx.c printk("%s: Halt ID: Firmware Image CRC Error\n", bp->dev->name); bp 1673 drivers/net/fddi/defxx.c printk("%s: Halt ID: 68000 Bus Exception\n", bp->dev->name); bp 1677 drivers/net/fddi/defxx.c printk("%s: Halt ID: Unknown (code = %X)\n", bp->dev->name, halt_id); bp 1730 drivers/net/fddi/defxx.c static void dfx_int_type_0_process(DFX_board_t *bp) bp 1742 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_TYPE_0_STATUS, &type_0_status); bp 1743 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_0_STATUS, type_0_status); bp 1754 drivers/net/fddi/defxx.c printk("%s: Non-Existent Memory Access Error\n", bp->dev->name); bp 1759 drivers/net/fddi/defxx.c printk("%s: Packet Memory Parity Error\n", bp->dev->name); bp 1764 drivers/net/fddi/defxx.c printk("%s: Host Bus Parity Error\n", bp->dev->name); bp 1768 drivers/net/fddi/defxx.c bp->link_available = PI_K_FALSE; /* link is no longer available */ bp 1769 drivers/net/fddi/defxx.c bp->reset_type = 0; /* rerun on-board diagnostics */ bp 1770 drivers/net/fddi/defxx.c printk("%s: Resetting adapter...\n", bp->dev->name); bp 1771 drivers/net/fddi/defxx.c if (dfx_adap_init(bp, 0) != DFX_K_SUCCESS) bp 1773 drivers/net/fddi/defxx.c printk("%s: Adapter reset failed! Disabling adapter interrupts.\n", bp->dev->name); bp 1774 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_DISABLE_ALL_INTS); bp 1777 drivers/net/fddi/defxx.c printk("%s: Adapter reset successful!\n", bp->dev->name); bp 1787 drivers/net/fddi/defxx.c bp->link_available = PI_K_FALSE; /* link is no longer available */ bp 1788 drivers/net/fddi/defxx.c dfx_xmt_flush(bp); /* flush any outstanding packets */ bp 1789 drivers/net/fddi/defxx.c (void) dfx_hw_port_ctrl_req(bp, bp 1802 drivers/net/fddi/defxx.c state = dfx_hw_adap_state_rd(bp); /* get adapter state */ bp 1811 drivers/net/fddi/defxx.c printk("%s: Controller has transitioned to HALTED state!\n", bp->dev->name); bp 1812 drivers/net/fddi/defxx.c dfx_int_pr_halt_id(bp); /* display halt id as string */ bp 1816 drivers/net/fddi/defxx.c bp->link_available = PI_K_FALSE; /* link is no longer available */ bp 1817 drivers/net/fddi/defxx.c bp->reset_type = 0; /* rerun on-board diagnostics */ bp 1818 drivers/net/fddi/defxx.c printk("%s: Resetting adapter...\n", bp->dev->name); bp 1819 drivers/net/fddi/defxx.c if (dfx_adap_init(bp, 0) != DFX_K_SUCCESS) bp 1821 drivers/net/fddi/defxx.c printk("%s: Adapter reset failed! Disabling adapter interrupts.\n", bp->dev->name); bp 1822 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_DISABLE_ALL_INTS); bp 1825 drivers/net/fddi/defxx.c printk("%s: Adapter reset successful!\n", bp->dev->name); bp 1829 drivers/net/fddi/defxx.c bp->link_available = PI_K_TRUE; /* set link available flag */ bp 1877 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 1882 drivers/net/fddi/defxx.c if(dfx_xmt_done(bp)) /* free consumed xmt packets */ bp 1887 drivers/net/fddi/defxx.c dfx_rcv_queue_process(bp); /* service received LLC frames */ bp 1896 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_2_PROD, bp->rcv_xmt_reg.lword); bp 1900 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_STATUS, &port_status); bp 1905 drivers/net/fddi/defxx.c dfx_int_type_0_process(bp); /* process Type 0 interrupts */ bp 1948 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 1949 drivers/net/fddi/defxx.c struct device *bdev = bp->bus_dev; bp 1959 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PFI_K_REG_STATUS, &status); bp 1963 drivers/net/fddi/defxx.c spin_lock(&bp->lock); bp 1966 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL, bp 1973 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PFI_K_REG_STATUS, bp 1975 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PFI_K_REG_MODE_CTRL, bp 1979 drivers/net/fddi/defxx.c spin_unlock(&bp->lock); bp 1989 drivers/net/fddi/defxx.c spin_lock(&bp->lock); bp 2003 drivers/net/fddi/defxx.c spin_unlock(&bp->lock); bp 2008 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_STATUS, &status); bp 2018 drivers/net/fddi/defxx.c spin_lock(&bp->lock); bp 2023 drivers/net/fddi/defxx.c spin_unlock(&bp->lock); bp 2075 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 2079 drivers/net/fddi/defxx.c bp->stats.gen.rx_packets = bp->rcv_total_frames; bp 2080 drivers/net/fddi/defxx.c bp->stats.gen.tx_packets = bp->xmt_total_frames; bp 2081 drivers/net/fddi/defxx.c bp->stats.gen.rx_bytes = bp->rcv_total_bytes; bp 2082 drivers/net/fddi/defxx.c bp->stats.gen.tx_bytes = bp->xmt_total_bytes; bp 2083 drivers/net/fddi/defxx.c bp->stats.gen.rx_errors = bp->rcv_crc_errors + bp 2084 drivers/net/fddi/defxx.c bp->rcv_frame_status_errors + bp 2085 drivers/net/fddi/defxx.c bp->rcv_length_errors; bp 2086 drivers/net/fddi/defxx.c bp->stats.gen.tx_errors = bp->xmt_length_errors; bp 2087 drivers/net/fddi/defxx.c bp->stats.gen.rx_dropped = bp->rcv_discards; bp 2088 drivers/net/fddi/defxx.c bp->stats.gen.tx_dropped = bp->xmt_discards; bp 2089 drivers/net/fddi/defxx.c bp->stats.gen.multicast = bp->rcv_multicast_frames; bp 2090 drivers/net/fddi/defxx.c bp->stats.gen.collisions = 0; /* always zero (0) for FDDI */ bp 2094 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_SMT_MIB_GET; bp 2095 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 2096 drivers/net/fddi/defxx.c return (struct net_device_stats *)&bp->stats; bp 2100 drivers/net/fddi/defxx.c memcpy(bp->stats.smt_station_id, &bp->cmd_rsp_virt->smt_mib_get.smt_station_id, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_station_id)); bp 2101 drivers/net/fddi/defxx.c bp->stats.smt_op_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_op_version_id; bp 2102 drivers/net/fddi/defxx.c bp->stats.smt_hi_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_hi_version_id; bp 2103 drivers/net/fddi/defxx.c bp->stats.smt_lo_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_lo_version_id; bp 2104 drivers/net/fddi/defxx.c memcpy(bp->stats.smt_user_data, &bp->cmd_rsp_virt->smt_mib_get.smt_user_data, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_user_data)); bp 2105 drivers/net/fddi/defxx.c bp->stats.smt_mib_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_mib_version_id; bp 2106 drivers/net/fddi/defxx.c bp->stats.smt_mac_cts = bp->cmd_rsp_virt->smt_mib_get.smt_mac_ct; bp 2107 drivers/net/fddi/defxx.c bp->stats.smt_non_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_non_master_ct; bp 2108 drivers/net/fddi/defxx.c bp->stats.smt_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_master_ct; bp 2109 drivers/net/fddi/defxx.c bp->stats.smt_available_paths = bp->cmd_rsp_virt->smt_mib_get.smt_available_paths; bp 2110 drivers/net/fddi/defxx.c bp->stats.smt_config_capabilities = bp->cmd_rsp_virt->smt_mib_get.smt_config_capabilities; bp 2111 drivers/net/fddi/defxx.c bp->stats.smt_config_policy = bp->cmd_rsp_virt->smt_mib_get.smt_config_policy; bp 2112 drivers/net/fddi/defxx.c bp->stats.smt_connection_policy = bp->cmd_rsp_virt->smt_mib_get.smt_connection_policy; bp 2113 drivers/net/fddi/defxx.c bp->stats.smt_t_notify = bp->cmd_rsp_virt->smt_mib_get.smt_t_notify; bp 2114 drivers/net/fddi/defxx.c bp->stats.smt_stat_rpt_policy = bp->cmd_rsp_virt->smt_mib_get.smt_stat_rpt_policy; bp 2115 drivers/net/fddi/defxx.c bp->stats.smt_trace_max_expiration = bp->cmd_rsp_virt->smt_mib_get.smt_trace_max_expiration; bp 2116 drivers/net/fddi/defxx.c bp->stats.smt_bypass_present = bp->cmd_rsp_virt->smt_mib_get.smt_bypass_present; bp 2117 drivers/net/fddi/defxx.c bp->stats.smt_ecm_state = bp->cmd_rsp_virt->smt_mib_get.smt_ecm_state; bp 2118 drivers/net/fddi/defxx.c bp->stats.smt_cf_state = bp->cmd_rsp_virt->smt_mib_get.smt_cf_state; bp 2119 drivers/net/fddi/defxx.c bp->stats.smt_remote_disconnect_flag = bp->cmd_rsp_virt->smt_mib_get.smt_remote_disconnect_flag; bp 2120 drivers/net/fddi/defxx.c bp->stats.smt_station_status = bp->cmd_rsp_virt->smt_mib_get.smt_station_status; bp 2121 drivers/net/fddi/defxx.c bp->stats.smt_peer_wrap_flag = bp->cmd_rsp_virt->smt_mib_get.smt_peer_wrap_flag; bp 2122 drivers/net/fddi/defxx.c bp->stats.smt_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_msg_time_stamp.ls; bp 2123 drivers/net/fddi/defxx.c bp->stats.smt_transition_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_transition_time_stamp.ls; bp 2124 drivers/net/fddi/defxx.c bp->stats.mac_frame_status_functions = bp->cmd_rsp_virt->smt_mib_get.mac_frame_status_functions; bp 2125 drivers/net/fddi/defxx.c bp->stats.mac_t_max_capability = bp->cmd_rsp_virt->smt_mib_get.mac_t_max_capability; bp 2126 drivers/net/fddi/defxx.c bp->stats.mac_tvx_capability = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_capability; bp 2127 drivers/net/fddi/defxx.c bp->stats.mac_available_paths = bp->cmd_rsp_virt->smt_mib_get.mac_available_paths; bp 2128 drivers/net/fddi/defxx.c bp->stats.mac_current_path = bp->cmd_rsp_virt->smt_mib_get.mac_current_path; bp 2129 drivers/net/fddi/defxx.c memcpy(bp->stats.mac_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_upstream_nbr, FDDI_K_ALEN); bp 2130 drivers/net/fddi/defxx.c memcpy(bp->stats.mac_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_downstream_nbr, FDDI_K_ALEN); bp 2131 drivers/net/fddi/defxx.c memcpy(bp->stats.mac_old_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_upstream_nbr, FDDI_K_ALEN); bp 2132 drivers/net/fddi/defxx.c memcpy(bp->stats.mac_old_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_downstream_nbr, FDDI_K_ALEN); bp 2133 drivers/net/fddi/defxx.c bp->stats.mac_dup_address_test = bp->cmd_rsp_virt->smt_mib_get.mac_dup_address_test; bp 2134 drivers/net/fddi/defxx.c bp->stats.mac_requested_paths = bp->cmd_rsp_virt->smt_mib_get.mac_requested_paths; bp 2135 drivers/net/fddi/defxx.c bp->stats.mac_downstream_port_type = bp->cmd_rsp_virt->smt_mib_get.mac_downstream_port_type; bp 2136 drivers/net/fddi/defxx.c memcpy(bp->stats.mac_smt_address, &bp->cmd_rsp_virt->smt_mib_get.mac_smt_address, FDDI_K_ALEN); bp 2137 drivers/net/fddi/defxx.c bp->stats.mac_t_req = bp->cmd_rsp_virt->smt_mib_get.mac_t_req; bp 2138 drivers/net/fddi/defxx.c bp->stats.mac_t_neg = bp->cmd_rsp_virt->smt_mib_get.mac_t_neg; bp 2139 drivers/net/fddi/defxx.c bp->stats.mac_t_max = bp->cmd_rsp_virt->smt_mib_get.mac_t_max; bp 2140 drivers/net/fddi/defxx.c bp->stats.mac_tvx_value = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_value; bp 2141 drivers/net/fddi/defxx.c bp->stats.mac_frame_error_threshold = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_threshold; bp 2142 drivers/net/fddi/defxx.c bp->stats.mac_frame_error_ratio = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_ratio; bp 2143 drivers/net/fddi/defxx.c bp->stats.mac_rmt_state = bp->cmd_rsp_virt->smt_mib_get.mac_rmt_state; bp 2144 drivers/net/fddi/defxx.c bp->stats.mac_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_da_flag; bp 2145 drivers/net/fddi/defxx.c bp->stats.mac_una_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_unda_flag; bp 2146 drivers/net/fddi/defxx.c bp->stats.mac_frame_error_flag = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_flag; bp 2147 drivers/net/fddi/defxx.c bp->stats.mac_ma_unitdata_available = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_available; bp 2148 drivers/net/fddi/defxx.c bp->stats.mac_hardware_present = bp->cmd_rsp_virt->smt_mib_get.mac_hardware_present; bp 2149 drivers/net/fddi/defxx.c bp->stats.mac_ma_unitdata_enable = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_enable; bp 2150 drivers/net/fddi/defxx.c bp->stats.path_tvx_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_tvx_lower_bound; bp 2151 drivers/net/fddi/defxx.c bp->stats.path_t_max_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_t_max_lower_bound; bp 2152 drivers/net/fddi/defxx.c bp->stats.path_max_t_req = bp->cmd_rsp_virt->smt_mib_get.path_max_t_req; bp 2153 drivers/net/fddi/defxx.c memcpy(bp->stats.path_configuration, &bp->cmd_rsp_virt->smt_mib_get.path_configuration, sizeof(bp->cmd_rsp_virt->smt_mib_get.path_configuration)); bp 2154 drivers/net/fddi/defxx.c bp->stats.port_my_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[0]; bp 2155 drivers/net/fddi/defxx.c bp->stats.port_my_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[1]; bp 2156 drivers/net/fddi/defxx.c bp->stats.port_neighbor_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[0]; bp 2157 drivers/net/fddi/defxx.c bp->stats.port_neighbor_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[1]; bp 2158 drivers/net/fddi/defxx.c bp->stats.port_connection_policies[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[0]; bp 2159 drivers/net/fddi/defxx.c bp->stats.port_connection_policies[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[1]; bp 2160 drivers/net/fddi/defxx.c bp->stats.port_mac_indicated[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[0]; bp 2161 drivers/net/fddi/defxx.c bp->stats.port_mac_indicated[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[1]; bp 2162 drivers/net/fddi/defxx.c bp->stats.port_current_path[0] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[0]; bp 2163 drivers/net/fddi/defxx.c bp->stats.port_current_path[1] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[1]; bp 2164 drivers/net/fddi/defxx.c memcpy(&bp->stats.port_requested_paths[0*3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[0], 3); bp 2165 drivers/net/fddi/defxx.c memcpy(&bp->stats.port_requested_paths[1*3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[1], 3); bp 2166 drivers/net/fddi/defxx.c bp->stats.port_mac_placement[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[0]; bp 2167 drivers/net/fddi/defxx.c bp->stats.port_mac_placement[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[1]; bp 2168 drivers/net/fddi/defxx.c bp->stats.port_available_paths[0] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[0]; bp 2169 drivers/net/fddi/defxx.c bp->stats.port_available_paths[1] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[1]; bp 2170 drivers/net/fddi/defxx.c bp->stats.port_pmd_class[0] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[0]; bp 2171 drivers/net/fddi/defxx.c bp->stats.port_pmd_class[1] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[1]; bp 2172 drivers/net/fddi/defxx.c bp->stats.port_connection_capabilities[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[0]; bp 2173 drivers/net/fddi/defxx.c bp->stats.port_connection_capabilities[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[1]; bp 2174 drivers/net/fddi/defxx.c bp->stats.port_bs_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[0]; bp 2175 drivers/net/fddi/defxx.c bp->stats.port_bs_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[1]; bp 2176 drivers/net/fddi/defxx.c bp->stats.port_ler_estimate[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[0]; bp 2177 drivers/net/fddi/defxx.c bp->stats.port_ler_estimate[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[1]; bp 2178 drivers/net/fddi/defxx.c bp->stats.port_ler_cutoff[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[0]; bp 2179 drivers/net/fddi/defxx.c bp->stats.port_ler_cutoff[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[1]; bp 2180 drivers/net/fddi/defxx.c bp->stats.port_ler_alarm[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[0]; bp 2181 drivers/net/fddi/defxx.c bp->stats.port_ler_alarm[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[1]; bp 2182 drivers/net/fddi/defxx.c bp->stats.port_connect_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[0]; bp 2183 drivers/net/fddi/defxx.c bp->stats.port_connect_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[1]; bp 2184 drivers/net/fddi/defxx.c bp->stats.port_pcm_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[0]; bp 2185 drivers/net/fddi/defxx.c bp->stats.port_pcm_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[1]; bp 2186 drivers/net/fddi/defxx.c bp->stats.port_pc_withhold[0] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[0]; bp 2187 drivers/net/fddi/defxx.c bp->stats.port_pc_withhold[1] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[1]; bp 2188 drivers/net/fddi/defxx.c bp->stats.port_ler_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[0]; bp 2189 drivers/net/fddi/defxx.c bp->stats.port_ler_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[1]; bp 2190 drivers/net/fddi/defxx.c bp->stats.port_hardware_present[0] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[0]; bp 2191 drivers/net/fddi/defxx.c bp->stats.port_hardware_present[1] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[1]; bp 2195 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_CNTRS_GET; bp 2196 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 2197 drivers/net/fddi/defxx.c return (struct net_device_stats *)&bp->stats; bp 2201 drivers/net/fddi/defxx.c bp->stats.mac_frame_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.frame_cnt.ls; bp 2202 drivers/net/fddi/defxx.c bp->stats.mac_copied_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.copied_cnt.ls; bp 2203 drivers/net/fddi/defxx.c bp->stats.mac_transmit_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.transmit_cnt.ls; bp 2204 drivers/net/fddi/defxx.c bp->stats.mac_error_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.error_cnt.ls; bp 2205 drivers/net/fddi/defxx.c bp->stats.mac_lost_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.lost_cnt.ls; bp 2206 drivers/net/fddi/defxx.c bp->stats.port_lct_fail_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[0].ls; bp 2207 drivers/net/fddi/defxx.c bp->stats.port_lct_fail_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[1].ls; bp 2208 drivers/net/fddi/defxx.c bp->stats.port_lem_reject_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[0].ls; bp 2209 drivers/net/fddi/defxx.c bp->stats.port_lem_reject_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[1].ls; bp 2210 drivers/net/fddi/defxx.c bp->stats.port_lem_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[0].ls; bp 2211 drivers/net/fddi/defxx.c bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; bp 2213 drivers/net/fddi/defxx.c return (struct net_device_stats *)&bp->stats; bp 2262 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 2269 drivers/net/fddi/defxx.c bp->ind_group_prom = PI_FSTATE_K_PASS; /* Enable LLC ind/group prom mode */ bp 2275 drivers/net/fddi/defxx.c bp->ind_group_prom = PI_FSTATE_K_BLOCK; /* Disable LLC ind/group prom mode */ bp 2296 drivers/net/fddi/defxx.c if (netdev_mc_count(dev) > (PI_CMD_ADDR_FILTER_K_SIZE - bp->uc_count)) bp 2298 drivers/net/fddi/defxx.c bp->group_prom = PI_FSTATE_K_PASS; /* Enable LLC group prom mode */ bp 2299 drivers/net/fddi/defxx.c bp->mc_count = 0; /* Don't add mc addrs to CAM */ bp 2303 drivers/net/fddi/defxx.c bp->group_prom = PI_FSTATE_K_BLOCK; /* Disable LLC group prom mode */ bp 2304 drivers/net/fddi/defxx.c bp->mc_count = netdev_mc_count(dev); /* Add mc addrs to CAM */ bp 2311 drivers/net/fddi/defxx.c memcpy(&bp->mc_table[i++ * FDDI_K_ALEN], bp 2314 drivers/net/fddi/defxx.c if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS) bp 2320 drivers/net/fddi/defxx.c DBG_printk("%s: Multicast address table updated! Added %d addresses.\n", dev->name, bp->mc_count); bp 2326 drivers/net/fddi/defxx.c if (dfx_ctl_update_filters(bp) != DFX_K_SUCCESS) bp 2376 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 2381 drivers/net/fddi/defxx.c memcpy(&bp->uc_table[0], p_sockaddr->sa_data, FDDI_K_ALEN); /* update driver struct */ bp 2382 drivers/net/fddi/defxx.c bp->uc_count = 1; bp 2396 drivers/net/fddi/defxx.c if ((bp->uc_count + bp->mc_count) > PI_CMD_ADDR_FILTER_K_SIZE) bp 2398 drivers/net/fddi/defxx.c bp->group_prom = PI_FSTATE_K_PASS; /* Enable LLC group prom mode */ bp 2399 drivers/net/fddi/defxx.c bp->mc_count = 0; /* Don't add mc addrs to CAM */ bp 2403 drivers/net/fddi/defxx.c if (dfx_ctl_update_filters(bp) != DFX_K_SUCCESS) bp 2415 drivers/net/fddi/defxx.c if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS) bp 2460 drivers/net/fddi/defxx.c static int dfx_ctl_update_cam(DFX_board_t *bp) bp 2478 drivers/net/fddi/defxx.c memset(bp->cmd_req_virt, 0, PI_CMD_REQ_K_SIZE_MAX); /* first clear buffer */ bp 2479 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_ADDR_FILTER_SET; bp 2480 drivers/net/fddi/defxx.c p_addr = &bp->cmd_req_virt->addr_filter_set.entry[0]; bp 2484 drivers/net/fddi/defxx.c for (i=0; i < (int)bp->uc_count; i++) bp 2488 drivers/net/fddi/defxx.c memcpy(p_addr, &bp->uc_table[i*FDDI_K_ALEN], FDDI_K_ALEN); bp 2495 drivers/net/fddi/defxx.c for (i=0; i < (int)bp->mc_count; i++) bp 2497 drivers/net/fddi/defxx.c if ((i + bp->uc_count) < PI_CMD_ADDR_FILTER_K_SIZE) bp 2499 drivers/net/fddi/defxx.c memcpy(p_addr, &bp->mc_table[i*FDDI_K_ALEN], FDDI_K_ALEN); bp 2506 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 2543 drivers/net/fddi/defxx.c static int dfx_ctl_update_filters(DFX_board_t *bp) bp 2549 drivers/net/fddi/defxx.c bp->cmd_req_virt->cmd_type = PI_CMD_K_FILTERS_SET; bp 2553 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i].item_code = PI_ITEM_K_BROADCAST; bp 2554 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i++].value = PI_FSTATE_K_PASS; bp 2558 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i].item_code = PI_ITEM_K_IND_GROUP_PROM; bp 2559 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i++].value = bp->ind_group_prom; bp 2563 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i].item_code = PI_ITEM_K_GROUP_PROM; bp 2564 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i++].value = bp->group_prom; bp 2568 drivers/net/fddi/defxx.c bp->cmd_req_virt->filter_set.item[i].item_code = PI_ITEM_K_EOL; bp 2572 drivers/net/fddi/defxx.c if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS) bp 2618 drivers/net/fddi/defxx.c static int dfx_hw_dma_cmd_req(DFX_board_t *bp) bp 2625 drivers/net/fddi/defxx.c status = dfx_hw_adap_state_rd(bp); bp 2634 drivers/net/fddi/defxx.c bp->descr_block_virt->cmd_rsp[bp->cmd_rsp_reg.index.prod].long_0 = (u32) (PI_RCV_DESCR_M_SOP | bp 2636 drivers/net/fddi/defxx.c bp->descr_block_virt->cmd_rsp[bp->cmd_rsp_reg.index.prod].long_1 = bp->cmd_rsp_phys; bp 2640 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.index.prod += 1; bp 2641 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.index.prod &= PI_CMD_RSP_K_NUM_ENTRIES-1; bp 2642 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_CMD_RSP_PROD, bp->cmd_rsp_reg.lword); bp 2646 drivers/net/fddi/defxx.c bp->descr_block_virt->cmd_req[bp->cmd_req_reg.index.prod].long_0 = (u32) (PI_XMT_DESCR_M_SOP | bp 2648 drivers/net/fddi/defxx.c bp->descr_block_virt->cmd_req[bp->cmd_req_reg.index.prod].long_1 = bp->cmd_req_phys; bp 2652 drivers/net/fddi/defxx.c bp->cmd_req_reg.index.prod += 1; bp 2653 drivers/net/fddi/defxx.c bp->cmd_req_reg.index.prod &= PI_CMD_REQ_K_NUM_ENTRIES-1; bp 2654 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_CMD_REQ_PROD, bp->cmd_req_reg.lword); bp 2663 drivers/net/fddi/defxx.c if (bp->cmd_req_reg.index.prod == (u8)(bp->cons_block_virt->cmd_req)) bp 2672 drivers/net/fddi/defxx.c bp->cmd_req_reg.index.comp += 1; bp 2673 drivers/net/fddi/defxx.c bp->cmd_req_reg.index.comp &= PI_CMD_REQ_K_NUM_ENTRIES-1; bp 2674 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_CMD_REQ_PROD, bp->cmd_req_reg.lword); bp 2683 drivers/net/fddi/defxx.c if (bp->cmd_rsp_reg.index.prod == (u8)(bp->cons_block_virt->cmd_rsp)) bp 2692 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.index.comp += 1; bp 2693 drivers/net/fddi/defxx.c bp->cmd_rsp_reg.index.comp &= PI_CMD_RSP_K_NUM_ENTRIES-1; bp 2694 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_CMD_RSP_PROD, bp->cmd_rsp_reg.lword); bp 2733 drivers/net/fddi/defxx.c DFX_board_t *bp, bp 2750 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_DATA_A, data_a); bp 2751 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_DATA_B, data_b); bp 2752 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_CTRL, port_cmd); bp 2763 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_CTRL, &port_cmd); bp 2778 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_HOST_DATA, host_data); bp 2817 drivers/net/fddi/defxx.c DFX_board_t *bp, bp 2824 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_DATA_A, type); /* tell adapter type of reset */ bp 2825 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_RESET, PI_RESET_M_ASSERT_RESET); bp 2833 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_PORT_RESET, 0); bp 2864 drivers/net/fddi/defxx.c static int dfx_hw_adap_state_rd(DFX_board_t *bp) bp 2868 drivers/net/fddi/defxx.c dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_STATUS, &port_status); bp 2904 drivers/net/fddi/defxx.c static int dfx_hw_dma_uninit(DFX_board_t *bp, PI_UINT32 type) bp 2910 drivers/net/fddi/defxx.c dfx_hw_adap_reset(bp, type); bp 2916 drivers/net/fddi/defxx.c if (dfx_hw_adap_state_rd(bp) == PI_STATE_K_DMA_UNAVAIL) bp 2976 drivers/net/fddi/defxx.c static int dfx_rcv_init(DFX_board_t *bp, int get_buffers) bp 3000 drivers/net/fddi/defxx.c for (i = 0; i < (int)(bp->rcv_bufs_to_post); i++) bp 3001 drivers/net/fddi/defxx.c for (j = 0; (i + j) < (int)PI_RCV_DATA_K_NUM_ENTRIES; j += bp->rcv_bufs_to_post) bp 3006 drivers/net/fddi/defxx.c newskb = __netdev_alloc_skb(bp->dev, NEW_SKB_SIZE, bp 3016 drivers/net/fddi/defxx.c dma_addr = dma_map_single(bp->bus_dev, bp 3020 drivers/net/fddi/defxx.c if (dma_mapping_error(bp->bus_dev, dma_addr)) { bp 3024 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[i + j].long_0 = bp 3029 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[i + j].long_1 = bp 3036 drivers/net/fddi/defxx.c bp->p_rcv_buff_va[i+j] = (char *) newskb; bp 3039 drivers/net/fddi/defxx.c for (i=0; i < (int)(bp->rcv_bufs_to_post); i++) bp 3040 drivers/net/fddi/defxx.c for (j=0; (i + j) < (int)PI_RCV_DATA_K_NUM_ENTRIES; j += bp->rcv_bufs_to_post) bp 3042 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[i+j].long_0 = (u32) (PI_RCV_DESCR_M_SOP | bp 3044 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[i+j].long_1 = (u32) (bp->rcv_block_phys + (i * PI_RCV_DATA_K_SIZE_MAX)); bp 3045 drivers/net/fddi/defxx.c bp->p_rcv_buff_va[i+j] = (bp->rcv_block_virt + (i * PI_RCV_DATA_K_SIZE_MAX)); bp 3052 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.rcv_prod = bp->rcv_bufs_to_post; bp 3053 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_2_PROD, bp->rcv_xmt_reg.lword); bp 3091 drivers/net/fddi/defxx.c DFX_board_t *bp bp 3102 drivers/net/fddi/defxx.c p_type_2_cons = (PI_TYPE_2_CONSUMER *)(&bp->cons_block_virt->xmt_rcv_data); bp 3103 drivers/net/fddi/defxx.c while (bp->rcv_xmt_reg.index.rcv_comp != p_type_2_cons->index.rcv_cons) bp 3109 drivers/net/fddi/defxx.c entry = bp->rcv_xmt_reg.index.rcv_comp; bp 3111 drivers/net/fddi/defxx.c p_buff = (char *) (((struct sk_buff *)bp->p_rcv_buff_va[entry])->data); bp 3113 drivers/net/fddi/defxx.c p_buff = bp->p_rcv_buff_va[entry]; bp 3115 drivers/net/fddi/defxx.c dma_addr = bp->descr_block_virt->rcv_data[entry].long_1; bp 3116 drivers/net/fddi/defxx.c dma_sync_single_for_cpu(bp->bus_dev, bp 3125 drivers/net/fddi/defxx.c bp->rcv_crc_errors++; bp 3127 drivers/net/fddi/defxx.c bp->rcv_frame_status_errors++; bp 3138 drivers/net/fddi/defxx.c bp->rcv_length_errors++; bp 3146 drivers/net/fddi/defxx.c newskb = netdev_alloc_skb(bp->dev, bp 3151 drivers/net/fddi/defxx.c bp->bus_dev, bp 3156 drivers/net/fddi/defxx.c bp->bus_dev, bp 3165 drivers/net/fddi/defxx.c skb = (struct sk_buff *)bp->p_rcv_buff_va[entry]; bp 3166 drivers/net/fddi/defxx.c dma_unmap_single(bp->bus_dev, bp 3171 drivers/net/fddi/defxx.c bp->p_rcv_buff_va[entry] = (char *)newskb; bp 3172 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[entry].long_1 = (u32)new_dma_addr; bp 3179 drivers/net/fddi/defxx.c skb = netdev_alloc_skb(bp->dev, bp 3183 drivers/net/fddi/defxx.c printk("%s: Could not allocate receive buffer. Dropping packet.\n", bp->dev->name); bp 3184 drivers/net/fddi/defxx.c bp->rcv_discards++; bp 3191 drivers/net/fddi/defxx.c bp->bus_dev, bp 3204 drivers/net/fddi/defxx.c skb->protocol = fddi_type_trans(skb, bp->dev); bp 3205 drivers/net/fddi/defxx.c bp->rcv_total_bytes += skb->len; bp 3209 drivers/net/fddi/defxx.c bp->rcv_total_frames++; bp 3211 drivers/net/fddi/defxx.c bp->rcv_multicast_frames++; bp 3224 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.rcv_prod += 1; bp 3225 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.rcv_comp += 1; bp 3294 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 3316 drivers/net/fddi/defxx.c bp->xmt_length_errors++; /* bump error counter */ bp 3333 drivers/net/fddi/defxx.c if (bp->link_available == PI_K_FALSE) bp 3335 drivers/net/fddi/defxx.c if (dfx_hw_adap_state_rd(bp) == PI_STATE_K_LINK_AVAIL) /* is link really available? */ bp 3336 drivers/net/fddi/defxx.c bp->link_available = PI_K_TRUE; /* if so, set flag and continue */ bp 3339 drivers/net/fddi/defxx.c bp->xmt_discards++; /* bump error counter */ bp 3353 drivers/net/fddi/defxx.c dma_addr = dma_map_single(bp->bus_dev, skb->data, skb->len, bp 3355 drivers/net/fddi/defxx.c if (dma_mapping_error(bp->bus_dev, dma_addr)) { bp 3360 drivers/net/fddi/defxx.c spin_lock_irqsave(&bp->lock, flags); bp 3364 drivers/net/fddi/defxx.c prod = bp->rcv_xmt_reg.index.xmt_prod; bp 3365 drivers/net/fddi/defxx.c p_xmt_descr = &(bp->descr_block_virt->xmt_data[prod]); bp 3378 drivers/net/fddi/defxx.c p_xmt_drv_descr = &(bp->xmt_drv_descr_blk[prod++]); /* also bump producer index */ bp 3421 drivers/net/fddi/defxx.c if (prod == bp->rcv_xmt_reg.index.xmt_comp) bp 3424 drivers/net/fddi/defxx.c spin_unlock_irqrestore(&bp->lock, flags); bp 3448 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.xmt_prod = prod; bp 3449 drivers/net/fddi/defxx.c dfx_port_write_long(bp, PI_PDQ_K_REG_TYPE_2_PROD, bp->rcv_xmt_reg.lword); bp 3450 drivers/net/fddi/defxx.c spin_unlock_irqrestore(&bp->lock, flags); bp 3488 drivers/net/fddi/defxx.c static int dfx_xmt_done(DFX_board_t *bp) bp 3497 drivers/net/fddi/defxx.c p_type_2_cons = (PI_TYPE_2_CONSUMER *)(&bp->cons_block_virt->xmt_rcv_data); bp 3498 drivers/net/fddi/defxx.c while (bp->rcv_xmt_reg.index.xmt_comp != p_type_2_cons->index.xmt_cons) bp 3502 drivers/net/fddi/defxx.c p_xmt_drv_descr = &(bp->xmt_drv_descr_blk[bp->rcv_xmt_reg.index.xmt_comp]); bp 3506 drivers/net/fddi/defxx.c bp->xmt_total_frames++; bp 3507 drivers/net/fddi/defxx.c bp->xmt_total_bytes += p_xmt_drv_descr->p_skb->len; bp 3510 drivers/net/fddi/defxx.c comp = bp->rcv_xmt_reg.index.xmt_comp; bp 3511 drivers/net/fddi/defxx.c dma_unmap_single(bp->bus_dev, bp 3512 drivers/net/fddi/defxx.c bp->descr_block_virt->xmt_data[comp].long_1, bp 3528 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.xmt_comp += 1; bp 3562 drivers/net/fddi/defxx.c static void dfx_rcv_flush( DFX_board_t *bp ) bp 3566 drivers/net/fddi/defxx.c for (i = 0; i < (int)(bp->rcv_bufs_to_post); i++) bp 3567 drivers/net/fddi/defxx.c for (j = 0; (i + j) < (int)PI_RCV_DATA_K_NUM_ENTRIES; j += bp->rcv_bufs_to_post) bp 3570 drivers/net/fddi/defxx.c skb = (struct sk_buff *)bp->p_rcv_buff_va[i+j]; bp 3572 drivers/net/fddi/defxx.c dma_unmap_single(bp->bus_dev, bp 3573 drivers/net/fddi/defxx.c bp->descr_block_virt->rcv_data[i+j].long_1, bp 3578 drivers/net/fddi/defxx.c bp->p_rcv_buff_va[i+j] = NULL; bp 3620 drivers/net/fddi/defxx.c static void dfx_xmt_flush( DFX_board_t *bp ) bp 3628 drivers/net/fddi/defxx.c while (bp->rcv_xmt_reg.index.xmt_comp != bp->rcv_xmt_reg.index.xmt_prod) bp 3632 drivers/net/fddi/defxx.c p_xmt_drv_descr = &(bp->xmt_drv_descr_blk[bp->rcv_xmt_reg.index.xmt_comp]); bp 3635 drivers/net/fddi/defxx.c comp = bp->rcv_xmt_reg.index.xmt_comp; bp 3636 drivers/net/fddi/defxx.c dma_unmap_single(bp->bus_dev, bp 3637 drivers/net/fddi/defxx.c bp->descr_block_virt->xmt_data[comp].long_1, bp 3644 drivers/net/fddi/defxx.c bp->xmt_discards++; bp 3657 drivers/net/fddi/defxx.c bp->rcv_xmt_reg.index.xmt_comp += 1; bp 3662 drivers/net/fddi/defxx.c prod_cons = (u32)(bp->cons_block_virt->xmt_rcv_data & ~PI_CONS_M_XMT_INDEX); bp 3663 drivers/net/fddi/defxx.c prod_cons |= (u32)(bp->rcv_xmt_reg.index.xmt_prod << PI_CONS_V_XMT_INDEX); bp 3664 drivers/net/fddi/defxx.c bp->cons_block_virt->xmt_rcv_data = prod_cons; bp 3696 drivers/net/fddi/defxx.c DFX_board_t *bp = netdev_priv(dev); bp 3709 drivers/net/fddi/defxx.c (bp->rcv_bufs_to_post * PI_RCV_DATA_K_SIZE_MAX) + bp 3713 drivers/net/fddi/defxx.c if (bp->kmalloced) bp 3715 drivers/net/fddi/defxx.c bp->kmalloced, bp->kmalloced_dma); bp 3725 drivers/net/fddi/defxx.c iounmap(bp->base.mem); bp 379 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 385 drivers/net/fddi/skfp/skfddi.c bp->base_addr = dev->base_addr; bp 390 drivers/net/fddi/skfp/skfddi.c spin_lock_init(&bp->DriverLock); bp 393 drivers/net/fddi/skfp/skfddi.c bp->LocalRxBuffer = dma_alloc_coherent(&bp->pdev.dev, MAX_FRAME_SIZE, bp 394 drivers/net/fddi/skfp/skfddi.c &bp->LocalRxBufferDMA, bp 396 drivers/net/fddi/skfp/skfddi.c if (!bp->LocalRxBuffer) { bp 403 drivers/net/fddi/skfp/skfddi.c bp->SharedMemSize = mac_drv_check_space(); bp 404 drivers/net/fddi/skfp/skfddi.c pr_debug("Memory for HWM: %ld\n", bp->SharedMemSize); bp 405 drivers/net/fddi/skfp/skfddi.c if (bp->SharedMemSize > 0) { bp 406 drivers/net/fddi/skfp/skfddi.c bp->SharedMemSize += 16; // for descriptor alignment bp 408 drivers/net/fddi/skfp/skfddi.c bp->SharedMemAddr = dma_alloc_coherent(&bp->pdev.dev, bp 409 drivers/net/fddi/skfp/skfddi.c bp->SharedMemSize, bp 410 drivers/net/fddi/skfp/skfddi.c &bp->SharedMemDMA, bp 412 drivers/net/fddi/skfp/skfddi.c if (!bp->SharedMemAddr) { bp 415 drivers/net/fddi/skfp/skfddi.c bp->SharedMemSize); bp 420 drivers/net/fddi/skfp/skfddi.c bp->SharedMemAddr = NULL; bp 423 drivers/net/fddi/skfp/skfddi.c bp->SharedMemHeap = 0; bp 441 drivers/net/fddi/skfp/skfddi.c if (bp->SharedMemAddr) { bp 442 drivers/net/fddi/skfp/skfddi.c dma_free_coherent(&bp->pdev.dev, bp 443 drivers/net/fddi/skfp/skfddi.c bp->SharedMemSize, bp 444 drivers/net/fddi/skfp/skfddi.c bp->SharedMemAddr, bp 445 drivers/net/fddi/skfp/skfddi.c bp->SharedMemDMA); bp 446 drivers/net/fddi/skfp/skfddi.c bp->SharedMemAddr = NULL; bp 448 drivers/net/fddi/skfp/skfddi.c if (bp->LocalRxBuffer) { bp 449 drivers/net/fddi/skfp/skfddi.c dma_free_coherent(&bp->pdev.dev, MAX_FRAME_SIZE, bp 450 drivers/net/fddi/skfp/skfddi.c bp->LocalRxBuffer, bp->LocalRxBufferDMA); bp 451 drivers/net/fddi/skfp/skfddi.c bp->LocalRxBuffer = NULL; bp 548 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 560 drivers/net/fddi/skfp/skfddi.c skb_queue_purge(&bp->SendSkbQueue); bp 561 drivers/net/fddi/skfp/skfddi.c bp->QueueSkb = MAX_TX_QUEUE_LEN; bp 606 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp; bp 609 drivers/net/fddi/skfp/skfddi.c bp = &smc->os; bp 622 drivers/net/fddi/skfp/skfddi.c spin_lock(&bp->DriverLock); bp 631 drivers/net/fddi/skfp/skfddi.c spin_unlock(&bp->DriverLock); bp 671 drivers/net/fddi/skfp/skfddi.c struct s_smc *bp = netdev_priv(dev); bp 675 drivers/net/fddi/skfp/skfddi.c bp->os.MacStat.port_bs_flag[0] = 0x1234; bp 676 drivers/net/fddi/skfp/skfddi.c bp->os.MacStat.port_bs_flag[1] = 0x5678; bp 683 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.smt_station_id, &bp->cmd_rsp_virt->smt_mib_get.smt_station_id, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_station_id)); bp 684 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_op_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_op_version_id; bp 685 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_hi_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_hi_version_id; bp 686 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_lo_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_lo_version_id; bp 687 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.smt_user_data, &bp->cmd_rsp_virt->smt_mib_get.smt_user_data, sizeof(bp->cmd_rsp_virt->smt_mib_get.smt_user_data)); bp 688 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_mib_version_id = bp->cmd_rsp_virt->smt_mib_get.smt_mib_version_id; bp 689 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_mac_cts = bp->cmd_rsp_virt->smt_mib_get.smt_mac_ct; bp 690 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_non_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_non_master_ct; bp 691 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_master_cts = bp->cmd_rsp_virt->smt_mib_get.smt_master_ct; bp 692 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_available_paths = bp->cmd_rsp_virt->smt_mib_get.smt_available_paths; bp 693 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_config_capabilities = bp->cmd_rsp_virt->smt_mib_get.smt_config_capabilities; bp 694 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_config_policy = bp->cmd_rsp_virt->smt_mib_get.smt_config_policy; bp 695 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_connection_policy = bp->cmd_rsp_virt->smt_mib_get.smt_connection_policy; bp 696 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_t_notify = bp->cmd_rsp_virt->smt_mib_get.smt_t_notify; bp 697 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_stat_rpt_policy = bp->cmd_rsp_virt->smt_mib_get.smt_stat_rpt_policy; bp 698 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_trace_max_expiration = bp->cmd_rsp_virt->smt_mib_get.smt_trace_max_expiration; bp 699 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_bypass_present = bp->cmd_rsp_virt->smt_mib_get.smt_bypass_present; bp 700 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_ecm_state = bp->cmd_rsp_virt->smt_mib_get.smt_ecm_state; bp 701 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_cf_state = bp->cmd_rsp_virt->smt_mib_get.smt_cf_state; bp 702 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_remote_disconnect_flag = bp->cmd_rsp_virt->smt_mib_get.smt_remote_disconnect_flag; bp 703 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_station_status = bp->cmd_rsp_virt->smt_mib_get.smt_station_status; bp 704 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_peer_wrap_flag = bp->cmd_rsp_virt->smt_mib_get.smt_peer_wrap_flag; bp 705 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_msg_time_stamp.ls; bp 706 drivers/net/fddi/skfp/skfddi.c bp->stats.smt_transition_time_stamp = bp->cmd_rsp_virt->smt_mib_get.smt_transition_time_stamp.ls; bp 707 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_frame_status_functions = bp->cmd_rsp_virt->smt_mib_get.mac_frame_status_functions; bp 708 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_t_max_capability = bp->cmd_rsp_virt->smt_mib_get.mac_t_max_capability; bp 709 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_tvx_capability = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_capability; bp 710 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_available_paths = bp->cmd_rsp_virt->smt_mib_get.mac_available_paths; bp 711 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_current_path = bp->cmd_rsp_virt->smt_mib_get.mac_current_path; bp 712 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.mac_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_upstream_nbr, FDDI_K_ALEN); bp 713 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.mac_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_downstream_nbr, FDDI_K_ALEN); bp 714 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.mac_old_upstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_upstream_nbr, FDDI_K_ALEN); bp 715 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.mac_old_downstream_nbr, &bp->cmd_rsp_virt->smt_mib_get.mac_old_downstream_nbr, FDDI_K_ALEN); bp 716 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_dup_address_test = bp->cmd_rsp_virt->smt_mib_get.mac_dup_address_test; bp 717 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_requested_paths = bp->cmd_rsp_virt->smt_mib_get.mac_requested_paths; bp 718 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_downstream_port_type = bp->cmd_rsp_virt->smt_mib_get.mac_downstream_port_type; bp 719 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.mac_smt_address, &bp->cmd_rsp_virt->smt_mib_get.mac_smt_address, FDDI_K_ALEN); bp 720 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_t_req = bp->cmd_rsp_virt->smt_mib_get.mac_t_req; bp 721 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_t_neg = bp->cmd_rsp_virt->smt_mib_get.mac_t_neg; bp 722 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_t_max = bp->cmd_rsp_virt->smt_mib_get.mac_t_max; bp 723 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_tvx_value = bp->cmd_rsp_virt->smt_mib_get.mac_tvx_value; bp 724 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_frame_error_threshold = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_threshold; bp 725 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_frame_error_ratio = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_ratio; bp 726 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_rmt_state = bp->cmd_rsp_virt->smt_mib_get.mac_rmt_state; bp 727 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_da_flag; bp 728 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_una_da_flag = bp->cmd_rsp_virt->smt_mib_get.mac_unda_flag; bp 729 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_frame_error_flag = bp->cmd_rsp_virt->smt_mib_get.mac_frame_error_flag; bp 730 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_ma_unitdata_available = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_available; bp 731 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_hardware_present = bp->cmd_rsp_virt->smt_mib_get.mac_hardware_present; bp 732 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_ma_unitdata_enable = bp->cmd_rsp_virt->smt_mib_get.mac_ma_unitdata_enable; bp 733 drivers/net/fddi/skfp/skfddi.c bp->stats.path_tvx_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_tvx_lower_bound; bp 734 drivers/net/fddi/skfp/skfddi.c bp->stats.path_t_max_lower_bound = bp->cmd_rsp_virt->smt_mib_get.path_t_max_lower_bound; bp 735 drivers/net/fddi/skfp/skfddi.c bp->stats.path_max_t_req = bp->cmd_rsp_virt->smt_mib_get.path_max_t_req; bp 736 drivers/net/fddi/skfp/skfddi.c memcpy(bp->stats.path_configuration, &bp->cmd_rsp_virt->smt_mib_get.path_configuration, sizeof(bp->cmd_rsp_virt->smt_mib_get.path_configuration)); bp 737 drivers/net/fddi/skfp/skfddi.c bp->stats.port_my_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[0]; bp 738 drivers/net/fddi/skfp/skfddi.c bp->stats.port_my_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_my_type[1]; bp 739 drivers/net/fddi/skfp/skfddi.c bp->stats.port_neighbor_type[0] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[0]; bp 740 drivers/net/fddi/skfp/skfddi.c bp->stats.port_neighbor_type[1] = bp->cmd_rsp_virt->smt_mib_get.port_neighbor_type[1]; bp 741 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connection_policies[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[0]; bp 742 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connection_policies[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_policies[1]; bp 743 drivers/net/fddi/skfp/skfddi.c bp->stats.port_mac_indicated[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[0]; bp 744 drivers/net/fddi/skfp/skfddi.c bp->stats.port_mac_indicated[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_indicated[1]; bp 745 drivers/net/fddi/skfp/skfddi.c bp->stats.port_current_path[0] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[0]; bp 746 drivers/net/fddi/skfp/skfddi.c bp->stats.port_current_path[1] = bp->cmd_rsp_virt->smt_mib_get.port_current_path[1]; bp 747 drivers/net/fddi/skfp/skfddi.c memcpy(&bp->stats.port_requested_paths[0 * 3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[0], 3); bp 748 drivers/net/fddi/skfp/skfddi.c memcpy(&bp->stats.port_requested_paths[1 * 3], &bp->cmd_rsp_virt->smt_mib_get.port_requested_paths[1], 3); bp 749 drivers/net/fddi/skfp/skfddi.c bp->stats.port_mac_placement[0] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[0]; bp 750 drivers/net/fddi/skfp/skfddi.c bp->stats.port_mac_placement[1] = bp->cmd_rsp_virt->smt_mib_get.port_mac_placement[1]; bp 751 drivers/net/fddi/skfp/skfddi.c bp->stats.port_available_paths[0] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[0]; bp 752 drivers/net/fddi/skfp/skfddi.c bp->stats.port_available_paths[1] = bp->cmd_rsp_virt->smt_mib_get.port_available_paths[1]; bp 753 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pmd_class[0] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[0]; bp 754 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pmd_class[1] = bp->cmd_rsp_virt->smt_mib_get.port_pmd_class[1]; bp 755 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connection_capabilities[0] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[0]; bp 756 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connection_capabilities[1] = bp->cmd_rsp_virt->smt_mib_get.port_connection_capabilities[1]; bp 757 drivers/net/fddi/skfp/skfddi.c bp->stats.port_bs_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[0]; bp 758 drivers/net/fddi/skfp/skfddi.c bp->stats.port_bs_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_bs_flag[1]; bp 759 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_estimate[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[0]; bp 760 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_estimate[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_estimate[1]; bp 761 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_cutoff[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[0]; bp 762 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_cutoff[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_cutoff[1]; bp 763 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_alarm[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[0]; bp 764 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_alarm[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_alarm[1]; bp 765 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connect_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[0]; bp 766 drivers/net/fddi/skfp/skfddi.c bp->stats.port_connect_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_connect_state[1]; bp 767 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pcm_state[0] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[0]; bp 768 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pcm_state[1] = bp->cmd_rsp_virt->smt_mib_get.port_pcm_state[1]; bp 769 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pc_withhold[0] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[0]; bp 770 drivers/net/fddi/skfp/skfddi.c bp->stats.port_pc_withhold[1] = bp->cmd_rsp_virt->smt_mib_get.port_pc_withhold[1]; bp 771 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_flag[0] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[0]; bp 772 drivers/net/fddi/skfp/skfddi.c bp->stats.port_ler_flag[1] = bp->cmd_rsp_virt->smt_mib_get.port_ler_flag[1]; bp 773 drivers/net/fddi/skfp/skfddi.c bp->stats.port_hardware_present[0] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[0]; bp 774 drivers/net/fddi/skfp/skfddi.c bp->stats.port_hardware_present[1] = bp->cmd_rsp_virt->smt_mib_get.port_hardware_present[1]; bp 779 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_frame_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.frame_cnt.ls; bp 780 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_copied_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.copied_cnt.ls; bp 781 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_transmit_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.transmit_cnt.ls; bp 782 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_error_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.error_cnt.ls; bp 783 drivers/net/fddi/skfp/skfddi.c bp->stats.mac_lost_cts = bp->cmd_rsp_virt->cntrs_get.cntrs.lost_cnt.ls; bp 784 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lct_fail_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[0].ls; bp 785 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lct_fail_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lct_rejects[1].ls; bp 786 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lem_reject_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[0].ls; bp 787 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lem_reject_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.lem_rejects[1].ls; bp 788 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lem_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[0].ls; bp 789 drivers/net/fddi/skfp/skfddi.c bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; bp 792 drivers/net/fddi/skfp/skfddi.c return (struct net_device_stats *)&bp->os.MacStat; bp 836 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 839 drivers/net/fddi/skfp/skfddi.c spin_lock_irqsave(&bp->DriverLock, Flags); bp 841 drivers/net/fddi/skfp/skfddi.c spin_unlock_irqrestore(&bp->DriverLock, Flags); bp 921 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 926 drivers/net/fddi/skfp/skfddi.c spin_lock_irqsave(&bp->DriverLock, Flags); bp 928 drivers/net/fddi/skfp/skfddi.c spin_unlock_irqrestore(&bp->DriverLock, Flags); bp 1041 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1055 drivers/net/fddi/skfp/skfddi.c bp->MacStat.gen.tx_errors++; /* bump error counter */ bp 1061 drivers/net/fddi/skfp/skfddi.c if (bp->QueueSkb == 0) { // return with tbusy set: queue full bp 1066 drivers/net/fddi/skfp/skfddi.c bp->QueueSkb--; bp 1067 drivers/net/fddi/skfp/skfddi.c skb_queue_tail(&bp->SendSkbQueue, skb); bp 1069 drivers/net/fddi/skfp/skfddi.c if (bp->QueueSkb == 0) { bp 1102 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1115 drivers/net/fddi/skfp/skfddi.c skb = skb_dequeue(&bp->SendSkbQueue); bp 1122 drivers/net/fddi/skfp/skfddi.c spin_lock_irqsave(&bp->DriverLock, Flags); bp 1151 drivers/net/fddi/skfp/skfddi.c pr_debug("%s: out of TXDs.\n", bp->dev->name); bp 1154 drivers/net/fddi/skfp/skfddi.c bp->dev->name); bp 1159 drivers/net/fddi/skfp/skfddi.c skb_queue_head(&bp->SendSkbQueue, skb); bp 1160 drivers/net/fddi/skfp/skfddi.c spin_unlock_irqrestore(&bp->DriverLock, Flags); bp 1165 drivers/net/fddi/skfp/skfddi.c bp->QueueSkb++; // one packet less in local queue bp 1172 drivers/net/fddi/skfp/skfddi.c dma_address = pci_map_single(&bp->pdev, skb->data, bp 1182 drivers/net/fddi/skfp/skfddi.c pci_unmap_single(&bp->pdev, dma_address, bp 1186 drivers/net/fddi/skfp/skfddi.c spin_unlock_irqrestore(&bp->DriverLock, Flags); bp 1274 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1279 drivers/net/fddi/skfp/skfddi.c spin_unlock(&bp->DriverLock); bp 1281 drivers/net/fddi/skfp/skfddi.c spin_lock(&bp->DriverLock); bp 1282 drivers/net/fddi/skfp/skfddi.c netif_start_queue(bp->dev);// system may send again if it was blocked bp 1458 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1463 drivers/net/fddi/skfp/skfddi.c int MaxFrameSize = bp->MaxFrameSize; bp 1465 drivers/net/fddi/skfp/skfddi.c pci_unmap_single(&bp->pdev, r->rxd_os.dma_addr, bp 1572 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1654 drivers/net/fddi/skfp/skfddi.c skb->protocol = fddi_type_trans(skb, bp->dev); bp 1847 drivers/net/fddi/skfp/skfddi.c skfddi_priv *bp = &smc->os; bp 1848 drivers/net/fddi/skfp/skfddi.c int MaxFrameSize = bp->MaxFrameSize; bp 1850 drivers/net/fddi/skfp/skfddi.c pci_unmap_single(&bp->pdev, rxd->rxd_os.dma_addr, bp 361 drivers/net/hamradio/baycom_epp.c unsigned char *wp, *bp; bp 375 drivers/net/hamradio/baycom_epp.c bp = skb->data+1; bp 376 drivers/net/hamradio/baycom_epp.c crc = calc_crc_ccitt(bp, pkt_len); bp 383 drivers/net/hamradio/baycom_epp.c bitstream |= ((unsigned int)*bp) << 8; bp 384 drivers/net/hamradio/baycom_epp.c bitbuf |= ((unsigned int)*bp) << numbit; bp 386 drivers/net/hamradio/baycom_epp.c bp++; bp 389 drivers/net/hamradio/baycom_epp.c bp = crcarr; bp 123 drivers/net/hamradio/hdlcdrv.c *s->hdlcrx.bp++ = bits >> (32-num); bp 193 drivers/net/hamradio/hdlcdrv.c s->hdlcrx.bp = s->hdlcrx.buffer; bp 311 drivers/net/hamradio/hdlcdrv.c s->hdlctx.bp = s->hdlctx.buffer; bp 325 drivers/net/hamradio/hdlcdrv.c s->hdlctx.bitbuf |= *s->hdlctx.bp << bp 328 drivers/net/hamradio/hdlcdrv.c s->hdlctx.bitstream |= (*s->hdlctx.bp++) << 16; bp 325 drivers/net/hamradio/scc.c char *bp; bp 333 drivers/net/hamradio/scc.c bp = skb_put(skb, 2); bp 334 drivers/net/hamradio/scc.c *bp++ = PARAM_HWEVENT; bp 335 drivers/net/hamradio/scc.c *bp++ = event; bp 307 drivers/net/usb/rndis_host.c unsigned char *bp; bp 415 drivers/net/usb/rndis_host.c 48, (void **) &bp, &reply_len); bp 421 drivers/net/usb/rndis_host.c if (bp[0] & 0x02) bp 424 drivers/net/usb/rndis_host.c ether_addr_copy(net->dev_addr, bp); bp 171 drivers/net/wan/hd64570.c writel(buff_off, &desc->bp); bp 153 drivers/net/wan/hd64570.h u32 bp; /* Buffer Pointer (24 bits) */ bp 145 drivers/net/wan/hd64572.c writel(buff_off, &desc->bp); bp 180 drivers/net/wan/hd64572.h u32 bp; /* buffer pointer */ bp 280 drivers/net/wireless/ath/ath9k/ar5008_phy.c int bp = 0; bp 282 drivers/net/wireless/ath/ath9k/ar5008_phy.c for (bp = 0; bp < 30; bp++) { bp 284 drivers/net/wireless/ath/ath9k/ar5008_phy.c pilot_mask = pilot_mask | 0x1 << bp; bp 285 drivers/net/wireless/ath/ath9k/ar5008_phy.c chan_mask = chan_mask | 0x1 << bp; bp 735 drivers/parport/ieee1284_ops.c unsigned char *bp = (unsigned char *) buffer; bp 747 drivers/parport/ieee1284_ops.c for (; len > 0; len--, bp++) { bp 749 drivers/parport/ieee1284_ops.c parport_write_data (port, *bp); bp 779 drivers/parport/ieee1284_ops.c unsigned char *bp = (unsigned char *) buffer; bp 790 drivers/parport/ieee1284_ops.c for (; len > 0; len--, bp++) { bp 800 drivers/parport/ieee1284_ops.c *bp = parport_read_data (port); bp 823 drivers/parport/ieee1284_ops.c unsigned char *bp = (unsigned char *) buffer; bp 835 drivers/parport/ieee1284_ops.c for (; len > 0; len--, bp++) { bp 837 drivers/parport/ieee1284_ops.c parport_write_data (port, *bp); bp 867 drivers/parport/ieee1284_ops.c unsigned char *bp = (unsigned char *) buffer; bp 878 drivers/parport/ieee1284_ops.c for (; len > 0; len--, bp++) { bp 888 drivers/parport/ieee1284_ops.c *bp = parport_read_data (port); bp 51 drivers/pinctrl/zte/pinctrl-zx.h #define TOP_PIN(pin, off, bp, wd, coff, cbp, ...) { \ bp 57 drivers/pinctrl/zte/pinctrl-zx.h .bitpos = bp, \ bp 66 drivers/pinctrl/zte/pinctrl-zx.h #define AON_PIN(pin, off, bp, wd, coff, cbp, ...) { \ bp 72 drivers/pinctrl/zte/pinctrl-zx.h .bitpos = bp, \ bp 47 drivers/power/supply/apm_power.c struct find_bat_param *bp = (struct find_bat_param *)data; bp 49 drivers/power/supply/apm_power.c bp->bat = dev_get_drvdata(dev); bp 51 drivers/power/supply/apm_power.c if (bp->bat->desc->use_for_apm) { bp 53 drivers/power/supply/apm_power.c bp->main = bp->bat; bp 57 drivers/power/supply/apm_power.c if (!PSY_PROP(bp->bat, CHARGE_FULL_DESIGN, &bp->full) || bp 58 drivers/power/supply/apm_power.c !PSY_PROP(bp->bat, CHARGE_FULL, &bp->full)) { bp 59 drivers/power/supply/apm_power.c if (bp->full.intval > bp->max_charge) { bp 60 drivers/power/supply/apm_power.c bp->max_charge_bat = bp->bat; bp 61 drivers/power/supply/apm_power.c bp->max_charge = bp->full.intval; bp 63 drivers/power/supply/apm_power.c } else if (!PSY_PROP(bp->bat, ENERGY_FULL_DESIGN, &bp->full) || bp 64 drivers/power/supply/apm_power.c !PSY_PROP(bp->bat, ENERGY_FULL, &bp->full)) { bp 65 drivers/power/supply/apm_power.c if (bp->full.intval > bp->max_energy) { bp 66 drivers/power/supply/apm_power.c bp->max_energy_bat = bp->bat; bp 67 drivers/power/supply/apm_power.c bp->max_energy = bp->full.intval; bp 75 drivers/power/supply/apm_power.c struct find_bat_param bp; bp 78 drivers/power/supply/apm_power.c memset(&bp, 0, sizeof(struct find_bat_param)); bp 80 drivers/power/supply/apm_power.c bp.main = main_battery; bp 82 drivers/power/supply/apm_power.c error = class_for_each_device(power_supply_class, NULL, &bp, bp 85 drivers/power/supply/apm_power.c main_battery = bp.main; bp 89 drivers/power/supply/apm_power.c if ((bp.max_energy_bat && bp.max_charge_bat) && bp 90 drivers/power/supply/apm_power.c (bp.max_energy_bat != bp.max_charge_bat)) { bp 92 drivers/power/supply/apm_power.c if (!PSY_PROP(bp.max_charge_bat, VOLTAGE_MAX_DESIGN, bp 93 drivers/power/supply/apm_power.c &bp.full)) { bp 94 drivers/power/supply/apm_power.c if (bp.max_energy > bp.max_charge * bp.full.intval) bp 95 drivers/power/supply/apm_power.c main_battery = bp.max_energy_bat; bp 97 drivers/power/supply/apm_power.c main_battery = bp.max_charge_bat; bp 98 drivers/power/supply/apm_power.c } else if (!PSY_PROP(bp.max_energy_bat, VOLTAGE_MAX_DESIGN, bp 99 drivers/power/supply/apm_power.c &bp.full)) { bp 100 drivers/power/supply/apm_power.c if (bp.max_charge > bp.max_energy / bp.full.intval) bp 101 drivers/power/supply/apm_power.c main_battery = bp.max_charge_bat; bp 103 drivers/power/supply/apm_power.c main_battery = bp.max_energy_bat; bp 106 drivers/power/supply/apm_power.c main_battery = bp.max_energy_bat; bp 108 drivers/power/supply/apm_power.c } else if (bp.max_charge_bat) { bp 109 drivers/power/supply/apm_power.c main_battery = bp.max_charge_bat; bp 110 drivers/power/supply/apm_power.c } else if (bp.max_energy_bat) { bp 111 drivers/power/supply/apm_power.c main_battery = bp.max_energy_bat; bp 114 drivers/power/supply/apm_power.c main_battery = bp.bat; bp 43 drivers/rtc/rtc-ds1302.c u8 *bp; bp 47 drivers/rtc/rtc-ds1302.c bp = buf; bp 48 drivers/rtc/rtc-ds1302.c *bp++ = RTC_ADDR_CTRL << 1 | RTC_CMD_WRITE; bp 49 drivers/rtc/rtc-ds1302.c *bp++ = RTC_CMD_WRITE_ENABLE; bp 57 drivers/rtc/rtc-ds1302.c bp = buf; bp 58 drivers/rtc/rtc-ds1302.c *bp++ = RTC_CLCK_BURST << 1 | RTC_CMD_WRITE; bp 60 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_sec); bp 61 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_min); bp 62 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_hour); bp 63 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_mday); bp 64 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_mon + 1); bp 65 drivers/rtc/rtc-ds1302.c *bp++ = time->tm_wday + 1; bp 66 drivers/rtc/rtc-ds1302.c *bp++ = bin2bcd(time->tm_year % 100); bp 67 drivers/rtc/rtc-ds1302.c *bp++ = RTC_CMD_WRITE_DISABLE; bp 111 drivers/rtc/rtc-ds1302.c u8 *bp; bp 151 drivers/rtc/rtc-ds1302.c bp = buf; bp 152 drivers/rtc/rtc-ds1302.c *bp++ = RTC_ADDR_CTRL << 1 | RTC_CMD_WRITE; bp 153 drivers/rtc/rtc-ds1302.c *bp++ = RTC_CMD_WRITE_DISABLE; bp 209 drivers/rtc/rtc-ds1305.c u8 *bp = buf; bp 218 drivers/rtc/rtc-ds1305.c *bp++ = DS1305_WRITE | DS1305_SEC; bp 220 drivers/rtc/rtc-ds1305.c *bp++ = bin2bcd(time->tm_sec); bp 221 drivers/rtc/rtc-ds1305.c *bp++ = bin2bcd(time->tm_min); bp 222 drivers/rtc/rtc-ds1305.c *bp++ = hour2bcd(ds1305->hr12, time->tm_hour); bp 223 drivers/rtc/rtc-ds1305.c *bp++ = (time->tm_wday < 7) ? (time->tm_wday + 1) : 1; bp 224 drivers/rtc/rtc-ds1305.c *bp++ = bin2bcd(time->tm_mday); bp 225 drivers/rtc/rtc-ds1305.c *bp++ = bin2bcd(time->tm_mon + 1); bp 226 drivers/rtc/rtc-ds1305.c *bp++ = bin2bcd(time->tm_year - 100); bp 446 drivers/sbus/char/bbc_envctrl.c static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op, bp 458 drivers/sbus/char/bbc_envctrl.c tp->client = bbc_i2c_attach(bp, op); bp 468 drivers/sbus/char/bbc_envctrl.c list_add(&tp->bp_list, &bp->temps); bp 494 drivers/sbus/char/bbc_envctrl.c static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op, bp 506 drivers/sbus/char/bbc_envctrl.c fp->client = bbc_i2c_attach(bp, op); bp 515 drivers/sbus/char/bbc_envctrl.c list_add(&fp->bp_list, &bp->fans); bp 538 drivers/sbus/char/bbc_envctrl.c static void destroy_all_temps(struct bbc_i2c_bus *bp) bp 542 drivers/sbus/char/bbc_envctrl.c list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { bp 555 drivers/sbus/char/bbc_envctrl.c static void destroy_all_fans(struct bbc_i2c_bus *bp) bp 559 drivers/sbus/char/bbc_envctrl.c list_for_each_entry_safe(fp, fpos, &bp->fans, bp_list) { bp 566 drivers/sbus/char/bbc_envctrl.c int bbc_envctrl_init(struct bbc_i2c_bus *bp) bp 573 drivers/sbus/char/bbc_envctrl.c while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { bp 575 drivers/sbus/char/bbc_envctrl.c attach_one_temp(bp, op, temp_index++); bp 577 drivers/sbus/char/bbc_envctrl.c attach_one_fan(bp, op, fan_index++); bp 585 drivers/sbus/char/bbc_envctrl.c destroy_all_temps(bp); bp 586 drivers/sbus/char/bbc_envctrl.c destroy_all_fans(bp); bp 594 drivers/sbus/char/bbc_envctrl.c void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) bp 599 drivers/sbus/char/bbc_envctrl.c destroy_all_temps(bp); bp 600 drivers/sbus/char/bbc_envctrl.c destroy_all_fans(bp); bp 54 drivers/sbus/char/bbc_i2c.c static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val) bp 59 drivers/sbus/char/bbc_i2c.c if (bp->devs[i].device == op) { bp 60 drivers/sbus/char/bbc_i2c.c bp->devs[i].client_claimed = val; bp 69 drivers/sbus/char/bbc_i2c.c struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) bp 75 drivers/sbus/char/bbc_i2c.c if (!(op = bp->devs[i].device)) bp 89 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op) bp 97 drivers/sbus/char/bbc_i2c.c client->bp = bp; bp 109 drivers/sbus/char/bbc_i2c.c claim_device(bp, op); bp 116 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp = client->bp; bp 119 drivers/sbus/char/bbc_i2c.c release_device(bp, op); bp 123 drivers/sbus/char/bbc_i2c.c static int wait_for_pin(struct bbc_i2c_bus *bp, u8 *status) bp 129 drivers/sbus/char/bbc_i2c.c bp->waiting = 1; bp 130 drivers/sbus/char/bbc_i2c.c add_wait_queue(&bp->wq, &wait); bp 135 drivers/sbus/char/bbc_i2c.c bp->wq, bp 136 drivers/sbus/char/bbc_i2c.c (((*status = readb(bp->i2c_control_regs + 0)) bp 144 drivers/sbus/char/bbc_i2c.c remove_wait_queue(&bp->wq, &wait); bp 145 drivers/sbus/char/bbc_i2c.c bp->waiting = 0; bp 152 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp = client->bp; bp 157 drivers/sbus/char/bbc_i2c.c if (bp->i2c_bussel_reg != NULL) bp 158 drivers/sbus/char/bbc_i2c.c writeb(client->bus, bp->i2c_bussel_reg); bp 160 drivers/sbus/char/bbc_i2c.c writeb(address, bp->i2c_control_regs + 0x1); bp 161 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_START, bp->i2c_control_regs + 0x0); bp 162 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 165 drivers/sbus/char/bbc_i2c.c writeb(off, bp->i2c_control_regs + 0x1); bp 166 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status) || bp 170 drivers/sbus/char/bbc_i2c.c writeb(val, bp->i2c_control_regs + 0x1); bp 171 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 177 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_STOP, bp->i2c_control_regs + 0x0); bp 183 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp = client->bp; bp 187 drivers/sbus/char/bbc_i2c.c if (bp->i2c_bussel_reg != NULL) bp 188 drivers/sbus/char/bbc_i2c.c writeb(client->bus, bp->i2c_bussel_reg); bp 190 drivers/sbus/char/bbc_i2c.c writeb(address, bp->i2c_control_regs + 0x1); bp 191 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_START, bp->i2c_control_regs + 0x0); bp 192 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 195 drivers/sbus/char/bbc_i2c.c writeb(off, bp->i2c_control_regs + 0x1); bp 196 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status) || bp 200 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_STOP, bp->i2c_control_regs + 0x0); bp 204 drivers/sbus/char/bbc_i2c.c writeb(address, bp->i2c_control_regs + 0x1); bp 205 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_START, bp->i2c_control_regs + 0x0); bp 206 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 212 drivers/sbus/char/bbc_i2c.c (void) readb(bp->i2c_control_regs + 0x1); bp 213 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 216 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_ESO | I2C_PCF_ENI, bp->i2c_control_regs + 0x0); bp 217 drivers/sbus/char/bbc_i2c.c *byte = readb(bp->i2c_control_regs + 0x1); bp 218 drivers/sbus/char/bbc_i2c.c if (wait_for_pin(bp, &status)) bp 224 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_STOP, bp->i2c_control_regs + 0x0); bp 225 drivers/sbus/char/bbc_i2c.c (void) readb(bp->i2c_control_regs + 0x1); bp 273 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp = dev_id; bp 278 drivers/sbus/char/bbc_i2c.c if (bp->waiting && bp 279 drivers/sbus/char/bbc_i2c.c !(readb(bp->i2c_control_regs + 0x0) & I2C_PCF_PIN)) bp 280 drivers/sbus/char/bbc_i2c.c wake_up_interruptible(&bp->wq); bp 285 drivers/sbus/char/bbc_i2c.c static void reset_one_i2c(struct bbc_i2c_bus *bp) bp 287 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_PIN, bp->i2c_control_regs + 0x0); bp 288 drivers/sbus/char/bbc_i2c.c writeb(bp->own, bp->i2c_control_regs + 0x1); bp 289 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_PIN | I2C_PCF_ES1, bp->i2c_control_regs + 0x0); bp 290 drivers/sbus/char/bbc_i2c.c writeb(bp->clock, bp->i2c_control_regs + 0x1); bp 291 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0); bp 296 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp; bp 300 drivers/sbus/char/bbc_i2c.c bp = kzalloc(sizeof(*bp), GFP_KERNEL); bp 301 drivers/sbus/char/bbc_i2c.c if (!bp) bp 304 drivers/sbus/char/bbc_i2c.c INIT_LIST_HEAD(&bp->temps); bp 305 drivers/sbus/char/bbc_i2c.c INIT_LIST_HEAD(&bp->fans); bp 307 drivers/sbus/char/bbc_i2c.c bp->i2c_control_regs = of_ioremap(&op->resource[0], 0, 0x2, "bbc_i2c_regs"); bp 308 drivers/sbus/char/bbc_i2c.c if (!bp->i2c_control_regs) bp 312 drivers/sbus/char/bbc_i2c.c bp->i2c_bussel_reg = of_ioremap(&op->resource[1], 0, 0x1, "bbc_i2c_bussel"); bp 313 drivers/sbus/char/bbc_i2c.c if (!bp->i2c_bussel_reg) bp 317 drivers/sbus/char/bbc_i2c.c bp->waiting = 0; bp 318 drivers/sbus/char/bbc_i2c.c init_waitqueue_head(&bp->wq); bp 320 drivers/sbus/char/bbc_i2c.c IRQF_SHARED, "bbc_i2c", bp)) bp 323 drivers/sbus/char/bbc_i2c.c bp->index = index; bp 324 drivers/sbus/char/bbc_i2c.c bp->op = op; bp 326 drivers/sbus/char/bbc_i2c.c spin_lock_init(&bp->lock); bp 335 drivers/sbus/char/bbc_i2c.c bp->devs[entry].device = child_op; bp 336 drivers/sbus/char/bbc_i2c.c bp->devs[entry].client_claimed = 0; bp 339 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_PIN, bp->i2c_control_regs + 0x0); bp 340 drivers/sbus/char/bbc_i2c.c bp->own = readb(bp->i2c_control_regs + 0x01); bp 341 drivers/sbus/char/bbc_i2c.c writeb(I2C_PCF_PIN | I2C_PCF_ES1, bp->i2c_control_regs + 0x0); bp 342 drivers/sbus/char/bbc_i2c.c bp->clock = readb(bp->i2c_control_regs + 0x01); bp 345 drivers/sbus/char/bbc_i2c.c bp->index, bp->i2c_control_regs, entry, bp->own, bp->clock); bp 347 drivers/sbus/char/bbc_i2c.c reset_one_i2c(bp); bp 349 drivers/sbus/char/bbc_i2c.c return bp; bp 352 drivers/sbus/char/bbc_i2c.c if (bp->i2c_bussel_reg) bp 353 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[1], bp->i2c_bussel_reg, 1); bp 354 drivers/sbus/char/bbc_i2c.c if (bp->i2c_control_regs) bp 355 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[0], bp->i2c_control_regs, 2); bp 356 drivers/sbus/char/bbc_i2c.c kfree(bp); bp 360 drivers/sbus/char/bbc_i2c.c extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); bp 361 drivers/sbus/char/bbc_i2c.c extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); bp 365 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp; bp 368 drivers/sbus/char/bbc_i2c.c bp = attach_one_i2c(op, index); bp 369 drivers/sbus/char/bbc_i2c.c if (!bp) bp 372 drivers/sbus/char/bbc_i2c.c err = bbc_envctrl_init(bp); bp 374 drivers/sbus/char/bbc_i2c.c free_irq(op->archdata.irqs[0], bp); bp 375 drivers/sbus/char/bbc_i2c.c if (bp->i2c_bussel_reg) bp 376 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); bp 377 drivers/sbus/char/bbc_i2c.c if (bp->i2c_control_regs) bp 378 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[1], bp->i2c_control_regs, 2); bp 379 drivers/sbus/char/bbc_i2c.c kfree(bp); bp 381 drivers/sbus/char/bbc_i2c.c dev_set_drvdata(&op->dev, bp); bp 389 drivers/sbus/char/bbc_i2c.c struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); bp 391 drivers/sbus/char/bbc_i2c.c bbc_envctrl_cleanup(bp); bp 393 drivers/sbus/char/bbc_i2c.c free_irq(op->archdata.irqs[0], bp); bp 395 drivers/sbus/char/bbc_i2c.c if (bp->i2c_bussel_reg) bp 396 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[0], bp->i2c_bussel_reg, 1); bp 397 drivers/sbus/char/bbc_i2c.c if (bp->i2c_control_regs) bp 398 drivers/sbus/char/bbc_i2c.c of_iounmap(&op->resource[1], bp->i2c_control_regs, 2); bp 400 drivers/sbus/char/bbc_i2c.c kfree(bp); bp 10 drivers/sbus/char/bbc_i2c.h struct bbc_i2c_bus *bp; bp 77 drivers/sbus/char/bbc_i2c.h extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *); bp 555 drivers/scsi/aic7xxx/aic79xx_osm.c char *bp; bp 558 drivers/scsi/aic7xxx/aic79xx_osm.c bp = &buffer[0]; bp 560 drivers/scsi/aic7xxx/aic79xx_osm.c memset(bp, 0, sizeof(buffer)); bp 561 drivers/scsi/aic7xxx/aic79xx_osm.c strcpy(bp, "Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev " AIC79XX_DRIVER_VERSION "\n" bp 563 drivers/scsi/aic7xxx/aic79xx_osm.c strcat(bp, ahd->description); bp 564 drivers/scsi/aic7xxx/aic79xx_osm.c strcat(bp, ">\n" bp 567 drivers/scsi/aic7xxx/aic79xx_osm.c strcat(bp, ahd_info); bp 569 drivers/scsi/aic7xxx/aic79xx_osm.c return (bp); bp 499 drivers/scsi/aic7xxx/aic7xxx_osm.c char *bp; bp 502 drivers/scsi/aic7xxx/aic7xxx_osm.c bp = &buffer[0]; bp 504 drivers/scsi/aic7xxx/aic7xxx_osm.c memset(bp, 0, sizeof(buffer)); bp 505 drivers/scsi/aic7xxx/aic7xxx_osm.c strcpy(bp, "Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev " AIC7XXX_DRIVER_VERSION "\n" bp 507 drivers/scsi/aic7xxx/aic7xxx_osm.c strcat(bp, ahc->description); bp 508 drivers/scsi/aic7xxx/aic7xxx_osm.c strcat(bp, ">\n" bp 511 drivers/scsi/aic7xxx/aic7xxx_osm.c strcat(bp, ahc_info); bp 512 drivers/scsi/aic7xxx/aic7xxx_osm.c strcat(bp, "\n"); bp 514 drivers/scsi/aic7xxx/aic7xxx_osm.c return (bp); bp 654 drivers/scsi/bfa/bfad_im.c struct bfad_fcp_binding *bp, *bp_new; bp 659 drivers/scsi/bfa/bfad_im.c list_for_each_entry_safe(bp, bp_new, &im_port->binding_list, bp 661 drivers/scsi/bfa/bfad_im.c list_del(&bp->list_entry); bp 662 drivers/scsi/bfa/bfad_im.c kfree(bp); bp 1400 drivers/scsi/ips.c char *bp; bp 1410 drivers/scsi/ips.c bp = &buffer[0]; bp 1411 drivers/scsi/ips.c memset(bp, 0, sizeof (buffer)); bp 1413 drivers/scsi/ips.c sprintf(bp, "%s%s%s Build %d", "IBM PCI ServeRAID ", bp 1417 drivers/scsi/ips.c strcat(bp, " <"); bp 1418 drivers/scsi/ips.c strcat(bp, ips_adapter_name[ha->ad_type - 1]); bp 1419 drivers/scsi/ips.c strcat(bp, ">"); bp 1422 drivers/scsi/ips.c return (bp); bp 383 drivers/scsi/libfc/fc_disc.c char *bp; bp 396 drivers/scsi/libfc/fc_disc.c bp = buf; bp 398 drivers/scsi/libfc/fc_disc.c np = (struct fc_gpn_ft_resp *)bp; bp 409 drivers/scsi/libfc/fc_disc.c memcpy((char *)np + tlen, bp, plen); bp 415 drivers/scsi/libfc/fc_disc.c bp -= tlen; bp 454 drivers/scsi/libfc/fc_disc.c bp += sizeof(*np); bp 455 drivers/scsi/libfc/fc_disc.c np = (struct fc_gpn_ft_resp *)bp; bp 26 drivers/scsi/libfc/fc_frame.c const u8 *bp; bp 32 drivers/scsi/libfc/fc_frame.c bp = (const u8 *) fr_hdr(fp); bp 33 drivers/scsi/libfc/fc_frame.c crc = ~crc32(~0, bp, len); bp 665 drivers/scsi/qla1280.c char *bp; bp 669 drivers/scsi/qla1280.c bp = &qla1280_scsi_name_buffer[0]; bp 672 drivers/scsi/qla1280.c memset(bp, 0, sizeof(qla1280_scsi_name_buffer)); bp 674 drivers/scsi/qla1280.c sprintf (bp, bp 679 drivers/scsi/qla1280.c return bp; bp 5051 drivers/scsi/qla2xxx/qla_init.c u32 *bp, i, sz; bp 5059 drivers/scsi/qla2xxx/qla_init.c bp = (uint32_t *)ha->init_cb; bp 5060 drivers/scsi/qla2xxx/qla_init.c for (i = 0; i < sz/4 ; i++, bp++) bp 5061 drivers/scsi/qla2xxx/qla_init.c *bp = cpu_to_be32(*bp); bp 4794 drivers/scsi/qla2xxx/qla_mbx.c uint32_t *bp; bp 4821 drivers/scsi/qla2xxx/qla_mbx.c bp = (uint32_t *) buf; bp 4822 drivers/scsi/qla2xxx/qla_mbx.c for (i = 0; i < (bufsiz-4)/4; i++, bp++) bp 4823 drivers/scsi/qla2xxx/qla_mbx.c *bp = le32_to_cpu(*bp); bp 310 drivers/scsi/scsi_common.c int scsi_set_sense_field_pointer(u8 *buf, int buf_len, u16 fp, u8 bp, bool cd) bp 331 drivers/scsi/scsi_common.c if (bp < 0x8) bp 332 drivers/scsi/scsi_common.c ucp[4] |= 0x8 | bp; bp 342 drivers/scsi/scsi_common.c if (bp < 0x8) bp 343 drivers/scsi/scsi_common.c buf[15] |= 0x8 | bp; bp 3384 drivers/scsi/st.c unsigned char *bp; bp 3398 drivers/scsi/st.c bp = (STp->buffer)->b_data; bp 3399 drivers/scsi/st.c pgo = MODE_HEADER_LENGTH + bp[MH_OFF_BDESCS_LENGTH]; bp 3401 drivers/scsi/st.c bp[pgo + MP_OFF_PAGE_LENGTH] + 2); bp 3403 drivers/scsi/st.c psd_cnt = (bp[pgo + MP_OFF_PAGE_LENGTH] + 2 - PART_PAGE_FIXED_LENGTH) / 2; bp 3406 drivers/scsi/st.c needs_format = (bp[pgo + PP_OFF_FLAGS] & PP_MSK_POFM) != 0; bp 3417 drivers/scsi/st.c if ((bp[pgo + PP_OFF_FLAGS] & PP_MSK_PSUM_UNITS) == PP_MSK_PSUM_UNITS) { bp 3447 drivers/scsi/st.c (psd_cnt > bp[pgo + PP_OFF_MAX_ADD_PARTS] || bp 3448 drivers/scsi/st.c bp[pgo + PP_OFF_MAX_ADD_PARTS] != 1)) { bp 3449 drivers/scsi/st.c bp[psdo] = bp[psdo + 1] = 0xff; /* Rest to partition 0 */ bp 3452 drivers/scsi/st.c memset(bp + psdo, 0, bp[pgo + PP_OFF_NBR_ADD_PARTS] * 2); bp 3455 drivers/scsi/st.c psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS], bp 3456 drivers/scsi/st.c bp[pgo + PP_OFF_NBR_ADD_PARTS]); bp 3459 drivers/scsi/st.c bp[pgo + PP_OFF_NBR_ADD_PARTS] = 0; bp 3460 drivers/scsi/st.c if (psd_cnt <= bp[pgo + PP_OFF_MAX_ADD_PARTS]) bp 3461 drivers/scsi/st.c bp[pgo + MP_OFF_PAGE_LENGTH] = 6; bp 3464 drivers/scsi/st.c bp[psdo] = (size >> 8) & 0xff; bp 3465 drivers/scsi/st.c bp[psdo + 1] = size & 0xff; bp 3467 drivers/scsi/st.c bp[psdo + 2] = bp[psdo + 3] = 0xff; bp 3468 drivers/scsi/st.c bp[pgo + 3] = 1; bp 3469 drivers/scsi/st.c if (bp[pgo + MP_OFF_PAGE_LENGTH] < 8) bp 3470 drivers/scsi/st.c bp[pgo + MP_OFF_PAGE_LENGTH] = 8; bp 3475 drivers/scsi/st.c bp[pgo + PP_OFF_PART_UNITS] = 0; bp 3476 drivers/scsi/st.c bp[pgo + PP_OFF_RESERVED] = 0; bp 3478 drivers/scsi/st.c bp[pgo + PP_OFF_FLAGS] = PP_BIT_IDP | psum | bp 3479 drivers/scsi/st.c (bp[pgo + PP_OFF_FLAGS] & 0x07); bp 3480 drivers/scsi/st.c bp[pgo + PP_OFF_PART_UNITS] = units; bp 3482 drivers/scsi/st.c bp[pgo + PP_OFF_FLAGS] = PP_BIT_FDP | bp 3483 drivers/scsi/st.c (bp[pgo + PP_OFF_FLAGS] & 0x1f); bp 3484 drivers/scsi/st.c bp[pgo + MP_OFF_PAGE_LENGTH] = 6 + psd_cnt * 2; bp 2055 drivers/scsi/wd33c93.c char *bp; bp 2076 drivers/scsi/wd33c93.c for (bp = buf; *bp; ) { bp 2077 drivers/scsi/wd33c93.c while (',' == *bp || ' ' == *bp) bp 2078 drivers/scsi/wd33c93.c ++bp; bp 2079 drivers/scsi/wd33c93.c if (!strncmp(bp, "debug:", 6)) { bp 2080 drivers/scsi/wd33c93.c hd->args = simple_strtoul(bp+6, &bp, 0) & DB_MASK; bp 2081 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "disconnect:", 11)) { bp 2082 drivers/scsi/wd33c93.c x = simple_strtoul(bp+11, &bp, 0); bp 2086 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "period:", 7)) { bp 2087 drivers/scsi/wd33c93.c x = simple_strtoul(bp+7, &bp, 0); bp 2091 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "resync:", 7)) { bp 2092 drivers/scsi/wd33c93.c set_resync(hd, (int)simple_strtoul(bp+7, &bp, 0)); bp 2093 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "proc:", 5)) { bp 2094 drivers/scsi/wd33c93.c hd->proc = simple_strtoul(bp+5, &bp, 0); bp 2095 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "nodma:", 6)) { bp 2096 drivers/scsi/wd33c93.c hd->no_dma = simple_strtoul(bp+6, &bp, 0); bp 2097 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "level2:", 7)) { bp 2098 drivers/scsi/wd33c93.c hd->level2 = simple_strtoul(bp+7, &bp, 0); bp 2099 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "burst:", 6)) { bp 2101 drivers/scsi/wd33c93.c simple_strtol(bp+6, &bp, 0) ? CTRL_BURST:CTRL_DMA; bp 2102 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "fast:", 5)) { bp 2103 drivers/scsi/wd33c93.c x = !!simple_strtol(bp+5, &bp, 0); bp 2107 drivers/scsi/wd33c93.c } else if (!strncmp(bp, "nosync:", 7)) { bp 2108 drivers/scsi/wd33c93.c x = simple_strtoul(bp+7, &bp, 0); bp 100 drivers/spi/spi-tle62x0.c char *bp = buf; bp 122 drivers/spi/spi-tle62x0.c bp += sprintf(bp, "%s ", decode_fault(fault >> (ptr * 2))); bp 125 drivers/spi/spi-tle62x0.c *bp++ = '\n'; bp 128 drivers/spi/spi-tle62x0.c return bp - buf; bp 21 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp, *hp; bp 28 drivers/staging/exfat/exfat_cache.c for (bp = hp->hash_next; bp != hp; bp = bp->hash_next) { bp 29 drivers/staging/exfat/exfat_cache.c if ((bp->drv == p_fs->drv) && (bp->sec == sec)) { bp 30 drivers/staging/exfat/exfat_cache.c WARN(!bp->buf_bh, bp 33 drivers/staging/exfat/exfat_cache.c touch_buffer(bp->buf_bh); bp 34 drivers/staging/exfat/exfat_cache.c return bp; bp 40 drivers/staging/exfat/exfat_cache.c static void push_to_mru(struct buf_cache_t *bp, struct buf_cache_t *list) bp 42 drivers/staging/exfat/exfat_cache.c bp->next = list->next; bp 43 drivers/staging/exfat/exfat_cache.c bp->prev = list; bp 44 drivers/staging/exfat/exfat_cache.c list->next->prev = bp; bp 45 drivers/staging/exfat/exfat_cache.c list->next = bp; bp 48 drivers/staging/exfat/exfat_cache.c static void push_to_lru(struct buf_cache_t *bp, struct buf_cache_t *list) bp 50 drivers/staging/exfat/exfat_cache.c bp->prev = list->prev; bp 51 drivers/staging/exfat/exfat_cache.c bp->next = list; bp 52 drivers/staging/exfat/exfat_cache.c list->prev->next = bp; bp 53 drivers/staging/exfat/exfat_cache.c list->prev = bp; bp 56 drivers/staging/exfat/exfat_cache.c static void move_to_mru(struct buf_cache_t *bp, struct buf_cache_t *list) bp 58 drivers/staging/exfat/exfat_cache.c bp->prev->next = bp->next; bp 59 drivers/staging/exfat/exfat_cache.c bp->next->prev = bp->prev; bp 60 drivers/staging/exfat/exfat_cache.c push_to_mru(bp, list); bp 63 drivers/staging/exfat/exfat_cache.c static void move_to_lru(struct buf_cache_t *bp, struct buf_cache_t *list) bp 65 drivers/staging/exfat/exfat_cache.c bp->prev->next = bp->next; bp 66 drivers/staging/exfat/exfat_cache.c bp->next->prev = bp->prev; bp 67 drivers/staging/exfat/exfat_cache.c push_to_lru(bp, list); bp 72 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 75 drivers/staging/exfat/exfat_cache.c bp = p_fs->FAT_cache_lru_list.prev; bp 77 drivers/staging/exfat/exfat_cache.c move_to_mru(bp, &p_fs->FAT_cache_lru_list); bp 78 drivers/staging/exfat/exfat_cache.c return bp; bp 82 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp) bp 89 drivers/staging/exfat/exfat_cache.c off = (bp->sec + bp 90 drivers/staging/exfat/exfat_cache.c (bp->sec >> p_fs->sectors_per_clu_bits)) & bp 94 drivers/staging/exfat/exfat_cache.c bp->hash_next = hp->hash_next; bp 95 drivers/staging/exfat/exfat_cache.c bp->hash_prev = hp; bp 96 drivers/staging/exfat/exfat_cache.c hp->hash_next->hash_prev = bp; bp 97 drivers/staging/exfat/exfat_cache.c hp->hash_next = bp; bp 100 drivers/staging/exfat/exfat_cache.c static void FAT_cache_remove_hash(struct buf_cache_t *bp) bp 102 drivers/staging/exfat/exfat_cache.c (bp->hash_prev)->hash_next = bp->hash_next; bp 103 drivers/staging/exfat/exfat_cache.c (bp->hash_next)->hash_prev = bp->hash_prev; bp 107 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp) bp 114 drivers/staging/exfat/exfat_cache.c off = (bp->sec + bp 115 drivers/staging/exfat/exfat_cache.c (bp->sec >> p_fs->sectors_per_clu_bits)) & bp 119 drivers/staging/exfat/exfat_cache.c bp->hash_next = hp->hash_next; bp 120 drivers/staging/exfat/exfat_cache.c bp->hash_prev = hp; bp 121 drivers/staging/exfat/exfat_cache.c hp->hash_next->hash_prev = bp; bp 122 drivers/staging/exfat/exfat_cache.c hp->hash_next = bp; bp 125 drivers/staging/exfat/exfat_cache.c static void buf_cache_remove_hash(struct buf_cache_t *bp) bp 127 drivers/staging/exfat/exfat_cache.c (bp->hash_prev)->hash_next = bp->hash_next; bp 128 drivers/staging/exfat/exfat_cache.c (bp->hash_next)->hash_prev = bp->hash_prev; bp 446 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 449 drivers/staging/exfat/exfat_cache.c bp = FAT_cache_find(sb, sec); bp 450 drivers/staging/exfat/exfat_cache.c if (bp) { bp 451 drivers/staging/exfat/exfat_cache.c move_to_mru(bp, &p_fs->FAT_cache_lru_list); bp 452 drivers/staging/exfat/exfat_cache.c return bp->buf_bh->b_data; bp 455 drivers/staging/exfat/exfat_cache.c bp = FAT_cache_get(sb, sec); bp 457 drivers/staging/exfat/exfat_cache.c FAT_cache_remove_hash(bp); bp 459 drivers/staging/exfat/exfat_cache.c bp->drv = p_fs->drv; bp 460 drivers/staging/exfat/exfat_cache.c bp->sec = sec; bp 461 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 463 drivers/staging/exfat/exfat_cache.c FAT_cache_insert_hash(sb, bp); bp 465 drivers/staging/exfat/exfat_cache.c if (sector_read(sb, sec, &bp->buf_bh, 1) != FFS_SUCCESS) { bp 466 drivers/staging/exfat/exfat_cache.c FAT_cache_remove_hash(bp); bp 467 drivers/staging/exfat/exfat_cache.c bp->drv = -1; bp 468 drivers/staging/exfat/exfat_cache.c bp->sec = ~0; bp 469 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 470 drivers/staging/exfat/exfat_cache.c bp->buf_bh = NULL; bp 472 drivers/staging/exfat/exfat_cache.c move_to_lru(bp, &p_fs->FAT_cache_lru_list); bp 476 drivers/staging/exfat/exfat_cache.c return bp->buf_bh->b_data; bp 481 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 483 drivers/staging/exfat/exfat_cache.c bp = FAT_cache_find(sb, sec); bp 484 drivers/staging/exfat/exfat_cache.c if (bp) bp 485 drivers/staging/exfat/exfat_cache.c sector_write(sb, sec, bp->buf_bh, 0); bp 490 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 495 drivers/staging/exfat/exfat_cache.c bp = p_fs->FAT_cache_lru_list.next; bp 496 drivers/staging/exfat/exfat_cache.c while (bp != &p_fs->FAT_cache_lru_list) { bp 497 drivers/staging/exfat/exfat_cache.c if (bp->drv == p_fs->drv) { bp 498 drivers/staging/exfat/exfat_cache.c bp->drv = -1; bp 499 drivers/staging/exfat/exfat_cache.c bp->sec = ~0; bp 500 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 502 drivers/staging/exfat/exfat_cache.c if (bp->buf_bh) { bp 503 drivers/staging/exfat/exfat_cache.c __brelse(bp->buf_bh); bp 504 drivers/staging/exfat/exfat_cache.c bp->buf_bh = NULL; bp 507 drivers/staging/exfat/exfat_cache.c bp = bp->next; bp 515 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 520 drivers/staging/exfat/exfat_cache.c bp = p_fs->FAT_cache_lru_list.next; bp 521 drivers/staging/exfat/exfat_cache.c while (bp != &p_fs->FAT_cache_lru_list) { bp 522 drivers/staging/exfat/exfat_cache.c if ((bp->drv == p_fs->drv) && (bp->flag & DIRTYBIT)) { bp 523 drivers/staging/exfat/exfat_cache.c sync_dirty_buffer(bp->buf_bh); bp 524 drivers/staging/exfat/exfat_cache.c bp->flag &= ~(DIRTYBIT); bp 526 drivers/staging/exfat/exfat_cache.c bp = bp->next; bp 535 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp, *hp; bp 542 drivers/staging/exfat/exfat_cache.c for (bp = hp->hash_next; bp != hp; bp = bp->hash_next) { bp 543 drivers/staging/exfat/exfat_cache.c if ((bp->drv == p_fs->drv) && (bp->sec == sec)) { bp 544 drivers/staging/exfat/exfat_cache.c touch_buffer(bp->buf_bh); bp 545 drivers/staging/exfat/exfat_cache.c return bp; bp 553 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 556 drivers/staging/exfat/exfat_cache.c bp = p_fs->buf_cache_lru_list.prev; bp 557 drivers/staging/exfat/exfat_cache.c while (bp->flag & LOCKBIT) bp 558 drivers/staging/exfat/exfat_cache.c bp = bp->prev; bp 560 drivers/staging/exfat/exfat_cache.c move_to_mru(bp, &p_fs->buf_cache_lru_list); bp 561 drivers/staging/exfat/exfat_cache.c return bp; bp 566 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 569 drivers/staging/exfat/exfat_cache.c bp = buf_cache_find(sb, sec); bp 570 drivers/staging/exfat/exfat_cache.c if (bp) { bp 571 drivers/staging/exfat/exfat_cache.c move_to_mru(bp, &p_fs->buf_cache_lru_list); bp 572 drivers/staging/exfat/exfat_cache.c return bp->buf_bh->b_data; bp 575 drivers/staging/exfat/exfat_cache.c bp = buf_cache_get(sb, sec); bp 577 drivers/staging/exfat/exfat_cache.c buf_cache_remove_hash(bp); bp 579 drivers/staging/exfat/exfat_cache.c bp->drv = p_fs->drv; bp 580 drivers/staging/exfat/exfat_cache.c bp->sec = sec; bp 581 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 583 drivers/staging/exfat/exfat_cache.c buf_cache_insert_hash(sb, bp); bp 585 drivers/staging/exfat/exfat_cache.c if (sector_read(sb, sec, &bp->buf_bh, 1) != FFS_SUCCESS) { bp 586 drivers/staging/exfat/exfat_cache.c buf_cache_remove_hash(bp); bp 587 drivers/staging/exfat/exfat_cache.c bp->drv = -1; bp 588 drivers/staging/exfat/exfat_cache.c bp->sec = ~0; bp 589 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 590 drivers/staging/exfat/exfat_cache.c bp->buf_bh = NULL; bp 592 drivers/staging/exfat/exfat_cache.c move_to_lru(bp, &p_fs->buf_cache_lru_list); bp 596 drivers/staging/exfat/exfat_cache.c return bp->buf_bh->b_data; bp 612 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 616 drivers/staging/exfat/exfat_cache.c bp = buf_cache_find(sb, sec); bp 617 drivers/staging/exfat/exfat_cache.c if (likely(bp)) bp 618 drivers/staging/exfat/exfat_cache.c sector_write(sb, sec, bp->buf_bh, 0); bp 620 drivers/staging/exfat/exfat_cache.c WARN(!bp, "[EXFAT] failed to find buffer_cache(sector:%llu).\n", bp 628 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 632 drivers/staging/exfat/exfat_cache.c bp = buf_cache_find(sb, sec); bp 633 drivers/staging/exfat/exfat_cache.c if (likely(bp)) bp 634 drivers/staging/exfat/exfat_cache.c bp->flag |= LOCKBIT; bp 636 drivers/staging/exfat/exfat_cache.c WARN(!bp, "[EXFAT] failed to find buffer_cache(sector:%llu).\n", bp 644 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 648 drivers/staging/exfat/exfat_cache.c bp = buf_cache_find(sb, sec); bp 649 drivers/staging/exfat/exfat_cache.c if (likely(bp)) bp 650 drivers/staging/exfat/exfat_cache.c bp->flag &= ~(LOCKBIT); bp 652 drivers/staging/exfat/exfat_cache.c WARN(!bp, "[EXFAT] failed to find buffer_cache(sector:%llu).\n", bp 660 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 665 drivers/staging/exfat/exfat_cache.c bp = buf_cache_find(sb, sec); bp 666 drivers/staging/exfat/exfat_cache.c if (likely(bp)) { bp 667 drivers/staging/exfat/exfat_cache.c bp->drv = -1; bp 668 drivers/staging/exfat/exfat_cache.c bp->sec = ~0; bp 669 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 671 drivers/staging/exfat/exfat_cache.c if (bp->buf_bh) { bp 672 drivers/staging/exfat/exfat_cache.c __brelse(bp->buf_bh); bp 673 drivers/staging/exfat/exfat_cache.c bp->buf_bh = NULL; bp 676 drivers/staging/exfat/exfat_cache.c move_to_lru(bp, &p_fs->buf_cache_lru_list); bp 684 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 689 drivers/staging/exfat/exfat_cache.c bp = p_fs->buf_cache_lru_list.next; bp 690 drivers/staging/exfat/exfat_cache.c while (bp != &p_fs->buf_cache_lru_list) { bp 691 drivers/staging/exfat/exfat_cache.c if (bp->drv == p_fs->drv) { bp 692 drivers/staging/exfat/exfat_cache.c bp->drv = -1; bp 693 drivers/staging/exfat/exfat_cache.c bp->sec = ~0; bp 694 drivers/staging/exfat/exfat_cache.c bp->flag = 0; bp 696 drivers/staging/exfat/exfat_cache.c if (bp->buf_bh) { bp 697 drivers/staging/exfat/exfat_cache.c __brelse(bp->buf_bh); bp 698 drivers/staging/exfat/exfat_cache.c bp->buf_bh = NULL; bp 701 drivers/staging/exfat/exfat_cache.c bp = bp->next; bp 709 drivers/staging/exfat/exfat_cache.c struct buf_cache_t *bp; bp 714 drivers/staging/exfat/exfat_cache.c bp = p_fs->buf_cache_lru_list.next; bp 715 drivers/staging/exfat/exfat_cache.c while (bp != &p_fs->buf_cache_lru_list) { bp 716 drivers/staging/exfat/exfat_cache.c if ((bp->drv == p_fs->drv) && (bp->flag & DIRTYBIT)) { bp 717 drivers/staging/exfat/exfat_cache.c sync_dirty_buffer(bp->buf_bh); bp 718 drivers/staging/exfat/exfat_cache.c bp->flag &= ~(DIRTYBIT); bp 720 drivers/staging/exfat/exfat_cache.c bp = bp->next; bp 189 drivers/staging/ks7010/ks_hostif.c static u8 read_ie(unsigned char *bp, u8 max, u8 *body) bp 191 drivers/staging/ks7010/ks_hostif.c u8 size = (*(bp + 1) <= max) ? *(bp + 1) : max; bp 193 drivers/staging/ks7010/ks_hostif.c memcpy(body, bp + 2, size); bp 262 drivers/staging/ks7010/ks_hostif.c unsigned char *bp; bp 274 drivers/staging/ks7010/ks_hostif.c bp = ap_info->body; bp 279 drivers/staging/ks7010/ks_hostif.c switch (*bp) { /* Information Element ID */ bp 281 drivers/staging/ks7010/ks_hostif.c ap->ssid.size = read_ie(bp, IEEE80211_MAX_SSID_LEN, bp 286 drivers/staging/ks7010/ks_hostif.c if ((*(bp + 1) + ap->rate_set.size) <= bp 289 drivers/staging/ks7010/ks_hostif.c bp + 2, *(bp + 1)); bp 290 drivers/staging/ks7010/ks_hostif.c ap->rate_set.size += *(bp + 1); bp 293 drivers/staging/ks7010/ks_hostif.c bp + 2, bp 300 drivers/staging/ks7010/ks_hostif.c ap->rsn_ie.id = *bp; bp 301 drivers/staging/ks7010/ks_hostif.c ap->rsn_ie.size = read_ie(bp, RSN_IE_BODY_MAX, bp 306 drivers/staging/ks7010/ks_hostif.c if (memcmp(bp + 2, CIPHER_ID_WPA_WEP40, 4) == 0) { bp 307 drivers/staging/ks7010/ks_hostif.c ap->wpa_ie.id = *bp; bp 308 drivers/staging/ks7010/ks_hostif.c ap->wpa_ie.size = read_ie(bp, RSN_IE_BODY_MAX, bp 322 drivers/staging/ks7010/ks_hostif.c "unknown Element ID=%d\n", *bp); bp 327 drivers/staging/ks7010/ks_hostif.c offset += *(bp + 1); /* +size offset */ bp 328 drivers/staging/ks7010/ks_hostif.c bp += (*(bp + 1) + 2); /* pointer update */ bp 780 drivers/tty/isicom.c static inline void isicom_setup_board(struct isi_board *bp) bp 785 drivers/tty/isicom.c bp->count++; bp 786 drivers/tty/isicom.c if (!(bp->status & BOARD_INIT)) { bp 787 drivers/tty/isicom.c port = bp->ports; bp 788 drivers/tty/isicom.c for (channel = 0; channel < bp->port_count; channel++, port++) bp 791 drivers/tty/isicom.c bp->status |= BOARD_ACTIVE | BOARD_INIT; bp 193 drivers/tty/vt/selection.c char *bp, *obp; bp 314 drivers/tty/vt/selection.c bp = kmalloc_array((sel_end - sel_start) / 2 + 1, multiplier, bp 316 drivers/tty/vt/selection.c if (!bp) { bp 322 drivers/tty/vt/selection.c sel_buffer = bp; bp 324 drivers/tty/vt/selection.c obp = bp; bp 328 drivers/tty/vt/selection.c bp += store_utf8(c, bp); bp 330 drivers/tty/vt/selection.c *bp++ = c; bp 332 drivers/tty/vt/selection.c obp = bp; bp 336 drivers/tty/vt/selection.c if (obp != bp) { bp 337 drivers/tty/vt/selection.c bp = obp; bp 338 drivers/tty/vt/selection.c *bp++ = '\r'; bp 340 drivers/tty/vt/selection.c obp = bp; bp 343 drivers/tty/vt/selection.c sel_buffer_lth = bp - sel_buffer; bp 989 drivers/usb/atm/cxacru.c const struct firmware *bp) bp 1035 drivers/usb/atm/cxacru.c ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size); bp 1099 drivers/usb/atm/cxacru.c const struct firmware *fw, *bp; bp 1109 drivers/usb/atm/cxacru.c ret = cxacru_find_firmware(instance, "bp", &bp); bp 1117 drivers/usb/atm/cxacru.c cxacru_upload_firmware(instance, fw, bp); bp 1120 drivers/usb/atm/cxacru.c release_firmware(bp); bp 287 fs/afs/cmservice.c __be32 *bp; bp 333 fs/afs/cmservice.c bp = call->buffer; bp 335 fs/afs/cmservice.c cb->fid.vid = ntohl(*bp++); bp 336 fs/afs/cmservice.c cb->fid.vnode = ntohl(*bp++); bp 337 fs/afs/cmservice.c cb->fid.unique = ntohl(*bp++); bp 653 fs/afs/cmservice.c struct yfs_xdr_YFSFid *bp; bp 700 fs/afs/cmservice.c bp = call->buffer; bp 702 fs/afs/cmservice.c cb->fid.vid = xdr_to_u64(bp->volume); bp 703 fs/afs/cmservice.c cb->fid.vnode = xdr_to_u64(bp->vnode.lo); bp 704 fs/afs/cmservice.c cb->fid.vnode_hi = ntohl(bp->vnode.hi); bp 705 fs/afs/cmservice.c cb->fid.unique = ntohl(bp->vnode.unique); bp 706 fs/afs/cmservice.c bp++; bp 28 fs/afs/fsclient.c const __be32 *bp = *_bp; bp 30 fs/afs/fsclient.c fid->vid = ntohl(*bp++); bp 31 fs/afs/fsclient.c fid->vnode = ntohl(*bp++); bp 32 fs/afs/fsclient.c fid->unique = ntohl(*bp++); bp 33 fs/afs/fsclient.c *_bp = bp; bp 39 fs/afs/fsclient.c static void xdr_dump_bad(const __be32 *bp) bp 46 fs/afs/fsclient.c memcpy(x, bp, 16); bp 47 fs/afs/fsclient.c bp += 4; bp 52 fs/afs/fsclient.c memcpy(x, bp, 4); bp 150 fs/afs/fsclient.c const __be32 *bp = *_bp; bp 152 fs/afs/fsclient.c bp++; /* version */ bp 153 fs/afs/fsclient.c cb->expires_at = xdr_decode_expiry(call, ntohl(*bp++)); bp 154 fs/afs/fsclient.c bp++; /* type */ bp 156 fs/afs/fsclient.c *_bp = bp; bp 165 fs/afs/fsclient.c const __be32 *bp = *_bp; bp 168 fs/afs/fsclient.c creation = ntohl(*bp++); bp 169 fs/afs/fsclient.c bp++; /* spare2 */ bp 170 fs/afs/fsclient.c bp++; /* spare3 */ bp 171 fs/afs/fsclient.c bp++; /* spare4 */ bp 172 fs/afs/fsclient.c bp++; /* spare5 */ bp 173 fs/afs/fsclient.c bp++; /* spare6 */ bp 174 fs/afs/fsclient.c *_bp = bp; bp 185 fs/afs/fsclient.c __be32 *bp = *_bp; bp 209 fs/afs/fsclient.c *bp++ = htonl(mask); bp 210 fs/afs/fsclient.c *bp++ = htonl(mtime); bp 211 fs/afs/fsclient.c *bp++ = htonl(owner); bp 212 fs/afs/fsclient.c *bp++ = htonl(group); bp 213 fs/afs/fsclient.c *bp++ = htonl(mode); bp 214 fs/afs/fsclient.c *bp++ = 0; /* segment size */ bp 215 fs/afs/fsclient.c *_bp = bp; bp 224 fs/afs/fsclient.c const __be32 *bp = *_bp; bp 226 fs/afs/fsclient.c vs->vid = ntohl(*bp++); bp 227 fs/afs/fsclient.c vs->parent_id = ntohl(*bp++); bp 228 fs/afs/fsclient.c vs->online = ntohl(*bp++); bp 229 fs/afs/fsclient.c vs->in_service = ntohl(*bp++); bp 230 fs/afs/fsclient.c vs->blessed = ntohl(*bp++); bp 231 fs/afs/fsclient.c vs->needs_salvage = ntohl(*bp++); bp 232 fs/afs/fsclient.c vs->type = ntohl(*bp++); bp 233 fs/afs/fsclient.c vs->min_quota = ntohl(*bp++); bp 234 fs/afs/fsclient.c vs->max_quota = ntohl(*bp++); bp 235 fs/afs/fsclient.c vs->blocks_in_use = ntohl(*bp++); bp 236 fs/afs/fsclient.c vs->part_blocks_avail = ntohl(*bp++); bp 237 fs/afs/fsclient.c vs->part_max_blocks = ntohl(*bp++); bp 240 fs/afs/fsclient.c *_bp = bp; bp 248 fs/afs/fsclient.c const __be32 *bp; bp 256 fs/afs/fsclient.c bp = call->buffer; bp 257 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 260 fs/afs/fsclient.c xdr_decode_AFSCallBack(&bp, call, call->out_scb); bp 261 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 286 fs/afs/fsclient.c __be32 *bp; bp 306 fs/afs/fsclient.c bp = call->request; bp 307 fs/afs/fsclient.c bp[0] = htonl(FSFETCHSTATUS); bp 308 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 309 fs/afs/fsclient.c bp[2] = htonl(vnode->fid.vnode); bp 310 fs/afs/fsclient.c bp[3] = htonl(vnode->fid.unique); bp 326 fs/afs/fsclient.c const __be32 *bp; bp 421 fs/afs/fsclient.c bp = call->buffer; bp 422 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 425 fs/afs/fsclient.c xdr_decode_AFSCallBack(&bp, call, call->out_scb); bp 426 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 487 fs/afs/fsclient.c __be32 *bp; bp 501 fs/afs/fsclient.c bp = call->request; bp 502 fs/afs/fsclient.c bp[0] = htonl(FSFETCHDATA64); bp 503 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 504 fs/afs/fsclient.c bp[2] = htonl(vnode->fid.vnode); bp 505 fs/afs/fsclient.c bp[3] = htonl(vnode->fid.unique); bp 506 fs/afs/fsclient.c bp[4] = htonl(upper_32_bits(req->pos)); bp 507 fs/afs/fsclient.c bp[5] = htonl(lower_32_bits(req->pos)); bp 508 fs/afs/fsclient.c bp[6] = 0; bp 509 fs/afs/fsclient.c bp[7] = htonl(lower_32_bits(req->len)); bp 529 fs/afs/fsclient.c __be32 *bp; bp 551 fs/afs/fsclient.c bp = call->request; bp 552 fs/afs/fsclient.c bp[0] = htonl(FSFETCHDATA); bp 553 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 554 fs/afs/fsclient.c bp[2] = htonl(vnode->fid.vnode); bp 555 fs/afs/fsclient.c bp[3] = htonl(vnode->fid.unique); bp 556 fs/afs/fsclient.c bp[4] = htonl(lower_32_bits(req->pos)); bp 557 fs/afs/fsclient.c bp[5] = htonl(lower_32_bits(req->len)); bp 572 fs/afs/fsclient.c const __be32 *bp; bp 580 fs/afs/fsclient.c bp = call->buffer; bp 581 fs/afs/fsclient.c xdr_decode_AFSFid(&bp, call->out_fid); bp 582 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 585 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_dir_scb); bp 588 fs/afs/fsclient.c xdr_decode_AFSCallBack(&bp, call, call->out_scb); bp 589 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 626 fs/afs/fsclient.c __be32 *bp; bp 655 fs/afs/fsclient.c bp = call->request; bp 656 fs/afs/fsclient.c *bp++ = htonl(S_ISDIR(mode) ? FSMAKEDIR : FSCREATEFILE); bp 657 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vid); bp 658 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vnode); bp 659 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.unique); bp 660 fs/afs/fsclient.c *bp++ = htonl(namesz); bp 661 fs/afs/fsclient.c memcpy(bp, name, namesz); bp 662 fs/afs/fsclient.c bp = (void *) bp + namesz; bp 664 fs/afs/fsclient.c memset(bp, 0, padsz); bp 665 fs/afs/fsclient.c bp = (void *) bp + padsz; bp 667 fs/afs/fsclient.c *bp++ = htonl(AFS_SET_MODE | AFS_SET_MTIME); bp 668 fs/afs/fsclient.c *bp++ = htonl(dvnode->vfs_inode.i_mtime.tv_sec); /* mtime */ bp 669 fs/afs/fsclient.c *bp++ = 0; /* owner */ bp 670 fs/afs/fsclient.c *bp++ = 0; /* group */ bp 671 fs/afs/fsclient.c *bp++ = htonl(mode & S_IALLUGO); /* unix mode */ bp 672 fs/afs/fsclient.c *bp++ = 0; /* segment size */ bp 687 fs/afs/fsclient.c const __be32 *bp; bp 695 fs/afs/fsclient.c bp = call->buffer; bp 696 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_dir_scb); bp 699 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 732 fs/afs/fsclient.c __be32 *bp; bp 753 fs/afs/fsclient.c bp = call->request; bp 754 fs/afs/fsclient.c *bp++ = htonl(isdir ? FSREMOVEDIR : FSREMOVEFILE); bp 755 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vid); bp 756 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vnode); bp 757 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.unique); bp 758 fs/afs/fsclient.c *bp++ = htonl(namesz); bp 759 fs/afs/fsclient.c memcpy(bp, name, namesz); bp 760 fs/afs/fsclient.c bp = (void *) bp + namesz; bp 762 fs/afs/fsclient.c memset(bp, 0, padsz); bp 763 fs/afs/fsclient.c bp = (void *) bp + padsz; bp 778 fs/afs/fsclient.c const __be32 *bp; bp 788 fs/afs/fsclient.c bp = call->buffer; bp 789 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 792 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_dir_scb); bp 795 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 823 fs/afs/fsclient.c __be32 *bp; bp 843 fs/afs/fsclient.c bp = call->request; bp 844 fs/afs/fsclient.c *bp++ = htonl(FSLINK); bp 845 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vid); bp 846 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vnode); bp 847 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.unique); bp 848 fs/afs/fsclient.c *bp++ = htonl(namesz); bp 849 fs/afs/fsclient.c memcpy(bp, name, namesz); bp 850 fs/afs/fsclient.c bp = (void *) bp + namesz; bp 852 fs/afs/fsclient.c memset(bp, 0, padsz); bp 853 fs/afs/fsclient.c bp = (void *) bp + padsz; bp 855 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 856 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 857 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 871 fs/afs/fsclient.c const __be32 *bp; bp 881 fs/afs/fsclient.c bp = call->buffer; bp 882 fs/afs/fsclient.c xdr_decode_AFSFid(&bp, call->out_fid); bp 883 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 886 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_dir_scb); bp 889 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 919 fs/afs/fsclient.c __be32 *bp; bp 946 fs/afs/fsclient.c bp = call->request; bp 947 fs/afs/fsclient.c *bp++ = htonl(FSSYMLINK); bp 948 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vid); bp 949 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.vnode); bp 950 fs/afs/fsclient.c *bp++ = htonl(dvnode->fid.unique); bp 951 fs/afs/fsclient.c *bp++ = htonl(namesz); bp 952 fs/afs/fsclient.c memcpy(bp, name, namesz); bp 953 fs/afs/fsclient.c bp = (void *) bp + namesz; bp 955 fs/afs/fsclient.c memset(bp, 0, padsz); bp 956 fs/afs/fsclient.c bp = (void *) bp + padsz; bp 958 fs/afs/fsclient.c *bp++ = htonl(c_namesz); bp 959 fs/afs/fsclient.c memcpy(bp, contents, c_namesz); bp 960 fs/afs/fsclient.c bp = (void *) bp + c_namesz; bp 962 fs/afs/fsclient.c memset(bp, 0, c_padsz); bp 963 fs/afs/fsclient.c bp = (void *) bp + c_padsz; bp 965 fs/afs/fsclient.c *bp++ = htonl(AFS_SET_MODE | AFS_SET_MTIME); bp 966 fs/afs/fsclient.c *bp++ = htonl(dvnode->vfs_inode.i_mtime.tv_sec); /* mtime */ bp 967 fs/afs/fsclient.c *bp++ = 0; /* owner */ bp 968 fs/afs/fsclient.c *bp++ = 0; /* group */ bp 969 fs/afs/fsclient.c *bp++ = htonl(S_IRWXUGO); /* unix mode */ bp 970 fs/afs/fsclient.c *bp++ = 0; /* segment size */ bp 984 fs/afs/fsclient.c const __be32 *bp; bp 994 fs/afs/fsclient.c bp = call->buffer; bp 995 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_dir_scb); bp 998 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 1001 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 1031 fs/afs/fsclient.c __be32 *bp; bp 1061 fs/afs/fsclient.c bp = call->request; bp 1062 fs/afs/fsclient.c *bp++ = htonl(FSRENAME); bp 1063 fs/afs/fsclient.c *bp++ = htonl(orig_dvnode->fid.vid); bp 1064 fs/afs/fsclient.c *bp++ = htonl(orig_dvnode->fid.vnode); bp 1065 fs/afs/fsclient.c *bp++ = htonl(orig_dvnode->fid.unique); bp 1066 fs/afs/fsclient.c *bp++ = htonl(o_namesz); bp 1067 fs/afs/fsclient.c memcpy(bp, orig_name, o_namesz); bp 1068 fs/afs/fsclient.c bp = (void *) bp + o_namesz; bp 1070 fs/afs/fsclient.c memset(bp, 0, o_padsz); bp 1071 fs/afs/fsclient.c bp = (void *) bp + o_padsz; bp 1074 fs/afs/fsclient.c *bp++ = htonl(new_dvnode->fid.vid); bp 1075 fs/afs/fsclient.c *bp++ = htonl(new_dvnode->fid.vnode); bp 1076 fs/afs/fsclient.c *bp++ = htonl(new_dvnode->fid.unique); bp 1077 fs/afs/fsclient.c *bp++ = htonl(n_namesz); bp 1078 fs/afs/fsclient.c memcpy(bp, new_name, n_namesz); bp 1079 fs/afs/fsclient.c bp = (void *) bp + n_namesz; bp 1081 fs/afs/fsclient.c memset(bp, 0, n_padsz); bp 1082 fs/afs/fsclient.c bp = (void *) bp + n_padsz; bp 1097 fs/afs/fsclient.c const __be32 *bp; bp 1107 fs/afs/fsclient.c bp = call->buffer; bp 1108 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 1111 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 1147 fs/afs/fsclient.c __be32 *bp; bp 1168 fs/afs/fsclient.c bp = call->request; bp 1169 fs/afs/fsclient.c *bp++ = htonl(FSSTOREDATA64); bp 1170 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1171 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1172 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1174 fs/afs/fsclient.c *bp++ = htonl(AFS_SET_MTIME); /* mask */ bp 1175 fs/afs/fsclient.c *bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */ bp 1176 fs/afs/fsclient.c *bp++ = 0; /* owner */ bp 1177 fs/afs/fsclient.c *bp++ = 0; /* group */ bp 1178 fs/afs/fsclient.c *bp++ = 0; /* unix mode */ bp 1179 fs/afs/fsclient.c *bp++ = 0; /* segment size */ bp 1181 fs/afs/fsclient.c *bp++ = htonl(pos >> 32); bp 1182 fs/afs/fsclient.c *bp++ = htonl((u32) pos); bp 1183 fs/afs/fsclient.c *bp++ = htonl(size >> 32); bp 1184 fs/afs/fsclient.c *bp++ = htonl((u32) size); bp 1185 fs/afs/fsclient.c *bp++ = htonl(i_size >> 32); bp 1186 fs/afs/fsclient.c *bp++ = htonl((u32) i_size); bp 1206 fs/afs/fsclient.c __be32 *bp; bp 1248 fs/afs/fsclient.c bp = call->request; bp 1249 fs/afs/fsclient.c *bp++ = htonl(FSSTOREDATA); bp 1250 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1251 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1252 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1254 fs/afs/fsclient.c *bp++ = htonl(AFS_SET_MTIME); /* mask */ bp 1255 fs/afs/fsclient.c *bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */ bp 1256 fs/afs/fsclient.c *bp++ = 0; /* owner */ bp 1257 fs/afs/fsclient.c *bp++ = 0; /* group */ bp 1258 fs/afs/fsclient.c *bp++ = 0; /* unix mode */ bp 1259 fs/afs/fsclient.c *bp++ = 0; /* segment size */ bp 1261 fs/afs/fsclient.c *bp++ = htonl(pos); bp 1262 fs/afs/fsclient.c *bp++ = htonl(size); bp 1263 fs/afs/fsclient.c *bp++ = htonl(i_size); bp 1277 fs/afs/fsclient.c const __be32 *bp; bp 1287 fs/afs/fsclient.c bp = call->buffer; bp 1288 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 1291 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 1331 fs/afs/fsclient.c __be32 *bp; bp 1348 fs/afs/fsclient.c bp = call->request; bp 1349 fs/afs/fsclient.c *bp++ = htonl(FSSTOREDATA64); bp 1350 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1351 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1352 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1354 fs/afs/fsclient.c xdr_encode_AFS_StoreStatus(&bp, attr); bp 1356 fs/afs/fsclient.c *bp++ = htonl(attr->ia_size >> 32); /* position of start of write */ bp 1357 fs/afs/fsclient.c *bp++ = htonl((u32) attr->ia_size); bp 1358 fs/afs/fsclient.c *bp++ = 0; /* size of write */ bp 1359 fs/afs/fsclient.c *bp++ = 0; bp 1360 fs/afs/fsclient.c *bp++ = htonl(attr->ia_size >> 32); /* new file length */ bp 1361 fs/afs/fsclient.c *bp++ = htonl((u32) attr->ia_size); bp 1380 fs/afs/fsclient.c __be32 *bp; bp 1399 fs/afs/fsclient.c bp = call->request; bp 1400 fs/afs/fsclient.c *bp++ = htonl(FSSTOREDATA); bp 1401 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1402 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1403 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1405 fs/afs/fsclient.c xdr_encode_AFS_StoreStatus(&bp, attr); bp 1407 fs/afs/fsclient.c *bp++ = htonl(attr->ia_size); /* position of start of write */ bp 1408 fs/afs/fsclient.c *bp++ = 0; /* size of write */ bp 1409 fs/afs/fsclient.c *bp++ = htonl(attr->ia_size); /* new file length */ bp 1428 fs/afs/fsclient.c __be32 *bp; bp 1449 fs/afs/fsclient.c bp = call->request; bp 1450 fs/afs/fsclient.c *bp++ = htonl(FSSTORESTATUS); bp 1451 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1452 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1453 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1455 fs/afs/fsclient.c xdr_encode_AFS_StoreStatus(&bp, attr); bp 1469 fs/afs/fsclient.c const __be32 *bp; bp 1489 fs/afs/fsclient.c bp = call->buffer; bp 1490 fs/afs/fsclient.c xdr_decode_AFSFetchVolumeStatus(&bp, call->out_volstatus); bp 1612 fs/afs/fsclient.c __be32 *bp; bp 1628 fs/afs/fsclient.c bp = call->request; bp 1629 fs/afs/fsclient.c bp[0] = htonl(FSGETVOLUMESTATUS); bp 1630 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 1644 fs/afs/fsclient.c const __be32 *bp; bp 1654 fs/afs/fsclient.c bp = call->buffer; bp 1655 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 1702 fs/afs/fsclient.c __be32 *bp; bp 1718 fs/afs/fsclient.c bp = call->request; bp 1719 fs/afs/fsclient.c *bp++ = htonl(FSSETLOCK); bp 1720 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1721 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1722 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1723 fs/afs/fsclient.c *bp++ = htonl(type); bp 1740 fs/afs/fsclient.c __be32 *bp; bp 1756 fs/afs/fsclient.c bp = call->request; bp 1757 fs/afs/fsclient.c *bp++ = htonl(FSEXTENDLOCK); bp 1758 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1759 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1760 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1777 fs/afs/fsclient.c __be32 *bp; bp 1793 fs/afs/fsclient.c bp = call->request; bp 1794 fs/afs/fsclient.c *bp++ = htonl(FSRELEASELOCK); bp 1795 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vid); bp 1796 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.vnode); bp 1797 fs/afs/fsclient.c *bp++ = htonl(vnode->fid.unique); bp 1833 fs/afs/fsclient.c __be32 *bp; bp 1844 fs/afs/fsclient.c bp = call->request; bp 1845 fs/afs/fsclient.c *bp++ = htonl(FSGIVEUPALLCALLBACKS); bp 1920 fs/afs/fsclient.c __be32 *bp; bp 1936 fs/afs/fsclient.c bp = call->request; bp 1937 fs/afs/fsclient.c *bp++ = htonl(FSGETCAPABILITIES); bp 1950 fs/afs/fsclient.c const __be32 *bp; bp 1958 fs/afs/fsclient.c bp = call->buffer; bp 1959 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 1962 fs/afs/fsclient.c xdr_decode_AFSCallBack(&bp, call, call->out_scb); bp 1963 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 1989 fs/afs/fsclient.c __be32 *bp; bp 2009 fs/afs/fsclient.c bp = call->request; bp 2010 fs/afs/fsclient.c bp[0] = htonl(FSFETCHSTATUS); bp 2011 fs/afs/fsclient.c bp[1] = htonl(fid->vid); bp 2012 fs/afs/fsclient.c bp[2] = htonl(fid->vnode); bp 2013 fs/afs/fsclient.c bp[3] = htonl(fid->unique); bp 2028 fs/afs/fsclient.c const __be32 *bp; bp 2065 fs/afs/fsclient.c bp = call->buffer; bp 2067 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, scb); bp 2105 fs/afs/fsclient.c bp = call->buffer; bp 2107 fs/afs/fsclient.c xdr_decode_AFSCallBack(&bp, call, scb); bp 2121 fs/afs/fsclient.c bp = call->buffer; bp 2122 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 2155 fs/afs/fsclient.c __be32 *bp; bp 2179 fs/afs/fsclient.c bp = call->request; bp 2180 fs/afs/fsclient.c *bp++ = htonl(FSINLINEBULKSTATUS); bp 2181 fs/afs/fsclient.c *bp++ = htonl(nr_fids); bp 2183 fs/afs/fsclient.c *bp++ = htonl(fids[i].vid); bp 2184 fs/afs/fsclient.c *bp++ = htonl(fids[i].vnode); bp 2185 fs/afs/fsclient.c *bp++ = htonl(fids[i].unique); bp 2201 fs/afs/fsclient.c const __be32 *bp; bp 2247 fs/afs/fsclient.c bp = call->buffer; bp 2248 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 2251 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 2288 fs/afs/fsclient.c __be32 *bp; bp 2305 fs/afs/fsclient.c bp = call->request; bp 2306 fs/afs/fsclient.c bp[0] = htonl(FSFETCHACL); bp 2307 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 2308 fs/afs/fsclient.c bp[2] = htonl(vnode->fid.vnode); bp 2309 fs/afs/fsclient.c bp[3] = htonl(vnode->fid.unique); bp 2323 fs/afs/fsclient.c const __be32 *bp; bp 2330 fs/afs/fsclient.c bp = call->buffer; bp 2331 fs/afs/fsclient.c ret = xdr_decode_AFSFetchStatus(&bp, call, call->out_scb); bp 2334 fs/afs/fsclient.c xdr_decode_AFSVolSync(&bp, call->out_volsync); bp 2360 fs/afs/fsclient.c __be32 *bp; bp 2378 fs/afs/fsclient.c bp = call->request; bp 2379 fs/afs/fsclient.c bp[0] = htonl(FSSTOREACL); bp 2380 fs/afs/fsclient.c bp[1] = htonl(vnode->fid.vid); bp 2381 fs/afs/fsclient.c bp[2] = htonl(vnode->fid.vnode); bp 2382 fs/afs/fsclient.c bp[3] = htonl(vnode->fid.unique); bp 2383 fs/afs/fsclient.c bp[4] = htonl(acl->size); bp 2384 fs/afs/fsclient.c memcpy(&bp[5], acl->data, acl->size); bp 2386 fs/afs/fsclient.c memset((void *)&bp[5] + acl->size, 0, size - acl->size); bp 136 fs/afs/vlclient.c __be32 *bp; bp 159 fs/afs/vlclient.c bp = call->request; bp 160 fs/afs/vlclient.c *bp++ = htonl(VLGETENTRYBYNAMEU); bp 161 fs/afs/vlclient.c *bp++ = htonl(volnamesz); bp 162 fs/afs/vlclient.c memcpy(bp, volname, volnamesz); bp 164 fs/afs/vlclient.c memset((void *)bp + volnamesz, 0, padsz); bp 183 fs/afs/vlclient.c __be32 *bp; bp 204 fs/afs/vlclient.c bp = call->buffer + sizeof(struct afs_uuid__xdr); bp 205 fs/afs/vlclient.c uniquifier = ntohl(*bp++); bp 206 fs/afs/vlclient.c nentries = ntohl(*bp++); bp 207 fs/afs/vlclient.c count = ntohl(*bp); bp 230 fs/afs/vlclient.c bp = call->buffer; bp 234 fs/afs/vlclient.c afs_merge_fs_addr4(alist, *bp++, AFS_FS_PORT); bp 274 fs/afs/vlclient.c __be32 *bp; bp 290 fs/afs/vlclient.c bp = call->request; bp 291 fs/afs/vlclient.c *bp++ = htonl(VLGETADDRSU); bp 292 fs/afs/vlclient.c r = (struct afs_ListAddrByAttributes__xdr *)bp; bp 386 fs/afs/vlclient.c __be32 *bp; bp 402 fs/afs/vlclient.c bp = call->request; bp 403 fs/afs/vlclient.c *bp++ = htonl(VLGETCAPABILITIES); bp 423 fs/afs/vlclient.c __be32 *bp; bp 444 fs/afs/vlclient.c bp = call->buffer + sizeof(uuid_t); bp 445 fs/afs/vlclient.c uniquifier = ntohl(*bp++); bp 446 fs/afs/vlclient.c call->count = ntohl(*bp++); bp 447 fs/afs/vlclient.c call->count2 = ntohl(*bp); /* Type or next count */ bp 486 fs/afs/vlclient.c bp = call->buffer; bp 489 fs/afs/vlclient.c if (ntohl(bp[0]) != sizeof(__be32) * 2) bp 492 fs/afs/vlclient.c afs_merge_fs_addr4(alist, bp[1], ntohl(bp[2])); bp 493 fs/afs/vlclient.c bp += 3; bp 496 fs/afs/vlclient.c if (ntohl(bp[0]) != sizeof(__be32) * 5) bp 499 fs/afs/vlclient.c afs_merge_fs_addr6(alist, bp + 1, ntohl(bp[5])); bp 500 fs/afs/vlclient.c bp += 6; bp 510 fs/afs/vlclient.c call->count2 = ntohl(*bp++); bp 538 fs/afs/vlclient.c bp = call->buffer; bp 541 fs/afs/vlclient.c call->count2 = ntohl(*bp++); bp 565 fs/afs/vlclient.c bp = call->buffer; bp 568 fs/afs/vlclient.c if (ntohl(bp[0]) != sizeof(__be32) * 2) bp 571 fs/afs/vlclient.c bp += 3; bp 574 fs/afs/vlclient.c if (ntohl(bp[0]) != sizeof(__be32) * 5) bp 577 fs/afs/vlclient.c bp += 6; bp 629 fs/afs/vlclient.c __be32 *bp; bp 644 fs/afs/vlclient.c bp = call->request; bp 645 fs/afs/vlclient.c *bp++ = htonl(YVLGETENDPOINTS); bp 646 fs/afs/vlclient.c *bp++ = htonl(YFS_SERVER_UUID); bp 647 fs/afs/vlclient.c memcpy(bp, uuid, sizeof(*uuid)); /* Type opr_uuid */ bp 38 fs/afs/yfsclient.c static __be32 *xdr_encode_u32(__be32 *bp, u32 n) bp 40 fs/afs/yfsclient.c *bp++ = htonl(n); bp 41 fs/afs/yfsclient.c return bp; bp 44 fs/afs/yfsclient.c static __be32 *xdr_encode_u64(__be32 *bp, u64 n) bp 46 fs/afs/yfsclient.c struct yfs_xdr_u64 *x = (void *)bp; bp 49 fs/afs/yfsclient.c return bp + xdr_size(x); bp 52 fs/afs/yfsclient.c static __be32 *xdr_encode_YFSFid(__be32 *bp, struct afs_fid *fid) bp 54 fs/afs/yfsclient.c struct yfs_xdr_YFSFid *x = (void *)bp; bp 60 fs/afs/yfsclient.c return bp + xdr_size(x); bp 68 fs/afs/yfsclient.c static __be32 *xdr_encode_string(__be32 *bp, const char *p, unsigned int len) bp 70 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, len); bp 71 fs/afs/yfsclient.c bp = memcpy(bp, p, len); bp 75 fs/afs/yfsclient.c memset((u8 *)bp + len, 0, pad); bp 79 fs/afs/yfsclient.c return bp + len / sizeof(__be32); bp 88 fs/afs/yfsclient.c static __be32 *xdr_encode_YFSStoreStatus_mode(__be32 *bp, mode_t mode) bp 90 fs/afs/yfsclient.c struct yfs_xdr_YFSStoreStatus *x = (void *)bp; bp 97 fs/afs/yfsclient.c return bp + xdr_size(x); bp 100 fs/afs/yfsclient.c static __be32 *xdr_encode_YFSStoreStatus_mtime(__be32 *bp, const struct timespec64 *t) bp 102 fs/afs/yfsclient.c struct yfs_xdr_YFSStoreStatus *x = (void *)bp; bp 110 fs/afs/yfsclient.c return bp + xdr_size(x); bp 147 fs/afs/yfsclient.c static void yfs_check_req(struct afs_call *call, __be32 *bp) bp 149 fs/afs/yfsclient.c size_t len = (void *)bp - call->request; bp 162 fs/afs/yfsclient.c static void xdr_dump_bad(const __be32 *bp) bp 169 fs/afs/yfsclient.c memcpy(x, bp, 16); bp 170 fs/afs/yfsclient.c bp += 4; bp 175 fs/afs/yfsclient.c memcpy(x, bp, 8); bp 275 fs/afs/yfsclient.c static __be32 *xdr_encode_YFS_StoreStatus(__be32 *bp, struct iattr *attr) bp 277 fs/afs/yfsclient.c struct yfs_xdr_YFSStoreStatus *x = (void *)bp; bp 307 fs/afs/yfsclient.c return bp + xdr_size(x); bp 342 fs/afs/yfsclient.c const __be32 *bp; bp 350 fs/afs/yfsclient.c bp = call->buffer; bp 351 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 354 fs/afs/yfsclient.c xdr_decode_YFSCallBack(&bp, call, call->out_scb); bp 355 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 367 fs/afs/yfsclient.c const __be32 *bp; bp 374 fs/afs/yfsclient.c bp = call->buffer; bp 375 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 378 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 403 fs/afs/yfsclient.c __be32 *bp; bp 424 fs/afs/yfsclient.c bp = call->request; bp 425 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSFETCHSTATUS); bp 426 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 427 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 428 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 443 fs/afs/yfsclient.c const __be32 *bp; bp 536 fs/afs/yfsclient.c bp = call->buffer; bp 537 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 540 fs/afs/yfsclient.c xdr_decode_YFSCallBack(&bp, call, call->out_scb); bp 541 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 593 fs/afs/yfsclient.c __be32 *bp; bp 615 fs/afs/yfsclient.c bp = call->request; bp 616 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSFETCHDATA64); bp 617 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 618 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 619 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, req->pos); bp 620 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, req->len); bp 621 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 636 fs/afs/yfsclient.c const __be32 *bp; bp 646 fs/afs/yfsclient.c bp = call->buffer; bp 647 fs/afs/yfsclient.c xdr_decode_YFSFid(&bp, call->out_fid); bp 648 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 651 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 654 fs/afs/yfsclient.c xdr_decode_YFSCallBack(&bp, call, call->out_scb); bp 655 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 685 fs/afs/yfsclient.c __be32 *bp; bp 712 fs/afs/yfsclient.c bp = call->request; bp 713 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSCREATEFILE); bp 714 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 715 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 716 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 717 fs/afs/yfsclient.c bp = xdr_encode_YFSStoreStatus_mode(bp, mode); bp 718 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, yfs_LockNone); /* ViceLockType */ bp 719 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 749 fs/afs/yfsclient.c __be32 *bp; bp 775 fs/afs/yfsclient.c bp = call->request; bp 776 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSMAKEDIR); bp 777 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 778 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 779 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 780 fs/afs/yfsclient.c bp = xdr_encode_YFSStoreStatus_mode(bp, mode); bp 781 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 796 fs/afs/yfsclient.c const __be32 *bp; bp 805 fs/afs/yfsclient.c bp = call->buffer; bp 806 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 810 fs/afs/yfsclient.c xdr_decode_YFSFid(&bp, &fid); bp 811 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 816 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 841 fs/afs/yfsclient.c __be32 *bp; bp 864 fs/afs/yfsclient.c bp = call->request; bp 865 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSREMOVEFILE2); bp 866 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 867 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 868 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 869 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 883 fs/afs/yfsclient.c const __be32 *bp; bp 892 fs/afs/yfsclient.c bp = call->buffer; bp 893 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 897 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 929 fs/afs/yfsclient.c __be32 *bp; bp 949 fs/afs/yfsclient.c bp = call->request; bp 950 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, isdir ? YFSREMOVEDIR : YFSREMOVEFILE); bp 951 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 952 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 953 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 954 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 968 fs/afs/yfsclient.c const __be32 *bp; bp 977 fs/afs/yfsclient.c bp = call->buffer; bp 978 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 981 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 984 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 1011 fs/afs/yfsclient.c __be32 *bp; bp 1033 fs/afs/yfsclient.c bp = call->request; bp 1034 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSLINK); bp 1035 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1036 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 1037 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 1038 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1039 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1053 fs/afs/yfsclient.c const __be32 *bp; bp 1063 fs/afs/yfsclient.c bp = call->buffer; bp 1064 fs/afs/yfsclient.c xdr_decode_YFSFid(&bp, call->out_fid); bp 1065 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 1068 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 1071 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 1101 fs/afs/yfsclient.c __be32 *bp; bp 1127 fs/afs/yfsclient.c bp = call->request; bp 1128 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSYMLINK); bp 1129 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1130 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &dvnode->fid); bp 1131 fs/afs/yfsclient.c bp = xdr_encode_string(bp, name, namesz); bp 1132 fs/afs/yfsclient.c bp = xdr_encode_string(bp, contents, contents_sz); bp 1133 fs/afs/yfsclient.c bp = xdr_encode_YFSStoreStatus_mode(bp, S_IRWXUGO); bp 1134 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1148 fs/afs/yfsclient.c const __be32 *bp; bp 1157 fs/afs/yfsclient.c bp = call->buffer; bp 1158 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_dir_scb); bp 1161 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 1165 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 1194 fs/afs/yfsclient.c __be32 *bp; bp 1218 fs/afs/yfsclient.c bp = call->request; bp 1219 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSRENAME); bp 1220 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1221 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &orig_dvnode->fid); bp 1222 fs/afs/yfsclient.c bp = xdr_encode_string(bp, orig_name, o_namesz); bp 1223 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &new_dvnode->fid); bp 1224 fs/afs/yfsclient.c bp = xdr_encode_string(bp, new_name, n_namesz); bp 1225 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1256 fs/afs/yfsclient.c __be32 *bp; bp 1296 fs/afs/yfsclient.c bp = call->request; bp 1297 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSTOREDATA64); bp 1298 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1299 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1300 fs/afs/yfsclient.c bp = xdr_encode_YFSStoreStatus_mtime(bp, &vnode->vfs_inode.i_mtime); bp 1301 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, pos); bp 1302 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, size); bp 1303 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, i_size); bp 1304 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1340 fs/afs/yfsclient.c __be32 *bp; bp 1359 fs/afs/yfsclient.c bp = call->request; bp 1360 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSTOREDATA64); bp 1361 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1362 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1363 fs/afs/yfsclient.c bp = xdr_encode_YFS_StoreStatus(bp, attr); bp 1364 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, attr->ia_size); /* position of start of write */ bp 1365 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, 0); /* size of write */ bp 1366 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, attr->ia_size); /* new file length */ bp 1367 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1386 fs/afs/yfsclient.c __be32 *bp; bp 1407 fs/afs/yfsclient.c bp = call->request; bp 1408 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSTORESTATUS); bp 1409 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1410 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1411 fs/afs/yfsclient.c bp = xdr_encode_YFS_StoreStatus(bp, attr); bp 1412 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1426 fs/afs/yfsclient.c const __be32 *bp; bp 1446 fs/afs/yfsclient.c bp = call->buffer; bp 1447 fs/afs/yfsclient.c xdr_decode_YFSFetchVolumeStatus(&bp, call->out_volstatus); bp 1570 fs/afs/yfsclient.c __be32 *bp; bp 1588 fs/afs/yfsclient.c bp = call->request; bp 1589 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSGETVOLUMESTATUS); bp 1590 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1591 fs/afs/yfsclient.c bp = xdr_encode_u64(bp, vnode->fid.vid); bp 1592 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1642 fs/afs/yfsclient.c __be32 *bp; bp 1660 fs/afs/yfsclient.c bp = call->request; bp 1661 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSETLOCK); bp 1662 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1663 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1664 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, type); bp 1665 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1682 fs/afs/yfsclient.c __be32 *bp; bp 1699 fs/afs/yfsclient.c bp = call->request; bp 1700 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSEXTENDLOCK); bp 1701 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1702 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1703 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1720 fs/afs/yfsclient.c __be32 *bp; bp 1737 fs/afs/yfsclient.c bp = call->request; bp 1738 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSRELEASELOCK); bp 1739 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1740 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 1741 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1770 fs/afs/yfsclient.c __be32 *bp; bp 1791 fs/afs/yfsclient.c bp = call->request; bp 1792 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSFETCHSTATUS); bp 1793 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 1794 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, fid); bp 1795 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1810 fs/afs/yfsclient.c const __be32 *bp; bp 1847 fs/afs/yfsclient.c bp = call->buffer; bp 1849 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, scb); bp 1887 fs/afs/yfsclient.c bp = call->buffer; bp 1889 fs/afs/yfsclient.c xdr_decode_YFSCallBack(&bp, call, scb); bp 1903 fs/afs/yfsclient.c bp = call->buffer; bp 1904 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 1938 fs/afs/yfsclient.c __be32 *bp; bp 1961 fs/afs/yfsclient.c bp = call->request; bp 1962 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSINLINEBULKSTATUS); bp 1963 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPCFlags */ bp 1964 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, nr_fids); bp 1966 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &fids[i]); bp 1967 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 1983 fs/afs/yfsclient.c const __be32 *bp; bp 2068 fs/afs/yfsclient.c bp = call->buffer; bp 2069 fs/afs/yfsclient.c yacl->inherit_flag = ntohl(*bp++); bp 2070 fs/afs/yfsclient.c yacl->num_cleaned = ntohl(*bp++); bp 2071 fs/afs/yfsclient.c ret = xdr_decode_YFSFetchStatus(&bp, call, call->out_scb); bp 2074 fs/afs/yfsclient.c xdr_decode_YFSVolSync(&bp, call->out_volsync); bp 2116 fs/afs/yfsclient.c __be32 *bp; bp 2138 fs/afs/yfsclient.c bp = call->request; bp 2139 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSFETCHOPAQUEACL); bp 2140 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 2141 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 2142 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 2170 fs/afs/yfsclient.c __be32 *bp; bp 2192 fs/afs/yfsclient.c bp = call->request; bp 2193 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, YFSSTOREOPAQUEACL2); bp 2194 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, 0); /* RPC flags */ bp 2195 fs/afs/yfsclient.c bp = xdr_encode_YFSFid(bp, &vnode->fid); bp 2196 fs/afs/yfsclient.c bp = xdr_encode_u32(bp, acl->size); bp 2197 fs/afs/yfsclient.c memcpy(bp, acl->data, acl->size); bp 2199 fs/afs/yfsclient.c memset((void *)bp + acl->size, 0, size - acl->size); bp 2200 fs/afs/yfsclient.c yfs_check_req(call, bp); bp 334 fs/btrfs/check-integrity.c static void btrfsic_bio_end_io(struct bio *bp); bp 2104 fs/btrfs/check-integrity.c static void btrfsic_bio_end_io(struct bio *bp) bp 2106 fs/btrfs/check-integrity.c struct btrfsic_block *block = (struct btrfsic_block *)bp->bi_private; bp 2112 fs/btrfs/check-integrity.c if (bp->bi_status) bp 2116 fs/btrfs/check-integrity.c bp->bi_private = block->orig_bio_bh_private; bp 2117 fs/btrfs/check-integrity.c bp->bi_end_io = block->orig_bio_bh_end_io.bio; bp 2126 fs/btrfs/check-integrity.c bp->bi_status, bp 2147 fs/btrfs/check-integrity.c bp->bi_end_io(bp); bp 146 fs/btrfs/volumes.c char *bp = buf; bp 151 fs/btrfs/volumes.c strcpy(bp, "NONE"); bp 158 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, "%s|", (desc)); \ bp 162 fs/btrfs/volumes.c bp += ret; \ bp 178 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, "0x%llx|", flags); bp 3927 fs/btrfs/volumes.c char *bp = buf; bp 3936 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, (a)); \ bp 3940 fs/btrfs/volumes.c bp += ret; \ bp 3945 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, (a), (v1)); \ bp 3949 fs/btrfs/volumes.c bp += ret; \ bp 3954 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, (a), (v1), (v2)); \ bp 3958 fs/btrfs/volumes.c bp += ret; \ bp 4020 fs/btrfs/volumes.c char *bp; bp 4029 fs/btrfs/volumes.c bp = buf; bp 4033 fs/btrfs/volumes.c ret = snprintf(bp, size_bp, (a), (v1)); \ bp 4037 fs/btrfs/volumes.c bp += ret; \ bp 39 fs/ext4/ioctl.c unsigned char *ap, *bp; bp 42 fs/ext4/ioctl.c bp = (unsigned char *)b; bp 44 fs/ext4/ioctl.c swap(*ap, *bp); bp 46 fs/ext4/ioctl.c bp++; bp 134 fs/freevxfs/vxfs_bmap.c struct buffer_head *bp = NULL; bp 142 fs/freevxfs/vxfs_bmap.c bp = sb_bread(ip->i_sb, bp 144 fs/freevxfs/vxfs_bmap.c if (!bp || !buffer_mapped(bp)) bp 147 fs/freevxfs/vxfs_bmap.c typ = ((struct vxfs_typed *)bp->b_data) + bp 152 fs/freevxfs/vxfs_bmap.c brelse(bp); bp 188 fs/freevxfs/vxfs_bmap.c brelse(bp); bp 194 fs/freevxfs/vxfs_bmap.c brelse(bp); bp 79 fs/freevxfs/vxfs_fshead.c struct buffer_head *bp; bp 81 fs/freevxfs/vxfs_fshead.c bp = vxfs_bread(ip, which); bp 82 fs/freevxfs/vxfs_fshead.c if (bp) { bp 87 fs/freevxfs/vxfs_fshead.c memcpy(fhp, bp->b_data, sizeof(*fhp)); bp 89 fs/freevxfs/vxfs_fshead.c put_bh(bp); bp 93 fs/freevxfs/vxfs_fshead.c brelse(bp); bp 166 fs/freevxfs/vxfs_inode.c struct buffer_head *bp; bp 177 fs/freevxfs/vxfs_inode.c bp = sb_bread(sbp, block); bp 179 fs/freevxfs/vxfs_inode.c if (bp && buffer_mapped(bp)) { bp 183 fs/freevxfs/vxfs_inode.c dip = (struct vxfs_dinode *)(bp->b_data + offset); bp 189 fs/freevxfs/vxfs_inode.c brelse(bp); bp 194 fs/freevxfs/vxfs_inode.c brelse(bp); bp 80 fs/freevxfs/vxfs_olt.c struct buffer_head *bp; bp 84 fs/freevxfs/vxfs_olt.c bp = sb_bread(sbp, vxfs_oblock(sbp, infp->vsi_oltext, bsize)); bp 85 fs/freevxfs/vxfs_olt.c if (!bp || !bp->b_data) bp 88 fs/freevxfs/vxfs_olt.c op = (struct vxfs_olt *)bp->b_data; bp 104 fs/freevxfs/vxfs_olt.c oaddr = bp->b_data + fs32_to_cpu(infp, op->olt_size); bp 105 fs/freevxfs/vxfs_olt.c eaddr = bp->b_data + (infp->vsi_oltsize * sbp->s_blocksize); bp 123 fs/freevxfs/vxfs_olt.c brelse(bp); bp 127 fs/freevxfs/vxfs_olt.c brelse(bp); bp 104 fs/freevxfs/vxfs_subr.c struct buffer_head *bp; bp 108 fs/freevxfs/vxfs_subr.c bp = sb_bread(ip->i_sb, pblock); bp 110 fs/freevxfs/vxfs_subr.c return (bp); bp 130 fs/freevxfs/vxfs_subr.c struct buffer_head *bp, int create) bp 136 fs/freevxfs/vxfs_subr.c map_bh(bp, ip->i_sb, pblock); bp 151 fs/freevxfs/vxfs_super.c struct buffer_head *bp; bp 156 fs/freevxfs/vxfs_super.c bp = sb_bread(sbp, blk); bp 158 fs/freevxfs/vxfs_super.c if (!bp || !buffer_mapped(bp)) { bp 168 fs/freevxfs/vxfs_super.c rsbp = (struct vxfs_sb *)bp->b_data; bp 179 fs/freevxfs/vxfs_super.c infp->vsi_bp = bp; bp 185 fs/freevxfs/vxfs_super.c brelse(bp); bp 418 fs/hpfs/hpfs.h static inline bool bp_internal(struct bplus_header *bp) bp 420 fs/hpfs/hpfs.h return bp->flags & BP_internal; bp 423 fs/hpfs/hpfs.h static inline bool bp_fnode_parent(struct bplus_header *bp) bp 425 fs/hpfs/hpfs.h return bp->flags & BP_fnode_parent; bp 2845 fs/jfs/jfs_imap.c struct metapage *bp, *hbp; bp 2876 fs/jfs/jfs_imap.c if ((rc = diIAGRead(imap, i, &bp))) { bp 2880 fs/jfs/jfs_imap.c iagp = (struct iag *) bp->data; bp 2882 fs/jfs/jfs_imap.c release_metapage(bp); bp 2889 fs/jfs/jfs_imap.c release_metapage(bp); bp 2954 fs/jfs/jfs_imap.c write_metapage(bp); bp 175 fs/jfs/jfs_logmgr.c static void lbmFree(struct lbuf * bp); bp 176 fs/jfs/jfs_logmgr.c static void lbmfree(struct lbuf * bp); bp 178 fs/jfs/jfs_logmgr.c static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, int cant_block); bp 179 fs/jfs/jfs_logmgr.c static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag); bp 180 fs/jfs/jfs_logmgr.c static int lbmIOWait(struct lbuf * bp, int flag); bp 182 fs/jfs/jfs_logmgr.c static void lbmStartIO(struct lbuf * bp); bp 348 fs/jfs/jfs_logmgr.c struct lbuf *bp; /* dst log page buffer */ bp 367 fs/jfs/jfs_logmgr.c bp = (struct lbuf *) log->bp; bp 368 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 418 fs/jfs/jfs_logmgr.c bp = log->bp; bp 419 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 443 fs/jfs/jfs_logmgr.c bp = (struct lbuf *) log->bp; bp 444 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 496 fs/jfs/jfs_logmgr.c bp->l_eor = dstoffset; bp 502 fs/jfs/jfs_logmgr.c bp->l_eor); bp 518 fs/jfs/jfs_logmgr.c tblk->bp = log->bp; bp 529 fs/jfs/jfs_logmgr.c le16_to_cpu(lrd->type), log->bp, log->page, dstoffset); bp 539 fs/jfs/jfs_logmgr.c bp = (struct lbuf *) log->bp; bp 540 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 565 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 571 fs/jfs/jfs_logmgr.c bp = log->bp; bp 572 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 607 fs/jfs/jfs_logmgr.c if (bp->l_wqnext == NULL) bp 608 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, 0, 0); bp 622 fs/jfs/jfs_logmgr.c bp->l_ceor = bp->l_eor; bp 623 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor); bp 624 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmFREE, 0); bp 640 fs/jfs/jfs_logmgr.c log->bp = nextbp; bp 747 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 776 fs/jfs/jfs_logmgr.c bp = (struct lbuf *) tblk->bp; bp 777 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 783 fs/jfs/jfs_logmgr.c bp->l_ceor = bp->l_eor; bp 784 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor); bp 785 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmGC, bp 791 fs/jfs/jfs_logmgr.c bp->l_ceor = tblk->eor; /* ? bp->l_ceor = bp->l_eor; */ bp 792 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_ceor); bp 793 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, lbmWRITE | lbmGC, cant_write); bp 810 fs/jfs/jfs_logmgr.c static void lmPostGC(struct lbuf * bp) bp 813 fs/jfs/jfs_logmgr.c struct jfs_log *log = bp->l_log; bp 833 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmERROR) bp 868 fs/jfs/jfs_logmgr.c lbmFree(bp); bp 874 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 875 fs/jfs/jfs_logmgr.c bp->l_ceor = bp->l_eor; bp 876 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor); bp 878 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmFREE, bp 892 fs/jfs/jfs_logmgr.c ((log->gcrtc > 0) || (tblk->bp->l_wqnext != NULL) || bp 1254 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 1291 fs/jfs/jfs_logmgr.c bp = lbmAllocate(log , 0); bp 1292 fs/jfs/jfs_logmgr.c log->bp = bp; bp 1293 fs/jfs/jfs_logmgr.c bp->l_pn = bp->l_eor = 0; bp 1342 fs/jfs/jfs_logmgr.c if ((rc = lbmRead(log, log->page, &bp))) bp 1345 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 1351 fs/jfs/jfs_logmgr.c log->bp = bp; bp 1352 fs/jfs/jfs_logmgr.c bp->l_pn = log->page; bp 1353 fs/jfs/jfs_logmgr.c bp->l_eor = log->eor; bp 1375 fs/jfs/jfs_logmgr.c bp = log->bp; bp 1376 fs/jfs/jfs_logmgr.c bp->l_ceor = bp->l_eor; bp 1377 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 1378 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor); bp 1379 fs/jfs/jfs_logmgr.c lbmWrite(log, bp, lbmWRITE | lbmSYNC, 0); bp 1380 fs/jfs/jfs_logmgr.c if ((rc = lbmIOWait(bp, 0))) bp 1416 fs/jfs/jfs_logmgr.c bp->l_wqnext = NULL; bp 1417 fs/jfs/jfs_logmgr.c lbmFree(bp); bp 1645 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 1663 fs/jfs/jfs_logmgr.c bp = log->bp; bp 1664 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 1665 fs/jfs/jfs_logmgr.c lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor); bp 1666 fs/jfs/jfs_logmgr.c lbmWrite(log, log->bp, lbmWRITE | lbmRELEASE | lbmSYNC, 0); bp 1667 fs/jfs/jfs_logmgr.c lbmIOWait(log->bp, lbmFREE); bp 1668 fs/jfs/jfs_logmgr.c log->bp = NULL; bp 1802 fs/jfs/jfs_logmgr.c log->bp = NULL; bp 1885 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 1892 fs/jfs/jfs_logmgr.c LCACHE_SLEEP_COND(log->free_wait, (bp = log->lbuf_free), flags); bp 1893 fs/jfs/jfs_logmgr.c log->lbuf_free = bp->l_freelist; bp 1896 fs/jfs/jfs_logmgr.c bp->l_flag = 0; bp 1898 fs/jfs/jfs_logmgr.c bp->l_wqnext = NULL; bp 1899 fs/jfs/jfs_logmgr.c bp->l_freelist = NULL; bp 1901 fs/jfs/jfs_logmgr.c bp->l_pn = pn; bp 1902 fs/jfs/jfs_logmgr.c bp->l_blkno = log->base + (pn << (L2LOGPSIZE - log->l2bsize)); bp 1903 fs/jfs/jfs_logmgr.c bp->l_ceor = 0; bp 1905 fs/jfs/jfs_logmgr.c return bp; bp 1914 fs/jfs/jfs_logmgr.c static void lbmFree(struct lbuf * bp) bp 1920 fs/jfs/jfs_logmgr.c lbmfree(bp); bp 1925 fs/jfs/jfs_logmgr.c static void lbmfree(struct lbuf * bp) bp 1927 fs/jfs/jfs_logmgr.c struct jfs_log *log = bp->l_log; bp 1929 fs/jfs/jfs_logmgr.c assert(bp->l_wqnext == NULL); bp 1934 fs/jfs/jfs_logmgr.c bp->l_freelist = log->lbuf_free; bp 1935 fs/jfs/jfs_logmgr.c log->lbuf_free = bp; bp 1953 fs/jfs/jfs_logmgr.c static inline void lbmRedrive(struct lbuf *bp) bp 1958 fs/jfs/jfs_logmgr.c bp->l_redrive_next = log_redrive_list; bp 1959 fs/jfs/jfs_logmgr.c log_redrive_list = bp; bp 1972 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 1977 fs/jfs/jfs_logmgr.c *bpp = bp = lbmAllocate(log, pn); bp 1978 fs/jfs/jfs_logmgr.c jfs_info("lbmRead: bp:0x%p pn:0x%x", bp, pn); bp 1980 fs/jfs/jfs_logmgr.c bp->l_flag |= lbmREAD; bp 1984 fs/jfs/jfs_logmgr.c bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9); bp 1987 fs/jfs/jfs_logmgr.c bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset); bp 1991 fs/jfs/jfs_logmgr.c bio->bi_private = bp; bp 2001 fs/jfs/jfs_logmgr.c wait_event(bp->l_ioevent, (bp->l_flag != lbmREAD)); bp 2022 fs/jfs/jfs_logmgr.c static void lbmWrite(struct jfs_log * log, struct lbuf * bp, int flag, bp 2028 fs/jfs/jfs_logmgr.c jfs_info("lbmWrite: bp:0x%p flag:0x%x pn:0x%x", bp, flag, bp->l_pn); bp 2031 fs/jfs/jfs_logmgr.c bp->l_blkno = bp 2032 fs/jfs/jfs_logmgr.c log->base + (bp->l_pn << (L2LOGPSIZE - log->l2bsize)); bp 2039 fs/jfs/jfs_logmgr.c bp->l_flag = flag; bp 2050 fs/jfs/jfs_logmgr.c if (bp->l_wqnext == NULL) { bp 2053 fs/jfs/jfs_logmgr.c log->wqueue = bp; bp 2054 fs/jfs/jfs_logmgr.c bp->l_wqnext = bp; bp 2056 fs/jfs/jfs_logmgr.c log->wqueue = bp; bp 2057 fs/jfs/jfs_logmgr.c bp->l_wqnext = tail->l_wqnext; bp 2058 fs/jfs/jfs_logmgr.c tail->l_wqnext = bp; bp 2061 fs/jfs/jfs_logmgr.c tail = bp; bp 2065 fs/jfs/jfs_logmgr.c if ((bp != tail->l_wqnext) || !(flag & lbmWRITE)) { bp 2073 fs/jfs/jfs_logmgr.c lbmRedrive(bp); bp 2075 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2078 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2090 fs/jfs/jfs_logmgr.c static void lbmDirectWrite(struct jfs_log * log, struct lbuf * bp, int flag) bp 2093 fs/jfs/jfs_logmgr.c bp, flag, bp->l_pn); bp 2098 fs/jfs/jfs_logmgr.c bp->l_flag = flag | lbmDIRECT; bp 2101 fs/jfs/jfs_logmgr.c bp->l_blkno = bp 2102 fs/jfs/jfs_logmgr.c log->base + (bp->l_pn << (L2LOGPSIZE - log->l2bsize)); bp 2107 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2120 fs/jfs/jfs_logmgr.c static void lbmStartIO(struct lbuf * bp) bp 2123 fs/jfs/jfs_logmgr.c struct jfs_log *log = bp->l_log; bp 2128 fs/jfs/jfs_logmgr.c bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9); bp 2131 fs/jfs/jfs_logmgr.c bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset); bp 2135 fs/jfs/jfs_logmgr.c bio->bi_private = bp; bp 2152 fs/jfs/jfs_logmgr.c static int lbmIOWait(struct lbuf * bp, int flag) bp 2157 fs/jfs/jfs_logmgr.c jfs_info("lbmIOWait1: bp:0x%p flag:0x%x:0x%x", bp, bp->l_flag, flag); bp 2161 fs/jfs/jfs_logmgr.c LCACHE_SLEEP_COND(bp->l_ioevent, (bp->l_flag & lbmDONE), flags); bp 2163 fs/jfs/jfs_logmgr.c rc = (bp->l_flag & lbmERROR) ? -EIO : 0; bp 2166 fs/jfs/jfs_logmgr.c lbmfree(bp); bp 2170 fs/jfs/jfs_logmgr.c jfs_info("lbmIOWait2: bp:0x%p flag:0x%x:0x%x", bp, bp->l_flag, flag); bp 2181 fs/jfs/jfs_logmgr.c struct lbuf *bp = bio->bi_private; bp 2189 fs/jfs/jfs_logmgr.c jfs_info("lbmIODone: bp:0x%p flag:0x%x", bp, bp->l_flag); bp 2193 fs/jfs/jfs_logmgr.c bp->l_flag |= lbmDONE; bp 2196 fs/jfs/jfs_logmgr.c bp->l_flag |= lbmERROR; bp 2206 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmREAD) { bp 2207 fs/jfs/jfs_logmgr.c bp->l_flag &= ~lbmREAD; bp 2212 fs/jfs/jfs_logmgr.c LCACHE_WAKEUP(&bp->l_ioevent); bp 2229 fs/jfs/jfs_logmgr.c bp->l_flag &= ~lbmWRITE; bp 2233 fs/jfs/jfs_logmgr.c log = bp->l_log; bp 2234 fs/jfs/jfs_logmgr.c log->clsn = (bp->l_pn << L2LOGPSIZE) + bp->l_ceor; bp 2236 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmDIRECT) { bp 2237 fs/jfs/jfs_logmgr.c LCACHE_WAKEUP(&bp->l_ioevent); bp 2245 fs/jfs/jfs_logmgr.c if (bp == tail) { bp 2249 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmRELEASE) { bp 2251 fs/jfs/jfs_logmgr.c bp->l_wqnext = NULL; bp 2259 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmRELEASE) { bp 2260 fs/jfs/jfs_logmgr.c nextbp = tail->l_wqnext = bp->l_wqnext; bp 2261 fs/jfs/jfs_logmgr.c bp->l_wqnext = NULL; bp 2290 fs/jfs/jfs_logmgr.c if (bp->l_flag & lbmSYNC) { bp 2294 fs/jfs/jfs_logmgr.c LCACHE_WAKEUP(&bp->l_ioevent); bp 2300 fs/jfs/jfs_logmgr.c else if (bp->l_flag & lbmGC) { bp 2302 fs/jfs/jfs_logmgr.c lmPostGC(bp); bp 2312 fs/jfs/jfs_logmgr.c assert(bp->l_flag & lbmRELEASE); bp 2313 fs/jfs/jfs_logmgr.c assert(bp->l_flag & lbmFREE); bp 2314 fs/jfs/jfs_logmgr.c lbmfree(bp); bp 2322 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 2326 fs/jfs/jfs_logmgr.c while ((bp = log_redrive_list)) { bp 2327 fs/jfs/jfs_logmgr.c log_redrive_list = bp->l_redrive_next; bp 2328 fs/jfs/jfs_logmgr.c bp->l_redrive_next = NULL; bp 2330 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2373 fs/jfs/jfs_logmgr.c struct lbuf *bp; bp 2381 fs/jfs/jfs_logmgr.c bp = lbmAllocate(log, 1); bp 2397 fs/jfs/jfs_logmgr.c logsuper = (struct logsuper *) bp->l_ldata; bp 2408 fs/jfs/jfs_logmgr.c bp->l_flag = lbmWRITE | lbmSYNC | lbmDIRECT; bp 2409 fs/jfs/jfs_logmgr.c bp->l_blkno = logAddress + sbi->nbperpage; bp 2410 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2411 fs/jfs/jfs_logmgr.c if ((rc = lbmIOWait(bp, 0))) bp 2436 fs/jfs/jfs_logmgr.c lp = (struct logpage *) bp->l_ldata; bp 2451 fs/jfs/jfs_logmgr.c bp->l_blkno += sbi->nbperpage; bp 2452 fs/jfs/jfs_logmgr.c bp->l_flag = lbmWRITE | lbmSYNC | lbmDIRECT; bp 2453 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2454 fs/jfs/jfs_logmgr.c if ((rc = lbmIOWait(bp, 0))) bp 2464 fs/jfs/jfs_logmgr.c bp->l_blkno += sbi->nbperpage; bp 2465 fs/jfs/jfs_logmgr.c bp->l_flag = lbmWRITE | lbmSYNC | lbmDIRECT; bp 2466 fs/jfs/jfs_logmgr.c lbmStartIO(bp); bp 2467 fs/jfs/jfs_logmgr.c if ((rc = lbmIOWait(bp, 0))) bp 2477 fs/jfs/jfs_logmgr.c lbmFree(bp); bp 375 fs/jfs/jfs_logmgr.h struct lbuf *bp; /* 4: current log page buffer */ bp 45 fs/jfs/jfs_txnmgr.h struct lbuf *bp; bp 201 fs/nfsd/nfs4idmap.c char *buf1, *bp; bp 230 fs/nfsd/nfs4idmap.c ent.id = simple_strtoul(buf1, &bp, 10); bp 231 fs/nfsd/nfs4idmap.c if (bp == buf1) bp 768 fs/ocfs2/ioctl.c u64 __user *bp = NULL; bp 776 fs/ocfs2/ioctl.c bp = (u64 __user *)(unsigned long)compat_ptr(info->oi_requests); bp 781 fs/ocfs2/ioctl.c bp = (u64 __user *)(unsigned long)(info->oi_requests); bp 783 fs/ocfs2/ioctl.c if (o2info_from_user(*req_addr, bp + idx)) bp 33 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp; bp 35 fs/xfs/libxfs/xfs_ag.c bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0); bp 36 fs/xfs/libxfs/xfs_ag.c if (!bp) bp 39 fs/xfs/libxfs/xfs_ag.c xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); bp 40 fs/xfs/libxfs/xfs_ag.c bp->b_bn = blkno; bp 41 fs/xfs/libxfs/xfs_ag.c bp->b_maps[0].bm_bn = blkno; bp 42 fs/xfs/libxfs/xfs_ag.c bp->b_ops = ops; bp 44 fs/xfs/libxfs/xfs_ag.c return bp; bp 59 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 62 fs/xfs/libxfs/xfs_ag.c xfs_btree_init_block(mp, bp, id->type, 0, 0, id->agno); bp 69 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 73 fs/xfs/libxfs/xfs_ag.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 75 fs/xfs/libxfs/xfs_ag.c arec = XFS_ALLOC_REC_ADDR(mp, XFS_BUF_TO_BLOCK(bp), 1); bp 126 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 129 fs/xfs/libxfs/xfs_ag.c xfs_btree_init_block(mp, bp, XFS_BTNUM_BNO, 0, 1, id->agno); bp 130 fs/xfs/libxfs/xfs_ag.c xfs_freesp_init_recs(mp, bp, id); bp 136 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 139 fs/xfs/libxfs/xfs_ag.c xfs_btree_init_block(mp, bp, XFS_BTNUM_CNT, 0, 1, id->agno); bp 140 fs/xfs/libxfs/xfs_ag.c xfs_freesp_init_recs(mp, bp, id); bp 149 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 152 fs/xfs/libxfs/xfs_ag.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 155 fs/xfs/libxfs/xfs_ag.c xfs_btree_init_block(mp, bp, XFS_BTNUM_RMAP, 0, 4, id->agno); bp 228 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 231 fs/xfs/libxfs/xfs_ag.c struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); bp 240 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 243 fs/xfs/libxfs/xfs_ag.c struct xfs_agf *agf = XFS_BUF_TO_AGF(bp); bp 288 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 291 fs/xfs/libxfs/xfs_ag.c struct xfs_agfl *agfl = XFS_BUF_TO_AGFL(bp); bp 301 fs/xfs/libxfs/xfs_ag.c agfl_bno = XFS_BUF_TO_AGFL_BNO(mp, bp); bp 309 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp, bp 312 fs/xfs/libxfs/xfs_ag.c struct xfs_agi *agi = XFS_BUF_TO_AGI(bp); bp 335 fs/xfs/libxfs/xfs_ag.c typedef void (*aghdr_init_work_f)(struct xfs_mount *mp, struct xfs_buf *bp, bp 345 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp; bp 347 fs/xfs/libxfs/xfs_ag.c bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, ops); bp 348 fs/xfs/libxfs/xfs_ag.c if (!bp) bp 351 fs/xfs/libxfs/xfs_ag.c (*work)(mp, bp, id); bp 353 fs/xfs/libxfs/xfs_ag.c xfs_buf_delwri_queue(bp, &id->buffer_list); bp 354 fs/xfs/libxfs/xfs_ag.c xfs_buf_relse(bp); bp 490 fs/xfs/libxfs/xfs_ag.c struct xfs_buf *bp; bp 498 fs/xfs/libxfs/xfs_ag.c error = xfs_ialloc_read_agi(mp, tp, id->agno, &bp); bp 502 fs/xfs/libxfs/xfs_ag.c agi = XFS_BUF_TO_AGI(bp); bp 506 fs/xfs/libxfs/xfs_ag.c xfs_ialloc_log_agi(tp, bp, XFS_AGI_LENGTH); bp 511 fs/xfs/libxfs/xfs_ag.c error = xfs_alloc_read_agf(mp, tp, id->agno, 0, &bp); bp 515 fs/xfs/libxfs/xfs_ag.c agf = XFS_BUF_TO_AGF(bp); bp 518 fs/xfs/libxfs/xfs_ag.c xfs_alloc_log_agf(tp, bp, XFS_AGF_LENGTH); bp 526 fs/xfs/libxfs/xfs_ag.c error = xfs_rmap_free(tp, bp, id->agno, bp 552 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 554 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 555 fs/xfs/libxfs/xfs_alloc.c struct xfs_agfl *agfl = XFS_BUF_TO_AGFL(bp); bp 567 fs/xfs/libxfs/xfs_alloc.c if (!xfs_verify_magic(bp, agfl->agfl_magicnum)) bp 577 fs/xfs/libxfs/xfs_alloc.c if (bp->b_pag && be32_to_cpu(agfl->agfl_seqno) != bp->b_pag->pag_agno) bp 586 fs/xfs/libxfs/xfs_alloc.c if (!xfs_log_check_lsn(mp, be64_to_cpu(XFS_BUF_TO_AGFL(bp)->agfl_lsn))) bp 593 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 595 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 607 fs/xfs/libxfs/xfs_alloc.c if (!xfs_buf_verify_cksum(bp, XFS_AGFL_CRC_OFF)) bp 608 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 610 fs/xfs/libxfs/xfs_alloc.c fa = xfs_agfl_verify(bp); bp 612 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 618 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 620 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 621 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 628 fs/xfs/libxfs/xfs_alloc.c fa = xfs_agfl_verify(bp); bp 630 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 635 fs/xfs/libxfs/xfs_alloc.c XFS_BUF_TO_AGFL(bp)->agfl_lsn = cpu_to_be64(bip->bli_item.li_lsn); bp 637 fs/xfs/libxfs/xfs_alloc.c xfs_buf_update_cksum(bp, XFS_AGFL_CRC_OFF); bp 658 fs/xfs/libxfs/xfs_alloc.c xfs_buf_t *bp; /* return value */ bp 665 fs/xfs/libxfs/xfs_alloc.c XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_agfl_buf_ops); bp 668 fs/xfs/libxfs/xfs_alloc.c xfs_buf_set_ref(bp, XFS_AGFL_REF); bp 669 fs/xfs/libxfs/xfs_alloc.c *bpp = bp; bp 750 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp; bp 752 fs/xfs/libxfs/xfs_alloc.c bp = xfs_btree_get_bufs(args->mp, args->tp, args->agno, fbno); bp 753 fs/xfs/libxfs/xfs_alloc.c if (!bp) { bp 757 fs/xfs/libxfs/xfs_alloc.c xfs_trans_binval(args->tp, bp); bp 2082 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp; bp 2089 fs/xfs/libxfs/xfs_alloc.c bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno); bp 2090 fs/xfs/libxfs/xfs_alloc.c if (!bp) bp 2092 fs/xfs/libxfs/xfs_alloc.c xfs_trans_binval(tp, bp); bp 2459 fs/xfs/libxfs/xfs_alloc.c xfs_buf_t *bp, /* buffer for a.g. freelist header */ bp 2487 fs/xfs/libxfs/xfs_alloc.c trace_xfs_agf(tp->t_mountp, XFS_BUF_TO_AGF(bp), fields, _RET_IP_); bp 2489 fs/xfs/libxfs/xfs_alloc.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_AGF_BUF); bp 2492 fs/xfs/libxfs/xfs_alloc.c xfs_trans_log_buf(tp, bp, (uint)first, (uint)last); bp 2505 fs/xfs/libxfs/xfs_alloc.c xfs_buf_t *bp; bp 2508 fs/xfs/libxfs/xfs_alloc.c if ((error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp))) bp 2510 fs/xfs/libxfs/xfs_alloc.c if (bp) bp 2511 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, bp); bp 2578 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 2580 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 2581 fs/xfs/libxfs/xfs_alloc.c struct xfs_agf *agf = XFS_BUF_TO_AGF(bp); bp 2587 fs/xfs/libxfs/xfs_alloc.c be64_to_cpu(XFS_BUF_TO_AGF(bp)->agf_lsn))) bp 2591 fs/xfs/libxfs/xfs_alloc.c if (!xfs_verify_magic(bp, agf->agf_magicnum)) bp 2618 fs/xfs/libxfs/xfs_alloc.c if (bp->b_pag && be32_to_cpu(agf->agf_seqno) != bp->b_pag->pag_agno) bp 2636 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 2638 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 2642 fs/xfs/libxfs/xfs_alloc.c !xfs_buf_verify_cksum(bp, XFS_AGF_CRC_OFF)) bp 2643 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 2645 fs/xfs/libxfs/xfs_alloc.c fa = xfs_agf_verify(bp); bp 2647 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 2653 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf *bp) bp 2655 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = bp->b_mount; bp 2656 fs/xfs/libxfs/xfs_alloc.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 2659 fs/xfs/libxfs/xfs_alloc.c fa = xfs_agf_verify(bp); bp 2661 fs/xfs/libxfs/xfs_alloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 2669 fs/xfs/libxfs/xfs_alloc.c XFS_BUF_TO_AGF(bp)->agf_lsn = cpu_to_be64(bip->bli_item.li_lsn); bp 2671 fs/xfs/libxfs/xfs_alloc.c xfs_buf_update_cksum(bp, XFS_AGF_CRC_OFF); bp 135 fs/xfs/libxfs/xfs_alloc.h struct xfs_buf *bp, /* buffer for a.g. freelist header */ bp 87 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_buf *bp) bp 94 fs/xfs/libxfs/xfs_alloc_btree.c bno = xfs_daddr_to_agbno(cur->bc_mp, XFS_BUF_ADDR(bp)); bp 292 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_buf *bp) bp 294 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_mount *mp = bp->b_mount; bp 295 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 296 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_perag *pag = bp->b_pag; bp 301 fs/xfs/libxfs/xfs_alloc_btree.c if (!xfs_verify_magic(bp, block->bb_magic)) bp 305 fs/xfs/libxfs/xfs_alloc_btree.c fa = xfs_btree_sblock_v5hdr_verify(bp); bp 320 fs/xfs/libxfs/xfs_alloc_btree.c if (bp->b_ops->magic[0] == cpu_to_be32(XFS_ABTC_MAGIC)) bp 328 fs/xfs/libxfs/xfs_alloc_btree.c return xfs_btree_sblock_verify(bp, mp->m_alloc_mxr[level != 0]); bp 333 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_buf *bp) bp 337 fs/xfs/libxfs/xfs_alloc_btree.c if (!xfs_btree_sblock_verify_crc(bp)) bp 338 fs/xfs/libxfs/xfs_alloc_btree.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 340 fs/xfs/libxfs/xfs_alloc_btree.c fa = xfs_allocbt_verify(bp); bp 342 fs/xfs/libxfs/xfs_alloc_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 345 fs/xfs/libxfs/xfs_alloc_btree.c if (bp->b_error) bp 346 fs/xfs/libxfs/xfs_alloc_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 351 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_buf *bp) bp 355 fs/xfs/libxfs/xfs_alloc_btree.c fa = xfs_allocbt_verify(bp); bp 357 fs/xfs/libxfs/xfs_alloc_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 358 fs/xfs/libxfs/xfs_alloc_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 361 fs/xfs/libxfs/xfs_alloc_btree.c xfs_btree_sblock_calc_crc(bp); bp 582 fs/xfs/libxfs/xfs_attr.c struct xfs_buf *bp; bp 592 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); bp 600 fs/xfs/libxfs/xfs_attr.c retval = xfs_attr3_leaf_lookup_int(bp, args); bp 602 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 606 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 634 fs/xfs/libxfs/xfs_attr.c retval = xfs_attr3_leaf_add(bp, args); bp 718 fs/xfs/libxfs/xfs_attr.c -1, &bp); bp 722 fs/xfs/libxfs/xfs_attr.c xfs_attr3_leaf_remove(bp, args); bp 727 fs/xfs/libxfs/xfs_attr.c if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { bp 728 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); bp 762 fs/xfs/libxfs/xfs_attr.c struct xfs_buf *bp; bp 772 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); bp 776 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_lookup_int(bp, args); bp 778 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 782 fs/xfs/libxfs/xfs_attr.c xfs_attr3_leaf_remove(bp, args); bp 787 fs/xfs/libxfs/xfs_attr.c if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { bp 788 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); bp 810 fs/xfs/libxfs/xfs_attr.c struct xfs_buf *bp; bp 816 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); bp 820 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_lookup_int(bp, args); bp 822 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 825 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_getvalue(bp, args); bp 826 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 901 fs/xfs/libxfs/xfs_attr.c retval = xfs_attr3_leaf_add(blk->bp, state->args); bp 1024 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_remove(blk->bp, args); bp 1078 fs/xfs/libxfs/xfs_attr.c struct xfs_buf *bp; bp 1107 fs/xfs/libxfs/xfs_attr.c ASSERT(blk->bp != NULL); bp 1144 fs/xfs/libxfs/xfs_attr.c retval = xfs_attr3_leaf_remove(blk->bp, args); bp 1173 fs/xfs/libxfs/xfs_attr.c ASSERT(state->path.blk[0].bp); bp 1174 fs/xfs/libxfs/xfs_attr.c state->path.blk[0].bp = NULL; bp 1176 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_read(args->trans, args->dp, 0, -1, &bp); bp 1180 fs/xfs/libxfs/xfs_attr.c if ((forkoff = xfs_attr_shortform_allfit(bp, dp))) { bp 1181 fs/xfs/libxfs/xfs_attr.c error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); bp 1189 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, bp); bp 1220 fs/xfs/libxfs/xfs_attr.c if (blk->bp) { bp 1221 fs/xfs/libxfs/xfs_attr.c blk->disk_blkno = XFS_BUF_ADDR(blk->bp); bp 1222 fs/xfs/libxfs/xfs_attr.c blk->bp = NULL; bp 1235 fs/xfs/libxfs/xfs_attr.c if (blk->bp) { bp 1236 fs/xfs/libxfs/xfs_attr.c blk->disk_blkno = XFS_BUF_ADDR(blk->bp); bp 1237 fs/xfs/libxfs/xfs_attr.c blk->bp = NULL; bp 1272 fs/xfs/libxfs/xfs_attr.c &blk->bp, XFS_ATTR_FORK); bp 1276 fs/xfs/libxfs/xfs_attr.c blk->bp = NULL; bp 1291 fs/xfs/libxfs/xfs_attr.c &blk->bp, XFS_ATTR_FORK); bp 1295 fs/xfs/libxfs/xfs_attr.c blk->bp = NULL; bp 1340 fs/xfs/libxfs/xfs_attr.c retval = xfs_attr3_leaf_getvalue(blk->bp, args); bp 1347 fs/xfs/libxfs/xfs_attr.c xfs_trans_brelse(args->trans, state->path.blk[i].bp); bp 1348 fs/xfs/libxfs/xfs_attr.c state->path.blk[i].bp = NULL; bp 237 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp) bp 240 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_mount *mp = bp->b_mount; bp 241 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr_leafblock *leaf = bp->b_addr; bp 249 fs/xfs/libxfs/xfs_attr_leaf.c fa = xfs_da3_blkinfo_verify(bp, bp->b_addr); bp 271 fs/xfs/libxfs/xfs_attr_leaf.c entries = xfs_attr3_leaf_entryp(bp->b_addr); bp 273 fs/xfs/libxfs/xfs_attr_leaf.c (char *)bp->b_addr + ichdr.firstused) bp 311 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp) bp 313 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_mount *mp = bp->b_mount; bp 314 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 315 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr3_leaf_hdr *hdr3 = bp->b_addr; bp 318 fs/xfs/libxfs/xfs_attr_leaf.c fa = xfs_attr3_leaf_verify(bp); bp 320 fs/xfs/libxfs/xfs_attr_leaf.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 330 fs/xfs/libxfs/xfs_attr_leaf.c xfs_buf_update_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF); bp 341 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp) bp 343 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_mount *mp = bp->b_mount; bp 347 fs/xfs/libxfs/xfs_attr_leaf.c !xfs_buf_verify_cksum(bp, XFS_ATTR3_LEAF_CRC_OFF)) bp 348 fs/xfs/libxfs/xfs_attr_leaf.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 350 fs/xfs/libxfs/xfs_attr_leaf.c fa = xfs_attr3_leaf_verify(bp); bp 352 fs/xfs/libxfs/xfs_attr_leaf.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 814 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp; bp 831 fs/xfs/libxfs/xfs_attr_leaf.c bp = NULL; bp 837 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_create(args, blkno, &bp); bp 858 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_lookup_int(bp, &nargs); /* set a->index */ bp 860 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_add(bp, &nargs); bp 867 fs/xfs/libxfs/xfs_attr_leaf.c *leaf_bp = bp; bp 879 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 888 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_mount *mp = bp->b_mount; bp 890 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 995 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 1015 fs/xfs/libxfs/xfs_attr_leaf.c memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); bp 1022 fs/xfs/libxfs/xfs_attr_leaf.c memset(bp->b_addr, 0, args->geo->blksize); bp 1027 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_da_shrink_inode(args, 0, bp); bp 1159 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp; bp 1164 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_da_get_buf(args->trans, args->dp, blkno, -1, &bp, bp 1168 fs/xfs/libxfs/xfs_attr_leaf.c bp->b_ops = &xfs_attr3_leaf_buf_ops; bp 1169 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_buf_set_type(args->trans, bp, XFS_BLFT_ATTR_LEAF_BUF); bp 1170 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 1177 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_da3_blkinfo *hdr3 = bp->b_addr; bp 1181 fs/xfs/libxfs/xfs_attr_leaf.c hdr3->blkno = cpu_to_be64(bp->b_bn); bp 1193 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, 0, args->geo->blksize - 1); bp 1195 fs/xfs/libxfs/xfs_attr_leaf.c *bpp = bp; bp 1220 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_create(state->args, blkno, &newblk->bp); bp 1244 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_add(oldblk->bp, state->args); bp 1247 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_add(newblk->bp, state->args); bp 1253 fs/xfs/libxfs/xfs_attr_leaf.c oldblk->hashval = xfs_attr_leaf_lasthash(oldblk->bp, NULL); bp 1254 fs/xfs/libxfs/xfs_attr_leaf.c newblk->hashval = xfs_attr_leaf_lasthash(newblk->bp, NULL); bp 1263 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 1276 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 1298 fs/xfs/libxfs/xfs_attr_leaf.c tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, i); bp 1316 fs/xfs/libxfs/xfs_attr_leaf.c xfs_attr3_leaf_compact(args, &ichdr, bp); bp 1327 fs/xfs/libxfs/xfs_attr_leaf.c tmp = xfs_attr3_leaf_add_work(bp, &ichdr, args, 0); bp 1331 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1342 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 1357 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 1369 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1399 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1432 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1464 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp) bp 1475 fs/xfs/libxfs/xfs_attr_leaf.c memcpy(tmpbuffer, bp->b_addr, args->geo->blksize); bp 1476 fs/xfs/libxfs/xfs_attr_leaf.c memset(bp->b_addr, 0, args->geo->blksize); bp 1478 fs/xfs/libxfs/xfs_attr_leaf.c leaf_dst = bp->b_addr; bp 1485 fs/xfs/libxfs/xfs_attr_leaf.c memcpy(bp->b_addr, tmpbuffer, xfs_attr3_leaf_hdr_size(leaf_src)); bp 1510 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(trans, bp, 0, args->geo->blksize - 1); bp 1591 fs/xfs/libxfs/xfs_attr_leaf.c leaf1 = blk1->bp->b_addr; bp 1592 fs/xfs/libxfs/xfs_attr_leaf.c leaf2 = blk2->bp->b_addr; bp 1607 fs/xfs/libxfs/xfs_attr_leaf.c if (xfs_attr3_leaf_order(blk1->bp, &ichdr1, blk2->bp, &ichdr2)) { bp 1613 fs/xfs/libxfs/xfs_attr_leaf.c leaf1 = blk1->bp->b_addr; bp 1614 fs/xfs/libxfs/xfs_attr_leaf.c leaf2 = blk2->bp->b_addr; bp 1650 fs/xfs/libxfs/xfs_attr_leaf.c xfs_attr3_leaf_compact(args, &ichdr2, blk2->bp); bp 1679 fs/xfs/libxfs/xfs_attr_leaf.c xfs_attr3_leaf_compact(args, &ichdr1, blk1->bp); bp 1690 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, blk1->bp, 0, args->geo->blksize - 1); bp 1691 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, blk2->bp, 0, args->geo->blksize - 1); bp 1767 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr_leafblock *leaf1 = blk1->bp->b_addr; bp 1768 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr_leafblock *leaf2 = blk2->bp->b_addr; bp 1865 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp; bp 1881 fs/xfs/libxfs/xfs_attr_leaf.c leaf = blk->bp->b_addr; bp 1934 fs/xfs/libxfs/xfs_attr_leaf.c blkno, -1, &bp); bp 1938 fs/xfs/libxfs/xfs_attr_leaf.c xfs_attr3_leaf_hdr_from_disk(state->args->geo, &ichdr2, bp->b_addr); bp 1947 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_brelse(state->args->trans, bp); bp 1986 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 2002 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 2086 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2093 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2121 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2144 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr_leafblock *drop_leaf = drop_blk->bp->b_addr; bp 2145 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_attr_leafblock *save_leaf = save_blk->bp->b_addr; bp 2152 fs/xfs/libxfs/xfs_attr_leaf.c drop_leaf = drop_blk->bp->b_addr; bp 2153 fs/xfs/libxfs/xfs_attr_leaf.c save_leaf = save_blk->bp->b_addr; bp 2173 fs/xfs/libxfs/xfs_attr_leaf.c if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, bp 2174 fs/xfs/libxfs/xfs_attr_leaf.c drop_blk->bp, &drophdr)) { bp 2211 fs/xfs/libxfs/xfs_attr_leaf.c if (xfs_attr3_leaf_order(save_blk->bp, &savehdr, bp 2212 fs/xfs/libxfs/xfs_attr_leaf.c drop_blk->bp, &drophdr)) { bp 2237 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(state->args->trans, save_blk->bp, 0, bp 2266 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 2281 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 2383 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 2392 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 2572 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp, bp 2577 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_mount *mp = bp->b_mount; bp 2579 fs/xfs/libxfs/xfs_attr_leaf.c xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, bp->b_addr); bp 2580 fs/xfs/libxfs/xfs_attr_leaf.c entries = xfs_attr3_leaf_entryp(bp->b_addr); bp 2651 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp; bp 2664 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); bp 2668 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 2692 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2700 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2720 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_buf *bp; bp 2731 fs/xfs/libxfs/xfs_attr_leaf.c error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp); bp 2735 fs/xfs/libxfs/xfs_attr_leaf.c leaf = bp->b_addr; bp 2745 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 2751 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_buf(args->trans, bp, bp 42 fs/xfs/libxfs/xfs_attr_leaf.h int xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp); bp 51 fs/xfs/libxfs/xfs_attr_leaf.h int xfs_attr3_leaf_to_shortform(struct xfs_buf *bp, bp 65 fs/xfs/libxfs/xfs_attr_leaf.h int xfs_attr3_leaf_getvalue(struct xfs_buf *bp, struct xfs_da_args *args); bp 70 fs/xfs/libxfs/xfs_attr_leaf.h void xfs_attr3_leaf_list_int(struct xfs_buf *bp, bp 83 fs/xfs/libxfs/xfs_attr_leaf.h xfs_dahash_t xfs_attr_leaf_lasthash(struct xfs_buf *bp, int *count); bp 74 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp, bp 83 fs/xfs/libxfs/xfs_attr_remote.c if (!xfs_verify_magic(bp, rmt->rm_magic)) bp 102 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp, bp 106 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_mount *mp = bp->b_mount; bp 116 fs/xfs/libxfs/xfs_attr_remote.c ptr = bp->b_addr; bp 117 fs/xfs/libxfs/xfs_attr_remote.c bno = bp->b_bn; bp 118 fs/xfs/libxfs/xfs_attr_remote.c len = BBTOB(bp->b_length); bp 127 fs/xfs/libxfs/xfs_attr_remote.c *failaddr = xfs_attr3_rmt_verify(mp, bp, ptr, blksize, bno); bp 145 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp) bp 150 fs/xfs/libxfs/xfs_attr_remote.c error = __xfs_attr3_rmt_read_verify(bp, true, &fa); bp 152 fs/xfs/libxfs/xfs_attr_remote.c xfs_verifier_error(bp, error, fa); bp 157 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp) bp 162 fs/xfs/libxfs/xfs_attr_remote.c error = __xfs_attr3_rmt_read_verify(bp, false, &fa); bp 168 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp) bp 170 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_mount *mp = bp->b_mount; bp 181 fs/xfs/libxfs/xfs_attr_remote.c ptr = bp->b_addr; bp 182 fs/xfs/libxfs/xfs_attr_remote.c bno = bp->b_bn; bp 183 fs/xfs/libxfs/xfs_attr_remote.c len = BBTOB(bp->b_length); bp 189 fs/xfs/libxfs/xfs_attr_remote.c fa = xfs_attr3_rmt_verify(mp, bp, ptr, blksize, bno); bp 191 fs/xfs/libxfs/xfs_attr_remote.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 200 fs/xfs/libxfs/xfs_attr_remote.c xfs_verifier_error(bp, -EFSCORRUPTED, __this_address); bp 211 fs/xfs/libxfs/xfs_attr_remote.c xfs_verifier_error(bp, -EFSCORRUPTED, __this_address); bp 264 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp, bp 270 fs/xfs/libxfs/xfs_attr_remote.c char *src = bp->b_addr; bp 271 fs/xfs/libxfs/xfs_attr_remote.c xfs_daddr_t bno = bp->b_bn; bp 272 fs/xfs/libxfs/xfs_attr_remote.c int len = BBTOB(bp->b_length); bp 312 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp, bp 318 fs/xfs/libxfs/xfs_attr_remote.c char *dst = bp->b_addr; bp 319 fs/xfs/libxfs/xfs_attr_remote.c xfs_daddr_t bno = bp->b_bn; bp 320 fs/xfs/libxfs/xfs_attr_remote.c int len = BBTOB(bp->b_length); bp 370 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp; bp 405 fs/xfs/libxfs/xfs_attr_remote.c dblkno, dblkcnt, 0, &bp, bp 410 fs/xfs/libxfs/xfs_attr_remote.c error = xfs_attr_rmtval_copyout(mp, bp, args->dp->i_ino, bp 413 fs/xfs/libxfs/xfs_attr_remote.c xfs_trans_brelse(args->trans, bp); bp 513 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp; bp 532 fs/xfs/libxfs/xfs_attr_remote.c bp = xfs_buf_get(mp->m_ddev_targp, dblkno, dblkcnt); bp 533 fs/xfs/libxfs/xfs_attr_remote.c if (!bp) bp 535 fs/xfs/libxfs/xfs_attr_remote.c bp->b_ops = &xfs_attr3_rmt_buf_ops; bp 537 fs/xfs/libxfs/xfs_attr_remote.c xfs_attr_rmtval_copyin(mp, bp, args->dp->i_ino, &offset, bp 540 fs/xfs/libxfs/xfs_attr_remote.c error = xfs_bwrite(bp); /* GROT: NOTE: synchronous write */ bp 541 fs/xfs/libxfs/xfs_attr_remote.c xfs_buf_relse(bp); bp 577 fs/xfs/libxfs/xfs_attr_remote.c struct xfs_buf *bp; bp 600 fs/xfs/libxfs/xfs_attr_remote.c bp = xfs_buf_incore(mp->m_ddev_targp, dblkno, dblkcnt, XBF_TRYLOCK); bp 601 fs/xfs/libxfs/xfs_attr_remote.c if (bp) { bp 602 fs/xfs/libxfs/xfs_attr_remote.c xfs_buf_stale(bp); bp 603 fs/xfs/libxfs/xfs_attr_remote.c xfs_buf_relse(bp); bp 604 fs/xfs/libxfs/xfs_attr_remote.c bp = NULL; bp 321 fs/xfs/libxfs/xfs_bmap.c xfs_buf_t *bp; /* buffer for "block" */ bp 365 fs/xfs/libxfs/xfs_bmap.c bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); bp 366 fs/xfs/libxfs/xfs_bmap.c if (!bp) { bp 368 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, NULL, bno, &bp, bp 374 fs/xfs/libxfs/xfs_bmap.c block = XFS_BUF_TO_BLOCK(bp); bp 390 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(NULL, bp); bp 439 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(NULL, bp); bp 449 fs/xfs/libxfs/xfs_bmap.c bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); bp 450 fs/xfs/libxfs/xfs_bmap.c if (!bp) { bp 452 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, NULL, bno, &bp, bp 458 fs/xfs/libxfs/xfs_bmap.c block = XFS_BUF_TO_BLOCK(bp); bp 466 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(NULL, bp); bp 824 fs/xfs/libxfs/xfs_bmap.c struct xfs_buf *bp, bp 832 fs/xfs/libxfs/xfs_bmap.c xfs_buf_t *bp; /* buffer for extent block */ bp 878 fs/xfs/libxfs/xfs_bmap.c bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno); bp 888 fs/xfs/libxfs/xfs_bmap.c init_fn(tp, bp, ip, ifp); bp 1174 fs/xfs/libxfs/xfs_bmap.c struct xfs_buf *bp; bp 1203 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, bp 1207 fs/xfs/libxfs/xfs_bmap.c block = XFS_BUF_TO_BLOCK(bp); bp 1214 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); bp 1269 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); bp 1276 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, bp 1280 fs/xfs/libxfs/xfs_bmap.c block = XFS_BUF_TO_BLOCK(bp); bp 1293 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); bp 280 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_buf *bp) bp 285 fs/xfs/libxfs/xfs_bmap_btree.c xfs_fsblock_t fsbno = XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(bp)); bp 421 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_buf *bp) bp 423 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_mount *mp = bp->b_mount; bp 424 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 428 fs/xfs/libxfs/xfs_bmap_btree.c if (!xfs_verify_magic(bp, block->bb_magic)) bp 436 fs/xfs/libxfs/xfs_bmap_btree.c fa = xfs_btree_lblock_v5hdr_verify(bp, XFS_RMAP_OWN_UNKNOWN); bp 452 fs/xfs/libxfs/xfs_bmap_btree.c return xfs_btree_lblock_verify(bp, mp->m_bmap_dmxr[level != 0]); bp 457 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_buf *bp) bp 461 fs/xfs/libxfs/xfs_bmap_btree.c if (!xfs_btree_lblock_verify_crc(bp)) bp 462 fs/xfs/libxfs/xfs_bmap_btree.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 464 fs/xfs/libxfs/xfs_bmap_btree.c fa = xfs_bmbt_verify(bp); bp 466 fs/xfs/libxfs/xfs_bmap_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 469 fs/xfs/libxfs/xfs_bmap_btree.c if (bp->b_error) bp 470 fs/xfs/libxfs/xfs_bmap_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 475 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_buf *bp) bp 479 fs/xfs/libxfs/xfs_bmap_btree.c fa = xfs_bmbt_verify(bp); bp 481 fs/xfs/libxfs/xfs_bmap_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 482 fs/xfs/libxfs/xfs_bmap_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 485 fs/xfs/libxfs/xfs_bmap_btree.c xfs_btree_lblock_calc_crc(bp); bp 61 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 71 fs/xfs/libxfs/xfs_btree.c cpu_to_be64(bp ? bp->b_bn : XFS_BUF_DADDR_NULL)) bp 102 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 107 fs/xfs/libxfs/xfs_btree.c fa = __xfs_btree_check_lblock(cur, block, level, bp); bp 110 fs/xfs/libxfs/xfs_btree.c if (bp) bp 111 fs/xfs/libxfs/xfs_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 127 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 137 fs/xfs/libxfs/xfs_btree.c cpu_to_be64(bp ? bp->b_bn : XFS_BUF_DADDR_NULL)) bp 166 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 171 fs/xfs/libxfs/xfs_btree.c fa = __xfs_btree_check_sblock(cur, block, level, bp); bp 174 fs/xfs/libxfs/xfs_btree.c if (bp) bp 175 fs/xfs/libxfs/xfs_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 190 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) /* buffer containing block, if any */ bp 193 fs/xfs/libxfs/xfs_btree.c return xfs_btree_check_lblock(cur, block, level, bp); bp 195 fs/xfs/libxfs/xfs_btree.c return xfs_btree_check_sblock(cur, block, level, bp); bp 271 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 273 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 274 fs/xfs/libxfs/xfs_btree.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 276 fs/xfs/libxfs/xfs_btree.c if (!xfs_sb_version_hascrc(&bp->b_mount->m_sb)) bp 280 fs/xfs/libxfs/xfs_btree.c xfs_buf_update_cksum(bp, XFS_BTREE_LBLOCK_CRC_OFF); bp 285 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 287 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 288 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 293 fs/xfs/libxfs/xfs_btree.c return xfs_buf_verify_cksum(bp, XFS_BTREE_LBLOCK_CRC_OFF); bp 309 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 311 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 312 fs/xfs/libxfs/xfs_btree.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 314 fs/xfs/libxfs/xfs_btree.c if (!xfs_sb_version_hascrc(&bp->b_mount->m_sb)) bp 318 fs/xfs/libxfs/xfs_btree.c xfs_buf_update_cksum(bp, XFS_BTREE_SBLOCK_CRC_OFF); bp 323 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 325 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 326 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 331 fs/xfs/libxfs/xfs_btree.c return xfs_buf_verify_cksum(bp, XFS_BTREE_SBLOCK_CRC_OFF); bp 340 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 344 fs/xfs/libxfs/xfs_btree.c error = cur->bc_ops->free_block(cur, bp); bp 346 fs/xfs/libxfs/xfs_btree.c xfs_trans_binval(cur->bc_tp, bp); bp 399 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp; /* btree block's buffer pointer */ bp 425 fs/xfs/libxfs/xfs_btree.c bp = cur->bc_bufs[i]; bp 426 fs/xfs/libxfs/xfs_btree.c if (bp) { bp 428 fs/xfs/libxfs/xfs_btree.c XFS_BUF_ADDR(bp), mp->m_bsize, bp 429 fs/xfs/libxfs/xfs_btree.c 0, &bp, bp 437 fs/xfs/libxfs/xfs_btree.c new->bc_bufs[i] = bp; bp 728 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp; /* buffer containing block */ bp 730 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 731 fs/xfs/libxfs/xfs_btree.c xfs_btree_check_block(cur, block, level, bp); bp 748 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp; /* buffer containing block */ bp 753 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 754 fs/xfs/libxfs/xfs_btree.c if (xfs_btree_check_block(cur, block, level, bp)) bp 778 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp; /* buffer containing block */ bp 783 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 784 fs/xfs/libxfs/xfs_btree.c if (xfs_btree_check_block(cur, block, level, bp)) bp 847 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* return value */ bp 855 fs/xfs/libxfs/xfs_btree.c mp->m_bsize, 0, &bp, ops); bp 858 fs/xfs/libxfs/xfs_btree.c if (bp) bp 859 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, refval); bp 860 fs/xfs/libxfs/xfs_btree.c *bpp = bp; bp 1040 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp) /* new buffer to set */ bp 1046 fs/xfs/libxfs/xfs_btree.c cur->bc_bufs[lev] = bp; bp 1049 fs/xfs/libxfs/xfs_btree.c b = XFS_BUF_TO_BLOCK(bp); bp 1178 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 1184 fs/xfs/libxfs/xfs_btree.c xfs_btree_init_block_int(mp, XFS_BUF_TO_BLOCK(bp), bp->b_bn, bp 1191 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 1208 fs/xfs/libxfs/xfs_btree.c xfs_btree_init_block_int(cur->bc_mp, XFS_BUF_TO_BLOCK(bp), bp->b_bn, bp 1240 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 1245 fs/xfs/libxfs/xfs_btree.c XFS_BUF_ADDR(bp))); bp 1248 fs/xfs/libxfs/xfs_btree.c XFS_BUF_ADDR(bp))); bp 1255 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 1260 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, XFS_ALLOC_BTREE_REF); bp 1264 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, XFS_INO_BTREE_REF); bp 1267 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, XFS_BMAP_BTREE_REF); bp 1270 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, XFS_RMAP_BTREE_REF); bp 1273 fs/xfs/libxfs/xfs_btree.c xfs_buf_set_ref(bp, XFS_REFC_BTREE_REF); bp 1443 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 1448 fs/xfs/libxfs/xfs_btree.c if (bp) { bp 1449 fs/xfs/libxfs/xfs_btree.c xfs_trans_buf_set_type(cur->bc_tp, bp, XFS_BLFT_BTREE_BUF); bp 1450 fs/xfs/libxfs/xfs_btree.c xfs_trans_log_buf(cur->bc_tp, bp, bp 1465 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 1470 fs/xfs/libxfs/xfs_btree.c xfs_trans_buf_set_type(cur->bc_tp, bp, XFS_BLFT_BTREE_BUF); bp 1471 fs/xfs/libxfs/xfs_btree.c xfs_trans_log_buf(cur->bc_tp, bp, bp 1483 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, /* buffer containing btree block */ bp 1488 fs/xfs/libxfs/xfs_btree.c if (bp) { bp 1489 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 1492 fs/xfs/libxfs/xfs_btree.c xfs_trans_buf_set_type(cur->bc_tp, bp, XFS_BLFT_BTREE_BUF); bp 1493 fs/xfs/libxfs/xfs_btree.c xfs_trans_log_buf(cur->bc_tp, bp, bp 1509 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, /* buffer containing btree block */ bp 1542 fs/xfs/libxfs/xfs_btree.c if (bp) { bp 1563 fs/xfs/libxfs/xfs_btree.c xfs_trans_buf_set_type(cur->bc_tp, bp, XFS_BLFT_BTREE_BUF); bp 1564 fs/xfs/libxfs/xfs_btree.c xfs_trans_log_buf(cur->bc_tp, bp, first, last); bp 1583 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 1593 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 1596 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 1617 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, lev, &bp); bp 1620 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, lev, bp); bp 1649 fs/xfs/libxfs/xfs_btree.c for (block = xfs_btree_get_block(cur, lev, &bp); lev > level; ) { bp 1654 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp); bp 1658 fs/xfs/libxfs/xfs_btree.c xfs_btree_setbuf(cur, lev, bp); bp 1684 fs/xfs/libxfs/xfs_btree.c xfs_buf_t *bp; bp 1699 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 1702 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 1742 fs/xfs/libxfs/xfs_btree.c for (block = xfs_btree_get_block(cur, lev, &bp); lev > level; ) { bp 1747 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_read_buf_block(cur, ptrp, 0, &block, &bp); bp 1750 fs/xfs/libxfs/xfs_btree.c xfs_btree_setbuf(cur, lev, bp); bp 1772 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* buffer pointer for btree block */ bp 1789 fs/xfs/libxfs/xfs_btree.c bp = cur->bc_bufs[level]; bp 1793 fs/xfs/libxfs/xfs_btree.c if (bp && XFS_BUF_ADDR(bp) == daddr) { bp 1794 fs/xfs/libxfs/xfs_btree.c *blkp = XFS_BUF_TO_BLOCK(bp); bp 1798 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_read_buf_block(cur, pp, 0, blkp, &bp); bp 1818 fs/xfs/libxfs/xfs_btree.c xfs_btree_setbuf(cur, level, bp); bp 1823 fs/xfs/libxfs/xfs_btree.c xfs_trans_brelse(cur->bc_tp, bp); bp 2131 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 2149 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 2150 fs/xfs/libxfs/xfs_btree.c trace_xfs_btree_updkeys(cur, level, bp); bp 2152 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 2164 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_keys(cur, bp, ptr, ptr); bp 2179 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 2182 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 2183 fs/xfs/libxfs/xfs_btree.c return __xfs_btree_updkeys(cur, level, block, bp, true); bp 2195 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 2202 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 2204 fs/xfs/libxfs/xfs_btree.c return __xfs_btree_updkeys(cur, level, block, bp, false); bp 2217 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 2219 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 2226 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_keys(cur, bp, ptr, ptr); bp 2243 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 2249 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, 0, &bp); bp 2252 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, 0, bp); bp 2262 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_recs(cur, bp, ptr, ptr); bp 3024 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* buffer containing block */ bp 3063 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, cur->bc_nlevels - 1, &bp); bp 3066 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, cur->bc_nlevels - 1, bp); bp 3074 fs/xfs/libxfs/xfs_btree.c lbp = bp; bp 3080 fs/xfs/libxfs/xfs_btree.c bp = rbp; bp 3084 fs/xfs/libxfs/xfs_btree.c rbp = bp; bp 3091 fs/xfs/libxfs/xfs_btree.c bp = lbp; bp 3225 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* buffer for block */ bp 3264 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 3265 fs/xfs/libxfs/xfs_btree.c old_bn = bp ? bp->b_bn : XFS_BUF_DADDR_NULL; bp 3269 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 3301 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 3305 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 3342 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_ptrs(cur, bp, ptr, numrecs); bp 3343 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_keys(cur, bp, ptr, numrecs); bp 3361 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_recs(cur, bp, ptr, numrecs); bp 3371 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_block(cur, bp, XFS_BB_NUMRECS); bp 3381 fs/xfs/libxfs/xfs_btree.c if (bp && bp->b_bn != old_bn) { bp 3608 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 3622 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_free_block(cur, bp); bp 3666 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* buffer for block */ bp 3693 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 3697 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 3729 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_keys(cur, bp, ptr, numrecs - 1); bp 3730 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_ptrs(cur, bp, ptr, numrecs - 1); bp 3738 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_recs(cur, bp, ptr, numrecs - 1); bp 3746 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_block(cur, bp, XFS_BB_NUMRECS); bp 3790 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_kill_root(cur, bp, level, pp); bp 4005 fs/xfs/libxfs/xfs_btree.c rbp = bp; bp 4022 fs/xfs/libxfs/xfs_btree.c lbp = bp; bp 4111 fs/xfs/libxfs/xfs_btree.c if (bp != lbp) { bp 4222 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; /* buffer pointer */ bp 4229 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, 0, &bp); bp 4232 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, 0, bp); bp 4262 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 4268 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 4365 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 4368 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 4386 fs/xfs/libxfs/xfs_btree.c if (!bp) { bp 4393 fs/xfs/libxfs/xfs_btree.c if (!xfs_trans_ordered_buf(cur->bc_tp, bp)) { bp 4394 fs/xfs/libxfs/xfs_btree.c xfs_btree_log_block(cur, bp, XFS_BB_OWNER); bp 4398 fs/xfs/libxfs/xfs_btree.c xfs_buf_delwri_queue(bp, bbcoi->buffer_list); bp 4422 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 4425 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 4426 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 4432 fs/xfs/libxfs/xfs_btree.c if (block->bb_u.l.bb_blkno != cpu_to_be64(bp->b_bn)) bp 4443 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 4446 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 4447 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 4472 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp) bp 4474 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 4475 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 4476 fs/xfs/libxfs/xfs_btree.c struct xfs_perag *pag = bp->b_pag; bp 4482 fs/xfs/libxfs/xfs_btree.c if (block->bb_u.s.bb_blkno != cpu_to_be64(bp->b_bn)) bp 4497 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp, bp 4500 fs/xfs/libxfs/xfs_btree.c struct xfs_mount *mp = bp->b_mount; bp 4501 fs/xfs/libxfs/xfs_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 4509 fs/xfs/libxfs/xfs_btree.c agno = xfs_daddr_to_agno(mp, XFS_BUF_ADDR(bp)); bp 4653 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 4663 fs/xfs/libxfs/xfs_btree.c xfs_btree_get_block(cur, level, &bp); bp 4664 fs/xfs/libxfs/xfs_btree.c trace_xfs_btree_overlapped_query_range(cur, level, bp); bp 4666 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 4673 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, level, &bp); bp 4732 fs/xfs/libxfs/xfs_btree.c xfs_btree_get_block(cur, level, &bp); bp 4733 fs/xfs/libxfs/xfs_btree.c trace_xfs_btree_overlapped_query_range(cur, level, bp); bp 4735 fs/xfs/libxfs/xfs_btree.c error = xfs_btree_check_block(cur, block, level, bp); bp 4919 fs/xfs/libxfs/xfs_btree.c struct xfs_buf *bp; bp 4921 fs/xfs/libxfs/xfs_btree.c block = xfs_btree_get_block(cur, 0, &bp); bp 114 fs/xfs/libxfs/xfs_btree.h int (*free_block)(struct xfs_btree_cur *cur, struct xfs_buf *bp); bp 240 fs/xfs/libxfs/xfs_btree.h #define XFS_BUF_TO_BLOCK(bp) ((struct xfs_btree_block *)((bp)->b_addr)) bp 247 fs/xfs/libxfs/xfs_btree.h struct xfs_btree_block *block, int level, struct xfs_buf *bp); bp 249 fs/xfs/libxfs/xfs_btree.h struct xfs_btree_block *block, int level, struct xfs_buf *bp); bp 259 fs/xfs/libxfs/xfs_btree.h struct xfs_buf *bp); /* buffer containing block, if any */ bp 379 fs/xfs/libxfs/xfs_btree.h struct xfs_buf *bp, bp 456 fs/xfs/libxfs/xfs_btree.h xfs_failaddr_t xfs_btree_sblock_v5hdr_verify(struct xfs_buf *bp); bp 457 fs/xfs/libxfs/xfs_btree.h xfs_failaddr_t xfs_btree_sblock_verify(struct xfs_buf *bp, bp 459 fs/xfs/libxfs/xfs_btree.h xfs_failaddr_t xfs_btree_lblock_v5hdr_verify(struct xfs_buf *bp, bp 461 fs/xfs/libxfs/xfs_btree.h xfs_failaddr_t xfs_btree_lblock_verify(struct xfs_buf *bp, bp 96 fs/xfs/libxfs/xfs_da_btree.c state->altpath.blk[i].bp = NULL; bp 120 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp, bp 123 fs/xfs/libxfs/xfs_da_btree.c struct xfs_mount *mp = bp->b_mount; bp 126 fs/xfs/libxfs/xfs_da_btree.c if (!xfs_verify_magic16(bp, hdr->magic)) bp 132 fs/xfs/libxfs/xfs_da_btree.c if (be64_to_cpu(hdr3->blkno) != bp->b_bn) bp 143 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp) bp 145 fs/xfs/libxfs/xfs_da_btree.c struct xfs_mount *mp = bp->b_mount; bp 146 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_intnode *hdr = bp->b_addr; bp 155 fs/xfs/libxfs/xfs_da_btree.c fa = xfs_da3_blkinfo_verify(bp, bp->b_addr); bp 181 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp) bp 183 fs/xfs/libxfs/xfs_da_btree.c struct xfs_mount *mp = bp->b_mount; bp 184 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 185 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da3_node_hdr *hdr3 = bp->b_addr; bp 188 fs/xfs/libxfs/xfs_da_btree.c fa = xfs_da3_node_verify(bp); bp 190 fs/xfs/libxfs/xfs_da_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 200 fs/xfs/libxfs/xfs_da_btree.c xfs_buf_update_cksum(bp, XFS_DA3_NODE_CRC_OFF); bp 211 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp) bp 213 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_blkinfo *info = bp->b_addr; bp 218 fs/xfs/libxfs/xfs_da_btree.c if (!xfs_buf_verify_cksum(bp, XFS_DA3_NODE_CRC_OFF)) { bp 219 fs/xfs/libxfs/xfs_da_btree.c xfs_verifier_error(bp, -EFSBADCRC, bp 225 fs/xfs/libxfs/xfs_da_btree.c fa = xfs_da3_node_verify(bp); bp 227 fs/xfs/libxfs/xfs_da_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 231 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = &xfs_attr3_leaf_buf_ops; bp 232 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops->verify_read(bp); bp 236 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = &xfs_dir3_leafn_buf_ops; bp 237 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops->verify_read(bp); bp 240 fs/xfs/libxfs/xfs_da_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, __this_address); bp 248 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp) bp 250 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da_blkinfo *info = bp->b_addr; bp 255 fs/xfs/libxfs/xfs_da_btree.c return xfs_da3_node_verify(bp); bp 258 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = &xfs_attr3_leaf_buf_ops; bp 259 fs/xfs/libxfs/xfs_da_btree.c return bp->b_ops->verify_struct(bp); bp 262 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = &xfs_dir3_leafn_buf_ops; bp 263 fs/xfs/libxfs/xfs_da_btree.c return bp->b_ops->verify_struct(bp); bp 339 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 346 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork); bp 349 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = &xfs_da3_node_buf_ops; bp 350 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF); bp 351 fs/xfs/libxfs/xfs_da_btree.c node = bp->b_addr; bp 354 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da3_node_hdr *hdr3 = bp->b_addr; bp 358 fs/xfs/libxfs/xfs_da_btree.c hdr3->info.blkno = cpu_to_be64(bp->b_bn); bp 367 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, bp 370 fs/xfs/libxfs/xfs_da_btree.c *bpp = bp; bp 455 fs/xfs/libxfs/xfs_da_btree.c addblk->bp = NULL; bp 504 fs/xfs/libxfs/xfs_da_btree.c node = oldblk->bp->b_addr; bp 510 fs/xfs/libxfs/xfs_da_btree.c node = addblk->bp->b_addr; bp 512 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, addblk->bp, bp 516 fs/xfs/libxfs/xfs_da_btree.c node = oldblk->bp->b_addr; bp 522 fs/xfs/libxfs/xfs_da_btree.c node = addblk->bp->b_addr; bp 524 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, addblk->bp, bp 529 fs/xfs/libxfs/xfs_da_btree.c addblk->bp = NULL; bp 549 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 571 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); bp 574 fs/xfs/libxfs/xfs_da_btree.c node = bp->b_addr; bp 575 fs/xfs/libxfs/xfs_da_btree.c oldroot = blk1->bp->b_addr; bp 589 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF); bp 607 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAFN_BUF); bp 621 fs/xfs/libxfs/xfs_da_btree.c node3->hdr.info.blkno = cpu_to_be64(bp->b_bn); bp 623 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, 0, size - 1); bp 625 fs/xfs/libxfs/xfs_da_btree.c bp->b_ops = blk1->bp->b_ops; bp 626 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_copy_type(bp, blk1->bp); bp 627 fs/xfs/libxfs/xfs_da_btree.c blk1->bp = bp; bp 635 fs/xfs/libxfs/xfs_da_btree.c level + 1, &bp, args->whichfork); bp 639 fs/xfs/libxfs/xfs_da_btree.c node = bp->b_addr; bp 660 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, bp 688 fs/xfs/libxfs/xfs_da_btree.c node = oldblk->bp->b_addr; bp 709 fs/xfs/libxfs/xfs_da_btree.c &newblk->bp, state->args->whichfork); bp 735 fs/xfs/libxfs/xfs_da_btree.c node = oldblk->bp->b_addr; bp 789 fs/xfs/libxfs/xfs_da_btree.c node1 = blk1->bp->b_addr; bp 790 fs/xfs/libxfs/xfs_da_btree.c node2 = blk2->bp->b_addr; bp 855 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk1->bp, bp 873 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk1->bp, bp 877 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk2->bp, bp 887 fs/xfs/libxfs/xfs_da_btree.c node1 = blk1->bp->b_addr; bp 888 fs/xfs/libxfs/xfs_da_btree.c node2 = blk2->bp->b_addr; bp 923 fs/xfs/libxfs/xfs_da_btree.c node = oldblk->bp->b_addr; bp 943 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, oldblk->bp, bp 949 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, oldblk->bp, bp 1033 fs/xfs/libxfs/xfs_da_btree.c drop_blk->bp); bp 1034 fs/xfs/libxfs/xfs_da_btree.c drop_blk->bp = NULL; bp 1083 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 1094 fs/xfs/libxfs/xfs_da_btree.c oldroot = root_blk->bp->b_addr; bp 1112 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(args->trans, dp, child, -1, &bp, bp 1116 fs/xfs/libxfs/xfs_da_btree.c xfs_da_blkinfo_onlychild_validate(bp->b_addr, oldroothdr.level); bp 1125 fs/xfs/libxfs/xfs_da_btree.c memcpy(root_blk->bp->b_addr, bp->b_addr, args->geo->blksize); bp 1126 fs/xfs/libxfs/xfs_da_btree.c root_blk->bp->b_ops = bp->b_ops; bp 1127 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_copy_type(root_blk->bp, bp); bp 1129 fs/xfs/libxfs/xfs_da_btree.c struct xfs_da3_blkinfo *da3 = root_blk->bp->b_addr; bp 1130 fs/xfs/libxfs/xfs_da_btree.c da3->blkno = cpu_to_be64(root_blk->bp->b_bn); bp 1132 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, root_blk->bp, 0, bp 1134 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da_shrink_inode(args, child, bp); bp 1156 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 1173 fs/xfs/libxfs/xfs_da_btree.c info = blk->bp->b_addr; bp 1228 fs/xfs/libxfs/xfs_da_btree.c blkno, -1, &bp, state->args->whichfork); bp 1232 fs/xfs/libxfs/xfs_da_btree.c node = bp->b_addr; bp 1234 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(state->args->trans, bp); bp 1272 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp, bp 1279 fs/xfs/libxfs/xfs_da_btree.c node = bp->b_addr; bp 1312 fs/xfs/libxfs/xfs_da_btree.c lasthash = xfs_attr_leaf_lasthash(blk->bp, &count); bp 1317 fs/xfs/libxfs/xfs_da_btree.c lasthash = xfs_dir2_leaf_lasthash(dp, blk->bp, &count); bp 1322 fs/xfs/libxfs/xfs_da_btree.c lasthash = xfs_da3_node_lasthash(dp, blk->bp, &count); bp 1330 fs/xfs/libxfs/xfs_da_btree.c node = blk->bp->b_addr; bp 1337 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, blk->bp, bp 1362 fs/xfs/libxfs/xfs_da_btree.c node = drop_blk->bp->b_addr; bp 1376 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, drop_blk->bp, bp 1381 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, drop_blk->bp, bp 1385 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(state->args->trans, drop_blk->bp, bp 1417 fs/xfs/libxfs/xfs_da_btree.c drop_node = drop_blk->bp->b_addr; bp 1418 fs/xfs/libxfs/xfs_da_btree.c save_node = save_blk->bp->b_addr; bp 1438 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, bp 1444 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, bp 1457 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, bp 1520 fs/xfs/libxfs/xfs_da_btree.c -1, &blk->bp, args->whichfork); bp 1526 fs/xfs/libxfs/xfs_da_btree.c curr = blk->bp->b_addr; bp 1532 fs/xfs/libxfs/xfs_da_btree.c blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); bp 1540 fs/xfs/libxfs/xfs_da_btree.c blk->bp, NULL); bp 1552 fs/xfs/libxfs/xfs_da_btree.c node = blk->bp->b_addr; bp 1630 fs/xfs/libxfs/xfs_da_btree.c retval = xfs_dir2_leafn_lookup_int(blk->bp, args, bp 1633 fs/xfs/libxfs/xfs_da_btree.c retval = xfs_attr3_leaf_lookup_int(blk->bp, args); bp 1708 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 1718 fs/xfs/libxfs/xfs_da_btree.c old_info = old_blk->bp->b_addr; bp 1719 fs/xfs/libxfs/xfs_da_btree.c new_info = new_blk->bp->b_addr; bp 1726 fs/xfs/libxfs/xfs_da_btree.c before = xfs_attr_leaf_order(old_blk->bp, new_blk->bp); bp 1729 fs/xfs/libxfs/xfs_da_btree.c before = xfs_dir2_leafn_order(dp, old_blk->bp, new_blk->bp); bp 1732 fs/xfs/libxfs/xfs_da_btree.c before = xfs_da3_node_order(dp, old_blk->bp, new_blk->bp); bp 1749 fs/xfs/libxfs/xfs_da_btree.c -1, &bp, args->whichfork); bp 1752 fs/xfs/libxfs/xfs_da_btree.c ASSERT(bp != NULL); bp 1753 fs/xfs/libxfs/xfs_da_btree.c tmp_info = bp->b_addr; bp 1757 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); bp 1770 fs/xfs/libxfs/xfs_da_btree.c -1, &bp, args->whichfork); bp 1773 fs/xfs/libxfs/xfs_da_btree.c ASSERT(bp != NULL); bp 1774 fs/xfs/libxfs/xfs_da_btree.c tmp_info = bp->b_addr; bp 1778 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, bp, 0, sizeof(*tmp_info)-1); bp 1783 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, old_blk->bp, 0, sizeof(*tmp_info) - 1); bp 1784 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, new_blk->bp, 0, sizeof(*tmp_info) - 1); bp 1801 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 1809 fs/xfs/libxfs/xfs_da_btree.c save_info = save_blk->bp->b_addr; bp 1810 fs/xfs/libxfs/xfs_da_btree.c drop_info = drop_blk->bp->b_addr; bp 1829 fs/xfs/libxfs/xfs_da_btree.c -1, &bp, args->whichfork); bp 1832 fs/xfs/libxfs/xfs_da_btree.c ASSERT(bp != NULL); bp 1833 fs/xfs/libxfs/xfs_da_btree.c tmp_info = bp->b_addr; bp 1837 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, bp, 0, bp 1846 fs/xfs/libxfs/xfs_da_btree.c -1, &bp, args->whichfork); bp 1849 fs/xfs/libxfs/xfs_da_btree.c ASSERT(bp != NULL); bp 1850 fs/xfs/libxfs/xfs_da_btree.c tmp_info = bp->b_addr; bp 1854 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, bp, 0, bp 1859 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(args->trans, save_blk->bp, 0, sizeof(*save_info) - 1); bp 1885 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 1904 fs/xfs/libxfs/xfs_da_btree.c node = blk->bp->b_addr; bp 1932 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(args->trans, dp, blkno, -1, &bp, bp 1944 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(args->trans, blk->bp); bp 1946 fs/xfs/libxfs/xfs_da_btree.c blk->bp = bp; bp 1948 fs/xfs/libxfs/xfs_da_btree.c info = blk->bp->b_addr; bp 1980 fs/xfs/libxfs/xfs_da_btree.c blk->hashval = xfs_attr_leaf_lasthash(blk->bp, NULL); bp 1988 fs/xfs/libxfs/xfs_da_btree.c blk->bp, NULL); bp 2599 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 2617 fs/xfs/libxfs/xfs_da_btree.c bp = xfs_trans_get_buf_map(trans, dp->i_mount->m_ddev_targp, bp 2619 fs/xfs/libxfs/xfs_da_btree.c error = bp ? bp->b_error : -EIO; bp 2621 fs/xfs/libxfs/xfs_da_btree.c if (bp) bp 2622 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(trans, bp); bp 2626 fs/xfs/libxfs/xfs_da_btree.c *bpp = bp; bp 2648 fs/xfs/libxfs/xfs_da_btree.c struct xfs_buf *bp; bp 2668 fs/xfs/libxfs/xfs_da_btree.c mapp, nmap, 0, &bp, ops); bp 2673 fs/xfs/libxfs/xfs_da_btree.c xfs_buf_set_ref(bp, XFS_ATTR_BTREE_REF); bp 2675 fs/xfs/libxfs/xfs_da_btree.c xfs_buf_set_ref(bp, XFS_DIR_BTREE_REF); bp 2676 fs/xfs/libxfs/xfs_da_btree.c *bpp = bp; bp 102 fs/xfs/libxfs/xfs_da_btree.h struct xfs_buf *bp; /* buffer containing block */ bp 186 fs/xfs/libxfs/xfs_da_btree.h struct xfs_buf **bp, int whichfork); bp 872 fs/xfs/libxfs/xfs_da_format.h xfs_failaddr_t xfs_da3_blkinfo_verify(struct xfs_buf *bp, bp 635 fs/xfs/libxfs/xfs_dir2.c struct xfs_buf *bp) bp 673 fs/xfs/libxfs/xfs_dir2.c xfs_trans_binval(tp, bp); bp 144 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp); bp 152 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp, struct xfs_dir2_data_entry *dep); bp 154 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp); bp 156 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp, struct xfs_dir2_data_unused *dup); bp 158 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp, xfs_dir2_data_aoff_t offset, bp 161 fs/xfs/libxfs/xfs_dir2.h struct xfs_buf *bp, struct xfs_dir2_data_unused *dup, bp 27 fs/xfs/libxfs/xfs_dir2_block.c static void xfs_dir2_block_log_leaf(xfs_trans_t *tp, struct xfs_buf *bp, bp 29 fs/xfs/libxfs/xfs_dir2_block.c static void xfs_dir2_block_log_tail(xfs_trans_t *tp, struct xfs_buf *bp); bp 48 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp) bp 50 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_mount *mp = bp->b_mount; bp 51 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 53 fs/xfs/libxfs/xfs_dir2_block.c if (!xfs_verify_magic(bp, hdr3->magic)) bp 59 fs/xfs/libxfs/xfs_dir2_block.c if (be64_to_cpu(hdr3->blkno) != bp->b_bn) bp 64 fs/xfs/libxfs/xfs_dir2_block.c return __xfs_dir3_data_check(NULL, bp); bp 69 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp) bp 71 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_mount *mp = bp->b_mount; bp 75 fs/xfs/libxfs/xfs_dir2_block.c !xfs_buf_verify_cksum(bp, XFS_DIR3_DATA_CRC_OFF)) bp 76 fs/xfs/libxfs/xfs_dir2_block.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 78 fs/xfs/libxfs/xfs_dir2_block.c fa = xfs_dir3_block_verify(bp); bp 80 fs/xfs/libxfs/xfs_dir2_block.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 86 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp) bp 88 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_mount *mp = bp->b_mount; bp 89 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 90 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 93 fs/xfs/libxfs/xfs_dir2_block.c fa = xfs_dir3_block_verify(bp); bp 95 fs/xfs/libxfs/xfs_dir2_block.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 105 fs/xfs/libxfs/xfs_dir2_block.c xfs_buf_update_cksum(bp, XFS_DIR3_DATA_CRC_OFF); bp 137 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp, bp 140 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 142 fs/xfs/libxfs/xfs_dir2_block.c bp->b_ops = &xfs_dir3_block_buf_ops; bp 143 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_BLOCK_BUF); bp 148 fs/xfs/libxfs/xfs_dir2_block.c hdr3->blkno = cpu_to_be64(bp->b_bn); bp 272 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp, bp 304 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_make_free(args, bp, bp 326 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* buffer for block */ bp 354 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_block_read(tp, dp, &bp); bp 363 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 378 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); bp 395 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir2_block_to_leaf(args, bp); bp 407 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_compact(args, bp, hdr, btp, blp, &needlog, bp 446 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir2_data_use_free(args, bp, enddup, aoff, bp 529 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); bp 533 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir2_data_use_free(args, bp, dup, bp 553 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_header(args, bp); bp 554 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); bp 555 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_entry(args, bp, dep); bp 556 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 566 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp, /* block buffer */ bp 570 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_hdr_t *hdr = bp->b_addr; bp 576 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_log_buf(tp, bp, (uint)((char *)&blp[first] - (char *)hdr), bp 586 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp) /* block buffer */ bp 588 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_hdr_t *hdr = bp->b_addr; bp 592 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_log_buf(tp, bp, (uint)((char *)btp - (char *)hdr), bp 606 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* block buffer */ bp 619 fs/xfs/libxfs/xfs_dir2_block.c if ((error = xfs_dir2_block_lookup_int(args, &bp, &ent))) bp 622 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 623 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 638 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(args->trans, bp); bp 654 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* block buffer */ bp 671 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_block_read(tp, dp, &bp); bp 675 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 676 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 694 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); bp 724 fs/xfs/libxfs/xfs_dir2_block.c *bpp = bp; bp 742 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); bp 756 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* block buffer */ bp 774 fs/xfs/libxfs/xfs_dir2_block.c if ((error = xfs_dir2_block_lookup_int(args, &bp, &ent))) { bp 779 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 792 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_make_free(args, bp, bp 799 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); bp 804 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, ent, ent); bp 811 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_header(args, bp); bp 812 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 823 fs/xfs/libxfs/xfs_dir2_block.c return xfs_dir2_block_to_sf(args, bp, size, &sfh); bp 836 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* block buffer */ bp 849 fs/xfs/libxfs/xfs_dir2_block.c if ((error = xfs_dir2_block_lookup_int(args, &bp, &ent))) { bp 853 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 868 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_entry(args, bp, dep); bp 869 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 1047 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_buf *bp; /* block buffer */ bp 1111 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_data_init(args, blkno, &bp); bp 1114 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_block_init(mp, tp, bp, dp); bp 1115 fs/xfs/libxfs/xfs_dir2_block.c hdr = bp->b_addr; bp 1128 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir2_data_use_free(args, bp, dup, args->geo->blksize - i, bp 1144 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir2_data_use_free(args, bp, dup, bp 1159 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_entry(args, bp, dep); bp 1173 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_entry(args, bp, dep); bp 1207 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_unused(args, bp, dup); bp 1224 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_data_log_entry(args, bp, dep); bp 1248 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, 0, be32_to_cpu(btp->count) - 1); bp 1249 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); bp 1250 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_data_check(dp, bp); bp 34 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) /* data block's buffer */ bp 50 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_mount *mp = bp->b_mount; bp 73 fs/xfs/libxfs/xfs_dir2_data.c hdr = bp->b_addr; bp 230 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 234 fs/xfs/libxfs/xfs_dir2_data.c fa = __xfs_dir3_data_check(dp, bp); bp 238 fs/xfs/libxfs/xfs_dir2_data.c bp->b_addr, BBTOB(bp->b_length), __FILE__, __LINE__, bp 246 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 248 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_mount *mp = bp->b_mount; bp 249 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 251 fs/xfs/libxfs/xfs_dir2_data.c if (!xfs_verify_magic(bp, hdr3->magic)) bp 257 fs/xfs/libxfs/xfs_dir2_data.c if (be64_to_cpu(hdr3->blkno) != bp->b_bn) bp 262 fs/xfs/libxfs/xfs_dir2_data.c return __xfs_dir3_data_check(NULL, bp); bp 272 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 274 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir2_data_hdr *hdr = bp->b_addr; bp 279 fs/xfs/libxfs/xfs_dir2_data.c bp->b_ops = &xfs_dir3_block_buf_ops; bp 280 fs/xfs/libxfs/xfs_dir2_data.c bp->b_ops->verify_read(bp); bp 284 fs/xfs/libxfs/xfs_dir2_data.c bp->b_ops = &xfs_dir3_data_buf_ops; bp 285 fs/xfs/libxfs/xfs_dir2_data.c bp->b_ops->verify_read(bp); bp 288 fs/xfs/libxfs/xfs_dir2_data.c xfs_verifier_error(bp, -EFSCORRUPTED, __this_address); bp 295 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 297 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_mount *mp = bp->b_mount; bp 301 fs/xfs/libxfs/xfs_dir2_data.c !xfs_buf_verify_cksum(bp, XFS_DIR3_DATA_CRC_OFF)) bp 302 fs/xfs/libxfs/xfs_dir2_data.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 304 fs/xfs/libxfs/xfs_dir2_data.c fa = xfs_dir3_data_verify(bp); bp 306 fs/xfs/libxfs/xfs_dir2_data.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 312 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 314 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_mount *mp = bp->b_mount; bp 315 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 316 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 319 fs/xfs/libxfs/xfs_dir2_data.c fa = xfs_dir3_data_verify(bp); bp 321 fs/xfs/libxfs/xfs_dir2_data.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 331 fs/xfs/libxfs/xfs_dir2_data.c xfs_buf_update_cksum(bp, XFS_DIR3_DATA_CRC_OFF); bp 638 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp; /* block buffer */ bp 656 fs/xfs/libxfs/xfs_dir2_data.c -1, &bp, XFS_DATA_FORK); bp 659 fs/xfs/libxfs/xfs_dir2_data.c bp->b_ops = &xfs_dir3_data_buf_ops; bp 660 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_DATA_BUF); bp 665 fs/xfs/libxfs/xfs_dir2_data.c hdr = bp->b_addr; bp 667 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 671 fs/xfs/libxfs/xfs_dir2_data.c hdr3->blkno = cpu_to_be64(bp->b_bn); bp 698 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_header(args, bp); bp 699 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, dup); bp 700 fs/xfs/libxfs/xfs_dir2_data.c *bpp = bp; bp 710 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp, bp 713 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir2_data_hdr *hdr = bp->b_addr; bp 720 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_log_buf(args->trans, bp, (uint)((char *)dep - (char *)hdr), bp 731 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp) bp 734 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_dir2_data_hdr *hdr = bp->b_addr; bp 742 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_log_buf(args->trans, bp, 0, bp 752 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp, bp 755 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_hdr_t *hdr = bp->b_addr; bp 765 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_log_buf(args->trans, bp, (uint)((char *)dup - (char *)hdr), bp 771 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_log_buf(args->trans, bp, bp 784 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp, bp 799 fs/xfs/libxfs/xfs_dir2_data.c hdr = bp->b_addr; bp 859 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, prevdup); bp 894 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, prevdup); bp 922 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup); bp 949 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup); bp 1002 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_buf *bp, bp 1020 fs/xfs/libxfs/xfs_dir2_data.c hdr = bp->b_addr; bp 1060 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup); bp 1088 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup); bp 1116 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup); bp 1122 fs/xfs/libxfs/xfs_dir2_data.c xfs_dir2_data_log_unused(args, bp, newdup2); bp 29 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp, int first, int last); bp 31 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp); bp 41 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 43 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 49 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr; bp 50 fs/xfs/libxfs/xfs_dir2_leaf.c if (be64_to_cpu(leaf3->info.blkno) != bp->b_bn) bp 61 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 65 fs/xfs/libxfs/xfs_dir2_leaf.c fa = xfs_dir3_leaf1_check(dp, bp); bp 69 fs/xfs/libxfs/xfs_dir2_leaf.c bp->b_addr, BBTOB(bp->b_length), __FILE__, __LINE__, bp 74 fs/xfs/libxfs/xfs_dir2_leaf.c #define xfs_dir3_leaf_check(dp, bp) bp 142 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 144 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_mount *mp = bp->b_mount; bp 145 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 148 fs/xfs/libxfs/xfs_dir2_leaf.c fa = xfs_da3_blkinfo_verify(bp, bp->b_addr); bp 157 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 159 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_mount *mp = bp->b_mount; bp 163 fs/xfs/libxfs/xfs_dir2_leaf.c !xfs_buf_verify_cksum(bp, XFS_DIR3_LEAF_CRC_OFF)) bp 164 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 166 fs/xfs/libxfs/xfs_dir2_leaf.c fa = xfs_dir3_leaf_verify(bp); bp 168 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 174 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 176 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_mount *mp = bp->b_mount; bp 177 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 178 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir3_leaf_hdr *hdr3 = bp->b_addr; bp 181 fs/xfs/libxfs/xfs_dir2_leaf.c fa = xfs_dir3_leaf_verify(bp); bp 183 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 193 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_buf_update_cksum(bp, XFS_DIR3_LEAF_CRC_OFF); bp 255 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp, bp 259 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 264 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr; bp 271 fs/xfs/libxfs/xfs_dir2_leaf.c leaf3->info.blkno = cpu_to_be64(bp->b_bn); bp 288 fs/xfs/libxfs/xfs_dir2_leaf.c bp->b_ops = &xfs_dir3_leaf1_buf_ops; bp 289 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAF1_BUF); bp 291 fs/xfs/libxfs/xfs_dir2_leaf.c bp->b_ops = &xfs_dir3_leafn_buf_ops; bp 292 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAFN_BUF); bp 306 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp; bp 314 fs/xfs/libxfs/xfs_dir2_leaf.c -1, &bp, XFS_DATA_FORK); bp 318 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_init(mp, tp, bp, dp->i_ino, magic); bp 319 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_log_header(args, bp); bp 321 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_log_tail(args, bp); bp 322 fs/xfs/libxfs/xfs_dir2_leaf.c *bpp = bp; bp 871 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) /* leaf buffer */ bp 880 fs/xfs/libxfs/xfs_dir2_leaf.c leaf = bp->b_addr; bp 909 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_log_header(args, bp); bp 911 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_log_ents(args, bp, loglow, to - 1); bp 1014 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp, /* leaf buffer */ bp 1020 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 1029 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1040 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp, bp 1046 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 1057 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1068 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 1070 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 1077 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_log_buf(args->trans, bp, bp 1088 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_buf *bp) bp 1090 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 1099 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_log_buf(args->trans, bp, (uint)((char *)ltp - (char *)leaf), bp 1698 fs/xfs/libxfs/xfs_dir2_leaf.c lbp = state->path.blk[0].bp; bp 1778 fs/xfs/libxfs/xfs_dir2_leaf.c state->path.blk[0].bp = NULL; bp 27 fs/xfs/libxfs/xfs_dir2_node.c static int xfs_dir2_leafn_add(struct xfs_buf *bp, xfs_da_args_t *args, bp 32 fs/xfs/libxfs/xfs_dir2_node.c static int xfs_dir2_leafn_remove(xfs_da_args_t *args, struct xfs_buf *bp, bp 43 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 45 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 51 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir3_leaf_hdr *leaf3 = bp->b_addr; bp 52 fs/xfs/libxfs/xfs_dir2_node.c if (be64_to_cpu(leaf3->info.blkno) != bp->b_bn) bp 63 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 67 fs/xfs/libxfs/xfs_dir2_node.c fa = xfs_dir3_leafn_check(dp, bp); bp 71 fs/xfs/libxfs/xfs_dir2_node.c bp->b_addr, BBTOB(bp->b_length), __FILE__, __LINE__, bp 76 fs/xfs/libxfs/xfs_dir2_node.c #define xfs_dir3_leaf_check(dp, bp) bp 81 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 83 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_mount *mp = bp->b_mount; bp 84 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir2_free_hdr *hdr = bp->b_addr; bp 86 fs/xfs/libxfs/xfs_dir2_node.c if (!xfs_verify_magic(bp, hdr->magic)) bp 90 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 94 fs/xfs/libxfs/xfs_dir2_node.c if (be64_to_cpu(hdr3->blkno) != bp->b_bn) bp 107 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 109 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_mount *mp = bp->b_mount; bp 113 fs/xfs/libxfs/xfs_dir2_node.c !xfs_buf_verify_cksum(bp, XFS_DIR3_FREE_CRC_OFF)) bp 114 fs/xfs/libxfs/xfs_dir2_node.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 116 fs/xfs/libxfs/xfs_dir2_node.c fa = xfs_dir3_free_verify(bp); bp 118 fs/xfs/libxfs/xfs_dir2_node.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 124 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 126 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_mount *mp = bp->b_mount; bp 127 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 128 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir3_blk_hdr *hdr3 = bp->b_addr; bp 131 fs/xfs/libxfs/xfs_dir2_node.c fa = xfs_dir3_free_verify(bp); bp 133 fs/xfs/libxfs/xfs_dir2_node.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 143 fs/xfs/libxfs/xfs_dir2_node.c xfs_buf_update_cksum(bp, XFS_DIR3_FREE_CRC_OFF); bp 160 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 171 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir3_free_hdr *hdr3 = bp->b_addr; bp 180 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir2_free_hdr *hdr = bp->b_addr; bp 252 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp; bp 257 fs/xfs/libxfs/xfs_dir2_node.c -1, &bp, XFS_DATA_FORK); bp 261 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_FREE_BUF); bp 262 fs/xfs/libxfs/xfs_dir2_node.c bp->b_ops = &xfs_dir3_free_buf_ops; bp 268 fs/xfs/libxfs/xfs_dir2_node.c memset(bp->b_addr, 0, sizeof(struct xfs_dir3_free_hdr)); bp 272 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir3_free_hdr *hdr3 = bp->b_addr; bp 276 fs/xfs/libxfs/xfs_dir2_node.c hdr3->hdr.blkno = cpu_to_be64(bp->b_bn); bp 281 fs/xfs/libxfs/xfs_dir2_node.c dp->d_ops->free_hdr_to_disk(bp->b_addr, &hdr); bp 282 fs/xfs/libxfs/xfs_dir2_node.c *bpp = bp; bp 292 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, bp 299 fs/xfs/libxfs/xfs_dir2_node.c free = bp->b_addr; bp 303 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_log_buf(args->trans, bp, bp 315 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp) bp 320 fs/xfs/libxfs/xfs_dir2_node.c free = bp->b_addr; bp 324 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_log_buf(args->trans, bp, 0, bp 424 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 430 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 497 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, bp); bp 498 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_ents(args, bp, lfloglow, lfloghigh); bp 499 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, bp); bp 507 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, bp 512 fs/xfs/libxfs/xfs_dir2_node.c dp->d_ops->free_hdr_from_disk(&hdr, bp->b_addr); bp 520 fs/xfs/libxfs/xfs_dir2_node.c #define xfs_dir2_free_hdr_check(dp, bp, db) bp 530 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 533 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_dir2_leaf *leaf = bp->b_addr; bp 559 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 585 fs/xfs/libxfs/xfs_dir2_node.c leaf = bp->b_addr; bp 589 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, bp); bp 595 fs/xfs/libxfs/xfs_dir2_node.c index = xfs_dir2_leaf_search_hash(args, bp); bp 601 fs/xfs/libxfs/xfs_dir2_node.c curbp = state->extrablk.bp; bp 688 fs/xfs/libxfs/xfs_dir2_node.c state->extrablk.bp = curbp; bp 714 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 737 fs/xfs/libxfs/xfs_dir2_node.c leaf = bp->b_addr; bp 741 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, bp); bp 748 fs/xfs/libxfs/xfs_dir2_node.c index = xfs_dir2_leaf_search_hash(args, bp); bp 753 fs/xfs/libxfs/xfs_dir2_node.c curbp = state->extrablk.bp; bp 793 fs/xfs/libxfs/xfs_dir2_node.c curbp = state->extrablk.bp; bp 821 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, state->extrablk.bp); bp 827 fs/xfs/libxfs/xfs_dir2_node.c state->extrablk.bp = curbp; bp 843 fs/xfs/libxfs/xfs_dir2_node.c state->extrablk.bp = curbp; bp 851 fs/xfs/libxfs/xfs_dir2_node.c if (state->extrablk.bp != curbp) bp 868 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 874 fs/xfs/libxfs/xfs_dir2_node.c return xfs_dir2_leafn_lookup_for_addname(bp, args, indexp, bp 876 fs/xfs/libxfs/xfs_dir2_node.c return xfs_dir2_leafn_lookup_for_entry(bp, args, indexp, state); bp 1021 fs/xfs/libxfs/xfs_dir2_node.c swap_blocks = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp); bp 1025 fs/xfs/libxfs/xfs_dir2_node.c leaf1 = blk1->bp->b_addr; bp 1026 fs/xfs/libxfs/xfs_dir2_node.c leaf2 = blk2->bp->b_addr; bp 1064 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leafn_moveents(args, blk1->bp, &hdr1, ents1, bp 1065 fs/xfs/libxfs/xfs_dir2_node.c hdr1.count - count, blk2->bp, bp 1068 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leafn_moveents(args, blk2->bp, &hdr2, ents2, 0, bp 1069 fs/xfs/libxfs/xfs_dir2_node.c blk1->bp, &hdr1, ents1, bp 1078 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, blk1->bp); bp 1079 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, blk2->bp); bp 1081 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, blk1->bp); bp 1082 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, blk2->bp); bp 1199 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp, /* leaf buffer */ bp 1224 fs/xfs/libxfs/xfs_dir2_node.c leaf = bp->b_addr; bp 1247 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, bp); bp 1250 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_ents(args, bp, index, index); bp 1256 fs/xfs/libxfs/xfs_dir2_node.c dbp = dblk->bp; bp 1320 fs/xfs/libxfs/xfs_dir2_node.c dblk->bp = NULL; bp 1341 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, bp); bp 1380 fs/xfs/libxfs/xfs_dir2_node.c &newblk->bp, XFS_DIR2_LEAFN_MAGIC); bp 1399 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_leafn_add(oldblk->bp, args, oldblk->index); bp 1401 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_leafn_add(newblk->bp, args, newblk->index); bp 1405 fs/xfs/libxfs/xfs_dir2_node.c oldblk->hashval = xfs_dir2_leaf_lasthash(dp, oldblk->bp, NULL); bp 1406 fs/xfs/libxfs/xfs_dir2_node.c newblk->hashval = xfs_dir2_leaf_lasthash(dp, newblk->bp, NULL); bp 1407 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, oldblk->bp); bp 1408 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, newblk->bp); bp 1428 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp; /* leaf buffer */ bp 1446 fs/xfs/libxfs/xfs_dir2_node.c leaf = blk->bp->b_addr; bp 1449 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, blk->bp); bp 1488 fs/xfs/libxfs/xfs_dir2_node.c for (i = 0, bp = NULL; i < 2; forward = !forward, i++) { bp 1498 fs/xfs/libxfs/xfs_dir2_node.c blkno, -1, &bp); bp 1509 fs/xfs/libxfs/xfs_dir2_node.c leaf = bp->b_addr; bp 1520 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(state->args->trans, bp); bp 1570 fs/xfs/libxfs/xfs_dir2_node.c drop_leaf = drop_blk->bp->b_addr; bp 1571 fs/xfs/libxfs/xfs_dir2_node.c save_leaf = save_blk->bp->b_addr; bp 1583 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_compact(args, &drophdr, drop_blk->bp); bp 1585 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_compact(args, &savehdr, save_blk->bp); bp 1591 fs/xfs/libxfs/xfs_dir2_node.c if (xfs_dir2_leafn_order(dp, save_blk->bp, drop_blk->bp)) bp 1592 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leafn_moveents(args, drop_blk->bp, &drophdr, dents, 0, bp 1593 fs/xfs/libxfs/xfs_dir2_node.c save_blk->bp, &savehdr, sents, 0, bp 1596 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leafn_moveents(args, drop_blk->bp, &drophdr, dents, 0, bp 1597 fs/xfs/libxfs/xfs_dir2_node.c save_blk->bp, &savehdr, sents, bp 1604 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, save_blk->bp); bp 1605 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_log_header(args, drop_blk->bp); bp 1607 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, save_blk->bp); bp 1608 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir3_leaf_check(dp, drop_blk->bp); bp 1764 fs/xfs/libxfs/xfs_dir2_node.c fbp = fblk->bp; bp 1786 fs/xfs/libxfs/xfs_dir2_node.c fblk->bp = NULL; bp 2002 fs/xfs/libxfs/xfs_dir2_node.c rval = xfs_dir2_leafn_add(blk->bp, args, blk->index); bp 2060 fs/xfs/libxfs/xfs_dir2_node.c ((char *)state->extrablk.bp->b_addr + bp 2068 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(args->trans, state->path.blk[i].bp); bp 2069 fs/xfs/libxfs/xfs_dir2_node.c state->path.blk[i].bp = NULL; bp 2074 fs/xfs/libxfs/xfs_dir2_node.c if (state->extravalid && state->extrablk.bp) { bp 2075 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(args->trans, state->extrablk.bp); bp 2076 fs/xfs/libxfs/xfs_dir2_node.c state->extrablk.bp = NULL; bp 2121 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_leafn_remove(args, blk->bp, blk->index, bp 2197 fs/xfs/libxfs/xfs_dir2_node.c leaf = blk->bp->b_addr; bp 2204 fs/xfs/libxfs/xfs_dir2_node.c hdr = state->extrablk.bp->b_addr; bp 2217 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir2_data_log_entry(args, state->extrablk.bp, dep); bp 2224 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(args->trans, state->extrablk.bp); bp 2225 fs/xfs/libxfs/xfs_dir2_node.c state->extrablk.bp = NULL; bp 2231 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(args->trans, state->path.blk[i].bp); bp 2232 fs/xfs/libxfs/xfs_dir2_node.c state->path.blk[i].bp = NULL; bp 2248 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_buf *bp; /* freespace buffer */ bp 2263 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_try_read(tp, dp, fo, &bp); bp 2270 fs/xfs/libxfs/xfs_dir2_node.c if (!bp) bp 2272 fs/xfs/libxfs/xfs_dir2_node.c free = bp->b_addr; bp 2279 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, bp); bp 2286 fs/xfs/libxfs/xfs_dir2_node.c xfs_dir2_da_to_db(args->geo, (xfs_dablk_t)fo), bp); bp 2294 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, bp); bp 30 fs/xfs/libxfs/xfs_dir2_priv.h extern void xfs_dir3_data_check(struct xfs_inode *dp, struct xfs_buf *bp); bp 32 fs/xfs/libxfs/xfs_dir2_priv.h #define xfs_dir3_data_check(dp,bp) bp 36 fs/xfs/libxfs/xfs_dir2_priv.h struct xfs_buf *bp); bp 58 fs/xfs/libxfs/xfs_dir2_priv.h struct xfs_dir3_icleaf_hdr *leafhdr, struct xfs_buf *bp); bp 65 fs/xfs/libxfs/xfs_dir2_priv.h struct xfs_buf *bp, int first, int last); bp 67 fs/xfs/libxfs/xfs_dir2_priv.h struct xfs_buf *bp); bp 89 fs/xfs/libxfs/xfs_dir2_priv.h struct xfs_buf *bp, int *count); bp 90 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir2_leafn_lookup_int(struct xfs_buf *bp, bp 113 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir2_block_to_sf(struct xfs_da_args *args, struct xfs_buf *bp, bp 139 fs/xfs/libxfs/xfs_dir2_sf.c struct xfs_buf *bp, bp 168 fs/xfs/libxfs/xfs_dir2_sf.c hdr = bp->b_addr; bp 230 fs/xfs/libxfs/xfs_dir2_sf.c error = xfs_dir2_shrink_inode(args, args->geo->datablk, bp); bp 139 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp, bp 142 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_dqblk *d = (struct xfs_dqblk *)bp->b_addr; bp 157 fs/xfs/libxfs/xfs_dquot_buf.c ndquots = xfs_calc_dquots_per_chunk(bp->b_length); bp 163 fs/xfs/libxfs/xfs_dquot_buf.c xfs_buf_verifier_error(bp, -EFSBADCRC, __func__, bp 174 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp, bp 177 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_dqblk *dqb = bp->b_addr; bp 191 fs/xfs/libxfs/xfs_dquot_buf.c ndquots = xfs_calc_dquots_per_chunk(bp->b_length); bp 211 fs/xfs/libxfs/xfs_dquot_buf.c xfs_buf_verifier_error(bp, -EFSCORRUPTED, bp 223 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp) bp 225 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_mount *mp = bp->b_mount; bp 227 fs/xfs/libxfs/xfs_dquot_buf.c return xfs_dquot_buf_verify(mp, bp, false); bp 232 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp) bp 234 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_mount *mp = bp->b_mount; bp 236 fs/xfs/libxfs/xfs_dquot_buf.c if (!xfs_dquot_buf_verify_crc(mp, bp, false)) bp 238 fs/xfs/libxfs/xfs_dquot_buf.c xfs_dquot_buf_verify(mp, bp, false); bp 249 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp) bp 251 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_mount *mp = bp->b_mount; bp 253 fs/xfs/libxfs/xfs_dquot_buf.c if (!xfs_dquot_buf_verify_crc(mp, bp, true) || bp 254 fs/xfs/libxfs/xfs_dquot_buf.c xfs_dquot_buf_verify(mp, bp, true) != NULL) { bp 255 fs/xfs/libxfs/xfs_dquot_buf.c xfs_buf_ioerror(bp, -EIO); bp 256 fs/xfs/libxfs/xfs_dquot_buf.c bp->b_flags &= ~XBF_DONE; bp 267 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_buf *bp) bp 269 fs/xfs/libxfs/xfs_dquot_buf.c struct xfs_mount *mp = bp->b_mount; bp 271 fs/xfs/libxfs/xfs_dquot_buf.c xfs_dquot_buf_verify(mp, bp, false); bp 563 fs/xfs/libxfs/xfs_format.h #define XFS_BUF_TO_SBP(bp) ((xfs_dsb_t *)((bp)->b_addr)) bp 710 fs/xfs/libxfs/xfs_format.h #define XFS_BUF_TO_AGF(bp) ((xfs_agf_t *)((bp)->b_addr)) bp 778 fs/xfs/libxfs/xfs_format.h #define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)((bp)->b_addr)) bp 786 fs/xfs/libxfs/xfs_format.h #define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)((bp)->b_addr)) bp 788 fs/xfs/libxfs/xfs_format.h #define XFS_BUF_TO_AGFL_BNO(mp, bp) \ bp 790 fs/xfs/libxfs/xfs_format.h &(XFS_BUF_TO_AGFL(bp)->agfl_bno[0]) : \ bp 791 fs/xfs/libxfs/xfs_format.h (__be32 *)(bp)->b_addr) bp 1122 fs/xfs/libxfs/xfs_format.h #define XFS_SUMPTR(mp,bp,so) \ bp 1123 fs/xfs/libxfs/xfs_format.h ((xfs_suminfo_t *)((bp)->b_addr + \ bp 2414 fs/xfs/libxfs/xfs_ialloc.c xfs_buf_t *bp, /* allocation group header buffer */ bp 2439 fs/xfs/libxfs/xfs_ialloc.c agi = XFS_BUF_TO_AGI(bp); bp 2451 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_log_buf(tp, bp, first, last); bp 2462 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_log_buf(tp, bp, first, last); bp 2468 fs/xfs/libxfs/xfs_ialloc.c struct xfs_buf *bp) bp 2470 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = bp->b_mount; bp 2471 fs/xfs/libxfs/xfs_ialloc.c struct xfs_agi *agi = XFS_BUF_TO_AGI(bp); bp 2478 fs/xfs/libxfs/xfs_ialloc.c be64_to_cpu(XFS_BUF_TO_AGI(bp)->agi_lsn))) bp 2485 fs/xfs/libxfs/xfs_ialloc.c if (!xfs_verify_magic(bp, agi->agi_magicnum)) bp 2505 fs/xfs/libxfs/xfs_ialloc.c if (bp->b_pag && be32_to_cpu(agi->agi_seqno) != bp->b_pag->pag_agno) bp 2520 fs/xfs/libxfs/xfs_ialloc.c struct xfs_buf *bp) bp 2522 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = bp->b_mount; bp 2526 fs/xfs/libxfs/xfs_ialloc.c !xfs_buf_verify_cksum(bp, XFS_AGI_CRC_OFF)) bp 2527 fs/xfs/libxfs/xfs_ialloc.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 2529 fs/xfs/libxfs/xfs_ialloc.c fa = xfs_agi_verify(bp); bp 2531 fs/xfs/libxfs/xfs_ialloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 2537 fs/xfs/libxfs/xfs_ialloc.c struct xfs_buf *bp) bp 2539 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = bp->b_mount; bp 2540 fs/xfs/libxfs/xfs_ialloc.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 2543 fs/xfs/libxfs/xfs_ialloc.c fa = xfs_agi_verify(bp); bp 2545 fs/xfs/libxfs/xfs_ialloc.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 2553 fs/xfs/libxfs/xfs_ialloc.c XFS_BUF_TO_AGI(bp)->agi_lsn = cpu_to_be64(bip->bli_item.li_lsn); bp 2554 fs/xfs/libxfs/xfs_ialloc.c xfs_buf_update_cksum(bp, XFS_AGI_CRC_OFF); bp 2636 fs/xfs/libxfs/xfs_ialloc.c xfs_buf_t *bp = NULL; bp 2639 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_read_agi(mp, tp, agno, &bp); bp 2642 fs/xfs/libxfs/xfs_ialloc.c if (bp) bp 2643 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_brelse(tp, bp); bp 94 fs/xfs/libxfs/xfs_ialloc.h struct xfs_buf *bp, /* allocation group header buffer */ bp 134 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp, bp 138 fs/xfs/libxfs/xfs_ialloc_btree.c XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(bp)), 1, bp 145 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp) bp 147 fs/xfs/libxfs/xfs_ialloc_btree.c return __xfs_inobt_free_block(cur, bp, XFS_AG_RESV_NONE); bp 153 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp) bp 156 fs/xfs/libxfs/xfs_ialloc_btree.c return xfs_inobt_free_block(cur, bp); bp 157 fs/xfs/libxfs/xfs_ialloc_btree.c return __xfs_inobt_free_block(cur, bp, XFS_AG_RESV_METADATA); bp 254 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp) bp 256 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_mount *mp = bp->b_mount; bp 257 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 261 fs/xfs/libxfs/xfs_ialloc_btree.c if (!xfs_verify_magic(bp, block->bb_magic)) bp 275 fs/xfs/libxfs/xfs_ialloc_btree.c fa = xfs_btree_sblock_v5hdr_verify(bp); bp 285 fs/xfs/libxfs/xfs_ialloc_btree.c return xfs_btree_sblock_verify(bp, bp 291 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp) bp 295 fs/xfs/libxfs/xfs_ialloc_btree.c if (!xfs_btree_sblock_verify_crc(bp)) bp 296 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 298 fs/xfs/libxfs/xfs_ialloc_btree.c fa = xfs_inobt_verify(bp); bp 300 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 303 fs/xfs/libxfs/xfs_ialloc_btree.c if (bp->b_error) bp 304 fs/xfs/libxfs/xfs_ialloc_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 309 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_buf *bp) bp 313 fs/xfs/libxfs/xfs_ialloc_btree.c fa = xfs_inobt_verify(bp); bp 315 fs/xfs/libxfs/xfs_ialloc_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 316 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 319 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_btree_sblock_calc_crc(bp); bp 31 fs/xfs/libxfs/xfs_inode_buf.c xfs_buf_t *bp) bp 37 fs/xfs/libxfs/xfs_inode_buf.c dip = xfs_buf_offset(bp, i * mp->m_sb.sb_inodesize); bp 41 fs/xfs/libxfs/xfs_inode_buf.c i, (long long)bp->b_bn); bp 75 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_buf *bp, bp 78 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_mount *mp = bp->b_mount; bp 86 fs/xfs/libxfs/xfs_inode_buf.c agno = xfs_daddr_to_agno(mp, XFS_BUF_ADDR(bp)); bp 87 fs/xfs/libxfs/xfs_inode_buf.c ni = XFS_BB_TO_FSB(mp, bp->b_length) * mp->m_sb.sb_inopblock; bp 93 fs/xfs/libxfs/xfs_inode_buf.c dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog)); bp 95 fs/xfs/libxfs/xfs_inode_buf.c di_ok = xfs_verify_magic16(bp, dip->di_magic) && bp 101 fs/xfs/libxfs/xfs_inode_buf.c bp->b_flags &= ~XBF_DONE; bp 102 fs/xfs/libxfs/xfs_inode_buf.c xfs_buf_ioerror(bp, -EIO); bp 109 fs/xfs/libxfs/xfs_inode_buf.c (unsigned long long)bp->b_bn, i, bp 112 fs/xfs/libxfs/xfs_inode_buf.c xfs_buf_verifier_error(bp, -EFSCORRUPTED, bp 123 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_buf *bp) bp 125 fs/xfs/libxfs/xfs_inode_buf.c xfs_inode_buf_verify(bp, false); bp 130 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_buf *bp) bp 132 fs/xfs/libxfs/xfs_inode_buf.c xfs_inode_buf_verify(bp, true); bp 137 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_buf *bp) bp 139 fs/xfs/libxfs/xfs_inode_buf.c xfs_inode_buf_verify(bp, false); bp 178 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_buf *bp; bp 183 fs/xfs/libxfs/xfs_inode_buf.c (int)imap->im_len, buf_flags, &bp, bp 195 fs/xfs/libxfs/xfs_inode_buf.c *bpp = bp; bp 196 fs/xfs/libxfs/xfs_inode_buf.c *dipp = xfs_buf_offset(bp, imap->im_boffset); bp 619 fs/xfs/libxfs/xfs_inode_buf.c xfs_buf_t *bp; bp 645 fs/xfs/libxfs/xfs_inode_buf.c error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &bp, 0, iget_flags); bp 702 fs/xfs/libxfs/xfs_inode_buf.c xfs_buf_set_ref(bp, XFS_INO_REF); bp 717 fs/xfs/libxfs/xfs_inode_buf.c xfs_trans_brelse(tp, bp); bp 70 fs/xfs/libxfs/xfs_inode_buf.h #define xfs_inobp_check(mp, bp) bp 101 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_buf *bp) bp 106 fs/xfs/libxfs/xfs_refcount_btree.c xfs_fsblock_t fsbno = XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(bp)); bp 202 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_buf *bp) bp 204 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_mount *mp = bp->b_mount; bp 205 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 206 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_perag *pag = bp->b_pag; bp 210 fs/xfs/libxfs/xfs_refcount_btree.c if (!xfs_verify_magic(bp, block->bb_magic)) bp 215 fs/xfs/libxfs/xfs_refcount_btree.c fa = xfs_btree_sblock_v5hdr_verify(bp); bp 226 fs/xfs/libxfs/xfs_refcount_btree.c return xfs_btree_sblock_verify(bp, mp->m_refc_mxr[level != 0]); bp 231 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_buf *bp) bp 235 fs/xfs/libxfs/xfs_refcount_btree.c if (!xfs_btree_sblock_verify_crc(bp)) bp 236 fs/xfs/libxfs/xfs_refcount_btree.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 238 fs/xfs/libxfs/xfs_refcount_btree.c fa = xfs_refcountbt_verify(bp); bp 240 fs/xfs/libxfs/xfs_refcount_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 243 fs/xfs/libxfs/xfs_refcount_btree.c if (bp->b_error) bp 244 fs/xfs/libxfs/xfs_refcount_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 249 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_buf *bp) bp 253 fs/xfs/libxfs/xfs_refcount_btree.c fa = xfs_refcountbt_verify(bp); bp 255 fs/xfs/libxfs/xfs_refcount_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 256 fs/xfs/libxfs/xfs_refcount_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 259 fs/xfs/libxfs/xfs_refcount_btree.c xfs_btree_sblock_calc_crc(bp); bp 121 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_buf *bp) bp 128 fs/xfs/libxfs/xfs_rmap_btree.c bno = xfs_daddr_to_agbno(cur->bc_mp, XFS_BUF_ADDR(bp)); bp 289 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_buf *bp) bp 291 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_mount *mp = bp->b_mount; bp 292 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); bp 293 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_perag *pag = bp->b_pag; bp 309 fs/xfs/libxfs/xfs_rmap_btree.c if (!xfs_verify_magic(bp, block->bb_magic)) bp 314 fs/xfs/libxfs/xfs_rmap_btree.c fa = xfs_btree_sblock_v5hdr_verify(bp); bp 325 fs/xfs/libxfs/xfs_rmap_btree.c return xfs_btree_sblock_verify(bp, mp->m_rmap_mxr[level != 0]); bp 330 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_buf *bp) bp 334 fs/xfs/libxfs/xfs_rmap_btree.c if (!xfs_btree_sblock_verify_crc(bp)) bp 335 fs/xfs/libxfs/xfs_rmap_btree.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 337 fs/xfs/libxfs/xfs_rmap_btree.c fa = xfs_rmapbt_verify(bp); bp 339 fs/xfs/libxfs/xfs_rmap_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 342 fs/xfs/libxfs/xfs_rmap_btree.c if (bp->b_error) bp 343 fs/xfs/libxfs/xfs_rmap_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 348 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_buf *bp) bp 352 fs/xfs/libxfs/xfs_rmap_btree.c fa = xfs_rmapbt_verify(bp); bp 354 fs/xfs/libxfs/xfs_rmap_btree.c trace_xfs_btree_corrupt(bp, _RET_IP_); bp 355 fs/xfs/libxfs/xfs_rmap_btree.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 358 fs/xfs/libxfs/xfs_rmap_btree.c xfs_btree_sblock_calc_crc(bp); bp 44 fs/xfs/libxfs/xfs_rmap_btree.h struct xfs_trans *tp, struct xfs_buf *bp, bp 31 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_buf *bp) bp 38 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_buf *bp) bp 61 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* block buffer, result */ bp 79 fs/xfs/libxfs/xfs_rtbitmap.c mp->m_bsize, 0, &bp, &xfs_rtbuf_ops); bp 83 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_buf_set_type(tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF bp 85 fs/xfs/libxfs/xfs_rtbitmap.c *bpp = bp; bp 104 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* buf for the block */ bp 119 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); bp 123 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 156 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 170 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 171 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, --block, 0, &bp); bp 175 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 202 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 216 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 217 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, --block, 0, &bp); bp 221 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 249 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 259 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 279 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* buf for the block */ bp 294 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); bp 298 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 330 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 344 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 345 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 349 fs/xfs/libxfs/xfs_rtbitmap.c b = bufp = bp->b_addr; bp 375 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 389 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 390 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 394 fs/xfs/libxfs/xfs_rtbitmap.c b = bufp = bp->b_addr; bp 419 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 429 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 454 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* buffer for the summary block */ bp 472 fs/xfs/libxfs/xfs_rtbitmap.c bp = *rbpp; bp 482 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, sb, 1, &bp); bp 489 fs/xfs/libxfs/xfs_rtbitmap.c *rbpp = bp; bp 495 fs/xfs/libxfs/xfs_rtbitmap.c sp = XFS_SUMPTR(mp, bp, so); bp 497 fs/xfs/libxfs/xfs_rtbitmap.c uint first = (uint)((char *)sp - (char *)bp->b_addr); bp 506 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1); bp 542 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* buf for the block */ bp 558 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); bp 562 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 600 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, bp 603 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 607 fs/xfs/libxfs/xfs_rtbitmap.c first = b = bufp = bp->b_addr; bp 640 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, bp 643 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 647 fs/xfs/libxfs/xfs_rtbitmap.c first = b = bufp = bp->b_addr; bp 678 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, (uint)((char *)first - (char *)bufp), bp 776 fs/xfs/libxfs/xfs_rtbitmap.c xfs_buf_t *bp; /* buf for the block */ bp 792 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); bp 796 fs/xfs/libxfs/xfs_rtbitmap.c bufp = bp->b_addr; bp 827 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 842 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 843 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 847 fs/xfs/libxfs/xfs_rtbitmap.c b = bufp = bp->b_addr; bp 873 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 888 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 889 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); bp 893 fs/xfs/libxfs/xfs_rtbitmap.c b = bufp = bp->b_addr; bp 918 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 929 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); bp 145 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp, bp 158 fs/xfs/libxfs/xfs_sb.c if (XFS_BUF_ADDR(bp) == XFS_SB_DADDR && !sbp->sb_inprogress && bp 219 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp, bp 222 fs/xfs/libxfs/xfs_sb.c struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); bp 226 fs/xfs/libxfs/xfs_sb.c if (!xfs_verify_magic(bp, dsb->sb_magicnum)) { bp 390 fs/xfs/libxfs/xfs_sb.c if (XFS_BUF_ADDR(bp) == XFS_SB_DADDR && sbp->sb_inprogress) { bp 679 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp) bp 682 fs/xfs/libxfs/xfs_sb.c struct xfs_mount *mp = bp->b_mount; bp 683 fs/xfs/libxfs/xfs_sb.c struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); bp 695 fs/xfs/libxfs/xfs_sb.c if (!xfs_buf_verify_cksum(bp, XFS_SB_CRC_OFF)) { bp 697 fs/xfs/libxfs/xfs_sb.c if (bp->b_bn == XFS_SB_DADDR || bp 709 fs/xfs/libxfs/xfs_sb.c __xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp), false); bp 710 fs/xfs/libxfs/xfs_sb.c error = xfs_validate_sb_common(mp, bp, &sb); bp 717 fs/xfs/libxfs/xfs_sb.c xfs_verifier_error(bp, error, __this_address); bp 719 fs/xfs/libxfs/xfs_sb.c xfs_buf_ioerror(bp, error); bp 730 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp) bp 732 fs/xfs/libxfs/xfs_sb.c struct xfs_dsb *dsb = XFS_BUF_TO_SBP(bp); bp 736 fs/xfs/libxfs/xfs_sb.c xfs_sb_read_verify(bp); bp 740 fs/xfs/libxfs/xfs_sb.c xfs_buf_ioerror(bp, -EWRONGFS); bp 745 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp) bp 748 fs/xfs/libxfs/xfs_sb.c struct xfs_mount *mp = bp->b_mount; bp 749 fs/xfs/libxfs/xfs_sb.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 756 fs/xfs/libxfs/xfs_sb.c __xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp), false); bp 757 fs/xfs/libxfs/xfs_sb.c error = xfs_validate_sb_common(mp, bp, &sb); bp 760 fs/xfs/libxfs/xfs_sb.c error = xfs_validate_sb_write(mp, bp, &sb); bp 768 fs/xfs/libxfs/xfs_sb.c XFS_BUF_TO_SBP(bp)->sb_lsn = cpu_to_be64(bip->bli_item.li_lsn); bp 770 fs/xfs/libxfs/xfs_sb.c xfs_buf_update_cksum(bp, XFS_SB_CRC_OFF); bp 774 fs/xfs/libxfs/xfs_sb.c xfs_verifier_error(bp, error, __this_address); bp 923 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp = xfs_trans_getsb(tp, mp); bp 929 fs/xfs/libxfs/xfs_sb.c xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb); bp 930 fs/xfs/libxfs/xfs_sb.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF); bp 931 fs/xfs/libxfs/xfs_sb.c xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1); bp 985 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp; bp 987 fs/xfs/libxfs/xfs_sb.c bp = xfs_buf_get(mp->m_ddev_targp, bp 997 fs/xfs/libxfs/xfs_sb.c if (!bp) { bp 1006 fs/xfs/libxfs/xfs_sb.c bp->b_ops = &xfs_sb_buf_ops; bp 1007 fs/xfs/libxfs/xfs_sb.c xfs_buf_oneshot(bp); bp 1008 fs/xfs/libxfs/xfs_sb.c xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); bp 1009 fs/xfs/libxfs/xfs_sb.c xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb); bp 1010 fs/xfs/libxfs/xfs_sb.c xfs_buf_delwri_queue(bp, &buffer_list); bp 1011 fs/xfs/libxfs/xfs_sb.c xfs_buf_relse(bp); bp 1046 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp; bp 1053 fs/xfs/libxfs/xfs_sb.c bp = xfs_trans_getsb(tp, mp); bp 1055 fs/xfs/libxfs/xfs_sb.c xfs_trans_bhold(tp, bp); bp 1063 fs/xfs/libxfs/xfs_sb.c error = xfs_bwrite(bp); bp 1065 fs/xfs/libxfs/xfs_sb.c xfs_buf_relse(bp); bp 1164 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp; bp 1170 fs/xfs/libxfs/xfs_sb.c XFS_FSS_TO_BB(mp, 1), 0, &bp, &xfs_sb_buf_ops); bp 1173 fs/xfs/libxfs/xfs_sb.c xfs_buf_set_ref(bp, XFS_SSB_REF); bp 1174 fs/xfs/libxfs/xfs_sb.c *bpp = bp; bp 1186 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp; bp 1189 fs/xfs/libxfs/xfs_sb.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, bp 1192 fs/xfs/libxfs/xfs_sb.c if (!bp) bp 1194 fs/xfs/libxfs/xfs_sb.c bp->b_ops = &xfs_sb_buf_ops; bp 1195 fs/xfs/libxfs/xfs_sb.c xfs_buf_oneshot(bp); bp 1196 fs/xfs/libxfs/xfs_sb.c *bpp = bp; bp 131 fs/xfs/libxfs/xfs_shared.h uint32_t size, struct xfs_buf *bp); bp 133 fs/xfs/libxfs/xfs_shared.h uint32_t size, struct xfs_buf *bp); bp 134 fs/xfs/libxfs/xfs_shared.h void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp, bp 41 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp) bp 43 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_dsymlink_hdr *dsl = bp->b_addr; bp 54 fs/xfs/libxfs/xfs_symlink_remote.c dsl->sl_blkno = cpu_to_be64(bp->b_bn); bp 55 fs/xfs/libxfs/xfs_symlink_remote.c bp->b_ops = &xfs_symlink_buf_ops; bp 70 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp) bp 72 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_dsymlink_hdr *dsl = bp->b_addr; bp 87 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp) bp 89 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_mount *mp = bp->b_mount; bp 90 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_dsymlink_hdr *dsl = bp->b_addr; bp 94 fs/xfs/libxfs/xfs_symlink_remote.c if (!xfs_verify_magic(bp, dsl->sl_magic)) bp 98 fs/xfs/libxfs/xfs_symlink_remote.c if (bp->b_bn != be64_to_cpu(dsl->sl_blkno)) bp 113 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp) bp 115 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_mount *mp = bp->b_mount; bp 122 fs/xfs/libxfs/xfs_symlink_remote.c if (!xfs_buf_verify_cksum(bp, XFS_SYMLINK_CRC_OFF)) bp 123 fs/xfs/libxfs/xfs_symlink_remote.c xfs_verifier_error(bp, -EFSBADCRC, __this_address); bp 125 fs/xfs/libxfs/xfs_symlink_remote.c fa = xfs_symlink_verify(bp); bp 127 fs/xfs/libxfs/xfs_symlink_remote.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 133 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp) bp 135 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_mount *mp = bp->b_mount; bp 136 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 143 fs/xfs/libxfs/xfs_symlink_remote.c fa = xfs_symlink_verify(bp); bp 145 fs/xfs/libxfs/xfs_symlink_remote.c xfs_verifier_error(bp, -EFSCORRUPTED, fa); bp 150 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_dsymlink_hdr *dsl = bp->b_addr; bp 153 fs/xfs/libxfs/xfs_symlink_remote.c xfs_buf_update_cksum(bp, XFS_SYMLINK_CRC_OFF); bp 167 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_buf *bp, bp 174 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); bp 177 fs/xfs/libxfs/xfs_symlink_remote.c bp->b_ops = NULL; bp 178 fs/xfs/libxfs/xfs_symlink_remote.c memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes); bp 179 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1); bp 187 fs/xfs/libxfs/xfs_symlink_remote.c ASSERT(BBTOB(bp->b_length) >= bp 190 fs/xfs/libxfs/xfs_symlink_remote.c bp->b_ops = &xfs_symlink_buf_ops; bp 192 fs/xfs/libxfs/xfs_symlink_remote.c buf = bp->b_addr; bp 193 fs/xfs/libxfs/xfs_symlink_remote.c buf += xfs_symlink_hdr_set(mp, ip->i_ino, 0, ifp->if_bytes, bp); bp 195 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsymlink_hdr) + bp 26 fs/xfs/scrub/agheader.c struct xfs_buf *bp) bp 63 fs/xfs/scrub/agheader.c struct xfs_buf *bp; bp 75 fs/xfs/scrub/agheader.c error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp); bp 95 fs/xfs/scrub/agheader.c sb = XFS_BUF_TO_SBP(bp); bp 104 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 107 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 110 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 113 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 116 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 119 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 122 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 125 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 128 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 131 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 134 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 137 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 140 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 143 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 157 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 165 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 168 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 171 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 174 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 177 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 180 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 183 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 186 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 189 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 192 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 195 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 198 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 206 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 209 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 217 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 220 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 223 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 226 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 229 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 232 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 235 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 238 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 241 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 246 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 253 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 256 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 266 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 272 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 279 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 285 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 295 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 305 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 312 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 317 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 320 fs/xfs/scrub/agheader.c xchk_block_set_preen(sc, bp); bp 328 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 333 fs/xfs/scrub/agheader.c BBTOB(bp->b_length) - sizeof(struct xfs_dsb))) bp 334 fs/xfs/scrub/agheader.c xchk_block_set_corrupt(sc, bp); bp 336 fs/xfs/scrub/agheader.c xchk_superblock_xref(sc, bp); bp 37 fs/xfs/scrub/agheader_repair.c struct xfs_buf *bp; bp 46 fs/xfs/scrub/agheader_repair.c error = xfs_sb_get_secondary(mp, sc->tp, agno, &bp); bp 51 fs/xfs/scrub/agheader_repair.c xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); bp 52 fs/xfs/scrub/agheader_repair.c xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb); bp 55 fs/xfs/scrub/agheader_repair.c xfs_trans_buf_set_type(sc->tp, bp, XFS_BLFT_SB_BUF); bp 56 fs/xfs/scrub/agheader_repair.c xfs_trans_log_buf(sc->tp, bp, 0, BBTOB(bp->b_length) - 1); bp 309 fs/xfs/scrub/attr.c struct xfs_buf *bp = blk->bp; bp 311 fs/xfs/scrub/attr.c struct xfs_attr_leafblock *leaf = bp->b_addr; bp 339 fs/xfs/scrub/attr.c struct xfs_attr3_leafblock *leaf = bp->b_addr; bp 369 fs/xfs/scrub/attr.c buf_end = (char *)bp->b_addr + mp->m_attr_geo->blksize; bp 409 fs/xfs/scrub/attr.c struct xfs_buf *bp; bp 432 fs/xfs/scrub/attr.c bp = blk->bp; bp 433 fs/xfs/scrub/attr.c hdrsize = xfs_attr3_leaf_hdr_size(bp->b_addr); bp 448 fs/xfs/scrub/attr.c (((char *)bp->b_addr) + nameidx); bp 456 fs/xfs/scrub/attr.c (((char *)bp->b_addr) + nameidx); bp 70 fs/xfs/scrub/bitmap.c struct xfs_bitmap_range *bp; bp 73 fs/xfs/scrub/bitmap.c bp = container_of(b, struct xfs_bitmap_range, list); bp 75 fs/xfs/scrub/bitmap.c if (ap->start > bp->start) bp 77 fs/xfs/scrub/bitmap.c if (ap->start < bp->start) bp 254 fs/xfs/scrub/bitmap.c struct xfs_buf *bp; bp 260 fs/xfs/scrub/bitmap.c xfs_btree_get_block(cur, i, &bp); bp 261 fs/xfs/scrub/bitmap.c if (!bp) bp 263 fs/xfs/scrub/bitmap.c fsb = XFS_DADDR_TO_FSB(cur->bc_mp, bp->b_bn); bp 280 fs/xfs/scrub/bitmap.c struct xfs_buf *bp; bp 283 fs/xfs/scrub/bitmap.c xfs_btree_get_block(cur, level, &bp); bp 284 fs/xfs/scrub/bitmap.c if (!bp) bp 287 fs/xfs/scrub/bitmap.c fsbno = XFS_DADDR_TO_FSB(cur->bc_mp, bp->b_bn); bp 378 fs/xfs/scrub/bmap.c struct xfs_buf *bp = NULL; bp 391 fs/xfs/scrub/bmap.c block = xfs_btree_get_block(bs->cur, i, &bp); bp 135 fs/xfs/scrub/btree.c struct xfs_buf *bp; bp 137 fs/xfs/scrub/btree.c block = xfs_btree_get_block(cur, 0, &bp); bp 153 fs/xfs/scrub/btree.c keyblock = xfs_btree_get_block(cur, 1, &bp); bp 182 fs/xfs/scrub/btree.c struct xfs_buf *bp; bp 184 fs/xfs/scrub/btree.c block = xfs_btree_get_block(cur, level, &bp); bp 200 fs/xfs/scrub/btree.c keyblock = xfs_btree_get_block(cur, level + 1, &bp); bp 406 fs/xfs/scrub/btree.c struct xfs_buf *bp) bp 417 fs/xfs/scrub/btree.c if (bp == NULL) { bp 437 fs/xfs/scrub/btree.c co->daddr = XFS_BUF_ADDR(bp); bp 442 fs/xfs/scrub/btree.c return xchk_btree_check_block_owner(bs, level, XFS_BUF_ADDR(bp)); bp 553 fs/xfs/scrub/btree.c struct xfs_buf *bp; bp 562 fs/xfs/scrub/btree.c parent_block = xfs_btree_get_block(cur, level + 1, &bp); bp 607 fs/xfs/scrub/btree.c struct xfs_buf *bp; bp 632 fs/xfs/scrub/btree.c error = xchk_btree_get_block(&bs, level, &ptr, &block, &bp); bp 639 fs/xfs/scrub/btree.c block = xfs_btree_get_block(cur, level, &bp); bp 687 fs/xfs/scrub/btree.c error = xchk_btree_get_block(&bs, level, pp, &block, &bp); bp 184 fs/xfs/scrub/common.c struct xfs_buf *bp) bp 187 fs/xfs/scrub/common.c trace_xchk_block_preen(sc, bp->b_bn, __return_address); bp 217 fs/xfs/scrub/common.c struct xfs_buf *bp) bp 220 fs/xfs/scrub/common.c trace_xchk_block_error(sc, bp->b_bn, __return_address); bp 227 fs/xfs/scrub/common.c struct xfs_buf *bp) bp 230 fs/xfs/scrub/common.c trace_xchk_block_error(sc, bp->b_bn, __return_address); bp 803 fs/xfs/scrub/common.c struct xfs_buf *bp) bp 807 fs/xfs/scrub/common.c if (bp->b_ops == NULL) { bp 808 fs/xfs/scrub/common.c xchk_block_set_corrupt(sc, bp); bp 811 fs/xfs/scrub/common.c if (bp->b_ops->verify_struct == NULL) { bp 815 fs/xfs/scrub/common.c fa = bp->b_ops->verify_struct(bp); bp 819 fs/xfs/scrub/common.c trace_xchk_block_error(sc, bp->b_bn, fa); bp 46 fs/xfs/scrub/common.h struct xfs_buf *bp); bp 51 fs/xfs/scrub/common.h struct xfs_buf *bp); bp 57 fs/xfs/scrub/common.h struct xfs_buf *bp); bp 135 fs/xfs/scrub/common.h void xchk_buffer_recheck(struct xfs_scrub *sc, struct xfs_buf *bp); bp 93 fs/xfs/scrub/dabtree.c baddr = blk->bp->b_addr; bp 172 fs/xfs/scrub/dabtree.c struct xfs_buf *bp) bp 174 fs/xfs/scrub/dabtree.c struct xfs_da_blkinfo *info = bp->b_addr; bp 179 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_dir3_leaf1_buf_ops; bp 180 fs/xfs/scrub/dabtree.c bp->b_ops->verify_read(bp); bp 187 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_da3_node_buf_ops; bp 188 fs/xfs/scrub/dabtree.c bp->b_ops->verify_read(bp); bp 194 fs/xfs/scrub/dabtree.c struct xfs_buf *bp) bp 196 fs/xfs/scrub/dabtree.c struct xfs_da_blkinfo *info = bp->b_addr; bp 201 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_dir3_leaf1_buf_ops; bp 202 fs/xfs/scrub/dabtree.c bp->b_ops->verify_write(bp); bp 209 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_da3_node_buf_ops; bp 210 fs/xfs/scrub/dabtree.c bp->b_ops->verify_write(bp); bp 216 fs/xfs/scrub/dabtree.c struct xfs_buf *bp) bp 218 fs/xfs/scrub/dabtree.c struct xfs_da_blkinfo *info = bp->b_addr; bp 223 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_dir3_leaf1_buf_ops; bp 224 fs/xfs/scrub/dabtree.c return bp->b_ops->verify_struct(bp); bp 226 fs/xfs/scrub/dabtree.c bp->b_ops = &xfs_da3_node_buf_ops; bp 227 fs/xfs/scrub/dabtree.c return bp->b_ops->verify_struct(bp); bp 274 fs/xfs/scrub/dabtree.c if (ds->state->altpath.blk[level].bp) bp 276 fs/xfs/scrub/dabtree.c ds->state->altpath.blk[level].bp); bp 281 fs/xfs/scrub/dabtree.c if (ds->state->altpath.blk[level].bp) { bp 283 fs/xfs/scrub/dabtree.c ds->state->altpath.blk[level].bp); bp 284 fs/xfs/scrub/dabtree.c ds->state->altpath.blk[level].bp = NULL; bp 347 fs/xfs/scrub/dabtree.c if (blk->bp) { bp 348 fs/xfs/scrub/dabtree.c xfs_trans_brelse(dargs->trans, blk->bp); bp 349 fs/xfs/scrub/dabtree.c blk->bp = NULL; bp 359 fs/xfs/scrub/dabtree.c &blk->bp, dargs->whichfork, bp 363 fs/xfs/scrub/dabtree.c if (blk->bp) bp 364 fs/xfs/scrub/dabtree.c xchk_buffer_recheck(ds->sc, blk->bp); bp 372 fs/xfs/scrub/dabtree.c blk->bp == NULL) bp 376 fs/xfs/scrub/dabtree.c if (blk->bp == NULL) { bp 381 fs/xfs/scrub/dabtree.c hdr3 = blk->bp->b_addr; bp 405 fs/xfs/scrub/dabtree.c xfs_trans_buf_set_type(dargs->trans, blk->bp, bp 408 fs/xfs/scrub/dabtree.c blk->hashval = xfs_attr_leaf_lasthash(blk->bp, pmaxrecs); bp 414 fs/xfs/scrub/dabtree.c xfs_trans_buf_set_type(dargs->trans, blk->bp, bp 417 fs/xfs/scrub/dabtree.c blk->hashval = xfs_dir2_leaf_lasthash(ip, blk->bp, pmaxrecs); bp 423 fs/xfs/scrub/dabtree.c xfs_trans_buf_set_type(dargs->trans, blk->bp, bp 426 fs/xfs/scrub/dabtree.c blk->hashval = xfs_dir2_leaf_lasthash(ip, blk->bp, pmaxrecs); bp 432 fs/xfs/scrub/dabtree.c xfs_trans_buf_set_type(dargs->trans, blk->bp, bp 435 fs/xfs/scrub/dabtree.c node = blk->bp->b_addr; bp 463 fs/xfs/scrub/dabtree.c xfs_trans_brelse(dargs->trans, blk->bp); bp 464 fs/xfs/scrub/dabtree.c blk->bp = NULL; bp 524 fs/xfs/scrub/dabtree.c if (blks[level].bp == NULL) bp 582 fs/xfs/scrub/dabtree.c if (blks[level].bp == NULL) bp 591 fs/xfs/scrub/dabtree.c if (blks[level].bp == NULL) bp 593 fs/xfs/scrub/dabtree.c xfs_trans_brelse(sc->tp, blks[level].bp); bp 594 fs/xfs/scrub/dabtree.c blks[level].bp = NULL; bp 189 fs/xfs/scrub/dir.c struct xfs_buf *bp; bp 220 fs/xfs/scrub/dir.c error = xfs_dir3_data_read(ds->dargs.trans, dp, rec_bno, -2, &bp); bp 224 fs/xfs/scrub/dir.c if (!bp) { bp 228 fs/xfs/scrub/dir.c xchk_buffer_recheck(ds->sc, bp); bp 233 fs/xfs/scrub/dir.c dent = (struct xfs_dir2_data_entry *)(((char *)bp->b_addr) + off); bp 236 fs/xfs/scrub/dir.c p = (char *)mp->m_dir_inode_ops->data_entry_p(bp->b_addr); bp 237 fs/xfs/scrub/dir.c endp = xfs_dir3_data_endp(mp->m_dir_geo, bp->b_addr); bp 276 fs/xfs/scrub/dir.c xfs_trans_brelse(ds->dargs.trans, bp); bp 319 fs/xfs/scrub/dir.c struct xfs_buf *bp; bp 339 fs/xfs/scrub/dir.c error = xfs_dir3_block_read(sc->tp, sc->ip, &bp); bp 342 fs/xfs/scrub/dir.c error = xfs_dir3_data_read(sc->tp, sc->ip, lblk, -1, &bp); bp 346 fs/xfs/scrub/dir.c xchk_buffer_recheck(sc, bp); bp 354 fs/xfs/scrub/dir.c bf = d_ops->data_bestfree_p(bp->b_addr); bp 364 fs/xfs/scrub/dir.c dup = (struct xfs_dir2_data_unused *)(bp->b_addr + offset); bp 370 fs/xfs/scrub/dir.c tag != ((char *)dup - (char *)bp->b_addr)) { bp 386 fs/xfs/scrub/dir.c ptr = (char *)d_ops->data_entry_p(bp->b_addr); bp 387 fs/xfs/scrub/dir.c endptr = xfs_dir3_data_endp(mp->m_dir_geo, bp->b_addr); bp 409 fs/xfs/scrub/dir.c if (tag != ((char *)dup - (char *)bp->b_addr)) { bp 441 fs/xfs/scrub/dir.c xfs_trans_brelse(sc->tp, bp); bp 482 fs/xfs/scrub/dir.c struct xfs_buf *bp; bp 495 fs/xfs/scrub/dir.c error = xfs_dir3_leaf_read(sc->tp, sc->ip, lblk, -1, &bp); bp 498 fs/xfs/scrub/dir.c xchk_buffer_recheck(sc, bp); bp 500 fs/xfs/scrub/dir.c leaf = bp->b_addr; bp 508 fs/xfs/scrub/dir.c struct xfs_dir3_leaf_hdr *hdr3 = bp->b_addr; bp 577 fs/xfs/scrub/dir.c struct xfs_buf *bp; bp 585 fs/xfs/scrub/dir.c error = xfs_dir2_free_read(sc->tp, sc->ip, lblk, &bp); bp 588 fs/xfs/scrub/dir.c xchk_buffer_recheck(sc, bp); bp 591 fs/xfs/scrub/dir.c struct xfs_dir3_free_hdr *hdr3 = bp->b_addr; bp 598 fs/xfs/scrub/dir.c sc->ip->d_ops->free_hdr_from_disk(&freehdr, bp->b_addr); bp 599 fs/xfs/scrub/dir.c bestp = sc->ip->d_ops->free_bests_p(bp->b_addr); bp 181 fs/xfs/scrub/repair.c struct xfs_buf *bp; bp 201 fs/xfs/scrub/repair.c error = xfs_ialloc_read_agi(mp, NULL, sm->sm_agno, &bp); bp 204 fs/xfs/scrub/repair.c xfs_buf_relse(bp); bp 209 fs/xfs/scrub/repair.c error = xfs_alloc_read_agf(mp, NULL, sm->sm_agno, 0, &bp); bp 211 fs/xfs/scrub/repair.c aglen = be32_to_cpu(XFS_BUF_TO_AGF(bp)->agf_length); bp 212 fs/xfs/scrub/repair.c freelen = be32_to_cpu(XFS_BUF_TO_AGF(bp)->agf_freeblks); bp 214 fs/xfs/scrub/repair.c xfs_buf_relse(bp); bp 343 fs/xfs/scrub/repair.c struct xfs_buf *bp; bp 349 fs/xfs/scrub/repair.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb), bp 351 fs/xfs/scrub/repair.c xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); bp 352 fs/xfs/scrub/repair.c xfs_btree_init_block(mp, bp, btnum, 0, 0, sc->sa.agno); bp 353 fs/xfs/scrub/repair.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF); bp 354 fs/xfs/scrub/repair.c xfs_trans_log_buf(tp, bp, 0, BBTOB(bp->b_length) - 1); bp 355 fs/xfs/scrub/repair.c bp->b_ops = ops; bp 356 fs/xfs/scrub/repair.c *bpp = bp; bp 437 fs/xfs/scrub/repair.c struct xfs_buf *bp; bp 452 fs/xfs/scrub/repair.c bp = xfs_buf_incore(sc->mp->m_ddev_targp, bp 455 fs/xfs/scrub/repair.c if (bp) { bp 456 fs/xfs/scrub/repair.c xfs_trans_bjoin(sc->tp, bp); bp 457 fs/xfs/scrub/repair.c xfs_trans_binval(sc->tp, bp); bp 680 fs/xfs/scrub/repair.c struct xfs_buf *bp; bp 722 fs/xfs/scrub/repair.c mp->m_bsize, 0, &bp, NULL); bp 727 fs/xfs/scrub/repair.c btblock = XFS_BUF_TO_BLOCK(bp); bp 746 fs/xfs/scrub/repair.c if (bp->b_ops) { bp 747 fs/xfs/scrub/repair.c if (bp->b_ops != fab->buf_ops) bp 750 fs/xfs/scrub/repair.c ASSERT(!xfs_trans_buf_is_dirty(bp)); bp 759 fs/xfs/scrub/repair.c bp->b_ops = fab->buf_ops; bp 760 fs/xfs/scrub/repair.c fab->buf_ops->verify_read(bp); bp 761 fs/xfs/scrub/repair.c if (bp->b_error) { bp 762 fs/xfs/scrub/repair.c bp->b_ops = NULL; bp 763 fs/xfs/scrub/repair.c bp->b_error = 0; bp 818 fs/xfs/scrub/repair.c xfs_trans_brelse(ri->sc->tp, bp); bp 38 fs/xfs/xfs_attr_inactive.c struct xfs_buf *bp; bp 75 fs/xfs/xfs_attr_inactive.c bp = xfs_trans_get_buf(*trans, bp 78 fs/xfs/xfs_attr_inactive.c if (!bp) bp 80 fs/xfs/xfs_attr_inactive.c xfs_trans_binval(*trans, bp); bp 106 fs/xfs/xfs_attr_inactive.c struct xfs_buf *bp) bp 119 fs/xfs/xfs_attr_inactive.c struct xfs_mount *mp = bp->b_mount; bp 121 fs/xfs/xfs_attr_inactive.c leaf = bp->b_addr; bp 142 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); bp 169 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); /* unlock for trans. in freextent() */ bp 195 fs/xfs/xfs_attr_inactive.c struct xfs_buf *bp, bp 211 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); /* no locks for later trans */ bp 215 fs/xfs/xfs_attr_inactive.c node = bp->b_addr; bp 217 fs/xfs/xfs_attr_inactive.c parent_blkno = bp->b_bn; bp 219 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); bp 224 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); /* no locks for later trans */ bp 283 fs/xfs/xfs_attr_inactive.c &bp, XFS_ATTR_FORK); bp 286 fs/xfs/xfs_attr_inactive.c node = bp->b_addr; bp 289 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); bp 314 fs/xfs/xfs_attr_inactive.c struct xfs_buf *bp; bp 324 fs/xfs/xfs_attr_inactive.c error = xfs_da3_node_read(*trans, dp, 0, -1, &bp, XFS_ATTR_FORK); bp 327 fs/xfs/xfs_attr_inactive.c blkno = bp->b_bn; bp 333 fs/xfs/xfs_attr_inactive.c info = bp->b_addr; bp 337 fs/xfs/xfs_attr_inactive.c error = xfs_attr3_node_inactive(trans, dp, bp, 1); bp 341 fs/xfs/xfs_attr_inactive.c error = xfs_attr3_leaf_inactive(trans, dp, bp); bp 345 fs/xfs/xfs_attr_inactive.c xfs_trans_brelse(*trans, bp); bp 354 fs/xfs/xfs_attr_inactive.c error = xfs_da_get_buf(*trans, dp, 0, blkno, &bp, XFS_ATTR_FORK); bp 357 fs/xfs/xfs_attr_inactive.c xfs_trans_binval(*trans, bp); /* remove from cache */ bp 207 fs/xfs/xfs_attr_list.c struct xfs_buf *bp; bp 216 fs/xfs/xfs_attr_list.c error = xfs_da3_node_read(tp, dp, cursor->blkno, -1, &bp, bp 220 fs/xfs/xfs_attr_list.c node = bp->b_addr; bp 255 fs/xfs/xfs_attr_list.c xfs_trans_brelse(tp, bp); bp 268 fs/xfs/xfs_attr_list.c *pbp = bp; bp 272 fs/xfs/xfs_attr_list.c xfs_trans_brelse(tp, bp); bp 284 fs/xfs/xfs_attr_list.c struct xfs_buf *bp; bp 299 fs/xfs/xfs_attr_list.c bp = NULL; bp 302 fs/xfs/xfs_attr_list.c &bp, XFS_ATTR_FORK); bp 305 fs/xfs/xfs_attr_list.c if (bp) { bp 308 fs/xfs/xfs_attr_list.c node = bp->b_addr; bp 313 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 314 fs/xfs/xfs_attr_list.c bp = NULL; bp 318 fs/xfs/xfs_attr_list.c leaf = bp->b_addr; bp 325 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 326 fs/xfs/xfs_attr_list.c bp = NULL; bp 330 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 331 fs/xfs/xfs_attr_list.c bp = NULL; bp 336 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 337 fs/xfs/xfs_attr_list.c bp = NULL; bp 347 fs/xfs/xfs_attr_list.c if (bp == NULL) { bp 348 fs/xfs/xfs_attr_list.c error = xfs_attr_node_list_lookup(context, cursor, &bp); bp 349 fs/xfs/xfs_attr_list.c if (error || !bp) bp 352 fs/xfs/xfs_attr_list.c ASSERT(bp != NULL); bp 360 fs/xfs/xfs_attr_list.c leaf = bp->b_addr; bp 361 fs/xfs/xfs_attr_list.c xfs_attr3_leaf_list_int(bp, context); bp 366 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 367 fs/xfs/xfs_attr_list.c error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno, -1, &bp); bp 371 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 380 fs/xfs/xfs_attr_list.c struct xfs_buf *bp, bp 393 fs/xfs/xfs_attr_list.c leaf = bp->b_addr; bp 477 fs/xfs/xfs_attr_list.c struct xfs_buf *bp; bp 482 fs/xfs/xfs_attr_list.c error = xfs_attr3_leaf_read(context->tp, context->dp, 0, -1, &bp); bp 486 fs/xfs/xfs_attr_list.c xfs_attr3_leaf_list_int(bp, context); bp 487 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); bp 266 fs/xfs/xfs_bmap_util.c struct xfs_buf *bp, *nbp; bp 274 fs/xfs/xfs_bmap_util.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, XFS_BMAP_BTREE_REF, bp 279 fs/xfs/xfs_bmap_util.c block = XFS_BUF_TO_BLOCK(bp); bp 302 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); bp 307 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); bp 315 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); bp 319 fs/xfs/xfs_bmap_util.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, bp 325 fs/xfs/xfs_bmap_util.c block = XFS_BUF_TO_BLOCK(bp); bp 54 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 63 fs/xfs/xfs_buf.c return bp->b_addr && bp->b_page_count > 1; bp 68 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 70 fs/xfs/xfs_buf.c return (bp->b_page_count * PAGE_SIZE) - bp->b_offset; bp 88 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 90 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_NO_IOACCT) bp 93 fs/xfs/xfs_buf.c ASSERT(bp->b_flags & XBF_ASYNC); bp 94 fs/xfs/xfs_buf.c spin_lock(&bp->b_lock); bp 95 fs/xfs/xfs_buf.c if (!(bp->b_state & XFS_BSTATE_IN_FLIGHT)) { bp 96 fs/xfs/xfs_buf.c bp->b_state |= XFS_BSTATE_IN_FLIGHT; bp 97 fs/xfs/xfs_buf.c percpu_counter_inc(&bp->b_target->bt_io_count); bp 99 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 108 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 110 fs/xfs/xfs_buf.c lockdep_assert_held(&bp->b_lock); bp 112 fs/xfs/xfs_buf.c if (bp->b_state & XFS_BSTATE_IN_FLIGHT) { bp 113 fs/xfs/xfs_buf.c bp->b_state &= ~XFS_BSTATE_IN_FLIGHT; bp 114 fs/xfs/xfs_buf.c percpu_counter_dec(&bp->b_target->bt_io_count); bp 120 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 122 fs/xfs/xfs_buf.c spin_lock(&bp->b_lock); bp 123 fs/xfs/xfs_buf.c __xfs_buf_ioacct_dec(bp); bp 124 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 137 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 139 fs/xfs/xfs_buf.c ASSERT(xfs_buf_islocked(bp)); bp 141 fs/xfs/xfs_buf.c bp->b_flags |= XBF_STALE; bp 148 fs/xfs/xfs_buf.c bp->b_flags &= ~_XBF_DELWRI_Q; bp 156 fs/xfs/xfs_buf.c spin_lock(&bp->b_lock); bp 157 fs/xfs/xfs_buf.c __xfs_buf_ioacct_dec(bp); bp 159 fs/xfs/xfs_buf.c atomic_set(&bp->b_lru_ref, 0); bp 160 fs/xfs/xfs_buf.c if (!(bp->b_state & XFS_BSTATE_DISPOSE) && bp 161 fs/xfs/xfs_buf.c (list_lru_del(&bp->b_target->bt_lru, &bp->b_lru))) bp 162 fs/xfs/xfs_buf.c atomic_dec(&bp->b_hold); bp 164 fs/xfs/xfs_buf.c ASSERT(atomic_read(&bp->b_hold) >= 1); bp 165 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 170 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 173 fs/xfs/xfs_buf.c ASSERT(bp->b_maps == NULL); bp 174 fs/xfs/xfs_buf.c bp->b_map_count = map_count; bp 177 fs/xfs/xfs_buf.c bp->b_maps = &bp->__b_map; bp 181 fs/xfs/xfs_buf.c bp->b_maps = kmem_zalloc(map_count * sizeof(struct xfs_buf_map), bp 183 fs/xfs/xfs_buf.c if (!bp->b_maps) bp 193 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 195 fs/xfs/xfs_buf.c if (bp->b_maps != &bp->__b_map) { bp 196 fs/xfs/xfs_buf.c kmem_free(bp->b_maps); bp 197 fs/xfs/xfs_buf.c bp->b_maps = NULL; bp 208 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 212 fs/xfs/xfs_buf.c bp = kmem_zone_zalloc(xfs_buf_zone, KM_NOFS); bp 213 fs/xfs/xfs_buf.c if (unlikely(!bp)) bp 222 fs/xfs/xfs_buf.c atomic_set(&bp->b_hold, 1); bp 223 fs/xfs/xfs_buf.c atomic_set(&bp->b_lru_ref, 1); bp 224 fs/xfs/xfs_buf.c init_completion(&bp->b_iowait); bp 225 fs/xfs/xfs_buf.c INIT_LIST_HEAD(&bp->b_lru); bp 226 fs/xfs/xfs_buf.c INIT_LIST_HEAD(&bp->b_list); bp 227 fs/xfs/xfs_buf.c INIT_LIST_HEAD(&bp->b_li_list); bp 228 fs/xfs/xfs_buf.c sema_init(&bp->b_sema, 0); /* held, no waiters */ bp 229 fs/xfs/xfs_buf.c spin_lock_init(&bp->b_lock); bp 230 fs/xfs/xfs_buf.c bp->b_target = target; bp 231 fs/xfs/xfs_buf.c bp->b_mount = target->bt_mount; bp 232 fs/xfs/xfs_buf.c bp->b_flags = flags; bp 239 fs/xfs/xfs_buf.c error = xfs_buf_get_maps(bp, nmaps); bp 241 fs/xfs/xfs_buf.c kmem_zone_free(xfs_buf_zone, bp); bp 245 fs/xfs/xfs_buf.c bp->b_bn = map[0].bm_bn; bp 246 fs/xfs/xfs_buf.c bp->b_length = 0; bp 248 fs/xfs/xfs_buf.c bp->b_maps[i].bm_bn = map[i].bm_bn; bp 249 fs/xfs/xfs_buf.c bp->b_maps[i].bm_len = map[i].bm_len; bp 250 fs/xfs/xfs_buf.c bp->b_length += map[i].bm_len; bp 253 fs/xfs/xfs_buf.c atomic_set(&bp->b_pin_count, 0); bp 254 fs/xfs/xfs_buf.c init_waitqueue_head(&bp->b_waiters); bp 256 fs/xfs/xfs_buf.c XFS_STATS_INC(bp->b_mount, xb_create); bp 257 fs/xfs/xfs_buf.c trace_xfs_buf_init(bp, _RET_IP_); bp 259 fs/xfs/xfs_buf.c return bp; bp 268 fs/xfs/xfs_buf.c xfs_buf_t *bp, bp 272 fs/xfs/xfs_buf.c if (bp->b_pages == NULL) { bp 273 fs/xfs/xfs_buf.c bp->b_page_count = page_count; bp 275 fs/xfs/xfs_buf.c bp->b_pages = bp->b_page_array; bp 277 fs/xfs/xfs_buf.c bp->b_pages = kmem_alloc(sizeof(struct page *) * bp 279 fs/xfs/xfs_buf.c if (bp->b_pages == NULL) bp 282 fs/xfs/xfs_buf.c memset(bp->b_pages, 0, sizeof(struct page *) * page_count); bp 292 fs/xfs/xfs_buf.c xfs_buf_t *bp) bp 294 fs/xfs/xfs_buf.c if (bp->b_pages != bp->b_page_array) { bp 295 fs/xfs/xfs_buf.c kmem_free(bp->b_pages); bp 296 fs/xfs/xfs_buf.c bp->b_pages = NULL; bp 309 fs/xfs/xfs_buf.c xfs_buf_t *bp) bp 311 fs/xfs/xfs_buf.c trace_xfs_buf_free(bp, _RET_IP_); bp 313 fs/xfs/xfs_buf.c ASSERT(list_empty(&bp->b_lru)); bp 315 fs/xfs/xfs_buf.c if (bp->b_flags & _XBF_PAGES) { bp 318 fs/xfs/xfs_buf.c if (xfs_buf_is_vmapped(bp)) bp 319 fs/xfs/xfs_buf.c vm_unmap_ram(bp->b_addr - bp->b_offset, bp 320 fs/xfs/xfs_buf.c bp->b_page_count); bp 322 fs/xfs/xfs_buf.c for (i = 0; i < bp->b_page_count; i++) { bp 323 fs/xfs/xfs_buf.c struct page *page = bp->b_pages[i]; bp 327 fs/xfs/xfs_buf.c } else if (bp->b_flags & _XBF_KMEM) bp 328 fs/xfs/xfs_buf.c kmem_free(bp->b_addr); bp 329 fs/xfs/xfs_buf.c _xfs_buf_free_pages(bp); bp 330 fs/xfs/xfs_buf.c xfs_buf_free_maps(bp); bp 331 fs/xfs/xfs_buf.c kmem_zone_free(xfs_buf_zone, bp); bp 339 fs/xfs/xfs_buf.c xfs_buf_t *bp, bp 363 fs/xfs/xfs_buf.c size = BBTOB(bp->b_length); bp 365 fs/xfs/xfs_buf.c int align_mask = xfs_buftarg_dma_alignment(bp->b_target); bp 366 fs/xfs/xfs_buf.c bp->b_addr = kmem_alloc_io(size, align_mask, bp 368 fs/xfs/xfs_buf.c if (!bp->b_addr) { bp 373 fs/xfs/xfs_buf.c if (((unsigned long)(bp->b_addr + size - 1) & PAGE_MASK) != bp 374 fs/xfs/xfs_buf.c ((unsigned long)bp->b_addr & PAGE_MASK)) { bp 376 fs/xfs/xfs_buf.c kmem_free(bp->b_addr); bp 377 fs/xfs/xfs_buf.c bp->b_addr = NULL; bp 380 fs/xfs/xfs_buf.c bp->b_offset = offset_in_page(bp->b_addr); bp 381 fs/xfs/xfs_buf.c bp->b_pages = bp->b_page_array; bp 382 fs/xfs/xfs_buf.c bp->b_pages[0] = kmem_to_page(bp->b_addr); bp 383 fs/xfs/xfs_buf.c bp->b_page_count = 1; bp 384 fs/xfs/xfs_buf.c bp->b_flags |= _XBF_KMEM; bp 389 fs/xfs/xfs_buf.c start = BBTOB(bp->b_maps[0].bm_bn) >> PAGE_SHIFT; bp 390 fs/xfs/xfs_buf.c end = (BBTOB(bp->b_maps[0].bm_bn + bp->b_length) + PAGE_SIZE - 1) bp 393 fs/xfs/xfs_buf.c error = _xfs_buf_get_pages(bp, page_count); bp 397 fs/xfs/xfs_buf.c offset = bp->b_offset; bp 398 fs/xfs/xfs_buf.c bp->b_flags |= _XBF_PAGES; bp 400 fs/xfs/xfs_buf.c for (i = 0; i < bp->b_page_count; i++) { bp 407 fs/xfs/xfs_buf.c bp->b_page_count = i; bp 424 fs/xfs/xfs_buf.c XFS_STATS_INC(bp->b_mount, xb_page_retries); bp 429 fs/xfs/xfs_buf.c XFS_STATS_INC(bp->b_mount, xb_page_found); bp 433 fs/xfs/xfs_buf.c bp->b_pages[i] = page; bp 439 fs/xfs/xfs_buf.c for (i = 0; i < bp->b_page_count; i++) bp 440 fs/xfs/xfs_buf.c __free_page(bp->b_pages[i]); bp 441 fs/xfs/xfs_buf.c bp->b_flags &= ~_XBF_PAGES; bp 450 fs/xfs/xfs_buf.c xfs_buf_t *bp, bp 453 fs/xfs/xfs_buf.c ASSERT(bp->b_flags & _XBF_PAGES); bp 454 fs/xfs/xfs_buf.c if (bp->b_page_count == 1) { bp 456 fs/xfs/xfs_buf.c bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset; bp 458 fs/xfs/xfs_buf.c bp->b_addr = NULL; bp 473 fs/xfs/xfs_buf.c bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count, bp 475 fs/xfs/xfs_buf.c if (bp->b_addr) bp 481 fs/xfs/xfs_buf.c if (!bp->b_addr) bp 483 fs/xfs/xfs_buf.c bp->b_addr += bp->b_offset; bp 498 fs/xfs/xfs_buf.c const struct xfs_buf *bp = obj; bp 506 fs/xfs/xfs_buf.c if (bp->b_bn != map->bm_bn) bp 509 fs/xfs/xfs_buf.c if (unlikely(bp->b_length != map->bm_len)) { bp 518 fs/xfs/xfs_buf.c ASSERT(bp->b_flags & XBF_STALE); bp 577 fs/xfs/xfs_buf.c xfs_buf_t *bp; bp 608 fs/xfs/xfs_buf.c bp = rhashtable_lookup_fast(&pag->pag_buf_hash, &cmap, bp 610 fs/xfs/xfs_buf.c if (bp) { bp 611 fs/xfs/xfs_buf.c atomic_inc(&bp->b_hold); bp 635 fs/xfs/xfs_buf.c if (!xfs_buf_trylock(bp)) { bp 637 fs/xfs/xfs_buf.c xfs_buf_rele(bp); bp 641 fs/xfs/xfs_buf.c xfs_buf_lock(bp); bp 650 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_STALE) { bp 651 fs/xfs/xfs_buf.c ASSERT((bp->b_flags & _XBF_DELWRI_Q) == 0); bp 652 fs/xfs/xfs_buf.c ASSERT(bp->b_iodone == NULL); bp 653 fs/xfs/xfs_buf.c bp->b_flags &= _XBF_KMEM | _XBF_PAGES; bp 654 fs/xfs/xfs_buf.c bp->b_ops = NULL; bp 657 fs/xfs/xfs_buf.c trace_xfs_buf_find(bp, flags, _RET_IP_); bp 659 fs/xfs/xfs_buf.c *found_bp = bp; bp 670 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 674 fs/xfs/xfs_buf.c error = xfs_buf_find(target, &map, 1, flags, NULL, &bp); bp 677 fs/xfs/xfs_buf.c return bp; bp 692 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 696 fs/xfs/xfs_buf.c error = xfs_buf_find(target, map, nmaps, flags, NULL, &bp); bp 728 fs/xfs/xfs_buf.c error = xfs_buf_find(target, map, nmaps, flags, new_bp, &bp); bp 734 fs/xfs/xfs_buf.c if (bp != new_bp) bp 738 fs/xfs/xfs_buf.c if (!bp->b_addr) { bp 739 fs/xfs/xfs_buf.c error = _xfs_buf_map_pages(bp, flags); bp 743 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 753 fs/xfs/xfs_buf.c xfs_buf_ioerror(bp, 0); bp 756 fs/xfs/xfs_buf.c trace_xfs_buf_get(bp, flags, _RET_IP_); bp 757 fs/xfs/xfs_buf.c return bp; bp 762 fs/xfs/xfs_buf.c xfs_buf_t *bp, bp 766 fs/xfs/xfs_buf.c ASSERT(bp->b_maps[0].bm_bn != XFS_BUF_DADDR_NULL); bp 768 fs/xfs/xfs_buf.c bp->b_flags &= ~(XBF_WRITE | XBF_ASYNC | XBF_READ_AHEAD); bp 769 fs/xfs/xfs_buf.c bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | XBF_READ_AHEAD); bp 771 fs/xfs/xfs_buf.c return xfs_buf_submit(bp); bp 793 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 796 fs/xfs/xfs_buf.c ASSERT(bp->b_flags & XBF_DONE); bp 797 fs/xfs/xfs_buf.c ASSERT(bp->b_error == 0); bp 799 fs/xfs/xfs_buf.c if (!ops || bp->b_ops) bp 802 fs/xfs/xfs_buf.c bp->b_ops = ops; bp 803 fs/xfs/xfs_buf.c bp->b_ops->verify_read(bp); bp 804 fs/xfs/xfs_buf.c if (bp->b_error) bp 805 fs/xfs/xfs_buf.c bp->b_flags &= ~XBF_DONE; bp 806 fs/xfs/xfs_buf.c return bp->b_error; bp 817 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 821 fs/xfs/xfs_buf.c bp = xfs_buf_get_map(target, map, nmaps, flags); bp 822 fs/xfs/xfs_buf.c if (!bp) bp 825 fs/xfs/xfs_buf.c trace_xfs_buf_read(bp, flags, _RET_IP_); bp 827 fs/xfs/xfs_buf.c if (!(bp->b_flags & XBF_DONE)) { bp 829 fs/xfs/xfs_buf.c bp->b_ops = ops; bp 830 fs/xfs/xfs_buf.c _xfs_buf_read(bp, flags); bp 831 fs/xfs/xfs_buf.c return bp; bp 834 fs/xfs/xfs_buf.c xfs_buf_reverify(bp, ops); bp 841 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 846 fs/xfs/xfs_buf.c bp->b_flags &= ~XBF_READ; bp 847 fs/xfs/xfs_buf.c ASSERT(bp->b_ops != NULL || ops == NULL); bp 848 fs/xfs/xfs_buf.c return bp; bp 882 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 886 fs/xfs/xfs_buf.c bp = xfs_buf_get_uncached(target, numblks, flags); bp 887 fs/xfs/xfs_buf.c if (!bp) bp 891 fs/xfs/xfs_buf.c ASSERT(bp->b_map_count == 1); bp 892 fs/xfs/xfs_buf.c bp->b_bn = XFS_BUF_DADDR_NULL; /* always null for uncached buffers */ bp 893 fs/xfs/xfs_buf.c bp->b_maps[0].bm_bn = daddr; bp 894 fs/xfs/xfs_buf.c bp->b_flags |= XBF_READ; bp 895 fs/xfs/xfs_buf.c bp->b_ops = ops; bp 897 fs/xfs/xfs_buf.c xfs_buf_submit(bp); bp 898 fs/xfs/xfs_buf.c if (bp->b_error) { bp 899 fs/xfs/xfs_buf.c int error = bp->b_error; bp 900 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 904 fs/xfs/xfs_buf.c *bpp = bp; bp 916 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 920 fs/xfs/xfs_buf.c bp = _xfs_buf_alloc(target, &map, 1, flags & XBF_NO_IOACCT); bp 921 fs/xfs/xfs_buf.c if (unlikely(bp == NULL)) bp 925 fs/xfs/xfs_buf.c error = _xfs_buf_get_pages(bp, page_count); bp 930 fs/xfs/xfs_buf.c bp->b_pages[i] = alloc_page(xb_to_gfp(flags)); bp 931 fs/xfs/xfs_buf.c if (!bp->b_pages[i]) bp 934 fs/xfs/xfs_buf.c bp->b_flags |= _XBF_PAGES; bp 936 fs/xfs/xfs_buf.c error = _xfs_buf_map_pages(bp, 0); bp 943 fs/xfs/xfs_buf.c trace_xfs_buf_get_uncached(bp, _RET_IP_); bp 944 fs/xfs/xfs_buf.c return bp; bp 948 fs/xfs/xfs_buf.c __free_page(bp->b_pages[i]); bp 949 fs/xfs/xfs_buf.c _xfs_buf_free_pages(bp); bp 951 fs/xfs/xfs_buf.c xfs_buf_free_maps(bp); bp 952 fs/xfs/xfs_buf.c kmem_zone_free(xfs_buf_zone, bp); bp 964 fs/xfs/xfs_buf.c xfs_buf_t *bp) bp 966 fs/xfs/xfs_buf.c trace_xfs_buf_hold(bp, _RET_IP_); bp 967 fs/xfs/xfs_buf.c atomic_inc(&bp->b_hold); bp 976 fs/xfs/xfs_buf.c xfs_buf_t *bp) bp 978 fs/xfs/xfs_buf.c struct xfs_perag *pag = bp->b_pag; bp 982 fs/xfs/xfs_buf.c trace_xfs_buf_rele(bp, _RET_IP_); bp 985 fs/xfs/xfs_buf.c ASSERT(list_empty(&bp->b_lru)); bp 986 fs/xfs/xfs_buf.c if (atomic_dec_and_test(&bp->b_hold)) { bp 987 fs/xfs/xfs_buf.c xfs_buf_ioacct_dec(bp); bp 988 fs/xfs/xfs_buf.c xfs_buf_free(bp); bp 993 fs/xfs/xfs_buf.c ASSERT(atomic_read(&bp->b_hold) > 0); bp 1005 fs/xfs/xfs_buf.c spin_lock(&bp->b_lock); bp 1006 fs/xfs/xfs_buf.c release = atomic_dec_and_lock(&bp->b_hold, &pag->pag_buf_lock); bp 1014 fs/xfs/xfs_buf.c if ((atomic_read(&bp->b_hold) == 1) && !list_empty(&bp->b_lru)) bp 1015 fs/xfs/xfs_buf.c __xfs_buf_ioacct_dec(bp); bp 1020 fs/xfs/xfs_buf.c __xfs_buf_ioacct_dec(bp); bp 1021 fs/xfs/xfs_buf.c if (!(bp->b_flags & XBF_STALE) && atomic_read(&bp->b_lru_ref)) { bp 1027 fs/xfs/xfs_buf.c if (list_lru_add(&bp->b_target->bt_lru, &bp->b_lru)) { bp 1028 fs/xfs/xfs_buf.c bp->b_state &= ~XFS_BSTATE_DISPOSE; bp 1029 fs/xfs/xfs_buf.c atomic_inc(&bp->b_hold); bp 1039 fs/xfs/xfs_buf.c if (!(bp->b_state & XFS_BSTATE_DISPOSE)) { bp 1040 fs/xfs/xfs_buf.c list_lru_del(&bp->b_target->bt_lru, &bp->b_lru); bp 1042 fs/xfs/xfs_buf.c ASSERT(list_empty(&bp->b_lru)); bp 1045 fs/xfs/xfs_buf.c ASSERT(!(bp->b_flags & _XBF_DELWRI_Q)); bp 1046 fs/xfs/xfs_buf.c rhashtable_remove_fast(&pag->pag_buf_hash, &bp->b_rhash_head, bp 1054 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 1057 fs/xfs/xfs_buf.c xfs_buf_free(bp); bp 1074 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1078 fs/xfs/xfs_buf.c locked = down_trylock(&bp->b_sema) == 0; bp 1080 fs/xfs/xfs_buf.c trace_xfs_buf_trylock(bp, _RET_IP_); bp 1082 fs/xfs/xfs_buf.c trace_xfs_buf_trylock_fail(bp, _RET_IP_); bp 1097 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1099 fs/xfs/xfs_buf.c trace_xfs_buf_lock(bp, _RET_IP_); bp 1101 fs/xfs/xfs_buf.c if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) bp 1102 fs/xfs/xfs_buf.c xfs_log_force(bp->b_mount, 0); bp 1103 fs/xfs/xfs_buf.c down(&bp->b_sema); bp 1105 fs/xfs/xfs_buf.c trace_xfs_buf_lock_done(bp, _RET_IP_); bp 1110 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1112 fs/xfs/xfs_buf.c ASSERT(xfs_buf_islocked(bp)); bp 1114 fs/xfs/xfs_buf.c up(&bp->b_sema); bp 1115 fs/xfs/xfs_buf.c trace_xfs_buf_unlock(bp, _RET_IP_); bp 1120 fs/xfs/xfs_buf.c xfs_buf_t *bp) bp 1124 fs/xfs/xfs_buf.c if (atomic_read(&bp->b_pin_count) == 0) bp 1127 fs/xfs/xfs_buf.c add_wait_queue(&bp->b_waiters, &wait); bp 1130 fs/xfs/xfs_buf.c if (atomic_read(&bp->b_pin_count) == 0) bp 1134 fs/xfs/xfs_buf.c remove_wait_queue(&bp->b_waiters, &wait); bp 1144 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1146 fs/xfs/xfs_buf.c bool read = bp->b_flags & XBF_READ; bp 1148 fs/xfs/xfs_buf.c trace_xfs_buf_iodone(bp, _RET_IP_); bp 1150 fs/xfs/xfs_buf.c bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_READ_AHEAD); bp 1156 fs/xfs/xfs_buf.c if (!bp->b_error && bp->b_io_error) bp 1157 fs/xfs/xfs_buf.c xfs_buf_ioerror(bp, bp->b_io_error); bp 1160 fs/xfs/xfs_buf.c if (read && !bp->b_error && bp->b_ops) { bp 1161 fs/xfs/xfs_buf.c ASSERT(!bp->b_iodone); bp 1162 fs/xfs/xfs_buf.c bp->b_ops->verify_read(bp); bp 1165 fs/xfs/xfs_buf.c if (!bp->b_error) bp 1166 fs/xfs/xfs_buf.c bp->b_flags |= XBF_DONE; bp 1168 fs/xfs/xfs_buf.c if (bp->b_iodone) bp 1169 fs/xfs/xfs_buf.c (*(bp->b_iodone))(bp); bp 1170 fs/xfs/xfs_buf.c else if (bp->b_flags & XBF_ASYNC) bp 1171 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 1173 fs/xfs/xfs_buf.c complete(&bp->b_iowait); bp 1180 fs/xfs/xfs_buf.c struct xfs_buf *bp = bp 1183 fs/xfs/xfs_buf.c xfs_buf_ioend(bp); bp 1188 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1190 fs/xfs/xfs_buf.c INIT_WORK(&bp->b_ioend_work, xfs_buf_ioend_work); bp 1191 fs/xfs/xfs_buf.c queue_work(bp->b_mount->m_buf_workqueue, &bp->b_ioend_work); bp 1196 fs/xfs/xfs_buf.c xfs_buf_t *bp, bp 1201 fs/xfs/xfs_buf.c bp->b_error = error; bp 1202 fs/xfs/xfs_buf.c trace_xfs_buf_ioerror(bp, error, failaddr); bp 1207 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1210 fs/xfs/xfs_buf.c xfs_alert(bp->b_mount, bp 1212 fs/xfs/xfs_buf.c func, (uint64_t)XFS_BUF_ADDR(bp), bp->b_length, bp 1213 fs/xfs/xfs_buf.c -bp->b_error); bp 1218 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1222 fs/xfs/xfs_buf.c ASSERT(xfs_buf_islocked(bp)); bp 1224 fs/xfs/xfs_buf.c bp->b_flags |= XBF_WRITE; bp 1225 fs/xfs/xfs_buf.c bp->b_flags &= ~(XBF_ASYNC | XBF_READ | _XBF_DELWRI_Q | bp 1228 fs/xfs/xfs_buf.c error = xfs_buf_submit(bp); bp 1230 fs/xfs/xfs_buf.c xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR); bp 1238 fs/xfs/xfs_buf.c struct xfs_buf *bp = (struct xfs_buf *)bio->bi_private; bp 1247 fs/xfs/xfs_buf.c cmpxchg(&bp->b_io_error, 0, error); bp 1250 fs/xfs/xfs_buf.c if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ)) bp 1251 fs/xfs/xfs_buf.c invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp)); bp 1253 fs/xfs/xfs_buf.c if (atomic_dec_and_test(&bp->b_io_remaining) == 1) bp 1254 fs/xfs/xfs_buf.c xfs_buf_ioend_async(bp); bp 1260 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1268 fs/xfs/xfs_buf.c int total_nr_pages = bp->b_page_count; bp 1271 fs/xfs/xfs_buf.c sector_t sector = bp->b_maps[map].bm_bn; bp 1287 fs/xfs/xfs_buf.c size = min_t(int, BBTOB(bp->b_maps[map].bm_len), *count); bp 1292 fs/xfs/xfs_buf.c atomic_inc(&bp->b_io_remaining); bp 1296 fs/xfs/xfs_buf.c bio_set_dev(bio, bp->b_target->bt_bdev); bp 1299 fs/xfs/xfs_buf.c bio->bi_private = bp; bp 1308 fs/xfs/xfs_buf.c rbytes = bio_add_page(bio, bp->b_pages[page_index], nbytes, bp 1320 fs/xfs/xfs_buf.c if (xfs_buf_is_vmapped(bp)) { bp 1321 fs/xfs/xfs_buf.c flush_kernel_vmap_range(bp->b_addr, bp 1322 fs/xfs/xfs_buf.c xfs_buf_vmap_len(bp)); bp 1332 fs/xfs/xfs_buf.c atomic_dec(&bp->b_io_remaining); bp 1333 fs/xfs/xfs_buf.c xfs_buf_ioerror(bp, -EIO); bp 1341 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1354 fs/xfs/xfs_buf.c bp->b_error = 0; bp 1356 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_WRITE) { bp 1364 fs/xfs/xfs_buf.c if (bp->b_ops) { bp 1365 fs/xfs/xfs_buf.c bp->b_ops->verify_write(bp); bp 1366 fs/xfs/xfs_buf.c if (bp->b_error) { bp 1367 fs/xfs/xfs_buf.c xfs_force_shutdown(bp->b_mount, bp 1371 fs/xfs/xfs_buf.c } else if (bp->b_bn != XFS_BUF_DADDR_NULL) { bp 1372 fs/xfs/xfs_buf.c struct xfs_mount *mp = bp->b_mount; bp 1381 fs/xfs/xfs_buf.c __func__, bp->b_bn, bp->b_length); bp 1382 fs/xfs/xfs_buf.c xfs_hex_dump(bp->b_addr, bp 1387 fs/xfs/xfs_buf.c } else if (bp->b_flags & XBF_READ_AHEAD) { bp 1403 fs/xfs/xfs_buf.c offset = bp->b_offset; bp 1404 fs/xfs/xfs_buf.c size = BBTOB(bp->b_length); bp 1406 fs/xfs/xfs_buf.c for (i = 0; i < bp->b_map_count; i++) { bp 1407 fs/xfs/xfs_buf.c xfs_buf_ioapply_map(bp, i, &offset, &size, op, op_flags); bp 1408 fs/xfs/xfs_buf.c if (bp->b_error) bp 1421 fs/xfs/xfs_buf.c struct xfs_buf *bp) bp 1423 fs/xfs/xfs_buf.c ASSERT(!(bp->b_flags & XBF_ASYNC)); bp 1425 fs/xfs/xfs_buf.c trace_xfs_buf_iowait(bp, _RET_IP_); bp 1426 fs/xfs/xfs_buf.c wait_for_completion(&bp->b_iowait); bp 1427 fs/xfs/xfs_buf.c trace_xfs_buf_iowait_done(bp, _RET_IP_); bp 1429 fs/xfs/xfs_buf.c return bp->b_error; bp 1440 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1445 fs/xfs/xfs_buf.c trace_xfs_buf_submit(bp, _RET_IP_); bp 1447 fs/xfs/xfs_buf.c ASSERT(!(bp->b_flags & _XBF_DELWRI_Q)); bp 1450 fs/xfs/xfs_buf.c if (XFS_FORCED_SHUTDOWN(bp->b_mount)) { bp 1451 fs/xfs/xfs_buf.c xfs_buf_ioerror(bp, -EIO); bp 1452 fs/xfs/xfs_buf.c bp->b_flags &= ~XBF_DONE; bp 1453 fs/xfs/xfs_buf.c xfs_buf_stale(bp); bp 1454 fs/xfs/xfs_buf.c xfs_buf_ioend(bp); bp 1463 fs/xfs/xfs_buf.c xfs_buf_hold(bp); bp 1465 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_WRITE) bp 1466 fs/xfs/xfs_buf.c xfs_buf_wait_unpin(bp); bp 1469 fs/xfs/xfs_buf.c bp->b_io_error = 0; bp 1476 fs/xfs/xfs_buf.c atomic_set(&bp->b_io_remaining, 1); bp 1477 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_ASYNC) bp 1478 fs/xfs/xfs_buf.c xfs_buf_ioacct_inc(bp); bp 1479 fs/xfs/xfs_buf.c _xfs_buf_ioapply(bp); bp 1486 fs/xfs/xfs_buf.c if (atomic_dec_and_test(&bp->b_io_remaining) == 1) { bp 1487 fs/xfs/xfs_buf.c if (bp->b_error || !(bp->b_flags & XBF_ASYNC)) bp 1488 fs/xfs/xfs_buf.c xfs_buf_ioend(bp); bp 1490 fs/xfs/xfs_buf.c xfs_buf_ioend_async(bp); bp 1494 fs/xfs/xfs_buf.c error = xfs_buf_iowait(bp); bp 1501 fs/xfs/xfs_buf.c xfs_buf_rele(bp); bp 1507 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1512 fs/xfs/xfs_buf.c if (bp->b_addr) bp 1513 fs/xfs/xfs_buf.c return bp->b_addr + offset; bp 1515 fs/xfs/xfs_buf.c offset += bp->b_offset; bp 1516 fs/xfs/xfs_buf.c page = bp->b_pages[offset >> PAGE_SHIFT]; bp 1522 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1533 fs/xfs/xfs_buf.c page_index = (boff + bp->b_offset) >> PAGE_SHIFT; bp 1534 fs/xfs/xfs_buf.c page_offset = (boff + bp->b_offset) & ~PAGE_MASK; bp 1535 fs/xfs/xfs_buf.c page = bp->b_pages[page_index]; bp 1537 fs/xfs/xfs_buf.c BBTOB(bp->b_length) - boff); bp 1564 fs/xfs/xfs_buf.c struct xfs_buf *bp = container_of(item, struct xfs_buf, b_lru); bp 1567 fs/xfs/xfs_buf.c if (atomic_read(&bp->b_hold) > 1) { bp 1569 fs/xfs/xfs_buf.c trace_xfs_buf_wait_buftarg(bp, _RET_IP_); bp 1572 fs/xfs/xfs_buf.c if (!spin_trylock(&bp->b_lock)) bp 1579 fs/xfs/xfs_buf.c atomic_set(&bp->b_lru_ref, 0); bp 1580 fs/xfs/xfs_buf.c bp->b_state |= XFS_BSTATE_DISPOSE; bp 1582 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 1615 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 1616 fs/xfs/xfs_buf.c bp = list_first_entry(&dispose, struct xfs_buf, b_lru); bp 1617 fs/xfs/xfs_buf.c list_del_init(&bp->b_lru); bp 1618 fs/xfs/xfs_buf.c if (bp->b_flags & XBF_WRITE_FAIL) { bp 1621 fs/xfs/xfs_buf.c (long long)bp->b_bn); bp 1625 fs/xfs/xfs_buf.c xfs_buf_rele(bp); bp 1639 fs/xfs/xfs_buf.c struct xfs_buf *bp = container_of(item, struct xfs_buf, b_lru); bp 1646 fs/xfs/xfs_buf.c if (!spin_trylock(&bp->b_lock)) bp 1653 fs/xfs/xfs_buf.c if (atomic_add_unless(&bp->b_lru_ref, -1, 0)) { bp 1654 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 1658 fs/xfs/xfs_buf.c bp->b_state |= XFS_BSTATE_DISPOSE; bp 1660 fs/xfs/xfs_buf.c spin_unlock(&bp->b_lock); bp 1678 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 1679 fs/xfs/xfs_buf.c bp = list_first_entry(&dispose, struct xfs_buf, b_lru); bp 1680 fs/xfs/xfs_buf.c list_del_init(&bp->b_lru); bp 1681 fs/xfs/xfs_buf.c xfs_buf_rele(bp); bp 1798 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 1801 fs/xfs/xfs_buf.c bp = list_first_entry(list, struct xfs_buf, b_list); bp 1803 fs/xfs/xfs_buf.c xfs_buf_lock(bp); bp 1804 fs/xfs/xfs_buf.c bp->b_flags &= ~_XBF_DELWRI_Q; bp 1805 fs/xfs/xfs_buf.c list_del_init(&bp->b_list); bp 1806 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 1823 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 1826 fs/xfs/xfs_buf.c ASSERT(xfs_buf_islocked(bp)); bp 1827 fs/xfs/xfs_buf.c ASSERT(!(bp->b_flags & XBF_READ)); bp 1834 fs/xfs/xfs_buf.c if (bp->b_flags & _XBF_DELWRI_Q) { bp 1835 fs/xfs/xfs_buf.c trace_xfs_buf_delwri_queued(bp, _RET_IP_); bp 1839 fs/xfs/xfs_buf.c trace_xfs_buf_delwri_queue(bp, _RET_IP_); bp 1849 fs/xfs/xfs_buf.c bp->b_flags |= _XBF_DELWRI_Q; bp 1850 fs/xfs/xfs_buf.c if (list_empty(&bp->b_list)) { bp 1851 fs/xfs/xfs_buf.c atomic_inc(&bp->b_hold); bp 1852 fs/xfs/xfs_buf.c list_add_tail(&bp->b_list, list); bp 1870 fs/xfs/xfs_buf.c struct xfs_buf *bp = container_of(b, struct xfs_buf, b_list); bp 1873 fs/xfs/xfs_buf.c diff = ap->b_maps[0].bm_bn - bp->b_maps[0].bm_bn; bp 1893 fs/xfs/xfs_buf.c struct xfs_buf *bp, *n; bp 1900 fs/xfs/xfs_buf.c list_for_each_entry_safe(bp, n, buffer_list, b_list) { bp 1902 fs/xfs/xfs_buf.c if (xfs_buf_ispinned(bp)) { bp 1906 fs/xfs/xfs_buf.c if (!xfs_buf_trylock(bp)) bp 1909 fs/xfs/xfs_buf.c xfs_buf_lock(bp); bp 1918 fs/xfs/xfs_buf.c if (!(bp->b_flags & _XBF_DELWRI_Q)) { bp 1919 fs/xfs/xfs_buf.c list_del_init(&bp->b_list); bp 1920 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 1924 fs/xfs/xfs_buf.c trace_xfs_buf_delwri_split(bp, _RET_IP_); bp 1932 fs/xfs/xfs_buf.c bp->b_flags &= ~(_XBF_DELWRI_Q | XBF_WRITE_FAIL); bp 1933 fs/xfs/xfs_buf.c bp->b_flags |= XBF_WRITE; bp 1935 fs/xfs/xfs_buf.c bp->b_flags &= ~XBF_ASYNC; bp 1936 fs/xfs/xfs_buf.c list_move_tail(&bp->b_list, wait_list); bp 1938 fs/xfs/xfs_buf.c bp->b_flags |= XBF_ASYNC; bp 1939 fs/xfs/xfs_buf.c list_del_init(&bp->b_list); bp 1941 fs/xfs/xfs_buf.c __xfs_buf_submit(bp, false); bp 1985 fs/xfs/xfs_buf.c struct xfs_buf *bp; bp 1991 fs/xfs/xfs_buf.c bp = list_first_entry(&wait_list, struct xfs_buf, b_list); bp 1993 fs/xfs/xfs_buf.c list_del_init(&bp->b_list); bp 1999 fs/xfs/xfs_buf.c error2 = xfs_buf_iowait(bp); bp 2000 fs/xfs/xfs_buf.c xfs_buf_relse(bp); bp 2025 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 2031 fs/xfs/xfs_buf.c ASSERT(bp->b_flags & _XBF_DELWRI_Q); bp 2033 fs/xfs/xfs_buf.c trace_xfs_buf_delwri_pushbuf(bp, _RET_IP_); bp 2039 fs/xfs/xfs_buf.c xfs_buf_lock(bp); bp 2040 fs/xfs/xfs_buf.c list_move(&bp->b_list, &submit_list); bp 2041 fs/xfs/xfs_buf.c xfs_buf_unlock(bp); bp 2056 fs/xfs/xfs_buf.c error = xfs_buf_iowait(bp); bp 2057 fs/xfs/xfs_buf.c bp->b_flags |= _XBF_DELWRI_Q; bp 2058 fs/xfs/xfs_buf.c xfs_buf_unlock(bp); bp 2083 fs/xfs/xfs_buf.c void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref) bp 2090 fs/xfs/xfs_buf.c if (XFS_TEST_ERROR(false, bp->b_mount, XFS_ERRTAG_BUF_LRU_REF)) bp 2093 fs/xfs/xfs_buf.c atomic_set(&bp->b_lru_ref, lru_ref); bp 2103 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 2106 fs/xfs/xfs_buf.c struct xfs_mount *mp = bp->b_mount; bp 2110 fs/xfs/xfs_buf.c if (WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx])) bp 2112 fs/xfs/xfs_buf.c return dmagic == bp->b_ops->magic[idx]; bp 2121 fs/xfs/xfs_buf.c struct xfs_buf *bp, bp 2124 fs/xfs/xfs_buf.c struct xfs_mount *mp = bp->b_mount; bp 2128 fs/xfs/xfs_buf.c if (WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx])) bp 2130 fs/xfs/xfs_buf.c return dmagic == bp->b_ops->magic16[idx]; bp 118 fs/xfs/xfs_buf.h xfs_failaddr_t (*verify_struct)(struct xfs_buf *bp); bp 244 fs/xfs/xfs_buf.h void xfs_buf_hold(struct xfs_buf *bp); bp 254 fs/xfs/xfs_buf.h #define xfs_buf_islocked(bp) \ bp 255 fs/xfs/xfs_buf.h ((bp)->b_sema.count <= 0) bp 258 fs/xfs/xfs_buf.h extern int xfs_bwrite(struct xfs_buf *bp); bp 259 fs/xfs/xfs_buf.h extern void xfs_buf_ioend(struct xfs_buf *bp); bp 260 fs/xfs/xfs_buf.h extern void __xfs_buf_ioerror(struct xfs_buf *bp, int error, bp 262 fs/xfs/xfs_buf.h #define xfs_buf_ioerror(bp, err) __xfs_buf_ioerror((bp), (err), __this_address) bp 265 fs/xfs/xfs_buf.h extern int __xfs_buf_submit(struct xfs_buf *bp, bool); bp 266 fs/xfs/xfs_buf.h static inline int xfs_buf_submit(struct xfs_buf *bp) bp 268 fs/xfs/xfs_buf.h bool wait = bp->b_flags & XBF_ASYNC ? false : true; bp 269 fs/xfs/xfs_buf.h return __xfs_buf_submit(bp, wait); bp 272 fs/xfs/xfs_buf.h void xfs_buf_zero(struct xfs_buf *bp, size_t boff, size_t bsize); bp 276 fs/xfs/xfs_buf.h extern void xfs_buf_stale(struct xfs_buf *bp); bp 299 fs/xfs/xfs_buf.h #define XFS_BUF_ADDR(bp) ((bp)->b_maps[0].bm_bn) bp 300 fs/xfs/xfs_buf.h #define XFS_BUF_SET_ADDR(bp, bno) ((bp)->b_maps[0].bm_bn = (xfs_daddr_t)(bno)) bp 302 fs/xfs/xfs_buf.h void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref); bp 309 fs/xfs/xfs_buf.h static inline void xfs_buf_oneshot(struct xfs_buf *bp) bp 311 fs/xfs/xfs_buf.h if (!list_empty(&bp->b_lru) || atomic_read(&bp->b_lru_ref) > 1) bp 313 fs/xfs/xfs_buf.h atomic_set(&bp->b_lru_ref, 0); bp 316 fs/xfs/xfs_buf.h static inline int xfs_buf_ispinned(struct xfs_buf *bp) bp 318 fs/xfs/xfs_buf.h return atomic_read(&bp->b_pin_count); bp 321 fs/xfs/xfs_buf.h static inline void xfs_buf_relse(xfs_buf_t *bp) bp 323 fs/xfs/xfs_buf.h xfs_buf_unlock(bp); bp 324 fs/xfs/xfs_buf.h xfs_buf_rele(bp); bp 328 fs/xfs/xfs_buf.h xfs_buf_verify_cksum(struct xfs_buf *bp, unsigned long cksum_offset) bp 330 fs/xfs/xfs_buf.h return xfs_verify_cksum(bp->b_addr, BBTOB(bp->b_length), bp 335 fs/xfs/xfs_buf.h xfs_buf_update_cksum(struct xfs_buf *bp, unsigned long cksum_offset) bp 337 fs/xfs/xfs_buf.h xfs_update_cksum(bp->b_addr, BBTOB(bp->b_length), bp 359 fs/xfs/xfs_buf.h int xfs_buf_reverify(struct xfs_buf *bp, const struct xfs_buf_ops *ops); bp 360 fs/xfs/xfs_buf.h bool xfs_verify_magic(struct xfs_buf *bp, __be32 dmagic); bp 361 fs/xfs/xfs_buf.h bool xfs_verify_magic16(struct xfs_buf *bp, __be16 dmagic); bp 28 fs/xfs/xfs_buf_item.c STATIC void xfs_buf_do_callbacks(struct xfs_buf *bp); bp 55 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 89 fs/xfs/xfs_buf_item.c } else if (xfs_buf_offset(bp, next_bit * XFS_BLF_CHUNK) != bp 90 fs/xfs/xfs_buf_item.c (xfs_buf_offset(bp, last_bit * XFS_BLF_CHUNK) + bp 176 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 183 fs/xfs/xfs_buf_item.c xfs_buf_offset(bp, offset), bp 189 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 194 fs/xfs/xfs_buf_item.c return xfs_buf_offset(bp, offset + (next_bit << XFS_BLF_SHIFT)) != bp 195 fs/xfs/xfs_buf_item.c (xfs_buf_offset(bp, offset + (last_bit << XFS_BLF_SHIFT)) + bp 207 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 270 fs/xfs/xfs_buf_item.c xfs_buf_item_copy_iovec(lv, vecp, bp, offset, bp 275 fs/xfs/xfs_buf_item.c xfs_buf_item_straddle(bp, offset, next_bit, last_bit)) { bp 276 fs/xfs/xfs_buf_item.c xfs_buf_item_copy_iovec(lv, vecp, bp, offset, bp 301 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 341 fs/xfs/xfs_buf_item.c offset += BBTOB(bp->b_maps[i].bm_len); bp 395 fs/xfs/xfs_buf_item.c xfs_buf_t *bp = bip->bli_buf; bp 400 fs/xfs/xfs_buf_item.c ASSERT(bp->b_log_item == bip); bp 407 fs/xfs/xfs_buf_item.c if (atomic_dec_and_test(&bp->b_pin_count)) bp 408 fs/xfs/xfs_buf_item.c wake_up_all(&bp->b_waiters); bp 412 fs/xfs/xfs_buf_item.c ASSERT(xfs_buf_islocked(bp)); bp 413 fs/xfs/xfs_buf_item.c ASSERT(bp->b_flags & XBF_STALE); bp 434 fs/xfs/xfs_buf_item.c bp->b_transp = NULL; bp 444 fs/xfs/xfs_buf_item.c xfs_buf_do_callbacks(bp); bp 445 fs/xfs/xfs_buf_item.c bp->b_log_item = NULL; bp 446 fs/xfs/xfs_buf_item.c list_del_init(&bp->b_li_list); bp 447 fs/xfs/xfs_buf_item.c bp->b_iodone = NULL; bp 451 fs/xfs/xfs_buf_item.c xfs_buf_item_relse(bp); bp 452 fs/xfs/xfs_buf_item.c ASSERT(bp->b_log_item == NULL); bp 454 fs/xfs/xfs_buf_item.c xfs_buf_relse(bp); bp 472 fs/xfs/xfs_buf_item.c xfs_buf_lock(bp); bp 473 fs/xfs/xfs_buf_item.c xfs_buf_hold(bp); bp 474 fs/xfs/xfs_buf_item.c bp->b_flags |= XBF_ASYNC; bp 475 fs/xfs/xfs_buf_item.c xfs_buf_ioerror(bp, -EIO); bp 476 fs/xfs/xfs_buf_item.c bp->b_flags &= ~XBF_DONE; bp 477 fs/xfs/xfs_buf_item.c xfs_buf_stale(bp); bp 478 fs/xfs/xfs_buf_item.c xfs_buf_ioend(bp); bp 496 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 499 fs/xfs/xfs_buf_item.c if (xfs_buf_ispinned(bp)) bp 501 fs/xfs/xfs_buf_item.c if (!xfs_buf_trylock(bp)) { bp 509 fs/xfs/xfs_buf_item.c if (xfs_buf_ispinned(bp)) bp 519 fs/xfs/xfs_buf_item.c if ((bp->b_flags & XBF_WRITE_FAIL) && bp 521 fs/xfs/xfs_buf_item.c xfs_warn(bp->b_mount, bp 523 fs/xfs/xfs_buf_item.c (long long)bp->b_bn); bp 526 fs/xfs/xfs_buf_item.c if (!xfs_buf_delwri_queue(bp, buffer_list)) bp 528 fs/xfs/xfs_buf_item.c xfs_buf_unlock(bp); bp 599 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 624 fs/xfs/xfs_buf_item.c bp->b_transp = NULL; bp 637 fs/xfs/xfs_buf_item.c xfs_buf_relse(bp); bp 728 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 731 fs/xfs/xfs_buf_item.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 742 fs/xfs/xfs_buf_item.c ASSERT(bp->b_mount == mp); bp 745 fs/xfs/xfs_buf_item.c ASSERT(!bp->b_transp); bp 746 fs/xfs/xfs_buf_item.c ASSERT(bip->bli_buf == bp); bp 752 fs/xfs/xfs_buf_item.c bip->bli_buf = bp; bp 763 fs/xfs/xfs_buf_item.c error = xfs_buf_item_get_format(bip, bp->b_map_count); bp 772 fs/xfs/xfs_buf_item.c chunks = DIV_ROUND_UP(BBTOB(bp->b_maps[i].bm_len), bp 777 fs/xfs/xfs_buf_item.c bip->bli_formats[i].blf_blkno = bp->b_maps[i].bm_bn; bp 778 fs/xfs/xfs_buf_item.c bip->bli_formats[i].blf_len = bp->b_maps[i].bm_len; bp 782 fs/xfs/xfs_buf_item.c bp->b_log_item = bip; bp 783 fs/xfs/xfs_buf_item.c xfs_buf_hold(bp); bp 882 fs/xfs/xfs_buf_item.c struct xfs_buf *bp = bip->bli_buf; bp 891 fs/xfs/xfs_buf_item.c end = start + BBTOB(bp->b_maps[i].bm_len) - 1; bp 895 fs/xfs/xfs_buf_item.c start += BBTOB(bp->b_maps[i].bm_len); bp 912 fs/xfs/xfs_buf_item.c start += BBTOB(bp->b_maps[i].bm_len); bp 954 fs/xfs/xfs_buf_item.c xfs_buf_t *bp) bp 956 fs/xfs/xfs_buf_item.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 958 fs/xfs/xfs_buf_item.c trace_xfs_buf_item_relse(bp, _RET_IP_); bp 961 fs/xfs/xfs_buf_item.c bp->b_log_item = NULL; bp 962 fs/xfs/xfs_buf_item.c if (list_empty(&bp->b_li_list)) bp 963 fs/xfs/xfs_buf_item.c bp->b_iodone = NULL; bp 965 fs/xfs/xfs_buf_item.c xfs_buf_rele(bp); bp 979 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 983 fs/xfs/xfs_buf_item.c ASSERT(xfs_buf_islocked(bp)); bp 986 fs/xfs/xfs_buf_item.c list_add_tail(&lip->li_bio_list, &bp->b_li_list); bp 988 fs/xfs/xfs_buf_item.c ASSERT(bp->b_iodone == NULL || bp 989 fs/xfs/xfs_buf_item.c bp->b_iodone == xfs_buf_iodone_callbacks); bp 990 fs/xfs/xfs_buf_item.c bp->b_iodone = xfs_buf_iodone_callbacks; bp 1007 fs/xfs/xfs_buf_item.c struct xfs_buf *bp) bp 1009 fs/xfs/xfs_buf_item.c struct xfs_buf_log_item *blip = bp->b_log_item; bp 1015 fs/xfs/xfs_buf_item.c lip->li_cb(bp, lip); bp 1018 fs/xfs/xfs_buf_item.c while (!list_empty(&bp->b_li_list)) { bp 1019 fs/xfs/xfs_buf_item.c lip = list_first_entry(&bp->b_li_list, struct xfs_log_item, bp 1029 fs/xfs/xfs_buf_item.c lip->li_cb(bp, lip); bp 1043 fs/xfs/xfs_buf_item.c struct xfs_buf *bp) bp 1053 fs/xfs/xfs_buf_item.c if (list_empty(&bp->b_li_list)) bp 1056 fs/xfs/xfs_buf_item.c lip = list_first_entry(&bp->b_li_list, struct xfs_log_item, bp 1060 fs/xfs/xfs_buf_item.c list_for_each_entry(lip, &bp->b_li_list, li_bio_list) { bp 1062 fs/xfs/xfs_buf_item.c lip->li_ops->iop_error(lip, bp); bp 1069 fs/xfs/xfs_buf_item.c struct xfs_buf *bp) bp 1071 fs/xfs/xfs_buf_item.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 1083 fs/xfs/xfs_buf_item.c lip = list_first_entry_or_null(&bp->b_li_list, struct xfs_log_item, bp 1094 fs/xfs/xfs_buf_item.c if (bp->b_target != lasttarg || bp 1097 fs/xfs/xfs_buf_item.c xfs_buf_ioerror_alert(bp, __func__); bp 1099 fs/xfs/xfs_buf_item.c lasttarg = bp->b_target; bp 1102 fs/xfs/xfs_buf_item.c if (!(bp->b_flags & XBF_ASYNC)) bp 1105 fs/xfs/xfs_buf_item.c trace_xfs_buf_item_iodone_async(bp, _RET_IP_); bp 1106 fs/xfs/xfs_buf_item.c ASSERT(bp->b_iodone != NULL); bp 1108 fs/xfs/xfs_buf_item.c cfg = xfs_error_get_cfg(mp, XFS_ERR_METADATA, bp->b_error); bp 1117 fs/xfs/xfs_buf_item.c if (!(bp->b_flags & (XBF_STALE | XBF_WRITE_FAIL)) || bp 1118 fs/xfs/xfs_buf_item.c bp->b_last_error != bp->b_error) { bp 1119 fs/xfs/xfs_buf_item.c bp->b_flags |= (XBF_WRITE | XBF_DONE | XBF_WRITE_FAIL); bp 1120 fs/xfs/xfs_buf_item.c bp->b_last_error = bp->b_error; bp 1122 fs/xfs/xfs_buf_item.c !bp->b_first_retry_time) bp 1123 fs/xfs/xfs_buf_item.c bp->b_first_retry_time = jiffies; bp 1125 fs/xfs/xfs_buf_item.c xfs_buf_ioerror(bp, 0); bp 1126 fs/xfs/xfs_buf_item.c xfs_buf_submit(bp); bp 1136 fs/xfs/xfs_buf_item.c ++bp->b_retries > cfg->max_retries) bp 1139 fs/xfs/xfs_buf_item.c time_after(jiffies, cfg->retry_timeout + bp->b_first_retry_time)) bp 1150 fs/xfs/xfs_buf_item.c xfs_buf_do_callbacks_fail(bp); bp 1151 fs/xfs/xfs_buf_item.c xfs_buf_ioerror(bp, 0); bp 1152 fs/xfs/xfs_buf_item.c xfs_buf_relse(bp); bp 1162 fs/xfs/xfs_buf_item.c xfs_buf_stale(bp); bp 1163 fs/xfs/xfs_buf_item.c bp->b_flags |= XBF_DONE; bp 1164 fs/xfs/xfs_buf_item.c trace_xfs_buf_error_relse(bp, _RET_IP_); bp 1176 fs/xfs/xfs_buf_item.c struct xfs_buf *bp) bp 1183 fs/xfs/xfs_buf_item.c if (bp->b_error && xfs_buf_iodone_callback_error(bp)) bp 1190 fs/xfs/xfs_buf_item.c bp->b_last_error = 0; bp 1191 fs/xfs/xfs_buf_item.c bp->b_retries = 0; bp 1192 fs/xfs/xfs_buf_item.c bp->b_first_retry_time = 0; bp 1194 fs/xfs/xfs_buf_item.c xfs_buf_do_callbacks(bp); bp 1195 fs/xfs/xfs_buf_item.c bp->b_log_item = NULL; bp 1196 fs/xfs/xfs_buf_item.c list_del_init(&bp->b_li_list); bp 1197 fs/xfs/xfs_buf_item.c bp->b_iodone = NULL; bp 1198 fs/xfs/xfs_buf_item.c xfs_buf_ioend(bp); bp 1210 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 1215 fs/xfs/xfs_buf_item.c ASSERT(BUF_ITEM(lip)->bli_buf == bp); bp 1217 fs/xfs/xfs_buf_item.c xfs_buf_rele(bp); bp 1254 fs/xfs/xfs_buf_item.c struct xfs_buf *bp, bp 1260 fs/xfs/xfs_buf_item.c ret = xfs_buf_delwri_queue(bp, buffer_list); bp 1266 fs/xfs/xfs_buf_item.c list_for_each_entry(lip, &bp->b_li_list, li_bio_list) bp 139 fs/xfs/xfs_dir2_readdir.c struct xfs_buf *bp; /* buffer for block */ bp 157 fs/xfs/xfs_dir2_readdir.c error = xfs_dir3_block_read(args->trans, dp, &bp); bp 167 fs/xfs/xfs_dir2_readdir.c hdr = bp->b_addr; bp 168 fs/xfs/xfs_dir2_readdir.c xfs_dir3_data_check(dp, bp); bp 214 fs/xfs/xfs_dir2_readdir.c xfs_trans_brelse(args->trans, bp); bp 225 fs/xfs/xfs_dir2_readdir.c xfs_trans_brelse(args->trans, bp); bp 243 fs/xfs/xfs_dir2_readdir.c struct xfs_buf *bp = NULL; bp 279 fs/xfs/xfs_dir2_readdir.c error = xfs_dir3_data_read(args->trans, dp, map.br_startoff, -1, &bp); bp 328 fs/xfs/xfs_dir2_readdir.c *bpp = bp; bp 346 fs/xfs/xfs_dir2_readdir.c struct xfs_buf *bp = NULL; /* data block buffer */ bp 383 fs/xfs/xfs_dir2_readdir.c if (!bp || ptr >= (char *)bp->b_addr + geo->blksize) { bp 384 fs/xfs/xfs_dir2_readdir.c if (bp) { bp 385 fs/xfs/xfs_dir2_readdir.c xfs_trans_brelse(args->trans, bp); bp 386 fs/xfs/xfs_dir2_readdir.c bp = NULL; bp 391 fs/xfs/xfs_dir2_readdir.c &rablk, &bp); bp 393 fs/xfs/xfs_dir2_readdir.c if (error || !bp) bp 396 fs/xfs/xfs_dir2_readdir.c hdr = bp->b_addr; bp 397 fs/xfs/xfs_dir2_readdir.c xfs_dir3_data_check(dp, bp); bp 480 fs/xfs/xfs_dir2_readdir.c if (bp) bp 481 fs/xfs/xfs_dir2_readdir.c xfs_trans_brelse(args->trans, bp); bp 212 fs/xfs/xfs_dquot.c xfs_buf_t *bp) bp 220 fs/xfs/xfs_dquot.c ASSERT(xfs_buf_islocked(bp)); bp 222 fs/xfs/xfs_dquot.c d = bp->b_addr; bp 241 fs/xfs/xfs_dquot.c xfs_trans_dquot_buf(tp, bp, bp 245 fs/xfs/xfs_dquot.c xfs_trans_log_buf(tp, bp, 0, BBTOB(q->qi_dqchunklen) - 1); bp 288 fs/xfs/xfs_dquot.c struct xfs_buf *bp; bp 323 fs/xfs/xfs_dquot.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, dqp->q_blkno, bp 325 fs/xfs/xfs_dquot.c if (!bp) bp 327 fs/xfs/xfs_dquot.c bp->b_ops = &xfs_dquot_buf_ops; bp 334 fs/xfs/xfs_dquot.c dqp->dq_flags & XFS_DQ_ALLTYPES, bp); bp 335 fs/xfs/xfs_dquot.c xfs_buf_set_ref(bp, XFS_DQUOT_REF); bp 358 fs/xfs/xfs_dquot.c xfs_trans_bhold(tp, bp); bp 361 fs/xfs/xfs_dquot.c xfs_trans_bhold_release(*tpp, bp); bp 362 fs/xfs/xfs_dquot.c xfs_trans_brelse(*tpp, bp); bp 365 fs/xfs/xfs_dquot.c *bpp = bp; bp 380 fs/xfs/xfs_dquot.c struct xfs_buf *bp; bp 420 fs/xfs/xfs_dquot.c mp->m_quotainfo->qi_dqchunklen, 0, &bp, bp 423 fs/xfs/xfs_dquot.c ASSERT(bp == NULL); bp 427 fs/xfs/xfs_dquot.c ASSERT(xfs_buf_islocked(bp)); bp 428 fs/xfs/xfs_dquot.c xfs_buf_set_ref(bp, XFS_DQUOT_REF); bp 429 fs/xfs/xfs_dquot.c *bpp = bp; bp 495 fs/xfs/xfs_dquot.c struct xfs_buf *bp) bp 497 fs/xfs/xfs_dquot.c struct xfs_disk_dquot *ddqp = bp->b_addr + dqp->q_bufoffset; bp 565 fs/xfs/xfs_dquot.c struct xfs_buf *bp; bp 572 fs/xfs/xfs_dquot.c error = xfs_dquot_disk_read(mp, dqp, &bp); bp 574 fs/xfs/xfs_dquot.c error = xfs_qm_dqread_alloc(mp, dqp, &bp); bp 584 fs/xfs/xfs_dquot.c ASSERT(xfs_buf_islocked(bp)); bp 585 fs/xfs/xfs_dquot.c xfs_dquot_from_disk(dqp, bp); bp 587 fs/xfs/xfs_dquot.c xfs_buf_relse(bp); bp 1018 fs/xfs/xfs_dquot.c struct xfs_buf *bp, bp 1071 fs/xfs/xfs_dquot.c struct xfs_buf *bp; bp 1108 fs/xfs/xfs_dquot.c mp->m_quotainfo->qi_dqchunklen, 0, &bp, bp 1116 fs/xfs/xfs_dquot.c dqb = bp->b_addr + dqp->q_bufoffset; bp 1126 fs/xfs/xfs_dquot.c xfs_buf_relse(bp); bp 1162 fs/xfs/xfs_dquot.c xfs_buf_attach_iodone(bp, xfs_qm_dqflush_done, bp 1169 fs/xfs/xfs_dquot.c if (xfs_buf_ispinned(bp)) { bp 1175 fs/xfs/xfs_dquot.c *bpp = bp; bp 127 fs/xfs/xfs_dquot_item.c struct xfs_buf *bp) bp 130 fs/xfs/xfs_dquot_item.c xfs_set_li_failed(lip, bp); bp 141 fs/xfs/xfs_dquot_item.c struct xfs_buf *bp = lip->li_buf; bp 153 fs/xfs/xfs_dquot_item.c if (!xfs_buf_trylock(bp)) bp 156 fs/xfs/xfs_dquot_item.c if (!xfs_buf_resubmit_failed_buffers(bp, buffer_list)) bp 159 fs/xfs/xfs_dquot_item.c xfs_buf_unlock(bp); bp 187 fs/xfs/xfs_dquot_item.c error = xfs_qm_dqflush(dqp, &bp); bp 189 fs/xfs/xfs_dquot_item.c if (!xfs_buf_delwri_queue(bp, buffer_list)) bp 191 fs/xfs/xfs_dquot_item.c xfs_buf_relse(bp); bp 350 fs/xfs/xfs_error.c struct xfs_buf *bp, bp 357 fs/xfs/xfs_error.c struct xfs_mount *mp = bp->b_mount; bp 362 fs/xfs/xfs_error.c __xfs_buf_ioerror(bp, error, fa); bp 366 fs/xfs/xfs_error.c bp->b_error == -EFSBADCRC ? "CRC error" : "corruption", bp 367 fs/xfs/xfs_error.c fa, bp->b_ops->name, bp->b_bn, name); bp 388 fs/xfs/xfs_error.c struct xfs_buf *bp, bp 392 fs/xfs/xfs_error.c return xfs_buf_verifier_error(bp, error, "", xfs_buf_offset(bp, 0), bp 18 fs/xfs/xfs_error.h extern void xfs_buf_verifier_error(struct xfs_buf *bp, int error, bp 21 fs/xfs/xfs_error.h extern void xfs_verifier_error(struct xfs_buf *bp, int error, bp 31 fs/xfs/xfs_fsops.c xfs_buf_t *bp; bp 48 fs/xfs/xfs_fsops.c XFS_FSS_TO_BB(mp, 1), 0, &bp, NULL); bp 51 fs/xfs/xfs_fsops.c xfs_buf_relse(bp); bp 1111 fs/xfs/xfs_icache.c struct xfs_buf *bp = NULL; bp 1163 fs/xfs/xfs_icache.c error = xfs_iflush(ip, &bp); bp 1172 fs/xfs/xfs_icache.c error = xfs_bwrite(bp); bp 1173 fs/xfs/xfs_icache.c xfs_buf_relse(bp); bp 2529 fs/xfs/xfs_inode.c xfs_buf_t *bp; bp 2564 fs/xfs/xfs_inode.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, bp 2568 fs/xfs/xfs_inode.c if (!bp) bp 2580 fs/xfs/xfs_inode.c bp->b_ops = &xfs_inode_buf_ops; bp 2589 fs/xfs/xfs_inode.c list_for_each_entry(lip, &bp->b_li_list, li_bio_list) { bp 2691 fs/xfs/xfs_inode.c xfs_buf_attach_iodone(bp, xfs_istale_done, bp 2698 fs/xfs/xfs_inode.c xfs_trans_stale_inode_buf(tp, bp); bp 2699 fs/xfs/xfs_inode.c xfs_trans_binval(tp, bp); bp 3466 fs/xfs/xfs_inode.c struct xfs_buf *bp) bp 3568 fs/xfs/xfs_inode.c error = xfs_iflush_int(cip, bp); bp 3607 fs/xfs/xfs_inode.c ASSERT(bp->b_iodone); bp 3608 fs/xfs/xfs_inode.c bp->b_flags |= XBF_ASYNC; bp 3609 fs/xfs/xfs_inode.c bp->b_flags &= ~XBF_DONE; bp 3610 fs/xfs/xfs_inode.c xfs_buf_stale(bp); bp 3611 fs/xfs/xfs_inode.c xfs_buf_ioerror(bp, -EIO); bp 3612 fs/xfs/xfs_inode.c xfs_buf_ioend(bp); bp 3638 fs/xfs/xfs_inode.c struct xfs_buf *bp = NULL; bp 3688 fs/xfs/xfs_inode.c error = xfs_imap_to_bp(mp, NULL, &ip->i_imap, &dip, &bp, XBF_TRYLOCK, bp 3700 fs/xfs/xfs_inode.c error = xfs_iflush_int(ip, bp); bp 3708 fs/xfs/xfs_inode.c if (xfs_buf_ispinned(bp)) bp 3720 fs/xfs/xfs_inode.c error = xfs_iflush_cluster(ip, bp); bp 3724 fs/xfs/xfs_inode.c *bpp = bp; bp 3728 fs/xfs/xfs_inode.c if (bp) bp 3729 fs/xfs/xfs_inode.c xfs_buf_relse(bp); bp 3770 fs/xfs/xfs_inode.c struct xfs_buf *bp) bp 3784 fs/xfs/xfs_inode.c dip = xfs_buf_offset(bp, ip->i_imap.im_boffset); bp 3863 fs/xfs/xfs_inode.c xfs_inobp_check(mp, bp); bp 3904 fs/xfs/xfs_inode.c xfs_buf_attach_iodone(bp, xfs_iflush_done, &iip->ili_item); bp 3909 fs/xfs/xfs_inode.c ASSERT(!list_empty(&bp->b_li_list)); bp 3910 fs/xfs/xfs_inode.c ASSERT(bp->b_iodone != NULL); bp 479 fs/xfs/xfs_inode_item.c struct xfs_buf *bp) bp 482 fs/xfs/xfs_inode_item.c xfs_set_li_failed(lip, bp); bp 494 fs/xfs/xfs_inode_item.c struct xfs_buf *bp = lip->li_buf; bp 506 fs/xfs/xfs_inode_item.c if (!xfs_buf_trylock(bp)) bp 509 fs/xfs/xfs_inode_item.c if (!xfs_buf_resubmit_failed_buffers(bp, buffer_list)) bp 512 fs/xfs/xfs_inode_item.c xfs_buf_unlock(bp); bp 551 fs/xfs/xfs_inode_item.c error = xfs_iflush(ip, &bp); bp 553 fs/xfs/xfs_inode_item.c if (!xfs_buf_delwri_queue(bp, buffer_list)) bp 555 fs/xfs/xfs_inode_item.c xfs_buf_relse(bp); bp 687 fs/xfs/xfs_inode_item.c struct xfs_buf *bp, bp 703 fs/xfs/xfs_inode_item.c list_for_each_entry_safe(blip, n, &bp->b_li_list, li_bio_list) { bp 814 fs/xfs/xfs_inode_item.c struct xfs_buf *bp, bp 294 fs/xfs/xfs_log_recover.c struct xfs_buf *bp) bp 296 fs/xfs/xfs_log_recover.c if (bp->b_error) { bp 301 fs/xfs/xfs_log_recover.c if (!XFS_FORCED_SHUTDOWN(bp->b_mount)) { bp 302 fs/xfs/xfs_log_recover.c xfs_buf_ioerror_alert(bp, __func__); bp 303 fs/xfs/xfs_log_recover.c xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR); bp 311 fs/xfs/xfs_log_recover.c if (bp->b_log_item) bp 312 fs/xfs/xfs_log_recover.c xfs_buf_item_relse(bp); bp 313 fs/xfs/xfs_log_recover.c ASSERT(bp->b_log_item == NULL); bp 315 fs/xfs/xfs_log_recover.c bp->b_iodone = NULL; bp 316 fs/xfs/xfs_log_recover.c xfs_buf_ioend(bp); bp 2064 fs/xfs/xfs_log_recover.c struct xfs_buf *bp, bp 2085 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_inode_buf_ops; bp 2087 fs/xfs/xfs_log_recover.c inodes_per_buf = BBTOB(bp->b_length) >> mp->m_sb.sb_inodelog; bp 2129 fs/xfs/xfs_log_recover.c ASSERT((reg_buf_offset + reg_buf_bytes) <= BBTOB(bp->b_length)); bp 2142 fs/xfs/xfs_log_recover.c item, bp); bp 2148 fs/xfs/xfs_log_recover.c buffer_nextp = xfs_buf_offset(bp, next_unlinked_offset); bp 2157 fs/xfs/xfs_log_recover.c xfs_buf_offset(bp, i * mp->m_sb.sb_inodesize)); bp 2187 fs/xfs/xfs_log_recover.c struct xfs_buf *bp) bp 2192 fs/xfs/xfs_log_recover.c void *blk = bp->b_addr; bp 2335 fs/xfs/xfs_log_recover.c struct xfs_buf *bp, bp 2339 fs/xfs/xfs_log_recover.c struct xfs_da_blkinfo *info = bp->b_addr; bp 2356 fs/xfs/xfs_log_recover.c magic32 = be32_to_cpu(*(__be32 *)bp->b_addr); bp 2357 fs/xfs/xfs_log_recover.c magic16 = be16_to_cpu(*(__be16*)bp->b_addr); bp 2364 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_bnobt_buf_ops; bp 2368 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_cntbt_buf_ops; bp 2372 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_inobt_buf_ops; bp 2376 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_finobt_buf_ops; bp 2380 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_bmbt_buf_ops; bp 2383 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_rmapbt_buf_ops; bp 2386 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_refcountbt_buf_ops; bp 2398 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_agf_buf_ops; bp 2405 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_agfl_buf_ops; bp 2412 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_agi_buf_ops; bp 2422 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dquot_buf_ops; bp 2434 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_inode_buf_ops; bp 2441 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_symlink_buf_ops; bp 2449 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dir3_block_buf_ops; bp 2457 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dir3_data_buf_ops; bp 2465 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dir3_free_buf_ops; bp 2473 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dir3_leaf1_buf_ops; bp 2481 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_dir3_leafn_buf_ops; bp 2489 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_da3_node_buf_ops; bp 2497 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_attr3_leaf_buf_ops; bp 2504 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_attr3_rmt_buf_ops; bp 2511 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_sb_buf_ops; bp 2517 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_rtbuf_ops; bp 2550 fs/xfs/xfs_log_recover.c if (bp->b_ops) { bp 2553 fs/xfs/xfs_log_recover.c ASSERT(!bp->b_iodone || bp->b_iodone == xlog_recover_iodone); bp 2554 fs/xfs/xfs_log_recover.c bp->b_iodone = xlog_recover_iodone; bp 2555 fs/xfs/xfs_log_recover.c xfs_buf_item_init(bp, mp); bp 2556 fs/xfs/xfs_log_recover.c bip = bp->b_log_item; bp 2571 fs/xfs/xfs_log_recover.c struct xfs_buf *bp, bp 2594 fs/xfs/xfs_log_recover.c ASSERT(BBTOB(bp->b_length) >= bp 2632 fs/xfs/xfs_log_recover.c fa, bp->b_bn); bp 2637 fs/xfs/xfs_log_recover.c memcpy(xfs_buf_offset(bp, bp 2649 fs/xfs/xfs_log_recover.c xlog_recover_validate_buf_type(mp, bp, buf_f, current_lsn); bp 2666 fs/xfs/xfs_log_recover.c struct xfs_buf *bp, bp 2692 fs/xfs/xfs_log_recover.c xlog_recover_do_reg_buffer(mp, item, bp, buf_f, NULLCOMMITLSN); bp 2728 fs/xfs/xfs_log_recover.c xfs_buf_t *bp; bp 2749 fs/xfs/xfs_log_recover.c bp = xfs_buf_read(mp->m_ddev_targp, buf_f->blf_blkno, buf_f->blf_len, bp 2751 fs/xfs/xfs_log_recover.c if (!bp) bp 2753 fs/xfs/xfs_log_recover.c error = bp->b_error; bp 2755 fs/xfs/xfs_log_recover.c xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#1)"); bp 2778 fs/xfs/xfs_log_recover.c lsn = xlog_recover_get_buf_lsn(mp, bp); bp 2781 fs/xfs/xfs_log_recover.c xlog_recover_validate_buf_type(mp, bp, buf_f, NULLCOMMITLSN); bp 2786 fs/xfs/xfs_log_recover.c error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); bp 2793 fs/xfs/xfs_log_recover.c dirty = xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f); bp 2797 fs/xfs/xfs_log_recover.c xlog_recover_do_reg_buffer(mp, item, bp, buf_f, current_lsn); bp 2816 fs/xfs/xfs_log_recover.c be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && bp 2817 fs/xfs/xfs_log_recover.c (BBTOB(bp->b_length) != M_IGEO(log->l_mp)->inode_cluster_size)) { bp 2818 fs/xfs/xfs_log_recover.c xfs_buf_stale(bp); bp 2819 fs/xfs/xfs_log_recover.c error = xfs_bwrite(bp); bp 2821 fs/xfs/xfs_log_recover.c ASSERT(bp->b_mount == mp); bp 2822 fs/xfs/xfs_log_recover.c bp->b_iodone = xlog_recover_iodone; bp 2823 fs/xfs/xfs_log_recover.c xfs_buf_delwri_queue(bp, buffer_list); bp 2827 fs/xfs/xfs_log_recover.c xfs_buf_relse(bp); bp 2920 fs/xfs/xfs_log_recover.c xfs_buf_t *bp; bp 2954 fs/xfs/xfs_log_recover.c bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len, 0, bp 2956 fs/xfs/xfs_log_recover.c if (!bp) { bp 2960 fs/xfs/xfs_log_recover.c error = bp->b_error; bp 2962 fs/xfs/xfs_log_recover.c xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#2)"); bp 2966 fs/xfs/xfs_log_recover.c dip = xfs_buf_offset(bp, in_f->ilf_boffset); bp 2972 fs/xfs/xfs_log_recover.c if (unlikely(!xfs_verify_magic16(bp, dip->di_magic))) { bp 2975 fs/xfs/xfs_log_recover.c __func__, dip, bp, in_f->ilf_ino); bp 3045 fs/xfs/xfs_log_recover.c __func__, item, dip, bp, in_f->ilf_ino); bp 3059 fs/xfs/xfs_log_recover.c __func__, item, dip, bp, in_f->ilf_ino); bp 3071 fs/xfs/xfs_log_recover.c __func__, item, dip, bp, in_f->ilf_ino, bp 3084 fs/xfs/xfs_log_recover.c item, dip, bp, in_f->ilf_ino, ldip->di_forkoff); bp 3183 fs/xfs/xfs_log_recover.c ASSERT(bp->b_mount == mp); bp 3184 fs/xfs/xfs_log_recover.c bp->b_iodone = xlog_recover_iodone; bp 3185 fs/xfs/xfs_log_recover.c xfs_buf_delwri_queue(bp, buffer_list); bp 3188 fs/xfs/xfs_log_recover.c xfs_buf_relse(bp); bp 3233 fs/xfs/xfs_log_recover.c xfs_buf_t *bp; bp 3294 fs/xfs/xfs_log_recover.c XFS_FSB_TO_BB(mp, dq_f->qlf_len), 0, &bp, bp 3299 fs/xfs/xfs_log_recover.c ASSERT(bp); bp 3300 fs/xfs/xfs_log_recover.c ddq = xfs_buf_offset(bp, dq_f->qlf_boffset); bp 3322 fs/xfs/xfs_log_recover.c ASSERT(bp->b_mount == mp); bp 3323 fs/xfs/xfs_log_recover.c bp->b_iodone = xlog_recover_iodone; bp 3324 fs/xfs/xfs_log_recover.c xfs_buf_delwri_queue(bp, buffer_list); bp 3327 fs/xfs/xfs_log_recover.c xfs_buf_relse(bp); bp 5587 fs/xfs/xfs_log_recover.c xfs_buf_t *bp; bp 5621 fs/xfs/xfs_log_recover.c bp = xfs_getsb(mp); bp 5622 fs/xfs/xfs_log_recover.c bp->b_flags &= ~(XBF_DONE | XBF_ASYNC); bp 5623 fs/xfs/xfs_log_recover.c ASSERT(!(bp->b_flags & XBF_WRITE)); bp 5624 fs/xfs/xfs_log_recover.c bp->b_flags |= XBF_READ; bp 5625 fs/xfs/xfs_log_recover.c bp->b_ops = &xfs_sb_buf_ops; bp 5627 fs/xfs/xfs_log_recover.c error = xfs_buf_submit(bp); bp 5630 fs/xfs/xfs_log_recover.c xfs_buf_ioerror_alert(bp, __func__); bp 5633 fs/xfs/xfs_log_recover.c xfs_buf_relse(bp); bp 5639 fs/xfs/xfs_log_recover.c xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); bp 5640 fs/xfs/xfs_log_recover.c xfs_buf_relse(bp); bp 272 fs/xfs/xfs_mount.c struct xfs_buf *bp; bp 299 fs/xfs/xfs_mount.c BTOBB(sector_size), XBF_NO_IOACCT, &bp, bp 313 fs/xfs/xfs_mount.c xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); bp 342 fs/xfs/xfs_mount.c xfs_buf_relse(bp); bp 351 fs/xfs/xfs_mount.c bp->b_ops = &xfs_sb_buf_ops; bp 353 fs/xfs/xfs_mount.c mp->m_sb_bp = bp; bp 354 fs/xfs/xfs_mount.c xfs_buf_unlock(bp); bp 358 fs/xfs/xfs_mount.c xfs_buf_relse(bp); bp 491 fs/xfs/xfs_mount.c struct xfs_buf *bp; bp 502 fs/xfs/xfs_mount.c XFS_FSS_TO_BB(mp, 1), 0, &bp, NULL); bp 507 fs/xfs/xfs_mount.c xfs_buf_relse(bp); bp 519 fs/xfs/xfs_mount.c XFS_FSB_TO_BB(mp, 1), 0, &bp, NULL); bp 524 fs/xfs/xfs_mount.c xfs_buf_relse(bp); bp 1313 fs/xfs/xfs_mount.c struct xfs_buf *bp = mp->m_sb_bp; bp 1315 fs/xfs/xfs_mount.c xfs_buf_lock(bp); bp 1316 fs/xfs/xfs_mount.c xfs_buf_hold(bp); bp 1317 fs/xfs/xfs_mount.c ASSERT(bp->b_flags & XBF_DONE); bp 1318 fs/xfs/xfs_mount.c return bp; bp 1328 fs/xfs/xfs_mount.c struct xfs_buf *bp = mp->m_sb_bp; bp 1330 fs/xfs/xfs_mount.c xfs_buf_lock(bp); bp 1332 fs/xfs/xfs_mount.c xfs_buf_relse(bp); bp 140 fs/xfs/xfs_qm.c struct xfs_buf *bp = NULL; bp 147 fs/xfs/xfs_qm.c error = xfs_qm_dqflush(dqp, &bp); bp 149 fs/xfs/xfs_qm.c error = xfs_bwrite(bp); bp 150 fs/xfs/xfs_qm.c xfs_buf_relse(bp); bp 450 fs/xfs/xfs_qm.c struct xfs_buf *bp = NULL; bp 458 fs/xfs/xfs_qm.c error = xfs_qm_dqflush(dqp, &bp); bp 462 fs/xfs/xfs_qm.c xfs_buf_delwri_queue(bp, &isol->buffers); bp 463 fs/xfs/xfs_qm.c xfs_buf_relse(bp); bp 826 fs/xfs/xfs_qm.c xfs_buf_t *bp, bp 834 fs/xfs/xfs_qm.c trace_xfs_reset_dqcounts(bp, _RET_IP_); bp 845 fs/xfs/xfs_qm.c dqb = bp->b_addr; bp 893 fs/xfs/xfs_qm.c struct xfs_buf *bp; bp 914 fs/xfs/xfs_qm.c mp->m_quotainfo->qi_dqchunklen, 0, &bp, bp 927 fs/xfs/xfs_qm.c mp->m_quotainfo->qi_dqchunklen, 0, &bp, bp 939 fs/xfs/xfs_qm.c bp->b_ops = &xfs_dquot_buf_ops; bp 940 fs/xfs/xfs_qm.c xfs_qm_reset_dqcounts(mp, bp, firstid, type); bp 941 fs/xfs/xfs_qm.c xfs_buf_delwri_queue(bp, buffer_list); bp 942 fs/xfs/xfs_qm.c xfs_buf_relse(bp); bp 1207 fs/xfs/xfs_qm.c struct xfs_buf *bp = NULL; bp 1226 fs/xfs/xfs_qm.c bp = xfs_buf_incore(mp->m_ddev_targp, dqp->q_blkno, bp 1228 fs/xfs/xfs_qm.c if (!bp) { bp 1232 fs/xfs/xfs_qm.c xfs_buf_unlock(bp); bp 1234 fs/xfs/xfs_qm.c xfs_buf_delwri_pushbuf(bp, buffer_list); bp 1235 fs/xfs/xfs_qm.c xfs_buf_rele(bp); bp 1241 fs/xfs/xfs_qm.c error = xfs_qm_dqflush(dqp, &bp); bp 1245 fs/xfs/xfs_qm.c xfs_buf_delwri_queue(bp, buffer_list); bp 1246 fs/xfs/xfs_qm.c xfs_buf_relse(bp); bp 107 fs/xfs/xfs_rtalloc.c xfs_buf_t *bp; /* summary buffer */ bp 113 fs/xfs/xfs_rtalloc.c bp = NULL; bp 118 fs/xfs/xfs_rtalloc.c error = xfs_rtget_summary(omp, tp, log, bbno, &bp, bp 125 fs/xfs/xfs_rtalloc.c &bp, &sumbno); bp 129 fs/xfs/xfs_rtalloc.c &bp, &sumbno); bp 763 fs/xfs/xfs_rtalloc.c struct xfs_buf *bp; /* temporary buffer for zeroing */ bp 830 fs/xfs/xfs_rtalloc.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, bp 832 fs/xfs/xfs_rtalloc.c if (bp == NULL) { bp 836 fs/xfs/xfs_rtalloc.c memset(bp->b_addr, 0, mp->m_sb.sb_blocksize); bp 837 fs/xfs/xfs_rtalloc.c xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); bp 886 fs/xfs/xfs_rtalloc.c xfs_buf_t *bp; /* temporary buffer */ bp 920 fs/xfs/xfs_rtalloc.c XFS_FSB_TO_BB(mp, 1), 0, &bp, NULL); bp 923 fs/xfs/xfs_rtalloc.c xfs_buf_relse(bp); bp 1059 fs/xfs/xfs_rtalloc.c bp = NULL; bp 1061 fs/xfs/xfs_rtalloc.c nsbp->sb_rextents - sbp->sb_rextents, &bp, &sumbno); bp 1186 fs/xfs/xfs_rtalloc.c struct xfs_buf *bp; /* buffer for last block of subvolume */ bp 1217 fs/xfs/xfs_rtalloc.c XFS_FSB_TO_BB(mp, 1), 0, &bp, NULL); bp 1222 fs/xfs/xfs_rtalloc.c xfs_buf_relse(bp); bp 32 fs/xfs/xfs_symlink.c struct xfs_buf *bp; bp 55 fs/xfs/xfs_symlink.c bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), 0, bp 57 fs/xfs/xfs_symlink.c if (!bp) bp 59 fs/xfs/xfs_symlink.c error = bp->b_error; bp 61 fs/xfs/xfs_symlink.c xfs_buf_ioerror_alert(bp, __func__); bp 62 fs/xfs/xfs_symlink.c xfs_buf_relse(bp); bp 73 fs/xfs/xfs_symlink.c cur_chunk = bp->b_addr; bp 76 fs/xfs/xfs_symlink.c byte_cnt, bp)) { bp 81 fs/xfs/xfs_symlink.c xfs_buf_relse(bp); bp 94 fs/xfs/xfs_symlink.c xfs_buf_relse(bp); bp 166 fs/xfs/xfs_symlink.c xfs_buf_t *bp; bp 292 fs/xfs/xfs_symlink.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, bp 294 fs/xfs/xfs_symlink.c if (!bp) { bp 298 fs/xfs/xfs_symlink.c bp->b_ops = &xfs_symlink_buf_ops; bp 303 fs/xfs/xfs_symlink.c buf = bp->b_addr; bp 305 fs/xfs/xfs_symlink.c byte_cnt, bp); bp 313 fs/xfs/xfs_symlink.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); bp 314 fs/xfs/xfs_symlink.c xfs_trans_log_buf(tp, bp, 0, (buf + byte_cnt - 1) - bp 315 fs/xfs/xfs_symlink.c (char *)bp->b_addr); bp 384 fs/xfs/xfs_symlink.c xfs_buf_t *bp; bp 435 fs/xfs/xfs_symlink.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, bp 438 fs/xfs/xfs_symlink.c if (!bp) { bp 442 fs/xfs/xfs_symlink.c xfs_trans_binval(tp, bp); bp 274 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), bp 275 fs/xfs/xfs_trace.h TP_ARGS(bp, caller_ip), bp 287 fs/xfs/xfs_trace.h __entry->dev = bp->b_target->bt_dev; bp 288 fs/xfs/xfs_trace.h if (bp->b_bn == XFS_BUF_DADDR_NULL) bp 289 fs/xfs/xfs_trace.h __entry->bno = bp->b_maps[0].bm_bn; bp 291 fs/xfs/xfs_trace.h __entry->bno = bp->b_bn; bp 292 fs/xfs/xfs_trace.h __entry->nblks = bp->b_length; bp 293 fs/xfs/xfs_trace.h __entry->hold = atomic_read(&bp->b_hold); bp 294 fs/xfs/xfs_trace.h __entry->pincount = atomic_read(&bp->b_pin_count); bp 295 fs/xfs/xfs_trace.h __entry->lockval = bp->b_sema.count; bp 296 fs/xfs/xfs_trace.h __entry->flags = bp->b_flags; bp 313 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \ bp 314 fs/xfs/xfs_trace.h TP_ARGS(bp, caller_ip)) bp 345 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), bp 346 fs/xfs/xfs_trace.h TP_ARGS(bp, flags, caller_ip), bp 358 fs/xfs/xfs_trace.h __entry->dev = bp->b_target->bt_dev; bp 359 fs/xfs/xfs_trace.h __entry->bno = bp->b_bn; bp 360 fs/xfs/xfs_trace.h __entry->buffer_length = BBTOB(bp->b_length); bp 362 fs/xfs/xfs_trace.h __entry->hold = atomic_read(&bp->b_hold); bp 363 fs/xfs/xfs_trace.h __entry->pincount = atomic_read(&bp->b_pin_count); bp 364 fs/xfs/xfs_trace.h __entry->lockval = bp->b_sema.count; bp 381 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \ bp 382 fs/xfs/xfs_trace.h TP_ARGS(bp, flags, caller_ip)) bp 388 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_buf *bp, int error, xfs_failaddr_t caller_ip), bp 389 fs/xfs/xfs_trace.h TP_ARGS(bp, error, caller_ip), bp 402 fs/xfs/xfs_trace.h __entry->dev = bp->b_target->bt_dev; bp 403 fs/xfs/xfs_trace.h __entry->bno = bp->b_bn; bp 404 fs/xfs/xfs_trace.h __entry->buffer_length = BBTOB(bp->b_length); bp 405 fs/xfs/xfs_trace.h __entry->hold = atomic_read(&bp->b_hold); bp 406 fs/xfs/xfs_trace.h __entry->pincount = atomic_read(&bp->b_pin_count); bp 407 fs/xfs/xfs_trace.h __entry->lockval = bp->b_sema.count; bp 409 fs/xfs/xfs_trace.h __entry->flags = bp->b_flags; bp 2205 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp), bp 2206 fs/xfs/xfs_trace.h TP_ARGS(cur, level, bp), bp 2221 fs/xfs/xfs_trace.h __entry->daddr = bp ? bp->b_bn : -1; bp 2234 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_btree_cur *cur, int level, struct xfs_buf *bp), \ bp 2235 fs/xfs/xfs_trace.h TP_ARGS(cur, level, bp)) bp 449 fs/xfs/xfs_trans.c xfs_buf_t *bp; bp 452 fs/xfs/xfs_trans.c bp = xfs_trans_getsb(tp, tp->t_mountp); bp 453 fs/xfs/xfs_trans.c sbp = XFS_BUF_TO_SBP(bp); bp 514 fs/xfs/xfs_trans.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF); bp 519 fs/xfs/xfs_trans.c xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_dsb_t) - 1); bp 525 fs/xfs/xfs_trans.c xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount), bp 230 fs/xfs/xfs_trans.h bool xfs_trans_buf_is_dirty(struct xfs_buf *bp); bp 63 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp, bp 68 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == NULL); bp 75 fs/xfs/xfs_trans_buf.c xfs_buf_item_init(bp, tp->t_mountp); bp 76 fs/xfs/xfs_trans_buf.c bip = bp->b_log_item; bp 93 fs/xfs/xfs_trans_buf.c bp->b_transp = tp; bp 100 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp) bp 102 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 0); bp 103 fs/xfs/xfs_trans_buf.c trace_xfs_trans_bjoin(bp->b_log_item); bp 123 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp; bp 135 fs/xfs/xfs_trans_buf.c bp = xfs_trans_buf_item_match(tp, target, map, nmaps); bp 136 fs/xfs/xfs_trans_buf.c if (bp != NULL) { bp 137 fs/xfs/xfs_trans_buf.c ASSERT(xfs_buf_islocked(bp)); bp 139 fs/xfs/xfs_trans_buf.c xfs_buf_stale(bp); bp 140 fs/xfs/xfs_trans_buf.c bp->b_flags |= XBF_DONE; bp 143 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 144 fs/xfs/xfs_trans_buf.c bip = bp->b_log_item; bp 149 fs/xfs/xfs_trans_buf.c return bp; bp 152 fs/xfs/xfs_trans_buf.c bp = xfs_buf_get_map(target, map, nmaps, flags); bp 153 fs/xfs/xfs_trans_buf.c if (bp == NULL) { bp 157 fs/xfs/xfs_trans_buf.c ASSERT(!bp->b_error); bp 159 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); bp 160 fs/xfs/xfs_trans_buf.c trace_xfs_trans_get_buf(bp->b_log_item); bp 161 fs/xfs/xfs_trans_buf.c return bp; bp 177 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp; bp 193 fs/xfs/xfs_trans_buf.c bp = mp->m_sb_bp; bp 194 fs/xfs/xfs_trans_buf.c if (bp->b_transp == tp) { bp 195 fs/xfs/xfs_trans_buf.c bip = bp->b_log_item; bp 200 fs/xfs/xfs_trans_buf.c return bp; bp 203 fs/xfs/xfs_trans_buf.c bp = xfs_getsb(mp); bp 204 fs/xfs/xfs_trans_buf.c if (bp == NULL) bp 207 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); bp 208 fs/xfs/xfs_trans_buf.c trace_xfs_trans_getsb(bp->b_log_item); bp 209 fs/xfs/xfs_trans_buf.c return bp; bp 233 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp = NULL; bp 247 fs/xfs/xfs_trans_buf.c bp = xfs_trans_buf_item_match(tp, target, map, nmaps); bp 248 fs/xfs/xfs_trans_buf.c if (bp) { bp 249 fs/xfs/xfs_trans_buf.c ASSERT(xfs_buf_islocked(bp)); bp 250 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 251 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_log_item != NULL); bp 252 fs/xfs/xfs_trans_buf.c ASSERT(!bp->b_error); bp 253 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_flags & XBF_DONE); bp 260 fs/xfs/xfs_trans_buf.c trace_xfs_trans_read_buf_shut(bp, _RET_IP_); bp 276 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_ops != NULL); bp 277 fs/xfs/xfs_trans_buf.c error = xfs_buf_reverify(bp, ops); bp 279 fs/xfs/xfs_trans_buf.c xfs_buf_ioerror_alert(bp, __func__); bp 291 fs/xfs/xfs_trans_buf.c bip = bp->b_log_item; bp 296 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_ops != NULL || ops == NULL); bp 297 fs/xfs/xfs_trans_buf.c *bpp = bp; bp 301 fs/xfs/xfs_trans_buf.c bp = xfs_buf_read_map(target, map, nmaps, flags, ops); bp 302 fs/xfs/xfs_trans_buf.c if (!bp) { bp 317 fs/xfs/xfs_trans_buf.c if (bp->b_error) { bp 318 fs/xfs/xfs_trans_buf.c error = bp->b_error; bp 320 fs/xfs/xfs_trans_buf.c xfs_buf_ioerror_alert(bp, __func__); bp 321 fs/xfs/xfs_trans_buf.c bp->b_flags &= ~XBF_DONE; bp 322 fs/xfs/xfs_trans_buf.c xfs_buf_stale(bp); bp 326 fs/xfs/xfs_trans_buf.c xfs_buf_relse(bp); bp 335 fs/xfs/xfs_trans_buf.c xfs_buf_relse(bp); bp 336 fs/xfs/xfs_trans_buf.c trace_xfs_trans_read_buf_shut(bp, _RET_IP_); bp 341 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); bp 342 fs/xfs/xfs_trans_buf.c trace_xfs_trans_read_buf(bp->b_log_item); bp 344 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_ops != NULL || ops == NULL); bp 345 fs/xfs/xfs_trans_buf.c *bpp = bp; bp 353 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp) bp 355 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 378 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp) bp 380 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 382 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 385 fs/xfs/xfs_trans_buf.c xfs_buf_relse(bp); bp 422 fs/xfs/xfs_trans_buf.c bp->b_transp = NULL; bp 423 fs/xfs/xfs_trans_buf.c xfs_buf_relse(bp); bp 435 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 437 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 439 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 456 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 458 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 460 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 477 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp) bp 479 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 481 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 483 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_iodone == NULL || bp 484 fs/xfs/xfs_trans_buf.c bp->b_iodone == xfs_buf_iodone_callbacks); bp 496 fs/xfs/xfs_trans_buf.c bp->b_flags |= XBF_DONE; bp 499 fs/xfs/xfs_trans_buf.c bp->b_iodone = xfs_buf_iodone_callbacks; bp 510 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_flags & XBF_STALE); bp 511 fs/xfs/xfs_trans_buf.c bp->b_flags &= ~XBF_STALE; bp 532 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp, bp 536 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 538 fs/xfs/xfs_trans_buf.c ASSERT(first <= last && last < BBTOB(bp->b_length)); bp 541 fs/xfs/xfs_trans_buf.c xfs_trans_dirty_buf(tp, bp); bp 580 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 582 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 585 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 596 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_flags & XBF_STALE); bp 606 fs/xfs/xfs_trans_buf.c xfs_buf_stale(bp); bp 635 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 637 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 639 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 644 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); bp 659 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 661 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 663 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 669 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); bp 684 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp) bp 686 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 688 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 693 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); bp 706 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp) bp 708 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 710 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 724 fs/xfs/xfs_trans_buf.c xfs_trans_dirty_buf(tp, bp); bp 735 fs/xfs/xfs_trans_buf.c struct xfs_buf *bp, bp 738 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 743 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); bp 777 fs/xfs/xfs_trans_buf.c xfs_buf_t *bp, bp 780 fs/xfs/xfs_trans_buf.c struct xfs_buf_log_item *bip = bp->b_log_item; bp 803 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, type); bp 157 fs/xfs/xfs_trans_priv.h struct xfs_buf *bp = lip->li_buf; bp 164 fs/xfs/xfs_trans_priv.h xfs_buf_rele(bp); bp 171 fs/xfs/xfs_trans_priv.h struct xfs_buf *bp) bp 176 fs/xfs/xfs_trans_priv.h xfs_buf_hold(bp); bp 177 fs/xfs/xfs_trans_priv.h lip->li_buf = bp; bp 56 include/linux/dm-bufio.h struct dm_buffer **bp); bp 63 include/linux/dm-bufio.h struct dm_buffer **bp); bp 70 include/linux/dm-bufio.h struct dm_buffer **bp); bp 117 include/linux/hdlcdrv.h unsigned char *bp; bp 140 include/linux/hdlcdrv.h unsigned char *bp; bp 32 include/linux/hw_breakpoint.h static inline unsigned long hw_breakpoint_addr(struct perf_event *bp) bp 34 include/linux/hw_breakpoint.h return bp->attr.bp_addr; bp 37 include/linux/hw_breakpoint.h static inline int hw_breakpoint_type(struct perf_event *bp) bp 39 include/linux/hw_breakpoint.h return bp->attr.bp_type; bp 42 include/linux/hw_breakpoint.h static inline unsigned long hw_breakpoint_len(struct perf_event *bp) bp 44 include/linux/hw_breakpoint.h return bp->attr.bp_len; bp 55 include/linux/hw_breakpoint.h modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr); bp 57 include/linux/hw_breakpoint.h modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *attr, bp 74 include/linux/hw_breakpoint.h extern int register_perf_hw_breakpoint(struct perf_event *bp); bp 75 include/linux/hw_breakpoint.h extern int __register_perf_hw_breakpoint(struct perf_event *bp); bp 76 include/linux/hw_breakpoint.h extern void unregister_hw_breakpoint(struct perf_event *bp); bp 79 include/linux/hw_breakpoint.h extern int dbg_reserve_bp_slot(struct perf_event *bp); bp 80 include/linux/hw_breakpoint.h extern int dbg_release_bp_slot(struct perf_event *bp); bp 81 include/linux/hw_breakpoint.h extern int reserve_bp_slot(struct perf_event *bp); bp 82 include/linux/hw_breakpoint.h extern void release_bp_slot(struct perf_event *bp); bp 86 include/linux/hw_breakpoint.h static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) bp 88 include/linux/hw_breakpoint.h return &bp->hw.info; bp 101 include/linux/hw_breakpoint.h modify_user_hw_breakpoint(struct perf_event *bp, bp 104 include/linux/hw_breakpoint.h modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *attr, bp 117 include/linux/hw_breakpoint.h register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } bp 119 include/linux/hw_breakpoint.h __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } bp 120 include/linux/hw_breakpoint.h static inline void unregister_hw_breakpoint(struct perf_event *bp) { } bp 124 include/linux/hw_breakpoint.h reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } bp 125 include/linux/hw_breakpoint.h static inline void release_bp_slot(struct perf_event *bp) { } bp 129 include/linux/hw_breakpoint.h static inline struct arch_hw_breakpoint *counter_arch_bp(struct perf_event *bp) bp 119 include/net/sctp/command.h struct sctp_bind_addr *bp; bp 160 include/net/sctp/command.h SCTP_ARG_CONSTRUCTOR(BA, struct sctp_bind_addr *, bp) bp 1181 include/net/sctp/structs.h int sctp_bind_addr_state(const struct sctp_bind_addr *bp, bp 1185 include/net/sctp/structs.h union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, bp 1189 include/net/sctp/structs.h union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, bp 1192 include/net/sctp/structs.h int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, bp 67 include/scsi/scsi_common.h int scsi_set_sense_field_pointer(u8 *buf, int buf_len, u16 fp, u8 bp, bool cd); bp 40 kernel/debug/kdb/kdb_bp.c static char *kdb_bptype(kdb_bp_t *bp) bp 42 kernel/debug/kdb/kdb_bp.c if (bp->bp_type < 0 || bp->bp_type > 4) bp 45 kernel/debug/kdb/kdb_bp.c return kdb_rwtypes[bp->bp_type]; bp 48 kernel/debug/kdb/kdb_bp.c static int kdb_parsebp(int argc, const char **argv, int *nextargp, kdb_bp_t *bp) bp 53 kernel/debug/kdb/kdb_bp.c bp->bph_length = 1; bp 56 kernel/debug/kdb/kdb_bp.c bp->bp_type = BP_ACCESS_WATCHPOINT; bp 58 kernel/debug/kdb/kdb_bp.c bp->bp_type = BP_WRITE_WATCHPOINT; bp 60 kernel/debug/kdb/kdb_bp.c bp->bp_type = BP_HARDWARE_BREAKPOINT; bp 64 kernel/debug/kdb/kdb_bp.c bp->bph_length = 1; bp 80 kernel/debug/kdb/kdb_bp.c bp->bph_length = len; bp 92 kernel/debug/kdb/kdb_bp.c static int _kdb_bp_remove(kdb_bp_t *bp) bp 95 kernel/debug/kdb/kdb_bp.c if (!bp->bp_installed) bp 97 kernel/debug/kdb/kdb_bp.c if (!bp->bp_type) bp 98 kernel/debug/kdb/kdb_bp.c ret = dbg_remove_sw_break(bp->bp_addr); bp 100 kernel/debug/kdb/kdb_bp.c ret = arch_kgdb_ops.remove_hw_breakpoint(bp->bp_addr, bp 101 kernel/debug/kdb/kdb_bp.c bp->bph_length, bp 102 kernel/debug/kdb/kdb_bp.c bp->bp_type); bp 104 kernel/debug/kdb/kdb_bp.c bp->bp_installed = 0; bp 108 kernel/debug/kdb/kdb_bp.c static void kdb_handle_bp(struct pt_regs *regs, kdb_bp_t *bp) bp 121 kernel/debug/kdb/kdb_bp.c bp->bp_delay = 0; bp 122 kernel/debug/kdb/kdb_bp.c bp->bp_delayed = 1; bp 125 kernel/debug/kdb/kdb_bp.c static int _kdb_bp_install(struct pt_regs *regs, kdb_bp_t *bp) bp 134 kernel/debug/kdb/kdb_bp.c __func__, bp->bp_installed); bp 136 kernel/debug/kdb/kdb_bp.c bp->bp_delay = 0; bp 137 kernel/debug/kdb/kdb_bp.c if (bp->bp_installed) bp 139 kernel/debug/kdb/kdb_bp.c if (bp->bp_delay || (bp->bp_delayed && KDB_STATE(DOING_SS))) { bp 142 kernel/debug/kdb/kdb_bp.c kdb_handle_bp(regs, bp); bp 145 kernel/debug/kdb/kdb_bp.c if (!bp->bp_type) bp 146 kernel/debug/kdb/kdb_bp.c ret = dbg_set_sw_break(bp->bp_addr); bp 148 kernel/debug/kdb/kdb_bp.c ret = arch_kgdb_ops.set_hw_breakpoint(bp->bp_addr, bp 149 kernel/debug/kdb/kdb_bp.c bp->bph_length, bp 150 kernel/debug/kdb/kdb_bp.c bp->bp_type); bp 152 kernel/debug/kdb/kdb_bp.c bp->bp_installed = 1; bp 155 kernel/debug/kdb/kdb_bp.c __func__, bp->bp_addr); bp 156 kernel/debug/kdb/kdb_bp.c if (!bp->bp_type) { bp 179 kernel/debug/kdb/kdb_bp.c kdb_bp_t *bp = &kdb_breakpoints[i]; bp 183 kernel/debug/kdb/kdb_bp.c __func__, i, bp->bp_enabled); bp 185 kernel/debug/kdb/kdb_bp.c if (bp->bp_enabled) bp 186 kernel/debug/kdb/kdb_bp.c _kdb_bp_install(regs, bp); bp 210 kernel/debug/kdb/kdb_bp.c kdb_bp_t *bp = &kdb_breakpoints[i]; bp 214 kernel/debug/kdb/kdb_bp.c __func__, i, bp->bp_enabled); bp 216 kernel/debug/kdb/kdb_bp.c if (bp->bp_enabled) bp 217 kernel/debug/kdb/kdb_bp.c _kdb_bp_remove(bp); bp 238 kernel/debug/kdb/kdb_bp.c static void kdb_printbp(kdb_bp_t *bp, int i) bp 240 kernel/debug/kdb/kdb_bp.c kdb_printf("%s ", kdb_bptype(bp)); bp 242 kernel/debug/kdb/kdb_bp.c kdb_symbol_print(bp->bp_addr, NULL, KDB_SP_DEFAULT); bp 244 kernel/debug/kdb/kdb_bp.c if (bp->bp_enabled) bp 250 kernel/debug/kdb/kdb_bp.c bp->bp_addr, bp->bp_type, bp->bp_installed); bp 280 kernel/debug/kdb/kdb_bp.c kdb_bp_t *bp, *bp_check; bp 291 kernel/debug/kdb/kdb_bp.c for (bpno = 0, bp = kdb_breakpoints; bpno < KDB_MAXBPT; bp 292 kernel/debug/kdb/kdb_bp.c bpno++, bp++) { bp 293 kernel/debug/kdb/kdb_bp.c if (bp->bp_free) bp 295 kernel/debug/kdb/kdb_bp.c kdb_printbp(bp, bpno); bp 312 kernel/debug/kdb/kdb_bp.c for (bpno = 0, bp = kdb_breakpoints; bpno < KDB_MAXBPT; bpno++, bp++) { bp 313 kernel/debug/kdb/kdb_bp.c if (bp->bp_free) bp 350 kernel/debug/kdb/kdb_bp.c *bp = template; bp 351 kernel/debug/kdb/kdb_bp.c bp->bp_free = 0; bp 353 kernel/debug/kdb/kdb_bp.c kdb_printbp(bp, bpno); bp 380 kernel/debug/kdb/kdb_bp.c kdb_bp_t *bp = NULL; bp 415 kernel/debug/kdb/kdb_bp.c bp = &kdb_breakpoints[addr]; bp 419 kernel/debug/kdb/kdb_bp.c for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; bp 420 kernel/debug/kdb/kdb_bp.c i++, bp++) { bp 421 kernel/debug/kdb/kdb_bp.c if (bp->bp_addr == addr) { bp 434 kernel/debug/kdb/kdb_bp.c for (bp = &kdb_breakpoints[lowbp], i = lowbp; bp 436 kernel/debug/kdb/kdb_bp.c i++, bp++) { bp 437 kernel/debug/kdb/kdb_bp.c if (bp->bp_free) bp 444 kernel/debug/kdb/kdb_bp.c bp->bp_enabled = 0; bp 448 kernel/debug/kdb/kdb_bp.c i, bp->bp_addr); bp 450 kernel/debug/kdb/kdb_bp.c bp->bp_addr = 0; bp 451 kernel/debug/kdb/kdb_bp.c bp->bp_free = 1; bp 455 kernel/debug/kdb/kdb_bp.c bp->bp_enabled = 1; bp 459 kernel/debug/kdb/kdb_bp.c i, bp->bp_addr); bp 464 kernel/debug/kdb/kdb_bp.c if (!bp->bp_enabled) bp 467 kernel/debug/kdb/kdb_bp.c bp->bp_enabled = 0; bp 471 kernel/debug/kdb/kdb_bp.c i, bp->bp_addr); bp 475 kernel/debug/kdb/kdb_bp.c if (bp->bp_delay && (cmd == KDBCMD_BC || cmd == KDBCMD_BD)) { bp 476 kernel/debug/kdb/kdb_bp.c bp->bp_delay = 0; bp 522 kernel/debug/kdb/kdb_bp.c kdb_bp_t *bp; bp 529 kernel/debug/kdb/kdb_bp.c for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) bp 530 kernel/debug/kdb/kdb_bp.c bp->bp_free = 1; bp 56 kernel/debug/kdb/kdb_debugger.c kdb_bp_t *bp; bp 78 kernel/debug/kdb/kdb_debugger.c for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) { bp 79 kernel/debug/kdb/kdb_debugger.c if ((bp->bp_enabled) && (bp->bp_addr == addr)) { bp 88 kernel/debug/kdb/kdb_debugger.c for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) { bp 89 kernel/debug/kdb/kdb_debugger.c if (bp->bp_free) bp 91 kernel/debug/kdb/kdb_debugger.c if (bp->bp_addr == addr) { bp 92 kernel/debug/kdb/kdb_debugger.c bp->bp_delay = 1; bp 93 kernel/debug/kdb/kdb_debugger.c bp->bp_delayed = 1; bp 2970 kernel/events/core.c static int perf_event_modify_breakpoint(struct perf_event *bp, bp 2975 kernel/events/core.c _perf_event_disable(bp); bp 2977 kernel/events/core.c err = modify_user_hw_breakpoint_check(bp, attr, true); bp 2979 kernel/events/core.c if (!bp->attr.disabled) bp 2980 kernel/events/core.c _perf_event_enable(bp); bp 9140 kernel/events/core.c void perf_bp_event(struct perf_event *bp, void *data) bp 9145 kernel/events/core.c perf_sample_data_init(&sample, bp->attr.bp_addr, 0); bp 9147 kernel/events/core.c if (!bp->hw.state && !perf_exclude_event(bp, regs)) bp 9148 kernel/events/core.c perf_swevent_event(bp, 1, &sample, regs); bp 71 kernel/events/hw_breakpoint.c __weak int hw_breakpoint_weight(struct perf_event *bp) bp 105 kernel/events/hw_breakpoint.c static int task_bp_pinned(int cpu, struct perf_event *bp, enum bp_type_idx type) bp 107 kernel/events/hw_breakpoint.c struct task_struct *tsk = bp->hw.target; bp 121 kernel/events/hw_breakpoint.c static const struct cpumask *cpumask_of_bp(struct perf_event *bp) bp 123 kernel/events/hw_breakpoint.c if (bp->cpu >= 0) bp 124 kernel/events/hw_breakpoint.c return cpumask_of(bp->cpu); bp 133 kernel/events/hw_breakpoint.c fetch_bp_busy_slots(struct bp_busy_slots *slots, struct perf_event *bp, bp 136 kernel/events/hw_breakpoint.c const struct cpumask *cpumask = cpumask_of_bp(bp); bp 144 kernel/events/hw_breakpoint.c if (!bp->hw.target) bp 147 kernel/events/hw_breakpoint.c nr += task_bp_pinned(cpu, bp, type); bp 172 kernel/events/hw_breakpoint.c static void toggle_bp_task_slot(struct perf_event *bp, int cpu, bp 178 kernel/events/hw_breakpoint.c old_idx = task_bp_pinned(cpu, bp, type) - 1; bp 191 kernel/events/hw_breakpoint.c toggle_bp_slot(struct perf_event *bp, bool enable, enum bp_type_idx type, bp 194 kernel/events/hw_breakpoint.c const struct cpumask *cpumask = cpumask_of_bp(bp); bp 201 kernel/events/hw_breakpoint.c if (!bp->hw.target) { bp 202 kernel/events/hw_breakpoint.c get_bp_info(bp->cpu, type)->cpu_pinned += weight; bp 208 kernel/events/hw_breakpoint.c toggle_bp_task_slot(bp, cpu, type, weight); bp 211 kernel/events/hw_breakpoint.c list_add_tail(&bp->hw.bp_list, &bp_task_head); bp 213 kernel/events/hw_breakpoint.c list_del(&bp->hw.bp_list); bp 219 kernel/events/hw_breakpoint.c __weak void arch_unregister_hw_breakpoint(struct perf_event *bp) bp 268 kernel/events/hw_breakpoint.c static int __reserve_bp_slot(struct perf_event *bp, u64 bp_type) bp 284 kernel/events/hw_breakpoint.c weight = hw_breakpoint_weight(bp); bp 286 kernel/events/hw_breakpoint.c fetch_bp_busy_slots(&slots, bp, type); bp 297 kernel/events/hw_breakpoint.c toggle_bp_slot(bp, true, type, weight); bp 302 kernel/events/hw_breakpoint.c int reserve_bp_slot(struct perf_event *bp) bp 308 kernel/events/hw_breakpoint.c ret = __reserve_bp_slot(bp, bp->attr.bp_type); bp 315 kernel/events/hw_breakpoint.c static void __release_bp_slot(struct perf_event *bp, u64 bp_type) bp 321 kernel/events/hw_breakpoint.c weight = hw_breakpoint_weight(bp); bp 322 kernel/events/hw_breakpoint.c toggle_bp_slot(bp, false, type, weight); bp 325 kernel/events/hw_breakpoint.c void release_bp_slot(struct perf_event *bp) bp 329 kernel/events/hw_breakpoint.c arch_unregister_hw_breakpoint(bp); bp 330 kernel/events/hw_breakpoint.c __release_bp_slot(bp, bp->attr.bp_type); bp 335 kernel/events/hw_breakpoint.c static int __modify_bp_slot(struct perf_event *bp, u64 old_type, u64 new_type) bp 339 kernel/events/hw_breakpoint.c __release_bp_slot(bp, old_type); bp 341 kernel/events/hw_breakpoint.c err = __reserve_bp_slot(bp, new_type); bp 351 kernel/events/hw_breakpoint.c WARN_ON(__reserve_bp_slot(bp, old_type)); bp 357 kernel/events/hw_breakpoint.c static int modify_bp_slot(struct perf_event *bp, u64 old_type, u64 new_type) bp 362 kernel/events/hw_breakpoint.c ret = __modify_bp_slot(bp, old_type, new_type); bp 372 kernel/events/hw_breakpoint.c int dbg_reserve_bp_slot(struct perf_event *bp) bp 377 kernel/events/hw_breakpoint.c return __reserve_bp_slot(bp, bp->attr.bp_type); bp 380 kernel/events/hw_breakpoint.c int dbg_release_bp_slot(struct perf_event *bp) bp 385 kernel/events/hw_breakpoint.c __release_bp_slot(bp, bp->attr.bp_type); bp 390 kernel/events/hw_breakpoint.c static int hw_breakpoint_parse(struct perf_event *bp, bp 396 kernel/events/hw_breakpoint.c err = hw_breakpoint_arch_parse(bp, attr, hw); bp 414 kernel/events/hw_breakpoint.c int register_perf_hw_breakpoint(struct perf_event *bp) bp 419 kernel/events/hw_breakpoint.c err = reserve_bp_slot(bp); bp 423 kernel/events/hw_breakpoint.c err = hw_breakpoint_parse(bp, &bp->attr, &hw); bp 425 kernel/events/hw_breakpoint.c release_bp_slot(bp); bp 429 kernel/events/hw_breakpoint.c bp->hw.info = hw; bp 461 kernel/events/hw_breakpoint.c modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *attr, bp 467 kernel/events/hw_breakpoint.c err = hw_breakpoint_parse(bp, attr, &hw); bp 474 kernel/events/hw_breakpoint.c old_attr = bp->attr; bp 480 kernel/events/hw_breakpoint.c if (bp->attr.bp_type != attr->bp_type) { bp 481 kernel/events/hw_breakpoint.c err = modify_bp_slot(bp, bp->attr.bp_type, attr->bp_type); bp 486 kernel/events/hw_breakpoint.c hw_breakpoint_copy_attr(&bp->attr, attr); bp 487 kernel/events/hw_breakpoint.c bp->hw.info = hw; bp 497 kernel/events/hw_breakpoint.c int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) bp 507 kernel/events/hw_breakpoint.c if (irqs_disabled() && bp->ctx && bp->ctx->task == current) bp 508 kernel/events/hw_breakpoint.c perf_event_disable_local(bp); bp 510 kernel/events/hw_breakpoint.c perf_event_disable(bp); bp 512 kernel/events/hw_breakpoint.c err = modify_user_hw_breakpoint_check(bp, attr, false); bp 514 kernel/events/hw_breakpoint.c if (!bp->attr.disabled) bp 515 kernel/events/hw_breakpoint.c perf_event_enable(bp); bp 525 kernel/events/hw_breakpoint.c void unregister_hw_breakpoint(struct perf_event *bp) bp 527 kernel/events/hw_breakpoint.c if (!bp) bp 529 kernel/events/hw_breakpoint.c perf_event_release_kernel(bp); bp 545 kernel/events/hw_breakpoint.c struct perf_event * __percpu *cpu_events, *bp; bp 555 kernel/events/hw_breakpoint.c bp = perf_event_create_kernel_counter(attr, cpu, NULL, bp 557 kernel/events/hw_breakpoint.c if (IS_ERR(bp)) { bp 558 kernel/events/hw_breakpoint.c err = PTR_ERR(bp); bp 562 kernel/events/hw_breakpoint.c per_cpu(*cpu_events, cpu) = bp; bp 600 kernel/events/hw_breakpoint.c static int hw_breakpoint_event_init(struct perf_event *bp) bp 604 kernel/events/hw_breakpoint.c if (bp->attr.type != PERF_TYPE_BREAKPOINT) bp 610 kernel/events/hw_breakpoint.c if (has_branch_stack(bp)) bp 613 kernel/events/hw_breakpoint.c err = register_perf_hw_breakpoint(bp); bp 617 kernel/events/hw_breakpoint.c bp->destroy = bp_perf_event_destroy; bp 622 kernel/events/hw_breakpoint.c static int hw_breakpoint_add(struct perf_event *bp, int flags) bp 625 kernel/events/hw_breakpoint.c bp->hw.state = PERF_HES_STOPPED; bp 627 kernel/events/hw_breakpoint.c if (is_sampling_event(bp)) { bp 628 kernel/events/hw_breakpoint.c bp->hw.last_period = bp->hw.sample_period; bp 629 kernel/events/hw_breakpoint.c perf_swevent_set_period(bp); bp 632 kernel/events/hw_breakpoint.c return arch_install_hw_breakpoint(bp); bp 635 kernel/events/hw_breakpoint.c static void hw_breakpoint_del(struct perf_event *bp, int flags) bp 637 kernel/events/hw_breakpoint.c arch_uninstall_hw_breakpoint(bp); bp 640 kernel/events/hw_breakpoint.c static void hw_breakpoint_start(struct perf_event *bp, int flags) bp 642 kernel/events/hw_breakpoint.c bp->hw.state = 0; bp 645 kernel/events/hw_breakpoint.c static void hw_breakpoint_stop(struct perf_event *bp, int flags) bp 647 kernel/events/hw_breakpoint.c bp->hw.state = PERF_HES_STOPPED; bp 30 lib/mpi/mpi-pow.c mpi_ptr_t rp, ep, mp, bp; bp 84 lib/mpi/mpi-pow.c bp = bp_marker = mpi_alloc_limb_space(bsize + 1); bp 85 lib/mpi/mpi-pow.c if (!bp) bp 87 lib/mpi/mpi-pow.c MPN_COPY(bp, base->d, bsize); bp 90 lib/mpi/mpi-pow.c mpihelp_divrem(bp + msize, 0, bp, bsize, mp, msize); bp 94 lib/mpi/mpi-pow.c MPN_NORMALIZE(bp, bsize); bp 96 lib/mpi/mpi-pow.c bp = base->d; bp 108 lib/mpi/mpi-pow.c if (rp == ep || rp == mp || rp == bp) { bp 119 lib/mpi/mpi-pow.c if (rp == bp) { bp 122 lib/mpi/mpi-pow.c bp = bp_marker = mpi_alloc_limb_space(bsize); bp 123 lib/mpi/mpi-pow.c if (!bp) bp 125 lib/mpi/mpi-pow.c MPN_COPY(bp, rp, bsize); bp 144 lib/mpi/mpi-pow.c MPN_COPY(rp, bp, bsize); bp 220 lib/mpi/mpi-pow.c (xp, rp, rsize, bp, bsize, bp 225 lib/mpi/mpi-pow.c (xp, rp, rsize, bp, bsize, bp 1781 lib/zstd/decompress.c blockProperties_t bp; bp 1782 lib/zstd/decompress.c size_t const cBlockSize = ZSTD_getcBlockSize(src, ZSTD_blockHeaderSize, &bp); bp 1786 lib/zstd/decompress.c dctx->bType = bp.blockType; bp 1787 lib/zstd/decompress.c dctx->rleSize = bp.origSize; bp 1789 lib/zstd/decompress.c dctx->stage = bp.lastBlock ? ZSTDds_decompressLastBlock : ZSTDds_decompressBlock; bp 1793 lib/zstd/decompress.c if (bp.lastBlock) { bp 102 net/ax25/ax25_ip.c unsigned char *bp = skb->data; bp 111 net/ax25/ax25_ip.c dst = (ax25_address *)(bp + 1); bp 112 net/ax25/ax25_ip.c src = (ax25_address *)(bp + 8); bp 130 net/ax25/ax25_ip.c if (bp[16] == AX25_P_IP) { bp 166 net/ax25/ax25_ip.c bp = ourskb->data; bp 167 net/ax25/ax25_ip.c dst_c = *(ax25_address *)(bp + 1); bp 168 net/ax25/ax25_ip.c src_c = *(ax25_address *)(bp + 8); bp 185 net/ax25/ax25_ip.c bp[7] &= ~AX25_CBIT; bp 186 net/ax25/ax25_ip.c bp[7] &= ~AX25_EBIT; bp 187 net/ax25/ax25_ip.c bp[7] |= AX25_SSSID_SPARE; bp 189 net/ax25/ax25_ip.c bp[14] &= ~AX25_CBIT; bp 190 net/ax25/ax25_ip.c bp[14] |= AX25_EBIT; bp 191 net/ax25/ax25_ip.c bp[14] |= AX25_SSSID_SPARE; bp 445 net/ax25/ax25_route.c unsigned char *bp; bp 464 net/ax25/ax25_route.c bp = skb_push(skb, len); bp 466 net/ax25/ax25_route.c ax25_addr_build(bp, src, dest, digi, AX25_COMMAND, AX25_MODULUS); bp 84 net/bridge/netfilter/ebt_among.c const __be32 *bp; bp 92 net/bridge/netfilter/ebt_among.c bp = skb_header_pointer(skb, sizeof(struct arphdr) + bp 95 net/bridge/netfilter/ebt_among.c if (bp == NULL) bp 97 net/bridge/netfilter/ebt_among.c *addr = *bp; bp 115 net/bridge/netfilter/ebt_among.c const __be32 *bp; bp 123 net/bridge/netfilter/ebt_among.c bp = skb_header_pointer(skb, sizeof(struct arphdr) + bp 125 net/bridge/netfilter/ebt_among.c if (bp == NULL) bp 127 net/bridge/netfilter/ebt_among.c *addr = *bp; bp 57 net/ipv4/inetpeer.c void inet_peer_base_init(struct inet_peer_base *bp) bp 59 net/ipv4/inetpeer.c bp->rb_root = RB_ROOT; bp 60 net/ipv4/inetpeer.c seqlock_init(&bp->lock); bp 61 net/ipv4/inetpeer.c bp->total = 0; bp 3425 net/ipv4/route.c struct inet_peer_base *bp = kmalloc(sizeof(*bp), GFP_KERNEL); bp 3427 net/ipv4/route.c if (!bp) bp 3429 net/ipv4/route.c inet_peer_base_init(bp); bp 3430 net/ipv4/route.c net->ipv4.peers = bp; bp 3436 net/ipv4/route.c struct inet_peer_base *bp = net->ipv4.peers; bp 3439 net/ipv4/route.c inetpeer_invalidate_tree(bp); bp 3440 net/ipv4/route.c kfree(bp); bp 1188 net/ipv4/tcp_ipv4.c struct tcp4_pseudohdr *bp; bp 1192 net/ipv4/tcp_ipv4.c bp = hp->scratch; bp 1193 net/ipv4/tcp_ipv4.c bp->saddr = saddr; bp 1194 net/ipv4/tcp_ipv4.c bp->daddr = daddr; bp 1195 net/ipv4/tcp_ipv4.c bp->pad = 0; bp 1196 net/ipv4/tcp_ipv4.c bp->protocol = IPPROTO_TCP; bp 1197 net/ipv4/tcp_ipv4.c bp->len = cpu_to_be16(nbytes); bp 1199 net/ipv4/tcp_ipv4.c _th = (struct tcphdr *)(bp + 1); bp 1203 net/ipv4/tcp_ipv4.c sg_init_one(&sg, bp, sizeof(*bp) + sizeof(*th)); bp 1205 net/ipv4/tcp_ipv4.c sizeof(*bp) + sizeof(*th)); bp 6310 net/ipv6/route.c struct inet_peer_base *bp = kmalloc(sizeof(*bp), GFP_KERNEL); bp 6312 net/ipv6/route.c if (!bp) bp 6314 net/ipv6/route.c inet_peer_base_init(bp); bp 6315 net/ipv6/route.c net->ipv6.peers = bp; bp 6321 net/ipv6/route.c struct inet_peer_base *bp = net->ipv6.peers; bp 6324 net/ipv6/route.c inetpeer_invalidate_tree(bp); bp 6325 net/ipv6/route.c kfree(bp); bp 598 net/ipv6/tcp_ipv6.c struct tcp6_pseudohdr *bp; bp 602 net/ipv6/tcp_ipv6.c bp = hp->scratch; bp 604 net/ipv6/tcp_ipv6.c bp->saddr = *saddr; bp 605 net/ipv6/tcp_ipv6.c bp->daddr = *daddr; bp 606 net/ipv6/tcp_ipv6.c bp->protocol = cpu_to_be32(IPPROTO_TCP); bp 607 net/ipv6/tcp_ipv6.c bp->len = cpu_to_be32(nbytes); bp 609 net/ipv6/tcp_ipv6.c _th = (struct tcphdr *)(bp + 1); bp 613 net/ipv6/tcp_ipv6.c sg_init_one(&sg, bp, sizeof(*bp) + sizeof(*th)); bp 615 net/ipv6/tcp_ipv6.c sizeof(*bp) + sizeof(*th)); bp 111 net/sctp/bind_addr.c void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port) bp 113 net/sctp/bind_addr.c INIT_LIST_HEAD(&bp->address_list); bp 114 net/sctp/bind_addr.c bp->port = port; bp 118 net/sctp/bind_addr.c static void sctp_bind_addr_clean(struct sctp_bind_addr *bp) bp 123 net/sctp/bind_addr.c list_for_each_entry_safe(addr, temp, &bp->address_list, list) { bp 131 net/sctp/bind_addr.c void sctp_bind_addr_free(struct sctp_bind_addr *bp) bp 134 net/sctp/bind_addr.c sctp_bind_addr_clean(bp); bp 138 net/sctp/bind_addr.c int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, bp 154 net/sctp/bind_addr.c addr->a.v4.sin_port = htons(bp->port); bp 164 net/sctp/bind_addr.c list_add_tail_rcu(&addr->list, &bp->address_list); bp 173 net/sctp/bind_addr.c int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) bp 181 net/sctp/bind_addr.c list_for_each_entry_safe(addr, temp, &bp->address_list, list) { bp 205 net/sctp/bind_addr.c union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, bp 222 net/sctp/bind_addr.c list_for_each(pos, &bp->address_list) { bp 240 net/sctp/bind_addr.c list_for_each_entry(addr, &bp->address_list, list) { bp 257 net/sctp/bind_addr.c int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw_addr_list, bp 275 net/sctp/bind_addr.c sctp_bind_addr_clean(bp); bp 280 net/sctp/bind_addr.c if (sctp_bind_addr_state(bp, &addr) != -1) bp 282 net/sctp/bind_addr.c retval = sctp_add_bind_addr(bp, &addr, sizeof(addr), bp 286 net/sctp/bind_addr.c sctp_bind_addr_clean(bp); bp 304 net/sctp/bind_addr.c int sctp_bind_addr_match(struct sctp_bind_addr *bp, bp 312 net/sctp/bind_addr.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 329 net/sctp/bind_addr.c struct sctp_bind_addr *bp = &sp->ep->base.bind_addr; bp 335 net/sctp/bind_addr.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 356 net/sctp/bind_addr.c int sctp_bind_addr_conflict(struct sctp_bind_addr *bp, bp 377 net/sctp/bind_addr.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 391 net/sctp/bind_addr.c int sctp_bind_addr_state(const struct sctp_bind_addr *bp, bp 401 net/sctp/bind_addr.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 414 net/sctp/bind_addr.c union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, bp 429 net/sctp/bind_addr.c list_for_each_entry(laddr, &bp->address_list, list) { bp 538 net/sctp/bind_addr.c struct sctp_bind_addr *bp; bp 541 net/sctp/bind_addr.c bp = &sctp_sk(sk)->ep->base.bind_addr; bp 542 net/sctp/bind_addr.c if (sctp_list_single_entry(&bp->address_list)) { bp 543 net/sctp/bind_addr.c addr = list_entry(bp->address_list.next, bp 295 net/sctp/endpointola.c struct sctp_bind_addr *bp; bp 298 net/sctp/endpointola.c bp = &ep->base.bind_addr; bp 302 net/sctp/endpointola.c list_for_each_entry(addr, &bp->address_list, list) { bp 233 net/sctp/ipv6.c struct sctp_bind_addr *bp; bp 286 net/sctp/ipv6.c bp = &asoc->base.bind_addr; bp 295 net/sctp/ipv6.c sctp_v6_to_addr(&dst_saddr, &fl6->saddr, htons(bp->port)); bp 297 net/sctp/ipv6.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 324 net/sctp/ipv6.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 132 net/sctp/protocol.c int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp, bp 160 net/sctp/protocol.c laddr.v4.sin_port = htons(bp->port); bp 161 net/sctp/protocol.c if (sctp_bind_addr_state(bp, &laddr) != -1) bp 164 net/sctp/protocol.c error = sctp_add_bind_addr(bp, &addr->a, sizeof(addr->a), bp 414 net/sctp/protocol.c struct sctp_bind_addr *bp; bp 454 net/sctp/protocol.c bp = &asoc->base.bind_addr; bp 460 net/sctp/protocol.c sctp_v4_dst_saddr(&dst_saddr, fl4, htons(bp->port)); bp 462 net/sctp/protocol.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 483 net/sctp/protocol.c list_for_each_entry_rcu(laddr, &bp->address_list, list) { bp 207 net/sctp/sm_make_chunk.c const struct sctp_bind_addr *bp, bp 233 net/sctp/sm_make_chunk.c addrs = sctp_bind_addrs_to_raw(bp, &addrs_len, gfp); bp 3314 net/sctp/sm_make_chunk.c struct sctp_bind_addr *bp = &asoc->base.bind_addr; bp 3325 net/sctp/sm_make_chunk.c af->from_addr_param(&addr, addr_param, htons(bp->port), 0); bp 3333 net/sctp/sm_make_chunk.c list_for_each_entry(saddr, &bp->address_list, list) { bp 3345 net/sctp/sm_make_chunk.c sctp_del_bind_addr(bp, &addr); bp 2438 net/sctp/sm_statefuns.c struct sctp_bind_addr *bp; bp 2474 net/sctp/sm_statefuns.c bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; bp 2475 net/sctp/sm_statefuns.c reply = sctp_make_init(asoc, bp, GFP_ATOMIC, sizeof(bht)); bp 5760 net/sctp/sm_statefuns.c struct sctp_bind_addr *bp; bp 5767 net/sctp/sm_statefuns.c bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; bp 5768 net/sctp/sm_statefuns.c repl = sctp_make_init(asoc, bp, GFP_ATOMIC, 0); bp 366 net/sctp/socket.c struct sctp_bind_addr *bp = &ep->base.bind_addr; bp 382 net/sctp/socket.c __func__, sk, &addr->sa, bp->port, snum, len); bp 392 net/sctp/socket.c if (bp->port) { bp 394 net/sctp/socket.c snum = bp->port; bp 395 net/sctp/socket.c else if (snum != bp->port) { bp 397 net/sctp/socket.c "%d\n", __func__, snum, bp->port); bp 409 net/sctp/socket.c if (sctp_bind_addr_match(bp, addr, sp)) bp 421 net/sctp/socket.c if (!bp->port) bp 422 net/sctp/socket.c bp->port = inet_sk(sk)->inet_num; bp 427 net/sctp/socket.c ret = sctp_add_bind_addr(bp, addr, af->sockaddr_len, bp 546 net/sctp/socket.c struct sctp_bind_addr *bp; bp 601 net/sctp/socket.c bp = &asoc->base.bind_addr; bp 602 net/sctp/socket.c p = bp->address_list.next; bp 619 net/sctp/socket.c retval = sctp_add_bind_addr(bp, &saveaddr, bp 667 net/sctp/socket.c struct sctp_bind_addr *bp = &ep->base.bind_addr; bp 682 net/sctp/socket.c if (list_empty(&bp->address_list) || bp 683 net/sctp/socket.c (sctp_list_single_entry(&bp->address_list))) { bp 701 net/sctp/socket.c sa_addr->v4.sin_port != htons(bp->port)) { bp 707 net/sctp/socket.c sa_addr->v4.sin_port = htons(bp->port); bp 716 net/sctp/socket.c retval = sctp_del_bind_addr(bp, sa_addr); bp 749 net/sctp/socket.c struct sctp_bind_addr *bp; bp 807 net/sctp/socket.c bp = &asoc->base.bind_addr; bp 808 net/sctp/socket.c laddr = sctp_find_unmatch_addr(bp, (union sctp_addr *)addrs, bp 822 net/sctp/socket.c htons(bp->port); bp 866 net/sctp/socket.c list_for_each_entry(saddr, &bp->address_list, list) { bp 6261 net/sctp/socket.c struct sctp_bind_addr *bp; bp 6289 net/sctp/socket.c bp = &sctp_sk(sk)->ep->base.bind_addr; bp 6294 net/sctp/socket.c bp = &asoc->base.bind_addr; bp 6307 net/sctp/socket.c if (sctp_list_single_entry(&bp->address_list)) { bp 6308 net/sctp/socket.c addr = list_entry(bp->address_list.next, bp 6311 net/sctp/socket.c cnt = sctp_copy_laddrs(sk, bp->port, addrs, bp 6326 net/sctp/socket.c list_for_each_entry(addr, &bp->address_list, list) { bp 787 net/sunrpc/cache.c char *bp = crq->buf; bp 790 net/sunrpc/cache.c detail->cache_request(detail, crq->item, &bp, &len); bp 1113 net/sunrpc/cache.c char *bp = *bpp; bp 1119 net/sunrpc/cache.c ret = string_escape_str(str, bp, len, ESCAPE_OCTAL, "\\ \n\t"); bp 1121 net/sunrpc/cache.c bp += len; bp 1124 net/sunrpc/cache.c bp += ret; bp 1126 net/sunrpc/cache.c *bp++ = ' '; bp 1129 net/sunrpc/cache.c *bpp = bp; bp 1136 net/sunrpc/cache.c char *bp = *bpp; bp 1142 net/sunrpc/cache.c *bp++ = '\\'; bp 1143 net/sunrpc/cache.c *bp++ = 'x'; bp 1146 net/sunrpc/cache.c bp = hex_byte_pack(bp, *buf++); bp 1153 net/sunrpc/cache.c *bp++ = ' '; bp 1156 net/sunrpc/cache.c *bpp = bp; bp 1257 net/sunrpc/cache.c char *bp = *bpp; bp 1260 net/sunrpc/cache.c while (*bp == ' ') bp++; bp 1262 net/sunrpc/cache.c if (bp[0] == '\\' && bp[1] == 'x') { bp 1264 net/sunrpc/cache.c bp += 2; bp 1268 net/sunrpc/cache.c h = hex_to_bin(bp[0]); bp 1272 net/sunrpc/cache.c l = hex_to_bin(bp[1]); bp 1277 net/sunrpc/cache.c bp += 2; bp 1282 net/sunrpc/cache.c while (*bp != ' ' && *bp != '\n' && *bp && len < bufsize-1) { bp 1283 net/sunrpc/cache.c if (*bp == '\\' && bp 1284 net/sunrpc/cache.c isodigit(bp[1]) && (bp[1] <= '3') && bp 1285 net/sunrpc/cache.c isodigit(bp[2]) && bp 1286 net/sunrpc/cache.c isodigit(bp[3])) { bp 1287 net/sunrpc/cache.c int byte = (*++bp -'0'); bp 1288 net/sunrpc/cache.c bp++; bp 1289 net/sunrpc/cache.c byte = (byte << 3) | (*bp++ - '0'); bp 1290 net/sunrpc/cache.c byte = (byte << 3) | (*bp++ - '0'); bp 1294 net/sunrpc/cache.c *dest++ = *bp++; bp 1300 net/sunrpc/cache.c if (*bp != ' ' && *bp != '\n' && *bp != '\0') bp 1302 net/sunrpc/cache.c while (*bp == ' ') bp++; bp 1303 net/sunrpc/cache.c *bpp = bp; bp 31 samples/hw_breakpoint/data_breakpoint.c static void sample_hbp_handler(struct perf_event *bp, bp 129 scripts/dtc/libfdt/libfdt.h const uint8_t *bp = (const uint8_t *)p; bp 131 scripts/dtc/libfdt/libfdt.h return ((uint32_t)bp[0] << 24) bp 132 scripts/dtc/libfdt/libfdt.h | ((uint32_t)bp[1] << 16) bp 133 scripts/dtc/libfdt/libfdt.h | ((uint32_t)bp[2] << 8) bp 134 scripts/dtc/libfdt/libfdt.h | bp[3]; bp 139 scripts/dtc/libfdt/libfdt.h uint8_t *bp = property; bp 141 scripts/dtc/libfdt/libfdt.h bp[0] = value >> 24; bp 142 scripts/dtc/libfdt/libfdt.h bp[1] = (value >> 16) & 0xff; bp 143 scripts/dtc/libfdt/libfdt.h bp[2] = (value >> 8) & 0xff; bp 144 scripts/dtc/libfdt/libfdt.h bp[3] = value & 0xff; bp 149 scripts/dtc/libfdt/libfdt.h const uint8_t *bp = (const uint8_t *)p; bp 151 scripts/dtc/libfdt/libfdt.h return ((uint64_t)bp[0] << 56) bp 152 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[1] << 48) bp 153 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[2] << 40) bp 154 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[3] << 32) bp 155 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[4] << 24) bp 156 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[5] << 16) bp 157 scripts/dtc/libfdt/libfdt.h | ((uint64_t)bp[6] << 8) bp 158 scripts/dtc/libfdt/libfdt.h | bp[7]; bp 163 scripts/dtc/libfdt/libfdt.h uint8_t *bp = property; bp 165 scripts/dtc/libfdt/libfdt.h bp[0] = value >> 56; bp 166 scripts/dtc/libfdt/libfdt.h bp[1] = (value >> 48) & 0xff; bp 167 scripts/dtc/libfdt/libfdt.h bp[2] = (value >> 40) & 0xff; bp 168 scripts/dtc/libfdt/libfdt.h bp[3] = (value >> 32) & 0xff; bp 169 scripts/dtc/libfdt/libfdt.h bp[4] = (value >> 24) & 0xff; bp 170 scripts/dtc/libfdt/libfdt.h bp[5] = (value >> 16) & 0xff; bp 171 scripts/dtc/libfdt/libfdt.h bp[6] = (value >> 8) & 0xff; bp 172 scripts/dtc/libfdt/libfdt.h bp[7] = value & 0xff; bp 147 sound/drivers/opl3/opl3_midi.c struct best *bp; bp 164 sound/drivers/opl3/opl3_midi.c bp = best; bp 176 sound/drivers/opl3/opl3_midi.c bp++; bp 182 sound/drivers/opl3/opl3_midi.c bp++; bp 190 sound/drivers/opl3/opl3_midi.c bp++; bp 193 sound/drivers/opl3/opl3_midi.c bp++; bp 196 sound/drivers/opl3/opl3_midi.c bp++; bp 198 sound/drivers/opl3/opl3_midi.c if (voice_time < bp->time) { bp 199 sound/drivers/opl3/opl3_midi.c bp->time = voice_time; bp 200 sound/drivers/opl3/opl3_midi.c bp->voice = i; bp 160 sound/isa/sb/emu8000_callback.c struct best *bp; bp 179 sound/isa/sb/emu8000_callback.c bp = best + OFF; bp 182 sound/isa/sb/emu8000_callback.c bp = best + RELEASED; bp 185 sound/isa/sb/emu8000_callback.c bp = best + OFF; bp 188 sound/isa/sb/emu8000_callback.c bp = best + PLAYING; bp 197 sound/isa/sb/emu8000_callback.c bp = best + OFF; bp 200 sound/isa/sb/emu8000_callback.c if (vp->time < bp->time) { bp 201 sound/isa/sb/emu8000_callback.c bp->time = vp->time; bp 202 sound/isa/sb/emu8000_callback.c bp->voice = i; bp 631 sound/pci/au88x0/au88x0_eq.c static void vortex_Eqlzr_SetBypass(vortex_t * vortex, u32 bp) bp 635 sound/pci/au88x0/au88x0_eq.c if ((eq->this28) && (bp == 0)) { bp 98 sound/pci/ctxfi/cthardware.h int (*src_set_bp)(void *blk, unsigned int bp); bp 275 sound/pci/ctxfi/cthw20k1.c static int src_set_bp(void *blk, unsigned int bp) bp 279 sound/pci/ctxfi/cthw20k1.c set_field(&ctl->ctl, SRCCTL_BP, bp); bp 275 sound/pci/ctxfi/cthw20k2.c static int src_set_bp(void *blk, unsigned int bp) bp 279 sound/pci/ctxfi/cthw20k2.c set_field(&ctl->ctl, SRCCTL_BP, bp); bp 104 sound/pci/ctxfi/ctsrc.c static int src_set_bp(struct src *src, unsigned int bp) bp 109 sound/pci/ctxfi/ctsrc.c hw->src_set_bp(src->rsc.ctrl_blk, bp); bp 61 sound/pci/ctxfi/ctsrc.h int (*set_bp)(struct src *src, unsigned int bp); bp 212 sound/pci/emu10k1/emu10k1_callback.c struct best_voice *bp; bp 233 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_FREE; bp 235 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_OFF; bp 239 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_RELEASED; bp 243 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_OFF; bp 249 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_PLAYING; bp 254 sound/pci/emu10k1/emu10k1_callback.c if (bp != best + V_OFF && bp != best + V_FREE && bp 258 sound/pci/emu10k1/emu10k1_callback.c bp = best + V_OFF; bp 261 sound/pci/emu10k1/emu10k1_callback.c if (vp->time < bp->time) { bp 262 sound/pci/emu10k1/emu10k1_callback.c bp->time = vp->time; bp 263 sound/pci/emu10k1/emu10k1_callback.c bp->voice = i; bp 34 sound/pci/hda/hda_auto_parser.c static int compare_seq(const void *ap, const void *bp) bp 37 sound/pci/hda/hda_auto_parser.c const struct auto_out_pin *b = bp; bp 68 sound/pci/hda/hda_auto_parser.c static int compare_input_type(const void *ap, const void *bp) bp 71 sound/pci/hda/hda_auto_parser.c const struct auto_pin_cfg_item *b = bp; bp 4855 sound/pci/hda/hda_generic.c static int compare_attr(const void *ap, const void *bp) bp 4858 sound/pci/hda/hda_generic.c const struct automic_entry *b = bp; bp 314 tools/arch/powerpc/include/uapi/asm/kvm.h } bp[16]; bp 20 tools/objtool/orc_gen.c struct cfi_reg *bp = &insn->state.regs[CFI_BP]; bp 60 tools/objtool/orc_gen.c switch(bp->base) { bp 72 tools/objtool/orc_gen.c insn->sec, insn->offset, bp->base); bp 77 tools/objtool/orc_gen.c orc->bp_offset = bp->offset; bp 85 tools/perf/arch/x86/util/perf_regs.c SDT_NAME_REG(ebp, bp), bp 86 tools/perf/arch/x86/util/perf_regs.c SDT_NAME_REG(rbp, bp), bp 87 tools/perf/arch/x86/util/perf_regs.c SDT_NAME_REG(bpl, bp), bp 20 tools/spi/spidev_fdx.c unsigned char buf[32], *bp; bp 43 tools/spi/spidev_fdx.c bp = buf + 2; bp 45 tools/spi/spidev_fdx.c printf(" %02x", *bp++); bp 52 tools/spi/spidev_fdx.c unsigned char buf[32], *bp; bp 75 tools/spi/spidev_fdx.c for (bp = buf; len; len--) bp 76 tools/spi/spidev_fdx.c printf(" %02x", *bp++); bp 379 tools/testing/selftests/bpf/bpf_helpers.h #define PT_REGS_FP(x) ((x)->bp) bp 11 tools/testing/selftests/x86/check_initial_reg_state.c unsigned long ax, bx, cx, dx, si, di, bp, sp, flags; bp 63 tools/testing/selftests/x86/check_initial_reg_state.c if (ax || bx || cx || dx || si || di || bp bp 76 tools/testing/selftests/x86/check_initial_reg_state.c SHOW(bp); bp 58 tools/testing/selftests/x86/ptrace_syscall.c register unsigned long bp asm("bp") = args->arg5; bp 62 tools/testing/selftests/x86/ptrace_syscall.c "+S" (args->arg3), "+D" (args->arg4), "+r" (bp) bp 64 tools/testing/selftests/x86/ptrace_syscall.c args->arg5 = bp;