tp 10 arch/arm/include/asm/tls.h .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2 tp 13 arch/arm/include/asm/tls.h .macro switch_tls_v6k, base, tp, tpuser, tmp1, tmp2 tp 20 arch/arm/include/asm/tls.h .macro switch_tls_v6, base, tp, tpuser, tmp1, tmp2 tp 32 arch/arm/include/asm/tls.h .macro switch_tls_software, base, tp, tpuser, tmp1, tmp2 tp 169 arch/arm64/kernel/insn.c u32 *tp = addr; tp 173 arch/arm64/kernel/insn.c if ((uintptr_t)tp & 0x3) tp 176 arch/arm64/kernel/insn.c ret = aarch64_insn_write(tp, insn); tp 178 arch/arm64/kernel/insn.c __flush_icache_range((uintptr_t)tp, tp 179 arch/arm64/kernel/insn.c (uintptr_t)tp + AARCH64_INSN_SIZE); tp 242 arch/csky/kernel/ptrace.c unsigned char *tp; tp 296 arch/csky/kernel/ptrace.c tp = ((unsigned char *) fp->pc) - 0x20; tp 297 arch/csky/kernel/ptrace.c tp += ((int)tp % 4) ? 2 : 0; tp 298 arch/csky/kernel/ptrace.c for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) { tp 300 arch/csky/kernel/ptrace.c pr_cont("\n%08x: ", (int) (tp + i)); tp 306 arch/csky/kernel/ptrace.c tp = ((unsigned char *) fp) - 0x40; tp 307 arch/csky/kernel/ptrace.c for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) { tp 309 arch/csky/kernel/ptrace.c pr_cont("\n%08x: ", (int) (tp + i)); tp 58 arch/h8300/kernel/traps.c unsigned char *tp; tp 78 arch/h8300/kernel/traps.c tp = ((unsigned char *) fp->pc) - 0x20; tp 79 arch/h8300/kernel/traps.c for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) { tp 81 arch/h8300/kernel/traps.c pr_info("\n%08x: ", (int) (tp + i)); tp 87 arch/h8300/kernel/traps.c tp = ((unsigned char *) fp) - 0x40; tp 88 arch/h8300/kernel/traps.c for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) { tp 90 arch/h8300/kernel/traps.c pr_info("\n%08x: ", (int) (tp + i)); tp 562 arch/m68k/kernel/sys_m68k.c asmlinkage int sys_set_thread_area(unsigned long tp) tp 564 arch/m68k/kernel/sys_m68k.c current_thread_info()->tp_value = tp; tp 138 arch/mips/include/asm/octeon/cvmx-pciercx-defs.h __BITFIELD_FIELD(uint32_t tp:1, tp 154 arch/nios2/kernel/process.c unsigned char *tp; tp 192 arch/nios2/kernel/process.c tp = ((unsigned char *) fp->ea) - 0x20; tp 193 arch/nios2/kernel/process.c for (sp = (unsigned long *) tp, i = 0; (i < 0x40); i += 4) { tp 195 arch/nios2/kernel/process.c pr_emerg("\n%08x: ", (int) (tp + i)); tp 201 arch/nios2/kernel/process.c tp = ((unsigned char *) fp) - 0x40; tp 202 arch/nios2/kernel/process.c for (sp = (unsigned long *) tp, i = 0; (i < 0xc0); i += 4) { tp 204 arch/nios2/kernel/process.c pr_emerg("\n%08x: ", (int) (tp + i)); tp 211 arch/nios2/kernel/process.c tp = (unsigned char *) (fp->sp - 0x10); tp 212 arch/nios2/kernel/process.c for (sp = (unsigned long *) tp, i = 0; (i < 0x80); i += 4) { tp 214 arch/nios2/kernel/process.c pr_emerg("\n%08x: ", (int) (tp + i)); tp 29 arch/riscv/include/asm/current.h register struct task_struct *tp __asm__("tp"); tp 30 arch/riscv/include/asm/current.h return tp; tp 19 arch/riscv/include/asm/ptrace.h unsigned long tp; tp 24 arch/riscv/include/uapi/asm/ptrace.h unsigned long tp; tp 90 arch/riscv/kernel/asm-offsets.c OFFSET(PT_TP, pt_regs, tp); tp 41 arch/riscv/kernel/process.c regs->gp, regs->tp, regs->t0); tp 123 arch/riscv/kernel/process.c childregs->tp = tls; tp 501 arch/sparc/include/asm/vio.h struct vio_msg_tag *tp); tp 11 arch/sparc/kernel/kstack.h static inline bool kstack_valid(struct thread_info *tp, unsigned long sp) tp 13 arch/sparc/kernel/kstack.h unsigned long base = (unsigned long) tp; tp 23 arch/sparc/kernel/kstack.h if (hardirq_stack[tp->cpu]) { tp 24 arch/sparc/kernel/kstack.h base = (unsigned long) hardirq_stack[tp->cpu]; tp 28 arch/sparc/kernel/kstack.h base = (unsigned long) softirq_stack[tp->cpu]; tp 37 arch/sparc/kernel/kstack.h static inline bool kstack_is_trap_frame(struct thread_info *tp, struct pt_regs *regs) tp 39 arch/sparc/kernel/kstack.h unsigned long base = (unsigned long) tp; tp 46 arch/sparc/kernel/kstack.h if (hardirq_stack[tp->cpu]) { tp 47 arch/sparc/kernel/kstack.h base = (unsigned long) hardirq_stack[tp->cpu]; tp 51 arch/sparc/kernel/kstack.h base = (unsigned long) softirq_stack[tp->cpu]; tp 204 arch/sparc/kernel/process_64.c static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, tp 223 arch/sparc/kernel/process_64.c if (kstack_valid(tp, (unsigned long) rw)) { tp 227 arch/sparc/kernel/process_64.c if (kstack_valid(tp, (unsigned long) rw)) tp 234 arch/sparc/kernel/process_64.c rp->thread = tp; tp 254 arch/sparc/kernel/process_64.c struct thread_info *tp = current_thread_info(); tp 260 arch/sparc/kernel/process_64.c regs = tp->kregs; tp 269 arch/sparc/kernel/process_64.c __global_reg_self(tp, regs, this_cpu); tp 283 arch/sparc/kernel/process_64.c tp = gp->thread; tp 287 arch/sparc/kernel/process_64.c ((tp && tp->task) ? tp->task->comm : "NULL"), tp 288 arch/sparc/kernel/process_64.c ((tp && tp->task) ? tp->task->pid : -1)); tp 773 arch/sparc/kernel/process_64.c struct thread_info *tp; tp 782 arch/sparc/kernel/process_64.c tp = task_thread_info(task); tp 787 arch/sparc/kernel/process_64.c if (!kstack_valid(tp, fp)) tp 892 arch/sparc/kernel/smp_64.c struct trap_per_cpu *tp = &trap_block[raw_smp_processor_id()]; tp 901 arch/sparc/kernel/smp_64.c if (tp->pgd_paddr == __pa(mm->pgd)) tp 13 arch/sparc/kernel/stacktrace.c static void __save_stack_trace(struct thread_info *tp, tp 23 arch/sparc/kernel/stacktrace.c if (tp == current_thread_info()) { tp 27 arch/sparc/kernel/stacktrace.c ksp = tp->ksp; tp 32 arch/sparc/kernel/stacktrace.c t = tp->task; tp 39 arch/sparc/kernel/stacktrace.c if (!kstack_valid(tp, fp)) tp 45 arch/sparc/kernel/stacktrace.c if (kstack_is_trap_frame(tp, regs)) { tp 85 arch/sparc/kernel/stacktrace.c struct thread_info *tp = task_thread_info(tsk); tp 87 arch/sparc/kernel/stacktrace.c __save_stack_trace(tp, trace, true); tp 2458 arch/sparc/kernel/traps_64.c struct thread_info *tp; tp 2467 arch/sparc/kernel/traps_64.c tp = task_thread_info(tsk); tp 2472 arch/sparc/kernel/traps_64.c ksp = tp->ksp; tp 2474 arch/sparc/kernel/traps_64.c if (tp == current_thread_info()) tp 2485 arch/sparc/kernel/traps_64.c if (!kstack_valid(tp, fp)) tp 2490 arch/sparc/kernel/traps_64.c if (kstack_is_trap_frame(tp, regs)) { tp 2543 arch/sparc/kernel/traps_64.c struct thread_info *tp = current_thread_info(); tp 2552 arch/sparc/kernel/traps_64.c kstack_valid(tp, (unsigned long) rw)) { tp 687 arch/sparc/kernel/viohs.c int vio_validate_sid(struct vio_driver_state *vio, struct vio_msg_tag *tp) tp 694 arch/sparc/kernel/viohs.c if (tp->type == VIO_TYPE_CTRL && tp 695 arch/sparc/kernel/viohs.c tp->stype == VIO_SUBTYPE_INFO && tp 696 arch/sparc/kernel/viohs.c tp->stype_env == VIO_VER_INFO) tp 713 arch/sparc/kernel/viohs.c if (sid == tp->sid) tp 716 arch/sparc/kernel/viohs.c tp->sid, vio->_peer_sid, vio->_local_sid); tp 42 arch/sparc/kernel/windows.c static inline void shift_window_buffer(int first_win, int last_win, struct thread_info *tp) tp 47 arch/sparc/kernel/windows.c tp->rwbuf_stkptrs[i] = tp->rwbuf_stkptrs[i+1]; tp 48 arch/sparc/kernel/windows.c memcpy(&tp->reg_window[i], &tp->reg_window[i+1], sizeof(struct reg_window32)); tp 63 arch/sparc/kernel/windows.c struct thread_info *tp = current_thread_info(); tp 67 arch/sparc/kernel/windows.c if(!tp->w_saved) tp 71 arch/sparc/kernel/windows.c for(window = tp->w_saved - 1; window >= 0; window--) { tp 72 arch/sparc/kernel/windows.c unsigned long sp = tp->rwbuf_stkptrs[window]; tp 75 arch/sparc/kernel/windows.c if (copy_to_user((char __user *) sp, &tp->reg_window[window], tp 79 arch/sparc/kernel/windows.c shift_window_buffer(window, tp->w_saved - 1, tp); tp 80 arch/sparc/kernel/windows.c tp->w_saved--; tp 115 arch/sparc/kernel/windows.c struct thread_info *tp = current_thread_info(); tp 119 arch/sparc/kernel/windows.c for(window = 0; window < tp->w_saved; window++) { tp 120 arch/sparc/kernel/windows.c unsigned long sp = tp->rwbuf_stkptrs[window]; tp 123 arch/sparc/kernel/windows.c copy_to_user((char __user *) sp, &tp->reg_window[window], tp 127 arch/sparc/kernel/windows.c tp->w_saved = 0; tp 2983 arch/sparc/mm/init_64.c struct tsb_config *tp; tp 2998 arch/sparc/mm/init_64.c tp = &mm->context.tsb_block[MM_TSB_HUGE]; tp 2999 arch/sparc/mm/init_64.c if (likely(tp->tsb == NULL)) tp 590 arch/sparc/mm/tsb.c static void tsb_destroy_one(struct tsb_config *tp) tp 594 arch/sparc/mm/tsb.c if (!tp->tsb) tp 596 arch/sparc/mm/tsb.c cache_index = tp->tsb_reg_val & 0x7UL; tp 597 arch/sparc/mm/tsb.c kmem_cache_free(tsb_caches[cache_index], tp->tsb); tp 598 arch/sparc/mm/tsb.c tp->tsb = NULL; tp 599 arch/sparc/mm/tsb.c tp->tsb_reg_val = 0UL; tp 96 arch/um/drivers/pty.c char *tp = &line[strlen("/dev/")]; tp 99 arch/um/drivers/pty.c *tp = 't'; tp 101 arch/um/drivers/pty.c *tp = 'p'; tp 615 arch/x86/events/intel/pt.c struct topa_page *tp; tp 622 arch/x86/events/intel/pt.c tp = page_address(p); tp 623 arch/x86/events/intel/pt.c tp->topa.last = 0; tp 630 arch/x86/events/intel/pt.c TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT; tp 631 arch/x86/events/intel/pt.c TOPA_ENTRY(&tp->topa, 1)->end = 1; tp 634 arch/x86/events/intel/pt.c return &tp->topa; tp 749 arch/x86/events/intel/pt.c struct topa_page *tp = topa_to_page(topa); tp 752 arch/x86/events/intel/pt.c pr_debug("# table @%p, off %llx size %zx\n", tp->table, tp 756 arch/x86/events/intel/pt.c &tp->table[i], tp 757 arch/x86/events/intel/pt.c (unsigned long)tp->table[i].base << TOPA_SHIFT, tp 758 arch/x86/events/intel/pt.c sizes(tp->table[i].size), tp 759 arch/x86/events/intel/pt.c tp->table[i].end ? 'E' : ' ', tp 760 arch/x86/events/intel/pt.c tp->table[i].intr ? 'I' : ' ', tp 761 arch/x86/events/intel/pt.c tp->table[i].stop ? 'S' : ' ', tp 762 arch/x86/events/intel/pt.c *(u64 *)&tp->table[i]); tp 764 arch/x86/events/intel/pt.c tp->table[i].stop) || tp 765 arch/x86/events/intel/pt.c tp->table[i].end) tp 907 arch/x86/events/intel/pt.c struct topa_page *tp; tp 910 arch/x86/events/intel/pt.c tp = phys_to_virt(base_topa); tp 911 arch/x86/events/intel/pt.c buf->cur = &tp->topa; tp 923 arch/x86/events/intel/pt.c struct topa_page *tp; tp 957 arch/x86/events/intel/pt.c tp = topa_to_page(topa); tp 970 arch/x86/events/intel/pt.c return &tp->table[idx]; tp 978 arch/x86/events/intel/pt.c return &tp->table[idx]; tp 995 arch/x86/events/intel/pt.c struct topa_page *tp; tp 998 arch/x86/events/intel/pt.c tp = (struct topa_page *)table; tp 999 arch/x86/events/intel/pt.c if (tp->table != te) tp 1002 arch/x86/events/intel/pt.c topa = &tp->topa; tp 1008 arch/x86/events/intel/pt.c tp = topa_to_page(topa); tp 1010 arch/x86/events/intel/pt.c return &tp->table[topa->last - 1]; tp 55 arch/x86/include/asm/text-patching.h extern void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries); tp 946 arch/x86/kernel/alternative.c struct text_poke_loc *tp = (struct text_poke_loc *) elt; tp 948 arch/x86/kernel/alternative.c if (key < tp->addr) tp 950 arch/x86/kernel/alternative.c if (key > tp->addr) tp 958 arch/x86/kernel/alternative.c struct text_poke_loc *tp; tp 989 arch/x86/kernel/alternative.c tp = bsearch(ip, bp_patching.vec, bp_patching.nr_entries, tp 992 arch/x86/kernel/alternative.c if (!tp) tp 995 arch/x86/kernel/alternative.c tp = bp_patching.vec; tp 996 arch/x86/kernel/alternative.c if (tp->addr != ip) tp 1001 arch/x86/kernel/alternative.c regs->ip = (unsigned long) tp->detour; tp 1028 arch/x86/kernel/alternative.c void text_poke_bp_batch(struct text_poke_loc *tp, unsigned int nr_entries) tp 1036 arch/x86/kernel/alternative.c bp_patching.vec = tp; tp 1049 arch/x86/kernel/alternative.c text_poke(tp[i].addr, &int3, sizeof(int3)); tp 1057 arch/x86/kernel/alternative.c if (tp[i].len - sizeof(int3) > 0) { tp 1058 arch/x86/kernel/alternative.c text_poke((char *)tp[i].addr + sizeof(int3), tp 1059 arch/x86/kernel/alternative.c (const char *)tp[i].opcode + sizeof(int3), tp 1060 arch/x86/kernel/alternative.c tp[i].len - sizeof(int3)); tp 1079 arch/x86/kernel/alternative.c text_poke(tp[i].addr, tp[i].opcode, sizeof(int3)); tp 1103 arch/x86/kernel/alternative.c struct text_poke_loc tp = { tp 1114 arch/x86/kernel/alternative.c memcpy((void *)tp.opcode, opcode, len); tp 1116 arch/x86/kernel/alternative.c text_poke_bp_batch(&tp, 1); tp 111 arch/x86/kernel/jump_label.c struct text_poke_loc *tp; tp 129 arch/x86/kernel/jump_label.c tp = &tp_vec[tp_vec_nr]; tp 150 arch/x86/kernel/jump_label.c (union jump_code_union *) &tp->opcode, 0); tp 152 arch/x86/kernel/jump_label.c tp->addr = entry_code; tp 153 arch/x86/kernel/jump_label.c tp->detour = entry_code + JUMP_LABEL_NOP_SIZE; tp 154 arch/x86/kernel/jump_label.c tp->len = JUMP_LABEL_NOP_SIZE; tp 1288 arch/x86/kernel/pci-calgary_64.c u64 *tp; tp 1290 arch/x86/kernel/pci-calgary_64.c tp = ((u64 *)tbl->it_base); tp 1292 arch/x86/kernel/pci-calgary_64.c if (*tp != 0x0) tp 1294 arch/x86/kernel/pci-calgary_64.c tp++; tp 39 arch/x86/kernel/tce_64.c u64* tp; tp 47 arch/x86/kernel/tce_64.c tp = ((u64*)tbl->it_base) + index; tp 54 arch/x86/kernel/tce_64.c *tp = cpu_to_be64(t); tp 55 arch/x86/kernel/tce_64.c flush_tce(tp); tp 58 arch/x86/kernel/tce_64.c tp++; tp 64 arch/x86/kernel/tce_64.c u64* tp; tp 66 arch/x86/kernel/tce_64.c tp = ((u64*)tbl->it_base) + index; tp 69 arch/x86/kernel/tce_64.c *tp = cpu_to_be64(0); tp 70 arch/x86/kernel/tce_64.c flush_tce(tp); tp 71 arch/x86/kernel/tce_64.c tp++; tp 477 arch/x86/xen/time.c struct timespec64 tp; tp 494 arch/x86/xen/time.c xen_read_wallclock(&tp); tp 495 arch/x86/xen/time.c do_settimeofday64(&tp); tp 338 arch/xtensa/kernel/signal.c unsigned long sp, ra, tp, ps; tp 388 arch/xtensa/kernel/signal.c tp = regs->threadptr; tp 407 arch/xtensa/kernel/signal.c regs->threadptr = tp; tp 91 arch/xtensa/platforms/iss/network.c } tp; tp 163 arch/xtensa/platforms/iss/network.c char *dev_name = lp->tp.info.tuntap.dev_name; tp 186 arch/xtensa/platforms/iss/network.c lp->tp.info.tuntap.fd = fd; tp 192 arch/xtensa/platforms/iss/network.c simc_close(lp->tp.info.tuntap.fd); tp 193 arch/xtensa/platforms/iss/network.c lp->tp.info.tuntap.fd = -1; tp 198 arch/xtensa/platforms/iss/network.c return simc_read(lp->tp.info.tuntap.fd, tp 204 arch/xtensa/platforms/iss/network.c return simc_write(lp->tp.info.tuntap.fd, (*skb)->data, (*skb)->len); tp 214 arch/xtensa/platforms/iss/network.c return simc_poll(lp->tp.info.tuntap.fd); tp 251 arch/xtensa/platforms/iss/network.c strlcpy(lp->tp.info.tuntap.dev_name, dev_name, tp 252 arch/xtensa/platforms/iss/network.c sizeof(lp->tp.info.tuntap.dev_name)); tp 258 arch/xtensa/platforms/iss/network.c lp->tp.info.tuntap.fd = -1; tp 260 arch/xtensa/platforms/iss/network.c lp->tp.open = tuntap_open; tp 261 arch/xtensa/platforms/iss/network.c lp->tp.close = tuntap_close; tp 262 arch/xtensa/platforms/iss/network.c lp->tp.read = tuntap_read; tp 263 arch/xtensa/platforms/iss/network.c lp->tp.write = tuntap_write; tp 264 arch/xtensa/platforms/iss/network.c lp->tp.protocol = tuntap_protocol; tp 265 arch/xtensa/platforms/iss/network.c lp->tp.poll = tuntap_poll; tp 280 arch/xtensa/platforms/iss/network.c if (lp->tp.poll(lp) == 0) tp 297 arch/xtensa/platforms/iss/network.c pkt_len = lp->tp.read(lp, &skb); tp 302 arch/xtensa/platforms/iss/network.c skb->protocol = lp->tp.protocol(skb); tp 367 arch/xtensa/platforms/iss/network.c err = lp->tp.open(lp); tp 407 arch/xtensa/platforms/iss/network.c lp->tp.close(lp); tp 421 arch/xtensa/platforms/iss/network.c len = lp->tp.write(lp, &skb); tp 127 drivers/ata/pata_cmd64x.c struct ata_timing tp; tp 128 drivers/ata/pata_cmd64x.c ata_timing_compute(pair, pair->pio_mode, &tp, T, 0); tp 129 drivers/ata/pata_cmd64x.c ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); tp 468 drivers/ata/pata_legacy.c struct ata_timing tp; tp 469 drivers/ata/pata_legacy.c ata_timing_compute(pair, pair->pio_mode, &tp, clock, 1000); tp 471 drivers/ata/pata_legacy.c ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); tp 547 drivers/ata/pata_legacy.c struct ata_timing tp; tp 548 drivers/ata/pata_legacy.c ata_timing_compute(pair, pair->pio_mode, &tp, clock, 1000); tp 550 drivers/ata/pata_legacy.c ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); tp 846 drivers/atm/firestream.c #define DO_DIRECTION(tp) ((tp)->traffic_class != ATM_NONE) tp 2031 drivers/atm/horizon.c static int check_max_sdu (hrz_aal aal, struct atm_trafprm * tp, unsigned int max_frame_size) { tp 2036 drivers/atm/horizon.c if (!(tp->max_sdu)) { tp 2038 drivers/atm/horizon.c tp->max_sdu = ATM_AAL0_SDU; tp 2039 drivers/atm/horizon.c } else if (tp->max_sdu != ATM_AAL0_SDU) { tp 2045 drivers/atm/horizon.c if (tp->max_sdu == 0 || tp->max_sdu > ATM_MAX_AAL34_PDU) { tp 2046 drivers/atm/horizon.c PRINTD (DBG_QOS, "%sing max_sdu", tp->max_sdu ? "capp" : "default"); tp 2047 drivers/atm/horizon.c tp->max_sdu = ATM_MAX_AAL34_PDU; tp 2051 drivers/atm/horizon.c if (tp->max_sdu == 0 || tp->max_sdu > max_frame_size) { tp 2052 drivers/atm/horizon.c PRINTD (DBG_QOS, "%sing max_sdu", tp->max_sdu ? "capp" : "default"); tp 2053 drivers/atm/horizon.c tp->max_sdu = max_frame_size; tp 2063 drivers/atm/horizon.c static int atm_pcr_check (struct atm_trafprm * tp, unsigned int pcr) { tp 2065 drivers/atm/horizon.c if (tp->min_pcr == ATM_MAX_PCR) tp 2067 drivers/atm/horizon.c else if (tp->min_pcr < 0) tp 2069 drivers/atm/horizon.c else if (tp->min_pcr && tp->min_pcr > pcr) tp 2075 drivers/atm/horizon.c if ((0) && tp->max_pcr == ATM_MAX_PCR) tp 2077 drivers/atm/horizon.c else if ((tp->max_pcr != ATM_MAX_PCR) && tp->max_pcr < 0) tp 2079 drivers/atm/horizon.c else if (tp->max_pcr && tp->max_pcr != ATM_MAX_PCR && tp->max_pcr < pcr) tp 2087 drivers/atm/horizon.c pcr, tp->min_pcr, tp->pcr, tp->max_pcr); tp 388 drivers/block/drbd/drbd_debugfs.c struct tcp_sock *tp = tcp_sk(connection->data.socket->sk); tp 389 drivers/block/drbd/drbd_debugfs.c int answ = tp->rcv_nxt - tp->copied_seq; tp 392 drivers/block/drbd/drbd_debugfs.c answ = tp->write_seq - tp->snd_una; tp 4110 drivers/block/drbd/drbd_nl.c struct timeout_parms tp; tp 4119 drivers/block/drbd/drbd_nl.c tp.timeout_type = tp 4124 drivers/block/drbd/drbd_nl.c err = timeout_parms_to_priv_skb(adm_ctx.reply_skb, &tp); tp 2386 drivers/block/drbd/drbd_receiver.c int ret = 0, tp; tp 2404 drivers/block/drbd/drbd_receiver.c tp = rcu_dereference(peer_device->connection->net_conf)->two_primaries; tp 2407 drivers/block/drbd/drbd_receiver.c if (!tp) tp 2596 drivers/block/drbd/drbd_receiver.c int err, tp; tp 2666 drivers/block/drbd/drbd_receiver.c tp = nc->two_primaries; tp 2692 drivers/block/drbd/drbd_receiver.c if (tp) { tp 450 drivers/crypto/chelsio/chtls/chtls.h static inline void send_or_defer(struct sock *sk, struct tcp_sock *tp, tp 106 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 109 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 112 drivers/crypto/chelsio/chtls/chtls_cm.c tp->tcp_header_len = sizeof(struct tcphdr); tp 113 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.mss_clamp = cdev->mtus[TCPOPT_MSS_G(opt)] - 40; tp 114 drivers/crypto/chelsio/chtls/chtls_cm.c tp->mss_cache = tp->rx_opt.mss_clamp; tp 115 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.tstamp_ok = TCPOPT_TSTAMP_G(opt); tp 116 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.snd_wscale = TCPOPT_SACK_G(opt); tp 117 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.wscale_ok = TCPOPT_WSCALE_OK_G(opt); tp 118 drivers/crypto/chelsio/chtls/chtls_cm.c SND_WSCALE(tp) = TCPOPT_SND_WSCALE_G(opt); tp 119 drivers/crypto/chelsio/chtls/chtls_cm.c if (!tp->rx_opt.wscale_ok) tp 120 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.rcv_wscale = 0; tp 121 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->rx_opt.tstamp_ok) { tp 122 drivers/crypto/chelsio/chtls/chtls_cm.c tp->tcp_header_len += TCPOLEN_TSTAMP_ALIGNED; tp 123 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.mss_clamp -= TCPOLEN_TSTAMP_ALIGNED; tp 188 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 191 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 199 drivers/crypto/chelsio/chtls/chtls_cm.c req->rsvd0 = htonl(tp->snd_nxt); tp 203 drivers/crypto/chelsio/chtls/chtls_cm.c send_or_defer(sk, tp, skb, mode == CPL_ABORT_SEND_RST); tp 218 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 220 drivers/crypto/chelsio/chtls/chtls_cm.c if (send_tx_flowc_wr(sk, 0, tp->snd_nxt, tp->rcv_nxt) < 0) tp 247 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 249 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->nonagle & TCP_NAGLE_CORK) { tp 250 drivers/crypto/chelsio/chtls/chtls_cm.c tp->nonagle &= ~TCP_NAGLE_CORK; tp 407 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 410 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 424 drivers/crypto/chelsio/chtls/chtls_cm.c tp->max_window = 0xFFFF << (tp->rx_opt.snd_wscale); tp 869 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 877 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 884 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss = dst_metric_advmss(dst); tp 885 drivers/crypto/chelsio/chtls/chtls_cm.c if (USER_MSS(tp) && tp->advmss > USER_MSS(tp)) tp 886 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss = USER_MSS(tp); tp 887 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->advmss > pmtu - iphdrsz) tp 888 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss = pmtu - iphdrsz; tp 889 drivers/crypto/chelsio/chtls/chtls_cm.c if (mss && tp->advmss > mss) tp 890 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss = mss; tp 892 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss = cxgb4_best_aligned_mtu(cdev->lldi->mtus, tp 894 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss - tcpoptsz, tp 896 drivers/crypto/chelsio/chtls/chtls_cm.c tp->advmss -= iphdrsz; tp 926 drivers/crypto/chelsio/chtls/chtls_cm.c const struct tcp_sock *tp; tp 934 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 948 drivers/crypto/chelsio/chtls/chtls_cm.c WND_SCALE_V(RCV_WSCALE(tp)) | tp 951 drivers/crypto/chelsio/chtls/chtls_cm.c NAGLE_V(!(tp->nonagle & TCP_NAGLE_OFF)) | tp 956 drivers/crypto/chelsio/chtls/chtls_cm.c RCV_BUFSIZ_V(min(tp->rcv_wnd >> 10, RCV_BUFSIZ_M)); tp 1034 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 1069 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(newsk); tp 1087 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_wnd = csk->rcv_win; tp 1097 drivers/crypto/chelsio/chtls/chtls_cm.c RCV_WSCALE(tp) = select_rcv_wscale(tcp_full_space(newsk), tp 1100 drivers/crypto/chelsio/chtls/chtls_cm.c tp->window_clamp); tp 1307 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 1309 drivers/crypto/chelsio/chtls/chtls_cm.c tp->pushed_seq = snd_isn; tp 1310 drivers/crypto/chelsio/chtls/chtls_cm.c tp->write_seq = snd_isn; tp 1311 drivers/crypto/chelsio/chtls/chtls_cm.c tp->snd_nxt = snd_isn; tp 1312 drivers/crypto/chelsio/chtls/chtls_cm.c tp->snd_una = snd_isn; tp 1316 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->rcv_wnd > (RCV_BUFSIZ_M << 10)) tp 1317 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_wup -= tp->rcv_wnd - (RCV_BUFSIZ_M << 10); tp 1479 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 1482 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->urg_data && !after(urg_seq, tp->urg_seq)) tp 1486 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->urg_seq == tp->copied_seq && tp->urg_data && tp 1488 drivers/crypto/chelsio/chtls/chtls_cm.c tp->copied_seq != tp->rcv_nxt) { tp 1491 drivers/crypto/chelsio/chtls/chtls_cm.c tp->copied_seq++; tp 1492 drivers/crypto/chelsio/chtls/chtls_cm.c if (skb && tp->copied_seq - ULP_SKB_CB(skb)->seq >= skb->len) tp 1496 drivers/crypto/chelsio/chtls/chtls_cm.c tp->urg_data = TCP_URG_NOTYET; tp 1497 drivers/crypto/chelsio/chtls/chtls_cm.c tp->urg_seq = urg_seq; tp 1525 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 1528 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 1545 drivers/crypto/chelsio/chtls/chtls_cm.c handle_urg_ptr(sk, tp->rcv_nxt + ntohs(hdr->urg)); tp 1546 drivers/crypto/chelsio/chtls/chtls_cm.c if (unlikely(tp->urg_data == TCP_URG_NOTYET && tp 1547 drivers/crypto/chelsio/chtls/chtls_cm.c tp->urg_seq - tp->rcv_nxt < skb->len)) tp 1548 drivers/crypto/chelsio/chtls/chtls_cm.c tp->urg_data = TCP_URG_VALID | tp 1549 drivers/crypto/chelsio/chtls/chtls_cm.c skb->data[tp->urg_seq - tp->rcv_nxt]; tp 1553 drivers/crypto/chelsio/chtls/chtls_cm.c csk->delack_seq = tp->rcv_nxt; tp 1557 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_nxt += skb->len; tp 1588 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 1592 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 1609 drivers/crypto/chelsio/chtls/chtls_cm.c if (unlikely(tp->urg_data == TCP_URG_NOTYET && tp->urg_seq - tp 1610 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_nxt < skb->len)) tp 1611 drivers/crypto/chelsio/chtls/chtls_cm.c tp->urg_data = TCP_URG_VALID | tp 1612 drivers/crypto/chelsio/chtls/chtls_cm.c skb->data[tp->urg_seq - tp->rcv_nxt]; tp 1650 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 1655 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 1668 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_nxt += tp 1707 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 1709 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_nxt++; tp 1710 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rx_opt.ts_recent_stamp = ktime_get_seconds(); tp 1711 drivers/crypto/chelsio/chtls/chtls_cm.c tp->srtt_us = 0; tp 1758 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp; tp 1761 drivers/crypto/chelsio/chtls/chtls_cm.c tp = tcp_sk(sk); tp 1763 drivers/crypto/chelsio/chtls/chtls_cm.c tp->snd_una = ntohl(rpl->snd_nxt) - 1; /* exclude FIN */ tp 1989 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 1991 drivers/crypto/chelsio/chtls/chtls_cm.c if (send_tx_flowc_wr(sk, 0, tp->snd_nxt, tp->rcv_nxt) < 0) tp 2083 drivers/crypto/chelsio/chtls/chtls_cm.c struct tcp_sock *tp = tcp_sk(sk); tp 2112 drivers/crypto/chelsio/chtls/chtls_cm.c if (unlikely(before(snd_una, tp->snd_una))) { tp 2117 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->snd_una != snd_una) { tp 2118 drivers/crypto/chelsio/chtls/chtls_cm.c tp->snd_una = snd_una; tp 2119 drivers/crypto/chelsio/chtls/chtls_cm.c tp->rcv_tstamp = tcp_time_stamp(tp); tp 2120 drivers/crypto/chelsio/chtls/chtls_cm.c if (tp->snd_una == tp->snd_nxt && tp 93 drivers/crypto/chelsio/chtls/chtls_cm.h #define SND_WSCALE(tp) ((tp)->rx_opt.snd_wscale) tp 94 drivers/crypto/chelsio/chtls/chtls_cm.h #define RCV_WSCALE(tp) ((tp)->rx_opt.rcv_wscale) tp 95 drivers/crypto/chelsio/chtls/chtls_cm.h #define USER_MSS(tp) ((tp)->rx_opt.user_mss) tp 96 drivers/crypto/chelsio/chtls/chtls_cm.h #define TS_RECENT_STAMP(tp) ((tp)->rx_opt.ts_recent_stamp) tp 97 drivers/crypto/chelsio/chtls/chtls_cm.h #define WSCALE_OK(tp) ((tp)->rx_opt.wscale_ok) tp 98 drivers/crypto/chelsio/chtls/chtls_cm.h #define TSTAMP_OK(tp) ((tp)->rx_opt.tstamp_ok) tp 99 drivers/crypto/chelsio/chtls/chtls_cm.h #define SACK_OK(tp) ((tp)->rx_opt.sack_ok) tp 110 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 135 drivers/crypto/chelsio/chtls/chtls_io.c send_or_defer(sk, tp, skb, 0); tp 169 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp; tp 172 drivers/crypto/chelsio/chtls/chtls_io.c tp = tcp_sk(sk); tp 189 drivers/crypto/chelsio/chtls/chtls_io.c FLOWC_PARAM(SNDNXT, tp->snd_nxt); tp 190 drivers/crypto/chelsio/chtls/chtls_io.c FLOWC_PARAM(RCVNXT, tp->rcv_nxt); tp 192 drivers/crypto/chelsio/chtls/chtls_io.c FLOWC_PARAM(MSS, tp->mss_cache); tp 195 drivers/crypto/chelsio/chtls/chtls_io.c if (SND_WSCALE(tp)) tp 196 drivers/crypto/chelsio/chtls/chtls_io.c FLOWC_PARAM(RCV_SCALE, SND_WSCALE(tp)); tp 599 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp; tp 607 drivers/crypto/chelsio/chtls/chtls_io.c tp = tcp_sk(sk); tp 643 drivers/crypto/chelsio/chtls/chtls_io.c flowclen16 = send_tx_flowc_wr(sk, 1, tp->snd_nxt, tp 644 drivers/crypto/chelsio/chtls/chtls_io.c tp->rcv_nxt); tp 684 drivers/crypto/chelsio/chtls/chtls_io.c tp->snd_nxt += len; tp 685 drivers/crypto/chelsio/chtls/chtls_io.c tp->lsndtime = tcp_jiffies32; tp 713 drivers/crypto/chelsio/chtls/chtls_io.c static void mark_urg(struct tcp_sock *tp, int flags, tp 717 drivers/crypto/chelsio/chtls/chtls_io.c tp->snd_up = tp->write_seq; tp 732 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 746 drivers/crypto/chelsio/chtls/chtls_io.c (tp->nonagle & TCP_NAGLE_OFF); tp 752 drivers/crypto/chelsio/chtls/chtls_io.c static bool corked(const struct tcp_sock *tp, int flags) tp 754 drivers/crypto/chelsio/chtls/chtls_io.c return (flags & MSG_MORE) || (tp->nonagle & TCP_NAGLE_CORK); tp 772 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 774 drivers/crypto/chelsio/chtls/chtls_io.c mark_urg(tp, flags, skb); tp 777 drivers/crypto/chelsio/chtls/chtls_io.c corked(tp, flags)) { tp 822 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 824 drivers/crypto/chelsio/chtls/chtls_io.c ULP_SKB_CB(skb)->seq = tp->write_seq; tp 988 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 1153 drivers/crypto/chelsio/chtls/chtls_io.c tp->write_seq += copy; tp 1160 drivers/crypto/chelsio/chtls/chtls_io.c if (corked(tp, flags) && tp 1206 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp; tp 1209 drivers/crypto/chelsio/chtls/chtls_io.c tp = tcp_sk(sk); tp 1267 drivers/crypto/chelsio/chtls/chtls_io.c tp->write_seq += copy; tp 1272 drivers/crypto/chelsio/chtls/chtls_io.c if (corked(tp, flags) && tp 1311 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 1312 drivers/crypto/chelsio/chtls/chtls_io.c unsigned int wnd = tp->rcv_wnd; tp 1326 drivers/crypto/chelsio/chtls/chtls_io.c if (wnd > tp->rcv_wnd) { tp 1327 drivers/crypto/chelsio/chtls/chtls_io.c tp->rcv_wup -= wnd - tp->rcv_wnd; tp 1328 drivers/crypto/chelsio/chtls/chtls_io.c tp->rcv_wnd = wnd; tp 1371 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp; tp 1382 drivers/crypto/chelsio/chtls/chtls_io.c tp = tcp_sk(sk); tp 1383 drivers/crypto/chelsio/chtls/chtls_io.c credits = tp->copied_seq - tp->rcv_wup; tp 1391 drivers/crypto/chelsio/chtls/chtls_io.c must_send = credits + 16384 >= tp->rcv_wnd; tp 1394 drivers/crypto/chelsio/chtls/chtls_io.c tp->rcv_wup += send_rx_credits(csk, credits); tp 1402 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 1421 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data && tp 1422 drivers/crypto/chelsio/chtls/chtls_io.c tp->urg_seq == tp->copied_seq)) { tp 1508 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data)) { tp 1509 drivers/crypto/chelsio/chtls/chtls_io.c u32 urg_offset = tp->urg_seq - tp->copied_seq; tp 1516 drivers/crypto/chelsio/chtls/chtls_io.c tp->copied_seq++; tp 1535 drivers/crypto/chelsio/chtls/chtls_io.c if (tp->urg_data && after(tp->copied_seq, tp->urg_seq)) tp 1536 drivers/crypto/chelsio/chtls/chtls_io.c tp->urg_data = 0; tp 1540 drivers/crypto/chelsio/chtls/chtls_io.c tp->copied_seq += skb->len; tp 1543 drivers/crypto/chelsio/chtls/chtls_io.c tp->copied_seq += hws->rcvpld; tp 1566 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 1575 drivers/crypto/chelsio/chtls/chtls_io.c peek_seq = tp->copied_seq; tp 1578 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data && tp->urg_seq == peek_seq)) { tp 1626 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(peek_seq != tp->copied_seq)) { tp 1630 drivers/crypto/chelsio/chtls/chtls_io.c peek_seq = tp->copied_seq; tp 1642 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data)) { tp 1643 drivers/crypto/chelsio/chtls/chtls_io.c u32 urg_offset = tp->urg_seq - peek_seq; tp 1687 drivers/crypto/chelsio/chtls/chtls_io.c struct tcp_sock *tp = tcp_sk(sk); tp 1726 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data && tp->urg_seq == tp->copied_seq)) { tp 1804 drivers/crypto/chelsio/chtls/chtls_io.c offset = tp->copied_seq - ULP_SKB_CB(skb)->seq; tp 1809 drivers/crypto/chelsio/chtls/chtls_io.c if (unlikely(tp->urg_data)) { tp 1810 drivers/crypto/chelsio/chtls/chtls_io.c u32 urg_offset = tp->urg_seq - tp->copied_seq; tp 1816 drivers/crypto/chelsio/chtls/chtls_io.c tp->copied_seq++; tp 1835 drivers/crypto/chelsio/chtls/chtls_io.c tp->copied_seq += avail; tp 1840 drivers/crypto/chelsio/chtls/chtls_io.c if (tp->urg_data && after(tp->copied_seq, tp->urg_seq)) tp 1841 drivers/crypto/chelsio/chtls/chtls_io.c tp->urg_data = 0; tp 506 drivers/gpu/drm/amd/amdgpu/atombios_dp.c amdgpu_atombios_dp_set_tp(struct amdgpu_atombios_dp_link_train_info *dp_info, int tp) tp 511 drivers/gpu/drm/amd/amdgpu/atombios_dp.c switch (tp) { tp 525 drivers/gpu/drm/amd/amdgpu/atombios_dp.c drm_dp_dpcd_writeb(dp_info->aux, DP_TRAINING_PATTERN_SET, tp); tp 240 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c nv50_gr_prop_trap(struct nv50_gr *gr, u32 ustatus_addr, u32 ustatus, u32 tp) tp 258 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c tp, e14, e10 | ((e18 >> 24) & 0x1f)); tp 263 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c tp, e14, e10 | ((e18 >> 7) & 0x1f)); tp 267 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c tp, e14, e10); tp 275 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c tp, ustatus, msg, e14, e10); tp 278 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c tp, e0c, e18, e1c, e20, e24); tp 567 drivers/gpu/drm/radeon/atombios_dp.c static void radeon_dp_set_tp(struct radeon_dp_link_train_info *dp_info, int tp) tp 573 drivers/gpu/drm/radeon/atombios_dp.c switch (tp) { tp 586 drivers/gpu/drm/radeon/atombios_dp.c switch (tp) { tp 599 drivers/gpu/drm/radeon/atombios_dp.c drm_dp_dpcd_writeb(dp_info->aux, DP_TRAINING_PATTERN_SET, tp); tp 886 drivers/gpu/drm/radeon/trinity_dpm.c u32 tp = RREG32_SMC(PM_TP); tp 892 drivers/gpu/drm/radeon/trinity_dpm.c val = (p + tp - 1) / tp; tp 1029 drivers/gpu/drm/radeon/trinity_dpm.c u32 tp = RREG32_SMC(PM_TP); tp 1036 drivers/gpu/drm/radeon/trinity_dpm.c ni = (p + tp - 1) / tp; tp 783 drivers/gpu/drm/tegra/dpaux.c u8 tp = pattern & DP_TRAINING_PATTERN_MASK; tp 792 drivers/gpu/drm/tegra/dpaux.c if (tp == DP_TRAINING_PATTERN_DISABLE) tp 812 drivers/gpu/drm/tegra/dpaux.c switch (tp) { tp 826 drivers/gpu/drm/tegra/dpaux.c dev_err(aux->dev, "unsupported training pattern %u\n", tp); tp 112 drivers/hid/hid-asus.c const struct asus_touchpad_info *tp; tp 174 drivers/hid/hid-asus.c y = drvdat->tp->max_y - ((data[0] & CONTACT_Y_MSB_MASK) << 8 | data[2]); tp 179 drivers/hid/hid-asus.c if (drvdat->tp->contact_size < 5) tp 201 drivers/hid/hid-asus.c if (drvdat->tp->contact_size < 5) tp 232 drivers/hid/hid-asus.c if (size != 3 + drvdat->tp->contact_size * drvdat->tp->max_contacts) tp 235 drivers/hid/hid-asus.c for (i = 0; i < drvdat->tp->max_contacts; i++) { tp 238 drivers/hid/hid-asus.c if (drvdat->tp->contact_size >= 5) tp 247 drivers/hid/hid-asus.c contactData += drvdat->tp->contact_size; tp 281 drivers/hid/hid-asus.c if (drvdata->tp && data[0] == INPUT_REPORT_ID) tp 618 drivers/hid/hid-asus.c if (drvdata->tp) { tp 622 drivers/hid/hid-asus.c drvdata->tp->max_x, 0, 0); tp 624 drivers/hid/hid-asus.c drvdata->tp->max_y, 0, 0); tp 625 drivers/hid/hid-asus.c input_abs_set_res(input, ABS_MT_POSITION_X, drvdata->tp->res_x); tp 626 drivers/hid/hid-asus.c input_abs_set_res(input, ABS_MT_POSITION_Y, drvdata->tp->res_y); tp 628 drivers/hid/hid-asus.c if (drvdata->tp->contact_size >= 5) { tp 640 drivers/hid/hid-asus.c ret = input_mt_init_slots(input, drvdata->tp->max_contacts, tp 819 drivers/hid/hid-asus.c if (drvdata->tp) tp 850 drivers/hid/hid-asus.c drvdata->tp = &asus_i2c_tp; tp 863 drivers/hid/hid-asus.c drvdata->tp = &asus_t100ha_tp; tp 865 drivers/hid/hid-asus.c drvdata->tp = &asus_t200ta_tp; tp 867 drivers/hid/hid-asus.c drvdata->tp = &asus_t100ta_tp; tp 877 drivers/hid/hid-asus.c drvdata->tp = &asus_t100chi_tp; tp 917 drivers/hid/hid-asus.c if (drvdata->tp) { tp 923 drivers/hid/hid-asus.c if (drvdata->tp) { tp 105 drivers/ide/cmd64x.c struct ide_timing tp; tp 107 drivers/ide/cmd64x.c ide_timing_compute(pair, pair->pio_mode, &tp, T, 0); tp 108 drivers/ide/cmd64x.c ide_timing_merge(&t, &tp, &t, IDE_TIMING_SETUP); tp 111 drivers/ide/cmd64x.c &tp, T, 0); tp 112 drivers/ide/cmd64x.c ide_timing_merge(&tp, &t, &t, IDE_TIMING_SETUP); tp 216 drivers/iio/industrialio-core.c struct timespec64 tp; tp 228 drivers/iio/industrialio-core.c ktime_get_coarse_ts64(&tp); tp 229 drivers/iio/industrialio-core.c return timespec64_to_ns(&tp); tp 7346 drivers/infiniband/hw/qib/qib_iba7322.c const struct txdds_ent *tp) tp 7362 drivers/infiniband/hw/qib/qib_iba7322.c pack_ent = tp->amp << DDS_ENT_AMP_LSB; tp 7363 drivers/infiniband/hw/qib/qib_iba7322.c pack_ent |= tp->main << DDS_ENT_MAIN_LSB; tp 7364 drivers/infiniband/hw/qib/qib_iba7322.c pack_ent |= tp->pre << DDS_ENT_PRE_LSB; tp 7365 drivers/infiniband/hw/qib/qib_iba7322.c pack_ent |= tp->post << DDS_ENT_POST_LSB; tp 663 drivers/infiniband/sw/siw/siw_qp_tx.c struct tcp_sock *tp = tcp_sk(s->sk); tp 665 drivers/infiniband/sw/siw/siw_qp_tx.c if (tp->gso_segs) { tp 667 drivers/infiniband/sw/siw/siw_qp_tx.c c_tx->tcp_seglen = tp->mss_cache * tp->gso_segs; tp 670 drivers/infiniband/sw/siw/siw_qp_tx.c tp->mss_cache * tp 671 drivers/infiniband/sw/siw/siw_qp_tx.c min_t(u16, c_tx->gso_seg_limit, tp->gso_segs); tp 673 drivers/infiniband/sw/siw/siw_qp_tx.c c_tx->tcp_seglen = tp->mss_cache; tp 688 drivers/infiniband/ulp/ipoib/ipoib_main.c struct ipoib_path *path, *tp; tp 692 drivers/infiniband/ulp/ipoib/ipoib_main.c list_for_each_entry_safe(path, tp, &priv->path_list, list) { tp 714 drivers/infiniband/ulp/ipoib/ipoib_main.c struct ipoib_path *path, *tp; tp 726 drivers/infiniband/ulp/ipoib/ipoib_main.c list_for_each_entry_safe(path, tp, &remove_list, list) { tp 1493 drivers/input/keyboard/applespi.c struct touchpad_protocol *tp; tp 1496 drivers/input/keyboard/applespi.c tp = &message->touchpad; tp 1497 drivers/input/keyboard/applespi.c tp_len = struct_size(tp, fingers, tp->number_of_fingers); tp 1503 drivers/input/keyboard/applespi.c tp->number_of_fingers, tp_len); tp 1507 drivers/input/keyboard/applespi.c if (tp->number_of_fingers > MAX_FINGERS) { tp 1510 drivers/input/keyboard/applespi.c tp->number_of_fingers, tp 1512 drivers/input/keyboard/applespi.c tp->number_of_fingers = MAX_FINGERS; tp 1515 drivers/input/keyboard/applespi.c report_tp_state(applespi, tp); tp 105 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 107 drivers/input/mouse/trackpoint.c u8 value = *(u8 *)((void *)tp + attr->field_offset); tp 118 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 120 drivers/input/mouse/trackpoint.c u8 *field = (void *)tp + attr->field_offset; tp 147 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 149 drivers/input/mouse/trackpoint.c bool *field = (void *)tp + attr->field_offset; tp 205 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 207 drivers/input/mouse/trackpoint.c return tp->variant_id == TP_VARIANT_IBM || tp 301 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 303 drivers/input/mouse/trackpoint.c if (!in_power_on_state && tp->variant_id == TP_VARIANT_IBM) { tp 323 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, sensitivity); tp 324 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, inertia); tp 325 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, speed); tp 326 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, reach); tp 327 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, draghys); tp 328 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, mindrag); tp 329 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, thresh); tp 330 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, upthresh); tp 331 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, ztime); tp 332 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, jenks); tp 333 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, drift_time); tp 336 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, press_to_select); tp 337 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, skipback); tp 338 drivers/input/mouse/trackpoint.c TRACKPOINT_UPDATE(in_power_on_state, psmouse, tp, ext_dev); tp 343 drivers/input/mouse/trackpoint.c static void trackpoint_defaults(struct trackpoint_data *tp) tp 345 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, sensitivity); tp 346 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, speed); tp 347 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, reach); tp 348 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, draghys); tp 349 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, mindrag); tp 350 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, thresh); tp 351 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, upthresh); tp 352 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, ztime); tp 353 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, jenks); tp 354 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, drift_time); tp 355 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, inertia); tp 358 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, press_to_select); tp 359 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, skipback); tp 360 drivers/input/mouse/trackpoint.c TRACKPOINT_SET_POWER_ON_DEFAULT(tp, ext_dev); tp 374 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp = psmouse->private; tp 382 drivers/input/mouse/trackpoint.c was_reset = tp->variant_id == TP_VARIANT_IBM && tp 395 drivers/input/mouse/trackpoint.c struct trackpoint_data *tp; tp 408 drivers/input/mouse/trackpoint.c tp = kzalloc(sizeof(*tp), GFP_KERNEL); tp 409 drivers/input/mouse/trackpoint.c if (!tp) tp 412 drivers/input/mouse/trackpoint.c trackpoint_defaults(tp); tp 413 drivers/input/mouse/trackpoint.c tp->variant_id = variant_id; tp 414 drivers/input/mouse/trackpoint.c tp->firmware_id = firmware_id; tp 416 drivers/input/mouse/trackpoint.c psmouse->private = tp; tp 371 drivers/leds/led-triggers.c void led_trigger_register_simple(const char *name, struct led_trigger **tp) tp 391 drivers/leds/led-triggers.c *tp = trig; tp 77 drivers/media/platform/vivid/vivid-radio-common.c rds->tp = dev->radio_tx_rds_tp->cur.val; tp 92 drivers/media/platform/vivid/vivid-radio-common.c v4l2_ctrl_s_ctrl(dev->radio_rx_rds_tp, rds->tp); tp 57 drivers/media/platform/vivid/vivid-rds-gen.c data[1].msb = (rds->pty >> 3) | (rds->tp << 2); tp 144 drivers/media/platform/vivid/vivid-rds-gen.c rds->tp = true; tp 32 drivers/media/platform/vivid/vivid-rds-gen.h bool tp; tp 1763 drivers/media/usb/pvrusb2/pvrusb2-hdw.c int tp = -1; tp 1765 drivers/media/usb/pvrusb2/pvrusb2-hdw.c tp = tuner[unit_number]; tp 1767 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (tp < 0) return -EINVAL; tp 1768 drivers/media/usb/pvrusb2/pvrusb2-hdw.c hdw->tuner_type = tp; tp 1777 drivers/media/usb/pvrusb2/pvrusb2-hdw.c int tp = 0; tp 1779 drivers/media/usb/pvrusb2/pvrusb2-hdw.c tp = video_std[unit_number]; tp 1780 drivers/media/usb/pvrusb2/pvrusb2-hdw.c if (tp) return tp; tp 1789 drivers/media/usb/pvrusb2/pvrusb2-hdw.c int tp = 0; tp 1791 drivers/media/usb/pvrusb2/pvrusb2-hdw.c tp = tolerance[unit_number]; tp 1793 drivers/media/usb/pvrusb2/pvrusb2-hdw.c return tp; tp 2791 drivers/media/usb/pvrusb2/pvrusb2-hdw.c static const char *get_ctrl_typename(enum pvr2_ctl_type tp) tp 2793 drivers/media/usb/pvrusb2/pvrusb2-hdw.c switch (tp) { tp 93 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c enum pvr2_ctl_type tp; tp 95 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c tp = pvr2_ctrl_get_type(cip->cptr); tp 96 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c switch (tp) { tp 937 drivers/mfd/si476x-cmd.c report->tp = 0x20 & resp[3]; tp 192 drivers/mtd/mtdswap.c struct mtdswap_tree *tp; tp 195 drivers/mtd/mtdswap.c tp = container_of(eb->root, struct mtdswap_tree, root); tp 196 drivers/mtd/mtdswap.c oldidx = tp - &d->trees[0]; tp 78 drivers/mtd/ubi/vmt.c const char *tp; tp 81 drivers/mtd/ubi/vmt.c tp = "dynamic"; tp 83 drivers/mtd/ubi/vmt.c tp = "static"; tp 84 drivers/mtd/ubi/vmt.c ret = sprintf(buf, "%s\n", tp); tp 74 drivers/net/can/sja1000/sja1000_platform.c struct technologic_priv *tp = priv->priv; tp 78 drivers/net/can/sja1000/sja1000_platform.c spin_lock_irqsave(&tp->io_lock, flags); tp 81 drivers/net/can/sja1000/sja1000_platform.c spin_unlock_irqrestore(&tp->io_lock, flags); tp 89 drivers/net/can/sja1000/sja1000_platform.c struct technologic_priv *tp = priv->priv; tp 92 drivers/net/can/sja1000/sja1000_platform.c spin_lock_irqsave(&tp->io_lock, flags); tp 95 drivers/net/can/sja1000/sja1000_platform.c spin_unlock_irqrestore(&tp->io_lock, flags); tp 100 drivers/net/can/sja1000/sja1000_platform.c struct technologic_priv *tp = priv->priv; tp 104 drivers/net/can/sja1000/sja1000_platform.c spin_lock_init(&tp->io_lock); tp 460 drivers/net/ethernet/3com/typhoon.c typhoon_hello(struct typhoon *tp) tp 462 drivers/net/ethernet/3com/typhoon.c struct basic_ring *ring = &tp->cmdRing; tp 469 drivers/net/ethernet/3com/typhoon.c if(spin_trylock(&tp->command_lock)) { tp 475 drivers/net/ethernet/3com/typhoon.c iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); tp 476 drivers/net/ethernet/3com/typhoon.c spin_unlock(&tp->command_lock); tp 481 drivers/net/ethernet/3com/typhoon.c typhoon_process_response(struct typhoon *tp, int resp_size, tp 484 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 486 drivers/net/ethernet/3com/typhoon.c u8 *base = tp->respRing.ringBase; tp 517 drivers/net/ethernet/3com/typhoon.c typhoon_media_status(tp->dev, resp); tp 519 drivers/net/ethernet/3com/typhoon.c typhoon_hello(tp); tp 521 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, tp 551 drivers/net/ethernet/3com/typhoon.c typhoon_num_free_cmd(struct typhoon *tp) tp 553 drivers/net/ethernet/3com/typhoon.c int lastWrite = tp->cmdRing.lastWrite; tp 554 drivers/net/ethernet/3com/typhoon.c int cmdCleared = le32_to_cpu(tp->indexes->cmdCleared); tp 560 drivers/net/ethernet/3com/typhoon.c typhoon_num_free_resp(struct typhoon *tp) tp 562 drivers/net/ethernet/3com/typhoon.c int respReady = le32_to_cpu(tp->indexes->respReady); tp 563 drivers/net/ethernet/3com/typhoon.c int respCleared = le32_to_cpu(tp->indexes->respCleared); tp 576 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(struct typhoon *tp, int num_cmd, struct cmd_desc *cmd, tp 579 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 580 drivers/net/ethernet/3com/typhoon.c struct basic_ring *ring = &tp->cmdRing; tp 587 drivers/net/ethernet/3com/typhoon.c spin_lock(&tp->command_lock); tp 589 drivers/net/ethernet/3com/typhoon.c freeCmd = typhoon_num_free_cmd(tp); tp 590 drivers/net/ethernet/3com/typhoon.c freeResp = typhoon_num_free_resp(tp); tp 593 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "no descs for cmd, had (needed) %d (%d) cmd, %d (%d) resp\n", tp 603 drivers/net/ethernet/3com/typhoon.c tp->awaiting_resp = 1; tp 629 drivers/net/ethernet/3com/typhoon.c iowrite32(ring->lastWrite, tp->ioaddr + TYPHOON_REG_CMD_READY); tp 630 drivers/net/ethernet/3com/typhoon.c typhoon_post_pci_writes(tp->ioaddr); tp 654 drivers/net/ethernet/3com/typhoon.c got_resp = typhoon_process_response(tp, num_resp, tp 671 drivers/net/ethernet/3com/typhoon.c if(tp->awaiting_resp) { tp 672 drivers/net/ethernet/3com/typhoon.c tp->awaiting_resp = 0; tp 683 drivers/net/ethernet/3com/typhoon.c iowrite32(1, tp->ioaddr + TYPHOON_REG_SELF_INTERRUPT); tp 686 drivers/net/ethernet/3com/typhoon.c spin_unlock(&tp->command_lock); tp 714 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 726 drivers/net/ethernet/3com/typhoon.c txRing = &tp->txLoRing; tp 783 drivers/net/ethernet/3com/typhoon.c typhoon_tso_fill(skb, txRing, tp->txlo_dma_addr); tp 793 drivers/net/ethernet/3com/typhoon.c skb_dma = pci_map_single(tp->tx_pdev, skb->data, skb->len, tp 804 drivers/net/ethernet/3com/typhoon.c skb_dma = pci_map_single(tp->tx_pdev, skb->data, len, tp 822 drivers/net/ethernet/3com/typhoon.c skb_dma = pci_map_single(tp->tx_pdev, frag_addr, len, tp 835 drivers/net/ethernet/3com/typhoon.c iowrite32(txRing->lastWrite, tp->tx_ioaddr + txRing->writeRegister); tp 861 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 887 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 894 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 898 drivers/net/ethernet/3com/typhoon.c typhoon_do_get_stats(struct typhoon *tp) tp 900 drivers/net/ethernet/3com/typhoon.c struct net_device_stats *stats = &tp->dev->stats; tp 901 drivers/net/ethernet/3com/typhoon.c struct net_device_stats *saved = &tp->stats_saved; tp 908 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 7, xp_resp); tp 941 drivers/net/ethernet/3com/typhoon.c tp->speed = (s->linkStatus & TYPHOON_LINK_100MBPS) ? tp 943 drivers/net/ethernet/3com/typhoon.c tp->duplex = (s->linkStatus & TYPHOON_LINK_FULL_DUPLEX) ? tp 952 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 953 drivers/net/ethernet/3com/typhoon.c struct net_device_stats *stats = &tp->dev->stats; tp 954 drivers/net/ethernet/3com/typhoon.c struct net_device_stats *saved = &tp->stats_saved; tp 957 drivers/net/ethernet/3com/typhoon.c if(tp->card_state == Sleeping) tp 960 drivers/net/ethernet/3com/typhoon.c if(typhoon_do_get_stats(tp) < 0) { tp 971 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 972 drivers/net/ethernet/3com/typhoon.c struct pci_dev *pci_dev = tp->pdev; tp 977 drivers/net/ethernet/3com/typhoon.c if(tp->card_state == Sleeping) { tp 982 drivers/net/ethernet/3com/typhoon.c if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) { tp 1001 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 1007 drivers/net/ethernet/3com/typhoon.c switch (tp->xcvr_select) { tp 1029 drivers/net/ethernet/3com/typhoon.c if(tp->capabilities & TYPHOON_FIBER) { tp 1042 drivers/net/ethernet/3com/typhoon.c typhoon_do_get_stats(tp); tp 1043 drivers/net/ethernet/3com/typhoon.c cmd->base.speed = tp->speed; tp 1044 drivers/net/ethernet/3com/typhoon.c cmd->base.duplex = tp->duplex; tp 1046 drivers/net/ethernet/3com/typhoon.c if(tp->xcvr_select == TYPHOON_XCVR_AUTONEG) tp 1063 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 1093 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1097 drivers/net/ethernet/3com/typhoon.c tp->xcvr_select = xcvr; tp 1099 drivers/net/ethernet/3com/typhoon.c tp->speed = 0xff; /* invalid */ tp 1100 drivers/net/ethernet/3com/typhoon.c tp->duplex = 0xff; /* invalid */ tp 1102 drivers/net/ethernet/3com/typhoon.c tp->speed = speed; tp 1103 drivers/net/ethernet/3com/typhoon.c tp->duplex = cmd->base.duplex; tp 1113 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 1117 drivers/net/ethernet/3com/typhoon.c if(tp->wol_events & TYPHOON_WAKE_LINK_EVENT) tp 1119 drivers/net/ethernet/3com/typhoon.c if(tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) tp 1127 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 1132 drivers/net/ethernet/3com/typhoon.c tp->wol_events = 0; tp 1134 drivers/net/ethernet/3com/typhoon.c tp->wol_events |= TYPHOON_WAKE_LINK_EVENT; tp 1136 drivers/net/ethernet/3com/typhoon.c tp->wol_events |= TYPHOON_WAKE_MAGIC_PKT; tp 1183 drivers/net/ethernet/3com/typhoon.c typhoon_init_interface(struct typhoon *tp) tp 1185 drivers/net/ethernet/3com/typhoon.c struct typhoon_interface *iface = &tp->shared->iface; tp 1188 drivers/net/ethernet/3com/typhoon.c memset(tp->shared, 0, sizeof(struct typhoon_shared)); tp 1192 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(indexes); tp 1195 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(txLo); tp 1199 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(txHi); tp 1203 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(rxBuff); tp 1208 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(rxLo); tp 1212 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(rxHi); tp 1216 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(cmd); tp 1220 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(resp); tp 1224 drivers/net/ethernet/3com/typhoon.c shared_dma = tp->shared_dma + shared_offset(zeroWord); tp 1227 drivers/net/ethernet/3com/typhoon.c tp->indexes = &tp->shared->indexes; tp 1228 drivers/net/ethernet/3com/typhoon.c tp->txLoRing.ringBase = (u8 *) tp->shared->txLo; tp 1229 drivers/net/ethernet/3com/typhoon.c tp->txHiRing.ringBase = (u8 *) tp->shared->txHi; tp 1230 drivers/net/ethernet/3com/typhoon.c tp->rxLoRing.ringBase = (u8 *) tp->shared->rxLo; tp 1231 drivers/net/ethernet/3com/typhoon.c tp->rxHiRing.ringBase = (u8 *) tp->shared->rxHi; tp 1232 drivers/net/ethernet/3com/typhoon.c tp->rxBuffRing.ringBase = (u8 *) tp->shared->rxBuff; tp 1233 drivers/net/ethernet/3com/typhoon.c tp->cmdRing.ringBase = (u8 *) tp->shared->cmd; tp 1234 drivers/net/ethernet/3com/typhoon.c tp->respRing.ringBase = (u8 *) tp->shared->resp; tp 1236 drivers/net/ethernet/3com/typhoon.c tp->txLoRing.writeRegister = TYPHOON_REG_TX_LO_READY; tp 1237 drivers/net/ethernet/3com/typhoon.c tp->txHiRing.writeRegister = TYPHOON_REG_TX_HI_READY; tp 1239 drivers/net/ethernet/3com/typhoon.c tp->txlo_dma_addr = le32_to_cpu(iface->txLoAddr); tp 1240 drivers/net/ethernet/3com/typhoon.c tp->card_state = Sleeping; tp 1242 drivers/net/ethernet/3com/typhoon.c tp->offload = TYPHOON_OFFLOAD_IP_CHKSUM | TYPHOON_OFFLOAD_TCP_CHKSUM; tp 1243 drivers/net/ethernet/3com/typhoon.c tp->offload |= TYPHOON_OFFLOAD_UDP_CHKSUM | TSO_OFFLOAD_ON; tp 1244 drivers/net/ethernet/3com/typhoon.c tp->offload |= TYPHOON_OFFLOAD_VLAN; tp 1246 drivers/net/ethernet/3com/typhoon.c spin_lock_init(&tp->command_lock); tp 1253 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(struct typhoon *tp) tp 1255 drivers/net/ethernet/3com/typhoon.c memset(tp->indexes, 0, sizeof(struct typhoon_indexes)); tp 1257 drivers/net/ethernet/3com/typhoon.c tp->txLoRing.lastWrite = 0; tp 1258 drivers/net/ethernet/3com/typhoon.c tp->txHiRing.lastWrite = 0; tp 1259 drivers/net/ethernet/3com/typhoon.c tp->rxLoRing.lastWrite = 0; tp 1260 drivers/net/ethernet/3com/typhoon.c tp->rxHiRing.lastWrite = 0; tp 1261 drivers/net/ethernet/3com/typhoon.c tp->rxBuffRing.lastWrite = 0; tp 1262 drivers/net/ethernet/3com/typhoon.c tp->cmdRing.lastWrite = 0; tp 1263 drivers/net/ethernet/3com/typhoon.c tp->respRing.lastWrite = 0; tp 1265 drivers/net/ethernet/3com/typhoon.c tp->txLoRing.lastRead = 0; tp 1266 drivers/net/ethernet/3com/typhoon.c tp->txHiRing.lastRead = 0; tp 1272 drivers/net/ethernet/3com/typhoon.c typhoon_request_firmware(struct typhoon *tp) tp 1285 drivers/net/ethernet/3com/typhoon.c err = request_firmware(&typhoon_fw, FIRMWARE_NAME, &tp->pdev->dev); tp 1287 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "Failed to load firmware \"%s\"\n", tp 1323 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "Invalid firmware image\n"); tp 1330 drivers/net/ethernet/3com/typhoon.c typhoon_download_firmware(struct typhoon *tp) tp 1332 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1333 drivers/net/ethernet/3com/typhoon.c struct pci_dev *pdev = tp->pdev; tp 1360 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "no DMA mem for firmware\n"); tp 1373 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "card ready timeout\n"); tp 1413 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "segment ready timeout\n"); tp 1446 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "final segment ready timeout\n"); tp 1453 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "boot ready timeout, status 0x%0x\n", tp 1471 drivers/net/ethernet/3com/typhoon.c typhoon_boot_3XP(struct typhoon *tp, u32 initial_status) tp 1473 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1476 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "boot ready timeout\n"); tp 1481 drivers/net/ethernet/3com/typhoon.c iowrite32(tp->shared_dma, ioaddr + TYPHOON_REG_BOOT_RECORD_ADDR_LO); tp 1487 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "boot finish timeout (status 0x%x)\n", tp 1507 drivers/net/ethernet/3com/typhoon.c typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing, tp 1531 drivers/net/ethernet/3com/typhoon.c pci_unmap_single(tp->pdev, skb_dma, dma_len, tp 1543 drivers/net/ethernet/3com/typhoon.c typhoon_tx_complete(struct typhoon *tp, struct transmit_ring *txRing, tp 1550 drivers/net/ethernet/3com/typhoon.c lastRead = typhoon_clean_tx(tp, txRing, index); tp 1551 drivers/net/ethernet/3com/typhoon.c if(netif_queue_stopped(tp->dev) && typhoon_num_free(txRing->lastWrite, tp 1553 drivers/net/ethernet/3com/typhoon.c netif_wake_queue(tp->dev); tp 1560 drivers/net/ethernet/3com/typhoon.c typhoon_recycle_rx_skb(struct typhoon *tp, u32 idx) tp 1562 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 1563 drivers/net/ethernet/3com/typhoon.c struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; tp 1564 drivers/net/ethernet/3com/typhoon.c struct basic_ring *ring = &tp->rxBuffRing; tp 1587 drivers/net/ethernet/3com/typhoon.c typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx) tp 1589 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 1590 drivers/net/ethernet/3com/typhoon.c struct rxbuff_ent *rxb = &tp->rxbuffers[idx]; tp 1591 drivers/net/ethernet/3com/typhoon.c struct basic_ring *ring = &tp->rxBuffRing; tp 1602 drivers/net/ethernet/3com/typhoon.c skb = netdev_alloc_skb(tp->dev, PKT_BUF_SZ); tp 1613 drivers/net/ethernet/3com/typhoon.c dma_addr = pci_map_single(tp->pdev, skb->data, tp 1633 drivers/net/ethernet/3com/typhoon.c typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * ready, tp 1653 drivers/net/ethernet/3com/typhoon.c rxb = &tp->rxbuffers[idx]; tp 1660 drivers/net/ethernet/3com/typhoon.c typhoon_recycle_rx_skb(tp, idx); tp 1667 drivers/net/ethernet/3com/typhoon.c (new_skb = netdev_alloc_skb(tp->dev, pkt_len + 2)) != NULL) { tp 1669 drivers/net/ethernet/3com/typhoon.c pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, tp 1673 drivers/net/ethernet/3com/typhoon.c pci_dma_sync_single_for_device(tp->pdev, dma_addr, tp 1677 drivers/net/ethernet/3com/typhoon.c typhoon_recycle_rx_skb(tp, idx); tp 1681 drivers/net/ethernet/3com/typhoon.c pci_unmap_single(tp->pdev, dma_addr, PKT_BUF_SZ, tp 1683 drivers/net/ethernet/3com/typhoon.c typhoon_alloc_rx_skb(tp, idx); tp 1685 drivers/net/ethernet/3com/typhoon.c new_skb->protocol = eth_type_trans(new_skb, tp->dev); tp 1710 drivers/net/ethernet/3com/typhoon.c typhoon_fill_free_ring(struct typhoon *tp) tp 1715 drivers/net/ethernet/3com/typhoon.c struct rxbuff_ent *rxb = &tp->rxbuffers[i]; tp 1718 drivers/net/ethernet/3com/typhoon.c if(typhoon_alloc_rx_skb(tp, i) < 0) tp 1726 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = container_of(napi, struct typhoon, napi); tp 1727 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 1731 drivers/net/ethernet/3com/typhoon.c if(!tp->awaiting_resp && indexes->respReady != indexes->respCleared) tp 1732 drivers/net/ethernet/3com/typhoon.c typhoon_process_response(tp, 0, NULL); tp 1734 drivers/net/ethernet/3com/typhoon.c if(le32_to_cpu(indexes->txLoCleared) != tp->txLoRing.lastRead) tp 1735 drivers/net/ethernet/3com/typhoon.c typhoon_tx_complete(tp, &tp->txLoRing, &indexes->txLoCleared); tp 1740 drivers/net/ethernet/3com/typhoon.c work_done += typhoon_rx(tp, &tp->rxHiRing, &indexes->rxHiReady, tp 1745 drivers/net/ethernet/3com/typhoon.c work_done += typhoon_rx(tp, &tp->rxLoRing, &indexes->rxLoReady, tp 1749 drivers/net/ethernet/3com/typhoon.c if(le32_to_cpu(indexes->rxBuffCleared) == tp->rxBuffRing.lastWrite) { tp 1751 drivers/net/ethernet/3com/typhoon.c typhoon_fill_free_ring(tp); tp 1757 drivers/net/ethernet/3com/typhoon.c tp->ioaddr + TYPHOON_REG_INTR_MASK); tp 1758 drivers/net/ethernet/3com/typhoon.c typhoon_post_pci_writes(tp->ioaddr); tp 1768 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 1769 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1778 drivers/net/ethernet/3com/typhoon.c if (napi_schedule_prep(&tp->napi)) { tp 1781 drivers/net/ethernet/3com/typhoon.c __napi_schedule(&tp->napi); tp 1789 drivers/net/ethernet/3com/typhoon.c typhoon_free_rx_rings(struct typhoon *tp) tp 1794 drivers/net/ethernet/3com/typhoon.c struct rxbuff_ent *rxb = &tp->rxbuffers[i]; tp 1796 drivers/net/ethernet/3com/typhoon.c pci_unmap_single(tp->pdev, rxb->dma_addr, PKT_BUF_SZ, tp 1805 drivers/net/ethernet/3com/typhoon.c typhoon_sleep(struct typhoon *tp, pci_power_t state, __le16 events) tp 1807 drivers/net/ethernet/3com/typhoon.c struct pci_dev *pdev = tp->pdev; tp 1808 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1814 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1816 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "typhoon_sleep(): wake events cmd err %d\n", tp 1822 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1824 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "typhoon_sleep(): sleep cmd err %d\n", err); tp 1834 drivers/net/ethernet/3com/typhoon.c netif_carrier_off(tp->dev); tp 1836 drivers/net/ethernet/3com/typhoon.c pci_enable_wake(tp->pdev, state, 1); tp 1842 drivers/net/ethernet/3com/typhoon.c typhoon_wakeup(struct typhoon *tp, int wait_type) tp 1844 drivers/net/ethernet/3com/typhoon.c struct pci_dev *pdev = tp->pdev; tp 1845 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1856 drivers/net/ethernet/3com/typhoon.c (tp->capabilities & TYPHOON_WAKEUP_NEEDS_RESET)) tp 1863 drivers/net/ethernet/3com/typhoon.c typhoon_start_runtime(struct typhoon *tp) tp 1865 drivers/net/ethernet/3com/typhoon.c struct net_device *dev = tp->dev; tp 1866 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1870 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(tp); tp 1871 drivers/net/ethernet/3com/typhoon.c typhoon_fill_free_ring(tp); tp 1873 drivers/net/ethernet/3com/typhoon.c err = typhoon_download_firmware(tp); tp 1875 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "cannot load runtime on 3XP\n"); tp 1879 drivers/net/ethernet/3com/typhoon.c if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_BOOT) < 0) { tp 1880 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "cannot boot 3XP\n"); tp 1887 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1894 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1903 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1908 drivers/net/ethernet/3com/typhoon.c xp_cmd.parm1 = tp->xcvr_select; tp 1909 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1915 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1920 drivers/net/ethernet/3com/typhoon.c xp_cmd.parm2 = tp->offload; tp 1921 drivers/net/ethernet/3com/typhoon.c xp_cmd.parm3 = tp->offload; tp 1922 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1929 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1934 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1938 drivers/net/ethernet/3com/typhoon.c tp->card_state = Running; tp 1949 drivers/net/ethernet/3com/typhoon.c typhoon_free_rx_rings(tp); tp 1950 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(tp); tp 1955 drivers/net/ethernet/3com/typhoon.c typhoon_stop_runtime(struct typhoon *tp, int wait_type) tp 1957 drivers/net/ethernet/3com/typhoon.c struct typhoon_indexes *indexes = tp->indexes; tp 1958 drivers/net/ethernet/3com/typhoon.c struct transmit_ring *txLo = &tp->txLoRing; tp 1959 drivers/net/ethernet/3com/typhoon.c void __iomem *ioaddr = tp->ioaddr; tp 1970 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1982 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "halt timed out waiting for Tx to complete\n"); tp 1985 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1990 drivers/net/ethernet/3com/typhoon.c tp->card_state = Sleeping; tp 1992 drivers/net/ethernet/3com/typhoon.c typhoon_do_get_stats(tp); tp 1993 drivers/net/ethernet/3com/typhoon.c memcpy(&tp->stats_saved, &tp->dev->stats, sizeof(struct net_device_stats)); tp 1996 drivers/net/ethernet/3com/typhoon.c typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); tp 1999 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "timed out waiting for 3XP to halt\n"); tp 2002 drivers/net/ethernet/3com/typhoon.c netdev_err(tp->dev, "unable to reset 3XP\n"); tp 2009 drivers/net/ethernet/3com/typhoon.c typhoon_clean_tx(tp, &tp->txLoRing, &indexes->txLoCleared); tp 2018 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2020 drivers/net/ethernet/3com/typhoon.c if(typhoon_reset(tp->ioaddr, WaitNoSleep) < 0) { tp 2026 drivers/net/ethernet/3com/typhoon.c typhoon_clean_tx(tp, &tp->txLoRing, &tp->indexes->txLoCleared); tp 2027 drivers/net/ethernet/3com/typhoon.c typhoon_free_rx_rings(tp); tp 2029 drivers/net/ethernet/3com/typhoon.c if(typhoon_start_runtime(tp) < 0) { tp 2039 drivers/net/ethernet/3com/typhoon.c typhoon_reset(tp->ioaddr, NoWait); tp 2046 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2049 drivers/net/ethernet/3com/typhoon.c err = typhoon_request_firmware(tp); tp 2053 drivers/net/ethernet/3com/typhoon.c err = typhoon_wakeup(tp, WaitSleep); tp 2064 drivers/net/ethernet/3com/typhoon.c napi_enable(&tp->napi); tp 2066 drivers/net/ethernet/3com/typhoon.c err = typhoon_start_runtime(tp); tp 2068 drivers/net/ethernet/3com/typhoon.c napi_disable(&tp->napi); tp 2079 drivers/net/ethernet/3com/typhoon.c if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { tp 2081 drivers/net/ethernet/3com/typhoon.c typhoon_reset(tp->ioaddr, NoWait); tp 2085 drivers/net/ethernet/3com/typhoon.c if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) tp 2095 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2098 drivers/net/ethernet/3com/typhoon.c napi_disable(&tp->napi); tp 2100 drivers/net/ethernet/3com/typhoon.c if(typhoon_stop_runtime(tp, WaitSleep) < 0) tp 2106 drivers/net/ethernet/3com/typhoon.c typhoon_free_rx_rings(tp); tp 2107 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(tp); tp 2109 drivers/net/ethernet/3com/typhoon.c if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) tp 2112 drivers/net/ethernet/3com/typhoon.c if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) tp 2123 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2130 drivers/net/ethernet/3com/typhoon.c if(typhoon_wakeup(tp, WaitNoSleep) < 0) { tp 2135 drivers/net/ethernet/3com/typhoon.c if(typhoon_start_runtime(tp) < 0) { tp 2144 drivers/net/ethernet/3com/typhoon.c typhoon_reset(tp->ioaddr, NoWait); tp 2152 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2161 drivers/net/ethernet/3com/typhoon.c if(tp->wol_events & TYPHOON_WAKE_MAGIC_PKT) tp 2166 drivers/net/ethernet/3com/typhoon.c if(typhoon_stop_runtime(tp, WaitNoSleep) < 0) { tp 2171 drivers/net/ethernet/3com/typhoon.c typhoon_free_rx_rings(tp); tp 2172 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(tp); tp 2174 drivers/net/ethernet/3com/typhoon.c if(typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST) < 0) { tp 2182 drivers/net/ethernet/3com/typhoon.c if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { tp 2189 drivers/net/ethernet/3com/typhoon.c if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { tp 2194 drivers/net/ethernet/3com/typhoon.c if(typhoon_sleep(tp, pci_choose_state(pdev, state), tp->wol_events) < 0) { tp 2268 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp; tp 2278 drivers/net/ethernet/3com/typhoon.c dev = alloc_etherdev(sizeof(*tp)); tp 2356 drivers/net/ethernet/3com/typhoon.c tp = netdev_priv(dev); tp 2357 drivers/net/ethernet/3com/typhoon.c tp->shared = shared; tp 2358 drivers/net/ethernet/3com/typhoon.c tp->shared_dma = shared_dma; tp 2359 drivers/net/ethernet/3com/typhoon.c tp->pdev = pdev; tp 2360 drivers/net/ethernet/3com/typhoon.c tp->tx_pdev = pdev; tp 2361 drivers/net/ethernet/3com/typhoon.c tp->ioaddr = ioaddr; tp 2362 drivers/net/ethernet/3com/typhoon.c tp->tx_ioaddr = ioaddr; tp 2363 drivers/net/ethernet/3com/typhoon.c tp->dev = dev; tp 2385 drivers/net/ethernet/3com/typhoon.c typhoon_init_interface(tp); tp 2386 drivers/net/ethernet/3com/typhoon.c typhoon_init_rings(tp); tp 2388 drivers/net/ethernet/3com/typhoon.c err = typhoon_boot_3XP(tp, TYPHOON_STATUS_WAITING_FOR_HOST); tp 2395 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 1, xp_resp); tp 2414 drivers/net/ethernet/3com/typhoon.c err = typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp); tp 2420 drivers/net/ethernet/3com/typhoon.c tp->capabilities = typhoon_card_info[card_id].capabilities; tp 2421 drivers/net/ethernet/3com/typhoon.c tp->xcvr_select = TYPHOON_XCVR_AUTONEG; tp 2430 drivers/net/ethernet/3com/typhoon.c tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET; tp 2432 drivers/net/ethernet/3com/typhoon.c err = typhoon_sleep(tp, PCI_D3hot, 0); tp 2440 drivers/net/ethernet/3com/typhoon.c netif_napi_add(dev, &tp->napi, typhoon_poll, 16); tp 2522 drivers/net/ethernet/3com/typhoon.c struct typhoon *tp = netdev_priv(dev); tp 2527 drivers/net/ethernet/3com/typhoon.c typhoon_reset(tp->ioaddr, NoWait); tp 2528 drivers/net/ethernet/3com/typhoon.c pci_iounmap(pdev, tp->ioaddr); tp 2530 drivers/net/ethernet/3com/typhoon.c tp->shared, tp->shared_dma); tp 163 drivers/net/ethernet/8390/mac8390.c static void word_memcpy_tocard(unsigned long tp, const void *fp, int count); tp 164 drivers/net/ethernet/8390/mac8390.c static void word_memcpy_fromcard(void *tp, unsigned long fp, int count); tp 832 drivers/net/ethernet/8390/mac8390.c static void word_memcpy_tocard(unsigned long tp, const void *fp, int count) tp 834 drivers/net/ethernet/8390/mac8390.c volatile unsigned short *to = (void *)tp; tp 844 drivers/net/ethernet/8390/mac8390.c static void word_memcpy_fromcard(void *tp, unsigned long fp, int count) tp 846 drivers/net/ethernet/8390/mac8390.c unsigned short *to = tp; tp 330 drivers/net/ethernet/amd/declance.c unsigned short *tp; tp 340 drivers/net/ethernet/amd/declance.c tp = to; tp 344 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 345 drivers/net/ethernet/amd/declance.c tp++; tp 349 drivers/net/ethernet/amd/declance.c rtp = (unsigned char *)tp; tp 359 drivers/net/ethernet/amd/declance.c tp = to; tp 362 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 363 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 364 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 365 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 366 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 367 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 368 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 369 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 370 drivers/net/ethernet/amd/declance.c tp += 8; tp 377 drivers/net/ethernet/amd/declance.c rtp = (unsigned char *)tp; tp 389 drivers/net/ethernet/amd/declance.c unsigned short *tp; tp 399 drivers/net/ethernet/amd/declance.c tp = to; tp 402 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 408 drivers/net/ethernet/amd/declance.c rtp = (unsigned char *)tp; tp 420 drivers/net/ethernet/amd/declance.c tp = to; tp 423 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 424 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 425 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 426 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 427 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 428 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 429 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 430 drivers/net/ethernet/amd/declance.c *tp++ = *fp++; tp 438 drivers/net/ethernet/amd/declance.c rtp = (unsigned char *)tp; tp 91 drivers/net/ethernet/broadcom/tg3.c #define tg3_flag(tp, flag) \ tp 92 drivers/net/ethernet/broadcom/tg3.c _tg3_flag(TG3_FLAG_##flag, (tp)->tg3_flags) tp 93 drivers/net/ethernet/broadcom/tg3.c #define tg3_flag_set(tp, flag) \ tp 94 drivers/net/ethernet/broadcom/tg3.c _tg3_flag_set(TG3_FLAG_##flag, (tp)->tg3_flags) tp 95 drivers/net/ethernet/broadcom/tg3.c #define tg3_flag_clear(tp, flag) \ tp 96 drivers/net/ethernet/broadcom/tg3.c _tg3_flag_clear(TG3_FLAG_##flag, (tp)->tg3_flags) tp 131 drivers/net/ethernet/broadcom/tg3.c #define TG3_MAX_MTU(tp) \ tp 132 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, JUMBO_CAPABLE) ? 9000 : 1500) tp 138 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_STD_RING_SIZE(tp) \ tp 139 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, LRG_PROD_RING_CAP) ? \ tp 142 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_JMB_RING_SIZE(tp) \ tp 143 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, LRG_PROD_RING_CAP) ? \ tp 157 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_STD_RING_BYTES(tp) \ tp 158 drivers/net/ethernet/broadcom/tg3.c (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_STD_RING_SIZE(tp)) tp 159 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_JMB_RING_BYTES(tp) \ tp 160 drivers/net/ethernet/broadcom/tg3.c (sizeof(struct tg3_ext_rx_buffer_desc) * TG3_RX_JMB_RING_SIZE(tp)) tp 161 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_RCB_RING_BYTES(tp) \ tp 162 drivers/net/ethernet/broadcom/tg3.c (sizeof(struct tg3_rx_buffer_desc) * (tp->rx_ret_ring_mask + 1)) tp 177 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_STD_BUFF_RING_SIZE(tp) \ tp 178 drivers/net/ethernet/broadcom/tg3.c (sizeof(struct ring_info) * TG3_RX_STD_RING_SIZE(tp)) tp 180 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_JMB_BUFF_RING_SIZE(tp) \ tp 181 drivers/net/ethernet/broadcom/tg3.c (sizeof(struct ring_info) * TG3_RX_JMB_RING_SIZE(tp)) tp 196 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_COPY_THRESH(tp) TG3_RX_COPY_THRESHOLD tp 198 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_COPY_THRESH(tp) ((tp)->rx_copy_thresh) tp 202 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_OFFSET(tp) ((tp)->rx_offset) tp 204 drivers/net/ethernet/broadcom/tg3.c #define TG3_RX_OFFSET(tp) (NET_SKB_PAD) tp 214 drivers/net/ethernet/broadcom/tg3.c #define TG3_MAX_UCAST_ADDR(tp) (tg3_flag((tp), ENABLE_ASF) ? 2 : 3) tp 215 drivers/net/ethernet/broadcom/tg3.c #define TG3_UCAST_ADDR_IDX(tp) (tg3_flag((tp), ENABLE_ASF) ? 2 : 1) tp 474 drivers/net/ethernet/broadcom/tg3.c static void tg3_write32(struct tg3 *tp, u32 off, u32 val) tp 476 drivers/net/ethernet/broadcom/tg3.c writel(val, tp->regs + off); tp 479 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_read32(struct tg3 *tp, u32 off) tp 481 drivers/net/ethernet/broadcom/tg3.c return readl(tp->regs + off); tp 484 drivers/net/ethernet/broadcom/tg3.c static void tg3_ape_write32(struct tg3 *tp, u32 off, u32 val) tp 486 drivers/net/ethernet/broadcom/tg3.c writel(val, tp->aperegs + off); tp 489 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_ape_read32(struct tg3 *tp, u32 off) tp 491 drivers/net/ethernet/broadcom/tg3.c return readl(tp->aperegs + off); tp 494 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) tp 498 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 499 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off); tp 500 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val); tp 501 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 504 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_flush_reg32(struct tg3 *tp, u32 off, u32 val) tp 506 drivers/net/ethernet/broadcom/tg3.c writel(val, tp->regs + off); tp 507 drivers/net/ethernet/broadcom/tg3.c readl(tp->regs + off); tp 510 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_read_indirect_reg32(struct tg3 *tp, u32 off) tp 515 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 516 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off); tp 517 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_REG_DATA, &val); tp 518 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 522 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_indirect_mbox(struct tg3 *tp, u32 off, u32 val) tp 527 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_RCV_RET_RING_CON_IDX + tp 532 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_STD_RING_PROD_IDX + tp 537 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 538 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off + 0x5600); tp 539 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val); tp 540 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 547 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MISC_LOCAL_CTRL, tp 548 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl|GRC_LCLCTRL_CLEARINT); tp 552 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) tp 557 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 558 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off + 0x5600); tp 559 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_REG_DATA, &val); tp 560 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 569 drivers/net/ethernet/broadcom/tg3.c static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) tp 571 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_TARGET_HWBUG) || tg3_flag(tp, ICH_WORKAROUND)) tp 573 drivers/net/ethernet/broadcom/tg3.c tp->write32(tp, off, val); tp 576 drivers/net/ethernet/broadcom/tg3.c tg3_write32(tp, off, val); tp 579 drivers/net/ethernet/broadcom/tg3.c tp->read32(tp, off); tp 588 drivers/net/ethernet/broadcom/tg3.c static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) tp 590 drivers/net/ethernet/broadcom/tg3.c tp->write32_mbox(tp, off, val); tp 591 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, FLUSH_POSTED_WRITES) || tp 592 drivers/net/ethernet/broadcom/tg3.c (!tg3_flag(tp, MBOX_WRITE_REORDER) && tp 593 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, ICH_WORKAROUND))) tp 594 drivers/net/ethernet/broadcom/tg3.c tp->read32_mbox(tp, off); tp 597 drivers/net/ethernet/broadcom/tg3.c static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) tp 599 drivers/net/ethernet/broadcom/tg3.c void __iomem *mbox = tp->regs + off; tp 601 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TXD_MBOX_HWBUG)) tp 603 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, MBOX_WRITE_REORDER) || tp 604 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, FLUSH_POSTED_WRITES)) tp 608 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_read32_mbox_5906(struct tg3 *tp, u32 off) tp 610 drivers/net/ethernet/broadcom/tg3.c return readl(tp->regs + off + GRCMBOX_BASE); tp 613 drivers/net/ethernet/broadcom/tg3.c static void tg3_write32_mbox_5906(struct tg3 *tp, u32 off, u32 val) tp 615 drivers/net/ethernet/broadcom/tg3.c writel(val, tp->regs + off + GRCMBOX_BASE); tp 618 drivers/net/ethernet/broadcom/tg3.c #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) tp 619 drivers/net/ethernet/broadcom/tg3.c #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) tp 620 drivers/net/ethernet/broadcom/tg3.c #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) tp 621 drivers/net/ethernet/broadcom/tg3.c #define tw32_tx_mbox(reg, val) tp->write32_tx_mbox(tp, reg, val) tp 622 drivers/net/ethernet/broadcom/tg3.c #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) tp 624 drivers/net/ethernet/broadcom/tg3.c #define tw32(reg, val) tp->write32(tp, reg, val) tp 625 drivers/net/ethernet/broadcom/tg3.c #define tw32_f(reg, val) _tw32_flush(tp, (reg), (val), 0) tp 626 drivers/net/ethernet/broadcom/tg3.c #define tw32_wait_f(reg, val, us) _tw32_flush(tp, (reg), (val), (us)) tp 627 drivers/net/ethernet/broadcom/tg3.c #define tr32(reg) tp->read32(tp, reg) tp 629 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) tp 633 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906 && tp 637 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 638 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SRAM_USE_CONFIG)) { tp 639 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); tp 640 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val); tp 643 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); tp 651 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 654 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val) tp 658 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906 && tp 664 drivers/net/ethernet/broadcom/tg3.c spin_lock_irqsave(&tp->indirect_lock, flags); tp 665 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SRAM_USE_CONFIG)) { tp 666 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); tp 667 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val); tp 670 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); tp 678 drivers/net/ethernet/broadcom/tg3.c spin_unlock_irqrestore(&tp->indirect_lock, flags); tp 681 drivers/net/ethernet/broadcom/tg3.c static void tg3_ape_lock_init(struct tg3 *tp) tp 686 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 701 drivers/net/ethernet/broadcom/tg3.c if (!tp->pci_fn) tp 704 drivers/net/ethernet/broadcom/tg3.c bit = 1 << tp->pci_fn; tp 706 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, regbase + 4 * i, bit); tp 711 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_lock(struct tg3 *tp, int locknum) tp 717 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_APE)) tp 722 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 727 drivers/net/ethernet/broadcom/tg3.c if (!tp->pci_fn) tp 730 drivers/net/ethernet/broadcom/tg3.c bit = 1 << tp->pci_fn; tp 742 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) { tp 752 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, req + off, bit); tp 756 drivers/net/ethernet/broadcom/tg3.c status = tg3_ape_read32(tp, gnt + off); tp 759 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) tp 767 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, gnt + off, bit); tp 774 drivers/net/ethernet/broadcom/tg3.c static void tg3_ape_unlock(struct tg3 *tp, int locknum) tp 778 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_APE)) tp 783 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 788 drivers/net/ethernet/broadcom/tg3.c if (!tp->pci_fn) tp 791 drivers/net/ethernet/broadcom/tg3.c bit = 1 << tp->pci_fn; tp 803 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 808 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, gnt + 4 * locknum, bit); tp 811 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us) tp 816 drivers/net/ethernet/broadcom/tg3.c if (tg3_ape_lock(tp, TG3_APE_LOCK_MEM)) tp 819 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_EVENT_STATUS); tp 823 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_MEM); tp 833 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_wait_for_event(struct tg3 *tp, u32 timeout_us) tp 838 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_EVENT_STATUS); tp 849 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_scratchpad_read(struct tg3 *tp, u32 *data, u32 base_off, tp 855 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, APE_HAS_NCSI)) tp 858 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG); tp 862 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); tp 866 drivers/net/ethernet/broadcom/tg3.c bufoff = tg3_ape_read32(tp, TG3_APE_SEG_MSG_BUF_OFF) + tp 869 drivers/net/ethernet/broadcom/tg3.c maxlen = tg3_ape_read32(tp, TG3_APE_SEG_MSG_BUF_LEN); tp 878 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); tp 883 drivers/net/ethernet/broadcom/tg3.c err = tg3_ape_event_lock(tp, 1000); tp 890 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_EVENT_STATUS, apedata); tp 892 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, bufoff, base_off); tp 893 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, bufoff + sizeof(u32), length); tp 895 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_MEM); tp 896 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_EVENT, APE_EVENT_1); tp 900 drivers/net/ethernet/broadcom/tg3.c if (tg3_ape_wait_for_event(tp, 30000)) tp 904 drivers/net/ethernet/broadcom/tg3.c u32 val = tg3_ape_read32(tp, msgoff + i); tp 914 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_send_event(struct tg3 *tp, u32 event) tp 919 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG); tp 923 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); tp 928 drivers/net/ethernet/broadcom/tg3.c err = tg3_ape_event_lock(tp, 20000); tp 932 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_EVENT_STATUS, tp 935 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_MEM); tp 936 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_EVENT, APE_EVENT_1); tp 941 drivers/net/ethernet/broadcom/tg3.c static void tg3_ape_driver_state_change(struct tg3 *tp, int kind) tp 946 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_APE)) tp 951 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++); tp 952 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, tp 954 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN, tp 956 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT); tp 957 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata); tp 958 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID, tp 960 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR, tp 962 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_DRVR_STATE, tp 968 drivers/net/ethernet/broadcom/tg3.c if (device_may_wakeup(&tp->pdev->dev) && tp 969 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, WOL_ENABLE)) { tp 970 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_WOL_SPEED, tp 976 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_DRVR_STATE, apedata); tp 986 drivers/net/ethernet/broadcom/tg3.c tg3_ape_send_event(tp, event); tp 989 drivers/net/ethernet/broadcom/tg3.c static void tg3_send_ape_heartbeat(struct tg3 *tp, tp 993 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_APE) || tp 994 drivers/net/ethernet/broadcom/tg3.c time_before(jiffies, tp->ape_hb_jiffies + interval)) tp 997 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++); tp 998 drivers/net/ethernet/broadcom/tg3.c tp->ape_hb_jiffies = jiffies; tp 1001 drivers/net/ethernet/broadcom/tg3.c static void tg3_disable_ints(struct tg3 *tp) tp 1006 drivers/net/ethernet/broadcom/tg3.c (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); tp 1007 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) tp 1008 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox_f(tp->napi[i].int_mbox, 0x00000001); tp 1011 drivers/net/ethernet/broadcom/tg3.c static void tg3_enable_ints(struct tg3 *tp) tp 1015 drivers/net/ethernet/broadcom/tg3.c tp->irq_sync = 0; tp 1019 drivers/net/ethernet/broadcom/tg3.c (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); tp 1021 drivers/net/ethernet/broadcom/tg3.c tp->coal_now = tp->coalesce_mode | HOSTCC_MODE_ENABLE; tp 1022 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 1023 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 1026 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 1SHOT_MSI)) tp 1029 drivers/net/ethernet/broadcom/tg3.c tp->coal_now |= tnapi->coal_now; tp 1033 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, TAGGED_STATUS) && tp 1034 drivers/net/ethernet/broadcom/tg3.c (tp->napi[0].hw_status->status & SD_STATUS_UPDATED)) tp 1035 drivers/net/ethernet/broadcom/tg3.c tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl | GRC_LCLCTRL_SETINT); tp 1037 drivers/net/ethernet/broadcom/tg3.c tw32(HOSTCC_MODE, tp->coal_now); tp 1039 drivers/net/ethernet/broadcom/tg3.c tp->coal_now &= ~(tp->napi[0].coal_now | tp->napi[1].coal_now); tp 1044 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 1049 drivers/net/ethernet/broadcom/tg3.c if (!(tg3_flag(tp, USE_LINKCHG_REG) || tg3_flag(tp, POLL_SERDES))) { tp 1073 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 1081 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, TAGGED_STATUS) && tg3_has_work(tnapi)) tp 1082 drivers/net/ethernet/broadcom/tg3.c tw32(HOSTCC_MODE, tp->coalesce_mode | tp 1086 drivers/net/ethernet/broadcom/tg3.c static void tg3_switch_clocks(struct tg3 *tp) tp 1091 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CPMU_PRESENT) || tg3_flag(tp, 5780_CLASS)) tp 1100 drivers/net/ethernet/broadcom/tg3.c tp->pci_clock_ctrl = clock_ctrl; tp 1102 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS)) { tp 1121 drivers/net/ethernet/broadcom/tg3.c static int __tg3_readphy(struct tg3 *tp, unsigned int phy_addr, int reg, tp 1128 drivers/net/ethernet/broadcom/tg3.c if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { tp 1130 drivers/net/ethernet/broadcom/tg3.c (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL)); tp 1134 drivers/net/ethernet/broadcom/tg3.c tg3_ape_lock(tp, tp->phy_ape_lock); tp 1165 drivers/net/ethernet/broadcom/tg3.c if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { tp 1166 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MI_MODE, tp->mi_mode); tp 1170 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, tp->phy_ape_lock); tp 1175 drivers/net/ethernet/broadcom/tg3.c static int tg3_readphy(struct tg3 *tp, int reg, u32 *val) tp 1177 drivers/net/ethernet/broadcom/tg3.c return __tg3_readphy(tp, tp->phy_addr, reg, val); tp 1180 drivers/net/ethernet/broadcom/tg3.c static int __tg3_writephy(struct tg3 *tp, unsigned int phy_addr, int reg, tp 1187 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_IS_FET) && tp 1191 drivers/net/ethernet/broadcom/tg3.c if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { tp 1193 drivers/net/ethernet/broadcom/tg3.c (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL)); tp 1197 drivers/net/ethernet/broadcom/tg3.c tg3_ape_lock(tp, tp->phy_ape_lock); tp 1224 drivers/net/ethernet/broadcom/tg3.c if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { tp 1225 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MI_MODE, tp->mi_mode); tp 1229 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, tp->phy_ape_lock); tp 1234 drivers/net/ethernet/broadcom/tg3.c static int tg3_writephy(struct tg3 *tp, int reg, u32 val) tp 1236 drivers/net/ethernet/broadcom/tg3.c return __tg3_writephy(tp, tp->phy_addr, reg, val); tp 1239 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_cl45_write(struct tg3 *tp, u32 devad, u32 addr, u32 val) tp 1243 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); tp 1247 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, addr); tp 1251 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_CTRL, tp 1256 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, val); tp 1262 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_cl45_read(struct tg3 *tp, u32 devad, u32 addr, u32 *val) tp 1266 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_CTRL, devad); tp 1270 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_ADDRESS, addr); tp 1274 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_MMD_CTRL, tp 1279 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_TG3_MMD_ADDRESS, val); tp 1285 drivers/net/ethernet/broadcom/tg3.c static int tg3_phydsp_read(struct tg3 *tp, u32 reg, u32 *val) tp 1289 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg); tp 1291 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_TG3_DSP_RW_PORT, val); tp 1296 drivers/net/ethernet/broadcom/tg3.c static int tg3_phydsp_write(struct tg3 *tp, u32 reg, u32 val) tp 1300 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, reg); tp 1302 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val); tp 1307 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_auxctl_read(struct tg3 *tp, int reg, u32 *val) tp 1311 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_TG3_AUX_CTRL, tp 1315 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_TG3_AUX_CTRL, val); tp 1320 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_auxctl_write(struct tg3 *tp, int reg, u32 set) tp 1325 drivers/net/ethernet/broadcom/tg3.c return tg3_writephy(tp, MII_TG3_AUX_CTRL, set | reg); tp 1328 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_toggle_auxctl_smdsp(struct tg3 *tp, bool enable) tp 1333 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, &val); tp 1343 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_write((tp), MII_TG3_AUXCTL_SHDWSEL_AUXCTL, tp 1349 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_shdw_write(struct tg3 *tp, int reg, u32 val) tp 1351 drivers/net/ethernet/broadcom/tg3.c return tg3_writephy(tp, MII_TG3_MISC_SHDW, tp 1355 drivers/net/ethernet/broadcom/tg3.c static int tg3_bmcr_reset(struct tg3 *tp) tp 1364 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_BMCR, phy_control); tp 1370 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_BMCR, &phy_control); tp 1388 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = bp->priv; tp 1391 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 1393 drivers/net/ethernet/broadcom/tg3.c if (__tg3_readphy(tp, mii_id, reg, &val)) tp 1396 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 1403 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = bp->priv; tp 1406 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 1408 drivers/net/ethernet/broadcom/tg3.c if (__tg3_writephy(tp, mii_id, reg, val)) tp 1411 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 1416 drivers/net/ethernet/broadcom/tg3.c static void tg3_mdio_config_5785(struct tg3 *tp) tp 1421 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 1452 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, RGMII_INBAND_DISABLE)) tp 1465 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, RGMII_INBAND_DISABLE)) { tp 1466 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN)) tp 1468 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN)) tp 1483 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, RGMII_INBAND_DISABLE)) { tp 1484 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN)) tp 1489 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN)) tp 1497 drivers/net/ethernet/broadcom/tg3.c static void tg3_mdio_start(struct tg3 *tp) tp 1499 drivers/net/ethernet/broadcom/tg3.c tp->mi_mode &= ~MAC_MI_MODE_AUTO_POLL; tp 1500 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MI_MODE, tp->mi_mode); tp 1503 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, MDIOBUS_INITED) && tp 1504 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785) tp 1505 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_config_5785(tp); tp 1508 drivers/net/ethernet/broadcom/tg3.c static int tg3_mdio_init(struct tg3 *tp) tp 1514 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5717_PLUS)) { tp 1517 drivers/net/ethernet/broadcom/tg3.c tp->phy_addr = tp->pci_fn + 1; tp 1519 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5717_A0) tp 1525 drivers/net/ethernet/broadcom/tg3.c tp->phy_addr += 7; tp 1526 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, IS_SSB_CORE) && tg3_flag(tp, ROBOSWITCH)) { tp 1529 drivers/net/ethernet/broadcom/tg3.c addr = ssb_gige_get_phyaddr(tp->pdev); tp 1532 drivers/net/ethernet/broadcom/tg3.c tp->phy_addr = addr; tp 1534 drivers/net/ethernet/broadcom/tg3.c tp->phy_addr = TG3_PHY_MII_ADDR; tp 1536 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_start(tp); tp 1538 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, USE_PHYLIB) || tg3_flag(tp, MDIOBUS_INITED)) tp 1541 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus = mdiobus_alloc(); tp 1542 drivers/net/ethernet/broadcom/tg3.c if (tp->mdio_bus == NULL) tp 1545 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->name = "tg3 mdio bus"; tp 1546 drivers/net/ethernet/broadcom/tg3.c snprintf(tp->mdio_bus->id, MII_BUS_ID_SIZE, "%x", tp 1547 drivers/net/ethernet/broadcom/tg3.c (tp->pdev->bus->number << 8) | tp->pdev->devfn); tp 1548 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->priv = tp; tp 1549 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->parent = &tp->pdev->dev; tp 1550 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->read = &tg3_mdio_read; tp 1551 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->write = &tg3_mdio_write; tp 1552 drivers/net/ethernet/broadcom/tg3.c tp->mdio_bus->phy_mask = ~(1 << tp->phy_addr); tp 1559 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_BMCR, ®) || (reg & BMCR_PDOWN)) tp 1560 drivers/net/ethernet/broadcom/tg3.c tg3_bmcr_reset(tp); tp 1562 drivers/net/ethernet/broadcom/tg3.c i = mdiobus_register(tp->mdio_bus); tp 1564 drivers/net/ethernet/broadcom/tg3.c dev_warn(&tp->pdev->dev, "mdiobus_reg failed (0x%x)\n", i); tp 1565 drivers/net/ethernet/broadcom/tg3.c mdiobus_free(tp->mdio_bus); tp 1569 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 1572 drivers/net/ethernet/broadcom/tg3.c dev_warn(&tp->pdev->dev, "No PHY devices\n"); tp 1573 drivers/net/ethernet/broadcom/tg3.c mdiobus_unregister(tp->mdio_bus); tp 1574 drivers/net/ethernet/broadcom/tg3.c mdiobus_free(tp->mdio_bus); tp 1589 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_INBAND_DISABLE)) tp 1591 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_RX_EN)) tp 1593 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_EXT_IBND_TX_EN)) tp 1603 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_IS_FET; tp 1607 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, MDIOBUS_INITED); tp 1609 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5785) tp 1610 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_config_5785(tp); tp 1615 drivers/net/ethernet/broadcom/tg3.c static void tg3_mdio_fini(struct tg3 *tp) tp 1617 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, MDIOBUS_INITED)) { tp 1618 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, MDIOBUS_INITED); tp 1619 drivers/net/ethernet/broadcom/tg3.c mdiobus_unregister(tp->mdio_bus); tp 1620 drivers/net/ethernet/broadcom/tg3.c mdiobus_free(tp->mdio_bus); tp 1625 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_generate_fw_event(struct tg3 *tp) tp 1633 drivers/net/ethernet/broadcom/tg3.c tp->last_event_jiffies = jiffies; tp 1639 drivers/net/ethernet/broadcom/tg3.c static void tg3_wait_for_event_ack(struct tg3 *tp) tp 1646 drivers/net/ethernet/broadcom/tg3.c time_remain = (long)(tp->last_event_jiffies + 1 + tp 1661 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) tp 1669 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_gather_ump_data(struct tg3 *tp, u32 *data) tp 1674 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMCR, ®)) tp 1676 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMSR, ®)) tp 1681 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_ADVERTISE, ®)) tp 1683 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_LPA, ®)) tp 1688 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_MII_SERDES)) { tp 1689 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_CTRL1000, ®)) tp 1691 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_STAT1000, ®)) tp 1696 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_PHYADDR, ®)) tp 1704 drivers/net/ethernet/broadcom/tg3.c static void tg3_ump_link_report(struct tg3 *tp) tp 1708 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5780_CLASS) || !tg3_flag(tp, ENABLE_ASF)) tp 1711 drivers/net/ethernet/broadcom/tg3.c tg3_phy_gather_ump_data(tp, data); tp 1713 drivers/net/ethernet/broadcom/tg3.c tg3_wait_for_event_ack(tp); tp 1715 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_LINK_UPDATE); tp 1716 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 14); tp 1717 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x0, data[0]); tp 1718 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x4, data[1]); tp 1719 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0x8, data[2]); tp 1720 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 0xc, data[3]); tp 1722 drivers/net/ethernet/broadcom/tg3.c tg3_generate_fw_event(tp); tp 1726 drivers/net/ethernet/broadcom/tg3.c static void tg3_stop_fw(struct tg3 *tp) tp 1728 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) { tp 1730 drivers/net/ethernet/broadcom/tg3.c tg3_wait_for_event_ack(tp); tp 1732 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); tp 1734 drivers/net/ethernet/broadcom/tg3.c tg3_generate_fw_event(tp); tp 1737 drivers/net/ethernet/broadcom/tg3.c tg3_wait_for_event_ack(tp); tp 1742 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_sig_pre_reset(struct tg3 *tp, int kind) tp 1744 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FIRMWARE_MBOX, tp 1747 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ASF_NEW_HANDSHAKE)) { tp 1750 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1755 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1760 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1771 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_sig_post_reset(struct tg3 *tp, int kind) tp 1773 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ASF_NEW_HANDSHAKE)) { tp 1776 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1781 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1792 drivers/net/ethernet/broadcom/tg3.c static void tg3_write_sig_legacy(struct tg3 *tp, int kind) tp 1794 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF)) { tp 1797 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1802 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1807 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_DRV_STATE_MBOX, tp 1817 drivers/net/ethernet/broadcom/tg3.c static int tg3_poll_fw(struct tg3 *tp) tp 1822 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_FWARE_REPORTED)) tp 1825 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_SSB_CORE)) { tp 1830 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 1835 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) tp 1845 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_FIRMWARE_MBOX, &val); tp 1848 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) { tp 1849 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, NO_FWARE_REPORTED)) { tp 1850 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_FWARE_REPORTED); tp 1851 drivers/net/ethernet/broadcom/tg3.c netdev_info(tp->dev, "No firmware running\n"); tp 1865 drivers/net/ethernet/broadcom/tg3.c if (i >= 100000 && !tg3_flag(tp, NO_FWARE_REPORTED)) { tp 1866 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_FWARE_REPORTED); tp 1868 drivers/net/ethernet/broadcom/tg3.c netdev_info(tp->dev, "No firmware running\n"); tp 1871 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) { tp 1881 drivers/net/ethernet/broadcom/tg3.c static void tg3_link_report(struct tg3 *tp) tp 1883 drivers/net/ethernet/broadcom/tg3.c if (!netif_carrier_ok(tp->dev)) { tp 1884 drivers/net/ethernet/broadcom/tg3.c netif_info(tp, link, tp->dev, "Link is down\n"); tp 1885 drivers/net/ethernet/broadcom/tg3.c tg3_ump_link_report(tp); tp 1886 drivers/net/ethernet/broadcom/tg3.c } else if (netif_msg_link(tp)) { tp 1887 drivers/net/ethernet/broadcom/tg3.c netdev_info(tp->dev, "Link is up at %d Mbps, %s duplex\n", tp 1888 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_speed == SPEED_1000 ? tp 1890 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_speed == SPEED_100 ? tp 1892 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_duplex == DUPLEX_FULL ? tp 1895 drivers/net/ethernet/broadcom/tg3.c netdev_info(tp->dev, "Flow control is %s for TX and %s for RX\n", tp 1896 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_flowctrl & FLOW_CTRL_TX) ? tp 1898 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_flowctrl & FLOW_CTRL_RX) ? tp 1901 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_EEE_CAP) tp 1902 drivers/net/ethernet/broadcom/tg3.c netdev_info(tp->dev, "EEE is %s\n", tp 1903 drivers/net/ethernet/broadcom/tg3.c tp->setlpicnt ? "enabled" : "disabled"); tp 1905 drivers/net/ethernet/broadcom/tg3.c tg3_ump_link_report(tp); tp 1908 drivers/net/ethernet/broadcom/tg3.c tp->link_up = netif_carrier_ok(tp->dev); tp 1971 drivers/net/ethernet/broadcom/tg3.c static void tg3_setup_flow_control(struct tg3 *tp, u32 lcladv, u32 rmtadv) tp 1975 drivers/net/ethernet/broadcom/tg3.c u32 old_rx_mode = tp->rx_mode; tp 1976 drivers/net/ethernet/broadcom/tg3.c u32 old_tx_mode = tp->tx_mode; tp 1978 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) tp 1979 drivers/net/ethernet/broadcom/tg3.c autoneg = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr)->autoneg; tp 1981 drivers/net/ethernet/broadcom/tg3.c autoneg = tp->link_config.autoneg; tp 1983 drivers/net/ethernet/broadcom/tg3.c if (autoneg == AUTONEG_ENABLE && tg3_flag(tp, PAUSE_AUTONEG)) { tp 1984 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) tp 1989 drivers/net/ethernet/broadcom/tg3.c flowctrl = tp->link_config.flowctrl; tp 1991 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_flowctrl = flowctrl; tp 1994 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE; tp 1996 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE; tp 1998 drivers/net/ethernet/broadcom/tg3.c if (old_rx_mode != tp->rx_mode) tp 1999 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_RX_MODE, tp->rx_mode); tp 2002 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE; tp 2004 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE; tp 2006 drivers/net/ethernet/broadcom/tg3.c if (old_tx_mode != tp->tx_mode) tp 2007 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_TX_MODE, tp->tx_mode); tp 2014 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 2015 drivers/net/ethernet/broadcom/tg3.c struct phy_device *phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 2017 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 2019 drivers/net/ethernet/broadcom/tg3.c mac_mode = tp->mac_mode & ~(MAC_MODE_PORT_MODE_MASK | tp 2022 drivers/net/ethernet/broadcom/tg3.c oldflowctrl = tp->link_config.active_flowctrl; tp 2031 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5785) tp 2040 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl); tp 2048 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, lcl_adv, rmt_adv); tp 2052 drivers/net/ethernet/broadcom/tg3.c if (mac_mode != tp->mac_mode) { tp 2053 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode = mac_mode; tp 2054 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 2058 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5785) { tp 2078 drivers/net/ethernet/broadcom/tg3.c if (phydev->link != tp->old_link || tp 2079 drivers/net/ethernet/broadcom/tg3.c phydev->speed != tp->link_config.active_speed || tp 2080 drivers/net/ethernet/broadcom/tg3.c phydev->duplex != tp->link_config.active_duplex || tp 2081 drivers/net/ethernet/broadcom/tg3.c oldflowctrl != tp->link_config.active_flowctrl) tp 2084 drivers/net/ethernet/broadcom/tg3.c tp->old_link = phydev->link; tp 2085 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = phydev->speed; tp 2086 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = phydev->duplex; tp 2088 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 2091 drivers/net/ethernet/broadcom/tg3.c tg3_link_report(tp); tp 2094 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_init(struct tg3 *tp) tp 2098 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) tp 2102 drivers/net/ethernet/broadcom/tg3.c tg3_bmcr_reset(tp); tp 2104 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 2107 drivers/net/ethernet/broadcom/tg3.c phydev = phy_connect(tp->dev, phydev_name(phydev), tp 2110 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, "Could not attach to PHY\n"); tp 2118 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 2129 drivers/net/ethernet/broadcom/tg3.c phy_disconnect(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr)); tp 2133 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_IS_CONNECTED; tp 2140 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_start(struct tg3 *tp) tp 2144 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 2147 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 2149 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) { tp 2150 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_IS_LOW_POWER; tp 2151 drivers/net/ethernet/broadcom/tg3.c phydev->speed = tp->link_config.speed; tp 2152 drivers/net/ethernet/broadcom/tg3.c phydev->duplex = tp->link_config.duplex; tp 2153 drivers/net/ethernet/broadcom/tg3.c phydev->autoneg = tp->link_config.autoneg; tp 2155 drivers/net/ethernet/broadcom/tg3.c phydev->advertising, tp->link_config.advertising); tp 2163 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_stop(struct tg3 *tp) tp 2165 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 2168 drivers/net/ethernet/broadcom/tg3.c phy_stop(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr)); tp 2171 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_fini(struct tg3 *tp) tp 2173 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) { tp 2174 drivers/net/ethernet/broadcom/tg3.c phy_disconnect(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr)); tp 2175 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_IS_CONNECTED; tp 2179 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_set_extloopbk(struct tg3 *tp) tp 2184 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) tp 2187 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) { tp 2189 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_write(tp, tp 2196 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_read(tp, tp 2202 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_write(tp, tp 2209 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_fet_toggle_apd(struct tg3 *tp, bool enable) tp 2213 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_FET_TEST, &phytest)) { tp 2216 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, tp 2218 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_FET_SHDW_AUXSTAT2, &phy)) { tp 2223 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_SHDW_AUXSTAT2, phy); tp 2225 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, phytest); tp 2229 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_toggle_apd(struct tg3 *tp, bool enable) tp 2233 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS) || tp 2234 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, 5717_PLUS) && tp 2235 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_MII_SERDES))) tp 2238 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 2239 drivers/net/ethernet/broadcom/tg3.c tg3_phy_fet_toggle_apd(tp, enable); tp 2247 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5784 || !enable) tp 2250 drivers/net/ethernet/broadcom/tg3.c tg3_phy_shdw_write(tp, MII_TG3_MISC_SHDW_SCR5_SEL, reg); tp 2257 drivers/net/ethernet/broadcom/tg3.c tg3_phy_shdw_write(tp, MII_TG3_MISC_SHDW_APD_SEL, reg); tp 2260 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_toggle_automdix(struct tg3 *tp, bool enable) tp 2264 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS) || tp 2265 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) tp 2268 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 2271 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_FET_TEST, &ephy)) { tp 2274 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, tp 2276 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, reg, &phy)) { tp 2281 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, reg, phy); tp 2283 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, ephy); tp 2288 drivers/net/ethernet/broadcom/tg3.c ret = tg3_phy_auxctl_read(tp, tp 2295 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, tp 2301 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_set_wirespeed(struct tg3 *tp) tp 2306 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_NO_ETH_WIRE_SPEED) tp 2309 drivers/net/ethernet/broadcom/tg3.c ret = tg3_phy_auxctl_read(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, &val); tp 2311 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_MISC, tp 2315 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_apply_otp(struct tg3 *tp) tp 2319 drivers/net/ethernet/broadcom/tg3.c if (!tp->phy_otp) tp 2322 drivers/net/ethernet/broadcom/tg3.c otp = tp->phy_otp; tp 2324 drivers/net/ethernet/broadcom/tg3.c if (tg3_phy_toggle_auxctl_smdsp(tp, true)) tp 2329 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_TAP1, phy); tp 2333 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH0, phy); tp 2337 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_AADJ1CH3, phy); tp 2340 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_EXP75, phy); tp 2343 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_EXP96, phy); tp 2347 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_EXP97, phy); tp 2349 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2352 drivers/net/ethernet/broadcom/tg3.c static void tg3_eee_pull_config(struct tg3 *tp, struct ethtool_eee *eee) tp 2355 drivers/net/ethernet/broadcom/tg3.c struct ethtool_eee *dest = &tp->eee; tp 2357 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) tp 2363 drivers/net/ethernet/broadcom/tg3.c if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, TG3_CL45_D7_EEERES_STAT, &val)) tp 2374 drivers/net/ethernet/broadcom/tg3.c if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE, &val)) tp 2379 drivers/net/ethernet/broadcom/tg3.c if (tg3_phy_cl45_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, &val)) tp 2392 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_eee_adjust(struct tg3 *tp, bool current_link_up) tp 2396 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) tp 2399 drivers/net/ethernet/broadcom/tg3.c tp->setlpicnt = 0; tp 2401 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE && tp 2403 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex == DUPLEX_FULL && tp 2404 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.active_speed == SPEED_100 || tp 2405 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed == SPEED_1000)) { tp 2408 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_1000) tp 2415 drivers/net/ethernet/broadcom/tg3.c tg3_eee_pull_config(tp, NULL); tp 2416 drivers/net/ethernet/broadcom/tg3.c if (tp->eee.eee_active) tp 2417 drivers/net/ethernet/broadcom/tg3.c tp->setlpicnt = 2; tp 2420 drivers/net/ethernet/broadcom/tg3.c if (!tp->setlpicnt) { tp 2422 drivers/net/ethernet/broadcom/tg3.c !tg3_phy_toggle_auxctl_smdsp(tp, true)) { tp 2423 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, 0x0000); tp 2424 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2432 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_eee_enable(struct tg3 *tp) tp 2436 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_1000 && tp 2437 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 2438 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 2439 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS)) && tp 2440 drivers/net/ethernet/broadcom/tg3.c !tg3_phy_toggle_auxctl_smdsp(tp, true)) { tp 2443 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val); tp 2444 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2451 drivers/net/ethernet/broadcom/tg3.c static int tg3_wait_macro_done(struct tg3 *tp) tp 2458 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_DSP_CONTROL, &tmp32)) { tp 2469 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp) tp 2482 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, tp 2484 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0002); tp 2487 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, tp 2490 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0202); tp 2491 drivers/net/ethernet/broadcom/tg3.c if (tg3_wait_macro_done(tp)) { tp 2496 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, tp 2498 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0082); tp 2499 drivers/net/ethernet/broadcom/tg3.c if (tg3_wait_macro_done(tp)) { tp 2504 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0802); tp 2505 drivers/net/ethernet/broadcom/tg3.c if (tg3_wait_macro_done(tp)) { tp 2513 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low) || tp 2514 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high) || tp 2515 drivers/net/ethernet/broadcom/tg3.c tg3_wait_macro_done(tp)) { tp 2523 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b); tp 2524 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001); tp 2525 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005); tp 2535 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_reset_chanpat(struct tg3 *tp) tp 2542 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, tp 2544 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0002); tp 2546 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000); tp 2547 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0202); tp 2548 drivers/net/ethernet/broadcom/tg3.c if (tg3_wait_macro_done(tp)) tp 2555 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_reset_5703_4_5(struct tg3 *tp) tp 2564 drivers/net/ethernet/broadcom/tg3.c err = tg3_bmcr_reset(tp); tp 2571 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32)) tp 2575 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); tp 2578 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, tp 2582 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_CTRL1000, &phy9_orig)) tp 2585 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_CTRL1000, tp 2588 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_toggle_auxctl_smdsp(tp, true); tp 2593 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x8005, 0x0800); tp 2595 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset); tp 2600 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_reset_chanpat(tp); tp 2604 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x8005, 0x0000); tp 2606 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); tp 2607 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_CONTROL, 0x0000); tp 2609 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2611 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_CTRL1000, phy9_orig); tp 2613 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); tp 2618 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); tp 2623 drivers/net/ethernet/broadcom/tg3.c static void tg3_carrier_off(struct tg3 *tp) tp 2625 drivers/net/ethernet/broadcom/tg3.c netif_carrier_off(tp->dev); tp 2626 drivers/net/ethernet/broadcom/tg3.c tp->link_up = false; tp 2629 drivers/net/ethernet/broadcom/tg3.c static void tg3_warn_mgmt_link_flap(struct tg3 *tp) tp 2631 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF)) tp 2632 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 2639 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_reset(struct tg3 *tp) tp 2644 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 2649 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_BMSR, &val); tp 2650 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMSR, &val); tp 2654 drivers/net/ethernet/broadcom/tg3.c if (netif_running(tp->dev) && tp->link_up) { tp 2655 drivers/net/ethernet/broadcom/tg3.c netif_carrier_off(tp->dev); tp 2656 drivers/net/ethernet/broadcom/tg3.c tg3_link_report(tp); tp 2659 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703 || tp 2660 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704 || tp 2661 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) { tp 2662 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_reset_5703_4_5(tp); tp 2669 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5784 && tp 2670 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) != CHIPREV_5784_AX) { tp 2677 drivers/net/ethernet/broadcom/tg3.c err = tg3_bmcr_reset(tp); tp 2683 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_EXP8, val); tp 2688 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5784_AX || tp 2689 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) == CHIPREV_5761_AX) { tp 2699 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5717_PLUS) && tp 2700 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_MII_SERDES)) tp 2703 drivers/net/ethernet/broadcom/tg3.c tg3_phy_apply_otp(tp); tp 2705 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ENABLE_APD) tp 2706 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_apd(tp, true); tp 2708 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_apd(tp, false); tp 2711 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_ADC_BUG) && tp 2712 drivers/net/ethernet/broadcom/tg3.c !tg3_phy_toggle_auxctl_smdsp(tp, true)) { tp 2713 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x201f, 0x2aaa); tp 2714 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x000a, 0x0323); tp 2715 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2718 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_5704_A0_BUG) { tp 2719 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68); tp 2720 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68); tp 2723 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_BER_BUG) { tp 2724 drivers/net/ethernet/broadcom/tg3.c if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) { tp 2725 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x000a, 0x310b); tp 2726 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x201f, 0x9506); tp 2727 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0x401f, 0x14e2); tp 2728 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2730 drivers/net/ethernet/broadcom/tg3.c } else if (tp->phy_flags & TG3_PHYFLG_JITTER_BUG) { tp 2731 drivers/net/ethernet/broadcom/tg3.c if (!tg3_phy_toggle_auxctl_smdsp(tp, true)) { tp 2732 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); tp 2733 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ADJUST_TRIM) { tp 2734 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x110b); tp 2735 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_TEST1, tp 2738 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); tp 2740 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_auxctl_smdsp(tp, false); tp 2746 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) { tp 2748 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, 0x4c20); tp 2749 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, JUMBO_CAPABLE)) { tp 2751 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_read(tp, tp 2754 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, tp 2761 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_CAPABLE)) { tp 2762 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, &val)) tp 2763 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, tp 2767 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 2769 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_PTEST, 0x12); tp 2772 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5762_A0) tp 2773 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, 0xffb, 0x4000); tp 2775 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_automdix(tp, true); tp 2776 drivers/net/ethernet/broadcom/tg3.c tg3_phy_set_wirespeed(tp); tp 2796 drivers/net/ethernet/broadcom/tg3.c static inline u32 tg3_set_function_status(struct tg3 *tp, u32 newstat) tp 2800 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 2801 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719) tp 2802 drivers/net/ethernet/broadcom/tg3.c status = tg3_ape_read32(tp, TG3_APE_GPIO_MSG); tp 2806 drivers/net/ethernet/broadcom/tg3.c shift = TG3_APE_GPIO_MSG_SHIFT + 4 * tp->pci_fn; tp 2810 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 2811 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719) tp 2812 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_GPIO_MSG, status); tp 2819 drivers/net/ethernet/broadcom/tg3.c static inline int tg3_pwrsrc_switch_to_vmain(struct tg3 *tp) tp 2821 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_NIC)) tp 2824 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 2825 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 2826 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) { tp 2827 drivers/net/ethernet/broadcom/tg3.c if (tg3_ape_lock(tp, TG3_APE_LOCK_GPIO)) tp 2830 drivers/net/ethernet/broadcom/tg3.c tg3_set_function_status(tp, TG3_GPIO_MSG_DRVR_PRES); tp 2832 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, tp 2835 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_GPIO); tp 2837 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, tp 2844 drivers/net/ethernet/broadcom/tg3.c static void tg3_pwrsrc_die_with_vmain(struct tg3 *tp) tp 2848 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_NIC) || tp 2849 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5700 || tp 2850 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) tp 2853 drivers/net/ethernet/broadcom/tg3.c grc_local_ctrl = tp->grc_local_ctrl | GRC_LCLCTRL_GPIO_OE1; tp 2868 drivers/net/ethernet/broadcom/tg3.c static void tg3_pwrsrc_switch_to_vaux(struct tg3 *tp) tp 2870 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_NIC)) tp 2873 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 2874 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) { tp 2875 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | tp 2882 drivers/net/ethernet/broadcom/tg3.c } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 || tp 2883 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S) { tp 2890 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl; tp 2906 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5714) { tp 2908 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | tp 2914 drivers/net/ethernet/broadcom/tg3.c no_gpio2 = tp->nic_sram_data_cfg & tp 2927 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl | grc_local_ctrl, tp 2933 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl | grc_local_ctrl, tp 2939 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl | grc_local_ctrl, tp 2945 drivers/net/ethernet/broadcom/tg3.c static void tg3_frob_aux_power_5717(struct tg3 *tp, bool wol_enable) tp 2950 drivers/net/ethernet/broadcom/tg3.c if (tg3_ape_lock(tp, TG3_APE_LOCK_GPIO)) tp 2953 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE) || wol_enable) tp 2956 drivers/net/ethernet/broadcom/tg3.c msg = tg3_set_function_status(tp, msg); tp 2962 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_switch_to_vaux(tp); tp 2964 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_die_with_vmain(tp); tp 2967 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_GPIO); tp 2970 drivers/net/ethernet/broadcom/tg3.c static void tg3_frob_aux_power(struct tg3 *tp, bool include_wol) tp 2975 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_NIC) || tg3_flag(tp, 57765_CLASS)) tp 2978 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 2979 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 2980 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) { tp 2981 drivers/net/ethernet/broadcom/tg3.c tg3_frob_aux_power_5717(tp, include_wol ? tp 2982 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, WOL_ENABLE) != 0 : 0); tp 2986 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev_peer && tp->pdev_peer != tp->pdev) { tp 2989 drivers/net/ethernet/broadcom/tg3.c dev_peer = pci_get_drvdata(tp->pdev_peer); tp 3004 drivers/net/ethernet/broadcom/tg3.c if ((include_wol && tg3_flag(tp, WOL_ENABLE)) || tp 3005 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, ENABLE_ASF)) tp 3009 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_switch_to_vaux(tp); tp 3011 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_die_with_vmain(tp); tp 3014 drivers/net/ethernet/broadcom/tg3.c static int tg3_5700_link_polarity(struct tg3 *tp, u32 speed) tp 3016 drivers/net/ethernet/broadcom/tg3.c if (tp->led_ctrl == LED_CTRL_MODE_PHY_2) tp 3018 drivers/net/ethernet/broadcom/tg3.c else if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5411) { tp 3027 drivers/net/ethernet/broadcom/tg3.c static bool tg3_phy_power_bug(struct tg3 *tp) tp 3029 drivers/net/ethernet/broadcom/tg3.c switch (tg3_asic_rev(tp)) { tp 3034 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) tp 3038 drivers/net/ethernet/broadcom/tg3.c if (!tp->pci_fn) tp 3043 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && tp 3044 drivers/net/ethernet/broadcom/tg3.c !tp->pci_fn) tp 3052 drivers/net/ethernet/broadcom/tg3.c static bool tg3_phy_led_bug(struct tg3 *tp) tp 3054 drivers/net/ethernet/broadcom/tg3.c switch (tg3_asic_rev(tp)) { tp 3057 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && tp 3058 drivers/net/ethernet/broadcom/tg3.c !tp->pci_fn) tp 3066 drivers/net/ethernet/broadcom/tg3.c static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) tp 3070 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) tp 3073 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) { tp 3074 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704) { tp 3086 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 3087 drivers/net/ethernet/broadcom/tg3.c tg3_bmcr_reset(tp); tp 3092 drivers/net/ethernet/broadcom/tg3.c } else if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 3094 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_FET_TEST, &phytest)) { tp 3097 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_ADVERTISE, 0); tp 3098 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, tp 3101 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, tp 3103 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_FET_SHDW_AUXMODE4, &phy)) { tp 3105 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, tp 3109 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_TEST, phytest); tp 3113 drivers/net/ethernet/broadcom/tg3.c if (!tg3_phy_led_bug(tp)) tp 3114 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, tp 3120 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_PWRCTL, val); tp 3126 drivers/net/ethernet/broadcom/tg3.c if (tg3_phy_power_bug(tp)) tp 3129 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5784_AX || tp 3130 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) == CHIPREV_5761_AX) { tp 3137 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); tp 3141 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_lock(struct tg3 *tp) tp 3143 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM)) { tp 3146 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_lock_cnt == 0) { tp 3158 drivers/net/ethernet/broadcom/tg3.c tp->nvram_lock_cnt++; tp 3164 drivers/net/ethernet/broadcom/tg3.c static void tg3_nvram_unlock(struct tg3 *tp) tp 3166 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM)) { tp 3167 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_lock_cnt > 0) tp 3168 drivers/net/ethernet/broadcom/tg3.c tp->nvram_lock_cnt--; tp 3169 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_lock_cnt == 0) tp 3175 drivers/net/ethernet/broadcom/tg3.c static void tg3_enable_nvram_access(struct tg3 *tp) tp 3177 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) { tp 3185 drivers/net/ethernet/broadcom/tg3.c static void tg3_disable_nvram_access(struct tg3 *tp) tp 3187 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) { tp 3194 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_read_using_eeprom(struct tg3 *tp, tp 3236 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_exec_cmd(struct tg3 *tp, u32 nvram_cmd) tp 3255 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_nvram_phys_addr(struct tg3 *tp, u32 addr) tp 3257 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM) && tp 3258 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, NVRAM_BUFFERED) && tp 3259 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, FLASH) && tp 3260 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, NO_NVRAM_ADDR_TRANS) && tp 3261 drivers/net/ethernet/broadcom/tg3.c (tp->nvram_jedecnum == JEDEC_ATMEL)) tp 3263 drivers/net/ethernet/broadcom/tg3.c addr = ((addr / tp->nvram_pagesize) << tp 3265 drivers/net/ethernet/broadcom/tg3.c (addr % tp->nvram_pagesize); tp 3270 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_nvram_logical_addr(struct tg3 *tp, u32 addr) tp 3272 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM) && tp 3273 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, NVRAM_BUFFERED) && tp 3274 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, FLASH) && tp 3275 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, NO_NVRAM_ADDR_TRANS) && tp 3276 drivers/net/ethernet/broadcom/tg3.c (tp->nvram_jedecnum == JEDEC_ATMEL)) tp 3279 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize) + tp 3291 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val) tp 3295 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, NVRAM)) tp 3296 drivers/net/ethernet/broadcom/tg3.c return tg3_nvram_read_using_eeprom(tp, offset, val); tp 3298 drivers/net/ethernet/broadcom/tg3.c offset = tg3_nvram_phys_addr(tp, offset); tp 3303 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_lock(tp); tp 3307 drivers/net/ethernet/broadcom/tg3.c tg3_enable_nvram_access(tp); tp 3310 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_exec_cmd(tp, NVRAM_CMD_RD | NVRAM_CMD_GO | tp 3316 drivers/net/ethernet/broadcom/tg3.c tg3_disable_nvram_access(tp); tp 3318 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 3324 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_read_be32(struct tg3 *tp, u32 offset, __be32 *val) tp 3327 drivers/net/ethernet/broadcom/tg3.c int res = tg3_nvram_read(tp, offset, &v); tp 3333 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_write_block_using_eeprom(struct tg3 *tp, tp 3383 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len, tp 3387 drivers/net/ethernet/broadcom/tg3.c u32 pagesize = tp->nvram_pagesize; tp 3403 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, phy_addr + j, tp 3422 drivers/net/ethernet/broadcom/tg3.c tg3_enable_nvram_access(tp); tp 3430 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_exec_cmd(tp, nvram_cmd)) tp 3439 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_exec_cmd(tp, nvram_cmd)) tp 3445 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_exec_cmd(tp, nvram_cmd)) tp 3465 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_exec_cmd(tp, nvram_cmd); tp 3474 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_exec_cmd(tp, nvram_cmd); tp 3482 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len, tp 3494 drivers/net/ethernet/broadcom/tg3.c page_off = offset % tp->nvram_pagesize; tp 3496 drivers/net/ethernet/broadcom/tg3.c phy_addr = tg3_nvram_phys_addr(tp, offset); tp 3502 drivers/net/ethernet/broadcom/tg3.c if (page_off == (tp->nvram_pagesize - 4)) tp 3509 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, FLASH) || tp 3510 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_PLUS)) tp 3513 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5752 && tp 3514 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 5755_PLUS) && tp 3515 drivers/net/ethernet/broadcom/tg3.c (tp->nvram_jedecnum == JEDEC_ST) && tp 3520 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_exec_cmd(tp, cmd); tp 3524 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, FLASH)) { tp 3529 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_exec_cmd(tp, nvram_cmd); tp 3537 drivers/net/ethernet/broadcom/tg3.c static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf) tp 3541 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, EEPROM_WRITE_PROT)) { tp 3542 drivers/net/ethernet/broadcom/tg3.c tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl & tp 3547 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, NVRAM)) { tp 3548 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_write_block_using_eeprom(tp, offset, len, buf); tp 3552 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_lock(tp); tp 3556 drivers/net/ethernet/broadcom/tg3.c tg3_enable_nvram_access(tp); tp 3557 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) tp 3563 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM_BUFFERED) || !tg3_flag(tp, FLASH)) { tp 3564 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_write_block_buffered(tp, offset, len, tp 3567 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_write_block_unbuffered(tp, offset, len, tp 3574 drivers/net/ethernet/broadcom/tg3.c tg3_disable_nvram_access(tp); tp 3575 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 3578 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, EEPROM_WRITE_PROT)) { tp 3579 drivers/net/ethernet/broadcom/tg3.c tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); tp 3592 drivers/net/ethernet/broadcom/tg3.c static int tg3_pause_cpu(struct tg3 *tp, u32 cpu_base) tp 3602 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) tp 3610 drivers/net/ethernet/broadcom/tg3.c static int tg3_rxcpu_pause(struct tg3 *tp) tp 3612 drivers/net/ethernet/broadcom/tg3.c int rc = tg3_pause_cpu(tp, RX_CPU_BASE); tp 3622 drivers/net/ethernet/broadcom/tg3.c static int tg3_txcpu_pause(struct tg3 *tp) tp 3624 drivers/net/ethernet/broadcom/tg3.c return tg3_pause_cpu(tp, TX_CPU_BASE); tp 3628 drivers/net/ethernet/broadcom/tg3.c static void tg3_resume_cpu(struct tg3 *tp, u32 cpu_base) tp 3635 drivers/net/ethernet/broadcom/tg3.c static void tg3_rxcpu_resume(struct tg3 *tp) tp 3637 drivers/net/ethernet/broadcom/tg3.c tg3_resume_cpu(tp, RX_CPU_BASE); tp 3641 drivers/net/ethernet/broadcom/tg3.c static int tg3_halt_cpu(struct tg3 *tp, u32 cpu_base) tp 3645 drivers/net/ethernet/broadcom/tg3.c BUG_ON(cpu_base == TX_CPU_BASE && tg3_flag(tp, 5705_PLUS)); tp 3647 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 3654 drivers/net/ethernet/broadcom/tg3.c rc = tg3_rxcpu_pause(tp); tp 3660 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_SSB_CORE)) tp 3663 drivers/net/ethernet/broadcom/tg3.c rc = tg3_txcpu_pause(tp); tp 3667 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "%s timed out, %s CPU\n", tp 3673 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM)) tp 3678 drivers/net/ethernet/broadcom/tg3.c static int tg3_fw_data_len(struct tg3 *tp, tp 3697 drivers/net/ethernet/broadcom/tg3.c if (tp->fw_len == 0xffffffff) tp 3700 drivers/net/ethernet/broadcom/tg3.c fw_len = tp->fw->size; tp 3706 drivers/net/ethernet/broadcom/tg3.c static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, tp 3712 drivers/net/ethernet/broadcom/tg3.c int total_len = tp->fw->size; tp 3714 drivers/net/ethernet/broadcom/tg3.c if (cpu_base == TX_CPU_BASE && tg3_flag(tp, 5705_PLUS)) { tp 3715 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 3721 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS) && tg3_asic_rev(tp) != ASIC_REV_57766) tp 3726 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_57766) { tp 3730 drivers/net/ethernet/broadcom/tg3.c int lock_err = tg3_nvram_lock(tp); tp 3731 drivers/net/ethernet/broadcom/tg3.c err = tg3_halt_cpu(tp, cpu_base); tp 3733 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 3738 drivers/net/ethernet/broadcom/tg3.c write_op(tp, cpu_scratch_base + i, 0); tp 3752 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tg3_fw_data_len(tp, fw_hdr); i++) tp 3753 drivers/net/ethernet/broadcom/tg3.c write_op(tp, cpu_scratch_base + tp 3772 drivers/net/ethernet/broadcom/tg3.c static int tg3_pause_cpu_and_set_pc(struct tg3 *tp, u32 cpu_base, u32 pc) tp 3793 drivers/net/ethernet/broadcom/tg3.c static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp) tp 3798 drivers/net/ethernet/broadcom/tg3.c fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data; tp 3806 drivers/net/ethernet/broadcom/tg3.c err = tg3_load_firmware_cpu(tp, RX_CPU_BASE, tp 3812 drivers/net/ethernet/broadcom/tg3.c err = tg3_load_firmware_cpu(tp, TX_CPU_BASE, tp 3819 drivers/net/ethernet/broadcom/tg3.c err = tg3_pause_cpu_and_set_pc(tp, RX_CPU_BASE, tp 3822 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "%s fails to set RX CPU PC, is %08x " tp 3829 drivers/net/ethernet/broadcom/tg3.c tg3_rxcpu_resume(tp); tp 3834 drivers/net/ethernet/broadcom/tg3.c static int tg3_validate_rxcpu_state(struct tg3 *tp) tp 3851 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "Boot code not ready for service patches\n"); tp 3855 drivers/net/ethernet/broadcom/tg3.c val = tg3_read_indirect_reg32(tp, TG3_57766_FW_HANDSHAKE); tp 3857 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 3866 drivers/net/ethernet/broadcom/tg3.c static void tg3_load_57766_firmware(struct tg3 *tp) tp 3870 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, NO_NVRAM)) tp 3873 drivers/net/ethernet/broadcom/tg3.c if (tg3_validate_rxcpu_state(tp)) tp 3876 drivers/net/ethernet/broadcom/tg3.c if (!tp->fw) tp 3893 drivers/net/ethernet/broadcom/tg3.c fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data; tp 3897 drivers/net/ethernet/broadcom/tg3.c if (tg3_rxcpu_pause(tp)) tp 3901 drivers/net/ethernet/broadcom/tg3.c tg3_load_firmware_cpu(tp, 0, TG3_57766_FW_BASE_ADDR, 0, fw_hdr); tp 3903 drivers/net/ethernet/broadcom/tg3.c tg3_rxcpu_resume(tp); tp 3907 drivers/net/ethernet/broadcom/tg3.c static int tg3_load_tso_firmware(struct tg3 *tp) tp 3913 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, FW_TSO)) tp 3916 drivers/net/ethernet/broadcom/tg3.c fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data; tp 3924 drivers/net/ethernet/broadcom/tg3.c cpu_scratch_size = tp->fw_len; tp 3926 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705) { tp 3935 drivers/net/ethernet/broadcom/tg3.c err = tg3_load_firmware_cpu(tp, cpu_base, tp 3942 drivers/net/ethernet/broadcom/tg3.c err = tg3_pause_cpu_and_set_pc(tp, cpu_base, tp 3945 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 3952 drivers/net/ethernet/broadcom/tg3.c tg3_resume_cpu(tp, cpu_base); tp 3957 drivers/net/ethernet/broadcom/tg3.c static void __tg3_set_one_mac_addr(struct tg3 *tp, u8 *mac_addr, int index) tp 3976 drivers/net/ethernet/broadcom/tg3.c static void __tg3_set_mac_addr(struct tg3 *tp, bool skip_mac_1) tp 3984 drivers/net/ethernet/broadcom/tg3.c __tg3_set_one_mac_addr(tp, tp->dev->dev_addr, i); tp 3987 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703 || tp 3988 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704) { tp 3990 drivers/net/ethernet/broadcom/tg3.c __tg3_set_one_mac_addr(tp, tp->dev->dev_addr, i); tp 3993 drivers/net/ethernet/broadcom/tg3.c addr_high = (tp->dev->dev_addr[0] + tp 3994 drivers/net/ethernet/broadcom/tg3.c tp->dev->dev_addr[1] + tp 3995 drivers/net/ethernet/broadcom/tg3.c tp->dev->dev_addr[2] + tp 3996 drivers/net/ethernet/broadcom/tg3.c tp->dev->dev_addr[3] + tp 3997 drivers/net/ethernet/broadcom/tg3.c tp->dev->dev_addr[4] + tp 3998 drivers/net/ethernet/broadcom/tg3.c tp->dev->dev_addr[5]) & tp 4003 drivers/net/ethernet/broadcom/tg3.c static void tg3_enable_register_access(struct tg3 *tp) tp 4009 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, tp 4010 drivers/net/ethernet/broadcom/tg3.c TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); tp 4013 drivers/net/ethernet/broadcom/tg3.c static int tg3_power_up(struct tg3 *tp) tp 4017 drivers/net/ethernet/broadcom/tg3.c tg3_enable_register_access(tp); tp 4019 drivers/net/ethernet/broadcom/tg3.c err = pci_set_power_state(tp->pdev, PCI_D0); tp 4022 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_switch_to_vmain(tp); tp 4024 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "Transition to D0 failed\n"); tp 4032 drivers/net/ethernet/broadcom/tg3.c static int tg3_power_down_prepare(struct tg3 *tp) tp 4037 drivers/net/ethernet/broadcom/tg3.c tg3_enable_register_access(tp); tp 4040 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CLKREQ_BUG)) tp 4041 drivers/net/ethernet/broadcom/tg3.c pcie_capability_set_word(tp->pdev, PCI_EXP_LNKCTL, tp 4048 drivers/net/ethernet/broadcom/tg3.c device_should_wake = device_may_wakeup(&tp->pdev->dev) && tp 4049 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, WOL_ENABLE); tp 4051 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 4053 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) && tp 4054 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) { tp 4059 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 4061 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_IS_LOW_POWER; tp 4063 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = phydev->speed; tp 4064 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = phydev->duplex; tp 4065 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = phydev->autoneg; tp 4067 drivers/net/ethernet/broadcom/tg3.c &tp->link_config.advertising, tp 4078 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF) || device_should_wake) { tp 4079 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_SPEED_100MB)) { tp 4107 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) tp 4108 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_IS_LOW_POWER; tp 4110 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) tp 4111 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, false); tp 4114 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 4119 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, ENABLE_ASF)) { tp 4124 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_FW_ASF_STATUS_MBOX, &val); tp 4130 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_CAP)) tp 4131 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_WOL_MBOX, WOL_SIGNATURE | tp 4139 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) { tp 4141 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_IS_FET)) { tp 4142 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, tp 4150 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) tp 4152 drivers/net/ethernet/broadcom/tg3.c else if (tp->phy_flags & tp 4154 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_1000) tp 4161 drivers/net/ethernet/broadcom/tg3.c mac_mode |= tp->mac_mode & MAC_MODE_LINK_POLARITY; tp 4162 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700) { tp 4163 drivers/net/ethernet/broadcom/tg3.c u32 speed = tg3_flag(tp, WOL_SPEED_100MB) ? tp 4165 drivers/net/ethernet/broadcom/tg3.c if (tg3_5700_link_polarity(tp, speed)) tp 4174 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5750_PLUS)) tp 4175 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_LED_CTRL, tp->led_ctrl); tp 4178 drivers/net/ethernet/broadcom/tg3.c if ((tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, 5780_CLASS)) && tp 4179 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE))) tp 4182 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 4194 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, WOL_SPEED_100MB) && tp 4195 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 4196 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701)) { tp 4199 drivers/net/ethernet/broadcom/tg3.c base_val = tp->pci_clock_ctrl; tp 4205 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, 5780_CLASS) || tp 4206 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, CPMU_PRESENT) || tp 4207 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906) { tp 4209 drivers/net/ethernet/broadcom/tg3.c } else if (!(tg3_flag(tp, 5750_PLUS) && tg3_flag(tp, ENABLE_ASF))) { tp 4212 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 4213 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) { tp 4218 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, 5705_PLUS)) { tp 4226 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, tp 4229 drivers/net/ethernet/broadcom/tg3.c tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, tp 4232 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 4235 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 4236 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) { tp 4245 drivers/net/ethernet/broadcom/tg3.c tp->pci_clock_ctrl | newbits3, 40); tp 4249 drivers/net/ethernet/broadcom/tg3.c if (!(device_should_wake) && !tg3_flag(tp, ENABLE_ASF)) tp 4250 drivers/net/ethernet/broadcom/tg3.c tg3_power_down_phy(tp, do_low_power); tp 4252 drivers/net/ethernet/broadcom/tg3.c tg3_frob_aux_power(tp, true); tp 4255 drivers/net/ethernet/broadcom/tg3.c if ((!tg3_flag(tp, IS_SSB_CORE)) && tp 4256 drivers/net/ethernet/broadcom/tg3.c ((tg3_chip_rev(tp) == CHIPREV_5750_AX) || tp 4257 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev(tp) == CHIPREV_5750_BX))) { tp 4262 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_ASF)) { tp 4265 drivers/net/ethernet/broadcom/tg3.c err = tg3_nvram_lock(tp); tp 4266 drivers/net/ethernet/broadcom/tg3.c tg3_halt_cpu(tp, RX_CPU_BASE); tp 4268 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 4272 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN); tp 4274 drivers/net/ethernet/broadcom/tg3.c tg3_ape_driver_state_change(tp, RESET_KIND_SHUTDOWN); tp 4279 drivers/net/ethernet/broadcom/tg3.c static void tg3_power_down(struct tg3 *tp) tp 4281 drivers/net/ethernet/broadcom/tg3.c pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE)); tp 4282 drivers/net/ethernet/broadcom/tg3.c pci_set_power_state(tp->pdev, PCI_D3hot); tp 4285 drivers/net/ethernet/broadcom/tg3.c static void tg3_aux_stat_to_speed_duplex(struct tg3 *tp, u32 val, u32 *speed, u8 *duplex) tp 4319 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 4332 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl) tp 4341 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_ADVERTISE, new_adv); tp 4345 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 4348 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 || tp 4349 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0) tp 4352 drivers/net/ethernet/broadcom/tg3.c err = tg3_writephy(tp, MII_CTRL1000, new_adv); tp 4357 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) tp 4363 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_toggle_auxctl_smdsp(tp, true); tp 4375 drivers/net/ethernet/broadcom/tg3.c if (!tp->eee.eee_enabled) { tp 4377 drivers/net/ethernet/broadcom/tg3.c tp->eee.advertised = 0; tp 4379 drivers/net/ethernet/broadcom/tg3.c tp->eee.advertised = advertise & tp 4384 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_cl45_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, val); tp 4388 drivers/net/ethernet/broadcom/tg3.c switch (tg3_asic_rev(tp)) { tp 4398 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_TAP26, val); tp 4402 drivers/net/ethernet/broadcom/tg3.c if (!tg3_phydsp_read(tp, MII_TG3_DSP_CH34TP2, &val)) tp 4403 drivers/net/ethernet/broadcom/tg3.c tg3_phydsp_write(tp, MII_TG3_DSP_CH34TP2, val | tp 4407 drivers/net/ethernet/broadcom/tg3.c err2 = tg3_phy_toggle_auxctl_smdsp(tp, false); tp 4416 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_copper_begin(struct tg3 *tp) tp 4418 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE || tp 4419 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) { tp 4422 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) && tp 4423 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)) { tp 4426 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_SPEED_100MB)) tp 4429 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_1G_ON_VAUX_OK) { tp 4430 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & tp 4438 drivers/net/ethernet/broadcom/tg3.c adv = tp->link_config.advertising; tp 4439 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY) tp 4443 drivers/net/ethernet/broadcom/tg3.c fc = tp->link_config.flowctrl; tp 4446 drivers/net/ethernet/broadcom/tg3.c tg3_phy_autoneg_cfg(tp, adv, fc); tp 4448 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) && tp 4449 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)) { tp 4457 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, tp 4463 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = tp->link_config.speed; tp 4464 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = tp->link_config.duplex; tp 4466 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5714) { tp 4471 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_ADVERTISE, ADVERTISE_ALL); tp 4475 drivers/net/ethernet/broadcom/tg3.c switch (tp->link_config.speed) { tp 4489 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.duplex == DUPLEX_FULL) tp 4492 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMCR, &orig_bmcr) && tp 4494 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, BMCR_LOOPBACK); tp 4499 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_BMSR, &tmp) || tp 4500 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &tmp)) tp 4507 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr); tp 4513 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_pull_config(struct tg3 *tp) tp 4518 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_BMCR, &val); tp 4523 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = AUTONEG_DISABLE; tp 4524 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising = 0; tp 4525 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, PAUSE_AUTONEG); tp 4531 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) tp 4534 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = SPEED_10; tp 4537 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) tp 4540 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = SPEED_100; tp 4543 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 4544 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = SPEED_1000; tp 4553 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = DUPLEX_FULL; tp 4555 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = DUPLEX_HALF; tp 4557 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl = FLOW_CTRL_RX | FLOW_CTRL_TX; tp 4563 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = AUTONEG_ENABLE; tp 4564 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising = ADVERTISED_Autoneg; tp 4565 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PAUSE_AUTONEG); tp 4567 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) { tp 4570 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_ADVERTISE, &val); tp 4575 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising |= adv | ADVERTISED_TP; tp 4577 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl = tg3_decode_flowctrl_1000T(val); tp 4579 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising |= ADVERTISED_FIBRE; tp 4582 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 4585 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) { tp 4586 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_CTRL1000, &val); tp 4592 drivers/net/ethernet/broadcom/tg3.c err = tg3_readphy(tp, MII_ADVERTISE, &val); tp 4597 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl = adv; tp 4603 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising |= adv; tp 4610 drivers/net/ethernet/broadcom/tg3.c static int tg3_init_5401phy_dsp(struct tg3 *tp) tp 4616 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_AUXCTL, 0x4c20); tp 4618 drivers/net/ethernet/broadcom/tg3.c err |= tg3_phydsp_write(tp, 0x0012, 0x1804); tp 4619 drivers/net/ethernet/broadcom/tg3.c err |= tg3_phydsp_write(tp, 0x0013, 0x1204); tp 4620 drivers/net/ethernet/broadcom/tg3.c err |= tg3_phydsp_write(tp, 0x8006, 0x0132); tp 4621 drivers/net/ethernet/broadcom/tg3.c err |= tg3_phydsp_write(tp, 0x8006, 0x0232); tp 4622 drivers/net/ethernet/broadcom/tg3.c err |= tg3_phydsp_write(tp, 0x201f, 0x0a20); tp 4629 drivers/net/ethernet/broadcom/tg3.c static bool tg3_phy_eee_config_ok(struct tg3 *tp) tp 4633 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) tp 4636 drivers/net/ethernet/broadcom/tg3.c tg3_eee_pull_config(tp, &eee); tp 4638 drivers/net/ethernet/broadcom/tg3.c if (tp->eee.eee_enabled) { tp 4639 drivers/net/ethernet/broadcom/tg3.c if (tp->eee.advertised != eee.advertised || tp 4640 drivers/net/ethernet/broadcom/tg3.c tp->eee.tx_lpi_timer != eee.tx_lpi_timer || tp 4641 drivers/net/ethernet/broadcom/tg3.c tp->eee.tx_lpi_enabled != eee.tx_lpi_enabled) tp 4652 drivers/net/ethernet/broadcom/tg3.c static bool tg3_phy_copper_an_config_ok(struct tg3 *tp, u32 *lcladv) tp 4656 drivers/net/ethernet/broadcom/tg3.c advertising = tp->link_config.advertising; tp 4660 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_duplex == DUPLEX_FULL) { tp 4661 drivers/net/ethernet/broadcom/tg3.c tgtadv |= mii_advertise_flowctrl(tp->link_config.flowctrl); tp 4665 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_ADVERTISE, lcladv)) tp 4671 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 4676 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_CTRL1000, &tg3_ctrl)) tp 4680 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 || tp 4681 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0)) { tp 4696 drivers/net/ethernet/broadcom/tg3.c static bool tg3_phy_copper_fetch_rmtadv(struct tg3 *tp, u32 *rmtadv) tp 4700 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 4703 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_STAT1000, &val)) tp 4709 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_LPA, rmtadv)) tp 4713 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = lpeth; tp 4718 drivers/net/ethernet/broadcom/tg3.c static bool tg3_test_and_report_link_chg(struct tg3 *tp, bool curr_link_up) tp 4720 drivers/net/ethernet/broadcom/tg3.c if (curr_link_up != tp->link_up) { tp 4722 drivers/net/ethernet/broadcom/tg3.c netif_carrier_on(tp->dev); tp 4724 drivers/net/ethernet/broadcom/tg3.c netif_carrier_off(tp->dev); tp 4725 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) tp 4726 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 4729 drivers/net/ethernet/broadcom/tg3.c tg3_link_report(tp); tp 4736 drivers/net/ethernet/broadcom/tg3.c static void tg3_clear_mac_status(struct tg3 *tp) tp 4748 drivers/net/ethernet/broadcom/tg3.c static void tg3_setup_eee(struct tg3 *tp) tp 4754 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) tp 4763 drivers/net/ethernet/broadcom/tg3.c (tp->eee.tx_lpi_enabled ? TG3_CPMU_EEEMD_LPI_IN_TX : 0) | tp 4767 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5717) tp 4770 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 4773 drivers/net/ethernet/broadcom/tg3.c tw32_f(TG3_CPMU_EEE_MODE, tp->eee.eee_enabled ? val : 0); tp 4777 drivers/net/ethernet/broadcom/tg3.c (tp->eee.tx_lpi_timer & 0xffff)); tp 4784 drivers/net/ethernet/broadcom/tg3.c static int tg3_setup_copper_phy(struct tg3 *tp, bool force_reset) tp 4793 drivers/net/ethernet/broadcom/tg3.c tg3_clear_mac_status(tp); tp 4795 drivers/net/ethernet/broadcom/tg3.c if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) { tp 4797 drivers/net/ethernet/broadcom/tg3.c (tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL)); tp 4801 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, MII_TG3_AUXCTL_SHDWSEL_PWRCTL, 0); tp 4806 drivers/net/ethernet/broadcom/tg3.c if ((tg3_asic_rev(tp) == ASIC_REV_5703 || tp 4807 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704 || tp 4808 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) && tp 4809 drivers/net/ethernet/broadcom/tg3.c tp->link_up) { tp 4810 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 4811 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMSR, &bmsr) && tp 4816 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 4818 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) { tp 4819 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 4820 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_BMSR, &bmsr) || tp 4821 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, INIT_COMPLETE)) tp 4825 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_5401phy_dsp(tp); tp 4829 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 4832 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMSR, &bmsr) && tp 4839 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_REV_MASK) == tp 4842 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed == SPEED_1000) { tp 4843 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_reset(tp); tp 4845 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_5401phy_dsp(tp); tp 4850 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 || tp 4851 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0) { tp 4853 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x15, 0x0a75); tp 4854 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8c68); tp 4855 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8d68); tp 4856 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x8c68); tp 4860 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_ISTAT, &val); tp 4861 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_ISTAT, &val); tp 4863 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT) tp 4864 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_IMASK, ~MII_TG3_INT_LINKCHG); tp 4865 drivers/net/ethernet/broadcom/tg3.c else if (!(tp->phy_flags & TG3_PHYFLG_IS_FET)) tp 4866 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_IMASK, ~0); tp 4868 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 4869 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) { tp 4870 drivers/net/ethernet/broadcom/tg3.c if (tp->led_ctrl == LED_CTRL_MODE_PHY_1) tp 4871 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, tp 4874 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, 0); tp 4880 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_MDIX_STATE; tp 4881 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = 0; tp 4883 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_CAPACITIVE_COUPLING) { tp 4884 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_auxctl_read(tp, tp 4888 drivers/net/ethernet/broadcom/tg3.c tg3_phy_auxctl_write(tp, tp 4897 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 4898 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMSR, &bmsr) && tp 4907 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); tp 4910 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat) && tp 4915 drivers/net/ethernet/broadcom/tg3.c tg3_aux_stat_to_speed_duplex(tp, aux_stat, tp 4921 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMCR, &bmcr); tp 4922 drivers/net/ethernet/broadcom/tg3.c if (tg3_readphy(tp, MII_BMCR, &bmcr)) tp 4932 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = current_speed; tp 4933 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = current_duplex; tp 4935 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE) { tp 4936 drivers/net/ethernet/broadcom/tg3.c bool eee_config_ok = tg3_phy_eee_config_ok(tp); tp 4940 drivers/net/ethernet/broadcom/tg3.c tg3_phy_copper_an_config_ok(tp, &lcl_adv) && tp 4941 drivers/net/ethernet/broadcom/tg3.c tg3_phy_copper_fetch_rmtadv(tp, &rmt_adv)) tp 4949 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) && tp 4951 drivers/net/ethernet/broadcom/tg3.c tg3_setup_eee(tp); tp 4952 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 4956 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed == current_speed && tp 4957 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex == current_duplex) { tp 4963 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex == DUPLEX_FULL) { tp 4966 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 4974 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, reg, &val) && (val & bit)) tp 4975 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_MDIX_STATE; tp 4977 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, lcl_adv, rmt_adv); tp 4982 drivers/net/ethernet/broadcom/tg3.c if (!current_link_up || (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER)) { tp 4983 drivers/net/ethernet/broadcom/tg3.c tg3_phy_copper_begin(tp); tp 4985 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ROBOSWITCH)) { tp 4990 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = current_speed; tp 4991 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = current_duplex; tp 4994 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 4995 drivers/net/ethernet/broadcom/tg3.c if ((!tg3_readphy(tp, MII_BMSR, &bmsr) && (bmsr & BMSR_LSTATUS)) || tp 4996 drivers/net/ethernet/broadcom/tg3.c (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)) tp 5000 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK; tp 5002 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_100 || tp 5003 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed == SPEED_10) tp 5004 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_MII; tp 5006 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 5007 drivers/net/ethernet/broadcom/tg3.c } else if (tp->phy_flags & TG3_PHYFLG_IS_FET) tp 5008 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_MII; tp 5010 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 5015 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, RGMII_MODE)) { tp 5019 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_10) tp 5021 drivers/net/ethernet/broadcom/tg3.c else if (tp->link_config.active_speed == SPEED_100) tp 5024 drivers/net/ethernet/broadcom/tg3.c else if (tp->link_config.active_speed == SPEED_1000) tp 5032 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX; tp 5033 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_duplex == DUPLEX_HALF) tp 5034 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_HALF_DUPLEX; tp 5036 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700) { tp 5038 drivers/net/ethernet/broadcom/tg3.c tg3_5700_link_polarity(tp, tp->link_config.active_speed)) tp 5039 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_LINK_POLARITY; tp 5041 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; tp 5047 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5411 && tp 5048 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5700_ALTIMA) { tp 5049 drivers/net/ethernet/broadcom/tg3.c tp->mi_mode |= MAC_MI_MODE_AUTO_POLL; tp 5050 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MI_MODE, tp->mi_mode); tp 5054 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5057 drivers/net/ethernet/broadcom/tg3.c tg3_phy_eee_adjust(tp, current_link_up); tp 5059 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_LINKCHG_REG)) { tp 5067 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 && tp 5069 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed == SPEED_1000 && tp 5070 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, PCIX_MODE) || tg3_flag(tp, PCI_HIGH_SPEED))) { tp 5076 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, tp 5082 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CLKREQ_BUG)) { tp 5083 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_100 || tp 5084 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed == SPEED_10) tp 5085 drivers/net/ethernet/broadcom/tg3.c pcie_capability_clear_word(tp->pdev, PCI_EXP_LNKCTL, tp 5088 drivers/net/ethernet/broadcom/tg3.c pcie_capability_set_word(tp->pdev, PCI_EXP_LNKCTL, tp 5092 drivers/net/ethernet/broadcom/tg3.c tg3_test_and_report_link_chg(tp, current_link_up); tp 5161 drivers/net/ethernet/broadcom/tg3.c static int tg3_fiber_aneg_smachine(struct tg3 *tp, tp 5241 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_SEND_CONFIGS; tp 5242 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5264 drivers/net/ethernet/broadcom/tg3.c flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl); tp 5270 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_SEND_CONFIGS; tp 5271 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5285 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_SEND_CONFIGS; tp 5286 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5371 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; tp 5372 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5413 drivers/net/ethernet/broadcom/tg3.c static int fiber_autoneg(struct tg3 *tp, u32 *txflags, u32 *rxflags) tp 5423 drivers/net/ethernet/broadcom/tg3.c tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; tp 5427 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); tp 5436 drivers/net/ethernet/broadcom/tg3.c status = tg3_fiber_aneg_smachine(tp, &aninfo); tp 5443 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; tp 5444 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5458 drivers/net/ethernet/broadcom/tg3.c static void tg3_init_bcm8002(struct tg3 *tp) tp 5464 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, INIT_COMPLETE) && tp 5469 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x16, 0x8007); tp 5472 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, BMCR_RESET); tp 5480 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x10, 0x8411); tp 5483 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x11, 0x0a10); tp 5485 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x18, 0x00a0); tp 5486 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x16, 0x41ff); tp 5489 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x13, 0x0400); tp 5491 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x13, 0x0000); tp 5493 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x11, 0x0a50); tp 5495 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x11, 0x0a10); tp 5505 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, 0x10, 0x8011); tp 5508 drivers/net/ethernet/broadcom/tg3.c static bool tg3_setup_fiber_hw_autoneg(struct tg3 *tp, u32 mac_status) tp 5522 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5704_A0 && tp 5523 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5704_A1) { tp 5535 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg != AUTONEG_ENABLE) { tp 5550 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, 0, 0); tp 5559 drivers/net/ethernet/broadcom/tg3.c flowctrl = tg3_advert_flowctrl_1000X(tp->link_config.flowctrl); tp 5566 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT) && tp 5567 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter && tp 5571 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter--; tp 5582 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter = SERDES_AN_TIMEOUT_5704S; tp 5583 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 5603 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = tp 5606 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, local_adv, remote_adv); tp 5608 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter = 0; tp 5609 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 5611 drivers/net/ethernet/broadcom/tg3.c if (tp->serdes_counter) tp 5612 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter--; tp 5634 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, 0, 0); tp 5636 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= tp 5638 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter = tp 5645 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter = SERDES_AN_TIMEOUT_5704S; tp 5646 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 5653 drivers/net/ethernet/broadcom/tg3.c static bool tg3_setup_fiber_by_hand(struct tg3 *tp, u32 mac_status) tp 5660 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE) { tp 5664 drivers/net/ethernet/broadcom/tg3.c if (fiber_autoneg(tp, &txflags, &rxflags)) { tp 5677 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = tp 5680 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, local_adv, remote_adv); tp 5702 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, 0, 0); tp 5707 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS)); tp 5710 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5718 drivers/net/ethernet/broadcom/tg3.c static int tg3_setup_fiber_phy(struct tg3 *tp, bool force_reset) tp 5727 drivers/net/ethernet/broadcom/tg3.c orig_pause_cfg = tp->link_config.active_flowctrl; tp 5728 drivers/net/ethernet/broadcom/tg3.c orig_active_speed = tp->link_config.active_speed; tp 5729 drivers/net/ethernet/broadcom/tg3.c orig_active_duplex = tp->link_config.active_duplex; tp 5731 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, HW_AUTONEG) && tp 5732 drivers/net/ethernet/broadcom/tg3.c tp->link_up && tp 5733 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, INIT_COMPLETE)) { tp 5749 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); tp 5750 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; tp 5751 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5754 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_id == TG3_PHY_ID_BCM8002) tp 5755 drivers/net/ethernet/broadcom/tg3.c tg3_init_bcm8002(tp); tp 5762 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = 0; tp 5765 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_AUTONEG)) tp 5766 drivers/net/ethernet/broadcom/tg3.c current_link_up = tg3_setup_fiber_hw_autoneg(tp, mac_status); tp 5768 drivers/net/ethernet/broadcom/tg3.c current_link_up = tg3_setup_fiber_by_hand(tp, mac_status); tp 5770 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].hw_status->status = tp 5772 drivers/net/ethernet/broadcom/tg3.c (tp->napi[0].hw_status->status & ~SD_STATUS_LINK_CHG)); tp 5787 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE && tp 5788 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter == 0) { tp 5789 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, (tp->mac_mode | tp 5792 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5797 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = SPEED_1000; tp 5798 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = DUPLEX_FULL; tp 5799 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_LED_CTRL, (tp->led_ctrl | tp 5803 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = SPEED_UNKNOWN; tp 5804 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = DUPLEX_UNKNOWN; tp 5805 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_LED_CTRL, (tp->led_ctrl | tp 5810 drivers/net/ethernet/broadcom/tg3.c if (!tg3_test_and_report_link_chg(tp, current_link_up)) { tp 5811 drivers/net/ethernet/broadcom/tg3.c u32 now_pause_cfg = tp->link_config.active_flowctrl; tp 5813 drivers/net/ethernet/broadcom/tg3.c orig_active_speed != tp->link_config.active_speed || tp 5814 drivers/net/ethernet/broadcom/tg3.c orig_active_duplex != tp->link_config.active_duplex) tp 5815 drivers/net/ethernet/broadcom/tg3.c tg3_link_report(tp); tp 5821 drivers/net/ethernet/broadcom/tg3.c static int tg3_setup_fiber_mii_phy(struct tg3 *tp, bool force_reset) tp 5830 drivers/net/ethernet/broadcom/tg3.c if ((tg3_asic_rev(tp) == ASIC_REV_5719 || tp 5831 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) && tp 5832 drivers/net/ethernet/broadcom/tg3.c !tg3_readphy(tp, SERDES_TG3_1000X_STATUS, &sgsr) && tp 5836 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 5838 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK; tp 5841 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 5846 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 5849 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_MII; tp 5852 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_MII; tp 5861 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5864 drivers/net/ethernet/broadcom/tg3.c tg3_clear_mac_status(tp); tp 5869 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 5870 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 5873 drivers/net/ethernet/broadcom/tg3.c tg3_clear_mac_status(tp); tp 5876 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 5878 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = 0; tp 5880 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMSR, &bmsr); tp 5881 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMSR, &bmsr); tp 5882 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5714) { tp 5889 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMCR, &bmcr); tp 5891 drivers/net/ethernet/broadcom/tg3.c if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && tp 5892 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT)) { tp 5894 drivers/net/ethernet/broadcom/tg3.c } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { tp 5897 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_ADVERTISE, &adv); tp 5903 drivers/net/ethernet/broadcom/tg3.c newadv |= tg3_advert_flowctrl_1000X(tp->link_config.flowctrl); tp 5904 drivers/net/ethernet/broadcom/tg3.c newadv |= ethtool_adv_to_mii_adv_x(tp->link_config.advertising); tp 5907 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_ADVERTISE, newadv); tp 5909 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr); tp 5912 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter = SERDES_AN_TIMEOUT_5714S; tp 5913 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 5923 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.duplex == DUPLEX_FULL) tp 5933 drivers/net/ethernet/broadcom/tg3.c if (tp->link_up) { tp 5936 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_ADVERTISE, &adv); tp 5940 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_ADVERTISE, adv); tp 5941 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr | tp 5945 drivers/net/ethernet/broadcom/tg3.c tg3_carrier_off(tp); tp 5947 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, new_bmcr); tp 5949 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMSR, &bmsr); tp 5950 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_BMSR, &bmsr); tp 5951 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5714) { tp 5957 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 5975 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_ADVERTISE, &local_adv); tp 5976 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_LPA, &remote_adv); tp 5985 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv = tp 5987 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, 5780_CLASS)) { tp 5997 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, local_adv, remote_adv); tp 5999 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX; tp 6000 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_duplex == DUPLEX_HALF) tp 6001 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_HALF_DUPLEX; tp 6003 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 6008 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = current_speed; tp 6009 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = current_duplex; tp 6011 drivers/net/ethernet/broadcom/tg3.c tg3_test_and_report_link_chg(tp, current_link_up); tp 6015 drivers/net/ethernet/broadcom/tg3.c static void tg3_serdes_parallel_detect(struct tg3 *tp) tp 6017 drivers/net/ethernet/broadcom/tg3.c if (tp->serdes_counter) { tp 6019 drivers/net/ethernet/broadcom/tg3.c tp->serdes_counter--; tp 6023 drivers/net/ethernet/broadcom/tg3.c if (!tp->link_up && tp 6024 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.autoneg == AUTONEG_ENABLE)) { tp 6027 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMCR, &bmcr); tp 6032 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_MISC_SHDW, 0x7c00); tp 6033 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_MISC_SHDW, &phy1); tp 6036 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, tp 6038 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2); tp 6039 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2); tp 6049 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr); tp 6050 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_PARALLEL_DETECT; tp 6053 drivers/net/ethernet/broadcom/tg3.c } else if (tp->link_up && tp 6054 drivers/net/ethernet/broadcom/tg3.c (tp->link_config.autoneg == AUTONEG_ENABLE) && tp 6055 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT)) { tp 6059 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_DSP_ADDRESS, tp 6061 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &phy2); tp 6066 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMCR, &bmcr); tp 6067 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANENABLE); tp 6069 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 6075 drivers/net/ethernet/broadcom/tg3.c static int tg3_setup_phy(struct tg3 *tp, bool force_reset) tp 6080 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) tp 6081 drivers/net/ethernet/broadcom/tg3.c err = tg3_setup_fiber_phy(tp, force_reset); tp 6082 drivers/net/ethernet/broadcom/tg3.c else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) tp 6083 drivers/net/ethernet/broadcom/tg3.c err = tg3_setup_fiber_mii_phy(tp, force_reset); tp 6085 drivers/net/ethernet/broadcom/tg3.c err = tg3_setup_copper_phy(tp, force_reset); tp 6087 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5784_AX) { tp 6105 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 6106 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 6111 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.active_speed == SPEED_1000 && tp 6112 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex == DUPLEX_HALF) tp 6119 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 6120 drivers/net/ethernet/broadcom/tg3.c if (tp->link_up) { tp 6122 drivers/net/ethernet/broadcom/tg3.c tp->coal.stats_block_coalesce_usecs); tp 6128 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ASPM_WORKAROUND)) { tp 6130 drivers/net/ethernet/broadcom/tg3.c if (!tp->link_up) tp 6132 drivers/net/ethernet/broadcom/tg3.c tp->pwrmgmt_thresh; tp 6142 drivers/net/ethernet/broadcom/tg3.c static u64 tg3_refclk_read(struct tg3 *tp, struct ptp_system_timestamp *sts) tp 6155 drivers/net/ethernet/broadcom/tg3.c static void tg3_refclk_write(struct tg3 *tp, u64 newval) tp 6165 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_full_lock(struct tg3 *tp, int irq_sync); tp 6166 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_full_unlock(struct tg3 *tp); tp 6169 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 6175 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PTP_CAPABLE)) { tp 6181 drivers/net/ethernet/broadcom/tg3.c if (tp->ptp_clock) tp 6182 drivers/net/ethernet/broadcom/tg3.c info->phc_index = ptp_clock_index(tp->ptp_clock); tp 6197 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tp 6217 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 6226 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 6233 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tp 6235 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 6236 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust += delta; tp 6237 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 6246 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tp 6248 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 6249 drivers/net/ethernet/broadcom/tg3.c ns = tg3_refclk_read(tp, sts); tp 6250 drivers/net/ethernet/broadcom/tg3.c ns += tp->ptp_adjust; tp 6251 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 6262 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tp 6266 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 6267 drivers/net/ethernet/broadcom/tg3.c tg3_refclk_write(tp, ns); tp 6268 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust = 0; tp 6269 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 6277 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(ptp, struct tg3, ptp_info); tp 6290 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 6301 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 6308 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 6327 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 6353 drivers/net/ethernet/broadcom/tg3.c static void tg3_hwclock_to_timestamp(struct tg3 *tp, u64 hwclock, tp 6358 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust); tp 6362 drivers/net/ethernet/broadcom/tg3.c static void tg3_ptp_init(struct tg3 *tp) tp 6364 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PTP_CAPABLE)) tp 6368 drivers/net/ethernet/broadcom/tg3.c tg3_refclk_write(tp, ktime_to_ns(ktime_get_real())); tp 6369 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust = 0; tp 6370 drivers/net/ethernet/broadcom/tg3.c tp->ptp_info = tg3_ptp_caps; tp 6374 drivers/net/ethernet/broadcom/tg3.c static void tg3_ptp_resume(struct tg3 *tp) tp 6376 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PTP_CAPABLE)) tp 6379 drivers/net/ethernet/broadcom/tg3.c tg3_refclk_write(tp, ktime_to_ns(ktime_get_real()) + tp->ptp_adjust); tp 6380 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust = 0; tp 6383 drivers/net/ethernet/broadcom/tg3.c static void tg3_ptp_fini(struct tg3 *tp) tp 6385 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PTP_CAPABLE) || !tp->ptp_clock) tp 6388 drivers/net/ethernet/broadcom/tg3.c ptp_clock_unregister(tp->ptp_clock); tp 6389 drivers/net/ethernet/broadcom/tg3.c tp->ptp_clock = NULL; tp 6390 drivers/net/ethernet/broadcom/tg3.c tp->ptp_adjust = 0; tp 6393 drivers/net/ethernet/broadcom/tg3.c static inline int tg3_irq_sync(struct tg3 *tp) tp 6395 drivers/net/ethernet/broadcom/tg3.c return tp->irq_sync; tp 6398 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_rd32_loop(struct tg3 *tp, u32 *dst, u32 off, u32 len) tp 6407 drivers/net/ethernet/broadcom/tg3.c static void tg3_dump_legacy_regs(struct tg3 *tp, u32 *regs) tp 6409 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, TG3PCI_VENDOR, 0xb0); tp 6410 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, MAILBOX_INTERRUPT_0, 0x200); tp 6411 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, MAC_MODE, 0x4f0); tp 6412 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, SNDDATAI_MODE, 0xe0); tp 6413 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, SNDDATAC_MODE, 0x04); tp 6414 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, SNDBDS_MODE, 0x80); tp 6415 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, SNDBDI_MODE, 0x48); tp 6416 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, SNDBDC_MODE, 0x04); tp 6417 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVLPC_MODE, 0x20); tp 6418 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVLPC_SELLST_BASE, 0x15c); tp 6419 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVDBDI_MODE, 0x0c); tp 6420 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVDBDI_JUMBO_BD, 0x3c); tp 6421 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVDBDI_BD_PROD_IDX_0, 0x44); tp 6422 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVDCC_MODE, 0x04); tp 6423 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVBDI_MODE, 0x20); tp 6424 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVCC_MODE, 0x14); tp 6425 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RCVLSC_MODE, 0x08); tp 6426 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, MBFREE_MODE, 0x08); tp 6427 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, HOSTCC_MODE, 0x100); tp 6429 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SUPPORT_MSIX)) tp 6430 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, HOSTCC_RXCOL_TICKS_VEC1, 0x180); tp 6432 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, MEMARB_MODE, 0x10); tp 6433 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, BUFMGR_MODE, 0x58); tp 6434 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RDMAC_MODE, 0x08); tp 6435 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, WDMAC_MODE, 0x08); tp 6436 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RX_CPU_MODE, 0x04); tp 6437 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RX_CPU_STATE, 0x04); tp 6438 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RX_CPU_PGMCTR, 0x04); tp 6439 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, RX_CPU_HWBKPT, 0x04); tp 6441 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 6442 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, TX_CPU_MODE, 0x04); tp 6443 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, TX_CPU_STATE, 0x04); tp 6444 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, TX_CPU_PGMCTR, 0x04); tp 6447 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, GRCMBOX_INTERRUPT_0, 0x110); tp 6448 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, FTQ_RESET, 0x120); tp 6449 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, MSGINT_MODE, 0x0c); tp 6450 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, DMAC_MODE, 0x04); tp 6451 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, GRC_MODE, 0x4c); tp 6453 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NVRAM)) tp 6454 drivers/net/ethernet/broadcom/tg3.c tg3_rd32_loop(tp, regs, NVRAM_CMD, 0x24); tp 6457 drivers/net/ethernet/broadcom/tg3.c static void tg3_dump_state(struct tg3 *tp) tp 6466 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) { tp 6471 drivers/net/ethernet/broadcom/tg3.c tg3_dump_legacy_regs(tp, regs); tp 6478 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "0x%08x: 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", tp 6485 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 6486 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 6489 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 6500 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 6519 drivers/net/ethernet/broadcom/tg3.c static void tg3_tx_recover(struct tg3 *tp) tp 6521 drivers/net/ethernet/broadcom/tg3.c BUG_ON(tg3_flag(tp, MBOX_WRITE_REORDER) || tp 6522 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox == tg3_write_indirect_mbox); tp 6524 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 6530 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TX_RECOVERY_PENDING); tp 6547 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 6551 drivers/net/ethernet/broadcom/tg3.c int index = tnapi - tp->napi; tp 6554 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 6557 drivers/net/ethernet/broadcom/tg3.c txq = netdev_get_tx_queue(tp->dev, index); tp 6565 drivers/net/ethernet/broadcom/tg3.c tg3_tx_recover(tp); tp 6574 drivers/net/ethernet/broadcom/tg3.c tg3_hwclock_to_timestamp(tp, hwclock, ×tamp); tp 6579 drivers/net/ethernet/broadcom/tg3.c pci_unmap_single(tp->pdev, tp 6599 drivers/net/ethernet/broadcom/tg3.c pci_unmap_page(tp->pdev, tp 6619 drivers/net/ethernet/broadcom/tg3.c tg3_tx_recover(tp); tp 6653 drivers/net/ethernet/broadcom/tg3.c static void tg3_rx_data_free(struct tg3 *tp, struct ring_info *ri, u32 map_sz) tp 6655 drivers/net/ethernet/broadcom/tg3.c unsigned int skb_size = SKB_DATA_ALIGN(map_sz + TG3_RX_OFFSET(tp)) + tp 6661 drivers/net/ethernet/broadcom/tg3.c pci_unmap_single(tp->pdev, dma_unmap_addr(ri, mapping), tp 6679 drivers/net/ethernet/broadcom/tg3.c static int tg3_alloc_rx_data(struct tg3 *tp, struct tg3_rx_prodring_set *tpr, tp 6691 drivers/net/ethernet/broadcom/tg3.c dest_idx = dest_idx_unmasked & tp->rx_std_ring_mask; tp 6694 drivers/net/ethernet/broadcom/tg3.c data_size = tp->rx_pkt_map_sz; tp 6698 drivers/net/ethernet/broadcom/tg3.c dest_idx = dest_idx_unmasked & tp->rx_jmb_ring_mask; tp 6714 drivers/net/ethernet/broadcom/tg3.c skb_size = SKB_DATA_ALIGN(data_size + TG3_RX_OFFSET(tp)) + tp 6726 drivers/net/ethernet/broadcom/tg3.c mapping = pci_map_single(tp->pdev, tp 6727 drivers/net/ethernet/broadcom/tg3.c data + TG3_RX_OFFSET(tp), tp 6730 drivers/net/ethernet/broadcom/tg3.c if (unlikely(pci_dma_mapping_error(tp->pdev, mapping))) { tp 6753 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 6756 drivers/net/ethernet/broadcom/tg3.c struct tg3_rx_prodring_set *spr = &tp->napi[0].prodring; tp 6761 drivers/net/ethernet/broadcom/tg3.c dest_idx = dest_idx_unmasked & tp->rx_std_ring_mask; tp 6769 drivers/net/ethernet/broadcom/tg3.c dest_idx = dest_idx_unmasked & tp->rx_jmb_ring_mask; tp 6820 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 6851 drivers/net/ethernet/broadcom/tg3.c ri = &tp->napi[0].prodring.rx_std_buffers[desc_idx]; tp 6857 drivers/net/ethernet/broadcom/tg3.c ri = &tp->napi[0].prodring.rx_jmb_buffers[desc_idx]; tp 6872 drivers/net/ethernet/broadcom/tg3.c tp->rx_dropped++; tp 6876 drivers/net/ethernet/broadcom/tg3.c prefetch(data + TG3_RX_OFFSET(tp)); tp 6888 drivers/net/ethernet/broadcom/tg3.c if (len > TG3_RX_COPY_THRESH(tp)) { tp 6892 drivers/net/ethernet/broadcom/tg3.c skb_size = tg3_alloc_rx_data(tp, tpr, opaque_key, tp 6897 drivers/net/ethernet/broadcom/tg3.c pci_unmap_single(tp->pdev, dma_addr, skb_size, tp 6912 drivers/net/ethernet/broadcom/tg3.c skb_reserve(skb, TG3_RX_OFFSET(tp)); tp 6917 drivers/net/ethernet/broadcom/tg3.c skb = netdev_alloc_skb(tp->dev, tp 6923 drivers/net/ethernet/broadcom/tg3.c pci_dma_sync_single_for_cpu(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); tp 6925 drivers/net/ethernet/broadcom/tg3.c data + TG3_RX_OFFSET(tp), tp 6927 drivers/net/ethernet/broadcom/tg3.c pci_dma_sync_single_for_device(tp->pdev, dma_addr, len, PCI_DMA_FROMDEVICE); tp 6932 drivers/net/ethernet/broadcom/tg3.c tg3_hwclock_to_timestamp(tp, tstamp, tp 6935 drivers/net/ethernet/broadcom/tg3.c if ((tp->dev->features & NETIF_F_RXCSUM) && tp 6943 drivers/net/ethernet/broadcom/tg3.c skb->protocol = eth_type_trans(skb, tp->dev); tp 6945 drivers/net/ethernet/broadcom/tg3.c if (len > (tp->dev->mtu + ETH_HLEN) && tp 6953 drivers/net/ethernet/broadcom/tg3.c !(tp->rx_mode & RX_MODE_KEEP_VLAN_TAG)) tp 6965 drivers/net/ethernet/broadcom/tg3.c if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { tp 6967 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask; tp 6975 drivers/net/ethernet/broadcom/tg3.c sw_idx &= tp->rx_ret_ring_mask; tp 6989 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_RSS)) { tp 6995 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask; tp 7001 drivers/net/ethernet/broadcom/tg3.c tp->rx_jmb_ring_mask; tp 7011 drivers/net/ethernet/broadcom/tg3.c tpr->rx_std_prod_idx = std_prod_idx & tp->rx_std_ring_mask; tp 7012 drivers/net/ethernet/broadcom/tg3.c tpr->rx_jmb_prod_idx = jmb_prod_idx & tp->rx_jmb_ring_mask; tp 7014 drivers/net/ethernet/broadcom/tg3.c if (tnapi != &tp->napi[1]) { tp 7015 drivers/net/ethernet/broadcom/tg3.c tp->rx_refill = true; tp 7016 drivers/net/ethernet/broadcom/tg3.c napi_schedule(&tp->napi[1].napi); tp 7023 drivers/net/ethernet/broadcom/tg3.c static void tg3_poll_link(struct tg3 *tp) tp 7026 drivers/net/ethernet/broadcom/tg3.c if (!(tg3_flag(tp, USE_LINKCHG_REG) || tg3_flag(tp, POLL_SERDES))) { tp 7027 drivers/net/ethernet/broadcom/tg3.c struct tg3_hw_status *sblk = tp->napi[0].hw_status; tp 7032 drivers/net/ethernet/broadcom/tg3.c spin_lock(&tp->lock); tp 7033 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 7041 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, false); tp 7042 drivers/net/ethernet/broadcom/tg3.c spin_unlock(&tp->lock); tp 7047 drivers/net/ethernet/broadcom/tg3.c static int tg3_rx_prodring_xfer(struct tg3 *tp, tp 7068 drivers/net/ethernet/broadcom/tg3.c cpycnt = tp->rx_std_ring_mask + 1 - tp 7072 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask + 1 - dpr->rx_std_prod_idx); tp 7107 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask; tp 7109 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask; tp 7126 drivers/net/ethernet/broadcom/tg3.c cpycnt = tp->rx_jmb_ring_mask + 1 - tp 7130 drivers/net/ethernet/broadcom/tg3.c tp->rx_jmb_ring_mask + 1 - dpr->rx_jmb_prod_idx); tp 7165 drivers/net/ethernet/broadcom/tg3.c tp->rx_jmb_ring_mask; tp 7167 drivers/net/ethernet/broadcom/tg3.c tp->rx_jmb_ring_mask; tp 7175 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7180 drivers/net/ethernet/broadcom/tg3.c if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING))) tp 7194 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS) && tnapi == &tp->napi[1]) { tp 7195 drivers/net/ethernet/broadcom/tg3.c struct tg3_rx_prodring_set *dpr = &tp->napi[0].prodring; tp 7200 drivers/net/ethernet/broadcom/tg3.c tp->rx_refill = false; tp 7201 drivers/net/ethernet/broadcom/tg3.c for (i = 1; i <= tp->rxq_cnt; i++) tp 7202 drivers/net/ethernet/broadcom/tg3.c err |= tg3_rx_prodring_xfer(tp, dpr, tp 7203 drivers/net/ethernet/broadcom/tg3.c &tp->napi[i].prodring); tp 7216 drivers/net/ethernet/broadcom/tg3.c tw32_f(HOSTCC_MODE, tp->coal_now); tp 7222 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_reset_task_schedule(struct tg3 *tp) tp 7224 drivers/net/ethernet/broadcom/tg3.c if (!test_and_set_bit(TG3_FLAG_RESET_TASK_PENDING, tp->tg3_flags)) tp 7225 drivers/net/ethernet/broadcom/tg3.c schedule_work(&tp->reset_task); tp 7228 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_reset_task_cancel(struct tg3 *tp) tp 7230 drivers/net/ethernet/broadcom/tg3.c cancel_work_sync(&tp->reset_task); tp 7231 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, RESET_TASK_PENDING); tp 7232 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TX_RECOVERY_PENDING); tp 7238 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7245 drivers/net/ethernet/broadcom/tg3.c if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING))) tp 7266 drivers/net/ethernet/broadcom/tg3.c if (tnapi == &tp->napi[1] && tp->rx_refill) tp 7276 drivers/net/ethernet/broadcom/tg3.c if (unlikely(tnapi == &tp->napi[1] && tp->rx_refill)) { tp 7277 drivers/net/ethernet/broadcom/tg3.c tw32(HOSTCC_MODE, tp->coalesce_mode | tp 7285 drivers/net/ethernet/broadcom/tg3.c tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1); tp 7291 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_schedule(tp); tp 7295 drivers/net/ethernet/broadcom/tg3.c static void tg3_process_error(struct tg3 *tp) tp 7300 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ERROR_PROCESSED)) tp 7306 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "FLOW Attention error. Resetting chip.\n"); tp 7311 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "MSI Status error. Resetting chip.\n"); tp 7316 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "DMA Status error. Resetting chip.\n"); tp 7323 drivers/net/ethernet/broadcom/tg3.c tg3_dump_state(tp); tp 7325 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ERROR_PROCESSED); tp 7326 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_schedule(tp); tp 7332 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7338 drivers/net/ethernet/broadcom/tg3.c tg3_process_error(tp); tp 7340 drivers/net/ethernet/broadcom/tg3.c tg3_poll_link(tp); tp 7344 drivers/net/ethernet/broadcom/tg3.c if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING))) tp 7350 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TAGGED_STATUS)) { tp 7368 drivers/net/ethernet/broadcom/tg3.c tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1); tp 7374 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_schedule(tp); tp 7378 drivers/net/ethernet/broadcom/tg3.c static void tg3_napi_disable(struct tg3 *tp) tp 7382 drivers/net/ethernet/broadcom/tg3.c for (i = tp->irq_cnt - 1; i >= 0; i--) tp 7383 drivers/net/ethernet/broadcom/tg3.c napi_disable(&tp->napi[i].napi); tp 7386 drivers/net/ethernet/broadcom/tg3.c static void tg3_napi_enable(struct tg3 *tp) tp 7390 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) tp 7391 drivers/net/ethernet/broadcom/tg3.c napi_enable(&tp->napi[i].napi); tp 7394 drivers/net/ethernet/broadcom/tg3.c static void tg3_napi_init(struct tg3 *tp) tp 7398 drivers/net/ethernet/broadcom/tg3.c netif_napi_add(tp->dev, &tp->napi[0].napi, tg3_poll, 64); tp 7399 drivers/net/ethernet/broadcom/tg3.c for (i = 1; i < tp->irq_cnt; i++) tp 7400 drivers/net/ethernet/broadcom/tg3.c netif_napi_add(tp->dev, &tp->napi[i].napi, tg3_poll_msix, 64); tp 7403 drivers/net/ethernet/broadcom/tg3.c static void tg3_napi_fini(struct tg3 *tp) tp 7407 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) tp 7408 drivers/net/ethernet/broadcom/tg3.c netif_napi_del(&tp->napi[i].napi); tp 7411 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_netif_stop(struct tg3 *tp) tp 7413 drivers/net/ethernet/broadcom/tg3.c netif_trans_update(tp->dev); /* prevent tx timeout */ tp 7414 drivers/net/ethernet/broadcom/tg3.c tg3_napi_disable(tp); tp 7415 drivers/net/ethernet/broadcom/tg3.c netif_carrier_off(tp->dev); tp 7416 drivers/net/ethernet/broadcom/tg3.c netif_tx_disable(tp->dev); tp 7420 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_netif_start(struct tg3 *tp) tp 7422 drivers/net/ethernet/broadcom/tg3.c tg3_ptp_resume(tp); tp 7428 drivers/net/ethernet/broadcom/tg3.c netif_tx_wake_all_queues(tp->dev); tp 7430 drivers/net/ethernet/broadcom/tg3.c if (tp->link_up) tp 7431 drivers/net/ethernet/broadcom/tg3.c netif_carrier_on(tp->dev); tp 7433 drivers/net/ethernet/broadcom/tg3.c tg3_napi_enable(tp); tp 7434 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].hw_status->status |= SD_STATUS_UPDATED; tp 7435 drivers/net/ethernet/broadcom/tg3.c tg3_enable_ints(tp); tp 7438 drivers/net/ethernet/broadcom/tg3.c static void tg3_irq_quiesce(struct tg3 *tp) tp 7439 drivers/net/ethernet/broadcom/tg3.c __releases(tp->lock) tp 7440 drivers/net/ethernet/broadcom/tg3.c __acquires(tp->lock) tp 7444 drivers/net/ethernet/broadcom/tg3.c BUG_ON(tp->irq_sync); tp 7446 drivers/net/ethernet/broadcom/tg3.c tp->irq_sync = 1; tp 7449 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 7451 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) tp 7452 drivers/net/ethernet/broadcom/tg3.c synchronize_irq(tp->napi[i].irq_vec); tp 7454 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 7462 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_full_lock(struct tg3 *tp, int irq_sync) tp 7464 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 7466 drivers/net/ethernet/broadcom/tg3.c tg3_irq_quiesce(tp); tp 7469 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_full_unlock(struct tg3 *tp) tp 7471 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 7480 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7486 drivers/net/ethernet/broadcom/tg3.c if (likely(!tg3_irq_sync(tp))) tp 7499 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7512 drivers/net/ethernet/broadcom/tg3.c if (likely(!tg3_irq_sync(tp))) tp 7521 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7531 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CHIP_RESETTING) || tp 7550 drivers/net/ethernet/broadcom/tg3.c if (tg3_irq_sync(tp)) tp 7570 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7580 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CHIP_RESETTING) || tp 7608 drivers/net/ethernet/broadcom/tg3.c if (tg3_irq_sync(tp)) tp 7623 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7628 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 7638 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 7640 drivers/net/ethernet/broadcom/tg3.c if (tg3_irq_sync(tp)) tp 7643 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) tp 7644 drivers/net/ethernet/broadcom/tg3.c tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]); tp 7650 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 7652 drivers/net/ethernet/broadcom/tg3.c if (netif_msg_tx_err(tp)) { tp 7654 drivers/net/ethernet/broadcom/tg3.c tg3_dump_state(tp); tp 7657 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_schedule(tp); tp 7671 drivers/net/ethernet/broadcom/tg3.c static inline int tg3_4g_tso_overflow_test(struct tg3 *tp, dma_addr_t mapping, tp 7674 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762 && mss) { tp 7683 drivers/net/ethernet/broadcom/tg3.c static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, tp 7687 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 40BIT_DMA_BUG)) tp 7709 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7712 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8) tp 7718 drivers/net/ethernet/broadcom/tg3.c if (tg3_4g_tso_overflow_test(tp, map, len, mss)) tp 7721 drivers/net/ethernet/broadcom/tg3.c if (tg3_40bit_overflow_test(tp, map, len)) tp 7724 drivers/net/ethernet/broadcom/tg3.c if (tp->dma_limit) { tp 7727 drivers/net/ethernet/broadcom/tg3.c while (len > tp->dma_limit && *budget) { tp 7728 drivers/net/ethernet/broadcom/tg3.c u32 frag_len = tp->dma_limit; tp 7729 drivers/net/ethernet/broadcom/tg3.c len -= tp->dma_limit; tp 7733 drivers/net/ethernet/broadcom/tg3.c len += tp->dma_limit / 2; tp 7734 drivers/net/ethernet/broadcom/tg3.c frag_len = tp->dma_limit / 2; tp 7777 drivers/net/ethernet/broadcom/tg3.c pci_unmap_single(tnapi->tp->pdev, tp 7794 drivers/net/ethernet/broadcom/tg3.c pci_unmap_page(tnapi->tp->pdev, tp 7812 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = tnapi->tp; tp 7817 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5701) tp 7831 drivers/net/ethernet/broadcom/tg3.c new_addr = pci_map_single(tp->pdev, new_skb->data, new_skb->len, tp 7834 drivers/net/ethernet/broadcom/tg3.c if (pci_dma_mapping_error(tp->pdev, new_addr)) { tp 7874 drivers/net/ethernet/broadcom/tg3.c static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi, tp 7896 drivers/net/ethernet/broadcom/tg3.c segs = skb_gso_segment(skb, tp->dev->features & tp 7905 drivers/net/ethernet/broadcom/tg3.c tg3_start_xmit(nskb, tp->dev); tp 7917 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 7931 drivers/net/ethernet/broadcom/tg3.c tnapi = &tp->napi[skb_get_queue_mapping(skb)]; tp 7932 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 7974 drivers/net/ethernet/broadcom/tg3.c return tg3_tso_bug(tp, tnapi, txq, skb); tp 7980 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, TSO_BUG)) { tp 7982 drivers/net/ethernet/broadcom/tg3.c return tg3_tso_bug(tp, tnapi, txq, skb); tp 7997 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_1) || tp 7998 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 7999 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3)) { tp 8007 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_3)) { tp 8012 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, HW_TSO_2)) tp 8014 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, HW_TSO_1) || tp 8015 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) { tp 8043 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_JUMBO_BDFLAG) && tp 8053 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, TX_TSTAMP_EN)) { tp 8060 drivers/net/ethernet/broadcom/tg3.c mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE); tp 8061 drivers/net/ethernet/broadcom/tg3.c if (pci_dma_mapping_error(tp->pdev, mapping)) tp 8070 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5701_DMA_BUG)) tp 8080 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, HW_TSO_1) && tp 8081 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, HW_TSO_2) && tp 8082 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, HW_TSO_3)) tp 8093 drivers/net/ethernet/broadcom/tg3.c mapping = skb_frag_dma_map(&tp->pdev->dev, frag, 0, tp 8099 drivers/net/ethernet/broadcom/tg3.c if (dma_mapping_error(&tp->pdev->dev, mapping)) tp 8125 drivers/net/ethernet/broadcom/tg3.c return tg3_tso_bug(tp, tnapi, txq, skb); tp 8171 drivers/net/ethernet/broadcom/tg3.c tp->tx_dropped++; tp 8175 drivers/net/ethernet/broadcom/tg3.c static void tg3_mac_loopback(struct tg3 *tp, bool enable) tp 8178 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~(MAC_MODE_HALF_DUPLEX | tp 8181 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_INT_LPBACK; tp 8183 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 8184 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_LINK_POLARITY; tp 8186 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY) tp 8187 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_MII; tp 8189 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; tp 8191 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_PORT_INT_LPBACK; tp 8193 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS) || tp 8194 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) || tp 8195 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5700) tp 8196 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; tp 8199 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_MODE, tp->mac_mode); tp 8203 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_lpbk_set(struct tg3 *tp, u32 speed, bool extlpbk) tp 8207 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_apd(tp, false); tp 8208 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_automdix(tp, false); tp 8210 drivers/net/ethernet/broadcom/tg3.c if (extlpbk && tg3_phy_set_extloopbk(tp)) tp 8222 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) { tp 8232 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_FET)) { tp 8233 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_CTRL1000, &val); tp 8236 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_CTRL1000, val); tp 8240 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_PTEST, ptest); tp 8245 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr); tp 8248 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_FET) tp 8249 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMCR, &bmcr); tp 8253 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_IS_FET) && tp 8254 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785) { tp 8255 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_FET_PTEST, ptest | tp 8260 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_FET_PTEST, &val); tp 8264 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && tp 8265 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 8268 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_RX_MODE, tp->rx_mode); tp 8271 drivers/net/ethernet/broadcom/tg3.c mac_mode = tp->mac_mode & tp 8278 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700) { tp 8279 drivers/net/ethernet/broadcom/tg3.c u32 masked_phy_id = tp->phy_id & TG3_PHY_ID_MASK; tp 8286 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_EXT_CTRL, tp 8298 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 8301 drivers/net/ethernet/broadcom/tg3.c if (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK) tp 8304 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 8305 drivers/net/ethernet/broadcom/tg3.c tg3_mac_loopback(tp, true); tp 8306 drivers/net/ethernet/broadcom/tg3.c netif_carrier_on(tp->dev); tp 8307 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 8310 drivers/net/ethernet/broadcom/tg3.c if (!(tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)) tp 8313 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 8314 drivers/net/ethernet/broadcom/tg3.c tg3_mac_loopback(tp, false); tp 8316 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, true); tp 8317 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 8325 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 8327 drivers/net/ethernet/broadcom/tg3.c if (dev->mtu > ETH_DATA_LEN && tg3_flag(tp, 5780_CLASS)) tp 8343 drivers/net/ethernet/broadcom/tg3.c static void tg3_rx_prodring_free(struct tg3 *tp, tp 8348 drivers/net/ethernet/broadcom/tg3.c if (tpr != &tp->napi[0].prodring) { tp 8350 drivers/net/ethernet/broadcom/tg3.c i = (i + 1) & tp->rx_std_ring_mask) tp 8351 drivers/net/ethernet/broadcom/tg3.c tg3_rx_data_free(tp, &tpr->rx_std_buffers[i], tp 8352 drivers/net/ethernet/broadcom/tg3.c tp->rx_pkt_map_sz); tp 8354 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_CAPABLE)) { tp 8357 drivers/net/ethernet/broadcom/tg3.c i = (i + 1) & tp->rx_jmb_ring_mask) { tp 8358 drivers/net/ethernet/broadcom/tg3.c tg3_rx_data_free(tp, &tpr->rx_jmb_buffers[i], tp 8366 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i <= tp->rx_std_ring_mask; i++) tp 8367 drivers/net/ethernet/broadcom/tg3.c tg3_rx_data_free(tp, &tpr->rx_std_buffers[i], tp 8368 drivers/net/ethernet/broadcom/tg3.c tp->rx_pkt_map_sz); tp 8370 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS)) { tp 8371 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i <= tp->rx_jmb_ring_mask; i++) tp 8372 drivers/net/ethernet/broadcom/tg3.c tg3_rx_data_free(tp, &tpr->rx_jmb_buffers[i], tp 8384 drivers/net/ethernet/broadcom/tg3.c static int tg3_rx_prodring_alloc(struct tg3 *tp, tp 8394 drivers/net/ethernet/broadcom/tg3.c if (tpr != &tp->napi[0].prodring) { tp 8396 drivers/net/ethernet/broadcom/tg3.c TG3_RX_STD_BUFF_RING_SIZE(tp)); tp 8399 drivers/net/ethernet/broadcom/tg3.c TG3_RX_JMB_BUFF_RING_SIZE(tp)); tp 8404 drivers/net/ethernet/broadcom/tg3.c memset(tpr->rx_std, 0, TG3_RX_STD_RING_BYTES(tp)); tp 8407 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS) && tp 8408 drivers/net/ethernet/broadcom/tg3.c tp->dev->mtu > ETH_DATA_LEN) tp 8410 drivers/net/ethernet/broadcom/tg3.c tp->rx_pkt_map_sz = TG3_RX_DMA_TO_MAP_SZ(rx_pkt_dma_sz); tp 8416 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i <= tp->rx_std_ring_mask; i++) { tp 8427 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->rx_pending; i++) { tp 8430 drivers/net/ethernet/broadcom/tg3.c if (tg3_alloc_rx_data(tp, tpr, RXD_OPAQUE_RING_STD, i, tp 8432 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 8435 drivers/net/ethernet/broadcom/tg3.c "successfully\n", i, tp->rx_pending); tp 8438 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending = i; tp 8443 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS)) tp 8446 drivers/net/ethernet/broadcom/tg3.c memset(tpr->rx_jmb, 0, TG3_RX_JMB_RING_BYTES(tp)); tp 8448 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, JUMBO_RING_ENABLE)) tp 8451 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i <= tp->rx_jmb_ring_mask; i++) { tp 8462 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->rx_jumbo_pending; i++) { tp 8465 drivers/net/ethernet/broadcom/tg3.c if (tg3_alloc_rx_data(tp, tpr, RXD_OPAQUE_RING_JUMBO, i, tp 8467 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 8470 drivers/net/ethernet/broadcom/tg3.c "successfully\n", i, tp->rx_jumbo_pending); tp 8473 drivers/net/ethernet/broadcom/tg3.c tp->rx_jumbo_pending = i; tp 8482 drivers/net/ethernet/broadcom/tg3.c tg3_rx_prodring_free(tp, tpr); tp 8486 drivers/net/ethernet/broadcom/tg3.c static void tg3_rx_prodring_fini(struct tg3 *tp, tp 8494 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, TG3_RX_STD_RING_BYTES(tp), tp 8499 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, TG3_RX_JMB_RING_BYTES(tp), tp 8505 drivers/net/ethernet/broadcom/tg3.c static int tg3_rx_prodring_init(struct tg3 *tp, tp 8508 drivers/net/ethernet/broadcom/tg3.c tpr->rx_std_buffers = kzalloc(TG3_RX_STD_BUFF_RING_SIZE(tp), tp 8513 drivers/net/ethernet/broadcom/tg3.c tpr->rx_std = dma_alloc_coherent(&tp->pdev->dev, tp 8514 drivers/net/ethernet/broadcom/tg3.c TG3_RX_STD_RING_BYTES(tp), tp 8520 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS)) { tp 8521 drivers/net/ethernet/broadcom/tg3.c tpr->rx_jmb_buffers = kzalloc(TG3_RX_JMB_BUFF_RING_SIZE(tp), tp 8526 drivers/net/ethernet/broadcom/tg3.c tpr->rx_jmb = dma_alloc_coherent(&tp->pdev->dev, tp 8527 drivers/net/ethernet/broadcom/tg3.c TG3_RX_JMB_RING_BYTES(tp), tp 8537 drivers/net/ethernet/broadcom/tg3.c tg3_rx_prodring_fini(tp, tpr); tp 8548 drivers/net/ethernet/broadcom/tg3.c static void tg3_free_rings(struct tg3 *tp) tp 8552 drivers/net/ethernet/broadcom/tg3.c for (j = 0; j < tp->irq_cnt; j++) { tp 8553 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[j]; tp 8555 drivers/net/ethernet/broadcom/tg3.c tg3_rx_prodring_free(tp, &tnapi->prodring); tp 8571 drivers/net/ethernet/broadcom/tg3.c netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j)); tp 8582 drivers/net/ethernet/broadcom/tg3.c static int tg3_init_rings(struct tg3 *tp) tp 8587 drivers/net/ethernet/broadcom/tg3.c tg3_free_rings(tp); tp 8589 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 8590 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8605 drivers/net/ethernet/broadcom/tg3.c memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp)); tp 8608 drivers/net/ethernet/broadcom/tg3.c tg3_rx_prodring_alloc(tp, &tnapi->prodring)) { tp 8609 drivers/net/ethernet/broadcom/tg3.c tg3_free_rings(tp); tp 8617 drivers/net/ethernet/broadcom/tg3.c static void tg3_mem_tx_release(struct tg3 *tp) tp 8621 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) { tp 8622 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8625 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, TG3_TX_RING_BYTES, tp 8635 drivers/net/ethernet/broadcom/tg3.c static int tg3_mem_tx_acquire(struct tg3 *tp) tp 8638 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[0]; tp 8643 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 8646 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->txq_cnt; i++, tnapi++) { tp 8653 drivers/net/ethernet/broadcom/tg3.c tnapi->tx_ring = dma_alloc_coherent(&tp->pdev->dev, tp 8664 drivers/net/ethernet/broadcom/tg3.c tg3_mem_tx_release(tp); tp 8668 drivers/net/ethernet/broadcom/tg3.c static void tg3_mem_rx_release(struct tg3 *tp) tp 8672 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) { tp 8673 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8675 drivers/net/ethernet/broadcom/tg3.c tg3_rx_prodring_fini(tp, &tnapi->prodring); tp 8680 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, tp 8681 drivers/net/ethernet/broadcom/tg3.c TG3_RX_RCB_RING_BYTES(tp), tp 8688 drivers/net/ethernet/broadcom/tg3.c static int tg3_mem_rx_acquire(struct tg3 *tp) tp 8692 drivers/net/ethernet/broadcom/tg3.c limit = tp->rxq_cnt; tp 8697 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) tp 8701 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8703 drivers/net/ethernet/broadcom/tg3.c if (tg3_rx_prodring_init(tp, &tnapi->prodring)) tp 8710 drivers/net/ethernet/broadcom/tg3.c if (!i && tg3_flag(tp, ENABLE_RSS)) tp 8713 drivers/net/ethernet/broadcom/tg3.c tnapi->rx_rcb = dma_alloc_coherent(&tp->pdev->dev, tp 8714 drivers/net/ethernet/broadcom/tg3.c TG3_RX_RCB_RING_BYTES(tp), tp 8724 drivers/net/ethernet/broadcom/tg3.c tg3_mem_rx_release(tp); tp 8732 drivers/net/ethernet/broadcom/tg3.c static void tg3_free_consistent(struct tg3 *tp) tp 8736 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 8737 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8740 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, TG3_HW_STATUS_SIZE, tp 8747 drivers/net/ethernet/broadcom/tg3.c tg3_mem_rx_release(tp); tp 8748 drivers/net/ethernet/broadcom/tg3.c tg3_mem_tx_release(tp); tp 8754 drivers/net/ethernet/broadcom/tg3.c if (tp->hw_stats) { tp 8755 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, sizeof(struct tg3_hw_stats), tp 8756 drivers/net/ethernet/broadcom/tg3.c tp->hw_stats, tp->stats_mapping); tp 8757 drivers/net/ethernet/broadcom/tg3.c tp->hw_stats = NULL; tp 8765 drivers/net/ethernet/broadcom/tg3.c static int tg3_alloc_consistent(struct tg3 *tp) tp 8769 drivers/net/ethernet/broadcom/tg3.c tp->hw_stats = dma_alloc_coherent(&tp->pdev->dev, tp 8771 drivers/net/ethernet/broadcom/tg3.c &tp->stats_mapping, GFP_KERNEL); tp 8772 drivers/net/ethernet/broadcom/tg3.c if (!tp->hw_stats) tp 8775 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 8776 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8779 drivers/net/ethernet/broadcom/tg3.c tnapi->hw_status = dma_alloc_coherent(&tp->pdev->dev, tp 8788 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) { tp 8817 drivers/net/ethernet/broadcom/tg3.c if (tg3_mem_tx_acquire(tp) || tg3_mem_rx_acquire(tp)) tp 8823 drivers/net/ethernet/broadcom/tg3.c tg3_free_consistent(tp); tp 8832 drivers/net/ethernet/broadcom/tg3.c static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, u32 enable_bit, bool silent) tp 8837 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS)) { tp 8859 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) { tp 8860 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 8874 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 8884 drivers/net/ethernet/broadcom/tg3.c static int tg3_abort_hw(struct tg3 *tp, bool silent) tp 8888 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 8890 drivers/net/ethernet/broadcom/tg3.c if (pci_channel_offline(tp->pdev)) { tp 8891 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode &= ~(RX_MODE_ENABLE | TX_MODE_ENABLE); tp 8892 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_TDE_ENABLE; tp 8897 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode &= ~RX_MODE_ENABLE; tp 8898 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_RX_MODE, tp->rx_mode); tp 8901 drivers/net/ethernet/broadcom/tg3.c err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE, silent); tp 8902 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE, silent); tp 8903 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE, silent); tp 8904 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE, silent); tp 8905 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE, silent); tp 8906 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE, silent); tp 8908 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE, silent); tp 8909 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE, silent); tp 8910 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, silent); tp 8911 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE, silent); tp 8912 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, silent); tp 8913 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, DMAC_MODE, DMAC_MODE_ENABLE, silent); tp 8914 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE, silent); tp 8916 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode &= ~MAC_MODE_TDE_ENABLE; tp 8917 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 8920 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode &= ~TX_MODE_ENABLE; tp 8921 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_TX_MODE, tp->tx_mode); tp 8929 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 8935 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE, silent); tp 8936 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE, silent); tp 8937 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE, silent); tp 8942 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE, silent); tp 8943 drivers/net/ethernet/broadcom/tg3.c err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE, silent); tp 8946 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 8947 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 8956 drivers/net/ethernet/broadcom/tg3.c static void tg3_save_pci_state(struct tg3 *tp) tp 8958 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, PCI_COMMAND, &tp->pci_cmd); tp 8962 drivers/net/ethernet/broadcom/tg3.c static void tg3_restore_pci_state(struct tg3 *tp) tp 8967 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp 8968 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl); tp 8972 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0 && tp 8973 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, PCIX_MODE)) tp 8976 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 8980 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val); tp 8982 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, tp->pci_cmd); tp 8984 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PCI_EXPRESS)) { tp 8985 drivers/net/ethernet/broadcom/tg3.c pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, tp 8986 drivers/net/ethernet/broadcom/tg3.c tp->pci_cacheline_sz); tp 8987 drivers/net/ethernet/broadcom/tg3.c pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER, tp 8988 drivers/net/ethernet/broadcom/tg3.c tp->pci_lat_timer); tp 8992 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_MODE)) { tp 8995 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD, tp 8998 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD, tp 9002 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS)) { tp 9007 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSI)) { tp 9010 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, tp 9011 drivers/net/ethernet/broadcom/tg3.c tp->msi_cap + PCI_MSI_FLAGS, tp 9013 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, tp 9014 drivers/net/ethernet/broadcom/tg3.c tp->msi_cap + PCI_MSI_FLAGS, tp 9022 drivers/net/ethernet/broadcom/tg3.c static void tg3_override_clk(struct tg3 *tp) tp 9026 drivers/net/ethernet/broadcom/tg3.c switch (tg3_asic_rev(tp)) { tp 9043 drivers/net/ethernet/broadcom/tg3.c static void tg3_restore_clk(struct tg3 *tp) tp 9047 drivers/net/ethernet/broadcom/tg3.c switch (tg3_asic_rev(tp)) { tp 9066 drivers/net/ethernet/broadcom/tg3.c static int tg3_chip_reset(struct tg3 *tp) tp 9067 drivers/net/ethernet/broadcom/tg3.c __releases(tp->lock) tp 9068 drivers/net/ethernet/broadcom/tg3.c __acquires(tp->lock) tp 9074 drivers/net/ethernet/broadcom/tg3.c if (!pci_device_is_present(tp->pdev)) tp 9077 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_lock(tp); tp 9079 drivers/net/ethernet/broadcom/tg3.c tg3_ape_lock(tp, TG3_APE_LOCK_GRC); tp 9084 drivers/net/ethernet/broadcom/tg3.c tp->nvram_lock_cnt = 0; tp 9090 drivers/net/ethernet/broadcom/tg3.c tg3_save_pci_state(tp); tp 9092 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5752 || tp 9093 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5755_PLUS)) tp 9102 drivers/net/ethernet/broadcom/tg3.c write_op = tp->write32; tp 9104 drivers/net/ethernet/broadcom/tg3.c tp->write32 = tg3_write32; tp 9112 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, CHIP_RESETTING); tp 9113 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 9114 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 9124 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 9126 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) tp 9127 drivers/net/ethernet/broadcom/tg3.c synchronize_irq(tp->napi[i].irq_vec); tp 9129 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 9131 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57780) { tp 9139 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) { tp 9141 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5785 && tp 9142 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_PLUS) && tp 9147 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0) { tp 9153 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 9164 drivers/net/ethernet/broadcom/tg3.c tg3_override_clk(tp); tp 9167 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, CPMU_PRESENT)) tp 9173 drivers/net/ethernet/broadcom/tg3.c tp->write32 = write_op; tp 9196 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, PCI_COMMAND, &val); tp 9200 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS) && pci_is_pcie(tp->pdev)) { tp 9203 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A0) { tp 9211 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, 0xc4, &cfg_val); tp 9212 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, 0xc4, tp 9222 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, CPMU_PRESENT)) tp 9224 drivers/net/ethernet/broadcom/tg3.c pcie_capability_clear_word(tp->pdev, PCI_EXP_DEVCTL, val16); tp 9227 drivers/net/ethernet/broadcom/tg3.c pcie_capability_write_word(tp->pdev, PCI_EXP_DEVSTA, tp 9234 drivers/net/ethernet/broadcom/tg3.c tg3_restore_pci_state(tp); tp 9236 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, CHIP_RESETTING); tp 9237 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, ERROR_PROCESSED); tp 9240 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS)) tp 9244 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A3) { tp 9245 drivers/net/ethernet/broadcom/tg3.c tg3_stop_fw(tp); tp 9249 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_SSB_CORE)) { tp 9255 drivers/net/ethernet/broadcom/tg3.c tg3_stop_fw(tp); tp 9256 drivers/net/ethernet/broadcom/tg3.c tg3_halt_cpu(tp, RX_CPU_BASE); tp 9259 drivers/net/ethernet/broadcom/tg3.c err = tg3_poll_fw(tp); tp 9263 drivers/net/ethernet/broadcom/tg3.c tw32(GRC_MODE, tp->grc_mode); tp 9265 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0) { tp 9271 drivers/net/ethernet/broadcom/tg3.c if ((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0 && tp 9272 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) { tp 9273 drivers/net/ethernet/broadcom/tg3.c tp->pci_clock_ctrl |= CLOCK_CTRL_CLKRUN_OENABLE; tp 9274 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A0) tp 9275 drivers/net/ethernet/broadcom/tg3.c tp->pci_clock_ctrl |= CLOCK_CTRL_FORCE_CLKRUN; tp 9276 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); tp 9279 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) { tp 9280 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode = MAC_MODE_PORT_MODE_TBI; tp 9281 drivers/net/ethernet/broadcom/tg3.c val = tp->mac_mode; tp 9282 drivers/net/ethernet/broadcom/tg3.c } else if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) { tp 9283 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode = MAC_MODE_PORT_MODE_GMII; tp 9284 drivers/net/ethernet/broadcom/tg3.c val = tp->mac_mode; tp 9291 drivers/net/ethernet/broadcom/tg3.c tg3_ape_unlock(tp, TG3_APE_LOCK_GRC); tp 9293 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_start(tp); tp 9295 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS) && tp 9296 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0 && tp 9297 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5785 && tp 9298 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_PLUS)) { tp 9304 drivers/net/ethernet/broadcom/tg3.c tg3_restore_clk(tp); tp 9309 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) { tp 9316 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, ENABLE_ASF); tp 9317 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~(TG3_PHYFLG_1G_ON_VAUX_OK | tp 9320 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, ASF_NEW_HANDSHAKE); tp 9321 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val); tp 9325 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg); tp 9327 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_ASF); tp 9328 drivers/net/ethernet/broadcom/tg3.c tp->last_event_jiffies = jiffies; tp 9329 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) tp 9330 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ASF_NEW_HANDSHAKE); tp 9332 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &nic_cfg); tp 9334 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_1G_ON_VAUX_OK; tp 9336 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_KEEP_LINK_ON_PWRDN; tp 9348 drivers/net/ethernet/broadcom/tg3.c static int tg3_halt(struct tg3 *tp, int kind, bool silent) tp 9352 drivers/net/ethernet/broadcom/tg3.c tg3_stop_fw(tp); tp 9354 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_pre_reset(tp, kind); tp 9356 drivers/net/ethernet/broadcom/tg3.c tg3_abort_hw(tp, silent); tp 9357 drivers/net/ethernet/broadcom/tg3.c err = tg3_chip_reset(tp); tp 9359 drivers/net/ethernet/broadcom/tg3.c __tg3_set_mac_addr(tp, false); tp 9361 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_legacy(tp, kind); tp 9362 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_post_reset(tp, kind); tp 9364 drivers/net/ethernet/broadcom/tg3.c if (tp->hw_stats) { tp 9366 drivers/net/ethernet/broadcom/tg3.c tg3_get_nstats(tp, &tp->net_stats_prev); tp 9367 drivers/net/ethernet/broadcom/tg3.c tg3_get_estats(tp, &tp->estats_prev); tp 9370 drivers/net/ethernet/broadcom/tg3.c memset(tp->hw_stats, 0, sizeof(struct tg3_hw_stats)); tp 9378 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 9391 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF)) { tp 9404 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 9405 drivers/net/ethernet/broadcom/tg3.c __tg3_set_mac_addr(tp, skip_mac_1); tp 9407 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 9413 drivers/net/ethernet/broadcom/tg3.c static void tg3_set_bdinfo(struct tg3 *tp, u32 bdinfo_addr, tp 9417 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, tp 9420 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, tp 9423 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, tp 9427 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 9428 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, tp 9434 drivers/net/ethernet/broadcom/tg3.c static void tg3_coal_tx_init(struct tg3 *tp, struct ethtool_coalesce *ec) tp 9438 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_TSS)) { tp 9447 drivers/net/ethernet/broadcom/tg3.c for (; i < tp->txq_cnt; i++) { tp 9459 drivers/net/ethernet/broadcom/tg3.c for (; i < tp->irq_max - 1; i++) { tp 9466 drivers/net/ethernet/broadcom/tg3.c static void tg3_coal_rx_init(struct tg3 *tp, struct ethtool_coalesce *ec) tp 9469 drivers/net/ethernet/broadcom/tg3.c u32 limit = tp->rxq_cnt; tp 9471 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_RSS)) { tp 9493 drivers/net/ethernet/broadcom/tg3.c for (; i < tp->irq_max - 1; i++) { tp 9500 drivers/net/ethernet/broadcom/tg3.c static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) tp 9502 drivers/net/ethernet/broadcom/tg3.c tg3_coal_tx_init(tp, ec); tp 9503 drivers/net/ethernet/broadcom/tg3.c tg3_coal_rx_init(tp, ec); tp 9505 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 9511 drivers/net/ethernet/broadcom/tg3.c if (!tp->link_up) tp 9519 drivers/net/ethernet/broadcom/tg3.c static void tg3_tx_rcbs_disable(struct tg3 *tp) tp 9524 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 9526 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 5717_PLUS)) tp 9528 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 57765_CLASS) || tp 9529 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 9536 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, txrcb + TG3_BDINFO_MAXLEN_FLAGS, tp 9541 drivers/net/ethernet/broadcom/tg3.c static void tg3_tx_rcbs_init(struct tg3 *tp) tp 9546 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 9549 drivers/net/ethernet/broadcom/tg3.c for (; i < tp->irq_max; i++, txrcb += TG3_BDINFO_SIZE) { tp 9550 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 9555 drivers/net/ethernet/broadcom/tg3.c tg3_set_bdinfo(tp, txrcb, tnapi->tx_desc_mapping, tp 9562 drivers/net/ethernet/broadcom/tg3.c static void tg3_rx_ret_rcbs_disable(struct tg3 *tp) tp 9567 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5717_PLUS)) tp 9569 drivers/net/ethernet/broadcom/tg3.c else if (!tg3_flag(tp, 5705_PLUS)) tp 9571 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5755 || tp 9572 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762 || tp 9573 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS)) tp 9580 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, rxrcb + TG3_BDINFO_MAXLEN_FLAGS, tp 9585 drivers/net/ethernet/broadcom/tg3.c static void tg3_rx_ret_rcbs_init(struct tg3 *tp) tp 9590 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) tp 9593 drivers/net/ethernet/broadcom/tg3.c for (; i < tp->irq_max; i++, rxrcb += TG3_BDINFO_SIZE) { tp 9594 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 9599 drivers/net/ethernet/broadcom/tg3.c tg3_set_bdinfo(tp, rxrcb, tnapi->rx_rcb_mapping, tp 9600 drivers/net/ethernet/broadcom/tg3.c (tp->rx_ret_ring_mask + 1) << tp 9606 drivers/net/ethernet/broadcom/tg3.c static void tg3_rings_reset(struct tg3 *tp) tp 9610 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[0]; tp 9612 drivers/net/ethernet/broadcom/tg3.c tg3_tx_rcbs_disable(tp); tp 9614 drivers/net/ethernet/broadcom/tg3.c tg3_rx_ret_rcbs_disable(tp); tp 9617 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox_f(tp->napi[0].int_mbox, 1); tp 9618 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].chk_msi_cnt = 0; tp 9619 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].last_rx_cons = 0; tp 9620 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].last_tx_cons = 0; tp 9623 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SUPPORT_MSIX)) { tp 9624 drivers/net/ethernet/broadcom/tg3.c for (i = 1; i < tp->irq_max; i++) { tp 9625 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].tx_prod = 0; tp 9626 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].tx_cons = 0; tp 9627 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 9628 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox(tp->napi[i].prodmbox, 0); tp 9629 drivers/net/ethernet/broadcom/tg3.c tw32_rx_mbox(tp->napi[i].consmbox, 0); tp 9630 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox_f(tp->napi[i].int_mbox, 1); tp 9631 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].chk_msi_cnt = 0; tp 9632 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].last_rx_cons = 0; tp 9633 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].last_tx_cons = 0; tp 9635 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_TSS)) tp 9636 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox(tp->napi[0].prodmbox, 0); tp 9638 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].tx_prod = 0; tp 9639 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].tx_cons = 0; tp 9640 drivers/net/ethernet/broadcom/tg3.c tw32_mailbox(tp->napi[0].prodmbox, 0); tp 9641 drivers/net/ethernet/broadcom/tg3.c tw32_rx_mbox(tp->napi[0].consmbox, 0); tp 9645 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 9662 drivers/net/ethernet/broadcom/tg3.c for (i = 1, tnapi++; i < tp->irq_cnt; i++, tnapi++) { tp 9672 drivers/net/ethernet/broadcom/tg3.c tg3_tx_rcbs_init(tp); tp 9673 drivers/net/ethernet/broadcom/tg3.c tg3_rx_ret_rcbs_init(tp); tp 9676 drivers/net/ethernet/broadcom/tg3.c static void tg3_setup_rxbd_thresholds(struct tg3 *tp) tp 9680 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5750_PLUS) || tp 9681 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS) || tp 9682 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5750 || tp 9683 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5752 || tp 9684 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_PLUS)) tp 9686 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5755 || tp 9687 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5787) tp 9692 drivers/net/ethernet/broadcom/tg3.c nic_rep_thresh = min(bdcache_maxcnt / 2, tp->rx_std_max_post); tp 9693 drivers/net/ethernet/broadcom/tg3.c host_rep_thresh = max_t(u32, tp->rx_pending / 8, 1); tp 9698 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) tp 9701 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, JUMBO_CAPABLE) || tg3_flag(tp, 5780_CLASS)) tp 9706 drivers/net/ethernet/broadcom/tg3.c host_rep_thresh = max_t(u32, tp->rx_jumbo_pending / 8, 1); tp 9711 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) tp 9739 drivers/net/ethernet/broadcom/tg3.c static void tg3_set_multi(struct tg3 *tp, unsigned int accept_all) tp 9750 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 9753 drivers/net/ethernet/broadcom/tg3.c rx_mode = tp->rx_mode & ~(RX_MODE_PROMISC | tp 9760 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_ASF)) tp 9769 drivers/net/ethernet/broadcom/tg3.c tg3_set_multi(tp, 1); tp 9772 drivers/net/ethernet/broadcom/tg3.c tg3_set_multi(tp, 0); tp 9795 drivers/net/ethernet/broadcom/tg3.c if (netdev_uc_count(dev) > TG3_MAX_UCAST_ADDR(tp)) { tp 9803 drivers/net/ethernet/broadcom/tg3.c __tg3_set_one_mac_addr(tp, ha->addr, tp 9804 drivers/net/ethernet/broadcom/tg3.c i + TG3_UCAST_ADDR_IDX(tp)); tp 9809 drivers/net/ethernet/broadcom/tg3.c if (rx_mode != tp->rx_mode) { tp 9810 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode = rx_mode; tp 9816 drivers/net/ethernet/broadcom/tg3.c static void tg3_rss_init_dflt_indir_tbl(struct tg3 *tp, u32 qcnt) tp 9821 drivers/net/ethernet/broadcom/tg3.c tp->rss_ind_tbl[i] = ethtool_rxfh_indir_default(i, qcnt); tp 9824 drivers/net/ethernet/broadcom/tg3.c static void tg3_rss_check_indir_tbl(struct tg3 *tp) tp 9828 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, SUPPORT_MSIX)) tp 9831 drivers/net/ethernet/broadcom/tg3.c if (tp->rxq_cnt == 1) { tp 9832 drivers/net/ethernet/broadcom/tg3.c memset(&tp->rss_ind_tbl[0], 0, sizeof(tp->rss_ind_tbl)); tp 9838 drivers/net/ethernet/broadcom/tg3.c if (tp->rss_ind_tbl[i] >= tp->rxq_cnt) tp 9843 drivers/net/ethernet/broadcom/tg3.c tg3_rss_init_dflt_indir_tbl(tp, tp->rxq_cnt); tp 9846 drivers/net/ethernet/broadcom/tg3.c static void tg3_rss_write_indir_tbl(struct tg3 *tp) tp 9852 drivers/net/ethernet/broadcom/tg3.c u32 val = tp->rss_ind_tbl[i]; tp 9856 drivers/net/ethernet/broadcom/tg3.c val |= tp->rss_ind_tbl[i]; tp 9863 drivers/net/ethernet/broadcom/tg3.c static inline u32 tg3_lso_rd_dma_workaround_bit(struct tg3 *tp) tp 9865 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719) tp 9872 drivers/net/ethernet/broadcom/tg3.c static int tg3_reset_hw(struct tg3 *tp, bool reset_phy) tp 9876 drivers/net/ethernet/broadcom/tg3.c struct tg3_rx_prodring_set *tpr = &tp->napi[0].prodring; tp 9878 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 9880 drivers/net/ethernet/broadcom/tg3.c tg3_stop_fw(tp); tp 9882 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_pre_reset(tp, RESET_KIND_INIT); tp 9884 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, INIT_COMPLETE)) tp 9885 drivers/net/ethernet/broadcom/tg3.c tg3_abort_hw(tp, 1); tp 9887 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) && tp 9888 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_USER_CONFIGURED)) { tp 9889 drivers/net/ethernet/broadcom/tg3.c tg3_phy_pull_config(tp); tp 9890 drivers/net/ethernet/broadcom/tg3.c tg3_eee_pull_config(tp, NULL); tp 9891 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED; tp 9895 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_EEE_CAP) tp 9896 drivers/net/ethernet/broadcom/tg3.c tg3_setup_eee(tp); tp 9899 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 9901 drivers/net/ethernet/broadcom/tg3.c err = tg3_chip_reset(tp); tp 9905 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_legacy(tp, RESET_KIND_INIT); tp 9907 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5784_AX) { tp 9928 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57780) { tp 9943 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, L1PLLPD_EN)) { tp 9957 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_CLASS)) { tp 9958 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) { tp 9973 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) != CHIPREV_57765_AX) { tp 10007 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, CPMU_PRESENT)) { tp 10008 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PCI_EXPRESS)) tp 10009 drivers/net/ethernet/broadcom/tg3.c tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT; tp 10010 drivers/net/ethernet/broadcom/tg3.c tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); tp 10013 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0 && tp 10014 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, PCIX_MODE)) { tp 10020 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) { tp 10031 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5704_BX) { tp 10043 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_rings(tp); tp 10047 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 10050 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_57765_A0) tp 10052 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 57765_CLASS) && tp 10053 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5717 && tp 10054 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5762) tp 10056 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, val | tp->dma_rwctrl); tp 10057 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) != ASIC_REV_5784 && tp 10058 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5761) { tp 10062 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); tp 10065 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS | tp 10069 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode |= GRC_MODE_HOST_SENDBDS; tp 10077 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM; tp 10080 drivers/net/ethernet/broadcom/tg3.c if (tp->rxptpctl) tp 10082 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl | TG3_RX_PTP_CTL_HWTS_INTERLOCK); tp 10084 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PTP_CAPABLE)) tp 10087 drivers/net/ethernet/broadcom/tg3.c tw32(GRC_MODE, tp->grc_mode | val); tp 10093 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL && tp 10094 drivers/net/ethernet/broadcom/tg3.c tp->pdev->subsystem_device == TG3PCI_SUBDEVICE_ID_DELL_5762) { tp 10106 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) { tp 10108 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) != ASIC_REV_5705) { tp 10110 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704) tp 10116 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, TSO_CAPABLE)) { tp 10119 drivers/net/ethernet/broadcom/tg3.c fw_len = tp->fw_len; tp 10127 drivers/net/ethernet/broadcom/tg3.c if (tp->dev->mtu <= ETH_DATA_LEN) { tp 10129 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water); tp 10131 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water); tp 10133 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water); tp 10136 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water_jumbo); tp 10138 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo); tp 10140 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water_jumbo); tp 10143 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.dma_low_water); tp 10145 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.dma_high_water); tp 10148 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719) tp 10150 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 10151 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762 || tp 10152 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 || tp 10153 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5720_A0) tp 10162 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "%s cannot enable BUFMGR\n", __func__); tp 10166 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5906_A1) tp 10169 drivers/net/ethernet/broadcom/tg3.c tg3_setup_rxbd_thresholds(tp); tp 10192 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5717_PLUS)) tp 10197 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 10204 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 || tp 10205 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS))) { tp 10207 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE)) { tp 10212 drivers/net/ethernet/broadcom/tg3.c val = TG3_RX_JMB_RING_SIZE(tp) << tp 10216 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, USE_JUMBO_BDFLAG) || tp 10217 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS) || tp 10218 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 10226 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 10227 drivers/net/ethernet/broadcom/tg3.c val = TG3_RX_STD_RING_SIZE(tp); tp 10237 drivers/net/ethernet/broadcom/tg3.c tpr->rx_std_prod_idx = tp->rx_pending; tp 10241 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, JUMBO_RING_ENABLE) ? tp->rx_jumbo_pending : 0; tp 10244 drivers/net/ethernet/broadcom/tg3.c tg3_rings_reset(tp); tp 10247 drivers/net/ethernet/broadcom/tg3.c __tg3_set_mac_addr(tp, false); tp 10251 drivers/net/ethernet/broadcom/tg3.c tp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN); tp 10260 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 10261 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 10281 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717) tp 10284 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5784 || tp 10285 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785 || tp 10286 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780) tp 10291 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705 && tp 10292 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) { tp 10293 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TSO_CAPABLE) && tp 10294 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) { tp 10297 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, IS_5788)) { tp 10302 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) tp 10305 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766) { tp 10306 drivers/net/ethernet/broadcom/tg3.c tp->dma_limit = 0; tp 10307 drivers/net/ethernet/broadcom/tg3.c if (tp->dev->mtu <= ETH_DATA_LEN) { tp 10309 drivers/net/ethernet/broadcom/tg3.c tp->dma_limit = TG3_TX_BD_DMA_MAX_2K; tp 10313 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_1) || tp 10314 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 10315 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3)) tp 10318 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS) || tp 10319 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785 || tp 10320 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780) tp 10323 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 10324 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 10327 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761 || tp 10328 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5784 || tp 10329 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785 || tp 10330 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780 || tp 10331 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_PLUS)) { tp 10334 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) tp 10340 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 || tp 10341 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) { tp 10352 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719 || tp 10353 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720 || tp 10354 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) { tp 10357 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) tp 10369 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) { tp 10374 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, TSO_CAPABLE)) { tp 10395 drivers/net/ethernet/broadcom/tg3.c __tg3_set_coalesce(tp, &tp->coal); tp 10397 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 10403 drivers/net/ethernet/broadcom/tg3.c ((u64) tp->stats_mapping >> 32)); tp 10405 drivers/net/ethernet/broadcom/tg3.c ((u64) tp->stats_mapping & 0xffffffff)); tp 10414 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, i, 0); tp 10419 drivers/net/ethernet/broadcom/tg3.c tw32(HOSTCC_MODE, HOSTCC_MODE_ENABLE | tp->coalesce_mode); tp 10423 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 10426 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) { tp 10427 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT; tp 10433 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | tp 10436 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 10437 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN; tp 10438 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS) && tp 10439 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && tp 10440 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5700) tp 10441 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode |= MAC_MODE_LINK_POLARITY; tp 10442 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR); tp 10451 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_NIC)) { tp 10458 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5752) tp 10462 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5755) tp 10465 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl &= ~gpio_mask; tp 10466 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= tr32(GRC_LOCAL_CTRL) & gpio_mask; tp 10469 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, EEPROM_WRITE_PROT)) tp 10470 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | tp 10473 drivers/net/ethernet/broadcom/tg3.c tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); tp 10476 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSIX)) { tp 10479 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_cnt > 1) tp 10481 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 1SHOT_MSI)) tp 10486 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 10497 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705 && tp 10498 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) { tp 10499 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TSO_CAPABLE) && tp 10500 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A1 || tp 10501 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A2)) { tp 10504 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, IS_5788)) { tp 10510 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS)) tp 10513 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5785) tp 10519 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_MODE)) { tp 10522 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD, tp 10524 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703) { tp 10527 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5704) { tp 10531 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, tp->pcix_cap + PCI_X_CMD, tp 10538 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719 || tp 10539 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) { tp 10541 drivers/net/ethernet/broadcom/tg3.c if (tr32(TG3_RDMA_LENGTH + (i << 2)) > TG3_MAX_MTU(tp)) tp 10546 drivers/net/ethernet/broadcom/tg3.c val |= tg3_lso_rd_dma_workaround_bit(tp); tp 10548 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5719_5720_RDMA_BUG); tp 10553 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 10556 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 10565 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, LRG_PROD_RING_CAP)) tp 10569 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_1) || tp 10570 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 10571 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3)) tp 10574 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 10579 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0) { tp 10580 drivers/net/ethernet/broadcom/tg3.c err = tg3_load_5701_a0_firmware_fix(tp); tp 10585 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766) { tp 10589 drivers/net/ethernet/broadcom/tg3.c tg3_load_57766_firmware(tp); tp 10592 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TSO_CAPABLE)) { tp 10593 drivers/net/ethernet/broadcom/tg3.c err = tg3_load_tso_firmware(tp); tp 10598 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode = TX_MODE_ENABLE; tp 10600 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS) || tp 10601 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906) tp 10602 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode |= TX_MODE_MBUF_LOCKUP_FIX; tp 10604 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 10605 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) { tp 10607 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode &= ~val; tp 10608 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode |= tr32(MAC_TX_MODE) & val; tp 10611 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_TX_MODE, tp->tx_mode); tp 10614 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) { tp 10617 drivers/net/ethernet/broadcom/tg3.c tg3_rss_write_indir_tbl(tp); tp 10625 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode = RX_MODE_ENABLE; tp 10626 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS)) tp 10627 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode |= RX_MODE_IPV6_CSUM_ENABLE; tp 10629 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) tp 10630 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode |= RX_MODE_IPV4_FRAG_FIX; tp 10632 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) tp 10633 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode |= RX_MODE_RSS_ENABLE | tp 10640 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_RX_MODE, tp->rx_mode); tp 10643 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_LED_CTRL, tp->led_ctrl); tp 10646 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) { tp 10650 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_RX_MODE, tp->rx_mode); tp 10653 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) { tp 10654 drivers/net/ethernet/broadcom/tg3.c if ((tg3_asic_rev(tp) == ASIC_REV_5704) && tp 10655 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_SERDES_PREEMPHASIS)) { tp 10663 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A1) tp 10670 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_CLASS)) tp 10676 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704 && tp 10677 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) { tp 10679 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, HW_AUTONEG); tp 10682 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && tp 10683 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5714) { tp 10688 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl &= ~GRC_LCLCTRL_USE_EXT_SIG_DETECT; tp 10689 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= GRC_LCLCTRL_USE_SIG_DETECT; tp 10690 drivers/net/ethernet/broadcom/tg3.c tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl); tp 10693 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, USE_PHYLIB)) { tp 10694 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) tp 10695 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_IS_LOW_POWER; tp 10697 drivers/net/ethernet/broadcom/tg3.c err = tg3_setup_phy(tp, false); tp 10701 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && tp 10702 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_IS_FET)) { tp 10706 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_TEST1, &tmp)) { tp 10707 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_TEST1, tp 10709 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &tmp); tp 10714 drivers/net/ethernet/broadcom/tg3.c __tg3_set_rx_mode(tp->dev); tp 10722 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS) && !tg3_flag(tp, 5780_CLASS)) tp 10726 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF)) tp 10776 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 10778 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS, tp 10781 drivers/net/ethernet/broadcom/tg3.c tg3_write_sig_post_reset(tp, RESET_KIND_INIT); tp 10789 drivers/net/ethernet/broadcom/tg3.c static int tg3_init_hw(struct tg3 *tp, bool reset_phy) tp 10795 drivers/net/ethernet/broadcom/tg3.c tg3_enable_register_access(tp); tp 10796 drivers/net/ethernet/broadcom/tg3.c tg3_poll_fw(tp); tp 10798 drivers/net/ethernet/broadcom/tg3.c tg3_switch_clocks(tp); tp 10802 drivers/net/ethernet/broadcom/tg3.c return tg3_reset_hw(tp, reset_phy); tp 10806 drivers/net/ethernet/broadcom/tg3.c static void tg3_sd_scan_scratchpad(struct tg3 *tp, struct tg3_ocir *ocir) tp 10813 drivers/net/ethernet/broadcom/tg3.c tg3_ape_scratchpad_read(tp, (u32 *) ocir, off, len); tp 10827 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = dev_get_drvdata(dev); tp 10830 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 10831 drivers/net/ethernet/broadcom/tg3.c tg3_ape_scratchpad_read(tp, &temperature, attr->index, tp 10833 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 10853 drivers/net/ethernet/broadcom/tg3.c static void tg3_hwmon_close(struct tg3 *tp) tp 10855 drivers/net/ethernet/broadcom/tg3.c if (tp->hwmon_dev) { tp 10856 drivers/net/ethernet/broadcom/tg3.c hwmon_device_unregister(tp->hwmon_dev); tp 10857 drivers/net/ethernet/broadcom/tg3.c tp->hwmon_dev = NULL; tp 10861 drivers/net/ethernet/broadcom/tg3.c static void tg3_hwmon_open(struct tg3 *tp) tp 10865 drivers/net/ethernet/broadcom/tg3.c struct pci_dev *pdev = tp->pdev; tp 10868 drivers/net/ethernet/broadcom/tg3.c tg3_sd_scan_scratchpad(tp, ocirs); tp 10881 drivers/net/ethernet/broadcom/tg3.c tp->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, "tg3", tp 10882 drivers/net/ethernet/broadcom/tg3.c tp, tg3_groups); tp 10883 drivers/net/ethernet/broadcom/tg3.c if (IS_ERR(tp->hwmon_dev)) { tp 10884 drivers/net/ethernet/broadcom/tg3.c tp->hwmon_dev = NULL; tp 10889 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_hwmon_close(struct tg3 *tp) { } tp 10890 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_hwmon_open(struct tg3 *tp) { } tp 10901 drivers/net/ethernet/broadcom/tg3.c static void tg3_periodic_fetch_stats(struct tg3 *tp) tp 10903 drivers/net/ethernet/broadcom/tg3.c struct tg3_hw_stats *sp = tp->hw_stats; tp 10905 drivers/net/ethernet/broadcom/tg3.c if (!tp->link_up) tp 10921 drivers/net/ethernet/broadcom/tg3.c if (unlikely(tg3_flag(tp, 5719_5720_RDMA_BUG) && tp 10927 drivers/net/ethernet/broadcom/tg3.c val &= ~tg3_lso_rd_dma_workaround_bit(tp); tp 10929 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, 5719_5720_RDMA_BUG); tp 10948 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5717 && tp 10949 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5762 && tp 10950 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5719_A0 && tp 10951 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5720_A0) { tp 10967 drivers/net/ethernet/broadcom/tg3.c static void tg3_chk_missed_msi(struct tg3 *tp) tp 10971 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 10972 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 10992 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = from_timer(tp, t, timer); tp 10994 drivers/net/ethernet/broadcom/tg3.c spin_lock(&tp->lock); tp 10996 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_sync || tg3_flag(tp, RESET_TASK_PENDING)) { tp 10997 drivers/net/ethernet/broadcom/tg3.c spin_unlock(&tp->lock); tp 11001 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 11002 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS)) tp 11003 drivers/net/ethernet/broadcom/tg3.c tg3_chk_missed_msi(tp); tp 11005 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, FLUSH_POSTED_WRITES)) { tp 11010 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, TAGGED_STATUS)) { tp 11015 drivers/net/ethernet/broadcom/tg3.c if (tp->napi[0].hw_status->status & SD_STATUS_UPDATED) { tp 11017 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl | GRC_LCLCTRL_SETINT); tp 11019 drivers/net/ethernet/broadcom/tg3.c tw32(HOSTCC_MODE, tp->coalesce_mode | tp 11024 drivers/net/ethernet/broadcom/tg3.c spin_unlock(&tp->lock); tp 11025 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_schedule(tp); tp 11031 drivers/net/ethernet/broadcom/tg3.c if (!--tp->timer_counter) { tp 11032 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS)) tp 11033 drivers/net/ethernet/broadcom/tg3.c tg3_periodic_fetch_stats(tp); tp 11035 drivers/net/ethernet/broadcom/tg3.c if (tp->setlpicnt && !--tp->setlpicnt) tp 11036 drivers/net/ethernet/broadcom/tg3.c tg3_phy_eee_enable(tp); tp 11038 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_LINKCHG_REG)) { tp 11045 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT) { tp 11052 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, false); tp 11053 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, POLL_SERDES)) { tp 11057 drivers/net/ethernet/broadcom/tg3.c if (tp->link_up && tp 11061 drivers/net/ethernet/broadcom/tg3.c if (!tp->link_up && tp 11067 drivers/net/ethernet/broadcom/tg3.c if (!tp->serdes_counter) { tp 11069 drivers/net/ethernet/broadcom/tg3.c (tp->mac_mode & tp 11072 drivers/net/ethernet/broadcom/tg3.c tw32_f(MAC_MODE, tp->mac_mode); tp 11075 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, false); tp 11077 drivers/net/ethernet/broadcom/tg3.c } else if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && tp 11078 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 11079 drivers/net/ethernet/broadcom/tg3.c tg3_serdes_parallel_detect(tp); tp 11080 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, POLL_CPMU_LINK)) { tp 11085 drivers/net/ethernet/broadcom/tg3.c if (link_up != tp->link_up) tp 11086 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, false); tp 11089 drivers/net/ethernet/broadcom/tg3.c tp->timer_counter = tp->timer_multiplier; tp 11109 drivers/net/ethernet/broadcom/tg3.c if (!--tp->asf_counter) { tp 11110 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF) && !tg3_flag(tp, ENABLE_APE)) { tp 11111 drivers/net/ethernet/broadcom/tg3.c tg3_wait_for_event_ack(tp); tp 11113 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, tp 11115 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4); tp 11116 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, tp 11119 drivers/net/ethernet/broadcom/tg3.c tg3_generate_fw_event(tp); tp 11121 drivers/net/ethernet/broadcom/tg3.c tp->asf_counter = tp->asf_multiplier; tp 11125 drivers/net/ethernet/broadcom/tg3.c tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL); tp 11127 drivers/net/ethernet/broadcom/tg3.c spin_unlock(&tp->lock); tp 11130 drivers/net/ethernet/broadcom/tg3.c tp->timer.expires = jiffies + tp->timer_offset; tp 11131 drivers/net/ethernet/broadcom/tg3.c add_timer(&tp->timer); tp 11134 drivers/net/ethernet/broadcom/tg3.c static void tg3_timer_init(struct tg3 *tp) tp 11136 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TAGGED_STATUS) && tp 11137 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5717 && tp 11138 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_CLASS)) tp 11139 drivers/net/ethernet/broadcom/tg3.c tp->timer_offset = HZ; tp 11141 drivers/net/ethernet/broadcom/tg3.c tp->timer_offset = HZ / 10; tp 11143 drivers/net/ethernet/broadcom/tg3.c BUG_ON(tp->timer_offset > HZ); tp 11145 drivers/net/ethernet/broadcom/tg3.c tp->timer_multiplier = (HZ / tp->timer_offset); tp 11146 drivers/net/ethernet/broadcom/tg3.c tp->asf_multiplier = (HZ / tp->timer_offset) * tp 11149 drivers/net/ethernet/broadcom/tg3.c timer_setup(&tp->timer, tg3_timer, 0); tp 11152 drivers/net/ethernet/broadcom/tg3.c static void tg3_timer_start(struct tg3 *tp) tp 11154 drivers/net/ethernet/broadcom/tg3.c tp->asf_counter = tp->asf_multiplier; tp 11155 drivers/net/ethernet/broadcom/tg3.c tp->timer_counter = tp->timer_multiplier; tp 11157 drivers/net/ethernet/broadcom/tg3.c tp->timer.expires = jiffies + tp->timer_offset; tp 11158 drivers/net/ethernet/broadcom/tg3.c add_timer(&tp->timer); tp 11161 drivers/net/ethernet/broadcom/tg3.c static void tg3_timer_stop(struct tg3 *tp) tp 11163 drivers/net/ethernet/broadcom/tg3.c del_timer_sync(&tp->timer); tp 11169 drivers/net/ethernet/broadcom/tg3.c static int tg3_restart_hw(struct tg3 *tp, bool reset_phy) tp 11170 drivers/net/ethernet/broadcom/tg3.c __releases(tp->lock) tp 11171 drivers/net/ethernet/broadcom/tg3.c __acquires(tp->lock) tp 11175 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_hw(tp, reset_phy); tp 11177 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 11179 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 11180 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11181 drivers/net/ethernet/broadcom/tg3.c tg3_timer_stop(tp); tp 11182 drivers/net/ethernet/broadcom/tg3.c tp->irq_sync = 0; tp 11183 drivers/net/ethernet/broadcom/tg3.c tg3_napi_enable(tp); tp 11184 drivers/net/ethernet/broadcom/tg3.c dev_close(tp->dev); tp 11185 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11192 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = container_of(work, struct tg3, reset_task); tp 11196 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11198 drivers/net/ethernet/broadcom/tg3.c if (!netif_running(tp->dev)) { tp 11199 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, RESET_TASK_PENDING); tp 11200 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11205 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11207 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 11209 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 11211 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 1); tp 11213 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TX_RECOVERY_PENDING)) { tp 11214 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write32_tx_mbox; tp 11215 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write_flush_reg32; tp 11216 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, MBOX_WRITE_REORDER); tp 11217 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TX_RECOVERY_PENDING); tp 11220 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); tp 11221 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_hw(tp, true); tp 11225 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 11228 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11231 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 11233 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, RESET_TASK_PENDING); tp 11237 drivers/net/ethernet/broadcom/tg3.c static int tg3_request_irq(struct tg3 *tp, int irq_num) tp 11242 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[irq_num]; tp 11244 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_cnt == 1) tp 11245 drivers/net/ethernet/broadcom/tg3.c name = tp->dev->name; tp 11250 drivers/net/ethernet/broadcom/tg3.c "%s-txrx-%d", tp->dev->name, irq_num); tp 11253 drivers/net/ethernet/broadcom/tg3.c "%s-tx-%d", tp->dev->name, irq_num); tp 11256 drivers/net/ethernet/broadcom/tg3.c "%s-rx-%d", tp->dev->name, irq_num); tp 11259 drivers/net/ethernet/broadcom/tg3.c "%s-%d", tp->dev->name, irq_num); tp 11263 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSI) || tg3_flag(tp, USING_MSIX)) { tp 11265 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 1SHOT_MSI)) tp 11270 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TAGGED_STATUS)) tp 11278 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_interrupt(struct tg3 *tp) tp 11280 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[0]; tp 11281 drivers/net/ethernet/broadcom/tg3.c struct net_device *dev = tp->dev; tp 11288 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 11296 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 11307 drivers/net/ethernet/broadcom/tg3.c tg3_enable_ints(tp); tp 11309 drivers/net/ethernet/broadcom/tg3.c tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE | tp 11324 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS) && tp 11331 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 11335 drivers/net/ethernet/broadcom/tg3.c err = tg3_request_irq(tp, 0); tp 11342 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, 1SHOT_MSI)) { tp 11355 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_msi(struct tg3 *tp) tp 11360 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, USING_MSI)) tp 11366 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); tp 11367 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, tp 11370 drivers/net/ethernet/broadcom/tg3.c err = tg3_test_interrupt(tp); tp 11372 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); tp 11382 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, "No interrupt was generated using MSI. Switching " tp 11386 drivers/net/ethernet/broadcom/tg3.c free_irq(tp->napi[0].irq_vec, &tp->napi[0]); tp 11388 drivers/net/ethernet/broadcom/tg3.c pci_disable_msi(tp->pdev); tp 11390 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, USING_MSI); tp 11391 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].irq_vec = tp->pdev->irq; tp 11393 drivers/net/ethernet/broadcom/tg3.c err = tg3_request_irq(tp, 0); tp 11400 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 1); tp 11402 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 11403 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_hw(tp, true); tp 11405 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11408 drivers/net/ethernet/broadcom/tg3.c free_irq(tp->napi[0].irq_vec, &tp->napi[0]); tp 11413 drivers/net/ethernet/broadcom/tg3.c static int tg3_request_firmware(struct tg3 *tp) tp 11417 drivers/net/ethernet/broadcom/tg3.c if (request_firmware(&tp->fw, tp->fw_needed, &tp->pdev->dev)) { tp 11418 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "Failed to load firmware \"%s\"\n", tp 11419 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed); tp 11423 drivers/net/ethernet/broadcom/tg3.c fw_hdr = (struct tg3_firmware_hdr *)tp->fw->data; tp 11430 drivers/net/ethernet/broadcom/tg3.c tp->fw_len = be32_to_cpu(fw_hdr->len); /* includes bss */ tp 11431 drivers/net/ethernet/broadcom/tg3.c if (tp->fw_len < (tp->fw->size - TG3_FW_HDR_LEN)) { tp 11432 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, "bogus length %d in \"%s\"\n", tp 11433 drivers/net/ethernet/broadcom/tg3.c tp->fw_len, tp->fw_needed); tp 11434 drivers/net/ethernet/broadcom/tg3.c release_firmware(tp->fw); tp 11435 drivers/net/ethernet/broadcom/tg3.c tp->fw = NULL; tp 11440 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = NULL; tp 11444 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_irq_count(struct tg3 *tp) tp 11446 drivers/net/ethernet/broadcom/tg3.c u32 irq_cnt = max(tp->rxq_cnt, tp->txq_cnt); tp 11454 drivers/net/ethernet/broadcom/tg3.c irq_cnt = min_t(unsigned, irq_cnt + 1, tp->irq_max); tp 11460 drivers/net/ethernet/broadcom/tg3.c static bool tg3_enable_msix(struct tg3 *tp) tp 11465 drivers/net/ethernet/broadcom/tg3.c tp->txq_cnt = tp->txq_req; tp 11466 drivers/net/ethernet/broadcom/tg3.c tp->rxq_cnt = tp->rxq_req; tp 11467 drivers/net/ethernet/broadcom/tg3.c if (!tp->rxq_cnt) tp 11468 drivers/net/ethernet/broadcom/tg3.c tp->rxq_cnt = netif_get_num_default_rss_queues(); tp 11469 drivers/net/ethernet/broadcom/tg3.c if (tp->rxq_cnt > tp->rxq_max) tp 11470 drivers/net/ethernet/broadcom/tg3.c tp->rxq_cnt = tp->rxq_max; tp 11476 drivers/net/ethernet/broadcom/tg3.c if (!tp->txq_req) tp 11477 drivers/net/ethernet/broadcom/tg3.c tp->txq_cnt = 1; tp 11479 drivers/net/ethernet/broadcom/tg3.c tp->irq_cnt = tg3_irq_count(tp); tp 11481 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) { tp 11486 drivers/net/ethernet/broadcom/tg3.c rc = pci_enable_msix_range(tp->pdev, msix_ent, 1, tp->irq_cnt); tp 11489 drivers/net/ethernet/broadcom/tg3.c } else if (rc < tp->irq_cnt) { tp 11490 drivers/net/ethernet/broadcom/tg3.c netdev_notice(tp->dev, "Requested %d MSI-X vectors, received %d\n", tp 11491 drivers/net/ethernet/broadcom/tg3.c tp->irq_cnt, rc); tp 11492 drivers/net/ethernet/broadcom/tg3.c tp->irq_cnt = rc; tp 11493 drivers/net/ethernet/broadcom/tg3.c tp->rxq_cnt = max(rc - 1, 1); tp 11494 drivers/net/ethernet/broadcom/tg3.c if (tp->txq_cnt) tp 11495 drivers/net/ethernet/broadcom/tg3.c tp->txq_cnt = min(tp->rxq_cnt, tp->txq_max); tp 11498 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) tp 11499 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].irq_vec = msix_ent[i].vector; tp 11501 drivers/net/ethernet/broadcom/tg3.c if (netif_set_real_num_rx_queues(tp->dev, tp->rxq_cnt)) { tp 11502 drivers/net/ethernet/broadcom/tg3.c pci_disable_msix(tp->pdev); tp 11506 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_cnt == 1) tp 11509 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_RSS); tp 11511 drivers/net/ethernet/broadcom/tg3.c if (tp->txq_cnt > 1) tp 11512 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_TSS); tp 11514 drivers/net/ethernet/broadcom/tg3.c netif_set_real_num_tx_queues(tp->dev, tp->txq_cnt); tp 11519 drivers/net/ethernet/broadcom/tg3.c static void tg3_ints_init(struct tg3 *tp) tp 11521 drivers/net/ethernet/broadcom/tg3.c if ((tg3_flag(tp, SUPPORT_MSI) || tg3_flag(tp, SUPPORT_MSIX)) && tp 11522 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, TAGGED_STATUS)) { tp 11526 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 11531 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SUPPORT_MSIX) && tg3_enable_msix(tp)) tp 11532 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USING_MSIX); tp 11533 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, SUPPORT_MSI) && pci_enable_msi(tp->pdev) == 0) tp 11534 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USING_MSI); tp 11536 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSI) || tg3_flag(tp, USING_MSIX)) { tp 11538 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSIX) && tp->irq_cnt > 1) tp 11540 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 1SHOT_MSI)) tp 11545 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, USING_MSIX)) { tp 11546 drivers/net/ethernet/broadcom/tg3.c tp->irq_cnt = 1; tp 11547 drivers/net/ethernet/broadcom/tg3.c tp->napi[0].irq_vec = tp->pdev->irq; tp 11550 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_cnt == 1) { tp 11551 drivers/net/ethernet/broadcom/tg3.c tp->txq_cnt = 1; tp 11552 drivers/net/ethernet/broadcom/tg3.c tp->rxq_cnt = 1; tp 11553 drivers/net/ethernet/broadcom/tg3.c netif_set_real_num_tx_queues(tp->dev, 1); tp 11554 drivers/net/ethernet/broadcom/tg3.c netif_set_real_num_rx_queues(tp->dev, 1); tp 11558 drivers/net/ethernet/broadcom/tg3.c static void tg3_ints_fini(struct tg3 *tp) tp 11560 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USING_MSIX)) tp 11561 drivers/net/ethernet/broadcom/tg3.c pci_disable_msix(tp->pdev); tp 11562 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, USING_MSI)) tp 11563 drivers/net/ethernet/broadcom/tg3.c pci_disable_msi(tp->pdev); tp 11564 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, USING_MSI); tp 11565 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, USING_MSIX); tp 11566 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, ENABLE_RSS); tp 11567 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, ENABLE_TSS); tp 11570 drivers/net/ethernet/broadcom/tg3.c static int tg3_start(struct tg3 *tp, bool reset_phy, bool test_irq, tp 11573 drivers/net/ethernet/broadcom/tg3.c struct net_device *dev = tp->dev; tp 11580 drivers/net/ethernet/broadcom/tg3.c tg3_ints_init(tp); tp 11582 drivers/net/ethernet/broadcom/tg3.c tg3_rss_check_indir_tbl(tp); tp 11587 drivers/net/ethernet/broadcom/tg3.c err = tg3_alloc_consistent(tp); tp 11591 drivers/net/ethernet/broadcom/tg3.c tg3_napi_init(tp); tp 11593 drivers/net/ethernet/broadcom/tg3.c tg3_napi_enable(tp); tp 11595 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_cnt; i++) { tp 11596 drivers/net/ethernet/broadcom/tg3.c err = tg3_request_irq(tp, i); tp 11599 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 11607 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11610 drivers/net/ethernet/broadcom/tg3.c tg3_ape_driver_state_change(tp, RESET_KIND_INIT); tp 11612 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_hw(tp, reset_phy); tp 11614 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 11615 drivers/net/ethernet/broadcom/tg3.c tg3_free_rings(tp); tp 11618 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11623 drivers/net/ethernet/broadcom/tg3.c if (test_irq && tg3_flag(tp, USING_MSI)) { tp 11624 drivers/net/ethernet/broadcom/tg3.c err = tg3_test_msi(tp); tp 11627 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11628 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 11629 drivers/net/ethernet/broadcom/tg3.c tg3_free_rings(tp); tp 11630 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11635 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 57765_PLUS) && tg3_flag(tp, USING_MSI)) { tp 11643 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 11645 drivers/net/ethernet/broadcom/tg3.c tg3_hwmon_open(tp); tp 11647 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11649 drivers/net/ethernet/broadcom/tg3.c tg3_timer_start(tp); tp 11650 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, INIT_COMPLETE); tp 11651 drivers/net/ethernet/broadcom/tg3.c tg3_enable_ints(tp); tp 11653 drivers/net/ethernet/broadcom/tg3.c tg3_ptp_resume(tp); tp 11655 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11669 drivers/net/ethernet/broadcom/tg3.c for (i = tp->irq_cnt - 1; i >= 0; i--) { tp 11670 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 11675 drivers/net/ethernet/broadcom/tg3.c tg3_napi_disable(tp); tp 11676 drivers/net/ethernet/broadcom/tg3.c tg3_napi_fini(tp); tp 11677 drivers/net/ethernet/broadcom/tg3.c tg3_free_consistent(tp); tp 11680 drivers/net/ethernet/broadcom/tg3.c tg3_ints_fini(tp); tp 11685 drivers/net/ethernet/broadcom/tg3.c static void tg3_stop(struct tg3 *tp) tp 11689 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_cancel(tp); tp 11690 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 11692 drivers/net/ethernet/broadcom/tg3.c tg3_timer_stop(tp); tp 11694 drivers/net/ethernet/broadcom/tg3.c tg3_hwmon_close(tp); tp 11696 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 11698 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 1); tp 11700 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 11702 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 11703 drivers/net/ethernet/broadcom/tg3.c tg3_free_rings(tp); tp 11704 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, INIT_COMPLETE); tp 11706 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11708 drivers/net/ethernet/broadcom/tg3.c for (i = tp->irq_cnt - 1; i >= 0; i--) { tp 11709 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 11713 drivers/net/ethernet/broadcom/tg3.c tg3_ints_fini(tp); tp 11715 drivers/net/ethernet/broadcom/tg3.c tg3_napi_fini(tp); tp 11717 drivers/net/ethernet/broadcom/tg3.c tg3_free_consistent(tp); tp 11722 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 11725 drivers/net/ethernet/broadcom/tg3.c if (tp->pcierr_recovery) { tp 11731 drivers/net/ethernet/broadcom/tg3.c if (tp->fw_needed) { tp 11732 drivers/net/ethernet/broadcom/tg3.c err = tg3_request_firmware(tp); tp 11733 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766) { tp 11735 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, "EEE capability disabled\n"); tp 11736 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_EEE_CAP; tp 11737 drivers/net/ethernet/broadcom/tg3.c } else if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) { tp 11738 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, "EEE capability restored\n"); tp 11739 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_EEE_CAP; tp 11741 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0) { tp 11745 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, "TSO capability disabled\n"); tp 11746 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_CAPABLE); tp 11747 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, TSO_CAPABLE)) { tp 11748 drivers/net/ethernet/broadcom/tg3.c netdev_notice(tp->dev, "TSO capability restored\n"); tp 11749 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TSO_CAPABLE); tp 11753 drivers/net/ethernet/broadcom/tg3.c tg3_carrier_off(tp); tp 11755 drivers/net/ethernet/broadcom/tg3.c err = tg3_power_up(tp); tp 11759 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11761 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 11762 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, INIT_COMPLETE); tp 11764 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11766 drivers/net/ethernet/broadcom/tg3.c err = tg3_start(tp, tp 11767 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN), tp 11770 drivers/net/ethernet/broadcom/tg3.c tg3_frob_aux_power(tp, false); tp 11771 drivers/net/ethernet/broadcom/tg3.c pci_set_power_state(tp->pdev, PCI_D3hot); tp 11779 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 11781 drivers/net/ethernet/broadcom/tg3.c if (tp->pcierr_recovery) { tp 11787 drivers/net/ethernet/broadcom/tg3.c tg3_stop(tp); tp 11789 drivers/net/ethernet/broadcom/tg3.c if (pci_device_is_present(tp->pdev)) { tp 11790 drivers/net/ethernet/broadcom/tg3.c tg3_power_down_prepare(tp); tp 11792 drivers/net/ethernet/broadcom/tg3.c tg3_carrier_off(tp); tp 11802 drivers/net/ethernet/broadcom/tg3.c static u64 tg3_calc_crc_errors(struct tg3 *tp) tp 11804 drivers/net/ethernet/broadcom/tg3.c struct tg3_hw_stats *hw_stats = tp->hw_stats; tp 11806 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && tp 11807 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 11808 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701)) { tp 11811 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_TG3_TEST1, &val)) { tp 11812 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_TG3_TEST1, tp 11814 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_TG3_RXR_COUNTERS, &val); tp 11818 drivers/net/ethernet/broadcom/tg3.c tp->phy_crc_errors += val; tp 11820 drivers/net/ethernet/broadcom/tg3.c return tp->phy_crc_errors; tp 11830 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_estats(struct tg3 *tp, struct tg3_ethtool_stats *estats) tp 11832 drivers/net/ethernet/broadcom/tg3.c struct tg3_ethtool_stats *old_estats = &tp->estats_prev; tp 11833 drivers/net/ethernet/broadcom/tg3.c struct tg3_hw_stats *hw_stats = tp->hw_stats; tp 11914 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_nstats(struct tg3 *tp, struct rtnl_link_stats64 *stats) tp 11916 drivers/net/ethernet/broadcom/tg3.c struct rtnl_link_stats64 *old_stats = &tp->net_stats_prev; tp 11917 drivers/net/ethernet/broadcom/tg3.c struct tg3_hw_stats *hw_stats = tp->hw_stats; tp 11959 drivers/net/ethernet/broadcom/tg3.c tg3_calc_crc_errors(tp); tp 11964 drivers/net/ethernet/broadcom/tg3.c stats->rx_dropped = tp->rx_dropped; tp 11965 drivers/net/ethernet/broadcom/tg3.c stats->tx_dropped = tp->tx_dropped; tp 11976 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 11982 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) tp 11985 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 11987 drivers/net/ethernet/broadcom/tg3.c tg3_dump_legacy_regs(tp, (u32 *)_p); tp 11989 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 11994 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 11996 drivers/net/ethernet/broadcom/tg3.c return tp->nvram_size; tp 12001 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12007 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM)) tp 12017 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CPMU_PRESENT)) { tp 12027 drivers/net/ethernet/broadcom/tg3.c tg3_override_clk(tp); tp 12037 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, offset-b_offset, &val); tp 12049 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, offset + i, &val); tp 12073 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, b_offset, &val); tp 12083 drivers/net/ethernet/broadcom/tg3.c tg3_restore_clk(tp); tp 12092 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12098 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM) || tp 12107 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, offset-b_offset, &start); tp 12121 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_read_be32(tp, offset+len-4, &end); tp 12138 drivers/net/ethernet/broadcom/tg3.c ret = tg3_nvram_write_block(tp, offset, len, buf); tp 12149 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12152 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 12154 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 12156 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 12164 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) tp 12168 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) { tp 12182 drivers/net/ethernet/broadcom/tg3.c advertising = tp->link_config.advertising; tp 12183 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PAUSE_AUTONEG)) { tp 12184 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.flowctrl & FLOW_CTRL_RX) { tp 12185 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.flowctrl & FLOW_CTRL_TX) { tp 12191 drivers/net/ethernet/broadcom/tg3.c } else if (tp->link_config.flowctrl & FLOW_CTRL_TX) { tp 12198 drivers/net/ethernet/broadcom/tg3.c if (netif_running(dev) && tp->link_up) { tp 12199 drivers/net/ethernet/broadcom/tg3.c cmd->base.speed = tp->link_config.active_speed; tp 12200 drivers/net/ethernet/broadcom/tg3.c cmd->base.duplex = tp->link_config.active_duplex; tp 12203 drivers/net/ethernet/broadcom/tg3.c tp->link_config.rmt_adv); tp 12205 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) { tp 12206 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MDIX_STATE) tp 12216 drivers/net/ethernet/broadcom/tg3.c cmd->base.phy_address = tp->phy_addr; tp 12217 drivers/net/ethernet/broadcom/tg3.c cmd->base.autoneg = tp->link_config.autoneg; tp 12224 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12228 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 12230 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 12232 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 12253 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) tp 12257 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) tp 12278 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) { tp 12291 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 12293 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = cmd->base.autoneg; tp 12295 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising = (advertising | tp 12297 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = SPEED_UNKNOWN; tp 12298 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = DUPLEX_UNKNOWN; tp 12300 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising = 0; tp 12301 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = speed; tp 12302 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = cmd->base.duplex; tp 12305 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED; tp 12307 drivers/net/ethernet/broadcom/tg3.c tg3_warn_mgmt_link_flap(tp); tp 12310 drivers/net/ethernet/broadcom/tg3.c tg3_setup_phy(tp, true); tp 12312 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 12319 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12323 drivers/net/ethernet/broadcom/tg3.c strlcpy(info->fw_version, tp->fw_ver, sizeof(info->fw_version)); tp 12324 drivers/net/ethernet/broadcom/tg3.c strlcpy(info->bus_info, pci_name(tp->pdev), sizeof(info->bus_info)); tp 12329 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12331 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_CAP) && device_can_wakeup(&tp->pdev->dev)) tp 12336 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_ENABLE) && device_can_wakeup(&tp->pdev->dev)) tp 12343 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12344 drivers/net/ethernet/broadcom/tg3.c struct device *dp = &tp->pdev->dev; tp 12349 drivers/net/ethernet/broadcom/tg3.c !(tg3_flag(tp, WOL_CAP) && device_can_wakeup(dp))) tp 12355 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, WOL_ENABLE); tp 12357 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, WOL_ENABLE); tp 12364 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12365 drivers/net/ethernet/broadcom/tg3.c return tp->msg_enable; tp 12370 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12371 drivers/net/ethernet/broadcom/tg3.c tp->msg_enable = value; tp 12376 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12382 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) tp 12385 drivers/net/ethernet/broadcom/tg3.c tg3_warn_mgmt_link_flap(tp); tp 12387 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 12388 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 12390 drivers/net/ethernet/broadcom/tg3.c r = phy_start_aneg(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr)); tp 12394 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 12396 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMCR, &bmcr); tp 12397 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMCR, &bmcr) && tp 12399 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_PARALLEL_DETECT))) { tp 12400 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, bmcr | BMCR_ANRESTART | tp 12404 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 12412 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12414 drivers/net/ethernet/broadcom/tg3.c ering->rx_max_pending = tp->rx_std_ring_mask; tp 12415 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE)) tp 12416 drivers/net/ethernet/broadcom/tg3.c ering->rx_jumbo_max_pending = tp->rx_jmb_ring_mask; tp 12422 drivers/net/ethernet/broadcom/tg3.c ering->rx_pending = tp->rx_pending; tp 12423 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE)) tp 12424 drivers/net/ethernet/broadcom/tg3.c ering->rx_jumbo_pending = tp->rx_jumbo_pending; tp 12428 drivers/net/ethernet/broadcom/tg3.c ering->tx_pending = tp->napi[0].tx_pending; tp 12433 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12437 drivers/net/ethernet/broadcom/tg3.c if ((ering->rx_pending > tp->rx_std_ring_mask) || tp 12438 drivers/net/ethernet/broadcom/tg3.c (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) || tp 12441 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, TSO_BUG) && tp 12446 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 12447 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 12451 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, irq_sync); tp 12453 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending = ering->rx_pending; tp 12455 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, MAX_RXPEND_64) && tp 12456 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending > 63) tp 12457 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending = 63; tp 12459 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE)) tp 12460 drivers/net/ethernet/broadcom/tg3.c tp->rx_jumbo_pending = ering->rx_jumbo_pending; tp 12462 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) tp 12463 drivers/net/ethernet/broadcom/tg3.c tp->napi[i].tx_pending = ering->tx_pending; tp 12466 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 12468 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 12469 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 12470 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 12473 drivers/net/ethernet/broadcom/tg3.c err = tg3_restart_hw(tp, reset_phy); tp 12475 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 12478 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 12481 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 12488 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12490 drivers/net/ethernet/broadcom/tg3.c epause->autoneg = !!tg3_flag(tp, PAUSE_AUTONEG); tp 12492 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.flowctrl & FLOW_CTRL_RX) tp 12497 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.flowctrl & FLOW_CTRL_TX) tp 12505 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12509 drivers/net/ethernet/broadcom/tg3.c if (tp->link_config.autoneg == AUTONEG_ENABLE) tp 12510 drivers/net/ethernet/broadcom/tg3.c tg3_warn_mgmt_link_flap(tp); tp 12512 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 12515 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 12520 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl = 0; tp 12523 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl |= FLOW_CTRL_RX; tp 12526 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl |= FLOW_CTRL_TX; tp 12529 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl |= FLOW_CTRL_TX; tp 12533 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PAUSE_AUTONEG); tp 12535 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, PAUSE_AUTONEG); tp 12537 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_CONNECTED) { tp 12550 drivers/net/ethernet/broadcom/tg3.c tg3_setup_flow_control(tp, 0, 0); tp 12556 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 12560 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, irq_sync); tp 12563 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PAUSE_AUTONEG); tp 12565 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, PAUSE_AUTONEG); tp 12567 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl |= FLOW_CTRL_RX; tp 12569 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl &= ~FLOW_CTRL_RX; tp 12571 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl |= FLOW_CTRL_TX; tp 12573 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl &= ~FLOW_CTRL_TX; tp 12576 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 12578 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 12579 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 12580 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 12583 drivers/net/ethernet/broadcom/tg3.c err = tg3_restart_hw(tp, reset_phy); tp 12585 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 12588 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 12591 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED; tp 12611 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12613 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, SUPPORT_MSIX)) tp 12618 drivers/net/ethernet/broadcom/tg3.c if (netif_running(tp->dev)) tp 12619 drivers/net/ethernet/broadcom/tg3.c info->data = tp->rxq_cnt; tp 12636 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12638 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, SUPPORT_MSIX)) tp 12646 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12655 drivers/net/ethernet/broadcom/tg3.c indir[i] = tp->rss_ind_tbl[i]; tp 12663 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12677 drivers/net/ethernet/broadcom/tg3.c tp->rss_ind_tbl[i] = indir[i]; tp 12679 drivers/net/ethernet/broadcom/tg3.c if (!netif_running(dev) || !tg3_flag(tp, ENABLE_RSS)) tp 12685 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 12686 drivers/net/ethernet/broadcom/tg3.c tg3_rss_write_indir_tbl(tp); tp 12687 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 12695 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12698 drivers/net/ethernet/broadcom/tg3.c channel->max_rx = tp->rxq_max; tp 12699 drivers/net/ethernet/broadcom/tg3.c channel->max_tx = tp->txq_max; tp 12702 drivers/net/ethernet/broadcom/tg3.c channel->rx_count = tp->rxq_cnt; tp 12703 drivers/net/ethernet/broadcom/tg3.c channel->tx_count = tp->txq_cnt; tp 12705 drivers/net/ethernet/broadcom/tg3.c if (tp->rxq_req) tp 12706 drivers/net/ethernet/broadcom/tg3.c channel->rx_count = tp->rxq_req; tp 12708 drivers/net/ethernet/broadcom/tg3.c channel->rx_count = min(deflt_qs, tp->rxq_max); tp 12710 drivers/net/ethernet/broadcom/tg3.c if (tp->txq_req) tp 12711 drivers/net/ethernet/broadcom/tg3.c channel->tx_count = tp->txq_req; tp 12713 drivers/net/ethernet/broadcom/tg3.c channel->tx_count = min(deflt_qs, tp->txq_max); tp 12720 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12722 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, SUPPORT_MSIX)) tp 12725 drivers/net/ethernet/broadcom/tg3.c if (channel->rx_count > tp->rxq_max || tp 12726 drivers/net/ethernet/broadcom/tg3.c channel->tx_count > tp->txq_max) tp 12729 drivers/net/ethernet/broadcom/tg3.c tp->rxq_req = channel->rx_count; tp 12730 drivers/net/ethernet/broadcom/tg3.c tp->txq_req = channel->tx_count; tp 12735 drivers/net/ethernet/broadcom/tg3.c tg3_stop(tp); tp 12737 drivers/net/ethernet/broadcom/tg3.c tg3_carrier_off(tp); tp 12739 drivers/net/ethernet/broadcom/tg3.c tg3_start(tp, true, false, false); tp 12762 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12784 drivers/net/ethernet/broadcom/tg3.c tw32(MAC_LED_CTRL, tp->led_ctrl); tp 12794 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 12796 drivers/net/ethernet/broadcom/tg3.c if (tp->hw_stats) tp 12797 drivers/net/ethernet/broadcom/tg3.c tg3_get_estats(tp, (struct tg3_ethtool_stats *)tmp_stats); tp 12802 drivers/net/ethernet/broadcom/tg3.c static __be32 *tg3_vpd_readblock(struct tg3 *tp, u32 *vpdlen) tp 12809 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM) || tg3_nvram_read(tp, 0, &magic)) tp 12816 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset, &val)) tp 12826 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset + 4, &offset)) tp 12829 drivers/net/ethernet/broadcom/tg3.c offset = tg3_nvram_logical_addr(tp, offset); tp 12848 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read_be32(tp, offset + i, &buf[i/4])) tp 12858 drivers/net/ethernet/broadcom/tg3.c cnt = pci_read_vpd(tp->pdev, pos, tp 12888 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_nvram(struct tg3 *tp) tp 12894 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM)) tp 12897 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0, &magic) != 0) tp 12940 drivers/net/ethernet/broadcom/tg3.c err = tg3_nvram_read_be32(tp, i, &buf[j]); tp 13031 drivers/net/ethernet/broadcom/tg3.c buf = tg3_vpd_readblock(tp, &len); tp 13070 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_link(struct tg3 *tp) tp 13074 drivers/net/ethernet/broadcom/tg3.c if (!netif_running(tp->dev)) tp 13077 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) tp 13083 drivers/net/ethernet/broadcom/tg3.c if (tp->link_up) tp 13094 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_registers(struct tg3 *tp) tp 13244 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS)) { tp 13246 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) tp 13257 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_5788) && tp 13307 drivers/net/ethernet/broadcom/tg3.c if (netif_msg_hw(tp)) tp 13308 drivers/net/ethernet/broadcom/tg3.c netdev_err(tp->dev, tp 13314 drivers/net/ethernet/broadcom/tg3.c static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len) tp 13324 drivers/net/ethernet/broadcom/tg3.c tg3_write_mem(tp, offset + j, test_pattern[i]); tp 13325 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, offset + j, &val); tp 13333 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_memory(struct tg3 *tp) tp 13380 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5717_PLUS)) tp 13382 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 57765_CLASS) || tp 13383 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 13385 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 5755_PLUS)) tp 13387 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5906) tp 13389 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 5705_PLUS)) tp 13395 drivers/net/ethernet/broadcom/tg3.c err = tg3_do_mem_test(tp, mem_tbl[i].offset, mem_tbl[i].len); tp 13426 drivers/net/ethernet/broadcom/tg3.c static int tg3_run_loopback(struct tg3 *tp, u32 pktsz, bool tso_loopback) tp 13437 drivers/net/ethernet/broadcom/tg3.c struct tg3_rx_prodring_set *tpr = &tp->napi[0].prodring; tp 13439 drivers/net/ethernet/broadcom/tg3.c tnapi = &tp->napi[0]; tp 13440 drivers/net/ethernet/broadcom/tg3.c rnapi = &tp->napi[0]; tp 13441 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_cnt > 1) { tp 13442 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) tp 13443 drivers/net/ethernet/broadcom/tg3.c rnapi = &tp->napi[1]; tp 13444 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_TSS)) tp 13445 drivers/net/ethernet/broadcom/tg3.c tnapi = &tp->napi[1]; tp 13452 drivers/net/ethernet/broadcom/tg3.c skb = netdev_alloc_skb(tp->dev, tx_len); tp 13457 drivers/net/ethernet/broadcom/tg3.c memcpy(tx_data, tp->dev->dev_addr, ETH_ALEN); tp 13481 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_1) || tp 13482 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 13483 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3)) { tp 13491 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_3)) { tp 13496 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, HW_TSO_2)) tp 13498 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, HW_TSO_1) || tp 13499 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5705) { tp 13510 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_JUMBO_BDFLAG) && tp 13518 drivers/net/ethernet/broadcom/tg3.c map = pci_map_single(tp->pdev, skb->data, tx_len, PCI_DMA_TODEVICE); tp 13519 drivers/net/ethernet/broadcom/tg3.c if (pci_dma_mapping_error(tp->pdev, map)) { tp 13528 drivers/net/ethernet/broadcom/tg3.c tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE | tp 13555 drivers/net/ethernet/broadcom/tg3.c tw32_f(HOSTCC_MODE, tp->coalesce_mode | HOSTCC_MODE_ENABLE | tp 13617 drivers/net/ethernet/broadcom/tg3.c pci_dma_sync_single_for_cpu(tp->pdev, map, rx_len, tp 13620 drivers/net/ethernet/broadcom/tg3.c rx_data += TG3_RX_OFFSET(tp); tp 13642 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_loopback(struct tg3 *tp, u64 *data, bool do_extlpbk) tp 13648 drivers/net/ethernet/broadcom/tg3.c if (tp->dma_limit) tp 13649 drivers/net/ethernet/broadcom/tg3.c jmb_pkt_sz = tp->dma_limit - ETH_HLEN; tp 13651 drivers/net/ethernet/broadcom/tg3.c eee_cap = tp->phy_flags & TG3_PHYFLG_EEE_CAP; tp 13652 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_EEE_CAP; tp 13654 drivers/net/ethernet/broadcom/tg3.c if (!netif_running(tp->dev)) { tp 13662 drivers/net/ethernet/broadcom/tg3.c err = tg3_reset_hw(tp, true); tp 13671 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_RSS)) { tp 13685 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5780 && tp 13686 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, CPMU_PRESENT)) { tp 13687 drivers/net/ethernet/broadcom/tg3.c tg3_mac_loopback(tp, true); tp 13689 drivers/net/ethernet/broadcom/tg3.c if (tg3_run_loopback(tp, ETH_FRAME_LEN, false)) tp 13692 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE) && tp 13693 drivers/net/ethernet/broadcom/tg3.c tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false)) tp 13696 drivers/net/ethernet/broadcom/tg3.c tg3_mac_loopback(tp, false); tp 13699 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_PHY_SERDES) && tp 13700 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, USE_PHYLIB)) { tp 13703 drivers/net/ethernet/broadcom/tg3.c tg3_phy_lpbk_set(tp, 0, false); tp 13712 drivers/net/ethernet/broadcom/tg3.c if (tg3_run_loopback(tp, ETH_FRAME_LEN, false)) tp 13714 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TSO_CAPABLE) && tp 13715 drivers/net/ethernet/broadcom/tg3.c tg3_run_loopback(tp, ETH_FRAME_LEN, true)) tp 13717 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE) && tp 13718 drivers/net/ethernet/broadcom/tg3.c tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false)) tp 13722 drivers/net/ethernet/broadcom/tg3.c tg3_phy_lpbk_set(tp, 0, true); tp 13730 drivers/net/ethernet/broadcom/tg3.c if (tg3_run_loopback(tp, ETH_FRAME_LEN, false)) tp 13733 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TSO_CAPABLE) && tp 13734 drivers/net/ethernet/broadcom/tg3.c tg3_run_loopback(tp, ETH_FRAME_LEN, true)) tp 13737 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, JUMBO_RING_ENABLE) && tp 13738 drivers/net/ethernet/broadcom/tg3.c tg3_run_loopback(tp, jmb_pkt_sz + ETH_HLEN, false)) tp 13744 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ENABLE_APD) tp 13745 drivers/net/ethernet/broadcom/tg3.c tg3_phy_toggle_apd(tp, true); tp 13752 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= eee_cap; tp 13760 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 13763 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) { tp 13764 drivers/net/ethernet/broadcom/tg3.c if (tg3_power_up(tp)) { tp 13769 drivers/net/ethernet/broadcom/tg3.c tg3_ape_driver_state_change(tp, RESET_KIND_INIT); tp 13774 drivers/net/ethernet/broadcom/tg3.c if (tg3_test_nvram(tp) != 0) { tp 13778 drivers/net/ethernet/broadcom/tg3.c if (!doextlpbk && tg3_test_link(tp)) { tp 13786 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 13787 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 13791 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, irq_sync); tp 13792 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SUSPEND, 1); tp 13793 drivers/net/ethernet/broadcom/tg3.c err = tg3_nvram_lock(tp); tp 13794 drivers/net/ethernet/broadcom/tg3.c tg3_halt_cpu(tp, RX_CPU_BASE); tp 13795 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 13796 drivers/net/ethernet/broadcom/tg3.c tg3_halt_cpu(tp, TX_CPU_BASE); tp 13798 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 13800 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_MII_SERDES) tp 13801 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 13803 drivers/net/ethernet/broadcom/tg3.c if (tg3_test_registers(tp) != 0) { tp 13808 drivers/net/ethernet/broadcom/tg3.c if (tg3_test_memory(tp) != 0) { tp 13816 drivers/net/ethernet/broadcom/tg3.c if (tg3_test_loopback(tp, data, doextlpbk)) tp 13819 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 13821 drivers/net/ethernet/broadcom/tg3.c if (tg3_test_interrupt(tp) != 0) { tp 13826 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 13828 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 13830 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, INIT_COMPLETE); tp 13831 drivers/net/ethernet/broadcom/tg3.c err2 = tg3_restart_hw(tp, true); tp 13833 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 13836 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 13839 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 13841 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_IS_LOW_POWER) tp 13842 drivers/net/ethernet/broadcom/tg3.c tg3_power_down_prepare(tp); tp 13848 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 13851 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PTP_CAPABLE)) tp 13866 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = 0; tp 13869 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN | tp 13873 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN | tp 13877 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V1_EN | tp 13881 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN | tp 13885 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | tp 13889 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | tp 13893 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN | tp 13897 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | tp 13901 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | tp 13905 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_EN | tp 13909 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L2_EN | tp 13913 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl = TG3_RX_PTP_CTL_RX_PTP_V2_L4_EN | tp 13920 drivers/net/ethernet/broadcom/tg3.c if (netif_running(dev) && tp->rxptpctl) tp 13922 drivers/net/ethernet/broadcom/tg3.c tp->rxptpctl | TG3_RX_PTP_CTL_HWTS_INTERLOCK); tp 13925 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TX_TSTAMP_EN); tp 13927 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TX_TSTAMP_EN); tp 13935 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 13938 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, PTP_CAPABLE)) tp 13942 drivers/net/ethernet/broadcom/tg3.c stmpconf.tx_type = (tg3_flag(tp, TX_TSTAMP_EN) ? tp 13945 drivers/net/ethernet/broadcom/tg3.c switch (tp->rxptpctl) { tp 13997 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14000 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 14002 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) tp 14004 drivers/net/ethernet/broadcom/tg3.c phydev = mdiobus_get_phy(tp->mdio_bus, tp->phy_addr); tp 14010 drivers/net/ethernet/broadcom/tg3.c data->phy_id = tp->phy_addr; tp 14016 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) tp 14022 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 14023 drivers/net/ethernet/broadcom/tg3.c err = __tg3_readphy(tp, data->phy_id & 0x1f, tp 14025 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 14033 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) tp 14039 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 14040 drivers/net/ethernet/broadcom/tg3.c err = __tg3_writephy(tp, data->phy_id & 0x1f, tp 14042 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 14061 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14063 drivers/net/ethernet/broadcom/tg3.c memcpy(ec, &tp->coal, sizeof(*ec)); tp 14069 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14073 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) { tp 14095 drivers/net/ethernet/broadcom/tg3.c tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs; tp 14096 drivers/net/ethernet/broadcom/tg3.c tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs; tp 14097 drivers/net/ethernet/broadcom/tg3.c tp->coal.rx_max_coalesced_frames = ec->rx_max_coalesced_frames; tp 14098 drivers/net/ethernet/broadcom/tg3.c tp->coal.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; tp 14099 drivers/net/ethernet/broadcom/tg3.c tp->coal.rx_coalesce_usecs_irq = ec->rx_coalesce_usecs_irq; tp 14100 drivers/net/ethernet/broadcom/tg3.c tp->coal.tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq; tp 14101 drivers/net/ethernet/broadcom/tg3.c tp->coal.rx_max_coalesced_frames_irq = ec->rx_max_coalesced_frames_irq; tp 14102 drivers/net/ethernet/broadcom/tg3.c tp->coal.tx_max_coalesced_frames_irq = ec->tx_max_coalesced_frames_irq; tp 14103 drivers/net/ethernet/broadcom/tg3.c tp->coal.stats_block_coalesce_usecs = ec->stats_block_coalesce_usecs; tp 14106 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 14107 drivers/net/ethernet/broadcom/tg3.c __tg3_set_coalesce(tp, &tp->coal); tp 14108 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 14115 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14117 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) { tp 14118 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, "Board does not support EEE!\n"); tp 14122 drivers/net/ethernet/broadcom/tg3.c if (edata->advertised != tp->eee.advertised) { tp 14123 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 14129 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 14135 drivers/net/ethernet/broadcom/tg3.c tp->eee = *edata; tp 14137 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USER_CONFIGURED; tp 14138 drivers/net/ethernet/broadcom/tg3.c tg3_warn_mgmt_link_flap(tp); tp 14140 drivers/net/ethernet/broadcom/tg3.c if (netif_running(tp->dev)) { tp 14141 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 14142 drivers/net/ethernet/broadcom/tg3.c tg3_setup_eee(tp); tp 14143 drivers/net/ethernet/broadcom/tg3.c tg3_phy_reset(tp); tp 14144 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 14152 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14154 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) { tp 14155 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 14160 drivers/net/ethernet/broadcom/tg3.c *edata = tp->eee; tp 14204 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14206 drivers/net/ethernet/broadcom/tg3.c spin_lock_bh(&tp->lock); tp 14207 drivers/net/ethernet/broadcom/tg3.c if (!tp->hw_stats || !tg3_flag(tp, INIT_COMPLETE)) { tp 14208 drivers/net/ethernet/broadcom/tg3.c *stats = tp->net_stats_prev; tp 14209 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 14213 drivers/net/ethernet/broadcom/tg3.c tg3_get_nstats(tp, stats); tp 14214 drivers/net/ethernet/broadcom/tg3.c spin_unlock_bh(&tp->lock); tp 14219 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14224 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 14226 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 14229 drivers/net/ethernet/broadcom/tg3.c static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp, tp 14235 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS)) { tp 14237 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_CAPABLE); tp 14239 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, JUMBO_RING_ENABLE); tp 14242 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS)) { tp 14243 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TSO_CAPABLE); tp 14246 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, JUMBO_RING_ENABLE); tp 14252 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 14260 drivers/net/ethernet/broadcom/tg3.c tg3_set_mtu(dev, tp, new_mtu); tp 14264 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 14266 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 14268 drivers/net/ethernet/broadcom/tg3.c tg3_set_mtu(dev, tp, new_mtu); tp 14270 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 1); tp 14272 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 14277 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766 || tp 14278 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5717 || tp 14279 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 14280 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 14283 drivers/net/ethernet/broadcom/tg3.c err = tg3_restart_hw(tp, reset_phy); tp 14286 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 14288 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 14291 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 14314 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_eeprom_size(struct tg3 *tp) tp 14318 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = EEPROM_CHIP_SIZE; tp 14320 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0, &magic) != 0) tp 14335 drivers/net/ethernet/broadcom/tg3.c while (cursize < tp->nvram_size) { tp 14336 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, cursize, &val) != 0) tp 14345 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = cursize; tp 14348 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_nvram_size(struct tg3 *tp) tp 14352 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM) || tg3_nvram_read(tp, 0, &val) != 0) tp 14357 drivers/net/ethernet/broadcom/tg3.c tg3_get_eeprom_size(tp); tp 14361 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0xf0, &val) == 0) { tp 14374 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = swab16((u16)(val & 0x0000ffff)) * 1024; tp 14378 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14381 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_nvram_info(struct tg3 *tp) tp 14387 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14393 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5750 || tp 14394 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 14397 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14398 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE; tp 14399 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14402 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14403 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT25F512_PAGE_SIZE; tp 14406 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14407 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14408 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14411 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14412 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ST_M45PEX0_PAGE_SIZE; tp 14413 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14416 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_SAIFUN; tp 14417 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = SAIFUN_SA25F0XX_PAGE_SIZE; tp 14421 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_SST; tp 14422 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = SST_25VF0X0_PAGE_SIZE; tp 14426 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14427 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT45DB0X1B_PAGE_SIZE; tp 14428 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14432 drivers/net/ethernet/broadcom/tg3.c static void tg3_nvram_get_pagesize(struct tg3 *tp, u32 nvmcfg1) tp 14436 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 256; tp 14439 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 512; tp 14442 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 1024; tp 14445 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 2048; tp 14448 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 4096; tp 14451 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 264; tp 14454 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 528; tp 14459 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5752_nvram_info(struct tg3 *tp) tp 14467 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PROTECTED_NVRAM); tp 14472 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14473 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14476 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14477 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14478 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14483 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14484 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14485 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14489 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, FLASH)) { tp 14490 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_get_pagesize(tp, nvcfg1); tp 14493 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14500 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5755_nvram_info(struct tg3 *tp) tp 14508 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PROTECTED_NVRAM); tp 14518 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14519 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14520 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14521 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 264; tp 14524 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? 0x3e200 : tp 14527 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? 0x1f200 : tp 14530 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? 0x1f200 : tp 14536 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14537 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14538 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14539 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 256; tp 14541 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? tp 14545 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? tp 14549 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = (protect ? tp 14556 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5787_nvram_info(struct tg3 *tp) tp 14567 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14568 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14569 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14578 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14579 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14580 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14581 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 264; tp 14586 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14587 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14588 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14589 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 256; tp 14594 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5761_nvram_info(struct tg3 *tp) tp 14602 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PROTECTED_NVRAM); tp 14616 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14617 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14618 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14619 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); tp 14620 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 256; tp 14630 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14631 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14632 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14633 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 256; tp 14638 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = tr32(NVRAM_ADDR_LOCKOUT); tp 14645 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_2MB; tp 14651 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_1MB; tp 14657 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14663 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14669 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5906_nvram_info(struct tg3 *tp) tp 14671 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14672 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14673 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14676 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_57780_nvram_info(struct tg3 *tp) tp 14685 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14686 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14687 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14699 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14700 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14701 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14707 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14711 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14715 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14722 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14723 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14724 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14728 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14731 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14734 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14739 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 14743 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_get_pagesize(tp, nvcfg1); tp 14744 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528) tp 14745 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); tp 14749 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5717_nvram_info(struct tg3 *tp) tp 14758 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14759 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14760 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14772 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14773 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14774 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14782 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14785 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14799 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14800 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14801 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14810 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14813 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14818 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 14822 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_get_pagesize(tp, nvcfg1); tp 14823 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528) tp 14824 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); tp 14827 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_5720_nvram_info(struct tg3 *tp) tp 14834 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) { tp 14836 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 14846 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = 4096; tp 14847 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_MACRONIX; tp 14848 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14849 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); tp 14850 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14852 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = tp 14876 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14877 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14882 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; tp 14884 drivers/net/ethernet/broadcom/tg3.c tp->nvram_pagesize = ATMEL_AT24C02_CHIP_SIZE; tp 14898 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ATMEL; tp 14899 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14900 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14906 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14911 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14915 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_1MB; tp 14918 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5762) tp 14919 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14941 drivers/net/ethernet/broadcom/tg3.c tp->nvram_jedecnum = JEDEC_ST; tp 14942 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM_BUFFERED); tp 14943 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLASH); tp 14950 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_256KB; tp 14956 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_512KB; tp 14962 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_1MB; tp 14965 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5762) tp 14966 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = TG3_NVRAM_SIZE_128KB; tp 14971 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 14975 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_get_pagesize(tp, nvcfg1); tp 14976 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_pagesize != 264 && tp->nvram_pagesize != 528) tp 14977 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); tp 14979 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) { tp 14982 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0, &val)) tp 14987 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 14992 drivers/net/ethernet/broadcom/tg3.c static void tg3_nvram_init(struct tg3 *tp) tp 14994 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_SSB_CORE)) { tp 14996 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, NVRAM); tp 14997 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, NVRAM_BUFFERED); tp 14998 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NO_NVRAM); tp 15014 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5700 && tp 15015 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5701) { tp 15016 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, NVRAM); tp 15018 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_lock(tp)) { tp 15019 drivers/net/ethernet/broadcom/tg3.c netdev_warn(tp->dev, tp 15024 drivers/net/ethernet/broadcom/tg3.c tg3_enable_nvram_access(tp); tp 15026 drivers/net/ethernet/broadcom/tg3.c tp->nvram_size = 0; tp 15028 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5752) tp 15029 drivers/net/ethernet/broadcom/tg3.c tg3_get_5752_nvram_info(tp); tp 15030 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5755) tp 15031 drivers/net/ethernet/broadcom/tg3.c tg3_get_5755_nvram_info(tp); tp 15032 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5787 || tp 15033 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5784 || tp 15034 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785) tp 15035 drivers/net/ethernet/broadcom/tg3.c tg3_get_5787_nvram_info(tp); tp 15036 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5761) tp 15037 drivers/net/ethernet/broadcom/tg3.c tg3_get_5761_nvram_info(tp); tp 15038 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5906) tp 15039 drivers/net/ethernet/broadcom/tg3.c tg3_get_5906_nvram_info(tp); tp 15040 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_57780 || tp 15041 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS)) tp 15042 drivers/net/ethernet/broadcom/tg3.c tg3_get_57780_nvram_info(tp); tp 15043 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 15044 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719) tp 15045 drivers/net/ethernet/broadcom/tg3.c tg3_get_5717_nvram_info(tp); tp 15046 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 15047 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 15048 drivers/net/ethernet/broadcom/tg3.c tg3_get_5720_nvram_info(tp); tp 15050 drivers/net/ethernet/broadcom/tg3.c tg3_get_nvram_info(tp); tp 15052 drivers/net/ethernet/broadcom/tg3.c if (tp->nvram_size == 0) tp 15053 drivers/net/ethernet/broadcom/tg3.c tg3_get_nvram_size(tp); tp 15055 drivers/net/ethernet/broadcom/tg3.c tg3_disable_nvram_access(tp); tp 15056 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 15059 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, NVRAM); tp 15060 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, NVRAM_BUFFERED); tp 15062 drivers/net/ethernet/broadcom/tg3.c tg3_get_eeprom_size(tp); tp 15135 drivers/net/ethernet/broadcom/tg3.c static struct subsys_tbl_ent *tg3_lookup_by_subsys(struct tg3 *tp) tp 15141 drivers/net/ethernet/broadcom/tg3.c tp->pdev->subsystem_vendor) && tp 15143 drivers/net/ethernet/broadcom/tg3.c tp->pdev->subsystem_device)) tp 15149 drivers/net/ethernet/broadcom/tg3.c static void tg3_get_eeprom_hw_cfg(struct tg3 *tp) tp 15153 drivers/net/ethernet/broadcom/tg3.c tp->phy_id = TG3_PHY_ID_INVALID; tp 15154 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_1; tp 15157 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, EEPROM_WRITE_PROT); tp 15158 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, WOL_CAP); tp 15160 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 15162 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, EEPROM_WRITE_PROT); tp 15163 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, IS_NIC); tp 15167 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ASPM_WORKAROUND); tp 15170 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, WOL_ENABLE); tp 15171 drivers/net/ethernet/broadcom/tg3.c device_set_wakeup_enable(&tp->pdev->dev, true); tp 15176 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_SIG, &val); tp 15183 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg); tp 15184 drivers/net/ethernet/broadcom/tg3.c tp->nic_sram_data_cfg = nic_cfg; tp 15186 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_VER, &ver); tp 15188 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5700 && tp 15189 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5701 && tp 15190 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5703 && tp 15192 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG_2, &cfg2); tp 15194 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5785) tp 15195 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG_4, &cfg4); tp 15197 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 15198 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 15199 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 15200 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG_5, &cfg5); tp 15206 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_PHY_ID, &nic_phy_id); tp 15217 drivers/net/ethernet/broadcom/tg3.c tp->phy_id = eeprom_phy_id; tp 15219 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 15220 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_PHY_SERDES; tp 15222 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_MII_SERDES; tp 15225 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) tp 15234 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_1; tp 15238 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_2; tp 15242 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_MAC; tp 15247 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 15248 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) tp 15249 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_1; tp 15254 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_SHARED; tp 15255 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0 && tp 15256 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A1) tp 15257 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 | tp 15260 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5717_PLUS) || tp 15261 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 15262 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl |= LED_CTRL_BLINK_RATE_OVERRIDE | tp 15268 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_SHASTA_MAC; tp 15272 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_COMBO; tp 15273 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5750_A0) tp 15274 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl |= (LED_CTRL_MODE_PHY_1 | tp 15280 drivers/net/ethernet/broadcom/tg3.c if ((tg3_asic_rev(tp) == ASIC_REV_5700 || tp 15281 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) && tp 15282 drivers/net/ethernet/broadcom/tg3.c tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL) tp 15283 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_2; tp 15285 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5784_AX) tp 15286 drivers/net/ethernet/broadcom/tg3.c tp->led_ctrl = LED_CTRL_MODE_PHY_1; tp 15289 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, EEPROM_WRITE_PROT); tp 15290 drivers/net/ethernet/broadcom/tg3.c if ((tp->pdev->subsystem_vendor == tp 15292 drivers/net/ethernet/broadcom/tg3.c (tp->pdev->subsystem_device == 0x205a || tp 15293 drivers/net/ethernet/broadcom/tg3.c tp->pdev->subsystem_device == 0x2063)) tp 15294 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, EEPROM_WRITE_PROT); tp 15296 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, EEPROM_WRITE_PROT); tp 15297 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, IS_NIC); tp 15301 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_ASF); tp 15302 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) tp 15303 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ASF_NEW_HANDSHAKE); tp 15307 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5750_PLUS)) tp 15308 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_APE); tp 15310 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES && tp 15312 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, WOL_CAP); tp 15314 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_CAP) && tp 15316 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, WOL_ENABLE); tp 15317 drivers/net/ethernet/broadcom/tg3.c device_set_wakeup_enable(&tp->pdev->dev, true); tp 15321 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_CAPACITIVE_COUPLING; tp 15326 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_SERDES_PREEMPHASIS; tp 15328 drivers/net/ethernet/broadcom/tg3.c if ((tg3_flag(tp, 57765_PLUS) || tp 15329 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5784 && tp 15330 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) != CHIPREV_5784_AX)) && tp 15332 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_ENABLE_APD; tp 15334 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) { tp 15337 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &cfg3); tp 15338 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5785 && tp 15339 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_PLUS) && tp 15341 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ASPM_WORKAROUND); tp 15343 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_KEEP_LINK_ON_PWRDN; tp 15345 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_1G_ON_VAUX_OK; tp 15349 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, RGMII_INBAND_DISABLE); tp 15351 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, RGMII_EXT_IBND_RX_EN); tp 15353 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, RGMII_EXT_IBND_TX_EN); tp 15356 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_DISABLE_1G_HD_ADV; tp 15359 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, WOL_CAP)) tp 15360 drivers/net/ethernet/broadcom/tg3.c device_set_wakeup_enable(&tp->pdev->dev, tp 15361 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, WOL_ENABLE)); tp 15363 drivers/net/ethernet/broadcom/tg3.c device_set_wakeup_capable(&tp->pdev->dev, false); tp 15366 drivers/net/ethernet/broadcom/tg3.c static int tg3_ape_otp_read(struct tg3 *tp, u32 offset, u32 *val) tp 15371 drivers/net/ethernet/broadcom/tg3.c err = tg3_nvram_lock(tp); tp 15375 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_OTP_ADDR, off | APE_OTP_ADDR_CPU_ENABLE); tp 15376 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_OTP_CTRL, APE_OTP_CTRL_PROG_EN | tp 15378 drivers/net/ethernet/broadcom/tg3.c tg3_ape_read32(tp, TG3_APE_OTP_CTRL); tp 15382 drivers/net/ethernet/broadcom/tg3.c val2 = tg3_ape_read32(tp, TG3_APE_OTP_STATUS); tp 15384 drivers/net/ethernet/broadcom/tg3.c *val = tg3_ape_read32(tp, TG3_APE_OTP_RD_DATA); tp 15390 drivers/net/ethernet/broadcom/tg3.c tg3_ape_write32(tp, TG3_APE_OTP_CTRL, 0); tp 15392 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 15399 drivers/net/ethernet/broadcom/tg3.c static int tg3_issue_otp_command(struct tg3 *tp, u32 cmd) tp 15422 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_read_otp_phycfg(struct tg3 *tp) tp 15428 drivers/net/ethernet/broadcom/tg3.c if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_INIT)) tp 15433 drivers/net/ethernet/broadcom/tg3.c if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ)) tp 15440 drivers/net/ethernet/broadcom/tg3.c if (tg3_issue_otp_command(tp, OTP_CTRL_OTP_CMD_READ)) tp 15448 drivers/net/ethernet/broadcom/tg3.c static void tg3_phy_init_link_config(struct tg3 *tp) tp 15452 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) { tp 15453 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_DISABLE_1G_HD_ADV)) tp 15458 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) tp 15467 drivers/net/ethernet/broadcom/tg3.c tp->link_config.advertising = adv; tp 15468 drivers/net/ethernet/broadcom/tg3.c tp->link_config.speed = SPEED_UNKNOWN; tp 15469 drivers/net/ethernet/broadcom/tg3.c tp->link_config.duplex = DUPLEX_UNKNOWN; tp 15470 drivers/net/ethernet/broadcom/tg3.c tp->link_config.autoneg = AUTONEG_ENABLE; tp 15471 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_speed = SPEED_UNKNOWN; tp 15472 drivers/net/ethernet/broadcom/tg3.c tp->link_config.active_duplex = DUPLEX_UNKNOWN; tp 15474 drivers/net/ethernet/broadcom/tg3.c tp->old_link = -1; tp 15477 drivers/net/ethernet/broadcom/tg3.c static int tg3_phy_probe(struct tg3 *tp) tp 15484 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PAUSE_AUTONEG); tp 15485 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl = FLOW_CTRL_TX | FLOW_CTRL_RX; tp 15487 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) { tp 15488 drivers/net/ethernet/broadcom/tg3.c switch (tp->pci_fn) { tp 15490 drivers/net/ethernet/broadcom/tg3.c tp->phy_ape_lock = TG3_APE_LOCK_PHY0; tp 15493 drivers/net/ethernet/broadcom/tg3.c tp->phy_ape_lock = TG3_APE_LOCK_PHY1; tp 15496 drivers/net/ethernet/broadcom/tg3.c tp->phy_ape_lock = TG3_APE_LOCK_PHY2; tp 15499 drivers/net/ethernet/broadcom/tg3.c tp->phy_ape_lock = TG3_APE_LOCK_PHY3; tp 15504 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, ENABLE_ASF) && tp 15505 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) && tp 15506 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) tp 15507 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~(TG3_PHYFLG_1G_ON_VAUX_OK | tp 15510 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) tp 15511 drivers/net/ethernet/broadcom/tg3.c return tg3_phy_init(tp); tp 15517 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF) || tg3_flag(tp, ENABLE_APE)) { tp 15525 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1); tp 15526 drivers/net/ethernet/broadcom/tg3.c err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2); tp 15536 drivers/net/ethernet/broadcom/tg3.c tp->phy_id = hw_phy_id; tp 15538 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_PHY_SERDES; tp 15540 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_PHY_SERDES; tp 15542 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_id != TG3_PHY_ID_INVALID) { tp 15552 drivers/net/ethernet/broadcom/tg3.c p = tg3_lookup_by_subsys(tp); tp 15554 drivers/net/ethernet/broadcom/tg3.c tp->phy_id = p->phy_id; tp 15555 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, IS_SSB_CORE)) { tp 15566 drivers/net/ethernet/broadcom/tg3.c if (!tp->phy_id || tp 15567 drivers/net/ethernet/broadcom/tg3.c tp->phy_id == TG3_PHY_ID_BCM8002) tp 15568 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_PHY_SERDES; tp 15572 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) && tp 15573 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5719 || tp 15574 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720 || tp 15575 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57766 || tp 15576 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762 || tp 15577 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5717 && tp 15578 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5717_A0) || tp 15579 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_57765 && tp 15580 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_57765_A0))) { tp 15581 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_EEE_CAP; tp 15583 drivers/net/ethernet/broadcom/tg3.c tp->eee.supported = SUPPORTED_100baseT_Full | tp 15585 drivers/net/ethernet/broadcom/tg3.c tp->eee.advertised = ADVERTISED_100baseT_Full | tp 15587 drivers/net/ethernet/broadcom/tg3.c tp->eee.eee_enabled = 1; tp 15588 drivers/net/ethernet/broadcom/tg3.c tp->eee.tx_lpi_enabled = 1; tp 15589 drivers/net/ethernet/broadcom/tg3.c tp->eee.tx_lpi_timer = TG3_CPMU_DBTMR1_LNKIDLE_2047US; tp 15592 drivers/net/ethernet/broadcom/tg3.c tg3_phy_init_link_config(tp); tp 15594 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN) && tp 15595 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_ANY_SERDES) && tp 15596 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, ENABLE_APE) && tp 15597 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, ENABLE_ASF)) { tp 15600 drivers/net/ethernet/broadcom/tg3.c tg3_readphy(tp, MII_BMSR, &bmsr); tp 15601 drivers/net/ethernet/broadcom/tg3.c if (!tg3_readphy(tp, MII_BMSR, &bmsr) && tp 15605 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_reset(tp); tp 15609 drivers/net/ethernet/broadcom/tg3.c tg3_phy_set_wirespeed(tp); tp 15611 drivers/net/ethernet/broadcom/tg3.c if (!tg3_phy_copper_an_config_ok(tp, &dummy)) { tp 15612 drivers/net/ethernet/broadcom/tg3.c tg3_phy_autoneg_cfg(tp, tp->link_config.advertising, tp 15613 drivers/net/ethernet/broadcom/tg3.c tp->link_config.flowctrl); tp 15615 drivers/net/ethernet/broadcom/tg3.c tg3_writephy(tp, MII_BMCR, tp 15621 drivers/net/ethernet/broadcom/tg3.c if ((tp->phy_id & TG3_PHY_ID_MASK) == TG3_PHY_ID_BCM5401) { tp 15622 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_5401phy_dsp(tp); tp 15626 drivers/net/ethernet/broadcom/tg3.c err = tg3_init_5401phy_dsp(tp); tp 15632 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_vpd(struct tg3 *tp) tp 15639 drivers/net/ethernet/broadcom/tg3.c vpd_data = (u8 *)tg3_vpd_readblock(tp, &vpdlen); tp 15675 drivers/net/ethernet/broadcom/tg3.c if (len >= sizeof(tp->fw_ver)) tp 15676 drivers/net/ethernet/broadcom/tg3.c len = sizeof(tp->fw_ver) - 1; tp 15677 drivers/net/ethernet/broadcom/tg3.c memset(tp->fw_ver, 0, sizeof(tp->fw_ver)); tp 15678 drivers/net/ethernet/broadcom/tg3.c snprintf(tp->fw_ver, sizeof(tp->fw_ver), "%.*s bc ", len, tp 15695 drivers/net/ethernet/broadcom/tg3.c memcpy(tp->board_part_number, &vpd_data[i], len); tp 15699 drivers/net/ethernet/broadcom/tg3.c if (tp->board_part_number[0]) tp 15703 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717) { tp 15704 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || tp 15705 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C) tp 15706 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM5717"); tp 15707 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718) tp 15708 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM5718"); tp 15711 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_57780) { tp 15712 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57780) tp 15713 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57780"); tp 15714 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57760) tp 15715 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57760"); tp 15716 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57790) tp 15717 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57790"); tp 15718 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57788) tp 15719 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57788"); tp 15722 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_57765) { tp 15723 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761) tp 15724 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57761"); tp 15725 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765) tp 15726 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57765"); tp 15727 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781) tp 15728 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57781"); tp 15729 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785) tp 15730 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57785"); tp 15731 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791) tp 15732 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57791"); tp 15733 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795) tp 15734 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57795"); tp 15737 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_57766) { tp 15738 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57762) tp 15739 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57762"); tp 15740 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57766) tp 15741 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57766"); tp 15742 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57782) tp 15743 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57782"); tp 15744 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57786) tp 15745 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM57786"); tp 15748 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 15749 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "BCM95906"); tp 15752 drivers/net/ethernet/broadcom/tg3.c strcpy(tp->board_part_number, "none"); tp 15756 drivers/net/ethernet/broadcom/tg3.c static int tg3_fw_img_is_valid(struct tg3 *tp, u32 offset) tp 15760 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset, &val) || tp 15762 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_read(tp, offset + 4, &val) || tp 15769 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_bc_ver(struct tg3 *tp) tp 15775 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0xc, &offset) || tp 15776 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_read(tp, 0x4, &start)) tp 15779 drivers/net/ethernet/broadcom/tg3.c offset = tg3_nvram_logical_addr(tp, offset); tp 15781 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset, &val)) tp 15785 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset + 4, &val)) tp 15792 drivers/net/ethernet/broadcom/tg3.c dst_off = strlen(tp->fw_ver); tp 15796 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_read(tp, offset + 8, &ver_offset)) tp 15802 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read_be32(tp, offset + i, &v)) tp 15805 drivers/net/ethernet/broadcom/tg3.c memcpy(tp->fw_ver + dst_off + i, &v, sizeof(v)); tp 15810 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, TG3_NVM_PTREV_BCVER, &ver_offset)) tp 15816 drivers/net/ethernet/broadcom/tg3.c snprintf(&tp->fw_ver[dst_off], TG3_VER_SIZE - dst_off, tp 15821 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_hwsb_ver(struct tg3 *tp) tp 15826 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, TG3_NVM_HWSB_CFG1, &val)) tp 15834 drivers/net/ethernet/broadcom/tg3.c snprintf(&tp->fw_ver[0], 32, "sb v%d.%02d", major, minor); tp 15837 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_sb_ver(struct tg3 *tp, u32 val) tp 15841 drivers/net/ethernet/broadcom/tg3.c strncat(tp->fw_ver, "sb", TG3_VER_SIZE - strlen(tp->fw_ver) - 1); tp 15869 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset, &val)) tp 15881 drivers/net/ethernet/broadcom/tg3.c offset = strlen(tp->fw_ver); tp 15882 drivers/net/ethernet/broadcom/tg3.c snprintf(&tp->fw_ver[offset], TG3_VER_SIZE - offset, tp 15886 drivers/net/ethernet/broadcom/tg3.c offset = strlen(tp->fw_ver); tp 15888 drivers/net/ethernet/broadcom/tg3.c tp->fw_ver[offset] = 'a' + build - 1; tp 15892 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_mgmtfw_ver(struct tg3 *tp) tp 15900 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset, &val)) tp 15910 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS)) tp 15912 drivers/net/ethernet/broadcom/tg3.c else if (tg3_nvram_read(tp, offset - 4, &start)) tp 15915 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, offset + 4, &offset) || tp 15916 drivers/net/ethernet/broadcom/tg3.c !tg3_fw_img_is_valid(tp, offset) || tp 15917 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_read(tp, offset + 8, &val)) tp 15922 drivers/net/ethernet/broadcom/tg3.c vlen = strlen(tp->fw_ver); tp 15924 drivers/net/ethernet/broadcom/tg3.c tp->fw_ver[vlen++] = ','; tp 15925 drivers/net/ethernet/broadcom/tg3.c tp->fw_ver[vlen++] = ' '; tp 15929 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read_be32(tp, offset, &v)) tp 15935 drivers/net/ethernet/broadcom/tg3.c memcpy(&tp->fw_ver[vlen], &v, TG3_VER_SIZE - vlen); tp 15939 drivers/net/ethernet/broadcom/tg3.c memcpy(&tp->fw_ver[vlen], &v, sizeof(v)); tp 15944 drivers/net/ethernet/broadcom/tg3.c static void tg3_probe_ncsi(struct tg3 *tp) tp 15948 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_SEG_SIG); tp 15952 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); tp 15956 drivers/net/ethernet/broadcom/tg3.c if (tg3_ape_read32(tp, TG3_APE_FW_FEATURES) & TG3_APE_FW_FEATURE_NCSI) tp 15957 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, APE_HAS_NCSI); tp 15960 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_dash_ver(struct tg3 *tp) tp 15966 drivers/net/ethernet/broadcom/tg3.c apedata = tg3_ape_read32(tp, TG3_APE_FW_VERSION); tp 15968 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, APE_HAS_NCSI)) tp 15970 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725) tp 15975 drivers/net/ethernet/broadcom/tg3.c vlen = strlen(tp->fw_ver); tp 15977 drivers/net/ethernet/broadcom/tg3.c snprintf(&tp->fw_ver[vlen], TG3_VER_SIZE - vlen, " %s v%d.%d.%d.%d", tp 15985 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_otp_ver(struct tg3 *tp) tp 15989 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5762) tp 15992 drivers/net/ethernet/broadcom/tg3.c if (!tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0, &val) && tp 15993 drivers/net/ethernet/broadcom/tg3.c !tg3_ape_otp_read(tp, OTP_ADDRESS_MAGIC0 + 4, &val2) && tp 16005 drivers/net/ethernet/broadcom/tg3.c vlen = strlen(tp->fw_ver); tp 16006 drivers/net/ethernet/broadcom/tg3.c snprintf(&tp->fw_ver[vlen], TG3_VER_SIZE - vlen, " .%02d", ver); tp 16010 drivers/net/ethernet/broadcom/tg3.c static void tg3_read_fw_ver(struct tg3 *tp) tp 16015 drivers/net/ethernet/broadcom/tg3.c if (tp->fw_ver[0] != 0) tp 16018 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, NO_NVRAM)) { tp 16019 drivers/net/ethernet/broadcom/tg3.c strcat(tp->fw_ver, "sb"); tp 16020 drivers/net/ethernet/broadcom/tg3.c tg3_read_otp_ver(tp); tp 16024 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_read(tp, 0, &val)) tp 16028 drivers/net/ethernet/broadcom/tg3.c tg3_read_bc_ver(tp); tp 16030 drivers/net/ethernet/broadcom/tg3.c tg3_read_sb_ver(tp, val); tp 16032 drivers/net/ethernet/broadcom/tg3.c tg3_read_hwsb_ver(tp); tp 16034 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_ASF)) { tp 16035 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) { tp 16036 drivers/net/ethernet/broadcom/tg3.c tg3_probe_ncsi(tp); tp 16038 drivers/net/ethernet/broadcom/tg3.c tg3_read_dash_ver(tp); tp 16040 drivers/net/ethernet/broadcom/tg3.c tg3_read_mgmtfw_ver(tp); tp 16044 drivers/net/ethernet/broadcom/tg3.c tp->fw_ver[TG3_VER_SIZE - 1] = 0; tp 16047 drivers/net/ethernet/broadcom/tg3.c static inline u32 tg3_rx_ret_ring_size(struct tg3 *tp) tp 16049 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, LRG_PROD_RING_CAP)) tp 16051 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, JUMBO_CAPABLE) && !tg3_flag(tp, 5780_CLASS)) tp 16064 drivers/net/ethernet/broadcom/tg3.c static struct pci_dev *tg3_find_peer(struct tg3 *tp) tp 16067 drivers/net/ethernet/broadcom/tg3.c unsigned int func, devnr = tp->pdev->devfn & ~7; tp 16070 drivers/net/ethernet/broadcom/tg3.c peer = pci_get_slot(tp->pdev->bus, devnr | func); tp 16071 drivers/net/ethernet/broadcom/tg3.c if (peer && peer != tp->pdev) tp 16079 drivers/net/ethernet/broadcom/tg3.c peer = tp->pdev; tp 16092 drivers/net/ethernet/broadcom/tg3.c static void tg3_detect_asic_rev(struct tg3 *tp, u32 misc_ctrl_reg) tp 16094 drivers/net/ethernet/broadcom/tg3.c tp->pci_chip_rev_id = misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT; tp 16095 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_USE_PROD_ID_REG) { tp 16101 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, CPMU_PRESENT); tp 16103 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || tp 16104 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C || tp 16105 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 || tp 16106 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 || tp 16107 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720 || tp 16108 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57767 || tp 16109 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57764 || tp 16110 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5762 || tp 16111 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725 || tp 16112 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5727 || tp 16113 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57787) tp 16115 drivers/net/ethernet/broadcom/tg3.c else if (tp->pdev->device == TG3PCI_DEVICE_TIGON3_57781 || tp 16116 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57785 || tp 16117 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57761 || tp 16118 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57765 || tp 16119 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57791 || tp 16120 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57795 || tp 16121 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57762 || tp 16122 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57766 || tp 16123 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57782 || tp 16124 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57786) tp 16129 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, reg, &tp->pci_chip_rev_id); tp 16135 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5752_A0_HW) tp 16136 drivers/net/ethernet/broadcom/tg3.c tp->pci_chip_rev_id = CHIPREV_ID_5752_A0; tp 16138 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5717_C0) tp 16139 drivers/net/ethernet/broadcom/tg3.c tp->pci_chip_rev_id = CHIPREV_ID_5720_A0; tp 16141 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 16142 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 16143 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 16144 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5717_PLUS); tp 16146 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57765 || tp 16147 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57766) tp 16148 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 57765_CLASS); tp 16150 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_CLASS) || tg3_flag(tp, 5717_PLUS) || tp 16151 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 16152 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 57765_PLUS); tp 16155 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5755 || tp 16156 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5787 || tp 16157 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5784 || tp 16158 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5761 || tp 16159 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785 || tp 16160 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780 || tp 16161 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_PLUS)) tp 16162 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5755_PLUS); tp 16164 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5780 || tp 16165 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5714) tp 16166 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5780_CLASS); tp 16168 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5750 || tp 16169 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5752 || tp 16170 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906 || tp 16171 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5755_PLUS) || tp 16172 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) tp 16173 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5750_PLUS); tp 16175 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705 || tp 16176 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5750_PLUS)) tp 16177 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5705_PLUS); tp 16180 drivers/net/ethernet/broadcom/tg3.c static bool tg3_10_100_only_device(struct tg3 *tp, tp 16185 drivers/net/ethernet/broadcom/tg3.c if ((tg3_asic_rev(tp) == ASIC_REV_5703 && tp 16187 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_IS_FET)) tp 16191 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705) { tp 16202 drivers/net/ethernet/broadcom/tg3.c static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent) tp 16217 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); tp 16219 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); tp 16226 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp 16228 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl |= (misc_ctrl_reg & tp 16230 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp 16231 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl); tp 16233 drivers/net/ethernet/broadcom/tg3.c tg3_detect_asic_rev(tp, misc_ctrl_reg); tp 16252 drivers/net/ethernet/broadcom/tg3.c if ((tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A1) || tp 16253 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev_id(tp) == CHIPREV_ID_5703_A2)) { tp 16285 drivers/net/ethernet/broadcom/tg3.c tp->pdev->bus->number)) { tp 16286 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ICH_WORKAROUND); tp 16293 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5701) { tp 16315 drivers/net/ethernet/broadcom/tg3.c tp->pdev->bus->number) && tp 16317 drivers/net/ethernet/broadcom/tg3.c tp->pdev->bus->number)) { tp 16318 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 5701_DMA_BUG); tp 16331 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5780_CLASS)) { tp 16332 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 40BIT_DMA_BUG); tp 16333 drivers/net/ethernet/broadcom/tg3.c tp->msi_cap = tp->pdev->msi_cap; tp 16343 drivers/net/ethernet/broadcom/tg3.c tp->pdev->bus->number) && tp 16345 drivers/net/ethernet/broadcom/tg3.c tp->pdev->bus->number)) { tp 16346 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 40BIT_DMA_BUG); tp 16353 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704 || tp 16354 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5714) tp 16355 drivers/net/ethernet/broadcom/tg3.c tp->pdev_peer = tg3_find_peer(tp); tp 16358 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0) tp 16360 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 57765_PLUS)) tp 16361 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, HW_TSO_3); tp 16362 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 5755_PLUS) || tp 16363 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906) tp 16364 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, HW_TSO_2); tp 16365 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 5750_PLUS)) { tp 16366 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, HW_TSO_1); tp 16367 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TSO_BUG); tp 16368 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5750 && tp 16369 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) >= CHIPREV_ID_5750_C2) tp 16370 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_BUG); tp 16371 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) != ASIC_REV_5700 && tp 16372 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5701 && tp 16373 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) { tp 16374 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FW_TSO); tp 16375 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TSO_BUG); tp 16376 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705) tp 16377 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = FIRMWARE_TG3TSO5; tp 16379 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = FIRMWARE_TG3TSO; tp 16383 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_1) || tp 16384 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 16385 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3) || tp 16386 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, FW_TSO)) { tp 16391 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TSO_CAPABLE); tp 16393 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_CAPABLE); tp 16394 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_BUG); tp 16395 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = NULL; tp 16398 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0) tp 16399 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = FIRMWARE_TG3; tp 16401 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766) tp 16402 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = FIRMWARE_TG357766; tp 16404 drivers/net/ethernet/broadcom/tg3.c tp->irq_max = 1; tp 16406 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5750_PLUS)) { tp 16407 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, SUPPORT_MSI); tp 16408 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5750_AX || tp 16409 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) == CHIPREV_5750_BX || tp 16410 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5714 && tp 16411 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) <= CHIPREV_ID_5714_A2 && tp 16412 drivers/net/ethernet/broadcom/tg3.c tp->pdev_peer == tp->pdev)) tp 16413 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, SUPPORT_MSI); tp 16415 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS) || tp 16416 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906) { tp 16417 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, 1SHOT_MSI); tp 16420 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 16421 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, SUPPORT_MSIX); tp 16422 drivers/net/ethernet/broadcom/tg3.c tp->irq_max = TG3_IRQ_MAX_VECS; tp 16426 drivers/net/ethernet/broadcom/tg3.c tp->txq_max = 1; tp 16427 drivers/net/ethernet/broadcom/tg3.c tp->rxq_max = 1; tp 16428 drivers/net/ethernet/broadcom/tg3.c if (tp->irq_max > 1) { tp 16429 drivers/net/ethernet/broadcom/tg3.c tp->rxq_max = TG3_RSS_MAX_NUM_QS; tp 16430 drivers/net/ethernet/broadcom/tg3.c tg3_rss_init_dflt_indir_tbl(tp, TG3_RSS_MAX_NUM_QS); tp 16432 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719 || tp 16433 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) tp 16434 drivers/net/ethernet/broadcom/tg3.c tp->txq_max = tp->irq_max - 1; tp 16437 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS) || tp 16438 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5906) tp 16439 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, SHORT_DMA_BUG); tp 16441 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719) tp 16442 drivers/net/ethernet/broadcom/tg3.c tp->dma_limit = TG3_TX_BD_DMA_MAX_4K; tp 16444 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 16445 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 16446 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720 || tp 16447 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 16448 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, LRG_PROD_RING_CAP); tp 16450 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS) && tp 16451 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) != CHIPREV_ID_5719_A0) tp 16452 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USE_JUMBO_BDFLAG); tp 16454 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, 5705_PLUS) || tp 16455 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS) || tp 16456 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, USE_JUMBO_BDFLAG)) tp 16457 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, JUMBO_CAPABLE); tp 16459 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, tp 16462 drivers/net/ethernet/broadcom/tg3.c if (pci_is_pcie(tp->pdev)) { tp 16465 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCI_EXPRESS); tp 16467 drivers/net/ethernet/broadcom/tg3.c pcie_capability_read_word(tp->pdev, PCI_EXP_LNKCTL, &lnkctl); tp 16469 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 16470 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, HW_TSO_2); tp 16471 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_CAPABLE); tp 16473 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5784 || tp 16474 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5761 || tp 16475 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_57780_A0 || tp 16476 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_57780_A1) tp 16477 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, CLKREQ_BUG); tp 16478 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_chip_rev_id(tp) == CHIPREV_ID_5717_A0) { tp 16479 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, L1PLLPD_EN); tp 16481 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5785) { tp 16486 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCI_EXPRESS); tp 16487 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, 5705_PLUS) || tp 16488 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 16489 drivers/net/ethernet/broadcom/tg3.c tp->pcix_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_PCIX); tp 16490 drivers/net/ethernet/broadcom/tg3.c if (!tp->pcix_cap) { tp 16491 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 16497 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCIX_MODE); tp 16507 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, PCI_EXPRESS)) tp 16508 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, MBOX_WRITE_REORDER); tp 16510 drivers/net/ethernet/broadcom/tg3.c pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, tp 16511 drivers/net/ethernet/broadcom/tg3.c &tp->pci_cacheline_sz); tp 16512 drivers/net/ethernet/broadcom/tg3.c pci_read_config_byte(tp->pdev, PCI_LATENCY_TIMER, tp 16513 drivers/net/ethernet/broadcom/tg3.c &tp->pci_lat_timer); tp 16514 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703 && tp 16515 drivers/net/ethernet/broadcom/tg3.c tp->pci_lat_timer < 64) { tp 16516 drivers/net/ethernet/broadcom/tg3.c tp->pci_lat_timer = 64; tp 16517 drivers/net/ethernet/broadcom/tg3.c pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER, tp 16518 drivers/net/ethernet/broadcom/tg3.c tp->pci_lat_timer); tp 16524 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5700_BX) { tp 16528 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TXD_MBOX_HWBUG); tp 16535 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_MODE)) { tp 16538 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCIX_TARGET_HWBUG); tp 16544 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, tp 16545 drivers/net/ethernet/broadcom/tg3.c tp->pdev->pm_cap + PCI_PM_CTRL, tp 16549 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, tp 16550 drivers/net/ethernet/broadcom/tg3.c tp->pdev->pm_cap + PCI_PM_CTRL, tp 16554 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); tp 16556 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); tp 16561 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCI_HIGH_SPEED); tp 16563 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCI_32BIT); tp 16566 drivers/net/ethernet/broadcom/tg3.c if ((tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0) && tp 16569 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg); tp 16573 drivers/net/ethernet/broadcom/tg3.c tp->read32 = tg3_read32; tp 16574 drivers/net/ethernet/broadcom/tg3.c tp->write32 = tg3_write32; tp 16575 drivers/net/ethernet/broadcom/tg3.c tp->read32_mbox = tg3_read32; tp 16576 drivers/net/ethernet/broadcom/tg3.c tp->write32_mbox = tg3_write32; tp 16577 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write32; tp 16578 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write32; tp 16581 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_TARGET_HWBUG)) tp 16582 drivers/net/ethernet/broadcom/tg3.c tp->write32 = tg3_write_indirect_reg32; tp 16583 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5701 || tp 16584 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, PCI_EXPRESS) && tp 16585 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5750_A0)) { tp 16593 drivers/net/ethernet/broadcom/tg3.c tp->write32 = tg3_write_flush_reg32; tp 16596 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TXD_MBOX_HWBUG) || tg3_flag(tp, MBOX_WRITE_REORDER)) { tp 16597 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write32_tx_mbox; tp 16598 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, MBOX_WRITE_REORDER)) tp 16599 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write_flush_reg32; tp 16602 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ICH_WORKAROUND)) { tp 16603 drivers/net/ethernet/broadcom/tg3.c tp->read32 = tg3_read_indirect_reg32; tp 16604 drivers/net/ethernet/broadcom/tg3.c tp->write32 = tg3_write_indirect_reg32; tp 16605 drivers/net/ethernet/broadcom/tg3.c tp->read32_mbox = tg3_read_indirect_mbox; tp 16606 drivers/net/ethernet/broadcom/tg3.c tp->write32_mbox = tg3_write_indirect_mbox; tp 16607 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write_indirect_mbox; tp 16608 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write_indirect_mbox; tp 16610 drivers/net/ethernet/broadcom/tg3.c iounmap(tp->regs); tp 16611 drivers/net/ethernet/broadcom/tg3.c tp->regs = NULL; tp 16613 drivers/net/ethernet/broadcom/tg3.c pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); tp 16615 drivers/net/ethernet/broadcom/tg3.c pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); tp 16617 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 16618 drivers/net/ethernet/broadcom/tg3.c tp->read32_mbox = tg3_read32_mbox_5906; tp 16619 drivers/net/ethernet/broadcom/tg3.c tp->write32_mbox = tg3_write32_mbox_5906; tp 16620 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write32_mbox_5906; tp 16621 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write32_mbox_5906; tp 16624 drivers/net/ethernet/broadcom/tg3.c if (tp->write32 == tg3_write_indirect_reg32 || tp 16625 drivers/net/ethernet/broadcom/tg3.c (tg3_flag(tp, PCIX_MODE) && tp 16626 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 16627 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701))) tp 16628 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, SRAM_USE_CONFIG); tp 16638 drivers/net/ethernet/broadcom/tg3.c tp->pci_fn = PCI_FUNC(tp->pdev->devfn) & 3; tp 16639 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704 || tp 16640 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 16641 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_MODE)) { tp 16642 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, tp 16643 drivers/net/ethernet/broadcom/tg3.c tp->pcix_cap + PCI_X_STATUS, tp 16645 drivers/net/ethernet/broadcom/tg3.c tp->pci_fn = val & 0x7; tp 16647 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 16648 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5719 || tp 16649 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720) { tp 16650 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_CPMU_STATUS, &val); tp 16654 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717) tp 16655 drivers/net/ethernet/broadcom/tg3.c tp->pci_fn = (val & TG3_CPMU_STATUS_FMSK_5717) ? 1 : 0; tp 16657 drivers/net/ethernet/broadcom/tg3.c tp->pci_fn = (val & TG3_CPMU_STATUS_FMSK_5719) >> tp 16661 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, FLUSH_POSTED_WRITES)) { tp 16662 drivers/net/ethernet/broadcom/tg3.c tp->write32_tx_mbox = tg3_write_flush_reg32; tp 16663 drivers/net/ethernet/broadcom/tg3.c tp->write32_rx_mbox = tg3_write_flush_reg32; tp 16674 drivers/net/ethernet/broadcom/tg3.c tg3_get_eeprom_hw_cfg(tp); tp 16676 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, FW_TSO) && tg3_flag(tp, ENABLE_ASF)) { tp 16677 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_CAPABLE); tp 16678 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, TSO_BUG); tp 16679 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = NULL; tp 16682 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) { tp 16689 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, tp 16692 drivers/net/ethernet/broadcom/tg3.c tg3_ape_lock_init(tp); tp 16693 drivers/net/ethernet/broadcom/tg3.c tp->ape_hb_interval = tp 16702 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM; tp 16703 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 16704 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, EEPROM_WRITE_PROT)) tp 16705 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | tp 16710 drivers/net/ethernet/broadcom/tg3.c else if (tg3_asic_rev(tp) == ASIC_REV_5752) tp 16711 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; tp 16713 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5755 || tp 16714 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780 || tp 16715 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 57765_CLASS)) tp 16716 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; tp 16718 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 || tp 16719 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S) { tp 16721 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; tp 16722 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_NIC)) tp 16724 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | tp 16728 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5762) tp 16729 drivers/net/ethernet/broadcom/tg3.c tp->grc_local_ctrl |= tp 16733 drivers/net/ethernet/broadcom/tg3.c tg3_pwrsrc_switch_to_vmain(tp); tp 16738 drivers/net/ethernet/broadcom/tg3.c if (tp->dev->mtu > ETH_DATA_LEN && !tg3_flag(tp, 5780_CLASS)) tp 16739 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, JUMBO_RING_ENABLE); tp 16742 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 16743 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 || tp 16744 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0 || tp 16745 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B2) { tp 16746 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, WOL_SPEED_100MB); tp 16748 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, WOL_SPEED_100MB); tp 16751 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) tp 16752 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_IS_FET; tp 16755 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 16756 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5705 && tp 16757 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A0) && tp 16758 drivers/net/ethernet/broadcom/tg3.c (tg3_chip_rev_id(tp) != CHIPREV_ID_5705_A1)) || tp 16759 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_IS_FET) || tp 16760 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) tp 16761 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_NO_ETH_WIRE_SPEED; tp 16763 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) == CHIPREV_5703_AX || tp 16764 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) == CHIPREV_5704_AX) tp 16765 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_ADC_BUG; tp 16766 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5704_A0) tp 16767 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_5704_A0_BUG; tp 16769 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS) && tp 16770 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_IS_FET) && tp 16771 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5785 && tp 16772 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_57780 && tp 16773 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, 57765_PLUS)) { tp 16774 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5755 || tp 16775 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5787 || tp 16776 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5784 || tp 16777 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5761) { tp 16778 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device != PCI_DEVICE_ID_TIGON3_5756 && tp 16779 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device != PCI_DEVICE_ID_TIGON3_5722) tp 16780 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_JITTER_BUG; tp 16781 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5755M) tp 16782 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_ADJUST_TRIM; tp 16784 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_BER_BUG; tp 16787 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5784 && tp 16788 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) != CHIPREV_5784_AX) { tp 16789 drivers/net/ethernet/broadcom/tg3.c tp->phy_otp = tg3_read_otp_phycfg(tp); tp 16790 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_otp == 0) tp 16791 drivers/net/ethernet/broadcom/tg3.c tp->phy_otp = TG3_OTP_DEFAULT; tp 16794 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, CPMU_PRESENT)) tp 16795 drivers/net/ethernet/broadcom/tg3.c tp->mi_mode = MAC_MI_MODE_500KHZ_CONST; tp 16797 drivers/net/ethernet/broadcom/tg3.c tp->mi_mode = MAC_MI_MODE_BASE; tp 16799 drivers/net/ethernet/broadcom/tg3.c tp->coalesce_mode = 0; tp 16800 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev(tp) != CHIPREV_5700_AX && tp 16801 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) != CHIPREV_5700_BX) tp 16802 drivers/net/ethernet/broadcom/tg3.c tp->coalesce_mode |= HOSTCC_MODE_32BYTE; tp 16805 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5717 || tp 16806 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762 || tp 16807 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5719_A0 || tp 16808 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5720_A0) { tp 16809 drivers/net/ethernet/broadcom/tg3.c tp->coalesce_mode |= HOSTCC_MODE_ATTN; tp 16810 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode |= GRC_MODE_IRQ_ON_FLOW_ATTN; tp 16813 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5785 || tp 16814 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780) tp 16815 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USE_PHYLIB); tp 16817 drivers/net/ethernet/broadcom/tg3.c err = tg3_mdio_init(tp); tp 16823 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5720 || tp 16824 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 16833 drivers/net/ethernet/broadcom/tg3.c tw32(GRC_MODE, val | tp->grc_mode); tp 16835 drivers/net/ethernet/broadcom/tg3.c tg3_switch_clocks(tp); tp 16843 drivers/net/ethernet/broadcom/tg3.c pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, tp 16846 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, PCIX_TARGET_HWBUG)) { tp 16847 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5701_A0 || tp 16848 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B0 || tp 16849 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B2 || tp 16850 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp) == CHIPREV_ID_5701_B5) { tp 16857 drivers/net/ethernet/broadcom/tg3.c sram_base = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_STATS_BLK; tp 16863 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PCIX_TARGET_HWBUG); tp 16868 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_init(tp); tp 16871 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_57766 && tp 16872 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, NO_NVRAM)) tp 16873 drivers/net/ethernet/broadcom/tg3.c tp->fw_needed = NULL; tp 16878 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705 && tp 16881 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, IS_5788); tp 16883 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, IS_5788) && tp 16884 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5700) tp 16885 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, TAGGED_STATUS); tp 16886 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, TAGGED_STATUS)) { tp 16887 drivers/net/ethernet/broadcom/tg3.c tp->coalesce_mode |= (HOSTCC_MODE_CLRTICK_RXBD | tp 16890 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl |= MISC_HOST_CTRL_TAGGED_STATUS; tp 16891 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp 16892 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl); tp 16896 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE)) tp 16897 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode = MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN; tp 16899 drivers/net/ethernet/broadcom/tg3.c tp->mac_mode = 0; tp 16901 drivers/net/ethernet/broadcom/tg3.c if (tg3_10_100_only_device(tp, ent)) tp 16902 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_10_100_ONLY; tp 16904 drivers/net/ethernet/broadcom/tg3.c err = tg3_phy_probe(tp); tp 16906 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, "phy probe failed, err %d\n", err); tp 16908 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_fini(tp); tp 16911 drivers/net/ethernet/broadcom/tg3.c tg3_read_vpd(tp); tp 16912 drivers/net/ethernet/broadcom/tg3.c tg3_read_fw_ver(tp); tp 16914 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) { tp 16915 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_USE_MI_INTERRUPT; tp 16917 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700) tp 16918 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USE_MI_INTERRUPT; tp 16920 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags &= ~TG3_PHYFLG_USE_MI_INTERRUPT; tp 16927 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700) tp 16928 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USE_LINKCHG_REG); tp 16930 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, USE_LINKCHG_REG); tp 16936 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL && tp 16937 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701 && tp 16938 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_PHY_SERDES)) { tp 16939 drivers/net/ethernet/broadcom/tg3.c tp->phy_flags |= TG3_PHYFLG_USE_MI_INTERRUPT; tp 16940 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USE_LINKCHG_REG); tp 16944 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_PHY_SERDES) tp 16945 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, POLL_SERDES); tp 16947 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, POLL_SERDES); tp 16949 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ENABLE_APE) && tg3_flag(tp, ENABLE_ASF)) tp 16950 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, POLL_CPMU_LINK); tp 16952 drivers/net/ethernet/broadcom/tg3.c tp->rx_offset = NET_SKB_PAD + NET_IP_ALIGN; tp 16953 drivers/net/ethernet/broadcom/tg3.c tp->rx_copy_thresh = TG3_RX_COPY_THRESHOLD; tp 16954 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5701 && tp 16955 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, PCIX_MODE)) { tp 16956 drivers/net/ethernet/broadcom/tg3.c tp->rx_offset = NET_SKB_PAD; tp 16958 drivers/net/ethernet/broadcom/tg3.c tp->rx_copy_thresh = ~(u16)0; tp 16962 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_ring_mask = TG3_RX_STD_RING_SIZE(tp) - 1; tp 16963 drivers/net/ethernet/broadcom/tg3.c tp->rx_jmb_ring_mask = TG3_RX_JMB_RING_SIZE(tp) - 1; tp 16964 drivers/net/ethernet/broadcom/tg3.c tp->rx_ret_ring_mask = tg3_rx_ret_ring_size(tp) - 1; tp 16966 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_max_post = tp->rx_std_ring_mask + 1; tp 16971 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5750 || tp 16972 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5752 || tp 16973 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5755) tp 16974 drivers/net/ethernet/broadcom/tg3.c tp->rx_std_max_post = 8; tp 16976 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ASPM_WORKAROUND)) tp 16977 drivers/net/ethernet/broadcom/tg3.c tp->pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) & tp 16983 drivers/net/ethernet/broadcom/tg3.c static int tg3_get_device_address(struct tg3 *tp) tp 16985 drivers/net/ethernet/broadcom/tg3.c struct net_device *dev = tp->dev; tp 16990 drivers/net/ethernet/broadcom/tg3.c if (!eth_platform_get_mac_address(&tp->pdev->dev, dev->dev_addr)) tp 16993 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_SSB_CORE)) { tp 16994 drivers/net/ethernet/broadcom/tg3.c err = ssb_gige_get_macaddr(tp->pdev, &dev->dev_addr[0]); tp 17000 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5704 || tp 17001 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, 5780_CLASS)) { tp 17004 drivers/net/ethernet/broadcom/tg3.c if (tg3_nvram_lock(tp)) tp 17007 drivers/net/ethernet/broadcom/tg3.c tg3_nvram_unlock(tp); tp 17008 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, 5717_PLUS)) { tp 17009 drivers/net/ethernet/broadcom/tg3.c if (tp->pci_fn & 1) tp 17011 drivers/net/ethernet/broadcom/tg3.c if (tp->pci_fn > 1) tp 17013 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5906) tp 17017 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi); tp 17022 drivers/net/ethernet/broadcom/tg3.c tg3_read_mem(tp, NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo); tp 17033 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, NO_NVRAM) && tp 17034 drivers/net/ethernet/broadcom/tg3.c !tg3_nvram_read_be32(tp, mac_offset + 0, &hi) && tp 17035 drivers/net/ethernet/broadcom/tg3.c !tg3_nvram_read_be32(tp, mac_offset + 4, &lo)) { tp 17061 drivers/net/ethernet/broadcom/tg3.c static u32 tg3_calc_dma_bndry(struct tg3 *tp, u32 val) tp 17067 drivers/net/ethernet/broadcom/tg3.c pci_read_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE, &byte); tp 17076 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5700 && tp 17077 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5701 && tp 17078 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, PCI_EXPRESS)) tp 17091 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 17110 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCIX_MODE) && !tg3_flag(tp, PCI_EXPRESS)) { tp 17135 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, PCI_EXPRESS)) { tp 17202 drivers/net/ethernet/broadcom/tg3.c static int tg3_do_test_dma(struct tg3 *tp, u32 *buf, dma_addr_t buf_dma, tp 17253 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, tp 17255 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val); tp 17257 drivers/net/ethernet/broadcom/tg3.c pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); tp 17290 drivers/net/ethernet/broadcom/tg3.c static int tg3_test_dma(struct tg3 *tp) tp 17296 drivers/net/ethernet/broadcom/tg3.c buf = dma_alloc_coherent(&tp->pdev->dev, TEST_BUFFER_SIZE, tp 17303 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl = ((0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | tp 17306 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl = tg3_calc_dma_bndry(tp, tp->dma_rwctrl); tp 17308 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) tp 17311 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) { tp 17313 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x00180000; tp 17314 drivers/net/ethernet/broadcom/tg3.c } else if (!tg3_flag(tp, PCIX_MODE)) { tp 17315 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5705 || tp 17316 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5750) tp 17317 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x003f0000; tp 17319 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x003f000f; tp 17321 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703 || tp 17322 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704) { tp 17330 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 40BIT_DMA_BUG) && tp 17331 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704) tp 17332 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x8000; tp 17334 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; tp 17336 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703) tp 17339 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= tp 17343 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5780) { tp 17345 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x00144000; tp 17346 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_asic_rev(tp) == ASIC_REV_5714) { tp 17348 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x00148000; tp 17350 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= 0x001b000f; tp 17353 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, ONE_DMA_AT_ONCE)) tp 17354 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; tp 17356 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5703 || tp 17357 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5704) tp 17358 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl &= 0xfffffff0; tp 17360 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5700 || tp 17361 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5701) { tp 17363 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_USE_MEM_READ_MULT; tp 17375 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE; tp 17378 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); tp 17381 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5700 && tp 17382 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) != ASIC_REV_5701) tp 17388 drivers/net/ethernet/broadcom/tg3.c saved_dma_rwctrl = tp->dma_rwctrl; tp 17389 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK; tp 17390 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); tp 17399 drivers/net/ethernet/broadcom/tg3.c ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, true); tp 17401 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 17408 drivers/net/ethernet/broadcom/tg3.c ret = tg3_do_test_dma(tp, buf, buf_dma, TEST_BUFFER_SIZE, false); tp 17410 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, "%s: Buffer read failed. " tp 17420 drivers/net/ethernet/broadcom/tg3.c if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) != tp 17422 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK; tp 17423 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16; tp 17424 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); tp 17427 drivers/net/ethernet/broadcom/tg3.c dev_err(&tp->pdev->dev, tp 17441 drivers/net/ethernet/broadcom/tg3.c if ((tp->dma_rwctrl & DMA_RWCTRL_WRITE_BNDRY_MASK) != tp 17448 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl &= ~DMA_RWCTRL_WRITE_BNDRY_MASK; tp 17449 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl |= DMA_RWCTRL_WRITE_BNDRY_16; tp 17452 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl = saved_dma_rwctrl; tp 17455 drivers/net/ethernet/broadcom/tg3.c tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); tp 17459 drivers/net/ethernet/broadcom/tg3.c dma_free_coherent(&tp->pdev->dev, TEST_BUFFER_SIZE, buf, buf_dma); tp 17464 drivers/net/ethernet/broadcom/tg3.c static void tg3_init_bufmgr_config(struct tg3 *tp) tp 17466 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 57765_PLUS)) { tp 17467 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water = tp 17469 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water = tp 17471 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water = tp 17474 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water_jumbo = tp 17476 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo = tp 17478 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water_jumbo = tp 17480 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, 5705_PLUS)) { tp 17481 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water = tp 17483 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water = tp 17485 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water = tp 17487 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5906) { tp 17488 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water = tp 17490 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water = tp 17494 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water_jumbo = tp 17496 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo = tp 17498 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water_jumbo = tp 17501 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water = tp 17503 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water = tp 17505 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water = tp 17508 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_read_dma_low_water_jumbo = tp 17510 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo = tp 17512 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.mbuf_high_water_jumbo = tp 17516 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.dma_low_water = DEFAULT_DMA_LOW_WATER; tp 17517 drivers/net/ethernet/broadcom/tg3.c tp->bufmgr_config.dma_high_water = DEFAULT_DMA_HIGH_WATER; tp 17520 drivers/net/ethernet/broadcom/tg3.c static char *tg3_phy_string(struct tg3 *tp) tp 17522 drivers/net/ethernet/broadcom/tg3.c switch (tp->phy_id & TG3_PHY_ID_MASK) { tp 17552 drivers/net/ethernet/broadcom/tg3.c static char *tg3_bus_string(struct tg3 *tp, char *str) tp 17554 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_EXPRESS)) { tp 17557 drivers/net/ethernet/broadcom/tg3.c } else if (tg3_flag(tp, PCIX_MODE)) { tp 17576 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_HIGH_SPEED)) tp 17581 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PCI_32BIT)) tp 17588 drivers/net/ethernet/broadcom/tg3.c static void tg3_init_coal(struct tg3 *tp) tp 17590 drivers/net/ethernet/broadcom/tg3.c struct ethtool_coalesce *ec = &tp->coal; tp 17604 drivers/net/ethernet/broadcom/tg3.c if (tp->coalesce_mode & (HOSTCC_MODE_CLRTICK_RXBD | tp 17612 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5705_PLUS)) { tp 17623 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp; tp 17646 drivers/net/ethernet/broadcom/tg3.c dev = alloc_etherdev_mq(sizeof(*tp), TG3_IRQ_MAX_VECS); tp 17654 drivers/net/ethernet/broadcom/tg3.c tp = netdev_priv(dev); tp 17655 drivers/net/ethernet/broadcom/tg3.c tp->pdev = pdev; tp 17656 drivers/net/ethernet/broadcom/tg3.c tp->dev = dev; tp 17657 drivers/net/ethernet/broadcom/tg3.c tp->rx_mode = TG3_DEF_RX_MODE; tp 17658 drivers/net/ethernet/broadcom/tg3.c tp->tx_mode = TG3_DEF_TX_MODE; tp 17659 drivers/net/ethernet/broadcom/tg3.c tp->irq_sync = 1; tp 17660 drivers/net/ethernet/broadcom/tg3.c tp->pcierr_recovery = false; tp 17663 drivers/net/ethernet/broadcom/tg3.c tp->msg_enable = tg3_debug; tp 17665 drivers/net/ethernet/broadcom/tg3.c tp->msg_enable = TG3_DEF_MSG_ENABLE; tp 17668 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, IS_SSB_CORE); tp 17670 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, FLUSH_POSTED_WRITES); tp 17672 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ONE_DMA_AT_ONCE); tp 17674 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, USE_PHYLIB); tp 17675 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ROBOSWITCH); tp 17678 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, RGMII_MODE); tp 17685 drivers/net/ethernet/broadcom/tg3.c tp->misc_host_ctrl = tp 17697 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA | tp 17700 drivers/net/ethernet/broadcom/tg3.c tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; tp 17702 drivers/net/ethernet/broadcom/tg3.c spin_lock_init(&tp->lock); tp 17703 drivers/net/ethernet/broadcom/tg3.c spin_lock_init(&tp->indirect_lock); tp 17704 drivers/net/ethernet/broadcom/tg3.c INIT_WORK(&tp->reset_task, tg3_reset_task); tp 17706 drivers/net/ethernet/broadcom/tg3.c tp->regs = pci_ioremap_bar(pdev, BAR_0); tp 17707 drivers/net/ethernet/broadcom/tg3.c if (!tp->regs) { tp 17713 drivers/net/ethernet/broadcom/tg3.c if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761 || tp 17714 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761E || tp 17715 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761S || tp 17716 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5761SE || tp 17717 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717 || tp 17718 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5717_C || tp 17719 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5718 || tp 17720 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5719 || tp 17721 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5720 || tp 17722 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57767 || tp 17723 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57764 || tp 17724 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5762 || tp 17725 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5725 || tp 17726 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_5727 || tp 17727 drivers/net/ethernet/broadcom/tg3.c tp->pdev->device == TG3PCI_DEVICE_TIGON3_57787) { tp 17728 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, ENABLE_APE); tp 17729 drivers/net/ethernet/broadcom/tg3.c tp->aperegs = pci_ioremap_bar(pdev, BAR_2); tp 17730 drivers/net/ethernet/broadcom/tg3.c if (!tp->aperegs) { tp 17738 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending = TG3_DEF_RX_RING_PENDING; tp 17739 drivers/net/ethernet/broadcom/tg3.c tp->rx_jumbo_pending = TG3_DEF_RX_JUMBO_RING_PENDING; tp 17746 drivers/net/ethernet/broadcom/tg3.c err = tg3_get_invariants(tp, ent); tp 17759 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, IS_5788)) tp 17761 drivers/net/ethernet/broadcom/tg3.c else if (tg3_flag(tp, 40BIT_DMA_BUG)) { tp 17792 drivers/net/ethernet/broadcom/tg3.c tg3_init_bufmgr_config(tp); tp 17797 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) != CHIPREV_ID_5700_B0) { tp 17800 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, 5755_PLUS)) tp 17808 drivers/net/ethernet/broadcom/tg3.c if ((tg3_flag(tp, HW_TSO_1) || tp 17809 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_2) || tp 17810 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, HW_TSO_3)) && tp 17813 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_2) || tg3_flag(tp, HW_TSO_3)) { tp 17816 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, HW_TSO_3) || tp 17817 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5761 || tp 17818 drivers/net/ethernet/broadcom/tg3.c (tg3_asic_rev(tp) == ASIC_REV_5784 && tp 17819 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev(tp) != CHIPREV_5784_AX) || tp 17820 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5785 || tp 17821 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_57780) tp 17834 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) != ASIC_REV_5780 && tp 17835 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, CPMU_PRESENT)) tp 17844 drivers/net/ethernet/broadcom/tg3.c dev->max_mtu = TG3_MAX_MTU(tp); tp 17846 drivers/net/ethernet/broadcom/tg3.c if (tg3_chip_rev_id(tp) == CHIPREV_ID_5705_A1 && tp 17847 drivers/net/ethernet/broadcom/tg3.c !tg3_flag(tp, TSO_CAPABLE) && tp 17849 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, MAX_RXPEND_64); tp 17850 drivers/net/ethernet/broadcom/tg3.c tp->rx_pending = 63; tp 17853 drivers/net/ethernet/broadcom/tg3.c err = tg3_get_device_address(tp); tp 17863 drivers/net/ethernet/broadcom/tg3.c for (i = 0; i < tp->irq_max; i++) { tp 17864 drivers/net/ethernet/broadcom/tg3.c struct tg3_napi *tnapi = &tp->napi[i]; tp 17866 drivers/net/ethernet/broadcom/tg3.c tnapi->tp = tp; tp 17883 drivers/net/ethernet/broadcom/tg3.c if (!tg3_flag(tp, SUPPORT_MSIX)) tp 17911 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 17913 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 17914 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 17917 drivers/net/ethernet/broadcom/tg3.c err = tg3_test_dma(tp); tp 17923 drivers/net/ethernet/broadcom/tg3.c tg3_init_coal(tp); tp 17927 drivers/net/ethernet/broadcom/tg3.c if (tg3_asic_rev(tp) == ASIC_REV_5719 || tp 17928 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5720 || tp 17929 drivers/net/ethernet/broadcom/tg3.c tg3_asic_rev(tp) == ASIC_REV_5762) tp 17930 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, PTP_CAPABLE); tp 17932 drivers/net/ethernet/broadcom/tg3.c tg3_timer_init(tp); tp 17934 drivers/net/ethernet/broadcom/tg3.c tg3_carrier_off(tp); tp 17942 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, PTP_CAPABLE)) { tp 17943 drivers/net/ethernet/broadcom/tg3.c tg3_ptp_init(tp); tp 17944 drivers/net/ethernet/broadcom/tg3.c tp->ptp_clock = ptp_clock_register(&tp->ptp_info, tp 17945 drivers/net/ethernet/broadcom/tg3.c &tp->pdev->dev); tp 17946 drivers/net/ethernet/broadcom/tg3.c if (IS_ERR(tp->ptp_clock)) tp 17947 drivers/net/ethernet/broadcom/tg3.c tp->ptp_clock = NULL; tp 17951 drivers/net/ethernet/broadcom/tg3.c tp->board_part_number, tp 17952 drivers/net/ethernet/broadcom/tg3.c tg3_chip_rev_id(tp), tp 17953 drivers/net/ethernet/broadcom/tg3.c tg3_bus_string(tp, str), tp 17956 drivers/net/ethernet/broadcom/tg3.c if (!(tp->phy_flags & TG3_PHYFLG_IS_CONNECTED)) { tp 17959 drivers/net/ethernet/broadcom/tg3.c if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY) tp 17961 drivers/net/ethernet/broadcom/tg3.c else if (tp->phy_flags & TG3_PHYFLG_ANY_SERDES) tp 17968 drivers/net/ethernet/broadcom/tg3.c tg3_phy_string(tp), ethtype, tp 17969 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_NO_ETH_WIRE_SPEED) == 0, tp 17970 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_EEE_CAP) != 0); tp 17975 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, USE_LINKCHG_REG) != 0, tp 17976 drivers/net/ethernet/broadcom/tg3.c (tp->phy_flags & TG3_PHYFLG_USE_MI_INTERRUPT) != 0, tp 17977 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, ENABLE_ASF) != 0, tp 17978 drivers/net/ethernet/broadcom/tg3.c tg3_flag(tp, TSO_CAPABLE) != 0); tp 17980 drivers/net/ethernet/broadcom/tg3.c tp->dma_rwctrl, tp 17989 drivers/net/ethernet/broadcom/tg3.c if (tp->aperegs) { tp 17990 drivers/net/ethernet/broadcom/tg3.c iounmap(tp->aperegs); tp 17991 drivers/net/ethernet/broadcom/tg3.c tp->aperegs = NULL; tp 17995 drivers/net/ethernet/broadcom/tg3.c if (tp->regs) { tp 17996 drivers/net/ethernet/broadcom/tg3.c iounmap(tp->regs); tp 17997 drivers/net/ethernet/broadcom/tg3.c tp->regs = NULL; tp 18017 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 18019 drivers/net/ethernet/broadcom/tg3.c tg3_ptp_fini(tp); tp 18021 drivers/net/ethernet/broadcom/tg3.c release_firmware(tp->fw); tp 18023 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_cancel(tp); tp 18025 drivers/net/ethernet/broadcom/tg3.c if (tg3_flag(tp, USE_PHYLIB)) { tp 18026 drivers/net/ethernet/broadcom/tg3.c tg3_phy_fini(tp); tp 18027 drivers/net/ethernet/broadcom/tg3.c tg3_mdio_fini(tp); tp 18031 drivers/net/ethernet/broadcom/tg3.c if (tp->aperegs) { tp 18032 drivers/net/ethernet/broadcom/tg3.c iounmap(tp->aperegs); tp 18033 drivers/net/ethernet/broadcom/tg3.c tp->aperegs = NULL; tp 18035 drivers/net/ethernet/broadcom/tg3.c if (tp->regs) { tp 18036 drivers/net/ethernet/broadcom/tg3.c iounmap(tp->regs); tp 18037 drivers/net/ethernet/broadcom/tg3.c tp->regs = NULL; tp 18049 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 18057 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_cancel(tp); tp 18058 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 18059 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 18061 drivers/net/ethernet/broadcom/tg3.c tg3_timer_stop(tp); tp 18063 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 1); tp 18064 drivers/net/ethernet/broadcom/tg3.c tg3_disable_ints(tp); tp 18065 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18069 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 18070 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tp 18071 drivers/net/ethernet/broadcom/tg3.c tg3_flag_clear(tp, INIT_COMPLETE); tp 18072 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18074 drivers/net/ethernet/broadcom/tg3.c err = tg3_power_down_prepare(tp); tp 18078 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 18080 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, INIT_COMPLETE); tp 18081 drivers/net/ethernet/broadcom/tg3.c err2 = tg3_restart_hw(tp, true); tp 18085 drivers/net/ethernet/broadcom/tg3.c tg3_timer_start(tp); tp 18088 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 18091 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18094 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 18105 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 18115 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 18117 drivers/net/ethernet/broadcom/tg3.c tg3_ape_driver_state_change(tp, RESET_KIND_INIT); tp 18119 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, INIT_COMPLETE); tp 18120 drivers/net/ethernet/broadcom/tg3.c err = tg3_restart_hw(tp, tp 18121 drivers/net/ethernet/broadcom/tg3.c !(tp->phy_flags & TG3_PHYFLG_KEEP_LINK_ON_PWRDN)); tp 18125 drivers/net/ethernet/broadcom/tg3.c tg3_timer_start(tp); tp 18127 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 18130 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18133 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 18146 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(dev); tp 18155 drivers/net/ethernet/broadcom/tg3.c tg3_power_down(tp); tp 18172 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(netdev); tp 18185 drivers/net/ethernet/broadcom/tg3.c tp->pcierr_recovery = true; tp 18187 drivers/net/ethernet/broadcom/tg3.c tg3_phy_stop(tp); tp 18189 drivers/net/ethernet/broadcom/tg3.c tg3_netif_stop(tp); tp 18191 drivers/net/ethernet/broadcom/tg3.c tg3_timer_stop(tp); tp 18194 drivers/net/ethernet/broadcom/tg3.c tg3_reset_task_cancel(tp); tp 18199 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 18200 drivers/net/ethernet/broadcom/tg3.c tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); tp 18201 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18206 drivers/net/ethernet/broadcom/tg3.c tg3_napi_enable(tp); tp 18231 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(netdev); tp 18252 drivers/net/ethernet/broadcom/tg3.c err = tg3_power_up(tp); tp 18260 drivers/net/ethernet/broadcom/tg3.c tg3_napi_enable(tp); tp 18278 drivers/net/ethernet/broadcom/tg3.c struct tg3 *tp = netdev_priv(netdev); tp 18286 drivers/net/ethernet/broadcom/tg3.c tg3_full_lock(tp, 0); tp 18287 drivers/net/ethernet/broadcom/tg3.c tg3_ape_driver_state_change(tp, RESET_KIND_INIT); tp 18288 drivers/net/ethernet/broadcom/tg3.c tg3_flag_set(tp, INIT_COMPLETE); tp 18289 drivers/net/ethernet/broadcom/tg3.c err = tg3_restart_hw(tp, true); tp 18291 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18298 drivers/net/ethernet/broadcom/tg3.c tg3_timer_start(tp); tp 18300 drivers/net/ethernet/broadcom/tg3.c tg3_netif_start(tp); tp 18302 drivers/net/ethernet/broadcom/tg3.c tg3_full_unlock(tp); tp 18304 drivers/net/ethernet/broadcom/tg3.c tg3_phy_start(tp); tp 18307 drivers/net/ethernet/broadcom/tg3.c tp->pcierr_recovery = false; tp 2513 drivers/net/ethernet/broadcom/tg3.h #define TG3_APE_HB_INTERVAL (tp->ape_hb_interval) tp 3006 drivers/net/ethernet/broadcom/tg3.h struct tg3 *tp; tp 3442 drivers/net/ethernet/broadcom/tg3.h #define tg3_chip_rev_id(tp) \ tp 3443 drivers/net/ethernet/broadcom/tg3.h ((tp)->pci_chip_rev_id) tp 3444 drivers/net/ethernet/broadcom/tg3.h #define tg3_asic_rev(tp) \ tp 3445 drivers/net/ethernet/broadcom/tg3.h ((tp)->pci_chip_rev_id >> 12) tp 3446 drivers/net/ethernet/broadcom/tg3.h #define tg3_chip_rev(tp) \ tp 3447 drivers/net/ethernet/broadcom/tg3.h ((tp)->pci_chip_rev_id >> 8) tp 192 drivers/net/ethernet/chelsio/cxgb/common.h struct tp_params tp; tp 248 drivers/net/ethernet/chelsio/cxgb/common.h struct petp *tp; tp 190 drivers/net/ethernet/chelsio/cxgb/cxgb2.c t1_tp_set_ip_checksum_offload(adapter->tp, 1); /* for TSO only */ tp 191 drivers/net/ethernet/chelsio/cxgb/cxgb2.c t1_tp_set_tcp_checksum_offload(adapter->tp, 1); tp 762 drivers/net/ethernet/chelsio/cxgb/subr.c t1_tp_intr_enable(adapter->tp); tp 794 drivers/net/ethernet/chelsio/cxgb/subr.c t1_tp_intr_disable(adapter->tp); tp 820 drivers/net/ethernet/chelsio/cxgb/subr.c t1_tp_intr_clear(adapter->tp); tp 855 drivers/net/ethernet/chelsio/cxgb/subr.c t1_tp_intr_handler(adapter->tp); tp 979 drivers/net/ethernet/chelsio/cxgb/subr.c if (t1_tp_reset(adapter->tp, &adapter->params.tp, bi->clock_core)) tp 1024 drivers/net/ethernet/chelsio/cxgb/subr.c if (adapter->tp) tp 1025 drivers/net/ethernet/chelsio/cxgb/subr.c t1_tp_destroy(adapter->tp); tp 1072 drivers/net/ethernet/chelsio/cxgb/subr.c adapter->tp = t1_tp_create(adapter, &adapter->params.tp); tp 1073 drivers/net/ethernet/chelsio/cxgb/subr.c if (!adapter->tp) { tp 54 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_destroy(struct petp *tp) tp 56 drivers/net/ethernet/chelsio/cxgb/tp.c kfree(tp); tp 61 drivers/net/ethernet/chelsio/cxgb/tp.c struct petp *tp = kzalloc(sizeof(*tp), GFP_KERNEL); tp 63 drivers/net/ethernet/chelsio/cxgb/tp.c if (!tp) tp 66 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter = adapter; tp 68 drivers/net/ethernet/chelsio/cxgb/tp.c return tp; tp 71 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_intr_enable(struct petp *tp) tp 73 drivers/net/ethernet/chelsio/cxgb/tp.c u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); tp 76 drivers/net/ethernet/chelsio/cxgb/tp.c if (!t1_is_asic(tp->adapter)) { tp 79 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); tp 81 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + A_PL_ENABLE); tp 86 drivers/net/ethernet/chelsio/cxgb/tp.c writel(0, tp->adapter->regs + A_TP_INT_ENABLE); tp 88 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + A_PL_ENABLE); tp 92 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_intr_disable(struct petp *tp) tp 94 drivers/net/ethernet/chelsio/cxgb/tp.c u32 tp_intr = readl(tp->adapter->regs + A_PL_ENABLE); tp 97 drivers/net/ethernet/chelsio/cxgb/tp.c if (!t1_is_asic(tp->adapter)) { tp 99 drivers/net/ethernet/chelsio/cxgb/tp.c writel(0, tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_ENABLE); tp 101 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + A_PL_ENABLE); tp 105 drivers/net/ethernet/chelsio/cxgb/tp.c writel(0, tp->adapter->regs + A_TP_INT_ENABLE); tp 107 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + A_PL_ENABLE); tp 111 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_intr_clear(struct petp *tp) tp 114 drivers/net/ethernet/chelsio/cxgb/tp.c if (!t1_is_asic(tp->adapter)) { tp 116 drivers/net/ethernet/chelsio/cxgb/tp.c tp->adapter->regs + FPGA_TP_ADDR_INTERRUPT_CAUSE); tp 117 drivers/net/ethernet/chelsio/cxgb/tp.c writel(FPGA_PCIX_INTERRUPT_TP, tp->adapter->regs + A_PL_CAUSE); tp 121 drivers/net/ethernet/chelsio/cxgb/tp.c writel(0xffffffff, tp->adapter->regs + A_TP_INT_CAUSE); tp 122 drivers/net/ethernet/chelsio/cxgb/tp.c writel(F_PL_INTR_TP, tp->adapter->regs + A_PL_CAUSE); tp 125 drivers/net/ethernet/chelsio/cxgb/tp.c int t1_tp_intr_handler(struct petp *tp) tp 131 drivers/net/ethernet/chelsio/cxgb/tp.c if (!t1_is_asic(tp->adapter)) tp 135 drivers/net/ethernet/chelsio/cxgb/tp.c cause = readl(tp->adapter->regs + A_TP_INT_CAUSE); tp 136 drivers/net/ethernet/chelsio/cxgb/tp.c writel(cause, tp->adapter->regs + A_TP_INT_CAUSE); tp 140 drivers/net/ethernet/chelsio/cxgb/tp.c static void set_csum_offload(struct petp *tp, u32 csum_bit, int enable) tp 142 drivers/net/ethernet/chelsio/cxgb/tp.c u32 val = readl(tp->adapter->regs + A_TP_GLOBAL_CONFIG); tp 148 drivers/net/ethernet/chelsio/cxgb/tp.c writel(val, tp->adapter->regs + A_TP_GLOBAL_CONFIG); tp 151 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable) tp 153 drivers/net/ethernet/chelsio/cxgb/tp.c set_csum_offload(tp, F_IP_CSUM, enable); tp 156 drivers/net/ethernet/chelsio/cxgb/tp.c void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable) tp 158 drivers/net/ethernet/chelsio/cxgb/tp.c set_csum_offload(tp, F_TCP_CSUM, enable); tp 165 drivers/net/ethernet/chelsio/cxgb/tp.c int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk) tp 167 drivers/net/ethernet/chelsio/cxgb/tp.c adapter_t *adapter = tp->adapter; tp 61 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_destroy(struct petp *tp); tp 63 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_intr_disable(struct petp *tp); tp 64 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_intr_enable(struct petp *tp); tp 65 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_intr_clear(struct petp *tp); tp 66 drivers/net/ethernet/chelsio/cxgb/tp.h int t1_tp_intr_handler(struct petp *tp); tp 69 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_set_tcp_checksum_offload(struct petp *tp, int enable); tp 70 drivers/net/ethernet/chelsio/cxgb/tp.h void t1_tp_set_ip_checksum_offload(struct petp *tp, int enable); tp 71 drivers/net/ethernet/chelsio/cxgb/tp.h int t1_tp_set_coalescing_size(struct petp *tp, unsigned int size); tp 72 drivers/net/ethernet/chelsio/cxgb/tp.h int t1_tp_reset(struct petp *tp, struct tp_params *p, unsigned int tp_clk); tp 384 drivers/net/ethernet/chelsio/cxgb3/common.h struct tp_params tp; tp 730 drivers/net/ethernet/chelsio/cxgb3/common.h const struct trace_params *tp, int filter_index, tp 2394 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct tp_params *p = &adapter->params.tp; tp 2410 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c struct tp_params *p = &adapter->params.tp; tp 2503 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c const struct trace_params *tp; tp 2514 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c tp = (const struct trace_params *)&t.sip; tp 2516 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_config_trace_filter(adapter, tp, 0, tp 2520 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c t3_config_trace_filter(adapter, tp, 1, tp 230 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c val = min(adapter->params.tp.tx_pg_size, tp 248 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c val = min(adapter->params.tp.rx_pg_size, tp 382 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c struct tp_params *tp = &adapter->params.tp; tp 451 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c rx_page_info->page_size = tp->rx_pg_size; tp 452 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c rx_page_info->num = tp->rx_num_pgs; tp 2996 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c const struct trace_params *tp, int filter_index, tp 3001 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c key[0] = tp->sport | (tp->sip << 16); tp 3002 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c key[1] = (tp->sip >> 16) | (tp->dport << 16); tp 3003 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c key[2] = tp->dip; tp 3004 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c key[3] = tp->proto | (tp->vlan << 8) | (tp->intf << 20); tp 3006 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mask[0] = tp->sport_mask | (tp->sip_mask << 16); tp 3007 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mask[1] = (tp->sip_mask >> 16) | (tp->dport_mask << 16); tp 3008 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mask[2] = tp->dip_mask; tp 3009 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c mask[3] = tp->proto_mask | (tp->vlan_mask << 8) | (tp->intf_mask << 20); tp 3384 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c partition_mem(adapter, &adapter->params.tp); tp 3399 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c if (tp_init(adapter, &adapter->params.tp)) tp 3407 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c ulp_config(adapter, &adapter->params.tp); tp 3690 drivers/net/ethernet/chelsio/cxgb3/t3_hw.c struct tp_params *p = &adapter->params.tp; tp 365 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h struct tp_params tp; tp 1496 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap); tp 1853 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp, tp 1855 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp, tp 679 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->params.tp.la_mask = val << 16; tp 681 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->params.tp.la_mask); tp 1328 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct trace_params tp; tp 1332 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c t4_get_trace_filter(adap, &tp, trcidx, &enabled); tp 1338 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (tp.skip_ofst * 8 >= TRACE_LEN) { tp 1342 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (tp.port < 8) { tp 1343 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = adap->chan_map[tp.port & 3]; tp 1350 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c adap->port[i]->name, tp.port < 4 ? "Rx" : "Tx"); tp 1353 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.port - 8); tp 1354 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "snap length: %u, min length: %u\n", tp.snap_len, tp 1355 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.min_len); tp 1357 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.invert ? "do not " : ""); tp 1359 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (tp.skip_ofst) { tp 1361 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < tp.skip_ofst * 2; i += 2) tp 1362 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "%08x%08x", tp.data[i], tp.data[i + 1]); tp 1364 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = 0; i < tp.skip_ofst * 2; i += 2) tp 1365 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "%08x%08x", tp.mask[i], tp.mask[i + 1]); tp 1370 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = tp.skip_ofst * 2; i < TRACE_LEN / 4; i += 2) tp 1371 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "%08x%08x", tp.data[i], tp.data[i + 1]); tp 1373 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c for (i = tp.skip_ofst * 2; i < TRACE_LEN / 4; i += 2) tp 1374 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "%08x%08x", tp.mask[i], tp.mask[i + 1]); tp 1375 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c seq_printf(seq, "@%u\n", (tp.skip_ofst + tp.skip_len) * 8); tp 1415 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c struct trace_params tp; tp 1452 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c memset(&tp, 0, sizeof(tp)); tp 1453 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.port = TRC_PORT_NONE; tp 1499 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.snap_len = j; tp 1507 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.min_len = j; tp 1511 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.invert = !tp.invert; tp 1514 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!strncmp(word, "loopback", 8) && tp.port == TRC_PORT_NONE) { tp 1517 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.port = word[8] - '0' + 8; tp 1520 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!strncmp(word, "tx", 2) && tp.port == TRC_PORT_NONE) { tp 1523 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.port = word[2] - '0' + 4; tp 1524 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->chan_map[tp.port & 3] >= MAX_NPORTS) tp 1528 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (!strncmp(word, "rx", 2) && tp.port == TRC_PORT_NONE) { tp 1531 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.port = word[2] - '0'; tp 1532 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (adap->chan_map[tp.port] >= MAX_NPORTS) tp 1541 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (tp.skip_len) /* too many splits */ tp 1543 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.skip_ofst = i / 16; tp 1546 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c data = &tp.data[i / 8]; tp 1547 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c mask = &tp.mask[i / 8]; tp 1584 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (j < tp.skip_ofst) /* overlaps earlier pattern */ tp 1586 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (j - tp.skip_ofst > 31) /* skip too big */ tp 1588 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c tp.skip_len = j - tp.skip_ofst; tp 1597 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c if (tp.port == TRC_PORT_NONE) tp 1601 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c i = t4_set_trace_filter(adap, &tp, trcidx, enable); tp 251 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c iconf = adapter->params.tp.ingress_config; tp 252 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c fconf = fs->hash ? adapter->params.tp.filter_mask : tp 253 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c adapter->params.tp.vlan_pri_map; tp 875 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tp_params *tp = &adap->params.tp; tp 876 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c u64 hash_filter_mask = tp->hash_filter_mask; tp 911 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->fcoe_shift >= 0) tp 912 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.fcoe << tp->fcoe_shift; tp 914 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->port_shift >= 0) tp 915 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.iport << tp->port_shift; tp 917 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->vnic_shift >= 0) { tp 918 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if ((adap->params.tp.ingress_config & VNIC_F)) tp 919 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.pfvf_vld << tp->vnic_shift; tp 922 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c tp->vnic_shift; tp 925 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->vlan_shift >= 0) tp 926 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.ivlan << tp->vlan_shift; tp 928 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->tos_shift >= 0) tp 929 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.tos << tp->tos_shift; tp 931 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->protocol_shift >= 0) tp 932 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.proto << tp->protocol_shift; tp 934 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->ethertype_shift >= 0) tp 935 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.ethtype << tp->ethertype_shift; tp 937 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->macmatch_shift >= 0) tp 938 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.macidx << tp->macmatch_shift; tp 940 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->matchtype_shift >= 0) tp 941 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.matchtype << tp->matchtype_shift; tp 943 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->frag_shift >= 0) tp 944 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple_mask |= (u64)fs->mask.frag << tp->frag_shift; tp 956 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c struct tp_params *tp = &adap->params.tp; tp 962 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->vlan_shift >= 0 && fs->mask.ivlan) tp 963 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift; tp 965 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->port_shift >= 0 && fs->mask.iport) tp 966 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)fs->val.iport << tp->port_shift; tp 968 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->protocol_shift >= 0) { tp 970 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)IPPROTO_TCP << tp->protocol_shift; tp 972 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)fs->val.proto << tp->protocol_shift; tp 975 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->tos_shift >= 0 && fs->mask.tos) tp 976 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.tos) << tp->tos_shift; tp 978 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->vnic_shift >= 0) { tp 979 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if ((adap->params.tp.ingress_config & USE_ENC_IDX_F) && tp 982 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c (fs->val.ovlan)) << tp->vnic_shift; tp 983 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c else if ((adap->params.tp.ingress_config & VNIC_F) && tp 987 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c (fs->val.vf)) << tp->vnic_shift; tp 990 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c (fs->val.ovlan)) << tp->vnic_shift; tp 993 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->macmatch_shift >= 0 && fs->mask.macidx) tp 994 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.macidx) << tp->macmatch_shift; tp 996 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->ethertype_shift >= 0 && fs->mask.ethtype) tp 997 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.ethtype) << tp->ethertype_shift; tp 999 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->matchtype_shift >= 0 && fs->mask.matchtype) tp 1000 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.matchtype) << tp->matchtype_shift; tp 1002 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->frag_shift >= 0 && fs->mask.frag) tp 1003 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.frag) << tp->frag_shift; tp 1005 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c if (tp->fcoe_shift >= 0 && fs->mask.fcoe) tp 1006 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ntuple |= (u64)(fs->val.fcoe) << tp->fcoe_shift; tp 1157 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c iconf = adapter->params.tp.ingress_config; tp 1399 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c iconf = adapter->params.tp.ingress_config; tp 2515 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.tp.vlan_pri_map & PORT_F) { tp 2521 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c if (adap->params.tp.vlan_pri_map & PROTOCOL_F) { tp 3758 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c adap->params.tp.tx_modq_map = 0xE4; tp 3760 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c TX_MOD_QUEUE_REQ_MAP_V(adap->params.tp.tx_modq_map)); tp 676 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c lld->filt_mode = adap->params.tp.vlan_pri_map; tp 482 drivers/net/ethernet/chelsio/cxgb4/l2t.c struct tp_params *tp = &adap->params.tp; tp 488 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE) tp 489 drivers/net/ethernet/chelsio/cxgb4/l2t.c ntuple |= (u64)(FT_VLAN_VLD_F | l2t->vlan) << tp->vlan_shift; tp 491 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (tp->port_shift >= 0) tp 492 drivers/net/ethernet/chelsio/cxgb4/l2t.c ntuple |= (u64)l2t->lport << tp->port_shift; tp 494 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (tp->protocol_shift >= 0) tp 495 drivers/net/ethernet/chelsio/cxgb4/l2t.c ntuple |= (u64)IPPROTO_TCP << tp->protocol_shift; tp 497 drivers/net/ethernet/chelsio/cxgb4/l2t.c if (tp->vnic_shift >= 0 && (tp->ingress_config & VNIC_F)) { tp 502 drivers/net/ethernet/chelsio/cxgb4/l2t.c FT_VNID_ID_VLD_V(pi->vivld)) << tp->vnic_shift; tp 373 drivers/net/ethernet/chelsio/cxgb4/sched.c struct ch_sched_params tp; tp 375 drivers/net/ethernet/chelsio/cxgb4/sched.c memcpy(&tp, p, sizeof(tp)); tp 377 drivers/net/ethernet/chelsio/cxgb4/sched.c tp.u.params.class = SCHED_CLS_NONE; tp 388 drivers/net/ethernet/chelsio/cxgb4/sched.c if ((info.type == tp.type) && tp 389 drivers/net/ethernet/chelsio/cxgb4/sched.c (!memcmp(&info.u.params, &tp.u.params, tp 2955 drivers/net/ethernet/chelsio/cxgb4/sge.c if (q->adap->params.tp.rx_pkt_encap) { tp 3036 drivers/net/ethernet/chelsio/cxgb4/sge.c if (q->adap->params.tp.rx_pkt_encap) tp 5952 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c int t4_set_trace_filter(struct adapter *adap, const struct trace_params *tp, tp 5969 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (tp->snap_len > ((10 * 1024 / 4) - (2 * 8))) tp 5976 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (tp->snap_len > 9600 || idx) tp 5980 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if (tp->port > (is_t4(adap->params.chip) ? 11 : 19) || tp->invert > 1 || tp 5981 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->skip_len > TFLENGTH_M || tp->skip_ofst > TFOFFSET_M || tp 5982 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->min_len > TFMINPKTSIZE_M) tp 5993 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, data_reg, tp->data[i]); tp 5994 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_write_reg(adap, mask_reg, ~tp->mask[i]); tp 5997 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c TFCAPTUREMAX_V(tp->snap_len) | tp 5998 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c TFMINPKTSIZE_V(tp->min_len)); tp 6000 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c TFOFFSET_V(tp->skip_ofst) | TFLENGTH_V(tp->skip_len) | tp 6002 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c TFPORT_V(tp->port) | TFEN_F | TFINVERTMATCH_V(tp->invert) : tp 6003 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c T5_TFPORT_V(tp->port) | T5_TFEN_F | tp 6004 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c T5_TFINVERTMATCH_V(tp->invert))); tp 6018 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c void t4_get_trace_filter(struct adapter *adap, struct trace_params *tp, int idx, tp 6030 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->port = TFPORT_G(ctla); tp 6031 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->invert = !!(ctla & TFINVERTMATCH_F); tp 6034 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->port = T5_TFPORT_G(ctla); tp 6035 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->invert = !!(ctla & T5_TFINVERTMATCH_F); tp 6037 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->snap_len = TFCAPTUREMAX_G(ctlb); tp 6038 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->min_len = TFMINPKTSIZE_G(ctlb); tp 6039 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->skip_ofst = TFOFFSET_G(ctla); tp 6040 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->skip_len = TFLENGTH_G(ctla); tp 6047 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->mask[i] = ~t4_read_reg(adap, mask_reg); tp 6048 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c tp->data[i] = t4_read_reg(adap, data_reg) & tp->mask[i]; tp 9409 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tre = TIMERRESOLUTION_G(v); tp 9410 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.dack_re = DELAYEDACKRESOLUTION_G(v); tp 9414 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tx_modq[chan] = chan; tp 9431 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vlan_pri_map = tp 9433 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.filter_mask = tp 9444 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_read(adap, &adap->params.tp.vlan_pri_map, 1, tp 9454 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.filter_mask = adap->params.tp.vlan_pri_map; tp 9457 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c t4_tp_pio_read(adap, &adap->params.tp.ingress_config, 1, tp 9465 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.rx_pkt_encap = (v & CRXPKTENC_F) ? 1 : 0; tp 9472 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.fcoe_shift = t4_filter_field_shift(adap, FCOE_F); tp 9473 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.port_shift = t4_filter_field_shift(adap, PORT_F); tp 9474 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vnic_shift = t4_filter_field_shift(adap, VNIC_ID_F); tp 9475 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vlan_shift = t4_filter_field_shift(adap, VLAN_F); tp 9476 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.tos_shift = t4_filter_field_shift(adap, TOS_F); tp 9477 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.protocol_shift = t4_filter_field_shift(adap, tp 9479 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.ethertype_shift = t4_filter_field_shift(adap, tp 9481 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.macmatch_shift = t4_filter_field_shift(adap, tp 9483 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.matchtype_shift = t4_filter_field_shift(adap, tp 9485 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.frag_shift = t4_filter_field_shift(adap, tp 9491 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c if ((adap->params.tp.ingress_config & VNIC_F) == 0) tp 9492 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.vnic_shift = -1; tp 9495 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.hash_filter_mask = v; tp 9497 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.hash_filter_mask |= ((u64)v << 32); tp 9512 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c unsigned int filter_mode = adap->params.tp.vlan_pri_map; tp 9976 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c adap->params.tp.la_mask | (cfg ^ DBGLAENABLE_F)); tp 9988 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c val |= adap->params.tp.la_mask; tp 10002 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c cfg | adap->params.tp.la_mask); tp 30 drivers/net/ethernet/dec/tulip/21142.c struct tulip_private *tp = tp 32 drivers/net/ethernet/dec/tulip/21142.c struct net_device *dev = tp->dev; tp 33 drivers/net/ethernet/dec/tulip/21142.c void __iomem *ioaddr = tp->base_addr; tp 53 drivers/net/ethernet/dec/tulip/21142.c } else if (tp->nwayset) { tp 59 drivers/net/ethernet/dec/tulip/21142.c } else if (tp->medialock) { tp 95 drivers/net/ethernet/dec/tulip/21142.c if (new_csr6 != (tp->csr6 & ~0x00D5)) { tp 96 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 &= 0x00D5; tp 97 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 |= new_csr6; tp 99 drivers/net/ethernet/dec/tulip/21142.c tulip_restart_rxtx(tp); tp 107 drivers/net/ethernet/dec/tulip/21142.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 113 drivers/net/ethernet/dec/tulip/21142.c struct tulip_private *tp = netdev_priv(dev); tp 114 drivers/net/ethernet/dec/tulip/21142.c void __iomem *ioaddr = tp->base_addr; tp 115 drivers/net/ethernet/dec/tulip/21142.c int csr14 = ((tp->sym_advertise & 0x0780) << 9) | tp 116 drivers/net/ethernet/dec/tulip/21142.c ((tp->sym_advertise & 0x0020) << 1) | 0xffbf; tp 119 drivers/net/ethernet/dec/tulip/21142.c tp->nway = tp->mediasense = 1; tp 120 drivers/net/ethernet/dec/tulip/21142.c tp->nwayset = tp->lpar = 0; tp 127 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 = 0x82420000 | (tp->sym_advertise & 0x0040 ? FullDuplex : 0); tp 128 drivers/net/ethernet/dec/tulip/21142.c iowrite32(tp->csr6, ioaddr + CSR6); tp 129 drivers/net/ethernet/dec/tulip/21142.c if (tp->mtable && tp->mtable->csr15dir) { tp 130 drivers/net/ethernet/dec/tulip/21142.c iowrite32(tp->mtable->csr15dir, ioaddr + CSR15); tp 131 drivers/net/ethernet/dec/tulip/21142.c iowrite32(tp->mtable->csr15val, ioaddr + CSR15); tp 141 drivers/net/ethernet/dec/tulip/21142.c struct tulip_private *tp = netdev_priv(dev); tp 142 drivers/net/ethernet/dec/tulip/21142.c void __iomem *ioaddr = tp->base_addr; tp 155 drivers/net/ethernet/dec/tulip/21142.c if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { tp 157 drivers/net/ethernet/dec/tulip/21142.c int negotiated = tp->sym_advertise & (csr12 >> 16); tp 158 drivers/net/ethernet/dec/tulip/21142.c tp->lpar = csr12 >> 16; tp 159 drivers/net/ethernet/dec/tulip/21142.c tp->nwayset = 1; tp 167 drivers/net/ethernet/dec/tulip/21142.c tp->nwayset = 0; tp 168 drivers/net/ethernet/dec/tulip/21142.c if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) tp 171 drivers/net/ethernet/dec/tulip/21142.c tp->full_duplex = (tulip_media_cap[dev->if_port] & MediaAlwaysFD) ? 1:0; tp 174 drivers/net/ethernet/dec/tulip/21142.c if (tp->nwayset) tp 178 drivers/net/ethernet/dec/tulip/21142.c tp->sym_advertise, tp->lpar, tp 186 drivers/net/ethernet/dec/tulip/21142.c if (tp->mtable) { tp 188 drivers/net/ethernet/dec/tulip/21142.c for (i = 0; i < tp->mtable->leafcount; i++) tp 189 drivers/net/ethernet/dec/tulip/21142.c if (tp->mtable->mleaf[i].media == dev->if_port) { tp 190 drivers/net/ethernet/dec/tulip/21142.c int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65))); tp 191 drivers/net/ethernet/dec/tulip/21142.c tp->cur_index = i; tp 198 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 = (dev->if_port & 1 ? 0x838E0000 : 0x82420000) | (tp->csr6 & 0x20ff); tp 199 drivers/net/ethernet/dec/tulip/21142.c if (tp->full_duplex) tp 200 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 |= 0x0200; tp 204 drivers/net/ethernet/dec/tulip/21142.c iowrite32(tp->csr6 | RxOn, ioaddr + CSR6); tp 209 drivers/net/ethernet/dec/tulip/21142.c tulip_start_rxtx(tp); tp 212 drivers/net/ethernet/dec/tulip/21142.c tp->csr6, ioread32(ioaddr + CSR6), tp 214 drivers/net/ethernet/dec/tulip/21142.c } else if ((tp->nwayset && (csr5 & 0x08000000) && tp 217 drivers/net/ethernet/dec/tulip/21142.c (tp->nway && (csr5 & (TPLnkFail)))) { tp 219 drivers/net/ethernet/dec/tulip/21142.c del_timer_sync(&tp->timer); tp 221 drivers/net/ethernet/dec/tulip/21142.c tp->timer.expires = RUN_AT(3*HZ); tp 222 drivers/net/ethernet/dec/tulip/21142.c add_timer(&tp->timer); tp 228 drivers/net/ethernet/dec/tulip/21142.c if ((csr12 & 2) && ! tp->medialock) { tp 229 drivers/net/ethernet/dec/tulip/21142.c del_timer_sync(&tp->timer); tp 231 drivers/net/ethernet/dec/tulip/21142.c tp->timer.expires = RUN_AT(3*HZ); tp 232 drivers/net/ethernet/dec/tulip/21142.c add_timer(&tp->timer); tp 242 drivers/net/ethernet/dec/tulip/21142.c } else if (tp->nwayset) { tp 245 drivers/net/ethernet/dec/tulip/21142.c medianame[dev->if_port], tp->csr6); tp 250 drivers/net/ethernet/dec/tulip/21142.c tp->csr6 = 0x838E0000 | (tp->csr6 & 0x20ff); tp 253 drivers/net/ethernet/dec/tulip/21142.c tulip_restart_rxtx(tp); tp 104 drivers/net/ethernet/dec/tulip/eeprom.c static void tulip_build_fake_mediatable(struct tulip_private *tp) tp 107 drivers/net/ethernet/dec/tulip/eeprom.c if (tp->flags & NEEDS_FAKE_MEDIA_TABLE) { tp 120 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable = kmalloc(sizeof(struct mediatable) + tp 123 drivers/net/ethernet/dec/tulip/eeprom.c if (tp->mtable == NULL) tp 126 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->defaultmedia = 0x800; tp 127 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->leafcount = 1; tp 128 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->csr12dir = 0x3f; /* inputs on bit7 for hsc-pci, bit6 for pci-fx */ tp 129 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->has_nonmii = 0; tp 130 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->has_reset = 0; tp 131 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->has_mii = 1; tp 132 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->csr15dir = tp->mtable->csr15val = 0; tp 133 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->mleaf[0].type = 1; tp 134 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->mleaf[0].media = 11; tp 135 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable->mleaf[0].leafdata = &leafdata[0]; tp 136 drivers/net/ethernet/dec/tulip/eeprom.c tp->flags |= HAS_PHY_IRQ; tp 137 drivers/net/ethernet/dec/tulip/eeprom.c tp->csr12_shadow = -1; tp 154 drivers/net/ethernet/dec/tulip/eeprom.c struct tulip_private *tp = netdev_priv(dev); tp 155 drivers/net/ethernet/dec/tulip/eeprom.c unsigned char *ee_data = tp->eeprom; tp 158 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable = NULL; tp 170 drivers/net/ethernet/dec/tulip/eeprom.c tp->mtable = last_mediatable; tp 206 drivers/net/ethernet/dec/tulip/eeprom.c tulip_build_fake_mediatable(tp); tp 215 drivers/net/ethernet/dec/tulip/eeprom.c if (tp->flags & CSR12_IN_SROM) tp 230 drivers/net/ethernet/dec/tulip/eeprom.c last_mediatable = tp->mtable = mtable; tp 256 drivers/net/ethernet/dec/tulip/eeprom.c } else if (tp->chip_id == DM910X && p[1] == 0x80) { tp 276 drivers/net/ethernet/dec/tulip/eeprom.c if (tp->chip_id == DM910X && leaf->media == 1) tp 316 drivers/net/ethernet/dec/tulip/eeprom.c tp->sym_advertise = new_advertise; tp 343 drivers/net/ethernet/dec/tulip/eeprom.c struct tulip_private *tp = netdev_priv(dev); tp 344 drivers/net/ethernet/dec/tulip/eeprom.c void __iomem *ee_addr = tp->base_addr + CSR9; tp 378 drivers/net/ethernet/dec/tulip/eeprom.c return (tp->flags & HAS_SWAPPED_SEEPROM) ? swab16(retval) : retval; tp 61 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = netdev_priv(dev); tp 66 drivers/net/ethernet/dec/tulip/interrupt.c for (; tp->cur_rx - tp->dirty_rx > 0; tp->dirty_rx++) { tp 67 drivers/net/ethernet/dec/tulip/interrupt.c entry = tp->dirty_rx % RX_RING_SIZE; tp 68 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[entry].skb == NULL) { tp 72 drivers/net/ethernet/dec/tulip/interrupt.c skb = tp->rx_buffers[entry].skb = tp 77 drivers/net/ethernet/dec/tulip/interrupt.c mapping = pci_map_single(tp->pdev, skb->data, PKT_BUF_SZ, tp 79 drivers/net/ethernet/dec/tulip/interrupt.c if (dma_mapping_error(&tp->pdev->dev, mapping)) { tp 81 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].skb = NULL; tp 85 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping = mapping; tp 87 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_ring[entry].buffer1 = cpu_to_le32(mapping); tp 90 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_ring[entry].status = cpu_to_le32(DescOwned); tp 92 drivers/net/ethernet/dec/tulip/interrupt.c if(tp->chip_id == LC82C168) { tp 93 drivers/net/ethernet/dec/tulip/interrupt.c if(((ioread32(tp->base_addr + CSR5)>>17)&0x07) == 4) { tp 97 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(0x01, tp->base_addr + CSR2); tp 107 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = from_timer(tp, t, oom_timer); tp 109 drivers/net/ethernet/dec/tulip/interrupt.c napi_schedule(&tp->napi); tp 114 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = container_of(napi, struct tulip_private, napi); tp 115 drivers/net/ethernet/dec/tulip/interrupt.c struct net_device *dev = tp->dev; tp 116 drivers/net/ethernet/dec/tulip/interrupt.c int entry = tp->cur_rx % RX_RING_SIZE; tp 132 drivers/net/ethernet/dec/tulip/interrupt.c entry, tp->rx_ring[entry].status); tp 135 drivers/net/ethernet/dec/tulip/interrupt.c if (ioread32(tp->base_addr + CSR5) == 0xffffffff) { tp 140 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32((RxIntr | RxNoBuf), tp->base_addr + CSR5); tp 144 drivers/net/ethernet/dec/tulip/interrupt.c while ( ! (tp->rx_ring[entry].status & cpu_to_le32(DescOwned))) { tp 145 drivers/net/ethernet/dec/tulip/interrupt.c s32 status = le32_to_cpu(tp->rx_ring[entry].status); tp 148 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->dirty_rx + RX_RING_SIZE == tp->cur_rx) tp 213 drivers/net/ethernet/dec/tulip/interrupt.c pci_dma_sync_single_for_cpu(tp->pdev, tp 214 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping, tp 217 drivers/net/ethernet/dec/tulip/interrupt.c skb_copy_to_linear_data(skb, tp->rx_buffers[entry].skb->data, tp 222 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].skb->data, tp 225 drivers/net/ethernet/dec/tulip/interrupt.c pci_dma_sync_single_for_device(tp->pdev, tp 226 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping, tp 229 drivers/net/ethernet/dec/tulip/interrupt.c char *temp = skb_put(skb = tp->rx_buffers[entry].skb, tp 233 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[entry].mapping != tp 234 drivers/net/ethernet/dec/tulip/interrupt.c le32_to_cpu(tp->rx_ring[entry].buffer1)) { tp 237 drivers/net/ethernet/dec/tulip/interrupt.c le32_to_cpu(tp->rx_ring[entry].buffer1), tp 238 drivers/net/ethernet/dec/tulip/interrupt.c (unsigned long long)tp->rx_buffers[entry].mapping, tp 243 drivers/net/ethernet/dec/tulip/interrupt.c pci_unmap_single(tp->pdev, tp->rx_buffers[entry].mapping, tp 246 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].skb = NULL; tp 247 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping = 0; tp 260 drivers/net/ethernet/dec/tulip/interrupt.c entry = (++tp->cur_rx) % RX_RING_SIZE; tp 261 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/4) tp 276 drivers/net/ethernet/dec/tulip/interrupt.c } while ((ioread32(tp->base_addr + CSR5) & RxIntr)); tp 297 drivers/net/ethernet/dec/tulip/interrupt.c if( tp->flags & HAS_INTR_MITIGATION) { tp 299 drivers/net/ethernet/dec/tulip/interrupt.c if( ! tp->mit_on ) { tp 300 drivers/net/ethernet/dec/tulip/interrupt.c tp->mit_on = 1; tp 301 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(mit_table[MIT_TABLE], tp->base_addr + CSR11); tp 305 drivers/net/ethernet/dec/tulip/interrupt.c if( tp->mit_on ) { tp 306 drivers/net/ethernet/dec/tulip/interrupt.c tp->mit_on = 0; tp 307 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(0, tp->base_addr + CSR11); tp 317 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) tp 323 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs, tp->base_addr+CSR7); tp 339 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->cur_rx - tp->dirty_rx > RX_RING_SIZE/2 || tp 340 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) tp 343 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[tp->dirty_rx % RX_RING_SIZE].skb == NULL) tp 351 drivers/net/ethernet/dec/tulip/interrupt.c mod_timer(&tp->oom_timer, jiffies+1); tp 367 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = netdev_priv(dev); tp 368 drivers/net/ethernet/dec/tulip/interrupt.c int entry = tp->cur_rx % RX_RING_SIZE; tp 369 drivers/net/ethernet/dec/tulip/interrupt.c int rx_work_limit = tp->dirty_rx + RX_RING_SIZE - tp->cur_rx; tp 374 drivers/net/ethernet/dec/tulip/interrupt.c entry, tp->rx_ring[entry].status); tp 376 drivers/net/ethernet/dec/tulip/interrupt.c while ( ! (tp->rx_ring[entry].status & cpu_to_le32(DescOwned))) { tp 377 drivers/net/ethernet/dec/tulip/interrupt.c s32 status = le32_to_cpu(tp->rx_ring[entry].status); tp 439 drivers/net/ethernet/dec/tulip/interrupt.c pci_dma_sync_single_for_cpu(tp->pdev, tp 440 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping, tp 443 drivers/net/ethernet/dec/tulip/interrupt.c skb_copy_to_linear_data(skb, tp->rx_buffers[entry].skb->data, tp 448 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].skb->data, tp 451 drivers/net/ethernet/dec/tulip/interrupt.c pci_dma_sync_single_for_device(tp->pdev, tp 452 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping, tp 455 drivers/net/ethernet/dec/tulip/interrupt.c char *temp = skb_put(skb = tp->rx_buffers[entry].skb, tp 459 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[entry].mapping != tp 460 drivers/net/ethernet/dec/tulip/interrupt.c le32_to_cpu(tp->rx_ring[entry].buffer1)) { tp 463 drivers/net/ethernet/dec/tulip/interrupt.c le32_to_cpu(tp->rx_ring[entry].buffer1), tp 464 drivers/net/ethernet/dec/tulip/interrupt.c (long long)tp->rx_buffers[entry].mapping, tp 469 drivers/net/ethernet/dec/tulip/interrupt.c pci_unmap_single(tp->pdev, tp->rx_buffers[entry].mapping, tp 472 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].skb = NULL; tp 473 drivers/net/ethernet/dec/tulip/interrupt.c tp->rx_buffers[entry].mapping = 0; tp 483 drivers/net/ethernet/dec/tulip/interrupt.c entry = (++tp->cur_rx) % RX_RING_SIZE; tp 492 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = netdev_priv(dev); tp 493 drivers/net/ethernet/dec/tulip/interrupt.c int csr12 = ioread32(tp->base_addr + CSR12) & 0xff; tp 495 drivers/net/ethernet/dec/tulip/interrupt.c if (csr12 != tp->csr12_shadow) { tp 497 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(csr12 | 0x02, tp->base_addr + CSR12); tp 498 drivers/net/ethernet/dec/tulip/interrupt.c tp->csr12_shadow = csr12; tp 500 drivers/net/ethernet/dec/tulip/interrupt.c spin_lock(&tp->lock); tp 502 drivers/net/ethernet/dec/tulip/interrupt.c spin_unlock(&tp->lock); tp 504 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(csr12 & ~0x02, tp->base_addr + CSR12); tp 518 drivers/net/ethernet/dec/tulip/interrupt.c struct tulip_private *tp = netdev_priv(dev); tp 519 drivers/net/ethernet/dec/tulip/interrupt.c void __iomem *ioaddr = tp->base_addr; tp 539 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->flags & HAS_PHY_IRQ) tp 545 drivers/net/ethernet/dec/tulip/interrupt.c tp->nir++; tp 554 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs&~RxPollInt, ioaddr + CSR7); tp 555 drivers/net/ethernet/dec/tulip/interrupt.c napi_schedule(&tp->napi); tp 586 drivers/net/ethernet/dec/tulip/interrupt.c spin_lock(&tp->lock); tp 588 drivers/net/ethernet/dec/tulip/interrupt.c for (dirty_tx = tp->dirty_tx; tp->cur_tx - dirty_tx > 0; tp 591 drivers/net/ethernet/dec/tulip/interrupt.c int status = le32_to_cpu(tp->tx_ring[entry].status); tp 597 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->tx_buffers[entry].skb == NULL) { tp 599 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->tx_buffers[entry].mapping) tp 600 drivers/net/ethernet/dec/tulip/interrupt.c pci_unmap_single(tp->pdev, tp 601 drivers/net/ethernet/dec/tulip/interrupt.c tp->tx_buffers[entry].mapping, tp 602 drivers/net/ethernet/dec/tulip/interrupt.c sizeof(tp->setup_frame), tp 623 drivers/net/ethernet/dec/tulip/interrupt.c if ((status & 0x0080) && tp->full_duplex == 0) tp 627 drivers/net/ethernet/dec/tulip/interrupt.c tp->tx_buffers[entry].skb->len; tp 632 drivers/net/ethernet/dec/tulip/interrupt.c pci_unmap_single(tp->pdev, tp->tx_buffers[entry].mapping, tp 633 drivers/net/ethernet/dec/tulip/interrupt.c tp->tx_buffers[entry].skb->len, tp 637 drivers/net/ethernet/dec/tulip/interrupt.c dev_kfree_skb_irq(tp->tx_buffers[entry].skb); tp 638 drivers/net/ethernet/dec/tulip/interrupt.c tp->tx_buffers[entry].skb = NULL; tp 639 drivers/net/ethernet/dec/tulip/interrupt.c tp->tx_buffers[entry].mapping = 0; tp 644 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->cur_tx - dirty_tx > TX_RING_SIZE) { tp 647 drivers/net/ethernet/dec/tulip/interrupt.c dirty_tx, tp->cur_tx); tp 652 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->cur_tx - dirty_tx < TX_RING_SIZE - 2) tp 655 drivers/net/ethernet/dec/tulip/interrupt.c tp->dirty_tx = dirty_tx; tp 661 drivers/net/ethernet/dec/tulip/interrupt.c tp->csr6); tp 662 drivers/net/ethernet/dec/tulip/interrupt.c tulip_restart_rxtx(tp); tp 664 drivers/net/ethernet/dec/tulip/interrupt.c spin_unlock(&tp->lock); tp 674 drivers/net/ethernet/dec/tulip/interrupt.c if ((tp->csr6 & 0xC000) != 0xC000) tp 675 drivers/net/ethernet/dec/tulip/interrupt.c tp->csr6 += 0x4000; /* Bump up the Tx threshold */ tp 677 drivers/net/ethernet/dec/tulip/interrupt.c tp->csr6 |= 0x00200000; /* Store-n-forward. */ tp 679 drivers/net/ethernet/dec/tulip/interrupt.c tulip_restart_rxtx(tp); tp 683 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->flags & COMET_MAC_ADDR) { tp 684 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tp->mc_filter[0], ioaddr + 0xAC); tp 685 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tp->mc_filter[1], ioaddr + 0xB0); tp 691 drivers/net/ethernet/dec/tulip/interrupt.c tulip_start_rxtx(tp); tp 698 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->link_change) tp 699 drivers/net/ethernet/dec/tulip/interrupt.c (tp->link_change)(dev, csr5); tp 715 drivers/net/ethernet/dec/tulip/interrupt.c tp->nir, error); tp 727 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); tp 728 drivers/net/ethernet/dec/tulip/interrupt.c tp->ttimer = 0; tp 734 drivers/net/ethernet/dec/tulip/interrupt.c csr5, tp->nir, tx, rx, oi); tp 738 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->flags & HAS_INTR_MITIGATION) { tp 742 drivers/net/ethernet/dec/tulip/interrupt.c } else if (tp->chip_id == LC82C168) { tp 745 drivers/net/ethernet/dec/tulip/interrupt.c mod_timer(&tp->timer, RUN_AT(HZ/50)); tp 780 drivers/net/ethernet/dec/tulip/interrupt.c entry = tp->dirty_rx % RX_RING_SIZE; tp 781 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->rx_buffers[entry].skb == NULL) { tp 785 drivers/net/ethernet/dec/tulip/interrupt.c tp->nir, tp->cur_rx, tp->ttimer, rx); tp 786 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->chip_id == LC82C168) { tp 788 drivers/net/ethernet/dec/tulip/interrupt.c mod_timer(&tp->timer, RUN_AT(HZ/50)); tp 790 drivers/net/ethernet/dec/tulip/interrupt.c if (tp->ttimer == 0 || (ioread32(ioaddr + CSR11) & 0xffff) == 0) { tp 794 drivers/net/ethernet/dec/tulip/interrupt.c tp->nir); tp 795 drivers/net/ethernet/dec/tulip/interrupt.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs | TimerInt, tp 799 drivers/net/ethernet/dec/tulip/interrupt.c tp->ttimer = 1; tp 49 drivers/net/ethernet/dec/tulip/media.c struct tulip_private *tp = netdev_priv(dev); tp 53 drivers/net/ethernet/dec/tulip/media.c void __iomem *ioaddr = tp->base_addr; tp 60 drivers/net/ethernet/dec/tulip/media.c if (tp->chip_id == COMET && phy_id == 30) { tp 66 drivers/net/ethernet/dec/tulip/media.c spin_lock_irqsave(&tp->mii_lock, flags); tp 67 drivers/net/ethernet/dec/tulip/media.c if (tp->chip_id == LC82C168) { tp 76 drivers/net/ethernet/dec/tulip/media.c spin_unlock_irqrestore(&tp->mii_lock, flags); tp 105 drivers/net/ethernet/dec/tulip/media.c spin_unlock_irqrestore(&tp->mii_lock, flags); tp 111 drivers/net/ethernet/dec/tulip/media.c struct tulip_private *tp = netdev_priv(dev); tp 114 drivers/net/ethernet/dec/tulip/media.c void __iomem *ioaddr = tp->base_addr; tp 121 drivers/net/ethernet/dec/tulip/media.c if (tp->chip_id == COMET && phy_id == 30) { tp 127 drivers/net/ethernet/dec/tulip/media.c spin_lock_irqsave(&tp->mii_lock, flags); tp 128 drivers/net/ethernet/dec/tulip/media.c if (tp->chip_id == LC82C168) { tp 135 drivers/net/ethernet/dec/tulip/media.c spin_unlock_irqrestore(&tp->mii_lock, flags); tp 162 drivers/net/ethernet/dec/tulip/media.c spin_unlock_irqrestore(&tp->mii_lock, flags); tp 169 drivers/net/ethernet/dec/tulip/media.c struct tulip_private *tp = netdev_priv(dev); tp 170 drivers/net/ethernet/dec/tulip/media.c void __iomem *ioaddr = tp->base_addr; tp 171 drivers/net/ethernet/dec/tulip/media.c struct mediatable *mtable = tp->mtable; tp 176 drivers/net/ethernet/dec/tulip/media.c struct medialeaf *mleaf = &mtable->mleaf[tp->cur_index]; tp 197 drivers/net/ethernet/dec/tulip/media.c tp->full_duplex = 1; tp 309 drivers/net/ethernet/dec/tulip/media.c tp->advertising[phy_num] = tmp_info | 1; tp 311 drivers/net/ethernet/dec/tulip/media.c if (tp->mii_advertise == 0) tp 312 drivers/net/ethernet/dec/tulip/media.c tp->mii_advertise = tp->advertising[phy_num]; tp 315 drivers/net/ethernet/dec/tulip/media.c tp->mii_advertise, tp 316 drivers/net/ethernet/dec/tulip/media.c tp->phys[phy_num]); tp 317 drivers/net/ethernet/dec/tulip/media.c tulip_mdio_write(dev, tp->phys[phy_num], 4, tp->mii_advertise); tp 349 drivers/net/ethernet/dec/tulip/media.c } else if (tp->chip_id == LC82C168) { tp 350 drivers/net/ethernet/dec/tulip/media.c if (startup && ! tp->medialock) tp 351 drivers/net/ethernet/dec/tulip/media.c dev->if_port = tp->mii_cnt ? 11 : 0; tp 356 drivers/net/ethernet/dec/tulip/media.c if (tp->mii_cnt) { tp 377 drivers/net/ethernet/dec/tulip/media.c if (tp->default_port == 0) tp 378 drivers/net/ethernet/dec/tulip/media.c dev->if_port = tp->mii_cnt ? 11 : 3; tp 391 drivers/net/ethernet/dec/tulip/media.c tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0); tp 404 drivers/net/ethernet/dec/tulip/media.c struct tulip_private *tp = netdev_priv(dev); tp 407 drivers/net/ethernet/dec/tulip/media.c bmsr = tulip_mdio_read(dev, tp->phys[0], MII_BMSR); tp 408 drivers/net/ethernet/dec/tulip/media.c lpa = tulip_mdio_read(dev, tp->phys[0], MII_LPA); tp 415 drivers/net/ethernet/dec/tulip/media.c int new_bmsr = tulip_mdio_read(dev, tp->phys[0], MII_BMSR); tp 424 drivers/net/ethernet/dec/tulip/media.c negotiated = lpa & tp->advertising[0]; tp 425 drivers/net/ethernet/dec/tulip/media.c tp->full_duplex = mii_duplex(tp->full_duplex_lock, negotiated); tp 427 drivers/net/ethernet/dec/tulip/media.c new_csr6 = tp->csr6; tp 431 drivers/net/ethernet/dec/tulip/media.c if (tp->full_duplex) new_csr6 |= FullDuplex; tp 434 drivers/net/ethernet/dec/tulip/media.c if (new_csr6 != tp->csr6) { tp 435 drivers/net/ethernet/dec/tulip/media.c tp->csr6 = new_csr6; tp 436 drivers/net/ethernet/dec/tulip/media.c tulip_restart_rxtx(tp); tp 441 drivers/net/ethernet/dec/tulip/media.c tp->full_duplex ? "full" : "half", tp 442 drivers/net/ethernet/dec/tulip/media.c tp->phys[0], lpa); tp 451 drivers/net/ethernet/dec/tulip/media.c struct tulip_private *tp = netdev_priv(dev); tp 460 drivers/net/ethernet/dec/tulip/media.c for (phyn = 1; phyn <= 32 && phy_idx < ARRAY_SIZE(tp->phys); phyn++) { tp 484 drivers/net/ethernet/dec/tulip/media.c if (tp->mii_advertise) { tp 485 drivers/net/ethernet/dec/tulip/media.c tp->advertising[phy_idx] = tp 486 drivers/net/ethernet/dec/tulip/media.c to_advert = tp->mii_advertise; tp 487 drivers/net/ethernet/dec/tulip/media.c } else if (tp->advertising[phy_idx]) { tp 488 drivers/net/ethernet/dec/tulip/media.c to_advert = tp->advertising[phy_idx]; tp 490 drivers/net/ethernet/dec/tulip/media.c tp->advertising[phy_idx] = tp 491 drivers/net/ethernet/dec/tulip/media.c tp->mii_advertise = tp 495 drivers/net/ethernet/dec/tulip/media.c tp->phys[phy_idx++] = phy; tp 508 drivers/net/ethernet/dec/tulip/media.c if (tp->default_port == 0) { tp 527 drivers/net/ethernet/dec/tulip/media.c if (tp->full_duplex) tp 529 drivers/net/ethernet/dec/tulip/media.c if (tulip_media_cap[tp->default_port] & MediaIs100) tp 546 drivers/net/ethernet/dec/tulip/media.c tp->mii_cnt = phy_idx; tp 547 drivers/net/ethernet/dec/tulip/media.c if (tp->mtable && tp->mtable->has_mii && phy_idx == 0) { tp 550 drivers/net/ethernet/dec/tulip/media.c tp->phys[0] = 1; tp 21 drivers/net/ethernet/dec/tulip/pnic.c struct tulip_private *tp = netdev_priv(dev); tp 22 drivers/net/ethernet/dec/tulip/pnic.c void __iomem *ioaddr = tp->base_addr; tp 24 drivers/net/ethernet/dec/tulip/pnic.c u32 new_csr6 = tp->csr6 & ~0x40C40200; tp 31 drivers/net/ethernet/dec/tulip/pnic.c tp->nwayset = 1; tp 37 drivers/net/ethernet/dec/tulip/pnic.c tp->full_duplex = 1; tp 43 drivers/net/ethernet/dec/tulip/pnic.c if (tp->csr6 != new_csr6) { tp 44 drivers/net/ethernet/dec/tulip/pnic.c tp->csr6 = new_csr6; tp 46 drivers/net/ethernet/dec/tulip/pnic.c tulip_restart_rxtx(tp); tp 54 drivers/net/ethernet/dec/tulip/pnic.c struct tulip_private *tp = netdev_priv(dev); tp 55 drivers/net/ethernet/dec/tulip/pnic.c void __iomem *ioaddr = tp->base_addr; tp 68 drivers/net/ethernet/dec/tulip/pnic.c if (! tp->nwayset || time_after(jiffies, dev_trans_start(dev) + 1*HZ)) { tp 69 drivers/net/ethernet/dec/tulip/pnic.c tp->csr6 = 0x00420000 | (tp->csr6 & 0x0000fdff); tp 70 drivers/net/ethernet/dec/tulip/pnic.c iowrite32(tp->csr6, ioaddr + CSR6); tp 77 drivers/net/ethernet/dec/tulip/pnic.c spin_lock(&tp->lock); tp 79 drivers/net/ethernet/dec/tulip/pnic.c spin_unlock(&tp->lock); tp 89 drivers/net/ethernet/dec/tulip/pnic.c struct tulip_private *tp = from_timer(tp, t, timer); tp 90 drivers/net/ethernet/dec/tulip/pnic.c struct net_device *dev = tp->dev; tp 91 drivers/net/ethernet/dec/tulip/pnic.c void __iomem *ioaddr = tp->base_addr; tp 104 drivers/net/ethernet/dec/tulip/pnic.c spin_lock_irq(&tp->lock); tp 107 drivers/net/ethernet/dec/tulip/pnic.c spin_unlock_irq(&tp->lock); tp 110 drivers/net/ethernet/dec/tulip/pnic.c int new_csr6 = tp->csr6 & ~0x40C40200; tp 120 drivers/net/ethernet/dec/tulip/pnic.c tp->nwayset = 0; tp 132 drivers/net/ethernet/dec/tulip/pnic.c if (tp->medialock) { tp 133 drivers/net/ethernet/dec/tulip/pnic.c } else if (tp->nwayset && (dev->if_port & 1)) { tp 146 drivers/net/ethernet/dec/tulip/pnic.c if (tp->csr6 != new_csr6) { tp 147 drivers/net/ethernet/dec/tulip/pnic.c tp->csr6 = new_csr6; tp 149 drivers/net/ethernet/dec/tulip/pnic.c tulip_restart_rxtx(tp); tp 155 drivers/net/ethernet/dec/tulip/pnic.c tp->full_duplex ? "full" : "half", tp 161 drivers/net/ethernet/dec/tulip/pnic.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 168 drivers/net/ethernet/dec/tulip/pnic.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); tp 81 drivers/net/ethernet/dec/tulip/pnic2.c struct tulip_private *tp = from_timer(tp, t, timer); tp 82 drivers/net/ethernet/dec/tulip/pnic2.c struct net_device *dev = tp->dev; tp 83 drivers/net/ethernet/dec/tulip/pnic2.c void __iomem *ioaddr = tp->base_addr; tp 91 drivers/net/ethernet/dec/tulip/pnic2.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 98 drivers/net/ethernet/dec/tulip/pnic2.c struct tulip_private *tp = netdev_priv(dev); tp 99 drivers/net/ethernet/dec/tulip/pnic2.c void __iomem *ioaddr = tp->base_addr; tp 111 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->sym_advertise & 0x0100) csr14 |= 0x00020000; tp 114 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->sym_advertise & 0x0080) csr14 |= 0x00010000; tp 117 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->sym_advertise & 0x0020) csr14 |= 0x00000040; tp 130 drivers/net/ethernet/dec/tulip/pnic2.c tp->nway = tp->mediasense = 1; tp 131 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = tp->lpar = 0; tp 135 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 = ioread32(ioaddr + CSR6); tp 137 drivers/net/ethernet/dec/tulip/pnic2.c netdev_dbg(dev, "On Entry to Nway, csr6=%08x\n", tp->csr6); tp 142 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 = tp->csr6 & 0xfe3bd1fd; tp 146 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->sym_advertise & 0x0040) tp->csr6 |= 0x00000200; tp 152 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 |= 0x01000000; tp 154 drivers/net/ethernet/dec/tulip/pnic2.c iowrite32(tp->csr6, ioaddr + CSR6); tp 172 drivers/net/ethernet/dec/tulip/pnic2.c struct tulip_private *tp = netdev_priv(dev); tp 173 drivers/net/ethernet/dec/tulip/pnic2.c void __iomem *ioaddr = tp->base_addr; tp 187 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->nway && !tp->nwayset) { tp 204 drivers/net/ethernet/dec/tulip/pnic2.c int negotiated = ((csr12 >> 16) & 0x01E0) & tp->sym_advertise; tp 205 drivers/net/ethernet/dec/tulip/pnic2.c tp->lpar = (csr12 >> 16); tp 206 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = 1; tp 216 drivers/net/ethernet/dec/tulip/pnic2.c csr12, tp->sym_advertise); tp 217 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = 0; tp 219 drivers/net/ethernet/dec/tulip/pnic2.c if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180)) tp 224 drivers/net/ethernet/dec/tulip/pnic2.c tp->full_duplex = 0; tp 226 drivers/net/ethernet/dec/tulip/pnic2.c tp->full_duplex = 1; tp 229 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->nwayset) tp 233 drivers/net/ethernet/dec/tulip/pnic2.c tp->sym_advertise, tp->lpar, tp 253 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); tp 261 drivers/net/ethernet/dec/tulip/pnic2.c if (dev->if_port & 1) tp->csr6 |= 0x01840000; tp 262 drivers/net/ethernet/dec/tulip/pnic2.c else tp->csr6 |= 0x00400000; tp 265 drivers/net/ethernet/dec/tulip/pnic2.c if (tp->full_duplex) tp->csr6 |= 0x00000200; tp 271 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6, tp 278 drivers/net/ethernet/dec/tulip/pnic2.c tulip_start_rxtx(tp); tp 301 drivers/net/ethernet/dec/tulip/pnic2.c tp->nway = 0; tp 302 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = 1; tp 307 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); tp 308 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 |= 0x00400000; tp 310 drivers/net/ethernet/dec/tulip/pnic2.c tulip_restart_rxtx(tp); tp 317 drivers/net/ethernet/dec/tulip/pnic2.c if ((tp->nwayset && (csr5 & 0x08000000) && tp 319 drivers/net/ethernet/dec/tulip/pnic2.c (csr12 & 2) == 2) || (tp->nway && (csr5 & (TPLnkFail)))) { tp 326 drivers/net/ethernet/dec/tulip/pnic2.c del_timer_sync(&tp->timer); tp 328 drivers/net/ethernet/dec/tulip/pnic2.c tp->timer.expires = RUN_AT(3*HZ); tp 329 drivers/net/ethernet/dec/tulip/pnic2.c add_timer(&tp->timer); tp 346 drivers/net/ethernet/dec/tulip/pnic2.c tp->nway = 0; tp 347 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = 1; tp 350 drivers/net/ethernet/dec/tulip/pnic2.c if ((csr12 & 2) && ! tp->medialock) { tp 351 drivers/net/ethernet/dec/tulip/pnic2.c del_timer_sync(&tp->timer); tp 353 drivers/net/ethernet/dec/tulip/pnic2.c tp->timer.expires = RUN_AT(3*HZ); tp 354 drivers/net/ethernet/dec/tulip/pnic2.c add_timer(&tp->timer); tp 370 drivers/net/ethernet/dec/tulip/pnic2.c tp->nway = 0; tp 371 drivers/net/ethernet/dec/tulip/pnic2.c tp->nwayset = 1; tp 374 drivers/net/ethernet/dec/tulip/pnic2.c if ((csr12 & 4) && ! tp->medialock) { tp 375 drivers/net/ethernet/dec/tulip/pnic2.c del_timer_sync(&tp->timer); tp 377 drivers/net/ethernet/dec/tulip/pnic2.c tp->timer.expires = RUN_AT(3*HZ); tp 378 drivers/net/ethernet/dec/tulip/pnic2.c add_timer(&tp->timer); tp 398 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 = (ioread32(ioaddr + CSR6) & 0xfe3bd1fd); tp 399 drivers/net/ethernet/dec/tulip/pnic2.c tp->csr6 |= 0x00400000; tp 401 drivers/net/ethernet/dec/tulip/pnic2.c tulip_restart_rxtx(tp); tp 19 drivers/net/ethernet/dec/tulip/timer.c struct tulip_private *tp = tp 21 drivers/net/ethernet/dec/tulip/timer.c struct net_device *dev = tp->dev; tp 22 drivers/net/ethernet/dec/tulip/timer.c void __iomem *ioaddr = tp->base_addr; tp 34 drivers/net/ethernet/dec/tulip/timer.c switch (tp->chip_id) { tp 43 drivers/net/ethernet/dec/tulip/timer.c if (tp->mtable == NULL) { /* No EEPROM info, use generic code. */ tp 53 drivers/net/ethernet/dec/tulip/timer.c mleaf = &tp->mtable->mleaf[tp->cur_index]; tp 87 drivers/net/ethernet/dec/tulip/timer.c if (tp->medialock) tp 90 drivers/net/ethernet/dec/tulip/timer.c if (--tp->cur_index < 0) { tp 92 drivers/net/ethernet/dec/tulip/timer.c tp->cur_index = tp->mtable->leafcount - 1; tp 94 drivers/net/ethernet/dec/tulip/timer.c dev->if_port = tp->mtable->mleaf[tp->cur_index].media; tp 100 drivers/net/ethernet/dec/tulip/timer.c medianame[tp->mtable->mleaf[tp->cur_index].media]); tp 103 drivers/net/ethernet/dec/tulip/timer.c tulip_restart_rxtx(tp); tp 126 drivers/net/ethernet/dec/tulip/timer.c spin_lock_irqsave(&tp->lock, flags); tp 127 drivers/net/ethernet/dec/tulip/timer.c if (tp->timeout_recovery) { tp 128 drivers/net/ethernet/dec/tulip/timer.c tulip_tx_timeout_complete(tp, ioaddr); tp 129 drivers/net/ethernet/dec/tulip/timer.c tp->timeout_recovery = 0; tp 131 drivers/net/ethernet/dec/tulip/timer.c spin_unlock_irqrestore(&tp->lock, flags); tp 136 drivers/net/ethernet/dec/tulip/timer.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 142 drivers/net/ethernet/dec/tulip/timer.c struct tulip_private *tp = from_timer(tp, t, timer); tp 143 drivers/net/ethernet/dec/tulip/timer.c struct net_device *dev = tp->dev; tp 144 drivers/net/ethernet/dec/tulip/timer.c void __iomem *ioaddr = tp->base_addr; tp 152 drivers/net/ethernet/dec/tulip/timer.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 159 drivers/net/ethernet/dec/tulip/timer.c struct tulip_private *tp = from_timer(tp, t, timer); tp 160 drivers/net/ethernet/dec/tulip/timer.c struct net_device *dev = tp->dev; tp 165 drivers/net/ethernet/dec/tulip/timer.c tulip_mdio_read(dev, tp->phys[0], 1), tp 166 drivers/net/ethernet/dec/tulip/timer.c tulip_mdio_read(dev, tp->phys[0], 5)); tp 174 drivers/net/ethernet/dec/tulip/timer.c mod_timer(&tp->timer, RUN_AT(next_tick)); tp 522 drivers/net/ethernet/dec/tulip/tulip.h static inline void tulip_start_rxtx(struct tulip_private *tp) tp 524 drivers/net/ethernet/dec/tulip/tulip.h void __iomem *ioaddr = tp->base_addr; tp 525 drivers/net/ethernet/dec/tulip/tulip.h iowrite32(tp->csr6 | RxTx, ioaddr + CSR6); tp 530 drivers/net/ethernet/dec/tulip/tulip.h static inline void tulip_stop_rxtx(struct tulip_private *tp) tp 532 drivers/net/ethernet/dec/tulip/tulip.h void __iomem *ioaddr = tp->base_addr; tp 547 drivers/net/ethernet/dec/tulip/tulip.h netdev_dbg(tp->dev, "tulip_stop_rxtx() failed (CSR5 0x%x CSR6 0x%x)\n", tp 553 drivers/net/ethernet/dec/tulip/tulip.h static inline void tulip_restart_rxtx(struct tulip_private *tp) tp 555 drivers/net/ethernet/dec/tulip/tulip.h tulip_stop_rxtx(tp); tp 557 drivers/net/ethernet/dec/tulip/tulip.h tulip_start_rxtx(tp); tp 560 drivers/net/ethernet/dec/tulip/tulip.h static inline void tulip_tx_timeout_complete(struct tulip_private *tp, void __iomem *ioaddr) tp 563 drivers/net/ethernet/dec/tulip/tulip.h tulip_restart_rxtx(tp); tp 567 drivers/net/ethernet/dec/tulip/tulip.h tp->dev->stats.tx_errors++; tp 128 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = from_timer(tp, t, timer); tp 129 drivers/net/ethernet/dec/tulip/tulip_core.c struct net_device *dev = tp->dev; tp 132 drivers/net/ethernet/dec/tulip/tulip_core.c schedule_work(&tp->media_work); tp 275 drivers/net/ethernet/dec/tulip/tulip_core.c static void tulip_set_power_state (struct tulip_private *tp, tp 278 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & HAS_ACPI) { tp 280 drivers/net/ethernet/dec/tulip/tulip_core.c pci_read_config_dword (tp->pdev, CFDD, &tmp); tp 287 drivers/net/ethernet/dec/tulip/tulip_core.c pci_write_config_dword (tp->pdev, CFDD, newtmp); tp 295 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 296 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 302 drivers/net/ethernet/dec/tulip/tulip_core.c napi_enable(&tp->napi); tp 306 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_set_power_state (tp, 0, 0); tp 309 drivers/net/ethernet/dec/tulip/tulip_core.c pci_enable_wake(tp->pdev, PCI_D3hot, 0); tp 310 drivers/net/ethernet/dec/tulip/tulip_core.c pci_enable_wake(tp->pdev, PCI_D3cold, 0); tp 311 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_set_wolopts(tp->pdev, 0); tp 314 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii)) tp 319 drivers/net/ethernet/dec/tulip/tulip_core.c pci_read_config_dword(tp->pdev, PCI_COMMAND, ®); /* flush write */ tp 325 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tp->csr0, ioaddr + CSR0); tp 326 drivers/net/ethernet/dec/tulip/tulip_core.c pci_read_config_dword(tp->pdev, PCI_COMMAND, ®); /* flush write */ tp 330 drivers/net/ethernet/dec/tulip/tulip_core.c netdev_dbg(dev, "tulip_up(), irq==%d\n", tp->pdev->irq); tp 332 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tp->rx_ring_dma, ioaddr + CSR3); tp 333 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tp->tx_ring_dma, ioaddr + CSR4); tp 334 drivers/net/ethernet/dec/tulip/tulip_core.c tp->cur_rx = tp->cur_tx = 0; tp 335 drivers/net/ethernet/dec/tulip/tulip_core.c tp->dirty_rx = tp->dirty_tx = 0; tp 337 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & MC_HASH_ONLY) { tp 340 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->chip_id == AX88140) { tp 345 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->flags & COMET_MAC_ADDR) { tp 354 drivers/net/ethernet/dec/tulip/tulip_core.c u16 *setup_frm = &tp->setup_frame[15*6]; tp 358 drivers/net/ethernet/dec/tulip/tulip_core.c memset(tp->setup_frame, 0xff, sizeof(tp->setup_frame)); tp 364 drivers/net/ethernet/dec/tulip/tulip_core.c mapping = pci_map_single(tp->pdev, tp->setup_frame, tp 365 drivers/net/ethernet/dec/tulip/tulip_core.c sizeof(tp->setup_frame), tp 367 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[tp->cur_tx].skb = NULL; tp 368 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[tp->cur_tx].mapping = mapping; tp 371 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[tp->cur_tx].length = cpu_to_le32(0x08000000 | 192); tp 372 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[tp->cur_tx].buffer1 = cpu_to_le32(mapping); tp 373 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[tp->cur_tx].status = cpu_to_le32(DescOwned); tp 375 drivers/net/ethernet/dec/tulip/tulip_core.c tp->cur_tx++; tp 378 drivers/net/ethernet/dec/tulip/tulip_core.c tp->saved_if_port = dev->if_port; tp 380 drivers/net/ethernet/dec/tulip/tulip_core.c dev->if_port = tp->default_port; tp 384 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable == NULL) tp 389 drivers/net/ethernet/dec/tulip/tulip_core.c for (i = 0; i < tp->mtable->leafcount; i++) tp 390 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable->mleaf[i].media == looking_for) { tp 397 drivers/net/ethernet/dec/tulip/tulip_core.c if ((tp->mtable->defaultmedia & 0x0800) == 0) { tp 398 drivers/net/ethernet/dec/tulip/tulip_core.c int looking_for = tp->mtable->defaultmedia & MEDIA_MASK; tp 399 drivers/net/ethernet/dec/tulip/tulip_core.c for (i = 0; i < tp->mtable->leafcount; i++) tp 400 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable->mleaf[i].media == looking_for) { tp 408 drivers/net/ethernet/dec/tulip/tulip_core.c for (i = tp->mtable->leafcount - 1; tp 409 drivers/net/ethernet/dec/tulip/tulip_core.c (tulip_media_cap[tp->mtable->mleaf[i].media] & MediaAlwaysFD) && i > 0; i--) tp 413 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0; tp 414 drivers/net/ethernet/dec/tulip/tulip_core.c tp->cur_index = i; tp 415 drivers/net/ethernet/dec/tulip/tulip_core.c tp->nwayset = 0; tp 418 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->chip_id == DC21143 && tp 426 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == DC21142) { tp 427 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mii_cnt) { tp 432 drivers/net/ethernet/dec/tulip/tulip_core.c tp->phys[0], tp 433 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_mdio_read(dev, tp->phys[0], 1)); tp 435 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = csr6_mask_hdcap; tp 441 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == PNIC2) { tp 443 drivers/net/ethernet/dec/tulip/tulip_core.c tp->sym_advertise = 0x01E0; tp 448 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == LC82C168 && ! tp->medialock) { tp 449 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mii_cnt) { tp 451 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0x814C0000 | (tp->full_duplex ? 0x0200 : 0); tp 458 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0x00420000; tp 463 drivers/net/ethernet/dec/tulip/tulip_core.c } else if ((tp->chip_id == MX98713 || tp->chip_id == COMPEX9881) && tp 464 drivers/net/ethernet/dec/tulip/tulip_core.c ! tp->medialock) { tp 466 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0x01880000 | (tp->full_duplex ? 0x0200 : 0); tp 468 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == MX98715 || tp->chip_id == MX98725) { tp 471 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0x01a80200; tp 474 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == COMET || tp->chip_id == CONEXANT) { tp 477 drivers/net/ethernet/dec/tulip/tulip_core.c dev->if_port = tp->mii_cnt ? 11 : 0; tp 478 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = 0x00040000; tp 479 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == AX88140) { tp 480 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 = tp->mii_cnt ? 0x00040100 : 0x00000100; tp 485 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_stop_rxtx(tp); tp 488 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tp->csr6 | TxOn, ioaddr + CSR6); tp 491 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR5); tp 492 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ioaddr + CSR7); tp 493 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_start_rxtx(tp); tp 505 drivers/net/ethernet/dec/tulip/tulip_core.c tp->timer.expires = RUN_AT(next_tick); tp 506 drivers/net/ethernet/dec/tulip/tulip_core.c add_timer(&tp->timer); tp 508 drivers/net/ethernet/dec/tulip/tulip_core.c timer_setup(&tp->oom_timer, oom_timer, 0); tp 515 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 520 drivers/net/ethernet/dec/tulip/tulip_core.c retval = request_irq(tp->pdev->irq, tulip_interrupt, IRQF_SHARED, tp 539 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 540 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 543 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_irqsave (&tp->lock, flags); tp 550 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == DC21140 || tp->chip_id == DC21142 || tp 551 drivers/net/ethernet/dec/tulip/tulip_core.c tp->chip_id == MX98713 || tp->chip_id == COMPEX9881 || tp 552 drivers/net/ethernet/dec/tulip/tulip_core.c tp->chip_id == DM910X) { tp 558 drivers/net/ethernet/dec/tulip/tulip_core.c tp->timeout_recovery = 1; tp 559 drivers/net/ethernet/dec/tulip/tulip_core.c schedule_work(&tp->media_work); tp 561 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->chip_id == PNIC2) { tp 579 drivers/net/ethernet/dec/tulip/tulip_core.c u8 *buf = (u8 *)(tp->rx_ring[i].buffer1); tp 584 drivers/net/ethernet/dec/tulip/tulip_core.c (unsigned int)tp->rx_ring[i].status, tp 585 drivers/net/ethernet/dec/tulip/tulip_core.c (unsigned int)tp->rx_ring[i].length, tp 586 drivers/net/ethernet/dec/tulip/tulip_core.c (unsigned int)tp->rx_ring[i].buffer1, tp 587 drivers/net/ethernet/dec/tulip/tulip_core.c (unsigned int)tp->rx_ring[i].buffer2, tp 594 drivers/net/ethernet/dec/tulip/tulip_core.c printk(KERN_DEBUG " Rx ring %p: ", tp->rx_ring); tp 596 drivers/net/ethernet/dec/tulip/tulip_core.c pr_cont(" %08x", (unsigned int)tp->rx_ring[i].status); tp 597 drivers/net/ethernet/dec/tulip/tulip_core.c printk(KERN_DEBUG " Tx ring %p: ", tp->tx_ring); tp 599 drivers/net/ethernet/dec/tulip/tulip_core.c pr_cont(" %08x", (unsigned int)tp->tx_ring[i].status); tp 604 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_tx_timeout_complete(tp, ioaddr); tp 607 drivers/net/ethernet/dec/tulip/tulip_core.c spin_unlock_irqrestore (&tp->lock, flags); tp 616 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 619 drivers/net/ethernet/dec/tulip/tulip_core.c tp->susp_rx = 0; tp 620 drivers/net/ethernet/dec/tulip/tulip_core.c tp->ttimer = 0; tp 621 drivers/net/ethernet/dec/tulip/tulip_core.c tp->nir = 0; tp 624 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].status = 0x00000000; tp 625 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].length = cpu_to_le32(PKT_BUF_SZ); tp 626 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].buffer2 = cpu_to_le32(tp->rx_ring_dma + sizeof(struct tulip_rx_desc) * (i + 1)); tp 627 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].skb = NULL; tp 628 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].mapping = 0; tp 631 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i-1].length = cpu_to_le32(PKT_BUF_SZ | DESC_RING_WRAP); tp 632 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i-1].buffer2 = cpu_to_le32(tp->rx_ring_dma); tp 641 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].skb = skb; tp 644 drivers/net/ethernet/dec/tulip/tulip_core.c mapping = pci_map_single(tp->pdev, skb->data, tp 646 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].mapping = mapping; tp 647 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].status = cpu_to_le32(DescOwned); /* Owned by Tulip chip */ tp 648 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].buffer1 = cpu_to_le32(mapping); tp 650 drivers/net/ethernet/dec/tulip/tulip_core.c tp->dirty_rx = (unsigned int)(i - RX_RING_SIZE); tp 655 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[i].skb = NULL; tp 656 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[i].mapping = 0; tp 657 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[i].status = 0x00000000; tp 658 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[i].buffer2 = cpu_to_le32(tp->tx_ring_dma + sizeof(struct tulip_tx_desc) * (i + 1)); tp 660 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[i-1].buffer2 = cpu_to_le32(tp->tx_ring_dma); tp 666 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 672 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_irqsave(&tp->lock, flags); tp 675 drivers/net/ethernet/dec/tulip/tulip_core.c entry = tp->cur_tx % TX_RING_SIZE; tp 677 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].skb = skb; tp 678 drivers/net/ethernet/dec/tulip/tulip_core.c mapping = pci_map_single(tp->pdev, skb->data, tp 680 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].mapping = mapping; tp 681 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].buffer1 = cpu_to_le32(mapping); tp 683 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->cur_tx - tp->dirty_tx < TX_RING_SIZE/2) {/* Typical path */ tp 685 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->cur_tx - tp->dirty_tx == TX_RING_SIZE/2) { tp 687 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->cur_tx - tp->dirty_tx < TX_RING_SIZE - 2) { tp 696 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].length = cpu_to_le32(skb->len | flag); tp 699 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].status = cpu_to_le32(DescOwned); tp 702 drivers/net/ethernet/dec/tulip/tulip_core.c tp->cur_tx++; tp 705 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(0, tp->base_addr + CSR1); tp 707 drivers/net/ethernet/dec/tulip/tulip_core.c spin_unlock_irqrestore(&tp->lock, flags); tp 712 drivers/net/ethernet/dec/tulip/tulip_core.c static void tulip_clean_tx_ring(struct tulip_private *tp) tp 716 drivers/net/ethernet/dec/tulip/tulip_core.c for (dirty_tx = tp->dirty_tx ; tp->cur_tx - dirty_tx > 0; tp 719 drivers/net/ethernet/dec/tulip/tulip_core.c int status = le32_to_cpu(tp->tx_ring[entry].status); tp 722 drivers/net/ethernet/dec/tulip/tulip_core.c tp->dev->stats.tx_errors++; /* It wasn't Txed */ tp 723 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].status = 0; tp 727 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->tx_buffers[entry].skb == NULL) { tp 729 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->tx_buffers[entry].mapping) tp 730 drivers/net/ethernet/dec/tulip/tulip_core.c pci_unmap_single(tp->pdev, tp 731 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].mapping, tp 732 drivers/net/ethernet/dec/tulip/tulip_core.c sizeof(tp->setup_frame), tp 737 drivers/net/ethernet/dec/tulip/tulip_core.c pci_unmap_single(tp->pdev, tp->tx_buffers[entry].mapping, tp 738 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].skb->len, tp 742 drivers/net/ethernet/dec/tulip/tulip_core.c dev_kfree_skb_irq(tp->tx_buffers[entry].skb); tp 743 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].skb = NULL; tp 744 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].mapping = 0; tp 750 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 751 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 754 drivers/net/ethernet/dec/tulip/tulip_core.c cancel_work_sync(&tp->media_work); tp 757 drivers/net/ethernet/dec/tulip/tulip_core.c napi_disable(&tp->napi); tp 760 drivers/net/ethernet/dec/tulip/tulip_core.c del_timer_sync (&tp->timer); tp 762 drivers/net/ethernet/dec/tulip/tulip_core.c del_timer_sync (&tp->oom_timer); tp 764 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_irqsave (&tp->lock, flags); tp 770 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_stop_rxtx(tp); tp 776 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_clean_tx_ring(tp); tp 781 drivers/net/ethernet/dec/tulip/tulip_core.c spin_unlock_irqrestore (&tp->lock, flags); tp 783 drivers/net/ethernet/dec/tulip/tulip_core.c timer_setup(&tp->timer, tulip_tbl[tp->chip_id].media_timer, 0); tp 785 drivers/net/ethernet/dec/tulip/tulip_core.c dev->if_port = tp->saved_if_port; tp 788 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_set_power_state (tp, 0, 1); tp 793 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 798 drivers/net/ethernet/dec/tulip/tulip_core.c struct sk_buff *skb = tp->rx_buffers[i].skb; tp 799 drivers/net/ethernet/dec/tulip/tulip_core.c dma_addr_t mapping = tp->rx_buffers[i].mapping; tp 801 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].skb = NULL; tp 802 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_buffers[i].mapping = 0; tp 804 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].status = 0; /* Not owned by Tulip chip. */ tp 805 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].length = 0; tp 807 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring[i].buffer1 = cpu_to_le32(0xBADF00D0); tp 809 drivers/net/ethernet/dec/tulip/tulip_core.c pci_unmap_single(tp->pdev, mapping, PKT_BUF_SZ, tp 816 drivers/net/ethernet/dec/tulip/tulip_core.c struct sk_buff *skb = tp->tx_buffers[i].skb; tp 819 drivers/net/ethernet/dec/tulip/tulip_core.c pci_unmap_single(tp->pdev, tp->tx_buffers[i].mapping, tp 823 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[i].skb = NULL; tp 824 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[i].mapping = 0; tp 830 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 831 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 841 drivers/net/ethernet/dec/tulip/tulip_core.c free_irq (tp->pdev->irq, dev); tp 850 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 851 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 856 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_irqsave (&tp->lock, flags); tp 860 drivers/net/ethernet/dec/tulip/tulip_core.c spin_unlock_irqrestore(&tp->lock, flags); tp 879 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 881 drivers/net/ethernet/dec/tulip/tulip_core.c if (wolinfo->wolopts & (~tp->wolinfo.supported)) tp 884 drivers/net/ethernet/dec/tulip/tulip_core.c tp->wolinfo.wolopts = wolinfo->wolopts; tp 885 drivers/net/ethernet/dec/tulip/tulip_core.c device_set_wakeup_enable(&tp->pdev->dev, tp->wolinfo.wolopts); tp 892 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 894 drivers/net/ethernet/dec/tulip/tulip_core.c wolinfo->supported = tp->wolinfo.supported; tp 895 drivers/net/ethernet/dec/tulip/tulip_core.c wolinfo->wolopts = tp->wolinfo.wolopts; tp 909 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 910 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 913 drivers/net/ethernet/dec/tulip/tulip_core.c int phy = tp->phys[phy_idx] & 0x1f; tp 918 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mii_cnt) tp 920 drivers/net/ethernet/dec/tulip/tulip_core.c else if (tp->flags & HAS_NWAY) tp 922 drivers/net/ethernet/dec/tulip/tulip_core.c else if (tp->chip_id == COMET) tp 929 drivers/net/ethernet/dec/tulip/tulip_core.c if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) { tp 935 drivers/net/ethernet/dec/tulip/tulip_core.c (dev->if_port == 5 && tp->nwayset)) tp 955 drivers/net/ethernet/dec/tulip/tulip_core.c case 5: data->val_out = tp->lpar; break; tp 970 drivers/net/ethernet/dec/tulip/tulip_core.c tp->full_duplex_lock = (value & 0x9000) ? 0 : 1; tp 971 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->full_duplex_lock) tp 972 drivers/net/ethernet/dec/tulip/tulip_core.c tp->full_duplex = (value & 0x0100) ? 1 : 0; tp 975 drivers/net/ethernet/dec/tulip/tulip_core.c tp->advertising[phy_idx] = tp 976 drivers/net/ethernet/dec/tulip/tulip_core.c tp->mii_advertise = data->val_in; tp 980 drivers/net/ethernet/dec/tulip/tulip_core.c if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) { tp 984 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->chip_id == PNIC2) { tp 991 drivers/net/ethernet/dec/tulip/tulip_core.c tp->sym_advertise = value; tp 1011 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1029 drivers/net/ethernet/dec/tulip/tulip_core.c setup_frm = &tp->setup_frame[13*6]; tp 1040 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1054 drivers/net/ethernet/dec/tulip/tulip_core.c setup_frm = &tp->setup_frame[15*6]; tp 1066 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1067 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 1072 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 &= ~0x00D5; tp 1074 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 |= AcceptAllMulticast | AcceptAllPhys; tp 1079 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 |= AcceptAllMulticast; tp 1081 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->flags & MC_HASH_ONLY) { tp 1087 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr6 |= AcceptAllMulticast; tp 1093 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & COMET_MAC_ADDR) tp 1108 drivers/net/ethernet/dec/tulip/tulip_core.c if (mc_filter[0] == tp->mc_filter[0] && tp 1109 drivers/net/ethernet/dec/tulip/tulip_core.c mc_filter[1] == tp->mc_filter[1]) tp 1111 drivers/net/ethernet/dec/tulip/tulip_core.c else if (tp->flags & IS_ASIX) { tp 1116 drivers/net/ethernet/dec/tulip/tulip_core.c } else if (tp->flags & COMET_MAC_ADDR) { tp 1120 drivers/net/ethernet/dec/tulip/tulip_core.c tp->mc_filter[0] = mc_filter[0]; tp 1121 drivers/net/ethernet/dec/tulip/tulip_core.c tp->mc_filter[1] = mc_filter[1]; tp 1131 drivers/net/ethernet/dec/tulip/tulip_core.c build_setup_frame_hash(tp->setup_frame, dev); tp 1134 drivers/net/ethernet/dec/tulip/tulip_core.c build_setup_frame_perfect(tp->setup_frame, dev); tp 1137 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_irqsave(&tp->lock, flags); tp 1139 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->cur_tx - tp->dirty_tx > TX_RING_SIZE - 2) { tp 1147 drivers/net/ethernet/dec/tulip/tulip_core.c entry = tp->cur_tx++ % TX_RING_SIZE; tp 1151 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].skb = NULL; tp 1152 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].mapping = 0; tp 1153 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].length = tp 1155 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].buffer1 = 0; tp 1158 drivers/net/ethernet/dec/tulip/tulip_core.c entry = tp->cur_tx++ % TX_RING_SIZE; tp 1162 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].skb = NULL; tp 1163 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_buffers[entry].mapping = tp 1164 drivers/net/ethernet/dec/tulip/tulip_core.c pci_map_single(tp->pdev, tp->setup_frame, tp 1165 drivers/net/ethernet/dec/tulip/tulip_core.c sizeof(tp->setup_frame), tp 1170 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].length = cpu_to_le32(tx_flags); tp 1171 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].buffer1 = tp 1172 drivers/net/ethernet/dec/tulip/tulip_core.c cpu_to_le32(tp->tx_buffers[entry].mapping); tp 1173 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[entry].status = cpu_to_le32(DescOwned); tp 1175 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring[dummy].status = cpu_to_le32(DescOwned); tp 1176 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->cur_tx - tp->dirty_tx >= TX_RING_SIZE - 2) tp 1183 drivers/net/ethernet/dec/tulip/tulip_core.c spin_unlock_irqrestore(&tp->lock, flags); tp 1192 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1200 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr0 = csr0 = 0; tp 1258 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr0 = csr0; tp 1300 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp; tp 1412 drivers/net/ethernet/dec/tulip/tulip_core.c dev = alloc_etherdev (sizeof (*tp)); tp 1439 drivers/net/ethernet/dec/tulip/tulip_core.c tp = netdev_priv(dev); tp 1440 drivers/net/ethernet/dec/tulip/tulip_core.c tp->dev = dev; tp 1442 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring = pci_alloc_consistent(pdev, tp 1445 drivers/net/ethernet/dec/tulip/tulip_core.c &tp->rx_ring_dma); tp 1446 drivers/net/ethernet/dec/tulip/tulip_core.c if (!tp->rx_ring) tp 1448 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring = (struct tulip_tx_desc *)(tp->rx_ring + RX_RING_SIZE); tp 1449 drivers/net/ethernet/dec/tulip/tulip_core.c tp->tx_ring_dma = tp->rx_ring_dma + sizeof(struct tulip_rx_desc) * RX_RING_SIZE; tp 1451 drivers/net/ethernet/dec/tulip/tulip_core.c tp->chip_id = chip_idx; tp 1452 drivers/net/ethernet/dec/tulip/tulip_core.c tp->flags = tulip_tbl[chip_idx].flags; tp 1454 drivers/net/ethernet/dec/tulip/tulip_core.c tp->wolinfo.supported = 0; tp 1455 drivers/net/ethernet/dec/tulip/tulip_core.c tp->wolinfo.wolopts = 0; tp 1461 drivers/net/ethernet/dec/tulip/tulip_core.c tp->flags |= COMET_PM; tp 1462 drivers/net/ethernet/dec/tulip/tulip_core.c tp->wolinfo.supported = WAKE_PHY | WAKE_MAGIC; tp 1467 drivers/net/ethernet/dec/tulip/tulip_core.c tp->pdev = pdev; tp 1468 drivers/net/ethernet/dec/tulip/tulip_core.c tp->base_addr = ioaddr; tp 1469 drivers/net/ethernet/dec/tulip/tulip_core.c tp->revision = pdev->revision; tp 1470 drivers/net/ethernet/dec/tulip/tulip_core.c tp->csr0 = csr0; tp 1471 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_init(&tp->lock); tp 1472 drivers/net/ethernet/dec/tulip/tulip_core.c spin_lock_init(&tp->mii_lock); tp 1473 drivers/net/ethernet/dec/tulip/tulip_core.c timer_setup(&tp->timer, tulip_tbl[tp->chip_id].media_timer, 0); tp 1475 drivers/net/ethernet/dec/tulip/tulip_core.c INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task); tp 1478 drivers/net/ethernet/dec/tulip/tulip_core.c if (!force_csr0 && (tp->flags & HAS_PCI_MWI)) tp 1483 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_stop_rxtx(tp); tp 1498 drivers/net/ethernet/dec/tulip/tulip_core.c tp->flags |= HAS_SWAPPED_SEEPROM | NEEDS_FAKE_MEDIA_TABLE; tp 1511 drivers/net/ethernet/dec/tulip/tulip_core.c ee_data = tp->eeprom; tp 1512 drivers/net/ethernet/dec/tulip/tulip_core.c memset(ee_data, 0, sizeof(tp->eeprom)); tp 1536 drivers/net/ethernet/dec/tulip/tulip_core.c if (ee_max_addr > sizeof(tp->eeprom)) tp 1537 drivers/net/ethernet/dec/tulip/tulip_core.c ee_max_addr = sizeof(tp->eeprom); tp 1639 drivers/net/ethernet/dec/tulip/tulip_core.c tp->default_port = options[board_idx] & MEDIA_MASK; tp 1641 drivers/net/ethernet/dec/tulip/tulip_core.c tp->full_duplex = 1; tp 1646 drivers/net/ethernet/dec/tulip/tulip_core.c tp->default_port = dev->mem_start & MEDIA_MASK; tp 1647 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->default_port) { tp 1649 drivers/net/ethernet/dec/tulip/tulip_core.c board_idx, medianame[tp->default_port & MEDIA_MASK]); tp 1650 drivers/net/ethernet/dec/tulip/tulip_core.c tp->medialock = 1; tp 1651 drivers/net/ethernet/dec/tulip/tulip_core.c if (tulip_media_cap[tp->default_port] & MediaAlwaysFD) tp 1652 drivers/net/ethernet/dec/tulip/tulip_core.c tp->full_duplex = 1; tp 1654 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->full_duplex) tp 1655 drivers/net/ethernet/dec/tulip/tulip_core.c tp->full_duplex_lock = 1; tp 1657 drivers/net/ethernet/dec/tulip/tulip_core.c if (tulip_media_cap[tp->default_port] & MediaIsMII) { tp 1661 drivers/net/ethernet/dec/tulip/tulip_core.c tp->mii_advertise = media2advert[tp->default_port - 9]; tp 1662 drivers/net/ethernet/dec/tulip/tulip_core.c tp->mii_advertise |= (tp->flags & HAS_8023X); /* Matching bits! */ tp 1665 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & HAS_MEDIA_TABLE) { tp 1671 drivers/net/ethernet/dec/tulip/tulip_core.c if ((tp->flags & ALWAYS_CHECK_MII) || tp 1672 drivers/net/ethernet/dec/tulip/tulip_core.c (tp->mtable && tp->mtable->has_mii) || tp 1673 drivers/net/ethernet/dec/tulip/tulip_core.c ( ! tp->mtable && (tp->flags & HAS_MII))) { tp 1674 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable && tp->mtable->has_mii) { tp 1675 drivers/net/ethernet/dec/tulip/tulip_core.c for (i = 0; i < tp->mtable->leafcount; i++) tp 1676 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable->mleaf[i].media == 11) { tp 1677 drivers/net/ethernet/dec/tulip/tulip_core.c tp->cur_index = i; tp 1678 drivers/net/ethernet/dec/tulip/tulip_core.c tp->saved_if_port = dev->if_port; tp 1680 drivers/net/ethernet/dec/tulip/tulip_core.c dev->if_port = tp->saved_if_port; tp 1695 drivers/net/ethernet/dec/tulip/tulip_core.c netif_napi_add(dev, &tp->napi, tulip_poll, 16); tp 1715 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->chip_id == PNIC2) tp 1716 drivers/net/ethernet/dec/tulip/tulip_core.c tp->link_change = pnic2_lnk_change; tp 1717 drivers/net/ethernet/dec/tulip/tulip_core.c else if (tp->flags & HAS_NWAY) tp 1718 drivers/net/ethernet/dec/tulip/tulip_core.c tp->link_change = t21142_lnk_change; tp 1719 drivers/net/ethernet/dec/tulip/tulip_core.c else if (tp->flags & HAS_PNICNWAY) tp 1720 drivers/net/ethernet/dec/tulip/tulip_core.c tp->link_change = pnic_lnk_change; tp 1727 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mtable) tp 1728 drivers/net/ethernet/dec/tulip/tulip_core.c iowrite32(tp->mtable->csr12dir | 0x100, ioaddr + CSR12); tp 1731 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->mii_cnt || tulip_media_cap[dev->if_port] & MediaIsMII) { tp 1745 drivers/net/ethernet/dec/tulip/tulip_core.c if ( ! tp->mii_cnt) { tp 1746 drivers/net/ethernet/dec/tulip/tulip_core.c tp->nway = 1; tp 1747 drivers/net/ethernet/dec/tulip/tulip_core.c tp->nwayset = 0; tp 1772 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_set_power_state (tp, 0, 1); tp 1780 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring, tp->rx_ring_dma); tp 1783 drivers/net/ethernet/dec/tulip/tulip_core.c kfree (tp->mtable); tp 1799 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1800 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 1802 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & COMET_PM) { tp 1831 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1843 drivers/net/ethernet/dec/tulip/tulip_core.c free_irq(tp->pdev->irq, dev); tp 1852 drivers/net/ethernet/dec/tulip/tulip_core.c tulip_set_wolopts(pdev, tp->wolinfo.wolopts); tp 1853 drivers/net/ethernet/dec/tulip/tulip_core.c rc = pci_enable_wake(pdev, pstate, tp->wolinfo.wolopts); tp 1866 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1867 drivers/net/ethernet/dec/tulip/tulip_core.c void __iomem *ioaddr = tp->base_addr; tp 1892 drivers/net/ethernet/dec/tulip/tulip_core.c if (tp->flags & COMET_PM) { tp 1918 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp; tp 1923 drivers/net/ethernet/dec/tulip/tulip_core.c tp = netdev_priv(dev); tp 1928 drivers/net/ethernet/dec/tulip/tulip_core.c tp->rx_ring, tp->rx_ring_dma); tp 1929 drivers/net/ethernet/dec/tulip/tulip_core.c kfree (tp->mtable); tp 1930 drivers/net/ethernet/dec/tulip/tulip_core.c pci_iounmap(pdev, tp->base_addr); tp 1947 drivers/net/ethernet/dec/tulip/tulip_core.c struct tulip_private *tp = netdev_priv(dev); tp 1948 drivers/net/ethernet/dec/tulip/tulip_core.c const int irq = tp->pdev->irq; tp 1052 drivers/net/ethernet/marvell/sky2.c u32 tp = space - space/4; tp 1058 drivers/net/ethernet/marvell/sky2.c sky2_write32(hw, RB_ADDR(q, RB_RX_UTHP), tp); tp 1061 drivers/net/ethernet/marvell/sky2.c tp = space - 8192/8; tp 1062 drivers/net/ethernet/marvell/sky2.c sky2_write32(hw, RB_ADDR(q, RB_RX_UTPP), tp); tp 8635 drivers/net/ethernet/mellanox/mlxsw/reg.h bool tp) tp 8639 drivers/net/ethernet/mellanox/mlxsw/reg.h mlxsw_reg_mpat_eth_rspan_tp_set(payload, tp); tp 644 drivers/net/ethernet/realtek/8139too.c static void rtl8139_start_thread(struct rtl8139_private *tp); tp 720 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 724 drivers/net/ethernet/realtek/8139too.c assert (tp->pci_dev != NULL); tp 725 drivers/net/ethernet/realtek/8139too.c pdev = tp->pci_dev; tp 727 drivers/net/ethernet/realtek/8139too.c if (tp->mmio_addr) tp 728 drivers/net/ethernet/realtek/8139too.c pci_iounmap (pdev, tp->mmio_addr); tp 759 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp; tp 776 drivers/net/ethernet/realtek/8139too.c dev = alloc_etherdev (sizeof (*tp)); tp 782 drivers/net/ethernet/realtek/8139too.c tp = netdev_priv(dev); tp 783 drivers/net/ethernet/realtek/8139too.c tp->pci_dev = pdev; tp 797 drivers/net/ethernet/realtek/8139too.c u64_stats_init(&tp->rx_stats.syncp); tp 798 drivers/net/ethernet/realtek/8139too.c u64_stats_init(&tp->tx_stats.syncp); tp 831 drivers/net/ethernet/realtek/8139too.c tp->regs_len = io_len; tp 832 drivers/net/ethernet/realtek/8139too.c tp->mmio_addr = ioaddr; tp 848 drivers/net/ethernet/realtek/8139too.c tp->chipset = i; tp 856 drivers/net/ethernet/realtek/8139too.c tp->chipset = 0; tp 862 drivers/net/ethernet/realtek/8139too.c if (tp->chipset >= CH_8139B) { tp 865 drivers/net/ethernet/realtek/8139too.c if ((rtl_chip_info[tp->chipset].flags & HasLWake) && tp 874 drivers/net/ethernet/realtek/8139too.c if (rtl_chip_info[tp->chipset].flags & HasLWake) { tp 902 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 905 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 910 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave(&tp->lock, flags); tp 913 drivers/net/ethernet/realtek/8139too.c int rx_mode = tp->rx_config; tp 918 drivers/net/ethernet/realtek/8139too.c tp->rx_config = rtl8139_rx_config | rx_mode; tp 919 drivers/net/ethernet/realtek/8139too.c RTL_W32_F(RxConfig, tp->rx_config); tp 922 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore(&tp->lock, flags); tp 947 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp; tp 989 drivers/net/ethernet/realtek/8139too.c tp = netdev_priv(dev); tp 990 drivers/net/ethernet/realtek/8139too.c tp->dev = dev; tp 992 drivers/net/ethernet/realtek/8139too.c ioaddr = tp->mmio_addr; tp 1004 drivers/net/ethernet/realtek/8139too.c netif_napi_add(dev, &tp->napi, rtl8139_poll, 64); tp 1021 drivers/net/ethernet/realtek/8139too.c tp = netdev_priv(dev); tp 1024 drivers/net/ethernet/realtek/8139too.c tp->drv_flags = board_info[ent->driver_data].hw_flags; tp 1025 drivers/net/ethernet/realtek/8139too.c tp->mmio_addr = ioaddr; tp 1026 drivers/net/ethernet/realtek/8139too.c tp->msg_enable = tp 1028 drivers/net/ethernet/realtek/8139too.c spin_lock_init (&tp->lock); tp 1029 drivers/net/ethernet/realtek/8139too.c spin_lock_init (&tp->rx_lock); tp 1030 drivers/net/ethernet/realtek/8139too.c INIT_DELAYED_WORK(&tp->thread, rtl8139_thread); tp 1031 drivers/net/ethernet/realtek/8139too.c tp->mii.dev = dev; tp 1032 drivers/net/ethernet/realtek/8139too.c tp->mii.mdio_read = mdio_read; tp 1033 drivers/net/ethernet/realtek/8139too.c tp->mii.mdio_write = mdio_write; tp 1034 drivers/net/ethernet/realtek/8139too.c tp->mii.phy_id_mask = 0x3f; tp 1035 drivers/net/ethernet/realtek/8139too.c tp->mii.reg_num_mask = 0x1f; tp 1050 drivers/net/ethernet/realtek/8139too.c rtl_chip_info[tp->chipset].name); tp 1056 drivers/net/ethernet/realtek/8139too.c if (tp->drv_flags & HAS_MII_XCVR) { tp 1058 drivers/net/ethernet/realtek/8139too.c for (phy = 0; phy < 32 && phy_idx < sizeof(tp->phys); phy++) { tp 1062 drivers/net/ethernet/realtek/8139too.c tp->phys[phy_idx++] = phy; tp 1069 drivers/net/ethernet/realtek/8139too.c tp->phys[0] = 32; tp 1073 drivers/net/ethernet/realtek/8139too.c tp->phys[0] = 32; tp 1074 drivers/net/ethernet/realtek/8139too.c tp->mii.phy_id = tp->phys[0]; tp 1079 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex = (option & 0x210) ? 1 : 0; tp 1080 drivers/net/ethernet/realtek/8139too.c tp->default_port = option & 0xFF; tp 1081 drivers/net/ethernet/realtek/8139too.c if (tp->default_port) tp 1082 drivers/net/ethernet/realtek/8139too.c tp->mii.force_media = 1; tp 1085 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex = full_duplex[board_idx]; tp 1086 drivers/net/ethernet/realtek/8139too.c if (tp->mii.full_duplex) { tp 1090 drivers/net/ethernet/realtek/8139too.c tp->mii.force_media = 1; tp 1092 drivers/net/ethernet/realtek/8139too.c if (tp->default_port) { tp 1096 drivers/net/ethernet/realtek/8139too.c mdio_write(dev, tp->phys[0], 0, tp 1102 drivers/net/ethernet/realtek/8139too.c if (rtl_chip_info[tp->chipset].flags & HasHltClk) tp 1117 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1121 drivers/net/ethernet/realtek/8139too.c cancel_delayed_work_sync(&tp->thread); tp 1235 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1238 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1244 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1278 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1280 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1286 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1321 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1322 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1323 drivers/net/ethernet/realtek/8139too.c const int irq = tp->pci_dev->irq; tp 1330 drivers/net/ethernet/realtek/8139too.c tp->tx_bufs = dma_alloc_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN, tp 1331 drivers/net/ethernet/realtek/8139too.c &tp->tx_bufs_dma, GFP_KERNEL); tp 1332 drivers/net/ethernet/realtek/8139too.c tp->rx_ring = dma_alloc_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN, tp 1333 drivers/net/ethernet/realtek/8139too.c &tp->rx_ring_dma, GFP_KERNEL); tp 1334 drivers/net/ethernet/realtek/8139too.c if (tp->tx_bufs == NULL || tp->rx_ring == NULL) { tp 1337 drivers/net/ethernet/realtek/8139too.c if (tp->tx_bufs) tp 1338 drivers/net/ethernet/realtek/8139too.c dma_free_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN, tp 1339 drivers/net/ethernet/realtek/8139too.c tp->tx_bufs, tp->tx_bufs_dma); tp 1340 drivers/net/ethernet/realtek/8139too.c if (tp->rx_ring) tp 1341 drivers/net/ethernet/realtek/8139too.c dma_free_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN, tp 1342 drivers/net/ethernet/realtek/8139too.c tp->rx_ring, tp->rx_ring_dma); tp 1348 drivers/net/ethernet/realtek/8139too.c napi_enable(&tp->napi); tp 1350 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex = tp->mii.force_media; tp 1351 drivers/net/ethernet/realtek/8139too.c tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000; tp 1357 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, ifup, dev, tp 1360 drivers/net/ethernet/realtek/8139too.c (unsigned long long)pci_resource_start (tp->pci_dev, 1), tp 1362 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex ? "full" : "half"); tp 1364 drivers/net/ethernet/realtek/8139too.c rtl8139_start_thread(tp); tp 1372 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1374 drivers/net/ethernet/realtek/8139too.c if (tp->phys[0] >= 0) { tp 1375 drivers/net/ethernet/realtek/8139too.c mii_check_media(&tp->mii, netif_msg_link(tp), init_media); tp 1382 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1383 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1388 drivers/net/ethernet/realtek/8139too.c if (rtl_chip_info[tp->chipset].flags & HasHltClk) tp 1399 drivers/net/ethernet/realtek/8139too.c tp->cur_rx = 0; tp 1402 drivers/net/ethernet/realtek/8139too.c RTL_W32_F (RxBuf, tp->rx_ring_dma); tp 1407 drivers/net/ethernet/realtek/8139too.c tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; tp 1408 drivers/net/ethernet/realtek/8139too.c RTL_W32 (RxConfig, tp->rx_config); tp 1413 drivers/net/ethernet/realtek/8139too.c if (tp->chipset >= CH_8139B) { tp 1427 drivers/net/ethernet/realtek/8139too.c RTL_W32_F (TxAddr0 + (i * 4), tp->tx_bufs_dma + (tp->tx_buf[i] - tp->tx_bufs)); tp 1449 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1452 drivers/net/ethernet/realtek/8139too.c tp->cur_rx = 0; tp 1453 drivers/net/ethernet/realtek/8139too.c tp->cur_tx = 0; tp 1454 drivers/net/ethernet/realtek/8139too.c tp->dirty_tx = 0; tp 1457 drivers/net/ethernet/realtek/8139too.c tp->tx_buf[i] = &tp->tx_bufs[i * TX_BUF_SIZE]; tp 1466 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp) {} tp 1482 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp) tp 1485 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1491 drivers/net/ethernet/realtek/8139too.c switch (tp->twistie) { tp 1496 drivers/net/ethernet/realtek/8139too.c tp->twistie = 2; /* Change to state 2. */ tp 1504 drivers/net/ethernet/realtek/8139too.c tp->twistie = 0; /* Bail from future actions. */ tp 1511 drivers/net/ethernet/realtek/8139too.c tp->twist_row = 3; tp 1513 drivers/net/ethernet/realtek/8139too.c tp->twist_row = 2; tp 1515 drivers/net/ethernet/realtek/8139too.c tp->twist_row = 1; tp 1517 drivers/net/ethernet/realtek/8139too.c tp->twist_row = 0; tp 1518 drivers/net/ethernet/realtek/8139too.c tp->twist_col = 0; tp 1519 drivers/net/ethernet/realtek/8139too.c tp->twistie = 3; /* Change to state 2. */ tp 1524 drivers/net/ethernet/realtek/8139too.c if (tp->twist_col == 0) tp 1526 drivers/net/ethernet/realtek/8139too.c RTL_W32 (PARA7c, param[(int) tp->twist_row] tp 1527 drivers/net/ethernet/realtek/8139too.c [(int) tp->twist_col]); tp 1529 drivers/net/ethernet/realtek/8139too.c if (++tp->twist_col >= 4) { tp 1532 drivers/net/ethernet/realtek/8139too.c tp->twistie = tp 1533 drivers/net/ethernet/realtek/8139too.c (tp->twist_row == 3) ? 4 : 0; tp 1540 drivers/net/ethernet/realtek/8139too.c tp->twistie = 0; tp 1544 drivers/net/ethernet/realtek/8139too.c tp->twistie = 5; tp 1554 drivers/net/ethernet/realtek/8139too.c tp->twist_row = 2; tp 1555 drivers/net/ethernet/realtek/8139too.c tp->twist_col = 0; tp 1556 drivers/net/ethernet/realtek/8139too.c tp->twistie = 3; tp 1568 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp, tp 1573 drivers/net/ethernet/realtek/8139too.c mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA); tp 1575 drivers/net/ethernet/realtek/8139too.c if (!tp->mii.force_media && mii_lpa != 0xffff) { tp 1578 drivers/net/ethernet/realtek/8139too.c if (tp->mii.full_duplex != duplex) { tp 1579 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex = duplex; tp 1583 drivers/net/ethernet/realtek/8139too.c tp->mii.full_duplex ? "full" : "half", tp 1584 drivers/net/ethernet/realtek/8139too.c tp->phys[0], mii_lpa); tp 1590 drivers/net/ethernet/realtek/8139too.c RTL_W8 (Config1, tp->mii.full_duplex ? 0x60 : 0x20); tp 1598 drivers/net/ethernet/realtek/8139too.c rtl8139_tune_twister (dev, tp); tp 1610 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = tp 1612 drivers/net/ethernet/realtek/8139too.c struct net_device *dev = tp->mii.dev; tp 1620 drivers/net/ethernet/realtek/8139too.c if (tp->watchdog_fired) { tp 1621 drivers/net/ethernet/realtek/8139too.c tp->watchdog_fired = 0; tp 1624 drivers/net/ethernet/realtek/8139too.c rtl8139_thread_iter(dev, tp, tp->mmio_addr); tp 1626 drivers/net/ethernet/realtek/8139too.c if (tp->have_thread) tp 1627 drivers/net/ethernet/realtek/8139too.c schedule_delayed_work(&tp->thread, thr_delay); tp 1632 drivers/net/ethernet/realtek/8139too.c static void rtl8139_start_thread(struct rtl8139_private *tp) tp 1634 drivers/net/ethernet/realtek/8139too.c tp->twistie = 0; tp 1635 drivers/net/ethernet/realtek/8139too.c if (tp->chipset == CH_8139_K) tp 1636 drivers/net/ethernet/realtek/8139too.c tp->twistie = 1; tp 1637 drivers/net/ethernet/realtek/8139too.c else if (tp->drv_flags & HAS_LNK_CHNG) tp 1640 drivers/net/ethernet/realtek/8139too.c tp->have_thread = 1; tp 1641 drivers/net/ethernet/realtek/8139too.c tp->watchdog_fired = 0; tp 1643 drivers/net/ethernet/realtek/8139too.c schedule_delayed_work(&tp->thread, next_tick); tp 1646 drivers/net/ethernet/realtek/8139too.c static inline void rtl8139_tx_clear (struct rtl8139_private *tp) tp 1648 drivers/net/ethernet/realtek/8139too.c tp->cur_tx = 0; tp 1649 drivers/net/ethernet/realtek/8139too.c tp->dirty_tx = 0; tp 1656 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = tp 1658 drivers/net/ethernet/realtek/8139too.c struct net_device *dev = tp->mii.dev; tp 1659 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1663 drivers/net/ethernet/realtek/8139too.c napi_disable(&tp->napi); tp 1672 drivers/net/ethernet/realtek/8139too.c tp->cur_tx, tp->dirty_tx); tp 1676 drivers/net/ethernet/realtek/8139too.c i == tp->dirty_tx % NUM_TX_DESC ? tp 1679 drivers/net/ethernet/realtek/8139too.c tp->xstats.tx_timeouts++; tp 1686 drivers/net/ethernet/realtek/8139too.c spin_lock_bh(&tp->rx_lock); tp 1691 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 1692 drivers/net/ethernet/realtek/8139too.c rtl8139_tx_clear (tp); tp 1693 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 1696 drivers/net/ethernet/realtek/8139too.c napi_enable(&tp->napi); tp 1700 drivers/net/ethernet/realtek/8139too.c spin_unlock_bh(&tp->rx_lock); tp 1705 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1707 drivers/net/ethernet/realtek/8139too.c tp->watchdog_fired = 1; tp 1708 drivers/net/ethernet/realtek/8139too.c if (!tp->have_thread) { tp 1709 drivers/net/ethernet/realtek/8139too.c INIT_DELAYED_WORK(&tp->thread, rtl8139_thread); tp 1710 drivers/net/ethernet/realtek/8139too.c schedule_delayed_work(&tp->thread, next_tick); tp 1717 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 1718 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1724 drivers/net/ethernet/realtek/8139too.c entry = tp->cur_tx % NUM_TX_DESC; tp 1729 drivers/net/ethernet/realtek/8139too.c memset(tp->tx_buf[entry], 0, ETH_ZLEN); tp 1730 drivers/net/ethernet/realtek/8139too.c skb_copy_and_csum_dev(skb, tp->tx_buf[entry]); tp 1738 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave(&tp->lock, flags); tp 1746 drivers/net/ethernet/realtek/8139too.c tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); tp 1748 drivers/net/ethernet/realtek/8139too.c tp->cur_tx++; tp 1750 drivers/net/ethernet/realtek/8139too.c if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) tp 1752 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore(&tp->lock, flags); tp 1754 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, tx_queued, dev, "Queued Tx packet size %u to slot %d\n", tp 1762 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp, tp 1770 drivers/net/ethernet/realtek/8139too.c dirty_tx = tp->dirty_tx; tp 1771 drivers/net/ethernet/realtek/8139too.c tx_left = tp->cur_tx - dirty_tx; tp 1784 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, tx_err, dev, "Transmit error, Tx status %08x\n", tp 1800 drivers/net/ethernet/realtek/8139too.c if (tp->tx_flag < 0x00300000) tp 1801 drivers/net/ethernet/realtek/8139too.c tp->tx_flag += 0x00020000; tp 1805 drivers/net/ethernet/realtek/8139too.c u64_stats_update_begin(&tp->tx_stats.syncp); tp 1806 drivers/net/ethernet/realtek/8139too.c tp->tx_stats.packets++; tp 1807 drivers/net/ethernet/realtek/8139too.c tp->tx_stats.bytes += txstatus & 0x7ff; tp 1808 drivers/net/ethernet/realtek/8139too.c u64_stats_update_end(&tp->tx_stats.syncp); tp 1816 drivers/net/ethernet/realtek/8139too.c if (tp->cur_tx - dirty_tx > NUM_TX_DESC) { tp 1818 drivers/net/ethernet/realtek/8139too.c dirty_tx, tp->cur_tx); tp 1824 drivers/net/ethernet/realtek/8139too.c if (tp->dirty_tx != dirty_tx) { tp 1825 drivers/net/ethernet/realtek/8139too.c tp->dirty_tx = dirty_tx; tp 1834 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp, void __iomem *ioaddr) tp 1841 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, rx_err, dev, "Ethernet frame had errors, status %08x\n", tp 1857 drivers/net/ethernet/realtek/8139too.c tp->xstats.rx_lost_in_ring++; tp 1864 drivers/net/ethernet/realtek/8139too.c RTL_W32 (RxConfig, tp->rx_config); tp 1865 drivers/net/ethernet/realtek/8139too.c tp->cur_rx = 0; tp 1897 drivers/net/ethernet/realtek/8139too.c tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; tp 1898 drivers/net/ethernet/realtek/8139too.c RTL_W32 (RxConfig, tp->rx_config); tp 1899 drivers/net/ethernet/realtek/8139too.c tp->cur_rx = 0; tp 1907 drivers/net/ethernet/realtek/8139too.c RTL_W32_F (RxBuf, tp->rx_ring_dma); tp 1928 drivers/net/ethernet/realtek/8139too.c static void rtl8139_isr_ack(struct rtl8139_private *tp) tp 1930 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1938 drivers/net/ethernet/realtek/8139too.c tp->dev->stats.rx_errors++; tp 1940 drivers/net/ethernet/realtek/8139too.c tp->dev->stats.rx_fifo_errors++; tp 1946 drivers/net/ethernet/realtek/8139too.c static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, tp 1949 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 1951 drivers/net/ethernet/realtek/8139too.c unsigned char *rx_ring = tp->rx_ring; tp 1952 drivers/net/ethernet/realtek/8139too.c unsigned int cur_rx = tp->cur_rx; tp 1976 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n", tp 1989 drivers/net/ethernet/realtek/8139too.c if (!tp->fifo_copy_timeout) tp 1990 drivers/net/ethernet/realtek/8139too.c tp->fifo_copy_timeout = jiffies + 2; tp 1991 drivers/net/ethernet/realtek/8139too.c else if (time_after(jiffies, tp->fifo_copy_timeout)) { tp 1996 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, intr, dev, "fifo copy in progress\n"); tp 1997 drivers/net/ethernet/realtek/8139too.c tp->xstats.early_rx++; tp 2002 drivers/net/ethernet/realtek/8139too.c tp->fifo_copy_timeout = 0; tp 2030 drivers/net/ethernet/realtek/8139too.c rtl8139_rx_err (rx_status, dev, tp, ioaddr); tp 2039 drivers/net/ethernet/realtek/8139too.c skb = napi_alloc_skb(&tp->napi, pkt_size); tp 2050 drivers/net/ethernet/realtek/8139too.c u64_stats_update_begin(&tp->rx_stats.syncp); tp 2051 drivers/net/ethernet/realtek/8139too.c tp->rx_stats.packets++; tp 2052 drivers/net/ethernet/realtek/8139too.c tp->rx_stats.bytes += pkt_size; tp 2053 drivers/net/ethernet/realtek/8139too.c u64_stats_update_end(&tp->rx_stats.syncp); tp 2064 drivers/net/ethernet/realtek/8139too.c rtl8139_isr_ack(tp); tp 2068 drivers/net/ethernet/realtek/8139too.c rtl8139_isr_ack(tp); tp 2074 drivers/net/ethernet/realtek/8139too.c tp->cur_rx = cur_rx; tp 2080 drivers/net/ethernet/realtek/8139too.c if (tp->fifo_copy_timeout) tp 2089 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp, tp 2096 drivers/net/ethernet/realtek/8139too.c assert (tp != NULL); tp 2104 drivers/net/ethernet/realtek/8139too.c (tp->drv_flags & HAS_LNK_CHNG)) { tp 2118 drivers/net/ethernet/realtek/8139too.c pci_read_config_word (tp->pci_dev, PCI_STATUS, &pci_cmd_status); tp 2119 drivers/net/ethernet/realtek/8139too.c pci_write_config_word (tp->pci_dev, PCI_STATUS, pci_cmd_status); tp 2127 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = container_of(napi, struct rtl8139_private, napi); tp 2128 drivers/net/ethernet/realtek/8139too.c struct net_device *dev = tp->dev; tp 2129 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2132 drivers/net/ethernet/realtek/8139too.c spin_lock(&tp->rx_lock); tp 2135 drivers/net/ethernet/realtek/8139too.c work_done += rtl8139_rx(dev, tp, budget); tp 2140 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave(&tp->lock, flags); tp 2143 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore(&tp->lock, flags); tp 2145 drivers/net/ethernet/realtek/8139too.c spin_unlock(&tp->rx_lock); tp 2155 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2156 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2161 drivers/net/ethernet/realtek/8139too.c spin_lock (&tp->lock); tp 2192 drivers/net/ethernet/realtek/8139too.c if (napi_schedule_prep(&tp->napi)) { tp 2194 drivers/net/ethernet/realtek/8139too.c __napi_schedule(&tp->napi); tp 2200 drivers/net/ethernet/realtek/8139too.c rtl8139_weird_interrupt (dev, tp, ioaddr, tp 2204 drivers/net/ethernet/realtek/8139too.c rtl8139_tx_interrupt (dev, tp, ioaddr); tp 2209 drivers/net/ethernet/realtek/8139too.c spin_unlock (&tp->lock); tp 2223 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2224 drivers/net/ethernet/realtek/8139too.c const int irq = tp->pci_dev->irq; tp 2234 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2235 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2243 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2250 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2257 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2258 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2262 drivers/net/ethernet/realtek/8139too.c napi_disable(&tp->napi); tp 2264 drivers/net/ethernet/realtek/8139too.c netif_dbg(tp, ifdown, dev, "Shutting down ethercard, status was 0x%04x\n", tp 2267 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave (&tp->lock, flags); tp 2279 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore (&tp->lock, flags); tp 2281 drivers/net/ethernet/realtek/8139too.c free_irq(tp->pci_dev->irq, dev); tp 2283 drivers/net/ethernet/realtek/8139too.c rtl8139_tx_clear (tp); tp 2285 drivers/net/ethernet/realtek/8139too.c dma_free_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN, tp 2286 drivers/net/ethernet/realtek/8139too.c tp->rx_ring, tp->rx_ring_dma); tp 2287 drivers/net/ethernet/realtek/8139too.c dma_free_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN, tp 2288 drivers/net/ethernet/realtek/8139too.c tp->tx_bufs, tp->tx_bufs_dma); tp 2289 drivers/net/ethernet/realtek/8139too.c tp->rx_ring = NULL; tp 2290 drivers/net/ethernet/realtek/8139too.c tp->tx_bufs = NULL; tp 2295 drivers/net/ethernet/realtek/8139too.c if (rtl_chip_info[tp->chipset].flags & HasHltClk) tp 2307 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2308 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2310 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2311 drivers/net/ethernet/realtek/8139too.c if (rtl_chip_info[tp->chipset].flags & HasLWake) { tp 2332 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2341 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2342 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2346 drivers/net/ethernet/realtek/8139too.c support = ((rtl_chip_info[tp->chipset].flags & HasLWake) tp 2353 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2374 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2381 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2384 drivers/net/ethernet/realtek/8139too.c strlcpy(info->bus_info, pci_name(tp->pci_dev), sizeof(info->bus_info)); tp 2390 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2391 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2392 drivers/net/ethernet/realtek/8139too.c mii_ethtool_get_link_ksettings(&tp->mii, cmd); tp 2393 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2400 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2402 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2403 drivers/net/ethernet/realtek/8139too.c rc = mii_ethtool_set_link_ksettings(&tp->mii, cmd); tp 2404 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2410 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2411 drivers/net/ethernet/realtek/8139too.c return mii_nway_restart(&tp->mii); tp 2416 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2417 drivers/net/ethernet/realtek/8139too.c return mii_link_ok(&tp->mii); tp 2422 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2423 drivers/net/ethernet/realtek/8139too.c return tp->msg_enable; tp 2428 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2429 drivers/net/ethernet/realtek/8139too.c tp->msg_enable = datum; tp 2434 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp; tp 2438 drivers/net/ethernet/realtek/8139too.c tp = netdev_priv(dev); tp 2439 drivers/net/ethernet/realtek/8139too.c return tp->regs_len; tp 2444 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp; tp 2449 drivers/net/ethernet/realtek/8139too.c tp = netdev_priv(dev); tp 2453 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2454 drivers/net/ethernet/realtek/8139too.c memcpy_fromio(regbuf, tp->mmio_addr, regs->len); tp 2455 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2470 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2472 drivers/net/ethernet/realtek/8139too.c data[0] = tp->xstats.early_rx; tp 2473 drivers/net/ethernet/realtek/8139too.c data[1] = tp->xstats.tx_buf_mapped; tp 2474 drivers/net/ethernet/realtek/8139too.c data[2] = tp->xstats.tx_timeouts; tp 2475 drivers/net/ethernet/realtek/8139too.c data[3] = tp->xstats.rx_lost_in_ring; tp 2502 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2508 drivers/net/ethernet/realtek/8139too.c spin_lock_irq(&tp->lock); tp 2509 drivers/net/ethernet/realtek/8139too.c rc = generic_mii_ioctl(&tp->mii, if_mii(rq), cmd, NULL); tp 2510 drivers/net/ethernet/realtek/8139too.c spin_unlock_irq(&tp->lock); tp 2519 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2520 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2525 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave (&tp->lock, flags); tp 2528 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore (&tp->lock, flags); tp 2534 drivers/net/ethernet/realtek/8139too.c start = u64_stats_fetch_begin_irq(&tp->rx_stats.syncp); tp 2535 drivers/net/ethernet/realtek/8139too.c stats->rx_packets = tp->rx_stats.packets; tp 2536 drivers/net/ethernet/realtek/8139too.c stats->rx_bytes = tp->rx_stats.bytes; tp 2537 drivers/net/ethernet/realtek/8139too.c } while (u64_stats_fetch_retry_irq(&tp->rx_stats.syncp, start)); tp 2540 drivers/net/ethernet/realtek/8139too.c start = u64_stats_fetch_begin_irq(&tp->tx_stats.syncp); tp 2541 drivers/net/ethernet/realtek/8139too.c stats->tx_packets = tp->tx_stats.packets; tp 2542 drivers/net/ethernet/realtek/8139too.c stats->tx_bytes = tp->tx_stats.bytes; tp 2543 drivers/net/ethernet/realtek/8139too.c } while (u64_stats_fetch_retry_irq(&tp->tx_stats.syncp, start)); tp 2551 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2552 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2588 drivers/net/ethernet/realtek/8139too.c if (tp->rx_config != tmp) { tp 2590 drivers/net/ethernet/realtek/8139too.c tp->rx_config = tmp; tp 2599 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2601 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave (&tp->lock, flags); tp 2603 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore (&tp->lock, flags); tp 2611 drivers/net/ethernet/realtek/8139too.c struct rtl8139_private *tp = netdev_priv(dev); tp 2612 drivers/net/ethernet/realtek/8139too.c void __iomem *ioaddr = tp->mmio_addr; tp 2622 drivers/net/ethernet/realtek/8139too.c spin_lock_irqsave (&tp->lock, flags); tp 2632 drivers/net/ethernet/realtek/8139too.c spin_unlock_irqrestore (&tp->lock, flags); tp 135 drivers/net/ethernet/realtek/r8169_firmware.c void rtl_fw_write_firmware(struct rtl8169_private *tp, struct rtl_fw *rtl_fw) tp 154 drivers/net/ethernet/realtek/r8169_firmware.c predata = fw_read(tp, regno); tp 180 drivers/net/ethernet/realtek/r8169_firmware.c fw_write(tp, regno, data); tp 195 drivers/net/ethernet/realtek/r8169_firmware.c fw_write(tp, regno, predata); tp 15 drivers/net/ethernet/realtek/r8169_firmware.h typedef void (*rtl_fw_write_t)(struct rtl8169_private *tp, int reg, int val); tp 16 drivers/net/ethernet/realtek/r8169_firmware.h typedef int (*rtl_fw_read_t)(struct rtl8169_private *tp, int reg); tp 39 drivers/net/ethernet/realtek/r8169_firmware.h void rtl_fw_write_firmware(struct rtl8169_private *tp, struct rtl_fw *rtl_fw); tp 79 drivers/net/ethernet/realtek/r8169_main.c #define RTL_W8(tp, reg, val8) writeb((val8), tp->mmio_addr + (reg)) tp 80 drivers/net/ethernet/realtek/r8169_main.c #define RTL_W16(tp, reg, val16) writew((val16), tp->mmio_addr + (reg)) tp 81 drivers/net/ethernet/realtek/r8169_main.c #define RTL_W32(tp, reg, val32) writel((val32), tp->mmio_addr + (reg)) tp 82 drivers/net/ethernet/realtek/r8169_main.c #define RTL_R8(tp, reg) readb(tp->mmio_addr + (reg)) tp 83 drivers/net/ethernet/realtek/r8169_main.c #define RTL_R16(tp, reg) readw(tp->mmio_addr + (reg)) tp 84 drivers/net/ethernet/realtek/r8169_main.c #define RTL_R32(tp, reg) readl(tp->mmio_addr + (reg)) tp 691 drivers/net/ethernet/realtek/r8169_main.c typedef void (*rtl_generic_fct)(struct rtl8169_private *tp); tp 720 drivers/net/ethernet/realtek/r8169_main.c static inline struct device *tp_to_dev(struct rtl8169_private *tp) tp 722 drivers/net/ethernet/realtek/r8169_main.c return &tp->pci_dev->dev; tp 725 drivers/net/ethernet/realtek/r8169_main.c static void rtl_lock_work(struct rtl8169_private *tp) tp 727 drivers/net/ethernet/realtek/r8169_main.c mutex_lock(&tp->wk.mutex); tp 730 drivers/net/ethernet/realtek/r8169_main.c static void rtl_unlock_work(struct rtl8169_private *tp) tp 732 drivers/net/ethernet/realtek/r8169_main.c mutex_unlock(&tp->wk.mutex); tp 735 drivers/net/ethernet/realtek/r8169_main.c static void rtl_lock_config_regs(struct rtl8169_private *tp) tp 737 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Cfg9346, Cfg9346_Lock); tp 740 drivers/net/ethernet/realtek/r8169_main.c static void rtl_unlock_config_regs(struct rtl8169_private *tp) tp 742 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Cfg9346, Cfg9346_Unlock); tp 745 drivers/net/ethernet/realtek/r8169_main.c static void rtl_tx_performance_tweak(struct rtl8169_private *tp, u16 force) tp 747 drivers/net/ethernet/realtek/r8169_main.c pcie_capability_clear_and_set_word(tp->pci_dev, PCI_EXP_DEVCTL, tp 751 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_is_8125(struct rtl8169_private *tp) tp 753 drivers/net/ethernet/realtek/r8169_main.c return tp->mac_version >= RTL_GIGA_MAC_VER_60; tp 756 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_is_8168evl_up(struct rtl8169_private *tp) tp 758 drivers/net/ethernet/realtek/r8169_main.c return tp->mac_version >= RTL_GIGA_MAC_VER_34 && tp 759 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version != RTL_GIGA_MAC_VER_39 && tp 760 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version <= RTL_GIGA_MAC_VER_51; tp 763 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_supports_eee(struct rtl8169_private *tp) tp 765 drivers/net/ethernet/realtek/r8169_main.c return tp->mac_version >= RTL_GIGA_MAC_VER_34 && tp 766 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version != RTL_GIGA_MAC_VER_37 && tp 767 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version != RTL_GIGA_MAC_VER_39; tp 770 drivers/net/ethernet/realtek/r8169_main.c static void rtl_read_mac_from_reg(struct rtl8169_private *tp, u8 *mac, int reg) tp 775 drivers/net/ethernet/realtek/r8169_main.c mac[i] = RTL_R8(tp, reg + i); tp 788 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_loop_wait(struct rtl8169_private *tp, const struct rtl_cond *c, tp 795 drivers/net/ethernet/realtek/r8169_main.c if (c->check(tp) == high) tp 799 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, tp->dev, "%s == %d (loop: %d, delay: %d).\n", tp 804 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_udelay_loop_wait_high(struct rtl8169_private *tp, tp 808 drivers/net/ethernet/realtek/r8169_main.c return rtl_loop_wait(tp, c, rtl_udelay, d, n, true); tp 811 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_udelay_loop_wait_low(struct rtl8169_private *tp, tp 815 drivers/net/ethernet/realtek/r8169_main.c return rtl_loop_wait(tp, c, rtl_udelay, d, n, false); tp 818 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_msleep_loop_wait_high(struct rtl8169_private *tp, tp 822 drivers/net/ethernet/realtek/r8169_main.c return rtl_loop_wait(tp, c, msleep, d, n, true); tp 825 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_msleep_loop_wait_low(struct rtl8169_private *tp, tp 829 drivers/net/ethernet/realtek/r8169_main.c return rtl_loop_wait(tp, c, msleep, d, n, false); tp 840 drivers/net/ethernet/realtek/r8169_main.c static bool name ## _check(struct rtl8169_private *tp) tp 842 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_ocp_reg_failure(struct rtl8169_private *tp, u32 reg) tp 845 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, tp->dev, "Invalid ocp reg %x!\n", reg); tp 853 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, GPHY_OCP) & OCPAR_FLAG; tp 856 drivers/net/ethernet/realtek/r8169_main.c static void r8168_phy_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) tp 858 drivers/net/ethernet/realtek/r8169_main.c if (rtl_ocp_reg_failure(tp, reg)) tp 861 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, GPHY_OCP, OCPAR_FLAG | (reg << 15) | data); tp 863 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_ocp_gphy_cond, 25, 10); tp 866 drivers/net/ethernet/realtek/r8169_main.c static int r8168_phy_ocp_read(struct rtl8169_private *tp, u32 reg) tp 868 drivers/net/ethernet/realtek/r8169_main.c if (rtl_ocp_reg_failure(tp, reg)) tp 871 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, GPHY_OCP, reg << 15); tp 873 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_ocp_gphy_cond, 25, 10) ? tp 874 drivers/net/ethernet/realtek/r8169_main.c (RTL_R32(tp, GPHY_OCP) & 0xffff) : -ETIMEDOUT; tp 877 drivers/net/ethernet/realtek/r8169_main.c static void r8168_mac_ocp_write(struct rtl8169_private *tp, u32 reg, u32 data) tp 879 drivers/net/ethernet/realtek/r8169_main.c if (rtl_ocp_reg_failure(tp, reg)) tp 882 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPDR, OCPAR_FLAG | (reg << 15) | data); tp 885 drivers/net/ethernet/realtek/r8169_main.c static u16 r8168_mac_ocp_read(struct rtl8169_private *tp, u32 reg) tp 887 drivers/net/ethernet/realtek/r8169_main.c if (rtl_ocp_reg_failure(tp, reg)) tp 890 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPDR, reg << 15); tp 892 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, OCPDR); tp 895 drivers/net/ethernet/realtek/r8169_main.c static void r8168_mac_ocp_modify(struct rtl8169_private *tp, u32 reg, u16 mask, tp 898 drivers/net/ethernet/realtek/r8169_main.c u16 data = r8168_mac_ocp_read(tp, reg); tp 900 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, reg, (data & ~mask) | set); tp 905 drivers/net/ethernet/realtek/r8169_main.c static void r8168g_mdio_write(struct rtl8169_private *tp, int reg, int value) tp 908 drivers/net/ethernet/realtek/r8169_main.c tp->ocp_base = value ? value << 4 : OCP_STD_PHY_BASE; tp 912 drivers/net/ethernet/realtek/r8169_main.c if (tp->ocp_base != OCP_STD_PHY_BASE) tp 915 drivers/net/ethernet/realtek/r8169_main.c r8168_phy_ocp_write(tp, tp->ocp_base + reg * 2, value); tp 918 drivers/net/ethernet/realtek/r8169_main.c static int r8168g_mdio_read(struct rtl8169_private *tp, int reg) tp 921 drivers/net/ethernet/realtek/r8169_main.c return tp->ocp_base == OCP_STD_PHY_BASE ? 0 : tp->ocp_base >> 4; tp 923 drivers/net/ethernet/realtek/r8169_main.c if (tp->ocp_base != OCP_STD_PHY_BASE) tp 926 drivers/net/ethernet/realtek/r8169_main.c return r8168_phy_ocp_read(tp, tp->ocp_base + reg * 2); tp 929 drivers/net/ethernet/realtek/r8169_main.c static void mac_mcu_write(struct rtl8169_private *tp, int reg, int value) tp 932 drivers/net/ethernet/realtek/r8169_main.c tp->ocp_base = value << 4; tp 936 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, tp->ocp_base + reg, value); tp 939 drivers/net/ethernet/realtek/r8169_main.c static int mac_mcu_read(struct rtl8169_private *tp, int reg) tp 941 drivers/net/ethernet/realtek/r8169_main.c return r8168_mac_ocp_read(tp, tp->ocp_base + reg); tp 946 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, PHYAR) & 0x80000000; tp 949 drivers/net/ethernet/realtek/r8169_main.c static void r8169_mdio_write(struct rtl8169_private *tp, int reg, int value) tp 951 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, PHYAR, 0x80000000 | (reg & 0x1f) << 16 | (value & 0xffff)); tp 953 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_phyar_cond, 25, 20); tp 961 drivers/net/ethernet/realtek/r8169_main.c static int r8169_mdio_read(struct rtl8169_private *tp, int reg) tp 965 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, PHYAR, 0x0 | (reg & 0x1f) << 16); tp 967 drivers/net/ethernet/realtek/r8169_main.c value = rtl_udelay_loop_wait_high(tp, &rtl_phyar_cond, 25, 20) ? tp 968 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, PHYAR) & 0xffff : -ETIMEDOUT; tp 981 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, OCPAR) & OCPAR_FLAG; tp 984 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_1_mdio_access(struct rtl8169_private *tp, int reg, u32 data) tp 986 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPDR, data | ((reg & OCPDR_REG_MASK) << OCPDR_GPHY_REG_SHIFT)); tp 987 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPAR, OCPAR_GPHY_WRITE_CMD); tp 988 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, EPHY_RXER_NUM, 0); tp 990 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_ocpar_cond, 1000, 100); tp 993 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_1_mdio_write(struct rtl8169_private *tp, int reg, int value) tp 995 drivers/net/ethernet/realtek/r8169_main.c r8168dp_1_mdio_access(tp, reg, tp 999 drivers/net/ethernet/realtek/r8169_main.c static int r8168dp_1_mdio_read(struct rtl8169_private *tp, int reg) tp 1001 drivers/net/ethernet/realtek/r8169_main.c r8168dp_1_mdio_access(tp, reg, OCPDR_READ_CMD); tp 1004 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPAR, OCPAR_GPHY_READ_CMD); tp 1005 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, EPHY_RXER_NUM, 0); tp 1007 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_ocpar_cond, 1000, 100) ? tp 1008 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, OCPDR) & OCPDR_DATA_MASK : -ETIMEDOUT; tp 1013 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_2_mdio_start(struct rtl8169_private *tp) tp 1015 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, 0xd0, RTL_R32(tp, 0xd0) & ~R8168DP_1_MDIO_ACCESS_BIT); tp 1018 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_2_mdio_stop(struct rtl8169_private *tp) tp 1020 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, 0xd0, RTL_R32(tp, 0xd0) | R8168DP_1_MDIO_ACCESS_BIT); tp 1023 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_2_mdio_write(struct rtl8169_private *tp, int reg, int value) tp 1025 drivers/net/ethernet/realtek/r8169_main.c r8168dp_2_mdio_start(tp); tp 1027 drivers/net/ethernet/realtek/r8169_main.c r8169_mdio_write(tp, reg, value); tp 1029 drivers/net/ethernet/realtek/r8169_main.c r8168dp_2_mdio_stop(tp); tp 1032 drivers/net/ethernet/realtek/r8169_main.c static int r8168dp_2_mdio_read(struct rtl8169_private *tp, int reg) tp 1040 drivers/net/ethernet/realtek/r8169_main.c r8168dp_2_mdio_start(tp); tp 1042 drivers/net/ethernet/realtek/r8169_main.c value = r8169_mdio_read(tp, reg); tp 1044 drivers/net/ethernet/realtek/r8169_main.c r8168dp_2_mdio_stop(tp); tp 1049 drivers/net/ethernet/realtek/r8169_main.c static void rtl_writephy(struct rtl8169_private *tp, int location, int val) tp 1051 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1053 drivers/net/ethernet/realtek/r8169_main.c r8168dp_1_mdio_write(tp, location, val); tp 1057 drivers/net/ethernet/realtek/r8169_main.c r8168dp_2_mdio_write(tp, location, val); tp 1060 drivers/net/ethernet/realtek/r8169_main.c r8168g_mdio_write(tp, location, val); tp 1063 drivers/net/ethernet/realtek/r8169_main.c r8169_mdio_write(tp, location, val); tp 1068 drivers/net/ethernet/realtek/r8169_main.c static int rtl_readphy(struct rtl8169_private *tp, int location) tp 1070 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1072 drivers/net/ethernet/realtek/r8169_main.c return r8168dp_1_mdio_read(tp, location); tp 1075 drivers/net/ethernet/realtek/r8169_main.c return r8168dp_2_mdio_read(tp, location); tp 1077 drivers/net/ethernet/realtek/r8169_main.c return r8168g_mdio_read(tp, location); tp 1079 drivers/net/ethernet/realtek/r8169_main.c return r8169_mdio_read(tp, location); tp 1083 drivers/net/ethernet/realtek/r8169_main.c static void rtl_patchphy(struct rtl8169_private *tp, int reg_addr, int value) tp 1085 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, reg_addr, rtl_readphy(tp, reg_addr) | value); tp 1088 drivers/net/ethernet/realtek/r8169_main.c static void rtl_w0w1_phy(struct rtl8169_private *tp, int reg_addr, int p, int m) tp 1092 drivers/net/ethernet/realtek/r8169_main.c val = rtl_readphy(tp, reg_addr); tp 1093 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, reg_addr, (val & ~m) | p); tp 1098 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, EPHYAR) & EPHYAR_FLAG; tp 1101 drivers/net/ethernet/realtek/r8169_main.c static void rtl_ephy_write(struct rtl8169_private *tp, int reg_addr, int value) tp 1103 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, EPHYAR, EPHYAR_WRITE_CMD | (value & EPHYAR_DATA_MASK) | tp 1106 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_ephyar_cond, 10, 100); tp 1111 drivers/net/ethernet/realtek/r8169_main.c static u16 rtl_ephy_read(struct rtl8169_private *tp, int reg_addr) tp 1113 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, EPHYAR, (reg_addr & EPHYAR_REG_MASK) << EPHYAR_REG_SHIFT); tp 1115 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_ephyar_cond, 10, 100) ? tp 1116 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, EPHYAR) & EPHYAR_DATA_MASK : ~0; tp 1121 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, ERIAR) & ERIAR_FLAG; tp 1124 drivers/net/ethernet/realtek/r8169_main.c static void _rtl_eri_write(struct rtl8169_private *tp, int addr, u32 mask, tp 1128 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, ERIDR, val); tp 1129 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, ERIAR, ERIAR_WRITE_CMD | type | mask | addr); tp 1131 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_eriar_cond, 100, 100); tp 1134 drivers/net/ethernet/realtek/r8169_main.c static void rtl_eri_write(struct rtl8169_private *tp, int addr, u32 mask, tp 1137 drivers/net/ethernet/realtek/r8169_main.c _rtl_eri_write(tp, addr, mask, val, ERIAR_EXGMAC); tp 1140 drivers/net/ethernet/realtek/r8169_main.c static u32 _rtl_eri_read(struct rtl8169_private *tp, int addr, int type) tp 1142 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, ERIAR, ERIAR_READ_CMD | type | ERIAR_MASK_1111 | addr); tp 1144 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_eriar_cond, 100, 100) ? tp 1145 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, ERIDR) : ~0; tp 1148 drivers/net/ethernet/realtek/r8169_main.c static u32 rtl_eri_read(struct rtl8169_private *tp, int addr) tp 1150 drivers/net/ethernet/realtek/r8169_main.c return _rtl_eri_read(tp, addr, ERIAR_EXGMAC); tp 1153 drivers/net/ethernet/realtek/r8169_main.c static void rtl_w0w1_eri(struct rtl8169_private *tp, int addr, u32 mask, u32 p, tp 1158 drivers/net/ethernet/realtek/r8169_main.c val = rtl_eri_read(tp, addr); tp 1159 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, addr, mask, (val & ~m) | p); tp 1162 drivers/net/ethernet/realtek/r8169_main.c static void rtl_eri_set_bits(struct rtl8169_private *tp, int addr, u32 mask, tp 1165 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, addr, mask, p, 0); tp 1168 drivers/net/ethernet/realtek/r8169_main.c static void rtl_eri_clear_bits(struct rtl8169_private *tp, int addr, u32 mask, tp 1171 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, addr, mask, 0, m); tp 1174 drivers/net/ethernet/realtek/r8169_main.c static u32 r8168dp_ocp_read(struct rtl8169_private *tp, u8 mask, u16 reg) tp 1176 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPAR, ((u32)mask & 0x0f) << 12 | (reg & 0x0fff)); tp 1177 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_ocpar_cond, 100, 20) ? tp 1178 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, OCPDR) : ~0; tp 1181 drivers/net/ethernet/realtek/r8169_main.c static u32 r8168ep_ocp_read(struct rtl8169_private *tp, u8 mask, u16 reg) tp 1183 drivers/net/ethernet/realtek/r8169_main.c return _rtl_eri_read(tp, reg, ERIAR_OOB); tp 1186 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_ocp_write(struct rtl8169_private *tp, u8 mask, u16 reg, tp 1189 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPDR, data); tp 1190 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, OCPAR, OCPAR_FLAG | ((u32)mask & 0x0f) << 12 | (reg & 0x0fff)); tp 1191 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_ocpar_cond, 100, 20); tp 1194 drivers/net/ethernet/realtek/r8169_main.c static void r8168ep_ocp_write(struct rtl8169_private *tp, u8 mask, u16 reg, tp 1197 drivers/net/ethernet/realtek/r8169_main.c _rtl_eri_write(tp, reg, ((u32)mask & 0x0f) << ERIAR_MASK_SHIFT, tp 1201 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_oob_notify(struct rtl8169_private *tp, u8 cmd) tp 1203 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xe8, ERIAR_MASK_0001, cmd); tp 1205 drivers/net/ethernet/realtek/r8169_main.c r8168dp_ocp_write(tp, 0x1, 0x30, 0x00000001); tp 1212 drivers/net/ethernet/realtek/r8169_main.c static u16 rtl8168_get_ocp_reg(struct rtl8169_private *tp) tp 1214 drivers/net/ethernet/realtek/r8169_main.c return (tp->mac_version == RTL_GIGA_MAC_VER_31) ? 0xb8 : 0x10; tp 1221 drivers/net/ethernet/realtek/r8169_main.c reg = rtl8168_get_ocp_reg(tp); tp 1223 drivers/net/ethernet/realtek/r8169_main.c return r8168dp_ocp_read(tp, 0x0f, reg) & 0x00000800; tp 1228 drivers/net/ethernet/realtek/r8169_main.c return r8168ep_ocp_read(tp, 0x0f, 0x124) & 0x00000001; tp 1233 drivers/net/ethernet/realtek/r8169_main.c return RTL_R8(tp, IBISR0) & 0x20; tp 1236 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168ep_stop_cmac(struct rtl8169_private *tp) tp 1238 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, IBCR2, RTL_R8(tp, IBCR2) & ~0x01); tp 1239 drivers/net/ethernet/realtek/r8169_main.c rtl_msleep_loop_wait_high(tp, &rtl_ocp_tx_cond, 50, 2000); tp 1240 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, IBISR0, RTL_R8(tp, IBISR0) | 0x20); tp 1241 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, IBCR0, RTL_R8(tp, IBCR0) & ~0x01); tp 1244 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168dp_driver_start(struct rtl8169_private *tp) tp 1246 drivers/net/ethernet/realtek/r8169_main.c r8168dp_oob_notify(tp, OOB_CMD_DRIVER_START); tp 1247 drivers/net/ethernet/realtek/r8169_main.c rtl_msleep_loop_wait_high(tp, &rtl_dp_ocp_read_cond, 10, 10); tp 1250 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168ep_driver_start(struct rtl8169_private *tp) tp 1252 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_write(tp, 0x01, 0x180, OOB_CMD_DRIVER_START); tp 1253 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_write(tp, 0x01, 0x30, tp 1254 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_read(tp, 0x01, 0x30) | 0x01); tp 1255 drivers/net/ethernet/realtek/r8169_main.c rtl_msleep_loop_wait_high(tp, &rtl_ep_ocp_read_cond, 10, 10); tp 1258 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168_driver_start(struct rtl8169_private *tp) tp 1260 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1264 drivers/net/ethernet/realtek/r8169_main.c rtl8168dp_driver_start(tp); tp 1269 drivers/net/ethernet/realtek/r8169_main.c rtl8168ep_driver_start(tp); tp 1277 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168dp_driver_stop(struct rtl8169_private *tp) tp 1279 drivers/net/ethernet/realtek/r8169_main.c r8168dp_oob_notify(tp, OOB_CMD_DRIVER_STOP); tp 1280 drivers/net/ethernet/realtek/r8169_main.c rtl_msleep_loop_wait_low(tp, &rtl_dp_ocp_read_cond, 10, 10); tp 1283 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168ep_driver_stop(struct rtl8169_private *tp) tp 1285 drivers/net/ethernet/realtek/r8169_main.c rtl8168ep_stop_cmac(tp); tp 1286 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_write(tp, 0x01, 0x180, OOB_CMD_DRIVER_STOP); tp 1287 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_write(tp, 0x01, 0x30, tp 1288 drivers/net/ethernet/realtek/r8169_main.c r8168ep_ocp_read(tp, 0x01, 0x30) | 0x01); tp 1289 drivers/net/ethernet/realtek/r8169_main.c rtl_msleep_loop_wait_low(tp, &rtl_ep_ocp_read_cond, 10, 10); tp 1292 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168_driver_stop(struct rtl8169_private *tp) tp 1294 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1298 drivers/net/ethernet/realtek/r8169_main.c rtl8168dp_driver_stop(tp); tp 1303 drivers/net/ethernet/realtek/r8169_main.c rtl8168ep_driver_stop(tp); tp 1311 drivers/net/ethernet/realtek/r8169_main.c static bool r8168dp_check_dash(struct rtl8169_private *tp) tp 1313 drivers/net/ethernet/realtek/r8169_main.c u16 reg = rtl8168_get_ocp_reg(tp); tp 1315 drivers/net/ethernet/realtek/r8169_main.c return !!(r8168dp_ocp_read(tp, 0x0f, reg) & 0x00008000); tp 1318 drivers/net/ethernet/realtek/r8169_main.c static bool r8168ep_check_dash(struct rtl8169_private *tp) tp 1320 drivers/net/ethernet/realtek/r8169_main.c return !!(r8168ep_ocp_read(tp, 0x0f, 0x128) & 0x00000001); tp 1323 drivers/net/ethernet/realtek/r8169_main.c static bool r8168_check_dash(struct rtl8169_private *tp) tp 1325 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1329 drivers/net/ethernet/realtek/r8169_main.c return r8168dp_check_dash(tp); tp 1333 drivers/net/ethernet/realtek/r8169_main.c return r8168ep_check_dash(tp); tp 1339 drivers/net/ethernet/realtek/r8169_main.c static void rtl_reset_packet_filter(struct rtl8169_private *tp) tp 1341 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_clear_bits(tp, 0xdc, ERIAR_MASK_0001, BIT(0)); tp 1342 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0xdc, ERIAR_MASK_0001, BIT(0)); tp 1347 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, EFUSEAR) & EFUSEAR_FLAG; tp 1350 drivers/net/ethernet/realtek/r8169_main.c static u8 rtl8168d_efuse_read(struct rtl8169_private *tp, int reg_addr) tp 1352 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, EFUSEAR, (reg_addr & EFUSEAR_REG_MASK) << EFUSEAR_REG_SHIFT); tp 1354 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_efusear_cond, 100, 300) ? tp 1355 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, EFUSEAR) & EFUSEAR_DATA_MASK : ~0; tp 1358 drivers/net/ethernet/realtek/r8169_main.c static u32 rtl_get_events(struct rtl8169_private *tp) tp 1360 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 1361 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, IntrStatus_8125); tp 1363 drivers/net/ethernet/realtek/r8169_main.c return RTL_R16(tp, IntrStatus); tp 1366 drivers/net/ethernet/realtek/r8169_main.c static void rtl_ack_events(struct rtl8169_private *tp, u32 bits) tp 1368 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 1369 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, IntrStatus_8125, bits); tp 1371 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrStatus, bits); tp 1374 drivers/net/ethernet/realtek/r8169_main.c static void rtl_irq_disable(struct rtl8169_private *tp) tp 1376 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 1377 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, IntrMask_8125, 0); tp 1379 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrMask, 0); tp 1380 drivers/net/ethernet/realtek/r8169_main.c tp->irq_enabled = 0; tp 1387 drivers/net/ethernet/realtek/r8169_main.c static void rtl_irq_enable(struct rtl8169_private *tp) tp 1389 drivers/net/ethernet/realtek/r8169_main.c tp->irq_enabled = 1; tp 1390 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 1391 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, IntrMask_8125, tp->irq_mask); tp 1393 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrMask, tp->irq_mask); tp 1396 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp) tp 1398 drivers/net/ethernet/realtek/r8169_main.c rtl_irq_disable(tp); tp 1399 drivers/net/ethernet/realtek/r8169_main.c rtl_ack_events(tp, 0xffffffff); tp 1401 drivers/net/ethernet/realtek/r8169_main.c RTL_R8(tp, ChipCmd); tp 1404 drivers/net/ethernet/realtek/r8169_main.c static void rtl_link_chg_patch(struct rtl8169_private *tp) tp 1406 drivers/net/ethernet/realtek/r8169_main.c struct net_device *dev = tp->dev; tp 1407 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 1412 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_34 || tp 1413 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_38) { tp 1415 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1bc, ERIAR_MASK_1111, 0x00000011); tp 1416 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_1111, 0x00000005); tp 1418 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1bc, ERIAR_MASK_1111, 0x0000001f); tp 1419 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_1111, 0x00000005); tp 1421 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1bc, ERIAR_MASK_1111, 0x0000001f); tp 1422 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_1111, 0x0000003f); tp 1424 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 1425 drivers/net/ethernet/realtek/r8169_main.c } else if (tp->mac_version == RTL_GIGA_MAC_VER_35 || tp 1426 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_36) { tp 1428 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1bc, ERIAR_MASK_1111, 0x00000011); tp 1429 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_1111, 0x00000005); tp 1431 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1bc, ERIAR_MASK_1111, 0x0000001f); tp 1432 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_1111, 0x0000003f); tp 1434 drivers/net/ethernet/realtek/r8169_main.c } else if (tp->mac_version == RTL_GIGA_MAC_VER_37) { tp 1436 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1d0, ERIAR_MASK_0011, 0x4d02); tp 1437 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1dc, ERIAR_MASK_0011, 0x0060a); tp 1439 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1d0, ERIAR_MASK_0011, 0x0000); tp 1448 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1450 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 1452 drivers/net/ethernet/realtek/r8169_main.c wol->wolopts = tp->saved_wolopts; tp 1453 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 1456 drivers/net/ethernet/realtek/r8169_main.c static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts) tp 1473 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 1475 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8168evl_up(tp)) { tp 1478 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x0dc, ERIAR_MASK_0100, tp 1481 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_clear_bits(tp, 0x0dc, ERIAR_MASK_0100, tp 1483 drivers/net/ethernet/realtek/r8169_main.c } else if (rtl_is_8125(tp)) { tp 1486 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xc0b6, 0, BIT(0)); tp 1488 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xc0b6, BIT(0), 0); tp 1492 drivers/net/ethernet/realtek/r8169_main.c options = RTL_R8(tp, cfg[i].reg) & ~cfg[i].mask; tp 1495 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, cfg[i].reg, options); tp 1498 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 1500 drivers/net/ethernet/realtek/r8169_main.c options = RTL_R8(tp, Config1) & ~PMEnable; tp 1503 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, options); tp 1508 drivers/net/ethernet/realtek/r8169_main.c options = RTL_R8(tp, Config2) & ~PME_SIGNAL; tp 1511 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config2, options); tp 1517 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 1519 drivers/net/ethernet/realtek/r8169_main.c device_set_wakeup_enable(tp_to_dev(tp), wolopts); tp 1520 drivers/net/ethernet/realtek/r8169_main.c tp->dev->wol_enabled = wolopts ? 1 : 0; tp 1525 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1526 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 1533 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 1535 drivers/net/ethernet/realtek/r8169_main.c tp->saved_wolopts = wol->wolopts; tp 1538 drivers/net/ethernet/realtek/r8169_main.c __rtl8169_set_wol(tp, tp->saved_wolopts); tp 1540 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 1550 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1551 drivers/net/ethernet/realtek/r8169_main.c struct rtl_fw *rtl_fw = tp->rtl_fw; tp 1554 drivers/net/ethernet/realtek/r8169_main.c strlcpy(info->bus_info, pci_name(tp->pci_dev), sizeof(info->bus_info)); tp 1569 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1575 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version > RTL_GIGA_MAC_VER_06) tp 1584 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1587 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 1589 drivers/net/ethernet/realtek/r8169_main.c rx_config = RTL_R32(tp, RxConfig); tp 1595 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) { tp 1602 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, rx_config); tp 1605 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= RxChkSum; tp 1607 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd &= ~RxChkSum; tp 1609 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_is_8125(tp)) { tp 1611 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= RxVlan; tp 1613 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd &= ~RxVlan; tp 1616 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, CPlusCmd, tp->cp_cmd); tp 1617 drivers/net/ethernet/realtek/r8169_main.c RTL_R16(tp, CPlusCmd); tp 1619 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 1641 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1642 drivers/net/ethernet/realtek/r8169_main.c u32 __iomem *data = tp->mmio_addr; tp 1646 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 1649 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 1654 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1656 drivers/net/ethernet/realtek/r8169_main.c return tp->msg_enable; tp 1661 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1663 drivers/net/ethernet/realtek/r8169_main.c tp->msg_enable = value; tp 1694 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, CounterAddrLow) & (CounterReset | CounterDump); tp 1697 drivers/net/ethernet/realtek/r8169_main.c static bool rtl8169_do_counters(struct rtl8169_private *tp, u32 counter_cmd) tp 1699 drivers/net/ethernet/realtek/r8169_main.c dma_addr_t paddr = tp->counters_phys_addr; tp 1702 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CounterAddrHigh, (u64)paddr >> 32); tp 1703 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, CounterAddrHigh); tp 1705 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CounterAddrLow, cmd); tp 1706 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CounterAddrLow, cmd | counter_cmd); tp 1708 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_low(tp, &rtl_counters_cond, 10, 1000); tp 1711 drivers/net/ethernet/realtek/r8169_main.c static bool rtl8169_reset_counters(struct rtl8169_private *tp) tp 1717 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version < RTL_GIGA_MAC_VER_19) tp 1720 drivers/net/ethernet/realtek/r8169_main.c return rtl8169_do_counters(tp, CounterReset); tp 1723 drivers/net/ethernet/realtek/r8169_main.c static bool rtl8169_update_counters(struct rtl8169_private *tp) tp 1725 drivers/net/ethernet/realtek/r8169_main.c u8 val = RTL_R8(tp, ChipCmd); tp 1734 drivers/net/ethernet/realtek/r8169_main.c return rtl8169_do_counters(tp, CounterDump); tp 1737 drivers/net/ethernet/realtek/r8169_main.c static bool rtl8169_init_counter_offsets(struct rtl8169_private *tp) tp 1739 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_counters *counters = tp->counters; tp 1757 drivers/net/ethernet/realtek/r8169_main.c if (tp->tc_offset.inited) tp 1761 drivers/net/ethernet/realtek/r8169_main.c if (rtl8169_reset_counters(tp)) tp 1764 drivers/net/ethernet/realtek/r8169_main.c if (rtl8169_update_counters(tp)) tp 1767 drivers/net/ethernet/realtek/r8169_main.c tp->tc_offset.tx_errors = counters->tx_errors; tp 1768 drivers/net/ethernet/realtek/r8169_main.c tp->tc_offset.tx_multi_collision = counters->tx_multi_collision; tp 1769 drivers/net/ethernet/realtek/r8169_main.c tp->tc_offset.tx_aborted = counters->tx_aborted; tp 1770 drivers/net/ethernet/realtek/r8169_main.c tp->tc_offset.inited = true; tp 1778 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1779 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 1780 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_counters *counters = tp->counters; tp 1787 drivers/net/ethernet/realtek/r8169_main.c rtl8169_update_counters(tp); tp 1882 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1885 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version <= RTL_GIGA_MAC_VER_06) tp 1891 drivers/net/ethernet/realtek/r8169_main.c if (tp->phydev->speed == ci->speed) tp 1900 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1913 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 1923 drivers/net/ethernet/realtek/r8169_main.c scale = &ci->scalev[tp->cp_cmd & INTT_MASK]; tp 1926 drivers/net/ethernet/realtek/r8169_main.c for (w = RTL_R16(tp, IntrMitigate); w; w >>= RTL_COALESCE_SHIFT, p++) { tp 1972 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 1984 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 2021 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 2023 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrMitigate, swab16(w)); tp 2025 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd = (tp->cp_cmd & ~INTT_MASK) | cp01; tp 2026 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, CPlusCmd, tp->cp_cmd); tp 2027 drivers/net/ethernet/realtek/r8169_main.c RTL_R16(tp, CPlusCmd); tp 2029 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 2036 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 2037 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 2040 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_supports_eee(tp)) tp 2048 drivers/net/ethernet/realtek/r8169_main.c ret = phy_ethtool_get_eee(tp->phydev, data); tp 2058 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 2059 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 2062 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_supports_eee(tp)) tp 2078 drivers/net/ethernet/realtek/r8169_main.c ret = phy_ethtool_set_eee(tp->phydev, data); tp 2081 drivers/net/ethernet/realtek/r8169_main.c tp->eee_adv = phy_read_mmd(dev->phydev, MDIO_MMD_AN, tp 2110 drivers/net/ethernet/realtek/r8169_main.c static void rtl_enable_eee(struct rtl8169_private *tp) tp 2112 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 2116 drivers/net/ethernet/realtek/r8169_main.c if (tp->eee_adv >= 0) tp 2117 drivers/net/ethernet/realtek/r8169_main.c adv = tp->eee_adv; tp 2125 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_get_mac_version(struct rtl8169_private *tp) tp 2227 drivers/net/ethernet/realtek/r8169_main.c u16 reg = RTL_R32(tp, TxConfig) >> 20; tp 2231 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version = p->mac_version; tp 2233 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_NONE) { tp 2234 drivers/net/ethernet/realtek/r8169_main.c dev_err(tp_to_dev(tp), "unknown chip XID %03x\n", reg & 0xfcf); tp 2235 drivers/net/ethernet/realtek/r8169_main.c } else if (!tp->supports_gmii) { tp 2236 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_42) tp 2237 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version = RTL_GIGA_MAC_VER_43; tp 2238 drivers/net/ethernet/realtek/r8169_main.c else if (tp->mac_version == RTL_GIGA_MAC_VER_45) tp 2239 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version = RTL_GIGA_MAC_VER_47; tp 2240 drivers/net/ethernet/realtek/r8169_main.c else if (tp->mac_version == RTL_GIGA_MAC_VER_46) tp 2241 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version = RTL_GIGA_MAC_VER_48; tp 2250 drivers/net/ethernet/realtek/r8169_main.c static void __rtl_writephy_batch(struct rtl8169_private *tp, tp 2254 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, regs->reg, regs->val); tp 2259 drivers/net/ethernet/realtek/r8169_main.c #define rtl_writephy_batch(tp, a) __rtl_writephy_batch(tp, a, ARRAY_SIZE(a)) tp 2261 drivers/net/ethernet/realtek/r8169_main.c static void rtl_release_firmware(struct rtl8169_private *tp) tp 2263 drivers/net/ethernet/realtek/r8169_main.c if (tp->rtl_fw) { tp 2264 drivers/net/ethernet/realtek/r8169_main.c rtl_fw_release_firmware(tp->rtl_fw); tp 2265 drivers/net/ethernet/realtek/r8169_main.c kfree(tp->rtl_fw); tp 2266 drivers/net/ethernet/realtek/r8169_main.c tp->rtl_fw = NULL; tp 2270 drivers/net/ethernet/realtek/r8169_main.c static void rtl_apply_firmware(struct rtl8169_private *tp) tp 2273 drivers/net/ethernet/realtek/r8169_main.c if (tp->rtl_fw) tp 2274 drivers/net/ethernet/realtek/r8169_main.c rtl_fw_write_firmware(tp, tp->rtl_fw); tp 2277 drivers/net/ethernet/realtek/r8169_main.c static void rtl_apply_firmware_cond(struct rtl8169_private *tp, u8 reg, u16 val) tp 2279 drivers/net/ethernet/realtek/r8169_main.c if (rtl_readphy(tp, reg) != val) tp 2280 drivers/net/ethernet/realtek/r8169_main.c netif_warn(tp, hw, tp->dev, "chipset not ready for firmware\n"); tp 2282 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 2285 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168_config_eee_mac(struct rtl8169_private *tp) tp 2288 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version != RTL_GIGA_MAC_VER_38) tp 2289 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, EEE_LED, RTL_R8(tp, EEE_LED) & ~0x07); tp 2291 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x1b0, ERIAR_MASK_1111, 0x0003); tp 2294 drivers/net/ethernet/realtek/r8169_main.c static void rtl8125_config_eee_mac(struct rtl8169_private *tp) tp 2296 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe040, 0, BIT(1) | BIT(0)); tp 2297 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb62, 0, BIT(2) | BIT(1)); tp 2300 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168f_config_eee_phy(struct rtl8169_private *tp) tp 2302 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 2315 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_config_eee_phy(struct rtl8169_private *tp) tp 2317 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a43, 0x11, 0, BIT(4)); tp 2320 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168h_config_eee_phy(struct rtl8169_private *tp) tp 2322 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 2324 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 2330 drivers/net/ethernet/realtek/r8169_main.c static void rtl8125_config_eee_phy(struct rtl8169_private *tp) tp 2332 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 2334 drivers/net/ethernet/realtek/r8169_main.c rtl8168h_config_eee_phy(tp); tp 2340 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169s_hw_phy_config(struct rtl8169_private *tp) tp 2404 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2407 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169sb_hw_phy_config(struct rtl8169_private *tp) tp 2415 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2418 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169scd_hw_phy_config_quirk(struct rtl8169_private *tp) tp 2420 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 2426 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0001); tp 2427 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x10, 0xf01b); tp 2428 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2431 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169scd_hw_phy_config(struct rtl8169_private *tp) tp 2473 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2475 drivers/net/ethernet/realtek/r8169_main.c rtl8169scd_hw_phy_config_quirk(tp); tp 2478 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169sce_hw_phy_config(struct rtl8169_private *tp) tp 2528 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2531 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168bb_hw_phy_config(struct rtl8169_private *tp) tp 2538 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0001); tp 2539 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x16, 1 << 0); tp 2541 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2544 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168bef_hw_phy_config(struct rtl8169_private *tp) tp 2552 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2555 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168cp_1_hw_phy_config(struct rtl8169_private *tp) tp 2565 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2568 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168cp_2_hw_phy_config(struct rtl8169_private *tp) tp 2576 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2577 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x14, 1 << 5); tp 2578 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 1 << 5); tp 2580 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2583 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168c_1_hw_phy_config(struct rtl8169_private *tp) tp 2605 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2607 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x14, 1 << 5); tp 2608 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 1 << 5); tp 2609 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2612 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168c_2_hw_phy_config(struct rtl8169_private *tp) tp 2632 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2634 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x16, 1 << 0); tp 2635 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x14, 1 << 5); tp 2636 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 1 << 5); tp 2637 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2640 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168c_3_hw_phy_config(struct rtl8169_private *tp) tp 2654 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2656 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x16, 1 << 0); tp 2657 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x14, 1 << 5); tp 2658 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 1 << 5); tp 2659 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2662 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168c_4_hw_phy_config(struct rtl8169_private *tp) tp 2664 drivers/net/ethernet/realtek/r8169_main.c rtl8168c_3_hw_phy_config(tp); tp 2717 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp) tp 2719 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, rtl8168d_1_phy_reg_init_0); tp 2725 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2726 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x0b, 0x0010, 0x00ef); tp 2727 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x0c, 0xa200, 0x5d00); tp 2729 drivers/net/ethernet/realtek/r8169_main.c if (rtl8168d_efuse_read(tp, 0x01) == 0xb1) { tp 2732 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, rtl8168d_1_phy_reg_init_1); tp 2734 drivers/net/ethernet/realtek/r8169_main.c val = rtl_readphy(tp, 0x0d); tp 2743 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2747 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0d, val | set[i]); tp 2758 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2762 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2763 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 0x0300); tp 2764 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0f, 0x0010); tp 2767 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2768 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x02, 0x0100, 0x0600); tp 2769 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x03, 0x0000, 0xe000); tp 2771 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 2772 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x001b); tp 2774 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xbf00); tp 2776 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2779 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp) tp 2781 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, rtl8168d_1_phy_reg_init_0); tp 2783 drivers/net/ethernet/realtek/r8169_main.c if (rtl8168d_efuse_read(tp, 0x01) == 0xb1) { tp 2786 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, rtl8168d_1_phy_reg_init_1); tp 2788 drivers/net/ethernet/realtek/r8169_main.c val = rtl_readphy(tp, 0x0d); tp 2796 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2800 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0d, val | set[i]); tp 2811 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2815 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2816 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x02, 0x0100, 0x0600); tp 2817 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x03, 0x0000, 0xe000); tp 2820 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2821 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0f, 0x0017); tp 2823 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 2824 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x001b); tp 2826 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware_cond(tp, MII_EXPANSION, 0xb300); tp 2828 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2831 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168d_3_hw_phy_config(struct rtl8169_private *tp) tp 2889 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2892 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168d_4_hw_phy_config(struct rtl8169_private *tp) tp 2904 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2905 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x0d, 1 << 5); tp 2908 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168e_1_hw_phy_config(struct rtl8169_private *tp) tp 2938 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 2940 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 2943 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0007); tp 2944 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1e, 0x0023); tp 2945 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x17, 0x0006, 0x0000); tp 2946 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2949 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 2950 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x08, 0x8000, 0x7f00); tp 2951 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2954 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0007); tp 2955 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1e, 0x002d); tp 2956 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x18, 0x0050, 0x0000); tp 2957 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2958 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 2960 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 2961 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b86); tp 2962 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0001, 0x0000); tp 2963 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2965 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 2966 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b85); tp 2967 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x2000); tp 2968 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0007); tp 2969 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1e, 0x0020); tp 2970 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x15, 0x0000, 0x1100); tp 2971 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0006); tp 2972 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x00, 0x5a00); tp 2973 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 2974 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0d, 0x0007); tp 2975 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0e, 0x003c); tp 2976 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0d, 0x4007); tp 2977 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0e, 0x0000); tp 2978 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x0d, 0x0000); tp 2981 drivers/net/ethernet/realtek/r8169_main.c static void rtl_rar_exgmac_set(struct rtl8169_private *tp, u8 *addr) tp 2989 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xe0, ERIAR_MASK_1111, w[0] | (w[1] << 16)); tp 2990 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xe4, ERIAR_MASK_1111, w[2]); tp 2991 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xf0, ERIAR_MASK_1111, w[0] << 16); tp 2992 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xf4, ERIAR_MASK_1111, w[1] | (w[2] << 16)); tp 2995 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168e_2_hw_phy_config(struct rtl8169_private *tp) tp 3024 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3026 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3029 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3030 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b80); tp 3031 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x17, 0x0006, 0x0000); tp 3032 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3035 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0004); tp 3036 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0007); tp 3037 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1e, 0x002d); tp 3038 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x18, 0x0010, 0x0000); tp 3039 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0002); tp 3040 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3041 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 3044 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3045 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b86); tp 3046 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0001, 0x0000); tp 3047 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3050 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3051 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b85); tp 3052 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x4000, 0x0000); tp 3053 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3055 drivers/net/ethernet/realtek/r8169_main.c rtl8168f_config_eee_phy(tp); tp 3056 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3059 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0003); tp 3060 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x19, 0x0001, 0x0000); tp 3061 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x10, 0x0400, 0x0000); tp 3062 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3063 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3064 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x01, 0x0100, 0x0000); tp 3065 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3068 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_exgmac_set(tp, tp->dev->dev_addr); tp 3071 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168f_hw_phy_config(struct rtl8169_private *tp) tp 3074 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3075 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b80); tp 3076 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0006, 0x0000); tp 3077 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3080 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0007); tp 3081 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1e, 0x002d); tp 3082 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x18, 0x0010, 0x0000); tp 3083 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3084 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 3087 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3088 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b86); tp 3089 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0001, 0x0000); tp 3090 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3092 drivers/net/ethernet/realtek/r8169_main.c rtl8168f_config_eee_phy(tp); tp 3093 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3096 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168f_1_hw_phy_config(struct rtl8169_private *tp) tp 3133 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3135 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3137 drivers/net/ethernet/realtek/r8169_main.c rtl8168f_hw_phy_config(tp); tp 3140 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3141 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b85); tp 3142 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x4000, 0x0000); tp 3143 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3146 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168f_2_hw_phy_config(struct rtl8169_private *tp) tp 3148 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3150 drivers/net/ethernet/realtek/r8169_main.c rtl8168f_hw_phy_config(tp); tp 3153 drivers/net/ethernet/realtek/r8169_main.c static void rtl8411_hw_phy_config(struct rtl8169_private *tp) tp 3191 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3193 drivers/net/ethernet/realtek/r8169_main.c rtl8168f_hw_phy_config(tp); tp 3196 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3197 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b85); tp 3198 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x4000, 0x0000); tp 3199 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3201 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3204 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3205 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b54); tp 3206 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0800); tp 3207 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b5d); tp 3208 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0800); tp 3209 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8a7c); tp 3210 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0100); tp 3211 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8a7f); tp 3212 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0100, 0x0000); tp 3213 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8a82); tp 3214 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0100); tp 3215 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8a85); tp 3216 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0100); tp 3217 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8a88); tp 3218 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x0000, 0x0100); tp 3219 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3222 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0005); tp 3223 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x05, 0x8b85); tp 3224 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x06, 0x8000, 0x0000); tp 3225 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3228 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0003); tp 3229 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x19, 0x0000, 0x0001); tp 3230 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x10, 0x0000, 0x0400); tp 3231 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3234 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_disable_aldps(struct rtl8169_private *tp) tp 3236 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a43, 0x10, BIT(2), 0); tp 3239 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_phy_adjust_10m_aldps(struct rtl8169_private *tp) tp 3241 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 3253 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_1_hw_phy_config(struct rtl8169_private *tp) tp 3257 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3259 drivers/net/ethernet/realtek/r8169_main.c ret = phy_read_paged(tp->phydev, 0x0a46, 0x10); tp 3261 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bcc, 0x12, BIT(15), 0); tp 3263 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bcc, 0x12, 0, BIT(15)); tp 3265 drivers/net/ethernet/realtek/r8169_main.c ret = phy_read_paged(tp->phydev, 0x0a46, 0x13); tp 3267 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c41, 0x15, 0, BIT(1)); tp 3269 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c41, 0x15, BIT(1), 0); tp 3272 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(3) | BIT(2)); tp 3274 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_phy_adjust_10m_aldps(tp); tp 3277 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a4b, 0x11, 0, BIT(2)); tp 3280 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3281 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8012); tp 3282 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 3284 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); tp 3287 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3288 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x5065); tp 3289 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0xd065); tp 3290 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bc8); tp 3291 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x11, 0x5655); tp 3292 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3293 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x1065); tp 3294 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x9065); tp 3295 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x1065); tp 3296 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3298 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_disable_aldps(tp); tp 3299 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 3300 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3303 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_2_hw_phy_config(struct rtl8169_private *tp) tp 3305 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3306 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 3307 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3310 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp) tp 3315 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3318 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3319 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x809b); tp 3320 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0xf800); tp 3321 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80a2); tp 3322 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0xff00); tp 3323 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80a4); tp 3324 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8500, 0xff00); tp 3325 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x809c); tp 3326 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xbd00, 0xff00); tp 3327 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3330 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3331 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80ad); tp 3332 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x7000, 0xf800); tp 3333 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80b4); tp 3334 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x5000, 0xff00); tp 3335 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80ac); tp 3336 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x4000, 0xff00); tp 3337 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3340 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3341 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x808e); tp 3342 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x1200, 0xff00); tp 3343 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8090); tp 3344 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xe500, 0xff00); tp 3345 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8092); tp 3346 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x9f00, 0xff00); tp 3347 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3351 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a46); tp 3352 drivers/net/ethernet/realtek/r8169_main.c data = rtl_readphy(tp, 0x13); tp 3356 drivers/net/ethernet/realtek/r8169_main.c data = rtl_readphy(tp, 0x12); tp 3363 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3364 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x827a); tp 3365 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000); tp 3366 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x827b); tp 3367 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000); tp 3368 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x827c); tp 3369 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000); tp 3370 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x827d); tp 3371 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000); tp 3373 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3374 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x0811); tp 3375 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0800, 0x0000); tp 3376 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a42); tp 3377 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x16, 0x0002, 0x0000); tp 3378 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3381 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(11)); tp 3384 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0bca, 0x17, BIT(12) | BIT(13), BIT(14)); tp 3386 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3387 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x803f); tp 3388 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3389 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8047); tp 3390 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3391 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x804f); tp 3392 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3393 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8057); tp 3394 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3395 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x805f); tp 3396 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3397 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8067); tp 3398 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3399 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x806f); tp 3400 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0000, 0x3000); tp 3401 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3404 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, BIT(7), 0); tp 3406 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_disable_aldps(tp); tp 3407 drivers/net/ethernet/realtek/r8169_main.c rtl8168h_config_eee_phy(tp); tp 3408 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3411 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp) tp 3417 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3420 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3421 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x808a); tp 3422 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x000a, 0x003f); tp 3423 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3426 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3427 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x0811); tp 3428 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0800, 0x0000); tp 3429 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a42); tp 3430 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x16, 0x0002, 0x0000); tp 3431 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3434 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(11)); tp 3436 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xdd02, 0x807d); tp 3437 drivers/net/ethernet/realtek/r8169_main.c data = r8168_mac_ocp_read(tp, 0xdd02); tp 3441 drivers/net/ethernet/realtek/r8169_main.c data = r8168_mac_ocp_read(tp, 0xdd00); tp 3452 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcf); tp 3453 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x16, data); tp 3454 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3458 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3459 drivers/net/ethernet/realtek/r8169_main.c data = rtl_readphy(tp, 0x16); tp 3465 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x17, data); tp 3466 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3467 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3470 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, BIT(7), 0); tp 3472 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_disable_aldps(tp); tp 3473 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 3474 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3477 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168ep_1_hw_phy_config(struct rtl8169_private *tp) tp 3480 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a44, 0x11, 0, BIT(3) | BIT(2)); tp 3482 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_phy_adjust_10m_aldps(tp); tp 3485 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0a4b, 0x11, 0, BIT(2)); tp 3488 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3489 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8012); tp 3490 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 3491 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3494 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); tp 3496 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_disable_aldps(tp); tp 3497 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 3498 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3501 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168ep_2_hw_phy_config(struct rtl8169_private *tp) tp 3503 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_phy_adjust_10m_aldps(tp); tp 3506 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3507 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8012); tp 3508 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8000, 0x0000); tp 3509 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3512 drivers/net/ethernet/realtek/r8169_main.c phy_modify_paged(tp->phydev, 0x0c42, 0x11, BIT(13), BIT(14)); tp 3515 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3516 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80f3); tp 3517 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8b00, ~0x8bff); tp 3518 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80f0); tp 3519 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x3a00, ~0x3aff); tp 3520 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80ef); tp 3521 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0500, ~0x05ff); tp 3522 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80f6); tp 3523 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x6e00, ~0x6eff); tp 3524 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80ec); tp 3525 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x6800, ~0x68ff); tp 3526 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80ed); tp 3527 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x7c00, ~0x7cff); tp 3528 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80f2); tp 3529 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xf400, ~0xf4ff); tp 3530 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80f4); tp 3531 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8500, ~0x85ff); tp 3532 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3533 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8110); tp 3534 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xa800, ~0xa8ff); tp 3535 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x810f); tp 3536 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x1d00, ~0x1dff); tp 3537 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8111); tp 3538 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xf500, ~0xf5ff); tp 3539 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8113); tp 3540 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x6100, ~0x61ff); tp 3541 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x8115); tp 3542 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x9200, ~0x92ff); tp 3543 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x810e); tp 3544 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0400, ~0x04ff); tp 3545 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x810c); tp 3546 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x7c00, ~0x7cff); tp 3547 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x810b); tp 3548 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x5a00, ~0x5aff); tp 3549 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0a43); tp 3550 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80d1); tp 3551 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xff00, ~0xffff); tp 3552 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80cd); tp 3553 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x9e00, ~0x9eff); tp 3554 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80d3); tp 3555 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x0e00, ~0x0eff); tp 3556 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80d5); tp 3557 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0xca00, ~0xcaff); tp 3558 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x13, 0x80d7); tp 3559 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_phy(tp, 0x14, 0x8400, ~0x84ff); tp 3562 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3563 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x5065); tp 3564 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0xd065); tp 3565 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bc8); tp 3566 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x12, 0x00ed); tp 3567 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0bcd); tp 3568 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x1065); tp 3569 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x9065); tp 3570 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x14, 0x1065); tp 3571 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3573 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_disable_aldps(tp); tp 3574 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_config_eee_phy(tp); tp 3575 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3578 drivers/net/ethernet/realtek/r8169_main.c static void rtl8102e_hw_phy_config(struct rtl8169_private *tp) tp 3587 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3588 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x11, 1 << 12); tp 3589 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x19, 1 << 13); tp 3590 drivers/net/ethernet/realtek/r8169_main.c rtl_patchphy(tp, 0x10, 1 << 15); tp 3592 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3595 drivers/net/ethernet/realtek/r8169_main.c static void rtl8105e_hw_phy_config(struct rtl8169_private *tp) tp 3612 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3613 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x18, 0x0310); tp 3616 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3618 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3621 drivers/net/ethernet/realtek/r8169_main.c static void rtl8402_hw_phy_config(struct rtl8169_private *tp) tp 3624 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3625 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x18, 0x0310); tp 3628 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3631 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000); tp 3632 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0004); tp 3633 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x10, 0x401f); tp 3634 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x19, 0x7030); tp 3635 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3638 drivers/net/ethernet/realtek/r8169_main.c static void rtl8106e_hw_phy_config(struct rtl8169_private *tp) tp 3648 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 3649 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x18, 0x0310); tp 3652 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3654 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1b0, ERIAR_MASK_0011, 0x0000); tp 3655 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy_batch(tp, phy_reg_init); tp 3657 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x1d0, ERIAR_MASK_0011, 0x0000); tp 3660 drivers/net/ethernet/realtek/r8169_main.c static void rtl8125_1_hw_phy_config(struct rtl8169_private *tp) tp 3662 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 3712 drivers/net/ethernet/realtek/r8169_main.c rtl8125_config_eee_phy(tp); tp 3713 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3716 drivers/net/ethernet/realtek/r8169_main.c static void rtl8125_2_hw_phy_config(struct rtl8169_private *tp) tp 3718 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 3768 drivers/net/ethernet/realtek/r8169_main.c rtl_apply_firmware(tp); tp 3784 drivers/net/ethernet/realtek/r8169_main.c rtl8125_config_eee_phy(tp); tp 3785 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_eee(tp); tp 3846 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 3848 drivers/net/ethernet/realtek/r8169_main.c if (phy_configs[tp->mac_version]) tp 3849 drivers/net/ethernet/realtek/r8169_main.c phy_configs[tp->mac_version](tp); tp 3852 drivers/net/ethernet/realtek/r8169_main.c static void rtl_schedule_task(struct rtl8169_private *tp, enum rtl_flag flag) tp 3854 drivers/net/ethernet/realtek/r8169_main.c if (!test_and_set_bit(flag, tp->wk.flags)) tp 3855 drivers/net/ethernet/realtek/r8169_main.c schedule_work(&tp->wk.work); tp 3858 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp) tp 3862 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version <= RTL_GIGA_MAC_VER_06) { tp 3863 drivers/net/ethernet/realtek/r8169_main.c pci_write_config_byte(tp->pci_dev, PCI_LATENCY_TIMER, 0x40); tp 3864 drivers/net/ethernet/realtek/r8169_main.c pci_write_config_byte(tp->pci_dev, PCI_CACHE_LINE_SIZE, 0x08); tp 3865 drivers/net/ethernet/realtek/r8169_main.c netif_dbg(tp, drv, dev, tp 3867 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, 0x82, 0x01); tp 3871 drivers/net/ethernet/realtek/r8169_main.c phy_speed_up(tp->phydev); tp 3873 drivers/net/ethernet/realtek/r8169_main.c genphy_soft_reset(tp->phydev); tp 3876 drivers/net/ethernet/realtek/r8169_main.c static void rtl_rar_set(struct rtl8169_private *tp, u8 *addr) tp 3878 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 3880 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 3882 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MAC4, addr[4] | addr[5] << 8); tp 3883 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, MAC4); tp 3885 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MAC0, addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24); tp 3886 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, MAC0); tp 3888 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_34) tp 3889 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_exgmac_set(tp, addr); tp 3891 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 3893 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 3898 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 3899 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 3909 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, dev->dev_addr); tp 3918 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 3923 drivers/net/ethernet/realtek/r8169_main.c return phy_mii_ioctl(tp->phydev, ifr, cmd); tp 3926 drivers/net/ethernet/realtek/r8169_main.c static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) tp 3928 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 3937 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) | tp 3945 drivers/net/ethernet/realtek/r8169_main.c static void rtl_pll_power_down(struct rtl8169_private *tp) tp 3947 drivers/net/ethernet/realtek/r8169_main.c if (r8168_check_dash(tp)) tp 3950 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_32 || tp 3951 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_33) tp 3952 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_write(tp, 0x19, 0xff64); tp 3954 drivers/net/ethernet/realtek/r8169_main.c if (device_may_wakeup(tp_to_dev(tp))) { tp 3955 drivers/net/ethernet/realtek/r8169_main.c phy_speed_down(tp->phydev, false); tp 3956 drivers/net/ethernet/realtek/r8169_main.c rtl_wol_suspend_quirk(tp); tp 3960 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 3974 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~0x80); tp 3979 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_clear_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000); tp 3980 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) & ~0x80); tp 3987 drivers/net/ethernet/realtek/r8169_main.c static void rtl_pll_power_up(struct rtl8169_private *tp) tp 3989 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 3994 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | 0x80); tp 4005 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | 0xc0); tp 4010 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, PMCH, RTL_R8(tp, PMCH) | 0xc0); tp 4011 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x1a8, ERIAR_MASK_1111, 0xfc000000); tp 4017 drivers/net/ethernet/realtek/r8169_main.c phy_resume(tp->phydev); tp 4022 drivers/net/ethernet/realtek/r8169_main.c static void rtl_init_rxcfg(struct rtl8169_private *tp) tp 4024 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 4027 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RX_FIFO_THRESH | RX_DMA_BURST); tp 4032 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST); tp 4035 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST | RX_EARLY_OFF); tp 4038 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RX_FETCH_DFLT_8125 | RX_VLAN_8125 | tp 4042 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RX128_INT_EN | RX_DMA_BURST); tp 4047 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_init_ring_indexes(struct rtl8169_private *tp) tp 4049 drivers/net/ethernet/realtek/r8169_main.c tp->dirty_tx = tp->cur_tx = tp->cur_rx = 0; tp 4052 drivers/net/ethernet/realtek/r8169_main.c static void r8168c_hw_jumbo_enable(struct rtl8169_private *tp) tp 4054 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0); tp 4055 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) | Jumbo_En1); tp 4056 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_512B); tp 4059 drivers/net/ethernet/realtek/r8169_main.c static void r8168c_hw_jumbo_disable(struct rtl8169_private *tp) tp 4061 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0); tp 4062 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~Jumbo_En1); tp 4063 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4066 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_hw_jumbo_enable(struct rtl8169_private *tp) tp 4068 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0); tp 4071 drivers/net/ethernet/realtek/r8169_main.c static void r8168dp_hw_jumbo_disable(struct rtl8169_private *tp) tp 4073 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0); tp 4076 drivers/net/ethernet/realtek/r8169_main.c static void r8168e_hw_jumbo_enable(struct rtl8169_private *tp) tp 4078 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MaxTxPacketSize, 0x3f); tp 4079 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) | Jumbo_En0); tp 4080 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) | 0x01); tp 4081 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_512B); tp 4084 drivers/net/ethernet/realtek/r8169_main.c static void r8168e_hw_jumbo_disable(struct rtl8169_private *tp) tp 4086 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MaxTxPacketSize, 0x0c); tp 4087 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Jumbo_En0); tp 4088 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~0x01); tp 4089 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4092 drivers/net/ethernet/realtek/r8169_main.c static void r8168b_0_hw_jumbo_enable(struct rtl8169_private *tp) tp 4094 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, tp 4098 drivers/net/ethernet/realtek/r8169_main.c static void r8168b_0_hw_jumbo_disable(struct rtl8169_private *tp) tp 4100 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, tp 4104 drivers/net/ethernet/realtek/r8169_main.c static void r8168b_1_hw_jumbo_enable(struct rtl8169_private *tp) tp 4106 drivers/net/ethernet/realtek/r8169_main.c r8168b_0_hw_jumbo_enable(tp); tp 4108 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) | (1 << 0)); tp 4111 drivers/net/ethernet/realtek/r8169_main.c static void r8168b_1_hw_jumbo_disable(struct rtl8169_private *tp) tp 4113 drivers/net/ethernet/realtek/r8169_main.c r8168b_0_hw_jumbo_disable(tp); tp 4115 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~(1 << 0)); tp 4118 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_jumbo_enable(struct rtl8169_private *tp) tp 4120 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 4121 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 4123 drivers/net/ethernet/realtek/r8169_main.c r8168b_0_hw_jumbo_enable(tp); tp 4127 drivers/net/ethernet/realtek/r8169_main.c r8168b_1_hw_jumbo_enable(tp); tp 4130 drivers/net/ethernet/realtek/r8169_main.c r8168c_hw_jumbo_enable(tp); tp 4133 drivers/net/ethernet/realtek/r8169_main.c r8168dp_hw_jumbo_enable(tp); tp 4136 drivers/net/ethernet/realtek/r8169_main.c r8168e_hw_jumbo_enable(tp); tp 4141 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 4144 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_jumbo_disable(struct rtl8169_private *tp) tp 4146 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 4147 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 4149 drivers/net/ethernet/realtek/r8169_main.c r8168b_0_hw_jumbo_disable(tp); tp 4153 drivers/net/ethernet/realtek/r8169_main.c r8168b_1_hw_jumbo_disable(tp); tp 4156 drivers/net/ethernet/realtek/r8169_main.c r8168c_hw_jumbo_disable(tp); tp 4159 drivers/net/ethernet/realtek/r8169_main.c r8168dp_hw_jumbo_disable(tp); tp 4162 drivers/net/ethernet/realtek/r8169_main.c r8168e_hw_jumbo_disable(tp); tp 4167 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 4170 drivers/net/ethernet/realtek/r8169_main.c static void rtl_jumbo_config(struct rtl8169_private *tp, int mtu) tp 4173 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_jumbo_enable(tp); tp 4175 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_jumbo_disable(tp); tp 4180 drivers/net/ethernet/realtek/r8169_main.c return RTL_R8(tp, ChipCmd) & CmdReset; tp 4183 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_reset(struct rtl8169_private *tp) tp 4185 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, CmdReset); tp 4187 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_chipcmd_cond, 100, 100); tp 4190 drivers/net/ethernet/realtek/r8169_main.c static void rtl_request_firmware(struct rtl8169_private *tp) tp 4195 drivers/net/ethernet/realtek/r8169_main.c if (tp->rtl_fw || !tp->fw_name) tp 4200 drivers/net/ethernet/realtek/r8169_main.c netif_warn(tp, ifup, tp->dev, "Unable to load firmware, out of memory\n"); tp 4208 drivers/net/ethernet/realtek/r8169_main.c rtl_fw->fw_name = tp->fw_name; tp 4209 drivers/net/ethernet/realtek/r8169_main.c rtl_fw->dev = tp_to_dev(tp); tp 4214 drivers/net/ethernet/realtek/r8169_main.c tp->rtl_fw = rtl_fw; tp 4217 drivers/net/ethernet/realtek/r8169_main.c static void rtl_rx_close(struct rtl8169_private *tp) tp 4219 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) & ~RX_CONFIG_ACCEPT_MASK); tp 4224 drivers/net/ethernet/realtek/r8169_main.c return RTL_R8(tp, TxPoll) & NPQ; tp 4229 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, TxConfig) & TXCFG_EMPTY; tp 4232 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_hw_reset(struct rtl8169_private *tp) tp 4235 drivers/net/ethernet/realtek/r8169_main.c rtl8169_irq_mask_and_ack(tp); tp 4237 drivers/net/ethernet/realtek/r8169_main.c rtl_rx_close(tp); tp 4239 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 4243 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_npq_cond, 20, 42*42); tp 4247 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq); tp 4248 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 666); tp 4251 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) | StopReq); tp 4256 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_reset(tp); tp 4259 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_tx_config_registers(struct rtl8169_private *tp) tp 4264 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8168evl_up(tp)) tp 4267 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, TxConfig, val); tp 4270 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_rx_max_size(struct rtl8169_private *tp) tp 4273 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, RxMaxSize, R8169_RX_BUF_SIZE + 1); tp 4276 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_rx_tx_desc_registers(struct rtl8169_private *tp) tp 4283 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, TxDescStartAddrHigh, ((u64) tp->TxPhyAddr) >> 32); tp 4284 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_BIT_MASK(32)); tp 4285 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxDescAddrHigh, ((u64) tp->RxPhyAddr) >> 32); tp 4286 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxDescAddrLow, ((u64) tp->RxPhyAddr) & DMA_BIT_MASK(32)); tp 4289 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_set_magic_reg(struct rtl8169_private *tp, unsigned mac_version) tp 4293 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_05) tp 4295 drivers/net/ethernet/realtek/r8169_main.c else if (tp->mac_version == RTL_GIGA_MAC_VER_06) tp 4300 drivers/net/ethernet/realtek/r8169_main.c if (RTL_R8(tp, Config2) & PCI_Clock_66MHz) tp 4303 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, 0x7c, val); tp 4311 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 4316 drivers/net/ethernet/realtek/r8169_main.c netif_notice(tp, link, dev, "Promiscuous mode enabled\n"); tp 4320 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_35) { tp 4333 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version > RTL_GIGA_MAC_VER_06) { tp 4343 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MAR0 + 4, mc_filter[1]); tp 4344 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MAR0 + 0, mc_filter[0]); tp 4346 drivers/net/ethernet/realtek/r8169_main.c tmp = RTL_R32(tp, RxConfig); tp 4347 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxConfig, (tmp & ~RX_CONFIG_ACCEPT_MASK) | rx_mode); tp 4352 drivers/net/ethernet/realtek/r8169_main.c return RTL_R32(tp, CSIAR) & CSIAR_FLAG; tp 4355 drivers/net/ethernet/realtek/r8169_main.c static void rtl_csi_write(struct rtl8169_private *tp, int addr, int value) tp 4357 drivers/net/ethernet/realtek/r8169_main.c u32 func = PCI_FUNC(tp->pci_dev->devfn); tp 4359 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CSIDR, value); tp 4360 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CSIAR, CSIAR_WRITE_CMD | (addr & CSIAR_ADDR_MASK) | tp 4363 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_csiar_cond, 10, 100); tp 4366 drivers/net/ethernet/realtek/r8169_main.c static u32 rtl_csi_read(struct rtl8169_private *tp, int addr) tp 4368 drivers/net/ethernet/realtek/r8169_main.c u32 func = PCI_FUNC(tp->pci_dev->devfn); tp 4370 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, CSIAR, (addr & CSIAR_ADDR_MASK) | func << 16 | tp 4373 drivers/net/ethernet/realtek/r8169_main.c return rtl_udelay_loop_wait_high(tp, &rtl_csiar_cond, 10, 100) ? tp 4374 drivers/net/ethernet/realtek/r8169_main.c RTL_R32(tp, CSIDR) : ~0; tp 4377 drivers/net/ethernet/realtek/r8169_main.c static void rtl_csi_access_enable(struct rtl8169_private *tp, u8 val) tp 4379 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 4390 drivers/net/ethernet/realtek/r8169_main.c netdev_notice_once(tp->dev, tp 4392 drivers/net/ethernet/realtek/r8169_main.c csi = rtl_csi_read(tp, 0x070c) & 0x00ffffff; tp 4393 drivers/net/ethernet/realtek/r8169_main.c rtl_csi_write(tp, 0x070c, csi | val << 24); tp 4396 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_def_aspm_entry_latency(struct rtl8169_private *tp) tp 4398 drivers/net/ethernet/realtek/r8169_main.c rtl_csi_access_enable(tp, 0x27); tp 4407 drivers/net/ethernet/realtek/r8169_main.c static void __rtl_ephy_init(struct rtl8169_private *tp, tp 4413 drivers/net/ethernet/realtek/r8169_main.c w = (rtl_ephy_read(tp, e->offset) & ~e->mask) | e->bits; tp 4414 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_write(tp, e->offset, w); tp 4419 drivers/net/ethernet/realtek/r8169_main.c #define rtl_ephy_init(tp, a) __rtl_ephy_init(tp, a, ARRAY_SIZE(a)) tp 4421 drivers/net/ethernet/realtek/r8169_main.c static void rtl_disable_clock_request(struct rtl8169_private *tp) tp 4423 drivers/net/ethernet/realtek/r8169_main.c pcie_capability_clear_word(tp->pci_dev, PCI_EXP_LNKCTL, tp 4427 drivers/net/ethernet/realtek/r8169_main.c static void rtl_enable_clock_request(struct rtl8169_private *tp) tp 4429 drivers/net/ethernet/realtek/r8169_main.c pcie_capability_set_word(tp->pci_dev, PCI_EXP_LNKCTL, tp 4433 drivers/net/ethernet/realtek/r8169_main.c static void rtl_pcie_state_l2l3_disable(struct rtl8169_private *tp) tp 4436 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Rdy_to_L23); tp 4439 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_aspm_clkreq_enable(struct rtl8169_private *tp, bool enable) tp 4442 drivers/net/ethernet/realtek/r8169_main.c if (enable && tp->aspm_manageable) { tp 4443 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) | ASPM_en); tp 4444 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config2, RTL_R8(tp, Config2) | ClkReqEn); tp 4446 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~ClkReqEn); tp 4447 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~ASPM_en); tp 4453 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_fifo_size(struct rtl8169_private *tp, u16 rx_stat, tp 4459 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc8, ERIAR_MASK_1111, (rx_stat << 16) | rx_dyn); tp 4460 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xe8, ERIAR_MASK_1111, (tx_stat << 16) | tx_dyn); tp 4463 drivers/net/ethernet/realtek/r8169_main.c static void rtl8168g_set_pause_thresholds(struct rtl8169_private *tp, tp 4467 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xcc, ERIAR_MASK_0001, low); tp 4468 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xd0, ERIAR_MASK_0001, high); tp 4471 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168bb(struct rtl8169_private *tp) tp 4473 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 4476 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168bef(struct rtl8169_private *tp) tp 4478 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168bb(tp); tp 4480 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config4, RTL_R8(tp, Config4) & ~(1 << 0)); tp 4483 drivers/net/ethernet/realtek/r8169_main.c static void __rtl_hw_start_8168cp(struct rtl8169_private *tp) tp 4485 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, RTL_R8(tp, Config1) | Speed_down); tp 4487 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 4489 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4492 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168cp_1(struct rtl8169_private *tp) tp 4502 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4504 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168cp); tp 4506 drivers/net/ethernet/realtek/r8169_main.c __rtl_hw_start_8168cp(tp); tp 4509 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168cp_2(struct rtl8169_private *tp) tp 4511 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4513 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 4516 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168cp_3(struct rtl8169_private *tp) tp 4518 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4520 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 4523 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DBG_REG, 0x20); tp 4526 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168c_1(struct rtl8169_private *tp) tp 4534 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4536 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DBG_REG, 0x06 | FIX_NAK_1 | FIX_NAK_2); tp 4538 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168c_1); tp 4540 drivers/net/ethernet/realtek/r8169_main.c __rtl_hw_start_8168cp(tp); tp 4543 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168c_2(struct rtl8169_private *tp) tp 4550 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4552 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168c_2); tp 4554 drivers/net/ethernet/realtek/r8169_main.c __rtl_hw_start_8168cp(tp); tp 4557 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168c_3(struct rtl8169_private *tp) tp 4559 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168c_2(tp); tp 4562 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168c_4(struct rtl8169_private *tp) tp 4564 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4566 drivers/net/ethernet/realtek/r8169_main.c __rtl_hw_start_8168cp(tp); tp 4569 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168d(struct rtl8169_private *tp) tp 4571 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4573 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4575 drivers/net/ethernet/realtek/r8169_main.c if (tp->dev->mtu <= ETH_DATA_LEN) tp 4576 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4579 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168dp(struct rtl8169_private *tp) tp 4581 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4583 drivers/net/ethernet/realtek/r8169_main.c if (tp->dev->mtu <= ETH_DATA_LEN) tp 4584 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4586 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4589 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168d_4(struct rtl8169_private *tp) tp 4598 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4600 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4602 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168d_4); tp 4604 drivers/net/ethernet/realtek/r8169_main.c rtl_enable_clock_request(tp); tp 4607 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168e_1(struct rtl8169_private *tp) tp 4625 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4627 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168e_1); tp 4629 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4632 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) | TXPLA_RST); tp 4633 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) & ~TXPLA_RST); tp 4635 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~Spi_en); tp 4638 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168e_2(struct rtl8169_private *tp) tp 4647 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4649 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168e_2); tp 4651 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 4652 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 4653 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x10, 0x10, 0x02, 0x06); tp 4654 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xcc, ERIAR_MASK_1111, 0x00000050); tp 4655 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xd0, ERIAR_MASK_1111, 0x07ff0060); tp 4656 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x1b0, ERIAR_MASK_0001, BIT(4)); tp 4657 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0xff00); tp 4659 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4661 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); tp 4663 drivers/net/ethernet/realtek/r8169_main.c rtl8168_config_eee_mac(tp); tp 4665 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) | PFM_EN); tp 4666 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) | PWM_EN); tp 4667 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~Spi_en); tp 4669 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 4672 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168f(struct rtl8169_private *tp) tp 4674 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4676 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4678 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 4679 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 4680 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x10, 0x10, 0x02, 0x06); tp 4681 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 4682 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x1b0, ERIAR_MASK_0001, BIT(4)); tp 4683 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x1d0, ERIAR_MASK_0001, BIT(4)); tp 4684 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xcc, ERIAR_MASK_1111, 0x00000050); tp 4685 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xd0, ERIAR_MASK_1111, 0x00000060); tp 4687 drivers/net/ethernet/realtek/r8169_main.c rtl_disable_clock_request(tp); tp 4689 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); tp 4690 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) | PFM_EN); tp 4691 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) | PWM_EN); tp 4692 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~Spi_en); tp 4694 drivers/net/ethernet/realtek/r8169_main.c rtl8168_config_eee_mac(tp); tp 4697 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168f_1(struct rtl8169_private *tp) tp 4708 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168f(tp); tp 4710 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168f_1); tp 4712 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00, 0xff00); tp 4715 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8411(struct rtl8169_private *tp) tp 4725 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168f(tp); tp 4726 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 4728 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168f_1); tp 4730 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0x0d4, ERIAR_MASK_0011, 0x0c00); tp 4733 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168g(struct rtl8169_private *tp) tp 4735 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x08, 0x10, 0x02, 0x06); tp 4736 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_set_pause_thresholds(tp, 0x38, 0x48); tp 4738 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4740 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4742 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 4743 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x2f8, ERIAR_MASK_0011, 0x1d8f); tp 4745 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) & ~RXDV_GATED_EN); tp 4747 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 4748 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 4750 drivers/net/ethernet/realtek/r8169_main.c rtl8168_config_eee_mac(tp); tp 4752 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, 0x2fc, ERIAR_MASK_0001, 0x01, 0x06); tp 4753 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_clear_bits(tp, 0x1b0, ERIAR_MASK_0011, BIT(12)); tp 4755 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 4758 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168g_1(struct rtl8169_private *tp) tp 4767 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168g(tp); tp 4770 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 4771 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168g_1); tp 4772 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 4775 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168g_2(struct rtl8169_private *tp) tp 4789 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168g(tp); tp 4792 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~ClkReqEn); tp 4793 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config5, RTL_R8(tp, Config5) & ~ASPM_en); tp 4794 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168g_2); tp 4797 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8411_2(struct rtl8169_private *tp) tp 4812 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168g(tp); tp 4815 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 4816 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8411_2); tp 4821 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC28, 0x0000); tp 4822 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2A, 0x0000); tp 4823 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2C, 0x0000); tp 4824 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2E, 0x0000); tp 4825 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC30, 0x0000); tp 4826 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC32, 0x0000); tp 4827 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC34, 0x0000); tp 4828 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC36, 0x0000); tp 4830 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC26, 0x0000); tp 4832 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF800, 0xE008); tp 4833 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF802, 0xE00A); tp 4834 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF804, 0xE00C); tp 4835 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF806, 0xE00E); tp 4836 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF808, 0xE027); tp 4837 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF80A, 0xE04F); tp 4838 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF80C, 0xE05E); tp 4839 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF80E, 0xE065); tp 4840 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF810, 0xC602); tp 4841 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF812, 0xBE00); tp 4842 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF814, 0x0000); tp 4843 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF816, 0xC502); tp 4844 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF818, 0xBD00); tp 4845 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF81A, 0x074C); tp 4846 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF81C, 0xC302); tp 4847 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF81E, 0xBB00); tp 4848 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF820, 0x080A); tp 4849 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF822, 0x6420); tp 4850 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF824, 0x48C2); tp 4851 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF826, 0x8C20); tp 4852 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF828, 0xC516); tp 4853 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF82A, 0x64A4); tp 4854 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF82C, 0x49C0); tp 4855 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF82E, 0xF009); tp 4856 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF830, 0x74A2); tp 4857 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF832, 0x8CA5); tp 4858 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF834, 0x74A0); tp 4859 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF836, 0xC50E); tp 4860 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF838, 0x9CA2); tp 4861 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF83A, 0x1C11); tp 4862 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF83C, 0x9CA0); tp 4863 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF83E, 0xE006); tp 4864 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF840, 0x74F8); tp 4865 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF842, 0x48C4); tp 4866 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF844, 0x8CF8); tp 4867 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF846, 0xC404); tp 4868 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF848, 0xBC00); tp 4869 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF84A, 0xC403); tp 4870 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF84C, 0xBC00); tp 4871 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF84E, 0x0BF2); tp 4872 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF850, 0x0C0A); tp 4873 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF852, 0xE434); tp 4874 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF854, 0xD3C0); tp 4875 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF856, 0x49D9); tp 4876 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF858, 0xF01F); tp 4877 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF85A, 0xC526); tp 4878 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF85C, 0x64A5); tp 4879 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF85E, 0x1400); tp 4880 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF860, 0xF007); tp 4881 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF862, 0x0C01); tp 4882 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF864, 0x8CA5); tp 4883 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF866, 0x1C15); tp 4884 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF868, 0xC51B); tp 4885 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF86A, 0x9CA0); tp 4886 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF86C, 0xE013); tp 4887 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF86E, 0xC519); tp 4888 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF870, 0x74A0); tp 4889 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF872, 0x48C4); tp 4890 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF874, 0x8CA0); tp 4891 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF876, 0xC516); tp 4892 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF878, 0x74A4); tp 4893 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF87A, 0x48C8); tp 4894 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF87C, 0x48CA); tp 4895 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF87E, 0x9CA4); tp 4896 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF880, 0xC512); tp 4897 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF882, 0x1B00); tp 4898 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF884, 0x9BA0); tp 4899 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF886, 0x1B1C); tp 4900 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF888, 0x483F); tp 4901 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF88A, 0x9BA2); tp 4902 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF88C, 0x1B04); tp 4903 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF88E, 0xC508); tp 4904 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF890, 0x9BA0); tp 4905 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF892, 0xC505); tp 4906 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF894, 0xBD00); tp 4907 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF896, 0xC502); tp 4908 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF898, 0xBD00); tp 4909 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF89A, 0x0300); tp 4910 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF89C, 0x051E); tp 4911 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF89E, 0xE434); tp 4912 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8A0, 0xE018); tp 4913 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8A2, 0xE092); tp 4914 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8A4, 0xDE20); tp 4915 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8A6, 0xD3C0); tp 4916 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8A8, 0xC50F); tp 4917 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8AA, 0x76A4); tp 4918 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8AC, 0x49E3); tp 4919 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8AE, 0xF007); tp 4920 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8B0, 0x49C0); tp 4921 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8B2, 0xF103); tp 4922 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8B4, 0xC607); tp 4923 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8B6, 0xBE00); tp 4924 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8B8, 0xC606); tp 4925 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8BA, 0xBE00); tp 4926 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8BC, 0xC602); tp 4927 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8BE, 0xBE00); tp 4928 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8C0, 0x0C4C); tp 4929 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8C2, 0x0C28); tp 4930 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8C4, 0x0C2C); tp 4931 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8C6, 0xDC00); tp 4932 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8C8, 0xC707); tp 4933 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8CA, 0x1D00); tp 4934 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8CC, 0x8DE2); tp 4935 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8CE, 0x48C1); tp 4936 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8D0, 0xC502); tp 4937 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8D2, 0xBD00); tp 4938 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8D4, 0x00AA); tp 4939 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8D6, 0xE0C0); tp 4940 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8D8, 0xC502); tp 4941 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8DA, 0xBD00); tp 4942 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xF8DC, 0x0132); tp 4944 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC26, 0x8000); tp 4946 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2A, 0x0743); tp 4947 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2C, 0x0801); tp 4948 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC2E, 0x0BE9); tp 4949 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC30, 0x02FD); tp 4950 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC32, 0x0C25); tp 4951 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC34, 0x00A9); tp 4952 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xFC36, 0x012D); tp 4954 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 4957 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168h_1(struct rtl8169_private *tp) tp 4970 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 4971 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168h_1); tp 4973 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x08, 0x10, 0x02, 0x06); tp 4974 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_set_pause_thresholds(tp, 0x38, 0x48); tp 4976 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 4978 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 4980 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 4982 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0xdc, ERIAR_MASK_1111, BIT(4)); tp 4984 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0xd4, ERIAR_MASK_1111, 0x1f00); tp 4986 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x5f0, ERIAR_MASK_0011, 0x4f87); tp 4988 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) & ~RXDV_GATED_EN); tp 4990 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 4991 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 4993 drivers/net/ethernet/realtek/r8169_main.c rtl8168_config_eee_mac(tp); tp 4995 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN); tp 4996 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MISC_1, RTL_R8(tp, MISC_1) & ~PFM_D3COLD_EN); tp 4998 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~TX_10M_PS_EN); tp 5000 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_clear_bits(tp, 0x1b0, ERIAR_MASK_0011, BIT(12)); tp 5002 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5004 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0c42); tp 5005 drivers/net/ethernet/realtek/r8169_main.c rg_saw_cnt = (rtl_readphy(tp, 0x13) & 0x3fff); tp 5006 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, 0x1f, 0x0000); tp 5012 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini); tp 5015 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070); tp 5016 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008); tp 5017 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f); tp 5018 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); tp 5020 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xe63e, 0x0001); tp 5021 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xe63e, 0x0000); tp 5022 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc094, 0x0000); tp 5023 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc09e, 0x0000); tp 5025 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 5028 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168ep(struct rtl8169_private *tp) tp 5030 drivers/net/ethernet/realtek/r8169_main.c rtl8168ep_stop_cmac(tp); tp 5032 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x08, 0x10, 0x02, 0x06); tp 5033 drivers/net/ethernet/realtek/r8169_main.c rtl8168g_set_pause_thresholds(tp, 0x2f, 0x5f); tp 5035 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5037 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 5039 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 5041 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_set_bits(tp, 0xd4, ERIAR_MASK_1111, 0x1f80); tp 5043 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0x5f0, ERIAR_MASK_0011, 0x4f87); tp 5045 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) & ~RXDV_GATED_EN); tp 5047 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 5048 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 5050 drivers/net/ethernet/realtek/r8169_main.c rtl8168_config_eee_mac(tp); tp 5052 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, 0x2fc, ERIAR_MASK_0001, 0x01, 0x06); tp 5054 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~TX_10M_PS_EN); tp 5056 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5059 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168ep_1(struct rtl8169_private *tp) tp 5070 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5071 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168ep_1); tp 5073 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168ep(tp); tp 5075 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 5078 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168ep_2(struct rtl8169_private *tp) tp 5087 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5088 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168ep_2); tp 5090 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168ep(tp); tp 5092 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN); tp 5093 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MISC_1, RTL_R8(tp, MISC_1) & ~PFM_D3COLD_EN); tp 5095 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 5098 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168ep_3(struct rtl8169_private *tp) tp 5108 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5109 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8168ep_3); tp 5111 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168ep(tp); tp 5113 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN); tp 5114 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MISC_1, RTL_R8(tp, MISC_1) & ~PFM_D3COLD_EN); tp 5116 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd3e2, 0x0fff, 0x0271); tp 5117 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd3e4, 0x00ff, 0x0000); tp 5118 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe860, 0x0000, 0x0080); tp 5120 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 5123 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8102e_1(struct rtl8169_private *tp) tp 5137 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5139 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DBG_REG, FIX_NAK_1); tp 5141 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 5143 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, tp 5145 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 5147 drivers/net/ethernet/realtek/r8169_main.c cfg1 = RTL_R8(tp, Config1); tp 5149 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, cfg1 & ~LEDS0); tp 5151 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8102e_1); tp 5154 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8102e_2(struct rtl8169_private *tp) tp 5156 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5158 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 5160 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, MEMMAP | IOMAP | VPD | PMEnable); tp 5161 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en); tp 5164 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8102e_3(struct rtl8169_private *tp) tp 5166 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8102e_2(tp); tp 5168 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_write(tp, 0x03, 0xc2f9); tp 5171 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8105e_1(struct rtl8169_private *tp) tp 5185 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800); tp 5188 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) & ~0x010000); tp 5190 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) | EN_NDP | EN_OOB_RESET); tp 5191 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) | PFM_EN); tp 5193 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8105e_1); tp 5195 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5198 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8105e_2(struct rtl8169_private *tp) tp 5200 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8105e_1(tp); tp 5201 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_write(tp, 0x1e, rtl_ephy_read(tp, 0x1e) | 0x8000); tp 5204 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8402(struct rtl8169_private *tp) tp 5211 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5214 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800); tp 5216 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); tp 5218 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8402); tp 5220 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_performance_tweak(tp, PCI_EXP_DEVCTL_READRQ_4096B); tp 5222 drivers/net/ethernet/realtek/r8169_main.c rtl_set_fifo_size(tp, 0x00, 0x00, 0x02, 0x06); tp 5223 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_packet_filter(tp); tp 5224 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xc0, ERIAR_MASK_0011, 0x0000); tp 5225 drivers/net/ethernet/realtek/r8169_main.c rtl_eri_write(tp, 0xb8, ERIAR_MASK_0011, 0x0000); tp 5226 drivers/net/ethernet/realtek/r8169_main.c rtl_w0w1_eri(tp, 0x0d4, ERIAR_MASK_0011, 0x0e00, 0xff00); tp 5228 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5231 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8106(struct rtl8169_private *tp) tp 5233 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5236 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800); tp 5238 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, (RTL_R32(tp, MISC) | DISABLE_LAN_EN) & ~EARLY_TALLY_EN); tp 5239 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) | EN_NDP | EN_OOB_RESET); tp 5240 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, DLLPR, RTL_R8(tp, DLLPR) & ~PFM_EN); tp 5242 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5243 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, true); tp 5248 drivers/net/ethernet/realtek/r8169_main.c return r8168_mac_ocp_read(tp, 0xe00e) & BIT(13); tp 5251 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8125_common(struct rtl8169_private *tp) tp 5253 drivers/net/ethernet/realtek/r8169_main.c rtl_pcie_state_l2l3_disable(tp); tp 5255 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, 0x382, 0x221b); tp 5256 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, 0x4500, 0); tp 5257 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, 0x4800, 0); tp 5260 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd40a, 0x0010, 0x0000); tp 5262 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config1, RTL_R8(tp, Config1) & ~0x10); tp 5264 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc140, 0xffff); tp 5265 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc142, 0xffff); tp 5267 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd3e2, 0x0fff, 0x03a9); tp 5268 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd3e4, 0x00ff, 0x0000); tp 5269 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe860, 0x0000, 0x0080); tp 5272 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb58, 0x0001, 0x0000); tp 5274 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe614, 0x0700, 0x0400); tp 5275 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe63e, 0x0c30, 0x0020); tp 5276 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c); tp 5277 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033); tp 5278 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040); tp 5279 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030); tp 5280 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000); tp 5281 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe0c0, 0x4f0f, 0x4403); tp 5282 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe052, 0x0080, 0x0067); tp 5283 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xc0ac, 0x0080, 0x1f00); tp 5284 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xd430, 0x0fff, 0x047f); tp 5285 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe84c, 0x0000, 0x00c0); tp 5286 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xea1c, 0x0004, 0x0000); tp 5287 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb54, 0x0000, 0x0001); tp 5289 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xeb54, 0x0001, 0x0000); tp 5290 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, 0x1880, RTL_R16(tp, 0x1880) & ~0x0030); tp 5292 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xe098, 0xc302); tp 5294 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_low(tp, &rtl_mac_ocp_e00e_cond, 1000, 10); tp 5296 drivers/net/ethernet/realtek/r8169_main.c rtl8125_config_eee_mac(tp); tp 5298 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) & ~RXDV_GATED_EN); tp 5302 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8125_1(struct rtl8169_private *tp) tp 5332 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5335 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5336 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8125_1); tp 5338 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8125_common(tp); tp 5341 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8125_2(struct rtl8169_private *tp) tp 5359 drivers/net/ethernet/realtek/r8169_main.c rtl_set_def_aspm_entry_latency(tp); tp 5362 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_aspm_clkreq_enable(tp, false); tp 5363 drivers/net/ethernet/realtek/r8169_main.c rtl_ephy_init(tp, e_info_8125_2); tp 5365 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8125_common(tp); tp 5368 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_config(struct rtl8169_private *tp) tp 5420 drivers/net/ethernet/realtek/r8169_main.c if (hw_configs[tp->mac_version]) tp 5421 drivers/net/ethernet/realtek/r8169_main.c hw_configs[tp->mac_version](tp); tp 5424 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8125(struct rtl8169_private *tp) tp 5430 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, i, 0); tp 5432 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_config(tp); tp 5435 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8168(struct rtl8169_private *tp) tp 5437 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_13 || tp 5438 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_16) tp 5439 drivers/net/ethernet/realtek/r8169_main.c pcie_capability_set_word(tp->pci_dev, PCI_EXP_DEVCTL, tp 5442 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8168evl_up(tp)) tp 5443 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MaxTxPacketSize, EarlySize); tp 5445 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MaxTxPacketSize, TxPacketMax); tp 5447 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_config(tp); tp 5450 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrMitigate, 0x0000); tp 5453 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start_8169(struct rtl8169_private *tp) tp 5455 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_05) tp 5456 drivers/net/ethernet/realtek/r8169_main.c pci_write_config_byte(tp->pci_dev, PCI_CACHE_LINE_SIZE, 0x08); tp 5458 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, EarlyTxThres, NoEarlyTx); tp 5460 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= PCIMulRW; tp 5462 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_02 || tp 5463 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_03) { tp 5464 drivers/net/ethernet/realtek/r8169_main.c netif_dbg(tp, drv, tp->dev, tp 5466 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= (1 << 14); tp 5469 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, CPlusCmd, tp->cp_cmd); tp 5471 drivers/net/ethernet/realtek/r8169_main.c rtl8169_set_magic_reg(tp, tp->mac_version); tp 5473 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxMissed, 0); tp 5476 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, IntrMitigate, 0x0000); tp 5479 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_start(struct rtl8169_private *tp) tp 5481 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 5483 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd &= CPCMD_MASK; tp 5484 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, CPlusCmd, tp->cp_cmd); tp 5486 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version <= RTL_GIGA_MAC_VER_06) tp 5487 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8169(tp); tp 5488 drivers/net/ethernet/realtek/r8169_main.c else if (rtl_is_8125(tp)) tp 5489 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8125(tp); tp 5491 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start_8168(tp); tp 5493 drivers/net/ethernet/realtek/r8169_main.c rtl_set_rx_max_size(tp); tp 5494 drivers/net/ethernet/realtek/r8169_main.c rtl_set_rx_tx_desc_registers(tp); tp 5495 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 5497 drivers/net/ethernet/realtek/r8169_main.c rtl_jumbo_config(tp, tp->dev->mtu); tp 5500 drivers/net/ethernet/realtek/r8169_main.c RTL_R16(tp, CPlusCmd); tp 5501 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb); tp 5502 drivers/net/ethernet/realtek/r8169_main.c rtl_init_rxcfg(tp); tp 5503 drivers/net/ethernet/realtek/r8169_main.c rtl_set_tx_config_registers(tp); tp 5504 drivers/net/ethernet/realtek/r8169_main.c rtl_set_rx_mode(tp->dev); tp 5505 drivers/net/ethernet/realtek/r8169_main.c rtl_irq_enable(tp); tp 5510 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 5512 drivers/net/ethernet/realtek/r8169_main.c rtl_jumbo_config(tp, new_mtu); tp 5536 drivers/net/ethernet/realtek/r8169_main.c static struct page *rtl8169_alloc_rx_data(struct rtl8169_private *tp, tp 5539 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 5551 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, tp->dev, "Failed to map RX DMA!\n"); tp 5562 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_rx_clear(struct rtl8169_private *tp) tp 5566 drivers/net/ethernet/realtek/r8169_main.c for (i = 0; i < NUM_RX_DESC && tp->Rx_databuff[i]; i++) { tp 5567 drivers/net/ethernet/realtek/r8169_main.c dma_unmap_page(tp_to_dev(tp), tp 5568 drivers/net/ethernet/realtek/r8169_main.c le64_to_cpu(tp->RxDescArray[i].addr), tp 5570 drivers/net/ethernet/realtek/r8169_main.c __free_pages(tp->Rx_databuff[i], get_order(R8169_RX_BUF_SIZE)); tp 5571 drivers/net/ethernet/realtek/r8169_main.c tp->Rx_databuff[i] = NULL; tp 5572 drivers/net/ethernet/realtek/r8169_main.c rtl8169_make_unusable_by_asic(tp->RxDescArray + i); tp 5581 drivers/net/ethernet/realtek/r8169_main.c static int rtl8169_rx_fill(struct rtl8169_private *tp) tp 5588 drivers/net/ethernet/realtek/r8169_main.c data = rtl8169_alloc_rx_data(tp, tp->RxDescArray + i); tp 5590 drivers/net/ethernet/realtek/r8169_main.c rtl8169_make_unusable_by_asic(tp->RxDescArray + i); tp 5593 drivers/net/ethernet/realtek/r8169_main.c tp->Rx_databuff[i] = data; tp 5596 drivers/net/ethernet/realtek/r8169_main.c rtl8169_mark_as_last_descriptor(tp->RxDescArray + NUM_RX_DESC - 1); tp 5600 drivers/net/ethernet/realtek/r8169_main.c rtl8169_rx_clear(tp); tp 5604 drivers/net/ethernet/realtek/r8169_main.c static int rtl8169_init_ring(struct rtl8169_private *tp) tp 5606 drivers/net/ethernet/realtek/r8169_main.c rtl8169_init_ring_indexes(tp); tp 5608 drivers/net/ethernet/realtek/r8169_main.c memset(tp->tx_skb, 0, sizeof(tp->tx_skb)); tp 5609 drivers/net/ethernet/realtek/r8169_main.c memset(tp->Rx_databuff, 0, sizeof(tp->Rx_databuff)); tp 5611 drivers/net/ethernet/realtek/r8169_main.c return rtl8169_rx_fill(tp); tp 5627 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start, tp 5634 drivers/net/ethernet/realtek/r8169_main.c struct ring_info *tx_skb = tp->tx_skb + entry; tp 5640 drivers/net/ethernet/realtek/r8169_main.c rtl8169_unmap_tx_skb(tp_to_dev(tp), tx_skb, tp 5641 drivers/net/ethernet/realtek/r8169_main.c tp->TxDescArray + entry); tp 5650 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_tx_clear(struct rtl8169_private *tp) tp 5652 drivers/net/ethernet/realtek/r8169_main.c rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC); tp 5653 drivers/net/ethernet/realtek/r8169_main.c tp->cur_tx = tp->dirty_tx = 0; tp 5654 drivers/net/ethernet/realtek/r8169_main.c netdev_reset_queue(tp->dev); tp 5657 drivers/net/ethernet/realtek/r8169_main.c static void rtl_reset_work(struct rtl8169_private *tp) tp 5659 drivers/net/ethernet/realtek/r8169_main.c struct net_device *dev = tp->dev; tp 5662 drivers/net/ethernet/realtek/r8169_main.c napi_disable(&tp->napi); tp 5666 drivers/net/ethernet/realtek/r8169_main.c rtl8169_hw_reset(tp); tp 5669 drivers/net/ethernet/realtek/r8169_main.c rtl8169_mark_to_asic(tp->RxDescArray + i); tp 5671 drivers/net/ethernet/realtek/r8169_main.c rtl8169_tx_clear(tp); tp 5672 drivers/net/ethernet/realtek/r8169_main.c rtl8169_init_ring_indexes(tp); tp 5674 drivers/net/ethernet/realtek/r8169_main.c napi_enable(&tp->napi); tp 5675 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start(tp); tp 5681 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 5683 drivers/net/ethernet/realtek/r8169_main.c rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); tp 5696 drivers/net/ethernet/realtek/r8169_main.c static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, tp 5702 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 5704 drivers/net/ethernet/realtek/r8169_main.c entry = tp->cur_tx; tp 5713 drivers/net/ethernet/realtek/r8169_main.c txd = tp->TxDescArray + entry; tp 5719 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, tp->dev, tp 5728 drivers/net/ethernet/realtek/r8169_main.c tp->tx_skb[entry].len = len; tp 5732 drivers/net/ethernet/realtek/r8169_main.c tp->tx_skb[entry].skb = skb; tp 5739 drivers/net/ethernet/realtek/r8169_main.c rtl8169_tx_clear_range(tp, tp->cur_tx + 1, cur_frag); tp 5743 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_test_hw_pad_bug(struct rtl8169_private *tp, struct sk_buff *skb) tp 5745 drivers/net/ethernet/realtek/r8169_main.c return skb->len < ETH_ZLEN && tp->mac_version == RTL_GIGA_MAC_VER_34; tp 5790 drivers/net/ethernet/realtek/r8169_main.c static bool rtl8169_tso_csum_v2(struct rtl8169_private *tp, tp 5844 drivers/net/ethernet/realtek/r8169_main.c if (unlikely(rtl_test_hw_pad_bug(tp, skb))) tp 5851 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_tx_slots_avail(struct rtl8169_private *tp, tp 5854 drivers/net/ethernet/realtek/r8169_main.c unsigned int slots_avail = tp->dirty_tx + NUM_TX_DESC - tp->cur_tx; tp 5861 drivers/net/ethernet/realtek/r8169_main.c static bool rtl_chip_supports_csum_v2(struct rtl8169_private *tp) tp 5863 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 5872 drivers/net/ethernet/realtek/r8169_main.c static void rtl8169_doorbell(struct rtl8169_private *tp) tp 5874 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8125(tp)) tp 5875 drivers/net/ethernet/realtek/r8169_main.c RTL_W16(tp, TxPoll_8125, BIT(0)); tp 5877 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, TxPoll, NPQ); tp 5883 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 5884 drivers/net/ethernet/realtek/r8169_main.c unsigned int entry = tp->cur_tx % NUM_TX_DESC; tp 5885 drivers/net/ethernet/realtek/r8169_main.c struct TxDesc *txd = tp->TxDescArray + entry; tp 5886 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 5893 drivers/net/ethernet/realtek/r8169_main.c if (unlikely(!rtl_tx_slots_avail(tp, skb_shinfo(skb)->nr_frags))) { tp 5894 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n"); tp 5904 drivers/net/ethernet/realtek/r8169_main.c if (rtl_chip_supports_csum_v2(tp)) { tp 5905 drivers/net/ethernet/realtek/r8169_main.c if (!rtl8169_tso_csum_v2(tp, skb, opts)) tp 5915 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, drv, dev, "Failed to map TX DMA!\n"); tp 5919 drivers/net/ethernet/realtek/r8169_main.c tp->tx_skb[entry].len = len; tp 5922 drivers/net/ethernet/realtek/r8169_main.c frags = rtl8169_xmit_frags(tp, skb, opts); tp 5929 drivers/net/ethernet/realtek/r8169_main.c tp->tx_skb[entry].skb = skb; tp 5946 drivers/net/ethernet/realtek/r8169_main.c tp->cur_tx += frags + 1; tp 5948 drivers/net/ethernet/realtek/r8169_main.c stop_queue = !rtl_tx_slots_avail(tp, MAX_SKB_FRAGS); tp 5959 drivers/net/ethernet/realtek/r8169_main.c rtl8169_doorbell(tp); tp 5970 drivers/net/ethernet/realtek/r8169_main.c if (rtl_tx_slots_avail(tp, MAX_SKB_FRAGS)) tp 5977 drivers/net/ethernet/realtek/r8169_main.c rtl8169_unmap_tx_skb(d, tp->tx_skb + entry, txd); tp 5994 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 5998 drivers/net/ethernet/realtek/r8169_main.c rtl_chip_supports_csum_v2(tp)) tp 6002 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 6015 drivers/net/ethernet/realtek/r8169_main.c rtl_chip_supports_csum_v2(tp)) tp 6024 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6025 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 6031 drivers/net/ethernet/realtek/r8169_main.c netif_err(tp, intr, dev, "PCI error (cmd = 0x%04x, status = 0x%04x)\n", tp 6054 drivers/net/ethernet/realtek/r8169_main.c rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); tp 6057 drivers/net/ethernet/realtek/r8169_main.c static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp, tp 6062 drivers/net/ethernet/realtek/r8169_main.c dirty_tx = tp->dirty_tx; tp 6064 drivers/net/ethernet/realtek/r8169_main.c tx_left = tp->cur_tx - dirty_tx; tp 6068 drivers/net/ethernet/realtek/r8169_main.c struct ring_info *tx_skb = tp->tx_skb + entry; tp 6071 drivers/net/ethernet/realtek/r8169_main.c status = le32_to_cpu(tp->TxDescArray[entry].opts1); tp 6081 drivers/net/ethernet/realtek/r8169_main.c rtl8169_unmap_tx_skb(tp_to_dev(tp), tx_skb, tp 6082 drivers/net/ethernet/realtek/r8169_main.c tp->TxDescArray + entry); tp 6093 drivers/net/ethernet/realtek/r8169_main.c if (tp->dirty_tx != dirty_tx) { tp 6096 drivers/net/ethernet/realtek/r8169_main.c u64_stats_update_begin(&tp->tx_stats.syncp); tp 6097 drivers/net/ethernet/realtek/r8169_main.c tp->tx_stats.packets += pkts_compl; tp 6098 drivers/net/ethernet/realtek/r8169_main.c tp->tx_stats.bytes += bytes_compl; tp 6099 drivers/net/ethernet/realtek/r8169_main.c u64_stats_update_end(&tp->tx_stats.syncp); tp 6101 drivers/net/ethernet/realtek/r8169_main.c tp->dirty_tx = dirty_tx; tp 6111 drivers/net/ethernet/realtek/r8169_main.c rtl_tx_slots_avail(tp, MAX_SKB_FRAGS)) { tp 6120 drivers/net/ethernet/realtek/r8169_main.c if (tp->cur_tx != dirty_tx) tp 6121 drivers/net/ethernet/realtek/r8169_main.c rtl8169_doorbell(tp); tp 6141 drivers/net/ethernet/realtek/r8169_main.c static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget) tp 6146 drivers/net/ethernet/realtek/r8169_main.c cur_rx = tp->cur_rx; tp 6150 drivers/net/ethernet/realtek/r8169_main.c const void *rx_buf = page_address(tp->Rx_databuff[entry]); tp 6151 drivers/net/ethernet/realtek/r8169_main.c struct RxDesc *desc = tp->RxDescArray + entry; tp 6165 drivers/net/ethernet/realtek/r8169_main.c netif_info(tp, rx_err, dev, "Rx ERROR. status = %08x\n", tp 6195 drivers/net/ethernet/realtek/r8169_main.c skb = napi_alloc_skb(&tp->napi, pkt_size); tp 6201 drivers/net/ethernet/realtek/r8169_main.c dma_sync_single_for_cpu(tp_to_dev(tp), tp 6209 drivers/net/ethernet/realtek/r8169_main.c dma_sync_single_for_device(tp_to_dev(tp), tp 6221 drivers/net/ethernet/realtek/r8169_main.c napi_gro_receive(&tp->napi, skb); tp 6223 drivers/net/ethernet/realtek/r8169_main.c u64_stats_update_begin(&tp->rx_stats.syncp); tp 6224 drivers/net/ethernet/realtek/r8169_main.c tp->rx_stats.packets++; tp 6225 drivers/net/ethernet/realtek/r8169_main.c tp->rx_stats.bytes += pkt_size; tp 6226 drivers/net/ethernet/realtek/r8169_main.c u64_stats_update_end(&tp->rx_stats.syncp); tp 6233 drivers/net/ethernet/realtek/r8169_main.c count = cur_rx - tp->cur_rx; tp 6234 drivers/net/ethernet/realtek/r8169_main.c tp->cur_rx = cur_rx; tp 6241 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = dev_instance; tp 6242 drivers/net/ethernet/realtek/r8169_main.c u32 status = rtl_get_events(tp); tp 6244 drivers/net/ethernet/realtek/r8169_main.c if (!tp->irq_enabled || (status & 0xffff) == 0xffff || tp 6245 drivers/net/ethernet/realtek/r8169_main.c !(status & tp->irq_mask)) tp 6249 drivers/net/ethernet/realtek/r8169_main.c rtl8169_pcierr_interrupt(tp->dev); tp 6254 drivers/net/ethernet/realtek/r8169_main.c phy_mac_interrupt(tp->phydev); tp 6257 drivers/net/ethernet/realtek/r8169_main.c tp->mac_version == RTL_GIGA_MAC_VER_11)) { tp 6258 drivers/net/ethernet/realtek/r8169_main.c netif_stop_queue(tp->dev); tp 6260 drivers/net/ethernet/realtek/r8169_main.c set_bit(RTL_FLAG_TASK_RESET_PENDING, tp->wk.flags); tp 6263 drivers/net/ethernet/realtek/r8169_main.c rtl_irq_disable(tp); tp 6264 drivers/net/ethernet/realtek/r8169_main.c napi_schedule_irqoff(&tp->napi); tp 6266 drivers/net/ethernet/realtek/r8169_main.c rtl_ack_events(tp, status); tp 6279 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = tp 6281 drivers/net/ethernet/realtek/r8169_main.c struct net_device *dev = tp->dev; tp 6284 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6287 drivers/net/ethernet/realtek/r8169_main.c !test_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags)) tp 6293 drivers/net/ethernet/realtek/r8169_main.c pending = test_and_clear_bit(rtl_work[i].bitnr, tp->wk.flags); tp 6295 drivers/net/ethernet/realtek/r8169_main.c rtl_work[i].action(tp); tp 6299 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6304 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = container_of(napi, struct rtl8169_private, napi); tp 6305 drivers/net/ethernet/realtek/r8169_main.c struct net_device *dev = tp->dev; tp 6308 drivers/net/ethernet/realtek/r8169_main.c work_done = rtl_rx(dev, tp, (u32) budget); tp 6310 drivers/net/ethernet/realtek/r8169_main.c rtl_tx(dev, tp, budget); tp 6314 drivers/net/ethernet/realtek/r8169_main.c rtl_irq_enable(tp); tp 6322 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6324 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version > RTL_GIGA_MAC_VER_06) tp 6327 drivers/net/ethernet/realtek/r8169_main.c dev->stats.rx_missed_errors += RTL_R32(tp, RxMissed) & 0xffffff; tp 6328 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, RxMissed, 0); tp 6333 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(ndev); tp 6336 drivers/net/ethernet/realtek/r8169_main.c rtl_link_chg_patch(tp); tp 6337 drivers/net/ethernet/realtek/r8169_main.c pm_request_resume(&tp->pci_dev->dev); tp 6339 drivers/net/ethernet/realtek/r8169_main.c pm_runtime_idle(&tp->pci_dev->dev); tp 6343 drivers/net/ethernet/realtek/r8169_main.c phy_print_status(tp->phydev); tp 6346 drivers/net/ethernet/realtek/r8169_main.c static int r8169_phy_connect(struct rtl8169_private *tp) tp 6348 drivers/net/ethernet/realtek/r8169_main.c struct phy_device *phydev = tp->phydev; tp 6352 drivers/net/ethernet/realtek/r8169_main.c phy_mode = tp->supports_gmii ? PHY_INTERFACE_MODE_GMII : tp 6355 drivers/net/ethernet/realtek/r8169_main.c ret = phy_connect_direct(tp->dev, phydev, r8169_phylink_handler, tp 6360 drivers/net/ethernet/realtek/r8169_main.c if (!tp->supports_gmii) tp 6372 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6374 drivers/net/ethernet/realtek/r8169_main.c phy_stop(tp->phydev); tp 6376 drivers/net/ethernet/realtek/r8169_main.c napi_disable(&tp->napi); tp 6379 drivers/net/ethernet/realtek/r8169_main.c rtl8169_hw_reset(tp); tp 6390 drivers/net/ethernet/realtek/r8169_main.c rtl8169_tx_clear(tp); tp 6392 drivers/net/ethernet/realtek/r8169_main.c rtl8169_rx_clear(tp); tp 6394 drivers/net/ethernet/realtek/r8169_main.c rtl_pll_power_down(tp); tp 6399 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6400 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 6405 drivers/net/ethernet/realtek/r8169_main.c rtl8169_update_counters(tp); tp 6407 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6409 drivers/net/ethernet/realtek/r8169_main.c bitmap_zero(tp->wk.flags, RTL_FLAG_MAX); tp 6412 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6414 drivers/net/ethernet/realtek/r8169_main.c cancel_work_sync(&tp->wk.work); tp 6416 drivers/net/ethernet/realtek/r8169_main.c phy_disconnect(tp->phydev); tp 6418 drivers/net/ethernet/realtek/r8169_main.c pci_free_irq(pdev, 0, tp); tp 6420 drivers/net/ethernet/realtek/r8169_main.c dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, tp 6421 drivers/net/ethernet/realtek/r8169_main.c tp->RxPhyAddr); tp 6422 drivers/net/ethernet/realtek/r8169_main.c dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray, tp 6423 drivers/net/ethernet/realtek/r8169_main.c tp->TxPhyAddr); tp 6424 drivers/net/ethernet/realtek/r8169_main.c tp->TxDescArray = NULL; tp 6425 drivers/net/ethernet/realtek/r8169_main.c tp->RxDescArray = NULL; tp 6435 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6437 drivers/net/ethernet/realtek/r8169_main.c rtl8169_interrupt(pci_irq_vector(tp->pci_dev, 0), tp); tp 6443 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6444 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 6453 drivers/net/ethernet/realtek/r8169_main.c tp->TxDescArray = dma_alloc_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp 6454 drivers/net/ethernet/realtek/r8169_main.c &tp->TxPhyAddr, GFP_KERNEL); tp 6455 drivers/net/ethernet/realtek/r8169_main.c if (!tp->TxDescArray) tp 6458 drivers/net/ethernet/realtek/r8169_main.c tp->RxDescArray = dma_alloc_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp 6459 drivers/net/ethernet/realtek/r8169_main.c &tp->RxPhyAddr, GFP_KERNEL); tp 6460 drivers/net/ethernet/realtek/r8169_main.c if (!tp->RxDescArray) tp 6463 drivers/net/ethernet/realtek/r8169_main.c retval = rtl8169_init_ring(tp); tp 6467 drivers/net/ethernet/realtek/r8169_main.c rtl_request_firmware(tp); tp 6469 drivers/net/ethernet/realtek/r8169_main.c retval = pci_request_irq(pdev, 0, rtl8169_interrupt, NULL, tp, tp 6474 drivers/net/ethernet/realtek/r8169_main.c retval = r8169_phy_connect(tp); tp 6478 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6480 drivers/net/ethernet/realtek/r8169_main.c set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags); tp 6482 drivers/net/ethernet/realtek/r8169_main.c napi_enable(&tp->napi); tp 6484 drivers/net/ethernet/realtek/r8169_main.c rtl8169_init_phy(dev, tp); tp 6486 drivers/net/ethernet/realtek/r8169_main.c rtl_pll_power_up(tp); tp 6488 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_start(tp); tp 6490 drivers/net/ethernet/realtek/r8169_main.c if (!rtl8169_init_counter_offsets(tp)) tp 6491 drivers/net/ethernet/realtek/r8169_main.c netif_warn(tp, hw, dev, "counter reset/update failed\n"); tp 6493 drivers/net/ethernet/realtek/r8169_main.c phy_start(tp->phydev); tp 6496 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6503 drivers/net/ethernet/realtek/r8169_main.c pci_free_irq(pdev, 0, tp); tp 6505 drivers/net/ethernet/realtek/r8169_main.c rtl_release_firmware(tp); tp 6506 drivers/net/ethernet/realtek/r8169_main.c rtl8169_rx_clear(tp); tp 6508 drivers/net/ethernet/realtek/r8169_main.c dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, tp 6509 drivers/net/ethernet/realtek/r8169_main.c tp->RxPhyAddr); tp 6510 drivers/net/ethernet/realtek/r8169_main.c tp->RxDescArray = NULL; tp 6512 drivers/net/ethernet/realtek/r8169_main.c dma_free_coherent(&pdev->dev, R8169_TX_RING_BYTES, tp->TxDescArray, tp 6513 drivers/net/ethernet/realtek/r8169_main.c tp->TxPhyAddr); tp 6514 drivers/net/ethernet/realtek/r8169_main.c tp->TxDescArray = NULL; tp 6523 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6524 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 6525 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_counters *counters = tp->counters; tp 6534 drivers/net/ethernet/realtek/r8169_main.c start = u64_stats_fetch_begin_irq(&tp->rx_stats.syncp); tp 6535 drivers/net/ethernet/realtek/r8169_main.c stats->rx_packets = tp->rx_stats.packets; tp 6536 drivers/net/ethernet/realtek/r8169_main.c stats->rx_bytes = tp->rx_stats.bytes; tp 6537 drivers/net/ethernet/realtek/r8169_main.c } while (u64_stats_fetch_retry_irq(&tp->rx_stats.syncp, start)); tp 6540 drivers/net/ethernet/realtek/r8169_main.c start = u64_stats_fetch_begin_irq(&tp->tx_stats.syncp); tp 6541 drivers/net/ethernet/realtek/r8169_main.c stats->tx_packets = tp->tx_stats.packets; tp 6542 drivers/net/ethernet/realtek/r8169_main.c stats->tx_bytes = tp->tx_stats.bytes; tp 6543 drivers/net/ethernet/realtek/r8169_main.c } while (u64_stats_fetch_retry_irq(&tp->tx_stats.syncp, start)); tp 6559 drivers/net/ethernet/realtek/r8169_main.c rtl8169_update_counters(tp); tp 6566 drivers/net/ethernet/realtek/r8169_main.c le64_to_cpu(tp->tc_offset.tx_errors); tp 6568 drivers/net/ethernet/realtek/r8169_main.c le32_to_cpu(tp->tc_offset.tx_multi_collision); tp 6570 drivers/net/ethernet/realtek/r8169_main.c le16_to_cpu(tp->tc_offset.tx_aborted); tp 6577 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6582 drivers/net/ethernet/realtek/r8169_main.c phy_stop(tp->phydev); tp 6585 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6586 drivers/net/ethernet/realtek/r8169_main.c napi_disable(&tp->napi); tp 6588 drivers/net/ethernet/realtek/r8169_main.c bitmap_zero(tp->wk.flags, RTL_FLAG_MAX); tp 6590 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6592 drivers/net/ethernet/realtek/r8169_main.c rtl_pll_power_down(tp); tp 6600 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6603 drivers/net/ethernet/realtek/r8169_main.c clk_disable_unprepare(tp->clk); tp 6610 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6614 drivers/net/ethernet/realtek/r8169_main.c rtl_pll_power_up(tp); tp 6615 drivers/net/ethernet/realtek/r8169_main.c rtl8169_init_phy(dev, tp); tp 6617 drivers/net/ethernet/realtek/r8169_main.c phy_start(tp->phydev); tp 6619 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6620 drivers/net/ethernet/realtek/r8169_main.c napi_enable(&tp->napi); tp 6621 drivers/net/ethernet/realtek/r8169_main.c set_bit(RTL_FLAG_TASK_ENABLED, tp->wk.flags); tp 6622 drivers/net/ethernet/realtek/r8169_main.c rtl_reset_work(tp); tp 6623 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6629 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6631 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, dev->dev_addr); tp 6633 drivers/net/ethernet/realtek/r8169_main.c clk_prepare_enable(tp->clk); tp 6644 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6646 drivers/net/ethernet/realtek/r8169_main.c if (!tp->TxDescArray) tp 6649 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6650 drivers/net/ethernet/realtek/r8169_main.c __rtl8169_set_wol(tp, WAKE_ANY); tp 6651 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6657 drivers/net/ethernet/realtek/r8169_main.c rtl8169_update_counters(tp); tp 6665 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6667 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, dev->dev_addr); tp 6669 drivers/net/ethernet/realtek/r8169_main.c if (!tp->TxDescArray) tp 6672 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_work(tp); tp 6673 drivers/net/ethernet/realtek/r8169_main.c __rtl8169_set_wol(tp, tp->saved_wolopts); tp 6674 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_work(tp); tp 6711 drivers/net/ethernet/realtek/r8169_main.c static void rtl_wol_shutdown_quirk(struct rtl8169_private *tp) tp 6714 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 6718 drivers/net/ethernet/realtek/r8169_main.c pci_clear_master(tp->pci_dev); tp 6720 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, CmdRxEnb); tp 6722 drivers/net/ethernet/realtek/r8169_main.c RTL_R8(tp, ChipCmd); tp 6732 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6737 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, dev->perm_addr); tp 6739 drivers/net/ethernet/realtek/r8169_main.c rtl8169_hw_reset(tp); tp 6742 drivers/net/ethernet/realtek/r8169_main.c if (tp->saved_wolopts) { tp 6743 drivers/net/ethernet/realtek/r8169_main.c rtl_wol_suspend_quirk(tp); tp 6744 drivers/net/ethernet/realtek/r8169_main.c rtl_wol_shutdown_quirk(tp); tp 6755 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = netdev_priv(dev); tp 6757 drivers/net/ethernet/realtek/r8169_main.c if (r8168_check_dash(tp)) tp 6758 drivers/net/ethernet/realtek/r8169_main.c rtl8168_driver_stop(tp); tp 6760 drivers/net/ethernet/realtek/r8169_main.c netif_napi_del(&tp->napi); tp 6763 drivers/net/ethernet/realtek/r8169_main.c mdiobus_unregister(tp->phydev->mdio.bus); tp 6765 drivers/net/ethernet/realtek/r8169_main.c rtl_release_firmware(tp); tp 6771 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, dev->perm_addr); tp 6794 drivers/net/ethernet/realtek/r8169_main.c static void rtl_set_irq_mask(struct rtl8169_private *tp) tp 6796 drivers/net/ethernet/realtek/r8169_main.c tp->irq_mask = RTL_EVENT_NAPI | LinkChg; tp 6798 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version <= RTL_GIGA_MAC_VER_06) tp 6799 drivers/net/ethernet/realtek/r8169_main.c tp->irq_mask |= SYSErr | RxOverflow | RxFIFOOver; tp 6800 drivers/net/ethernet/realtek/r8169_main.c else if (tp->mac_version == RTL_GIGA_MAC_VER_11) tp 6802 drivers/net/ethernet/realtek/r8169_main.c tp->irq_mask |= RxFIFOOver; tp 6804 drivers/net/ethernet/realtek/r8169_main.c tp->irq_mask |= RxOverflow; tp 6807 drivers/net/ethernet/realtek/r8169_main.c static int rtl_alloc_irq(struct rtl8169_private *tp) tp 6811 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 6813 drivers/net/ethernet/realtek/r8169_main.c rtl_unlock_config_regs(tp); tp 6814 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, Config2, RTL_R8(tp, Config2) & ~MSIEnable); tp 6815 drivers/net/ethernet/realtek/r8169_main.c rtl_lock_config_regs(tp); tp 6825 drivers/net/ethernet/realtek/r8169_main.c return pci_alloc_irq_vectors(tp->pci_dev, 1, 1, flags); tp 6828 drivers/net/ethernet/realtek/r8169_main.c static void rtl_read_mac_address(struct rtl8169_private *tp, tp 6832 drivers/net/ethernet/realtek/r8169_main.c if (rtl_is_8168evl_up(tp) && tp->mac_version != RTL_GIGA_MAC_VER_34) { tp 6833 drivers/net/ethernet/realtek/r8169_main.c u32 value = rtl_eri_read(tp, 0xe0); tp 6840 drivers/net/ethernet/realtek/r8169_main.c value = rtl_eri_read(tp, 0xe4); tp 6843 drivers/net/ethernet/realtek/r8169_main.c } else if (rtl_is_8125(tp)) { tp 6844 drivers/net/ethernet/realtek/r8169_main.c rtl_read_mac_from_reg(tp, mac_addr, MAC0_BKP); tp 6850 drivers/net/ethernet/realtek/r8169_main.c return RTL_R8(tp, MCU) & LINK_LIST_RDY; tp 6855 drivers/net/ethernet/realtek/r8169_main.c return (RTL_R8(tp, MCU) & RXTX_EMPTY) == RXTX_EMPTY; tp 6860 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = mii_bus->priv; tp 6865 drivers/net/ethernet/realtek/r8169_main.c return rtl_readphy(tp, phyreg); tp 6871 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp = mii_bus->priv; tp 6876 drivers/net/ethernet/realtek/r8169_main.c rtl_writephy(tp, phyreg, val); tp 6881 drivers/net/ethernet/realtek/r8169_main.c static int r8169_mdio_register(struct rtl8169_private *tp) tp 6883 drivers/net/ethernet/realtek/r8169_main.c struct pci_dev *pdev = tp->pci_dev; tp 6892 drivers/net/ethernet/realtek/r8169_main.c new_bus->priv = tp; tp 6904 drivers/net/ethernet/realtek/r8169_main.c tp->phydev = mdiobus_get_phy(new_bus, 0); tp 6905 drivers/net/ethernet/realtek/r8169_main.c if (!tp->phydev) { tp 6908 drivers/net/ethernet/realtek/r8169_main.c } else if (!tp->phydev->drv) { tp 6918 drivers/net/ethernet/realtek/r8169_main.c phy_suspend(tp->phydev); tp 6923 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_init_8168g(struct rtl8169_private *tp) tp 6925 drivers/net/ethernet/realtek/r8169_main.c tp->ocp_base = OCP_STD_PHY_BASE; tp 6927 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) | RXDV_GATED_EN); tp 6929 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_udelay_loop_wait_high(tp, &rtl_txcfg_empty_cond, 100, 42)) tp 6932 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_udelay_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42)) tp 6935 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) & ~(CmdTxEnb | CmdRxEnb)); tp 6937 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); tp 6939 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe8de, BIT(14), 0); tp 6941 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_udelay_loop_wait_high(tp, &rtl_link_list_ready_cond, 100, 42)) tp 6944 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe8de, 0, BIT(15)); tp 6946 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_high(tp, &rtl_link_list_ready_cond, 100, 42); tp 6949 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_init_8125(struct rtl8169_private *tp) tp 6951 drivers/net/ethernet/realtek/r8169_main.c tp->ocp_base = OCP_STD_PHY_BASE; tp 6953 drivers/net/ethernet/realtek/r8169_main.c RTL_W32(tp, MISC, RTL_R32(tp, MISC) | RXDV_GATED_EN); tp 6955 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_udelay_loop_wait_high(tp, &rtl_rxtx_empty_cond, 100, 42)) tp 6958 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, ChipCmd, RTL_R8(tp, ChipCmd) & ~(CmdTxEnb | CmdRxEnb)); tp 6960 drivers/net/ethernet/realtek/r8169_main.c RTL_W8(tp, MCU, RTL_R8(tp, MCU) & ~NOW_IS_OOB); tp 6962 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_modify(tp, 0xe8de, BIT(14), 0); tp 6964 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_udelay_loop_wait_high(tp, &rtl_link_list_ready_cond, 100, 42)) tp 6967 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc0aa, 0x07d0); tp 6968 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc0a6, 0x0150); tp 6969 drivers/net/ethernet/realtek/r8169_main.c r8168_mac_ocp_write(tp, 0xc01e, 0x5555); tp 6971 drivers/net/ethernet/realtek/r8169_main.c rtl_udelay_loop_wait_high(tp, &rtl_link_list_ready_cond, 100, 42); tp 6974 drivers/net/ethernet/realtek/r8169_main.c static void rtl_hw_initialize(struct rtl8169_private *tp) tp 6976 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 6978 drivers/net/ethernet/realtek/r8169_main.c rtl8168ep_stop_cmac(tp); tp 6981 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_init_8168g(tp); tp 6984 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_init_8125(tp); tp 6991 drivers/net/ethernet/realtek/r8169_main.c static int rtl_jumbo_max(struct rtl8169_private *tp) tp 6994 drivers/net/ethernet/realtek/r8169_main.c if (!tp->supports_gmii) tp 6997 drivers/net/ethernet/realtek/r8169_main.c switch (tp->mac_version) { tp 7019 drivers/net/ethernet/realtek/r8169_main.c static int rtl_get_ether_clk(struct rtl8169_private *tp) tp 7021 drivers/net/ethernet/realtek/r8169_main.c struct device *d = tp_to_dev(tp); tp 7034 drivers/net/ethernet/realtek/r8169_main.c tp->clk = clk; tp 7045 drivers/net/ethernet/realtek/r8169_main.c static void rtl_init_mac_address(struct rtl8169_private *tp) tp 7047 drivers/net/ethernet/realtek/r8169_main.c struct net_device *dev = tp->dev; tp 7051 drivers/net/ethernet/realtek/r8169_main.c rc = eth_platform_get_mac_address(tp_to_dev(tp), mac_addr); tp 7055 drivers/net/ethernet/realtek/r8169_main.c rtl_read_mac_address(tp, mac_addr); tp 7059 drivers/net/ethernet/realtek/r8169_main.c rtl_read_mac_from_reg(tp, mac_addr, MAC0); tp 7064 drivers/net/ethernet/realtek/r8169_main.c dev_warn(tp_to_dev(tp), "can't read MAC address, setting random one\n"); tp 7066 drivers/net/ethernet/realtek/r8169_main.c rtl_rar_set(tp, mac_addr); tp 7071 drivers/net/ethernet/realtek/r8169_main.c struct rtl8169_private *tp; tp 7076 drivers/net/ethernet/realtek/r8169_main.c dev = devm_alloc_etherdev(&pdev->dev, sizeof (*tp)); tp 7082 drivers/net/ethernet/realtek/r8169_main.c tp = netdev_priv(dev); tp 7083 drivers/net/ethernet/realtek/r8169_main.c tp->dev = dev; tp 7084 drivers/net/ethernet/realtek/r8169_main.c tp->pci_dev = pdev; tp 7085 drivers/net/ethernet/realtek/r8169_main.c tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT); tp 7086 drivers/net/ethernet/realtek/r8169_main.c tp->supports_gmii = ent->driver_data == RTL_CFG_NO_GBIT ? 0 : 1; tp 7087 drivers/net/ethernet/realtek/r8169_main.c tp->eee_adv = -1; tp 7090 drivers/net/ethernet/realtek/r8169_main.c rc = rtl_get_ether_clk(tp); tp 7099 drivers/net/ethernet/realtek/r8169_main.c tp->aspm_manageable = !rc; tp 7130 drivers/net/ethernet/realtek/r8169_main.c tp->mmio_addr = pcim_iomap_table(pdev)[region]; tp 7133 drivers/net/ethernet/realtek/r8169_main.c rtl8169_get_mac_version(tp); tp 7134 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_NONE) tp 7137 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd = RTL_R16(tp, CPlusCmd); tp 7139 drivers/net/ethernet/realtek/r8169_main.c if (sizeof(dma_addr_t) > 4 && tp->mac_version >= RTL_GIGA_MAC_VER_18 && tp 7143 drivers/net/ethernet/realtek/r8169_main.c rtl_init_rxcfg(tp); tp 7145 drivers/net/ethernet/realtek/r8169_main.c rtl8169_irq_mask_and_ack(tp); tp 7147 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_initialize(tp); tp 7149 drivers/net/ethernet/realtek/r8169_main.c rtl_hw_reset(tp); tp 7153 drivers/net/ethernet/realtek/r8169_main.c chipset = tp->mac_version; tp 7155 drivers/net/ethernet/realtek/r8169_main.c rc = rtl_alloc_irq(tp); tp 7161 drivers/net/ethernet/realtek/r8169_main.c mutex_init(&tp->wk.mutex); tp 7162 drivers/net/ethernet/realtek/r8169_main.c INIT_WORK(&tp->wk.work, rtl_task); tp 7163 drivers/net/ethernet/realtek/r8169_main.c u64_stats_init(&tp->rx_stats.syncp); tp 7164 drivers/net/ethernet/realtek/r8169_main.c u64_stats_init(&tp->tx_stats.syncp); tp 7166 drivers/net/ethernet/realtek/r8169_main.c rtl_init_mac_address(tp); tp 7170 drivers/net/ethernet/realtek/r8169_main.c netif_napi_add(dev, &tp->napi, rtl8169_poll, NAPI_POLL_WEIGHT); tp 7180 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= RxChkSum; tp 7182 drivers/net/ethernet/realtek/r8169_main.c if (!rtl_is_8125(tp)) tp 7183 drivers/net/ethernet/realtek/r8169_main.c tp->cp_cmd |= RxVlan; tp 7188 drivers/net/ethernet/realtek/r8169_main.c if (tp->mac_version == RTL_GIGA_MAC_VER_05) tp 7192 drivers/net/ethernet/realtek/r8169_main.c if (rtl_chip_supports_csum_v2(tp)) { tp 7202 drivers/net/ethernet/realtek/r8169_main.c if (rtl_chip_supports_csum_v2(tp)) { tp 7217 drivers/net/ethernet/realtek/r8169_main.c jumbo_max = rtl_jumbo_max(tp); tp 7220 drivers/net/ethernet/realtek/r8169_main.c rtl_set_irq_mask(tp); tp 7222 drivers/net/ethernet/realtek/r8169_main.c tp->fw_name = rtl_chip_infos[chipset].fw_name; tp 7224 drivers/net/ethernet/realtek/r8169_main.c tp->counters = dmam_alloc_coherent (&pdev->dev, sizeof(*tp->counters), tp 7225 drivers/net/ethernet/realtek/r8169_main.c &tp->counters_phys_addr, tp 7227 drivers/net/ethernet/realtek/r8169_main.c if (!tp->counters) tp 7232 drivers/net/ethernet/realtek/r8169_main.c rc = r8169_mdio_register(tp); tp 7237 drivers/net/ethernet/realtek/r8169_main.c rtl_pll_power_down(tp); tp 7243 drivers/net/ethernet/realtek/r8169_main.c netif_info(tp, probe, dev, "%s, %pM, XID %03x, IRQ %d\n", tp 7245 drivers/net/ethernet/realtek/r8169_main.c (RTL_R32(tp, TxConfig) >> 20) & 0xfcf, tp 7249 drivers/net/ethernet/realtek/r8169_main.c netif_info(tp, probe, dev, tp 7251 drivers/net/ethernet/realtek/r8169_main.c jumbo_max, tp->mac_version <= RTL_GIGA_MAC_VER_06 ? tp 7254 drivers/net/ethernet/realtek/r8169_main.c if (r8168_check_dash(tp)) tp 7255 drivers/net/ethernet/realtek/r8169_main.c rtl8168_driver_start(tp); tp 7263 drivers/net/ethernet/realtek/r8169_main.c mdiobus_unregister(tp->phydev->mdio.bus); tp 400 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 402 drivers/net/ethernet/sis/sis190.c mdio_write(tp->mmio_addr, phy_id, reg, val); tp 407 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 409 drivers/net/ethernet/sis/sis190.c return mdio_read(tp->mmio_addr, phy_id, reg); tp 487 drivers/net/ethernet/sis/sis190.c static struct sk_buff *sis190_alloc_rx_skb(struct sis190_private *tp, tp 490 drivers/net/ethernet/sis/sis190.c u32 rx_buf_sz = tp->rx_buf_sz; tp 494 drivers/net/ethernet/sis/sis190.c skb = netdev_alloc_skb(tp->dev, rx_buf_sz); tp 497 drivers/net/ethernet/sis/sis190.c mapping = pci_map_single(tp->pci_dev, skb->data, tp->rx_buf_sz, tp 499 drivers/net/ethernet/sis/sis190.c if (pci_dma_mapping_error(tp->pci_dev, mapping)) tp 512 drivers/net/ethernet/sis/sis190.c static u32 sis190_rx_fill(struct sis190_private *tp, struct net_device *dev, tp 520 drivers/net/ethernet/sis/sis190.c if (tp->Rx_skbuff[i]) tp 523 drivers/net/ethernet/sis/sis190.c tp->Rx_skbuff[i] = sis190_alloc_rx_skb(tp, tp->RxDescRing + i); tp 525 drivers/net/ethernet/sis/sis190.c if (!tp->Rx_skbuff[i]) tp 531 drivers/net/ethernet/sis/sis190.c static bool sis190_try_rx_copy(struct sis190_private *tp, tp 541 drivers/net/ethernet/sis/sis190.c skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size); tp 545 drivers/net/ethernet/sis/sis190.c pci_dma_sync_single_for_cpu(tp->pci_dev, addr, tp->rx_buf_sz, tp 575 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp, void __iomem *ioaddr) tp 578 drivers/net/ethernet/sis/sis190.c u32 rx_left, cur_rx = tp->cur_rx; tp 581 drivers/net/ethernet/sis/sis190.c rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; tp 586 drivers/net/ethernet/sis/sis190.c struct RxDesc *desc = tp->RxDescRing + entry; tp 597 drivers/net/ethernet/sis/sis190.c sis190_give_to_asic(desc, tp->rx_buf_sz); tp 599 drivers/net/ethernet/sis/sis190.c struct sk_buff *skb = tp->Rx_skbuff[entry]; tp 602 drivers/net/ethernet/sis/sis190.c struct pci_dev *pdev = tp->pci_dev; tp 604 drivers/net/ethernet/sis/sis190.c if (unlikely(pkt_size > tp->rx_buf_sz)) { tp 605 drivers/net/ethernet/sis/sis190.c netif_info(tp, intr, dev, tp 609 drivers/net/ethernet/sis/sis190.c sis190_give_to_asic(desc, tp->rx_buf_sz); tp 614 drivers/net/ethernet/sis/sis190.c if (sis190_try_rx_copy(tp, &skb, pkt_size, addr)) { tp 616 drivers/net/ethernet/sis/sis190.c tp->rx_buf_sz, PCI_DMA_FROMDEVICE); tp 617 drivers/net/ethernet/sis/sis190.c sis190_give_to_asic(desc, tp->rx_buf_sz); tp 619 drivers/net/ethernet/sis/sis190.c pci_unmap_single(pdev, addr, tp->rx_buf_sz, tp 621 drivers/net/ethernet/sis/sis190.c tp->Rx_skbuff[entry] = NULL; tp 636 drivers/net/ethernet/sis/sis190.c count = cur_rx - tp->cur_rx; tp 637 drivers/net/ethernet/sis/sis190.c tp->cur_rx = cur_rx; tp 639 drivers/net/ethernet/sis/sis190.c delta = sis190_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); tp 641 drivers/net/ethernet/sis/sis190.c netif_info(tp, intr, dev, "no Rx buffer allocated\n"); tp 642 drivers/net/ethernet/sis/sis190.c tp->dirty_rx += delta; tp 644 drivers/net/ethernet/sis/sis190.c if ((tp->dirty_rx + NUM_RX_DESC) == tp->cur_rx) tp 645 drivers/net/ethernet/sis/sis190.c netif_emerg(tp, intr, dev, "Rx buffers exhausted\n"); tp 684 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp, void __iomem *ioaddr) tp 687 drivers/net/ethernet/sis/sis190.c u32 pending, dirty_tx = tp->dirty_tx; tp 695 drivers/net/ethernet/sis/sis190.c pending = tp->cur_tx - dirty_tx; tp 700 drivers/net/ethernet/sis/sis190.c struct TxDesc *txd = tp->TxDescRing + entry; tp 707 drivers/net/ethernet/sis/sis190.c skb = tp->Tx_skbuff[entry]; tp 715 drivers/net/ethernet/sis/sis190.c sis190_unmap_tx_skb(tp->pci_dev, skb, txd); tp 716 drivers/net/ethernet/sis/sis190.c tp->Tx_skbuff[entry] = NULL; tp 720 drivers/net/ethernet/sis/sis190.c if (tp->dirty_tx != dirty_tx) { tp 721 drivers/net/ethernet/sis/sis190.c tp->dirty_tx = dirty_tx; tp 735 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 736 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 757 drivers/net/ethernet/sis/sis190.c netif_info(tp, intr, dev, "link change\n"); tp 758 drivers/net/ethernet/sis/sis190.c del_timer(&tp->timer); tp 759 drivers/net/ethernet/sis/sis190.c schedule_work(&tp->phy_task); tp 763 drivers/net/ethernet/sis/sis190.c sis190_rx_interrupt(dev, tp, ioaddr); tp 766 drivers/net/ethernet/sis/sis190.c sis190_tx_interrupt(dev, tp, ioaddr); tp 774 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 775 drivers/net/ethernet/sis/sis190.c const int irq = tp->pci_dev->irq; tp 783 drivers/net/ethernet/sis/sis190.c static void sis190_free_rx_skb(struct sis190_private *tp, tp 786 drivers/net/ethernet/sis/sis190.c struct pci_dev *pdev = tp->pci_dev; tp 788 drivers/net/ethernet/sis/sis190.c pci_unmap_single(pdev, le32_to_cpu(desc->addr), tp->rx_buf_sz, tp 795 drivers/net/ethernet/sis/sis190.c static void sis190_rx_clear(struct sis190_private *tp) tp 800 drivers/net/ethernet/sis/sis190.c if (!tp->Rx_skbuff[i]) tp 802 drivers/net/ethernet/sis/sis190.c sis190_free_rx_skb(tp, tp->Rx_skbuff + i, tp->RxDescRing + i); tp 806 drivers/net/ethernet/sis/sis190.c static void sis190_init_ring_indexes(struct sis190_private *tp) tp 808 drivers/net/ethernet/sis/sis190.c tp->dirty_tx = tp->dirty_rx = tp->cur_tx = tp->cur_rx = 0; tp 813 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 815 drivers/net/ethernet/sis/sis190.c sis190_init_ring_indexes(tp); tp 817 drivers/net/ethernet/sis/sis190.c memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); tp 818 drivers/net/ethernet/sis/sis190.c memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); tp 820 drivers/net/ethernet/sis/sis190.c if (sis190_rx_fill(tp, dev, 0, NUM_RX_DESC) != NUM_RX_DESC) tp 823 drivers/net/ethernet/sis/sis190.c sis190_mark_as_last_descriptor(tp->RxDescRing + NUM_RX_DESC - 1); tp 828 drivers/net/ethernet/sis/sis190.c sis190_rx_clear(tp); tp 834 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 835 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 863 drivers/net/ethernet/sis/sis190.c spin_lock_irqsave(&tp->lock, flags); tp 869 drivers/net/ethernet/sis/sis190.c spin_unlock_irqrestore(&tp->lock, flags); tp 882 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 883 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 887 drivers/net/ethernet/sis/sis190.c SIS_W32(TxDescStartAddr, tp->tx_dma); tp 888 drivers/net/ethernet/sis/sis190.c SIS_W32(RxDescStartAddr, tp->rx_dma); tp 915 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = tp 917 drivers/net/ethernet/sis/sis190.c struct net_device *dev = tp->dev; tp 918 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 919 drivers/net/ethernet/sis/sis190.c int phy_id = tp->mii_if.phy_id; tp 930 drivers/net/ethernet/sis/sis190.c mod_timer(&tp->timer, jiffies + HZ/10); tp 935 drivers/net/ethernet/sis/sis190.c if (!(val & BMSR_ANEGCOMPLETE) && tp->link_status != LNK_AUTONEG) { tp 937 drivers/net/ethernet/sis/sis190.c netif_warn(tp, link, dev, "auto-negotiating...\n"); tp 938 drivers/net/ethernet/sis/sis190.c tp->link_status = LNK_AUTONEG; tp 939 drivers/net/ethernet/sis/sis190.c } else if ((val & BMSR_LSTATUS) && tp->link_status != LNK_ON) { tp 963 drivers/net/ethernet/sis/sis190.c netif_info(tp, link, dev, "mii ext = %04x\n", val); tp 968 drivers/net/ethernet/sis/sis190.c netif_info(tp, link, dev, "mii lpa=%04x adv=%04x exp=%04x\n", tp 992 drivers/net/ethernet/sis/sis190.c if ((tp->features & F_HAS_RGMII) && tp 993 drivers/net/ethernet/sis/sis190.c (tp->features & F_PHY_BCM5461)) { tp 1003 drivers/net/ethernet/sis/sis190.c if (tp->features & F_HAS_RGMII) { tp 1008 drivers/net/ethernet/sis/sis190.c tp->negotiated_lpa = p->val; tp 1010 drivers/net/ethernet/sis/sis190.c netif_info(tp, link, dev, "link on %s mode\n", p->msg); tp 1012 drivers/net/ethernet/sis/sis190.c tp->link_status = LNK_ON; tp 1013 drivers/net/ethernet/sis/sis190.c } else if (!(val & BMSR_LSTATUS) && tp->link_status != LNK_AUTONEG) tp 1014 drivers/net/ethernet/sis/sis190.c tp->link_status = LNK_OFF; tp 1015 drivers/net/ethernet/sis/sis190.c mod_timer(&tp->timer, jiffies + SIS190_PHY_TIMEOUT); tp 1023 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = from_timer(tp, t, timer); tp 1024 drivers/net/ethernet/sis/sis190.c struct net_device *dev = tp->dev; tp 1027 drivers/net/ethernet/sis/sis190.c schedule_work(&tp->phy_task); tp 1032 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1034 drivers/net/ethernet/sis/sis190.c del_timer_sync(&tp->timer); tp 1039 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1040 drivers/net/ethernet/sis/sis190.c struct timer_list *timer = &tp->timer; tp 1047 drivers/net/ethernet/sis/sis190.c static void sis190_set_rxbufsize(struct sis190_private *tp, tp 1052 drivers/net/ethernet/sis/sis190.c tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE; tp 1054 drivers/net/ethernet/sis/sis190.c if (tp->rx_buf_sz & 0x07) { tp 1055 drivers/net/ethernet/sis/sis190.c tp->rx_buf_sz += 8; tp 1056 drivers/net/ethernet/sis/sis190.c tp->rx_buf_sz &= RX_BUF_MASK; tp 1062 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1063 drivers/net/ethernet/sis/sis190.c struct pci_dev *pdev = tp->pci_dev; tp 1066 drivers/net/ethernet/sis/sis190.c sis190_set_rxbufsize(tp, dev); tp 1072 drivers/net/ethernet/sis/sis190.c tp->TxDescRing = pci_alloc_consistent(pdev, TX_RING_BYTES, &tp->tx_dma); tp 1073 drivers/net/ethernet/sis/sis190.c if (!tp->TxDescRing) tp 1076 drivers/net/ethernet/sis/sis190.c tp->RxDescRing = pci_alloc_consistent(pdev, RX_RING_BYTES, &tp->rx_dma); tp 1077 drivers/net/ethernet/sis/sis190.c if (!tp->RxDescRing) tp 1096 drivers/net/ethernet/sis/sis190.c sis190_rx_clear(tp); tp 1098 drivers/net/ethernet/sis/sis190.c pci_free_consistent(pdev, RX_RING_BYTES, tp->RxDescRing, tp->rx_dma); tp 1100 drivers/net/ethernet/sis/sis190.c pci_free_consistent(pdev, TX_RING_BYTES, tp->TxDescRing, tp->tx_dma); tp 1104 drivers/net/ethernet/sis/sis190.c static void sis190_tx_clear(struct sis190_private *tp) tp 1109 drivers/net/ethernet/sis/sis190.c struct sk_buff *skb = tp->Tx_skbuff[i]; tp 1114 drivers/net/ethernet/sis/sis190.c sis190_unmap_tx_skb(tp->pci_dev, skb, tp->TxDescRing + i); tp 1115 drivers/net/ethernet/sis/sis190.c tp->Tx_skbuff[i] = NULL; tp 1118 drivers/net/ethernet/sis/sis190.c tp->dev->stats.tx_dropped++; tp 1120 drivers/net/ethernet/sis/sis190.c tp->cur_tx = tp->dirty_tx = 0; tp 1125 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1126 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1134 drivers/net/ethernet/sis/sis190.c spin_lock_irq(&tp->lock); tp 1138 drivers/net/ethernet/sis/sis190.c spin_unlock_irq(&tp->lock); tp 1140 drivers/net/ethernet/sis/sis190.c synchronize_irq(tp->pci_dev->irq); tp 1149 drivers/net/ethernet/sis/sis190.c sis190_tx_clear(tp); tp 1150 drivers/net/ethernet/sis/sis190.c sis190_rx_clear(tp); tp 1155 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1156 drivers/net/ethernet/sis/sis190.c struct pci_dev *pdev = tp->pci_dev; tp 1162 drivers/net/ethernet/sis/sis190.c pci_free_consistent(pdev, TX_RING_BYTES, tp->TxDescRing, tp->tx_dma); tp 1163 drivers/net/ethernet/sis/sis190.c pci_free_consistent(pdev, RX_RING_BYTES, tp->RxDescRing, tp->rx_dma); tp 1165 drivers/net/ethernet/sis/sis190.c tp->TxDescRing = NULL; tp 1166 drivers/net/ethernet/sis/sis190.c tp->RxDescRing = NULL; tp 1174 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1175 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1190 drivers/net/ethernet/sis/sis190.c entry = tp->cur_tx % NUM_TX_DESC; tp 1191 drivers/net/ethernet/sis/sis190.c desc = tp->TxDescRing + entry; tp 1195 drivers/net/ethernet/sis/sis190.c netif_err(tp, tx_err, dev, tp 1200 drivers/net/ethernet/sis/sis190.c mapping = pci_map_single(tp->pci_dev, skb->data, len, PCI_DMA_TODEVICE); tp 1201 drivers/net/ethernet/sis/sis190.c if (pci_dma_mapping_error(tp->pci_dev, mapping)) { tp 1202 drivers/net/ethernet/sis/sis190.c netif_err(tp, tx_err, dev, tp 1207 drivers/net/ethernet/sis/sis190.c tp->Tx_skbuff[entry] = skb; tp 1219 drivers/net/ethernet/sis/sis190.c if (tp->negotiated_lpa & (LPA_1000HALF | LPA_100HALF | LPA_10HALF)) { tp 1222 drivers/net/ethernet/sis/sis190.c if (tp->negotiated_lpa & (LPA_1000HALF | LPA_1000FULL)) tp 1226 drivers/net/ethernet/sis/sis190.c tp->cur_tx++; tp 1232 drivers/net/ethernet/sis/sis190.c dirty_tx = tp->dirty_tx; tp 1233 drivers/net/ethernet/sis/sis190.c if ((tp->cur_tx - NUM_TX_DESC) == dirty_tx) { tp 1236 drivers/net/ethernet/sis/sis190.c if (dirty_tx != tp->dirty_tx) tp 1263 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1264 drivers/net/ethernet/sis/sis190.c struct mii_if_info *mii_if = &tp->mii_if; tp 1265 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1270 drivers/net/ethernet/sis/sis190.c list_for_each_entry(phy, &tp->first_phy, list) { tp 1295 drivers/net/ethernet/sis/sis190.c phy_default = list_first_entry(&tp->first_phy, tp 1301 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1303 drivers/net/ethernet/sis/sis190.c pci_name(tp->pci_dev), mii_if->phy_id); tp 1315 drivers/net/ethernet/sis/sis190.c static void sis190_init_phy(struct net_device *dev, struct sis190_private *tp, tp 1319 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1340 drivers/net/ethernet/sis/sis190.c tp->features |= p->feature; tp 1341 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1343 drivers/net/ethernet/sis/sis190.c pci_name(tp->pci_dev), p->name, phy_id); tp 1346 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1348 drivers/net/ethernet/sis/sis190.c pci_name(tp->pci_dev), tp 1353 drivers/net/ethernet/sis/sis190.c static void sis190_mii_probe_88e1111_fixup(struct sis190_private *tp) tp 1355 drivers/net/ethernet/sis/sis190.c if (tp->features & F_PHY_88E1111) { tp 1356 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1357 drivers/net/ethernet/sis/sis190.c int phy_id = tp->mii_if.phy_id; tp 1363 drivers/net/ethernet/sis/sis190.c p = (tp->features & F_HAS_RGMII) ? reg[0] : reg[1]; tp 1382 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1383 drivers/net/ethernet/sis/sis190.c struct mii_if_info *mii_if = &tp->mii_if; tp 1384 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1388 drivers/net/ethernet/sis/sis190.c INIT_LIST_HEAD(&tp->first_phy); tp 1402 drivers/net/ethernet/sis/sis190.c sis190_free_phy(&tp->first_phy); tp 1407 drivers/net/ethernet/sis/sis190.c sis190_init_phy(dev, tp, phy, phy_id, status); tp 1409 drivers/net/ethernet/sis/sis190.c list_add(&tp->first_phy, &phy->list); tp 1412 drivers/net/ethernet/sis/sis190.c if (list_empty(&tp->first_phy)) { tp 1413 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1415 drivers/net/ethernet/sis/sis190.c pci_name(tp->pci_dev)); tp 1423 drivers/net/ethernet/sis/sis190.c sis190_mii_probe_88e1111_fixup(tp); tp 1436 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1438 drivers/net/ethernet/sis/sis190.c sis190_free_phy(&tp->first_phy); tp 1444 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1446 drivers/net/ethernet/sis/sis190.c iounmap(tp->mmio_addr); tp 1454 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp; tp 1459 drivers/net/ethernet/sis/sis190.c dev = alloc_etherdev(sizeof(*tp)); tp 1467 drivers/net/ethernet/sis/sis190.c tp = netdev_priv(dev); tp 1468 drivers/net/ethernet/sis/sis190.c tp->dev = dev; tp 1469 drivers/net/ethernet/sis/sis190.c tp->msg_enable = netif_msg_init(debug.msg_enable, SIS190_MSG_DEFAULT); tp 1473 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1481 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1487 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1495 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1503 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1513 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1520 drivers/net/ethernet/sis/sis190.c tp->pci_dev = pdev; tp 1521 drivers/net/ethernet/sis/sis190.c tp->mmio_addr = ioaddr; tp 1522 drivers/net/ethernet/sis/sis190.c tp->link_status = LNK_OFF; tp 1543 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1544 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1552 drivers/net/ethernet/sis/sis190.c netif_info(tp, tx_err, dev, "Transmit timeout, status %08x %08x\n", tp 1559 drivers/net/ethernet/sis/sis190.c spin_lock_irq(&tp->lock); tp 1560 drivers/net/ethernet/sis/sis190.c sis190_tx_clear(tp); tp 1561 drivers/net/ethernet/sis/sis190.c spin_unlock_irq(&tp->lock); tp 1569 drivers/net/ethernet/sis/sis190.c static void sis190_set_rgmii(struct sis190_private *tp, u8 reg) tp 1571 drivers/net/ethernet/sis/sis190.c tp->features |= (reg & 0x80) ? F_HAS_RGMII : 0; tp 1577 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1578 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1582 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1589 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1602 drivers/net/ethernet/sis/sis190.c sis190_set_rgmii(tp, sis190_read_eeprom(ioaddr, EEPROMInfo)); tp 1620 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1625 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1635 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) tp 1656 drivers/net/ethernet/sis/sis190.c sis190_set_rgmii(tp, reg); tp 1674 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1675 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1712 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1713 drivers/net/ethernet/sis/sis190.c void __iomem *ioaddr = tp->mmio_addr; tp 1714 drivers/net/ethernet/sis/sis190.c int phy_id = tp->mii_if.phy_id; tp 1717 drivers/net/ethernet/sis/sis190.c netif_info(tp, link, dev, "Enabling Auto-negotiation\n"); tp 1738 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1740 drivers/net/ethernet/sis/sis190.c mii_ethtool_get_link_ksettings(&tp->mii_if, cmd); tp 1748 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1750 drivers/net/ethernet/sis/sis190.c return mii_ethtool_set_link_ksettings(&tp->mii_if, cmd); tp 1756 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1760 drivers/net/ethernet/sis/sis190.c strlcpy(info->bus_info, pci_name(tp->pci_dev), tp 1772 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1775 drivers/net/ethernet/sis/sis190.c spin_lock_irqsave(&tp->lock, flags); tp 1776 drivers/net/ethernet/sis/sis190.c memcpy_fromio(p, tp->mmio_addr, regs->len); tp 1777 drivers/net/ethernet/sis/sis190.c spin_unlock_irqrestore(&tp->lock, flags); tp 1782 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1784 drivers/net/ethernet/sis/sis190.c return mii_nway_restart(&tp->mii_if); tp 1789 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1791 drivers/net/ethernet/sis/sis190.c return tp->msg_enable; tp 1796 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1798 drivers/net/ethernet/sis/sis190.c tp->msg_enable = value; tp 1815 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1818 drivers/net/ethernet/sis/sis190.c generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL); tp 1849 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp; tp 1868 drivers/net/ethernet/sis/sis190.c tp = netdev_priv(dev); tp 1869 drivers/net/ethernet/sis/sis190.c ioaddr = tp->mmio_addr; tp 1877 drivers/net/ethernet/sis/sis190.c INIT_WORK(&tp->phy_task, sis190_phy_task); tp 1884 drivers/net/ethernet/sis/sis190.c spin_lock_init(&tp->lock); tp 1894 drivers/net/ethernet/sis/sis190.c if (netif_msg_probe(tp)) { tp 1900 drivers/net/ethernet/sis/sis190.c (tp->features & F_HAS_RGMII) ? "RGMII" : "GMII"); tp 1919 drivers/net/ethernet/sis/sis190.c struct sis190_private *tp = netdev_priv(dev); tp 1922 drivers/net/ethernet/sis/sis190.c cancel_work_sync(&tp->phy_task); tp 2483 drivers/net/ethernet/sun/niu.c const struct niu_phy_template *tp; tp 2493 drivers/net/ethernet/sun/niu.c tp = &phy_template_niu_10g_serdes; tp 2497 drivers/net/ethernet/sun/niu.c tp = &phy_template_niu_1g_serdes; tp 2503 drivers/net/ethernet/sun/niu.c tp = &phy_template_niu_10g_hotplug; tp 2509 drivers/net/ethernet/sun/niu.c tp = &phy_template_niu_10g_fiber; tp 2521 drivers/net/ethernet/sun/niu.c tp = &phy_template_1g_copper; tp 2532 drivers/net/ethernet/sun/niu.c tp = &phy_template_10g_copper; tp 2537 drivers/net/ethernet/sun/niu.c tp = &phy_template_1g_fiber; tp 2542 drivers/net/ethernet/sun/niu.c tp = &phy_template_10g_fiber; tp 2548 drivers/net/ethernet/sun/niu.c tp = &phy_template_10g_fiber_hotplug; tp 2562 drivers/net/ethernet/sun/niu.c tp = &phy_template_10g_serdes; tp 2566 drivers/net/ethernet/sun/niu.c tp = &phy_template_1g_rgmii; tp 2579 drivers/net/ethernet/sun/niu.c np->phy_ops = tp->ops; tp 2580 drivers/net/ethernet/sun/niu.c np->phy_addr = tp->phy_addr_base + phy_addr_off; tp 3544 drivers/net/ethernet/sun/niu.c struct tx_pkt_hdr *tp; tp 3548 drivers/net/ethernet/sun/niu.c tp = (struct tx_pkt_hdr *) skb->data; tp 3549 drivers/net/ethernet/sun/niu.c tx_flags = le64_to_cpup(&tp->flags); tp 4711 drivers/net/ethernet/sun/niu.c struct niu_rdc_tables *tp = &np->parent->rdc_group_cfg[np->port]; tp 4712 drivers/net/ethernet/sun/niu.c int i, first_table_num = tp->first_table_num; tp 4714 drivers/net/ethernet/sun/niu.c for (i = 0; i < tp->num_tables; i++) { tp 4715 drivers/net/ethernet/sun/niu.c struct rdc_table *tbl = &tp->tables[i]; tp 4748 drivers/net/ethernet/sun/niu.c struct niu_rdc_tables *tp = &parent->rdc_group_cfg[np->port]; tp 4750 drivers/net/ethernet/sun/niu.c int first_rdc_table = tp->first_table_num; tp 4996 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp; tp 5000 drivers/net/ethernet/sun/niu.c tp = &parent->tcam[index]; tp 5005 drivers/net/ethernet/sun/niu.c memset(tp, 0, sizeof(*tp)); tp 5006 drivers/net/ethernet/sun/niu.c tp->key[1] = TCAM_V4KEY1_NOPORT; tp 5007 drivers/net/ethernet/sun/niu.c tp->key_mask[1] = TCAM_V4KEY1_NOPORT; tp 5008 drivers/net/ethernet/sun/niu.c tp->assoc_data = (TCAM_ASSOCDATA_TRES_USE_OFFSET | tp 5010 drivers/net/ethernet/sun/niu.c err = tcam_write(np, index, tp->key, tp->key_mask); tp 5013 drivers/net/ethernet/sun/niu.c err = tcam_assoc_write(np, index, tp->assoc_data); tp 5016 drivers/net/ethernet/sun/niu.c tp->valid = 1; tp 5620 drivers/net/ethernet/sun/niu.c struct niu_rdc_tables *tp = &parent->rdc_group_cfg[np->port]; tp 5621 drivers/net/ethernet/sun/niu.c int first_rdc_table = tp->first_table_num; tp 5672 drivers/net/ethernet/sun/niu.c struct niu_rdc_tables *tp = &parent->rdc_group_cfg[np->port]; tp 5673 drivers/net/ethernet/sun/niu.c int first_rdc_table = tp->first_table_num; tp 6614 drivers/net/ethernet/sun/niu.c struct tx_pkt_hdr *tp; tp 6650 drivers/net/ethernet/sun/niu.c tp = skb_push(skb, headroom); tp 6653 drivers/net/ethernet/sun/niu.c tp->flags = cpu_to_le64(niu_compute_tx_flags(skb, ehdr, align, len)); tp 6654 drivers/net/ethernet/sun/niu.c tp->resv = 0; tp 7076 drivers/net/ethernet/sun/niu.c static void niu_get_ip4fs_from_tcam_key(struct niu_tcam_entry *tp, tp 7082 drivers/net/ethernet/sun/niu.c tmp = (tp->key[3] & TCAM_V4KEY3_SADDR) >> TCAM_V4KEY3_SADDR_SHIFT; tp 7085 drivers/net/ethernet/sun/niu.c tmp = (tp->key[3] & TCAM_V4KEY3_DADDR) >> TCAM_V4KEY3_DADDR_SHIFT; tp 7088 drivers/net/ethernet/sun/niu.c tmp = (tp->key_mask[3] & TCAM_V4KEY3_SADDR) >> TCAM_V4KEY3_SADDR_SHIFT; tp 7091 drivers/net/ethernet/sun/niu.c tmp = (tp->key_mask[3] & TCAM_V4KEY3_DADDR) >> TCAM_V4KEY3_DADDR_SHIFT; tp 7094 drivers/net/ethernet/sun/niu.c fsp->h_u.tcp_ip4_spec.tos = (tp->key[2] & TCAM_V4KEY2_TOS) >> tp 7096 drivers/net/ethernet/sun/niu.c fsp->m_u.tcp_ip4_spec.tos = (tp->key_mask[2] & TCAM_V4KEY2_TOS) >> tp 7103 drivers/net/ethernet/sun/niu.c prt = ((tp->key[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7107 drivers/net/ethernet/sun/niu.c prt = ((tp->key[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7111 drivers/net/ethernet/sun/niu.c prt = ((tp->key_mask[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7115 drivers/net/ethernet/sun/niu.c prt = ((tp->key_mask[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7121 drivers/net/ethernet/sun/niu.c tmp = (tp->key[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7125 drivers/net/ethernet/sun/niu.c tmp = (tp->key_mask[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7130 drivers/net/ethernet/sun/niu.c tmp = (tp->key[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7134 drivers/net/ethernet/sun/niu.c tmp = (tp->key_mask[2] & TCAM_V4KEY2_PORT_SPI) >> tp 7139 drivers/net/ethernet/sun/niu.c (tp->key[2] & TCAM_V4KEY2_PROTO) >> tp 7142 drivers/net/ethernet/sun/niu.c (tp->key_mask[2] & TCAM_V4KEY2_PROTO) >> tp 7156 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp; tp 7164 drivers/net/ethernet/sun/niu.c tp = &parent->tcam[idx]; tp 7165 drivers/net/ethernet/sun/niu.c if (!tp->valid) { tp 7172 drivers/net/ethernet/sun/niu.c class = (tp->key[0] & TCAM_V4KEY0_CLASS_CODE) >> tp 7182 drivers/net/ethernet/sun/niu.c u32 proto = (tp->key[2] & TCAM_V4KEY2_PROTO) >> tp 7198 drivers/net/ethernet/sun/niu.c niu_get_ip4fs_from_tcam_key(tp, fsp); tp 7209 drivers/net/ethernet/sun/niu.c niu_get_ip4fs_from_tcam_key(tp, fsp); tp 7219 drivers/net/ethernet/sun/niu.c if (tp->assoc_data & TCAM_ASSOCDATA_DISC) tp 7222 drivers/net/ethernet/sun/niu.c fsp->ring_cookie = (tp->assoc_data & TCAM_ASSOCDATA_OFFSET) >> tp 7236 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp; tp 7247 drivers/net/ethernet/sun/niu.c tp = &parent->tcam[idx]; tp 7248 drivers/net/ethernet/sun/niu.c if (!tp->valid) tp 7344 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp, tp 7356 drivers/net/ethernet/sun/niu.c tp->key[0] = class << TCAM_V4KEY0_CLASS_CODE_SHIFT; tp 7357 drivers/net/ethernet/sun/niu.c tp->key_mask[0] = TCAM_V4KEY0_CLASS_CODE; tp 7358 drivers/net/ethernet/sun/niu.c tp->key[1] = (u64)l2_rdc_tab << TCAM_V4KEY1_L2RDCNUM_SHIFT; tp 7359 drivers/net/ethernet/sun/niu.c tp->key_mask[1] = TCAM_V4KEY1_L2RDCNUM; tp 7361 drivers/net/ethernet/sun/niu.c tp->key[3] = (u64)sip << TCAM_V4KEY3_SADDR_SHIFT; tp 7362 drivers/net/ethernet/sun/niu.c tp->key[3] |= dip; tp 7364 drivers/net/ethernet/sun/niu.c tp->key_mask[3] = (u64)sipm << TCAM_V4KEY3_SADDR_SHIFT; tp 7365 drivers/net/ethernet/sun/niu.c tp->key_mask[3] |= dipm; tp 7367 drivers/net/ethernet/sun/niu.c tp->key[2] |= ((u64)fsp->h_u.tcp_ip4_spec.tos << tp 7369 drivers/net/ethernet/sun/niu.c tp->key_mask[2] |= ((u64)fsp->m_u.tcp_ip4_spec.tos << tp 7380 drivers/net/ethernet/sun/niu.c tp->key[2] |= (((u64)sport << 16) | dport); tp 7381 drivers/net/ethernet/sun/niu.c tp->key_mask[2] |= (((u64)spm << 16) | dpm); tp 7389 drivers/net/ethernet/sun/niu.c tp->key[2] |= spi; tp 7390 drivers/net/ethernet/sun/niu.c tp->key_mask[2] |= spim; tp 7397 drivers/net/ethernet/sun/niu.c tp->key[2] |= spi; tp 7398 drivers/net/ethernet/sun/niu.c tp->key_mask[2] |= spim; tp 7405 drivers/net/ethernet/sun/niu.c tp->key[2] |= ((u64)pid << TCAM_V4KEY2_PROTO_SHIFT); tp 7407 drivers/net/ethernet/sun/niu.c tp->key_mask[2] |= TCAM_V4KEY2_PROTO; tp 7415 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp; tp 7501 drivers/net/ethernet/sun/niu.c tp = &parent->tcam[idx]; tp 7503 drivers/net/ethernet/sun/niu.c memset(tp, 0, sizeof(*tp)); tp 7512 drivers/net/ethernet/sun/niu.c niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table, class); tp 7525 drivers/net/ethernet/sun/niu.c niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table, class); tp 7536 drivers/net/ethernet/sun/niu.c tp->assoc_data = TCAM_ASSOCDATA_DISC; tp 7545 drivers/net/ethernet/sun/niu.c tp->assoc_data = (TCAM_ASSOCDATA_TRES_USE_OFFSET | tp 7550 drivers/net/ethernet/sun/niu.c err = tcam_write(np, idx, tp->key, tp->key_mask); tp 7555 drivers/net/ethernet/sun/niu.c err = tcam_assoc_write(np, idx, tp->assoc_data); tp 7562 drivers/net/ethernet/sun/niu.c tp->valid = 1; tp 7573 drivers/net/ethernet/sun/niu.c struct niu_tcam_entry *tp; tp 7585 drivers/net/ethernet/sun/niu.c tp = &parent->tcam[idx]; tp 7588 drivers/net/ethernet/sun/niu.c class = (tp->key[0] & TCAM_V4KEY0_CLASS_CODE) >> tp 7623 drivers/net/ethernet/sun/niu.c tp->valid = 0; tp 8711 drivers/net/ethernet/sun/niu.c struct niu_rdc_tables *tp = &parent->rdc_group_cfg[i]; tp 8715 drivers/net/ethernet/sun/niu.c tp->first_table_num = rdc_group; tp 8716 drivers/net/ethernet/sun/niu.c tp->num_tables = rdc_groups_per_port; tp 8718 drivers/net/ethernet/sun/niu.c for (grp = 0; grp < tp->num_tables; grp++) { tp 8719 drivers/net/ethernet/sun/niu.c struct rdc_table *rt = &tp->tables[grp]; tp 8723 drivers/net/ethernet/sun/niu.c parent->index, i, tp->first_table_num + grp); tp 2879 drivers/net/ethernet/sun/niu.h #define NEXT_TX(tp, index) \ tp 2880 drivers/net/ethernet/sun/niu.h (((index) + 1) < (tp)->pending ? ((index) + 1) : 0) tp 2882 drivers/net/ethernet/sun/niu.h static inline u32 niu_tx_avail(struct tx_ring_info *tp) tp 2884 drivers/net/ethernet/sun/niu.h return (tp->pending - tp 2885 drivers/net/ethernet/sun/niu.h ((tp->prod - tp->cons) & (MAX_TX_RING_SIZE - 1))); tp 142 drivers/net/ethernet/sun/sunhme.c struct happy_meal_txd *tp = &hb->happy_meal_txd[0]; tp 148 drivers/net/ethernet/sun/sunhme.c le32_to_cpu(tp[i].tx_flags), le32_to_cpu(tp[i].tx_addr), tp 149 drivers/net/ethernet/sun/sunhme.c le32_to_cpu(tp[i + 1].tx_flags), le32_to_cpu(tp[i + 1].tx_addr), tp 150 drivers/net/ethernet/sun/sunhme.c le32_to_cpu(tp[i + 2].tx_flags), le32_to_cpu(tp[i + 2].tx_addr), tp 151 drivers/net/ethernet/sun/sunhme.c le32_to_cpu(tp[i + 3].tx_flags), le32_to_cpu(tp[i + 3].tx_addr)); tp 598 drivers/net/ethernet/xilinx/ll_temac_main.c struct temac_option *tp = &temac_options[0]; tp 603 drivers/net/ethernet/xilinx/ll_temac_main.c while (tp->opt) { tp 604 drivers/net/ethernet/xilinx/ll_temac_main.c reg = temac_indirect_in32_locked(lp, tp->reg) & ~tp->m_or; tp 605 drivers/net/ethernet/xilinx/ll_temac_main.c if (options & tp->opt) { tp 606 drivers/net/ethernet/xilinx/ll_temac_main.c reg |= tp->m_or; tp 607 drivers/net/ethernet/xilinx/ll_temac_main.c temac_indirect_out32_locked(lp, tp->reg, reg); tp 609 drivers/net/ethernet/xilinx/ll_temac_main.c tp++; tp 427 drivers/net/ethernet/xilinx/xilinx_axienet_main.c struct axienet_option *tp = &axienet_options[0]; tp 429 drivers/net/ethernet/xilinx/xilinx_axienet_main.c while (tp->opt) { tp 430 drivers/net/ethernet/xilinx/xilinx_axienet_main.c reg = ((axienet_ior(lp, tp->reg)) & ~(tp->m_or)); tp 431 drivers/net/ethernet/xilinx/xilinx_axienet_main.c if (options & tp->opt) tp 432 drivers/net/ethernet/xilinx/xilinx_axienet_main.c reg |= tp->m_or; tp 433 drivers/net/ethernet/xilinx/xilinx_axienet_main.c axienet_iow(lp, tp->reg, reg); tp 434 drivers/net/ethernet/xilinx/xilinx_axienet_main.c tp++; tp 763 drivers/net/usb/r8152.c void (*autosuspend_en)(struct r8152 *tp, bool enable); tp 842 drivers/net/usb/r8152.c int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) tp 851 drivers/net/usb/r8152.c ret = usb_control_msg(tp->udev, usb_rcvctrlpipe(tp->udev, 0), tp 865 drivers/net/usb/r8152.c int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) tp 874 drivers/net/usb/r8152.c ret = usb_control_msg(tp->udev, usb_sndctrlpipe(tp->udev, 0), tp 883 drivers/net/usb/r8152.c static void rtl_set_unplug(struct r8152 *tp) tp 885 drivers/net/usb/r8152.c if (tp->udev->state == USB_STATE_NOTATTACHED) { tp 886 drivers/net/usb/r8152.c set_bit(RTL8152_UNPLUG, &tp->flags); tp 891 drivers/net/usb/r8152.c static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size, tp 897 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 909 drivers/net/usb/r8152.c ret = get_registers(tp, index, type, limit, data); tp 917 drivers/net/usb/r8152.c ret = get_registers(tp, index, type, size, data); tp 929 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 934 drivers/net/usb/r8152.c static int generic_ocp_write(struct r8152 *tp, u16 index, u16 byteen, tp 941 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 955 drivers/net/usb/r8152.c ret = set_registers(tp, index, type | byen, 4, data); tp 968 drivers/net/usb/r8152.c ret = set_registers(tp, index, tp 978 drivers/net/usb/r8152.c ret = set_registers(tp, index, tp 992 drivers/net/usb/r8152.c ret = set_registers(tp, index, type | byen, 4, data); tp 999 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 1005 drivers/net/usb/r8152.c int pla_ocp_read(struct r8152 *tp, u16 index, u16 size, void *data) tp 1007 drivers/net/usb/r8152.c return generic_ocp_read(tp, index, size, data, MCU_TYPE_PLA); tp 1011 drivers/net/usb/r8152.c int pla_ocp_write(struct r8152 *tp, u16 index, u16 byteen, u16 size, void *data) tp 1013 drivers/net/usb/r8152.c return generic_ocp_write(tp, index, byteen, size, data, MCU_TYPE_PLA); tp 1017 drivers/net/usb/r8152.c int usb_ocp_write(struct r8152 *tp, u16 index, u16 byteen, u16 size, void *data) tp 1019 drivers/net/usb/r8152.c return generic_ocp_write(tp, index, byteen, size, data, MCU_TYPE_USB); tp 1022 drivers/net/usb/r8152.c static u32 ocp_read_dword(struct r8152 *tp, u16 type, u16 index) tp 1026 drivers/net/usb/r8152.c generic_ocp_read(tp, index, sizeof(data), &data, type); tp 1031 drivers/net/usb/r8152.c static void ocp_write_dword(struct r8152 *tp, u16 type, u16 index, u32 data) tp 1035 drivers/net/usb/r8152.c generic_ocp_write(tp, index, BYTE_EN_DWORD, sizeof(tmp), &tmp, type); tp 1038 drivers/net/usb/r8152.c static u16 ocp_read_word(struct r8152 *tp, u16 type, u16 index) tp 1048 drivers/net/usb/r8152.c generic_ocp_read(tp, index, sizeof(tmp), &tmp, type | byen); tp 1057 drivers/net/usb/r8152.c static void ocp_write_word(struct r8152 *tp, u16 type, u16 index, u32 data) tp 1075 drivers/net/usb/r8152.c generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); tp 1078 drivers/net/usb/r8152.c static u8 ocp_read_byte(struct r8152 *tp, u16 type, u16 index) tp 1086 drivers/net/usb/r8152.c generic_ocp_read(tp, index, sizeof(tmp), &tmp, type); tp 1095 drivers/net/usb/r8152.c static void ocp_write_byte(struct r8152 *tp, u16 type, u16 index, u32 data) tp 1113 drivers/net/usb/r8152.c generic_ocp_write(tp, index, byen, sizeof(tmp), &tmp, type); tp 1116 drivers/net/usb/r8152.c static u16 ocp_reg_read(struct r8152 *tp, u16 addr) tp 1121 drivers/net/usb/r8152.c if (ocp_base != tp->ocp_base) { tp 1122 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_OCP_GPHY_BASE, ocp_base); tp 1123 drivers/net/usb/r8152.c tp->ocp_base = ocp_base; tp 1127 drivers/net/usb/r8152.c return ocp_read_word(tp, MCU_TYPE_PLA, ocp_index); tp 1130 drivers/net/usb/r8152.c static void ocp_reg_write(struct r8152 *tp, u16 addr, u16 data) tp 1135 drivers/net/usb/r8152.c if (ocp_base != tp->ocp_base) { tp 1136 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_OCP_GPHY_BASE, ocp_base); tp 1137 drivers/net/usb/r8152.c tp->ocp_base = ocp_base; tp 1141 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, ocp_index, data); tp 1144 drivers/net/usb/r8152.c static inline void r8152_mdio_write(struct r8152 *tp, u32 reg_addr, u32 value) tp 1146 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_BASE_MII + reg_addr * 2, value); tp 1149 drivers/net/usb/r8152.c static inline int r8152_mdio_read(struct r8152 *tp, u32 reg_addr) tp 1151 drivers/net/usb/r8152.c return ocp_reg_read(tp, OCP_BASE_MII + reg_addr * 2); tp 1154 drivers/net/usb/r8152.c static void sram_write(struct r8152 *tp, u16 addr, u16 data) tp 1156 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_SRAM_ADDR, addr); tp 1157 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_SRAM_DATA, data); tp 1160 drivers/net/usb/r8152.c static u16 sram_read(struct r8152 *tp, u16 addr) tp 1162 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_SRAM_ADDR, addr); tp 1163 drivers/net/usb/r8152.c return ocp_reg_read(tp, OCP_SRAM_DATA); tp 1168 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 1171 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 1177 drivers/net/usb/r8152.c ret = r8152_mdio_read(tp, reg); tp 1185 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 1187 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 1193 drivers/net/usb/r8152.c r8152_mdio_write(tp, reg, val); tp 1197 drivers/net/usb/r8152.c r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags); tp 1201 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 1208 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 1212 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 1216 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_CONFIG); tp 1217 drivers/net/usb/r8152.c pla_ocp_write(tp, PLA_IDR, BYTE_EN_SIX_BYTES, 8, addr->sa_data); tp 1218 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML); tp 1220 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 1222 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 1231 drivers/net/usb/r8152.c static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa) tp 1241 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); tp 1244 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, EFUSE); tp 1246 drivers/net/usb/r8152.c netif_dbg(tp, probe, tp->netdev, tp 1252 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_MISC_1); tp 1254 drivers/net/usb/r8152.c netif_dbg(tp, probe, tp->netdev, tp 1266 drivers/net/usb/r8152.c netif_warn(tp, probe, tp->netdev, tp 1273 drivers/net/usb/r8152.c netif_warn(tp, probe, tp->netdev, tp 1279 drivers/net/usb/r8152.c netif_warn(tp, probe, tp->netdev, tp 1286 drivers/net/usb/r8152.c netif_info(tp, probe, tp->netdev, tp 1294 drivers/net/usb/r8152.c static int determine_ethernet_addr(struct r8152 *tp, struct sockaddr *sa) tp 1296 drivers/net/usb/r8152.c struct net_device *dev = tp->netdev; tp 1301 drivers/net/usb/r8152.c if (tp->version == RTL_VER_01) { tp 1302 drivers/net/usb/r8152.c ret = pla_ocp_read(tp, PLA_IDR, 8, sa->sa_data); tp 1307 drivers/net/usb/r8152.c ret = vendor_mac_passthru_addr_read(tp, sa); tp 1309 drivers/net/usb/r8152.c ret = pla_ocp_read(tp, PLA_BACKUP, 8, sa->sa_data); tp 1313 drivers/net/usb/r8152.c netif_err(tp, probe, dev, "Get ether addr fail\n"); tp 1315 drivers/net/usb/r8152.c netif_err(tp, probe, dev, "Invalid ether addr %pM\n", tp 1319 drivers/net/usb/r8152.c netif_info(tp, probe, dev, "Random ether addr %pM\n", tp 1327 drivers/net/usb/r8152.c static int set_ethernet_addr(struct r8152 *tp) tp 1329 drivers/net/usb/r8152.c struct net_device *dev = tp->netdev; tp 1333 drivers/net/usb/r8152.c ret = determine_ethernet_addr(tp, &sa); tp 1337 drivers/net/usb/r8152.c if (tp->version == RTL_VER_01) tp 1350 drivers/net/usb/r8152.c struct r8152 *tp; tp 1357 drivers/net/usb/r8152.c tp = agg->context; tp 1358 drivers/net/usb/r8152.c if (!tp) tp 1361 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 1364 drivers/net/usb/r8152.c if (!test_bit(WORK_ENABLE, &tp->flags)) tp 1367 drivers/net/usb/r8152.c netdev = tp->netdev; tp 1374 drivers/net/usb/r8152.c usb_mark_last_busy(tp->udev); tp 1381 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 1382 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->rx_done); tp 1383 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 1384 drivers/net/usb/r8152.c napi_schedule(&tp->napi); tp 1387 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 1388 drivers/net/usb/r8152.c netif_device_detach(tp->netdev); tp 1402 drivers/net/usb/r8152.c r8152_submit_rx(tp, agg, GFP_ATOMIC); tp 1410 drivers/net/usb/r8152.c struct r8152 *tp; tp 1418 drivers/net/usb/r8152.c tp = agg->context; tp 1419 drivers/net/usb/r8152.c if (!tp) tp 1422 drivers/net/usb/r8152.c netdev = tp->netdev; tp 1433 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->tx_lock, flags); tp 1434 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->tx_free); tp 1435 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->tx_lock, flags); tp 1437 drivers/net/usb/r8152.c usb_autopm_put_interface_async(tp->intf); tp 1442 drivers/net/usb/r8152.c if (!test_bit(WORK_ENABLE, &tp->flags)) tp 1445 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 1448 drivers/net/usb/r8152.c if (!skb_queue_empty(&tp->tx_queue)) tp 1449 drivers/net/usb/r8152.c tasklet_schedule(&tp->tx_tl); tp 1454 drivers/net/usb/r8152.c struct r8152 *tp; tp 1459 drivers/net/usb/r8152.c tp = urb->context; tp 1460 drivers/net/usb/r8152.c if (!tp) tp 1463 drivers/net/usb/r8152.c if (!test_bit(WORK_ENABLE, &tp->flags)) tp 1466 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 1474 drivers/net/usb/r8152.c netif_device_detach(tp->netdev); tp 1478 drivers/net/usb/r8152.c netif_info(tp, intr, tp->netdev, tp 1482 drivers/net/usb/r8152.c netif_info(tp, intr, tp->netdev, "intr status -EOVERFLOW\n"); tp 1486 drivers/net/usb/r8152.c netif_info(tp, intr, tp->netdev, "intr status %d\n", status); tp 1492 drivers/net/usb/r8152.c if (!netif_carrier_ok(tp->netdev)) { tp 1493 drivers/net/usb/r8152.c set_bit(RTL8152_LINK_CHG, &tp->flags); tp 1494 drivers/net/usb/r8152.c schedule_delayed_work(&tp->schedule, 0); tp 1497 drivers/net/usb/r8152.c if (netif_carrier_ok(tp->netdev)) { tp 1498 drivers/net/usb/r8152.c netif_stop_queue(tp->netdev); tp 1499 drivers/net/usb/r8152.c set_bit(RTL8152_LINK_CHG, &tp->flags); tp 1500 drivers/net/usb/r8152.c schedule_delayed_work(&tp->schedule, 0); tp 1507 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 1508 drivers/net/usb/r8152.c netif_device_detach(tp->netdev); tp 1510 drivers/net/usb/r8152.c netif_err(tp, intr, tp->netdev, tp 1525 drivers/net/usb/r8152.c static void free_rx_agg(struct r8152 *tp, struct rx_agg *agg) tp 1533 drivers/net/usb/r8152.c atomic_dec(&tp->rx_count); tp 1536 drivers/net/usb/r8152.c static struct rx_agg *alloc_rx_agg(struct r8152 *tp, gfp_t mflags) tp 1538 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 1540 drivers/net/usb/r8152.c unsigned int order = get_order(tp->rx_buf_sz); tp 1558 drivers/net/usb/r8152.c rx_agg->context = tp; tp 1562 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 1563 drivers/net/usb/r8152.c list_add_tail(&rx_agg->info_list, &tp->rx_info); tp 1564 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 1566 drivers/net/usb/r8152.c atomic_inc(&tp->rx_count); tp 1577 drivers/net/usb/r8152.c static void free_all_mem(struct r8152 *tp) tp 1583 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 1585 drivers/net/usb/r8152.c list_for_each_entry_safe(agg, agg_next, &tp->rx_info, info_list) tp 1586 drivers/net/usb/r8152.c free_rx_agg(tp, agg); tp 1588 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 1590 drivers/net/usb/r8152.c WARN_ON(atomic_read(&tp->rx_count)); tp 1593 drivers/net/usb/r8152.c usb_free_urb(tp->tx_info[i].urb); tp 1594 drivers/net/usb/r8152.c tp->tx_info[i].urb = NULL; tp 1596 drivers/net/usb/r8152.c kfree(tp->tx_info[i].buffer); tp 1597 drivers/net/usb/r8152.c tp->tx_info[i].buffer = NULL; tp 1598 drivers/net/usb/r8152.c tp->tx_info[i].head = NULL; tp 1601 drivers/net/usb/r8152.c usb_free_urb(tp->intr_urb); tp 1602 drivers/net/usb/r8152.c tp->intr_urb = NULL; tp 1604 drivers/net/usb/r8152.c kfree(tp->intr_buff); tp 1605 drivers/net/usb/r8152.c tp->intr_buff = NULL; tp 1608 drivers/net/usb/r8152.c static int alloc_all_mem(struct r8152 *tp) tp 1610 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 1611 drivers/net/usb/r8152.c struct usb_interface *intf = tp->intf; tp 1618 drivers/net/usb/r8152.c spin_lock_init(&tp->rx_lock); tp 1619 drivers/net/usb/r8152.c spin_lock_init(&tp->tx_lock); tp 1620 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->rx_info); tp 1621 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->tx_free); tp 1622 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->rx_done); tp 1623 drivers/net/usb/r8152.c skb_queue_head_init(&tp->tx_queue); tp 1624 drivers/net/usb/r8152.c skb_queue_head_init(&tp->rx_queue); tp 1625 drivers/net/usb/r8152.c atomic_set(&tp->rx_count, 0); tp 1628 drivers/net/usb/r8152.c if (!alloc_rx_agg(tp, GFP_KERNEL)) tp 1654 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->tx_info[i].list); tp 1655 drivers/net/usb/r8152.c tp->tx_info[i].context = tp; tp 1656 drivers/net/usb/r8152.c tp->tx_info[i].urb = urb; tp 1657 drivers/net/usb/r8152.c tp->tx_info[i].buffer = buf; tp 1658 drivers/net/usb/r8152.c tp->tx_info[i].head = tx_agg_align(buf); tp 1660 drivers/net/usb/r8152.c list_add_tail(&tp->tx_info[i].list, &tp->tx_free); tp 1663 drivers/net/usb/r8152.c tp->intr_urb = usb_alloc_urb(0, GFP_KERNEL); tp 1664 drivers/net/usb/r8152.c if (!tp->intr_urb) tp 1667 drivers/net/usb/r8152.c tp->intr_buff = kmalloc(INTBUFSIZE, GFP_KERNEL); tp 1668 drivers/net/usb/r8152.c if (!tp->intr_buff) tp 1671 drivers/net/usb/r8152.c tp->intr_interval = (int)ep_intr->desc.bInterval; tp 1672 drivers/net/usb/r8152.c usb_fill_int_urb(tp->intr_urb, tp->udev, usb_rcvintpipe(tp->udev, 3), tp 1673 drivers/net/usb/r8152.c tp->intr_buff, INTBUFSIZE, intr_callback, tp 1674 drivers/net/usb/r8152.c tp, tp->intr_interval); tp 1679 drivers/net/usb/r8152.c free_all_mem(tp); tp 1683 drivers/net/usb/r8152.c static struct tx_agg *r8152_get_tx_agg(struct r8152 *tp) tp 1688 drivers/net/usb/r8152.c if (list_empty(&tp->tx_free)) tp 1691 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->tx_lock, flags); tp 1692 drivers/net/usb/r8152.c if (!list_empty(&tp->tx_free)) { tp 1695 drivers/net/usb/r8152.c cursor = tp->tx_free.next; tp 1699 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->tx_lock, flags); tp 1708 drivers/net/usb/r8152.c static void r8152_csum_workaround(struct r8152 *tp, struct sk_buff *skb, tp 1712 drivers/net/usb/r8152.c netdev_features_t features = tp->netdev->features; tp 1741 drivers/net/usb/r8152.c stats = &tp->netdev->stats; tp 1789 drivers/net/usb/r8152.c static int r8152_tx_csum(struct r8152 *tp, struct tx_desc *desc, tp 1802 drivers/net/usb/r8152.c netif_warn(tp, tx_err, tp->netdev, tp 1833 drivers/net/usb/r8152.c netif_warn(tp, tx_err, tp->netdev, tp 1873 drivers/net/usb/r8152.c static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg) tp 1875 drivers/net/usb/r8152.c struct sk_buff_head skb_head, *tx_queue = &tp->tx_queue; tp 1911 drivers/net/usb/r8152.c if (r8152_tx_csum(tp, tx_desc, skb, skb->len, offset)) { tp 1912 drivers/net/usb/r8152.c r8152_csum_workaround(tp, skb, &skb_head); tp 1922 drivers/net/usb/r8152.c struct net_device_stats *stats = &tp->netdev->stats; tp 1938 drivers/net/usb/r8152.c if (test_bit(DELL_TB_RX_AGG_BUG, &tp->flags)) tp 1948 drivers/net/usb/r8152.c netif_tx_lock(tp->netdev); tp 1950 drivers/net/usb/r8152.c if (netif_queue_stopped(tp->netdev) && tp 1951 drivers/net/usb/r8152.c skb_queue_len(&tp->tx_queue) < tp->tx_qlen) tp 1952 drivers/net/usb/r8152.c netif_wake_queue(tp->netdev); tp 1954 drivers/net/usb/r8152.c netif_tx_unlock(tp->netdev); tp 1956 drivers/net/usb/r8152.c ret = usb_autopm_get_interface_async(tp->intf); tp 1960 drivers/net/usb/r8152.c usb_fill_bulk_urb(agg->urb, tp->udev, usb_sndbulkpipe(tp->udev, 2), tp 1966 drivers/net/usb/r8152.c usb_autopm_put_interface_async(tp->intf); tp 1972 drivers/net/usb/r8152.c static u8 r8152_rx_csum(struct r8152 *tp, struct rx_desc *rx_desc) tp 1977 drivers/net/usb/r8152.c if (!(tp->netdev->features & NETIF_F_RXCSUM)) tp 2001 drivers/net/usb/r8152.c static inline bool rx_count_exceed(struct r8152 *tp) tp 2003 drivers/net/usb/r8152.c return atomic_read(&tp->rx_count) > RTL8152_MAX_RX; tp 2011 drivers/net/usb/r8152.c static struct rx_agg *rtl_get_free_rx(struct r8152 *tp, gfp_t mflags) tp 2016 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2018 drivers/net/usb/r8152.c list_for_each_entry_safe(agg, agg_next, &tp->rx_used, list) { tp 2025 drivers/net/usb/r8152.c if (rx_count_exceed(tp)) { tp 2027 drivers/net/usb/r8152.c free_rx_agg(tp, agg); tp 2033 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2035 drivers/net/usb/r8152.c if (!agg_free && atomic_read(&tp->rx_count) < tp->rx_pending) tp 2036 drivers/net/usb/r8152.c agg_free = alloc_rx_agg(tp, mflags); tp 2041 drivers/net/usb/r8152.c static int rx_bottom(struct r8152 *tp, int budget) tp 2046 drivers/net/usb/r8152.c struct napi_struct *napi = &tp->napi; tp 2048 drivers/net/usb/r8152.c if (!skb_queue_empty(&tp->rx_queue)) { tp 2050 drivers/net/usb/r8152.c struct sk_buff *skb = __skb_dequeue(&tp->rx_queue); tp 2051 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 2066 drivers/net/usb/r8152.c if (list_empty(&tp->rx_done)) tp 2070 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2071 drivers/net/usb/r8152.c list_splice_init(&tp->rx_done, &rx_queue); tp 2072 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2088 drivers/net/usb/r8152.c agg_free = rtl_get_free_rx(tp, GFP_ATOMIC); tp 2095 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 2101 drivers/net/usb/r8152.c if (unlikely(skb_queue_len(&tp->rx_queue) >= 1000)) tp 2115 drivers/net/usb/r8152.c if (!agg_free || tp->rx_copybreak > pkt_len) tp 2118 drivers/net/usb/r8152.c rx_frag_head_sz = tp->rx_copybreak; tp 2126 drivers/net/usb/r8152.c skb->ip_summed = r8152_rx_csum(tp, rx_desc); tp 2147 drivers/net/usb/r8152.c __skb_queue_tail(&tp->rx_queue, skb); tp 2160 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2162 drivers/net/usb/r8152.c list_add(&agg_free->list, &tp->rx_used); tp 2164 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->rx_used); tp 2168 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2173 drivers/net/usb/r8152.c ret = r8152_submit_rx(tp, agg, GFP_ATOMIC); tp 2181 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2182 drivers/net/usb/r8152.c list_splice_tail(&rx_queue, &tp->rx_done); tp 2183 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2190 drivers/net/usb/r8152.c static void tx_bottom(struct r8152 *tp) tp 2197 drivers/net/usb/r8152.c if (skb_queue_empty(&tp->tx_queue)) tp 2200 drivers/net/usb/r8152.c agg = r8152_get_tx_agg(tp); tp 2204 drivers/net/usb/r8152.c res = r8152_tx_agg_fill(tp, agg); tp 2206 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 2209 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 2215 drivers/net/usb/r8152.c netif_warn(tp, tx_err, netdev, tp 2219 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->tx_lock, flags); tp 2220 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->tx_free); tp 2221 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->tx_lock, flags); tp 2229 drivers/net/usb/r8152.c struct r8152 *tp; tp 2231 drivers/net/usb/r8152.c tp = (struct r8152 *)data; tp 2233 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 2236 drivers/net/usb/r8152.c if (!test_bit(WORK_ENABLE, &tp->flags)) tp 2241 drivers/net/usb/r8152.c if (!netif_carrier_ok(tp->netdev)) tp 2244 drivers/net/usb/r8152.c clear_bit(SCHEDULE_TASKLET, &tp->flags); tp 2246 drivers/net/usb/r8152.c tx_bottom(tp); tp 2251 drivers/net/usb/r8152.c struct r8152 *tp = container_of(napi, struct r8152, napi); tp 2254 drivers/net/usb/r8152.c work_done = rx_bottom(tp, budget); tp 2259 drivers/net/usb/r8152.c if (!list_empty(&tp->rx_done)) tp 2268 drivers/net/usb/r8152.c int r8152_submit_rx(struct r8152 *tp, struct rx_agg *agg, gfp_t mem_flags) tp 2273 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags) || tp 2274 drivers/net/usb/r8152.c !test_bit(WORK_ENABLE, &tp->flags) || !netif_carrier_ok(tp->netdev)) tp 2277 drivers/net/usb/r8152.c usb_fill_bulk_urb(agg->urb, tp->udev, usb_rcvbulkpipe(tp->udev, 1), tp 2278 drivers/net/usb/r8152.c agg->buffer, tp->rx_buf_sz, tp 2283 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 2284 drivers/net/usb/r8152.c netif_device_detach(tp->netdev); tp 2290 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2291 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->rx_done); tp 2292 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2294 drivers/net/usb/r8152.c netif_err(tp, rx_err, tp->netdev, tp 2297 drivers/net/usb/r8152.c napi_schedule(&tp->napi); tp 2303 drivers/net/usb/r8152.c static void rtl_drop_queued_tx(struct r8152 *tp) tp 2305 drivers/net/usb/r8152.c struct net_device_stats *stats = &tp->netdev->stats; tp 2306 drivers/net/usb/r8152.c struct sk_buff_head skb_head, *tx_queue = &tp->tx_queue; tp 2325 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 2327 drivers/net/usb/r8152.c netif_warn(tp, tx_err, netdev, "Tx timeout\n"); tp 2329 drivers/net/usb/r8152.c usb_queue_reset_device(tp->intf); tp 2334 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 2337 drivers/net/usb/r8152.c set_bit(RTL8152_SET_RX_MODE, &tp->flags); tp 2338 drivers/net/usb/r8152.c schedule_delayed_work(&tp->schedule, 0); tp 2344 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 2350 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 2356 drivers/net/usb/r8152.c netif_notice(tp, link, netdev, "Promiscuous mode enabled\n"); tp 2382 drivers/net/usb/r8152.c pla_ocp_write(tp, PLA_MAR, BYTE_EN_DWORD, sizeof(tmp), tmp); tp 2383 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 2406 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 2410 drivers/net/usb/r8152.c skb_queue_tail(&tp->tx_queue, skb); tp 2412 drivers/net/usb/r8152.c if (!list_empty(&tp->tx_free)) { tp 2413 drivers/net/usb/r8152.c if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) { tp 2414 drivers/net/usb/r8152.c set_bit(SCHEDULE_TASKLET, &tp->flags); tp 2415 drivers/net/usb/r8152.c schedule_delayed_work(&tp->schedule, 0); tp 2417 drivers/net/usb/r8152.c usb_mark_last_busy(tp->udev); tp 2418 drivers/net/usb/r8152.c tasklet_schedule(&tp->tx_tl); tp 2420 drivers/net/usb/r8152.c } else if (skb_queue_len(&tp->tx_queue) > tp->tx_qlen) { tp 2427 drivers/net/usb/r8152.c static void r8152b_reset_packet_filter(struct r8152 *tp) tp 2431 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_FMC); tp 2433 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); tp 2435 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_FMC, ocp_data); tp 2438 drivers/net/usb/r8152.c static void rtl8152_nic_reset(struct r8152 *tp) tp 2442 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, CR_RST); tp 2445 drivers/net/usb/r8152.c if (!(ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR) & CR_RST)) tp 2451 drivers/net/usb/r8152.c static void set_tx_qlen(struct r8152 *tp) tp 2453 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 2455 drivers/net/usb/r8152.c tp->tx_qlen = agg_buf_sz / (netdev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN + tp 2459 drivers/net/usb/r8152.c static inline u8 rtl8152_get_speed(struct r8152 *tp) tp 2461 drivers/net/usb/r8152.c return ocp_read_byte(tp, MCU_TYPE_PLA, PLA_PHYSTATUS); tp 2464 drivers/net/usb/r8152.c static void rtl_set_eee_plus(struct r8152 *tp) tp 2469 drivers/net/usb/r8152.c speed = rtl8152_get_speed(tp); tp 2471 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR); tp 2473 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR, ocp_data); tp 2475 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR); tp 2477 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEEP_CR, ocp_data); tp 2481 drivers/net/usb/r8152.c static void rxdy_gated_en(struct r8152 *tp, bool enable) tp 2485 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MISC_1); tp 2490 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MISC_1, ocp_data); tp 2493 drivers/net/usb/r8152.c static int rtl_start_rx(struct r8152 *tp) tp 2502 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2504 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->rx_done); tp 2505 drivers/net/usb/r8152.c INIT_LIST_HEAD(&tp->rx_used); tp 2507 drivers/net/usb/r8152.c list_splice_init(&tp->rx_info, &tmp_list); tp 2509 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2516 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2517 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->rx_used); tp 2518 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2520 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2521 drivers/net/usb/r8152.c list_add_tail(&agg->list, &tp->rx_done); tp 2522 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2524 drivers/net/usb/r8152.c ret = r8152_submit_rx(tp, agg, GFP_KERNEL); tp 2528 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2529 drivers/net/usb/r8152.c WARN_ON(!list_empty(&tp->rx_info)); tp 2530 drivers/net/usb/r8152.c list_splice(&tmp_list, &tp->rx_info); tp 2531 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2536 drivers/net/usb/r8152.c static int rtl_stop_rx(struct r8152 *tp) tp 2550 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2551 drivers/net/usb/r8152.c list_splice_init(&tp->rx_info, &tmp_list); tp 2552 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2559 drivers/net/usb/r8152.c free_rx_agg(tp, agg); tp 2565 drivers/net/usb/r8152.c spin_lock_irqsave(&tp->rx_lock, flags); tp 2566 drivers/net/usb/r8152.c WARN_ON(!list_empty(&tp->rx_info)); tp 2567 drivers/net/usb/r8152.c list_splice(&tmp_list, &tp->rx_info); tp 2568 drivers/net/usb/r8152.c spin_unlock_irqrestore(&tp->rx_lock, flags); tp 2570 drivers/net/usb/r8152.c while (!skb_queue_empty(&tp->rx_queue)) tp 2571 drivers/net/usb/r8152.c dev_kfree_skb(__skb_dequeue(&tp->rx_queue)); tp 2576 drivers/net/usb/r8152.c static inline void r8153b_rx_agg_chg_indicate(struct r8152 *tp) tp 2578 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_UPT_RXDMA_OWN, tp 2582 drivers/net/usb/r8152.c static int rtl_enable(struct r8152 *tp) tp 2586 drivers/net/usb/r8152.c r8152b_reset_packet_filter(tp); tp 2588 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CR); tp 2590 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); tp 2592 drivers/net/usb/r8152.c switch (tp->version) { tp 2595 drivers/net/usb/r8152.c r8153b_rx_agg_chg_indicate(tp); tp 2601 drivers/net/usb/r8152.c rxdy_gated_en(tp, false); tp 2606 drivers/net/usb/r8152.c static int rtl8152_enable(struct r8152 *tp) tp 2608 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 2611 drivers/net/usb/r8152.c set_tx_qlen(tp); tp 2612 drivers/net/usb/r8152.c rtl_set_eee_plus(tp); tp 2614 drivers/net/usb/r8152.c return rtl_enable(tp); tp 2617 drivers/net/usb/r8152.c static void r8153_set_rx_early_timeout(struct r8152 *tp) tp 2619 drivers/net/usb/r8152.c u32 ocp_data = tp->coalesce / 8; tp 2621 drivers/net/usb/r8152.c switch (tp->version) { tp 2626 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, tp 2635 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, tp 2637 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EXTRA_AGGR_TMR, tp 2646 drivers/net/usb/r8152.c static void r8153_set_rx_early_size(struct r8152 *tp) tp 2648 drivers/net/usb/r8152.c u32 ocp_data = tp->rx_buf_sz - rx_reserved_size(tp->netdev->mtu); tp 2650 drivers/net/usb/r8152.c switch (tp->version) { tp 2655 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, tp 2660 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, tp 2669 drivers/net/usb/r8152.c static int rtl8153_enable(struct r8152 *tp) tp 2671 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 2674 drivers/net/usb/r8152.c set_tx_qlen(tp); tp 2675 drivers/net/usb/r8152.c rtl_set_eee_plus(tp); tp 2676 drivers/net/usb/r8152.c r8153_set_rx_early_timeout(tp); tp 2677 drivers/net/usb/r8152.c r8153_set_rx_early_size(tp); tp 2679 drivers/net/usb/r8152.c return rtl_enable(tp); tp 2682 drivers/net/usb/r8152.c static void rtl_disable(struct r8152 *tp) tp 2687 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) { tp 2688 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 2692 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 2694 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 2696 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 2699 drivers/net/usb/r8152.c usb_kill_urb(tp->tx_info[i].urb); tp 2701 drivers/net/usb/r8152.c rxdy_gated_en(tp, true); tp 2704 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 2711 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0) & TCR0_TX_EMPTY) tp 2716 drivers/net/usb/r8152.c rtl_stop_rx(tp); tp 2718 drivers/net/usb/r8152.c rtl8152_nic_reset(tp); tp 2721 drivers/net/usb/r8152.c static void r8152_power_cut_en(struct r8152 *tp, bool enable) tp 2725 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPS_CTRL); tp 2730 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_UPS_CTRL, ocp_data); tp 2732 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS); tp 2734 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_PM_CTRL_STATUS, ocp_data); tp 2737 drivers/net/usb/r8152.c static void rtl_rx_vlan_en(struct r8152 *tp, bool enable) tp 2741 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CPCR); tp 2746 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CPCR, ocp_data); tp 2753 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 2756 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 2760 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 2764 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, true); tp 2766 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, false); tp 2769 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 2771 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 2779 drivers/net/usb/r8152.c static u32 __rtl_get_wol(struct r8152 *tp) tp 2784 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); tp 2788 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG5); tp 2796 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL); tp 2803 drivers/net/usb/r8152.c static void __rtl_set_wol(struct r8152 *tp, u32 wolopts) tp 2807 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_CONFIG); tp 2809 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); tp 2813 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); tp 2815 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG5); tp 2823 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG5, ocp_data); tp 2825 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML); tp 2827 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL); tp 2831 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CFG_WOL, ocp_data); tp 2834 drivers/net/usb/r8152.c device_set_wakeup_enable(&tp->udev->dev, true); tp 2836 drivers/net/usb/r8152.c device_set_wakeup_enable(&tp->udev->dev, false); tp 2839 drivers/net/usb/r8152.c static void r8153_mac_clk_spd(struct r8152 *tp, bool enable) tp 2843 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, tp 2845 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, tp 2847 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, tp 2850 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, tp 2855 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, 0); tp 2856 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, 0); tp 2857 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, 0); tp 2858 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL4, 0); tp 2862 drivers/net/usb/r8152.c static void r8153_u1u2en(struct r8152 *tp, bool enable) tp 2871 drivers/net/usb/r8152.c usb_ocp_write(tp, USB_TOLERANCE, BYTE_EN_SIX_BYTES, sizeof(u1u2), u1u2); tp 2874 drivers/net/usb/r8152.c static void r8153b_u1u2en(struct r8152 *tp, bool enable) tp 2878 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_LPM_CONFIG); tp 2884 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_LPM_CONFIG, ocp_data); tp 2887 drivers/net/usb/r8152.c static void r8153_u2p3en(struct r8152 *tp, bool enable) tp 2891 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL); tp 2896 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); tp 2899 drivers/net/usb/r8152.c static void r8153b_ups_flags(struct r8152 *tp) tp 2903 drivers/net/usb/r8152.c if (tp->ups_info.green) tp 2906 drivers/net/usb/r8152.c if (tp->ups_info.aldps) tp 2909 drivers/net/usb/r8152.c if (tp->ups_info.eee) tp 2912 drivers/net/usb/r8152.c if (tp->ups_info.flow_control) tp 2915 drivers/net/usb/r8152.c if (tp->ups_info.eee_ckdiv) tp 2918 drivers/net/usb/r8152.c if (tp->ups_info.eee_cmod_lv) tp 2921 drivers/net/usb/r8152.c if (tp->ups_info._10m_ckdiv) tp 2924 drivers/net/usb/r8152.c if (tp->ups_info.eee_plloff_100) tp 2927 drivers/net/usb/r8152.c if (tp->ups_info.eee_plloff_giga) tp 2930 drivers/net/usb/r8152.c if (tp->ups_info._250m_ckdiv) tp 2933 drivers/net/usb/r8152.c if (tp->ups_info.ctap_short_off) tp 2936 drivers/net/usb/r8152.c switch (tp->ups_info.speed_duplex) { tp 2968 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_USB, USB_UPS_FLAGS, ups_flags); tp 2971 drivers/net/usb/r8152.c static void r8153b_green_en(struct r8152 *tp, bool enable) tp 2976 drivers/net/usb/r8152.c sram_write(tp, 0x8045, 0); /* 10M abiq&ldvbias */ tp 2977 drivers/net/usb/r8152.c sram_write(tp, 0x804d, 0x1222); /* 100M short abiq&ldvbias */ tp 2978 drivers/net/usb/r8152.c sram_write(tp, 0x805d, 0x0022); /* 1000M short abiq&ldvbias */ tp 2980 drivers/net/usb/r8152.c sram_write(tp, 0x8045, 0x2444); /* 10M abiq&ldvbias */ tp 2981 drivers/net/usb/r8152.c sram_write(tp, 0x804d, 0x2444); /* 100M short abiq&ldvbias */ tp 2982 drivers/net/usb/r8152.c sram_write(tp, 0x805d, 0x2444); /* 1000M short abiq&ldvbias */ tp 2985 drivers/net/usb/r8152.c data = sram_read(tp, SRAM_GREEN_CFG); tp 2987 drivers/net/usb/r8152.c sram_write(tp, SRAM_GREEN_CFG, data); tp 2989 drivers/net/usb/r8152.c tp->ups_info.green = enable; tp 2992 drivers/net/usb/r8152.c static u16 r8153_phy_status(struct r8152 *tp, u16 desired) tp 2998 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_PHY_STATUS); tp 3009 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 3016 drivers/net/usb/r8152.c static void r8153b_ups_en(struct r8152 *tp, bool enable) tp 3018 drivers/net/usb/r8152.c u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_POWER_CUT); tp 3021 drivers/net/usb/r8152.c r8153b_ups_flags(tp); tp 3024 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); tp 3026 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, 0xcfff); tp 3028 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, 0xcfff, ocp_data); tp 3033 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); tp 3035 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, 0xcfff); tp 3037 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, 0xcfff, ocp_data); tp 3039 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); tp 3041 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); tp 3043 drivers/net/usb/r8152.c data = r8153_phy_status(tp, 0); tp 3048 drivers/net/usb/r8152.c r8153b_green_en(tp, tp 3049 drivers/net/usb/r8152.c test_bit(GREEN_ETHERNET, &tp->flags)); tp 3051 drivers/net/usb/r8152.c data = r8152_mdio_read(tp, MII_BMCR); tp 3054 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_BMCR, data); tp 3056 drivers/net/usb/r8152.c data = r8153_phy_status(tp, PHY_STAT_LAN_ON); tp 3061 drivers/net/usb/r8152.c netif_warn(tp, link, tp->netdev, tp 3068 drivers/net/usb/r8152.c static void r8153_power_cut_en(struct r8152 *tp, bool enable) tp 3072 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_POWER_CUT); tp 3077 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); tp 3079 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); tp 3081 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); tp 3084 drivers/net/usb/r8152.c static void r8153b_power_cut_en(struct r8152 *tp, bool enable) tp 3088 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_POWER_CUT); tp 3093 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_POWER_CUT, ocp_data); tp 3095 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_MISC_0); tp 3097 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data); tp 3100 drivers/net/usb/r8152.c static void r8153_queue_wake(struct r8152 *tp, bool enable) tp 3104 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_INDICATE_FALG); tp 3109 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_INDICATE_FALG, ocp_data); tp 3111 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_SUSPEND_FLAG); tp 3113 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_SUSPEND_FLAG, ocp_data); tp 3115 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS); tp 3117 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EXTRA_STATUS, ocp_data); tp 3120 drivers/net/usb/r8152.c static bool rtl_can_wakeup(struct r8152 *tp) tp 3122 drivers/net/usb/r8152.c struct usb_device *udev = tp->udev; tp 3127 drivers/net/usb/r8152.c static void rtl_runtime_suspend_enable(struct r8152 *tp, bool enable) tp 3132 drivers/net/usb/r8152.c __rtl_set_wol(tp, WAKE_ANY); tp 3134 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_CONFIG); tp 3136 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); tp 3138 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); tp 3140 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML); tp 3144 drivers/net/usb/r8152.c __rtl_set_wol(tp, tp->saved_wolopts); tp 3146 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_CONFIG); tp 3148 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_CONFIG34); tp 3150 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_CONFIG34, ocp_data); tp 3152 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML); tp 3156 drivers/net/usb/r8152.c static void rtl8153_runtime_enable(struct r8152 *tp, bool enable) tp 3159 drivers/net/usb/r8152.c r8153_u1u2en(tp, false); tp 3160 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 3161 drivers/net/usb/r8152.c r8153_mac_clk_spd(tp, true); tp 3162 drivers/net/usb/r8152.c rtl_runtime_suspend_enable(tp, true); tp 3164 drivers/net/usb/r8152.c rtl_runtime_suspend_enable(tp, false); tp 3165 drivers/net/usb/r8152.c r8153_mac_clk_spd(tp, false); tp 3167 drivers/net/usb/r8152.c switch (tp->version) { tp 3174 drivers/net/usb/r8152.c r8153_u2p3en(tp, true); tp 3178 drivers/net/usb/r8152.c r8153_u1u2en(tp, true); tp 3182 drivers/net/usb/r8152.c static void rtl8153b_runtime_enable(struct r8152 *tp, bool enable) tp 3185 drivers/net/usb/r8152.c r8153_queue_wake(tp, true); tp 3186 drivers/net/usb/r8152.c r8153b_u1u2en(tp, false); tp 3187 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 3188 drivers/net/usb/r8152.c rtl_runtime_suspend_enable(tp, true); tp 3189 drivers/net/usb/r8152.c r8153b_ups_en(tp, true); tp 3191 drivers/net/usb/r8152.c r8153b_ups_en(tp, false); tp 3192 drivers/net/usb/r8152.c r8153_queue_wake(tp, false); tp 3193 drivers/net/usb/r8152.c rtl_runtime_suspend_enable(tp, false); tp 3194 drivers/net/usb/r8152.c r8153b_u1u2en(tp, true); tp 3198 drivers/net/usb/r8152.c static void r8153_teredo_off(struct r8152 *tp) tp 3202 drivers/net/usb/r8152.c switch (tp->version) { tp 3210 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG); tp 3213 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, ocp_data); tp 3221 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, 0xff); tp 3228 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_WDT6_CTRL, WDT6_SET_MODE); tp 3229 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_REALWOW_TIMER, 0); tp 3230 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_TEREDO_TIMER, 0); tp 3233 drivers/net/usb/r8152.c static void rtl_reset_bmu(struct r8152 *tp) tp 3237 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_BMU_RESET); tp 3239 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); tp 3241 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_BMU_RESET, ocp_data); tp 3244 drivers/net/usb/r8152.c static void r8152_aldps_en(struct r8152 *tp, bool enable) tp 3247 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_ALDPS_CONFIG, ENPWRSAVE | ENPDNPS | tp 3250 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_ALDPS_CONFIG, ENPDNPS | LINKENA | tp 3256 drivers/net/usb/r8152.c static inline void r8152_mmd_indirect(struct r8152 *tp, u16 dev, u16 reg) tp 3258 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_AR, FUN_ADDR | dev); tp 3259 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_DATA, reg); tp 3260 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_AR, FUN_DATA | dev); tp 3263 drivers/net/usb/r8152.c static u16 r8152_mmd_read(struct r8152 *tp, u16 dev, u16 reg) tp 3267 drivers/net/usb/r8152.c r8152_mmd_indirect(tp, dev, reg); tp 3268 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_EEE_DATA); tp 3269 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_AR, 0x0000); tp 3274 drivers/net/usb/r8152.c static void r8152_mmd_write(struct r8152 *tp, u16 dev, u16 reg, u16 data) tp 3276 drivers/net/usb/r8152.c r8152_mmd_indirect(tp, dev, reg); tp 3277 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_DATA, data); tp 3278 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_AR, 0x0000); tp 3281 drivers/net/usb/r8152.c static void r8152_eee_en(struct r8152 *tp, bool enable) tp 3286 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEE_CR); tp 3287 drivers/net/usb/r8152.c config1 = ocp_reg_read(tp, OCP_EEE_CONFIG1) & ~sd_rise_time_mask; tp 3288 drivers/net/usb/r8152.c config2 = ocp_reg_read(tp, OCP_EEE_CONFIG2); tp 3289 drivers/net/usb/r8152.c config3 = ocp_reg_read(tp, OCP_EEE_CONFIG3) & ~fast_snr_mask; tp 3306 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEE_CR, ocp_data); tp 3307 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_CONFIG1, config1); tp 3308 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_CONFIG2, config2); tp 3309 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_CONFIG3, config3); tp 3312 drivers/net/usb/r8152.c static void r8153_eee_en(struct r8152 *tp, bool enable) tp 3317 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EEE_CR); tp 3318 drivers/net/usb/r8152.c config = ocp_reg_read(tp, OCP_EEE_CFG); tp 3328 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EEE_CR, ocp_data); tp 3329 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_CFG, config); tp 3331 drivers/net/usb/r8152.c tp->ups_info.eee = enable; tp 3334 drivers/net/usb/r8152.c static void rtl_eee_enable(struct r8152 *tp, bool enable) tp 3336 drivers/net/usb/r8152.c switch (tp->version) { tp 3341 drivers/net/usb/r8152.c r8152_eee_en(tp, true); tp 3342 drivers/net/usb/r8152.c r8152_mmd_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, tp 3343 drivers/net/usb/r8152.c tp->eee_adv); tp 3345 drivers/net/usb/r8152.c r8152_eee_en(tp, false); tp 3346 drivers/net/usb/r8152.c r8152_mmd_write(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV, 0); tp 3356 drivers/net/usb/r8152.c r8153_eee_en(tp, true); tp 3357 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_ADV, tp->eee_adv); tp 3359 drivers/net/usb/r8152.c r8153_eee_en(tp, false); tp 3360 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_ADV, 0); tp 3368 drivers/net/usb/r8152.c static void r8152b_enable_fc(struct r8152 *tp) tp 3372 drivers/net/usb/r8152.c anar = r8152_mdio_read(tp, MII_ADVERTISE); tp 3374 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_ADVERTISE, anar); tp 3376 drivers/net/usb/r8152.c tp->ups_info.flow_control = true; tp 3379 drivers/net/usb/r8152.c static void rtl8152_disable(struct r8152 *tp) tp 3381 drivers/net/usb/r8152.c r8152_aldps_en(tp, false); tp 3382 drivers/net/usb/r8152.c rtl_disable(tp); tp 3383 drivers/net/usb/r8152.c r8152_aldps_en(tp, true); tp 3386 drivers/net/usb/r8152.c static void r8152b_hw_phy_cfg(struct r8152 *tp) tp 3388 drivers/net/usb/r8152.c rtl_eee_enable(tp, tp->eee_en); tp 3389 drivers/net/usb/r8152.c r8152_aldps_en(tp, true); tp 3390 drivers/net/usb/r8152.c r8152b_enable_fc(tp); tp 3392 drivers/net/usb/r8152.c set_bit(PHY_RESET, &tp->flags); tp 3395 drivers/net/usb/r8152.c static void r8152b_exit_oob(struct r8152 *tp) tp 3400 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 3402 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 3404 drivers/net/usb/r8152.c rxdy_gated_en(tp, true); tp 3405 drivers/net/usb/r8152.c r8153_teredo_off(tp); tp 3406 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CRWECR, CRWECR_NORAML); tp 3407 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, 0x00); tp 3409 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3411 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3413 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3415 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3418 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3424 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3426 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3429 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3435 drivers/net/usb/r8152.c rtl8152_nic_reset(tp); tp 3438 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL); tp 3440 drivers/net/usb/r8152.c if (tp->udev->speed == USB_SPEED_FULL || tp 3441 drivers/net/usb/r8152.c tp->udev->speed == USB_SPEED_LOW) { tp 3443 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, tp 3445 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, tp 3449 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, tp 3451 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, tp 3456 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_TXFIFO_CTRL, TXFIFO_THR_NORMAL); tp 3458 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_TX_AGG, TX_AGG_MAX_THRESHOLD); tp 3459 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, RX_THR_HIGH); tp 3460 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_USB, USB_TX_DMA, tp 3463 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, tp->netdev->features & NETIF_F_HW_VLAN_CTAG_RX); tp 3465 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, RTL8152_RMS); tp 3467 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); tp 3469 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); tp 3472 drivers/net/usb/r8152.c static void r8152b_enter_oob(struct r8152 *tp) tp 3477 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3479 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3481 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_OOB); tp 3482 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, RXFIFO_THR2_OOB); tp 3483 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, RXFIFO_THR3_OOB); tp 3485 drivers/net/usb/r8152.c rtl_disable(tp); tp 3488 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3494 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3496 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3499 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3505 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, RTL8152_RMS); tp 3507 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, true); tp 3509 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BDC_CR); tp 3511 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_BDC_CR, ocp_data); tp 3513 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3515 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3517 drivers/net/usb/r8152.c rxdy_gated_en(tp, false); tp 3519 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 3521 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 3524 drivers/net/usb/r8152.c static int r8153_patch_request(struct r8152 *tp, bool request) tp 3529 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_PHY_PATCH_CMD); tp 3534 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_PHY_PATCH_CMD, data); tp 3538 drivers/net/usb/r8152.c if (ocp_reg_read(tp, OCP_PHY_PATCH_STAT) & PATCH_READY) tp 3542 drivers/net/usb/r8152.c if (request && !(ocp_reg_read(tp, OCP_PHY_PATCH_STAT) & PATCH_READY)) { tp 3543 drivers/net/usb/r8152.c netif_err(tp, drv, tp->netdev, "patch request fail\n"); tp 3544 drivers/net/usb/r8152.c r8153_patch_request(tp, false); tp 3551 drivers/net/usb/r8152.c static void r8153_aldps_en(struct r8152 *tp, bool enable) tp 3555 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_POWER_CFG); tp 3558 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_POWER_CFG, data); tp 3563 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_POWER_CFG, data); tp 3566 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_PLA, 0xe000) & 0x0100) tp 3571 drivers/net/usb/r8152.c tp->ups_info.aldps = enable; tp 3574 drivers/net/usb/r8152.c static void r8153_hw_phy_cfg(struct r8152 *tp) tp 3580 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 3583 drivers/net/usb/r8152.c rtl_eee_enable(tp, false); tp 3585 drivers/net/usb/r8152.c if (tp->version == RTL_VER_03) { tp 3586 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_EEE_CFG); tp 3588 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_EEE_CFG, data); tp 3591 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_POWER_CFG); tp 3593 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_POWER_CFG, data); tp 3595 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_DOWN_SPEED); tp 3597 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_DOWN_SPEED, data); tp 3598 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_POWER_CFG); tp 3600 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_POWER_CFG, data); tp 3601 drivers/net/usb/r8152.c sram_write(tp, SRAM_IMPEDANCE, 0x0b13); tp 3603 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); tp 3605 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); tp 3608 drivers/net/usb/r8152.c sram_write(tp, SRAM_LPF_CFG, 0xf70f); tp 3611 drivers/net/usb/r8152.c sram_write(tp, SRAM_10M_AMP1, 0x00af); tp 3612 drivers/net/usb/r8152.c sram_write(tp, SRAM_10M_AMP2, 0x0208); tp 3614 drivers/net/usb/r8152.c if (tp->eee_en) tp 3615 drivers/net/usb/r8152.c rtl_eee_enable(tp, true); tp 3617 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 3618 drivers/net/usb/r8152.c r8152b_enable_fc(tp); tp 3620 drivers/net/usb/r8152.c switch (tp->version) { tp 3627 drivers/net/usb/r8152.c r8153_u2p3en(tp, true); tp 3631 drivers/net/usb/r8152.c set_bit(PHY_RESET, &tp->flags); tp 3634 drivers/net/usb/r8152.c static u32 r8152_efuse_read(struct r8152 *tp, u8 addr) tp 3638 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_EFUSE_CMD, EFUSE_READ_CMD | addr); tp 3639 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_EFUSE_CMD); tp 3641 drivers/net/usb/r8152.c ocp_data |= ocp_read_word(tp, MCU_TYPE_PLA, PLA_EFUSE_DATA); tp 3646 drivers/net/usb/r8152.c static void r8153b_hw_phy_cfg(struct r8152 *tp) tp 3652 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 3655 drivers/net/usb/r8152.c rtl_eee_enable(tp, false); tp 3657 drivers/net/usb/r8152.c r8153b_green_en(tp, test_bit(GREEN_ETHERNET, &tp->flags)); tp 3659 drivers/net/usb/r8152.c data = sram_read(tp, SRAM_GREEN_CFG); tp 3661 drivers/net/usb/r8152.c sram_write(tp, SRAM_GREEN_CFG, data); tp 3662 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_NCTL_CFG); tp 3664 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_NCTL_CFG, data); tp 3671 drivers/net/usb/r8152.c ocp_data = r8152_efuse_read(tp, 0x7d); tp 3674 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_ADC_IOFFSET, data); tp 3680 drivers/net/usb/r8152.c ocp_data = ocp_reg_read(tp, 0xc426); tp 3686 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_UPS_CFG); tp 3688 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_UPS_CFG, ocp_data); tp 3691 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); tp 3693 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); tp 3696 drivers/net/usb/r8152.c if (!r8153_patch_request(tp, true)) { tp 3697 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_POWER_CFG); tp 3699 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_POWER_CFG, data); tp 3700 drivers/net/usb/r8152.c tp->ups_info.eee_ckdiv = true; tp 3702 drivers/net/usb/r8152.c data = ocp_reg_read(tp, OCP_DOWN_SPEED); tp 3704 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_DOWN_SPEED, data); tp 3705 drivers/net/usb/r8152.c tp->ups_info.eee_cmod_lv = true; tp 3706 drivers/net/usb/r8152.c tp->ups_info._10m_ckdiv = true; tp 3707 drivers/net/usb/r8152.c tp->ups_info.eee_plloff_giga = true; tp 3709 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_SYSCLK_CFG, 0); tp 3710 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_SYSCLK_CFG, clk_div_expo(5)); tp 3711 drivers/net/usb/r8152.c tp->ups_info._250m_ckdiv = true; tp 3713 drivers/net/usb/r8152.c r8153_patch_request(tp, false); tp 3716 drivers/net/usb/r8152.c if (tp->eee_en) tp 3717 drivers/net/usb/r8152.c rtl_eee_enable(tp, true); tp 3719 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 3720 drivers/net/usb/r8152.c r8152b_enable_fc(tp); tp 3722 drivers/net/usb/r8152.c set_bit(PHY_RESET, &tp->flags); tp 3725 drivers/net/usb/r8152.c static void r8153_first_init(struct r8152 *tp) tp 3730 drivers/net/usb/r8152.c r8153_mac_clk_spd(tp, false); tp 3731 drivers/net/usb/r8152.c rxdy_gated_en(tp, true); tp 3732 drivers/net/usb/r8152.c r8153_teredo_off(tp); tp 3734 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 3736 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 3738 drivers/net/usb/r8152.c rtl8152_nic_reset(tp); tp 3739 drivers/net/usb/r8152.c rtl_reset_bmu(tp); tp 3741 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3743 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3745 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3747 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3750 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3756 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3758 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3761 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3767 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, tp->netdev->features & NETIF_F_HW_VLAN_CTAG_RX); tp 3769 drivers/net/usb/r8152.c ocp_data = tp->netdev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN; tp 3770 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, ocp_data); tp 3771 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_MTPS, MTPS_JUMBO); tp 3773 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TCR0); tp 3775 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_TCR0, ocp_data); tp 3777 drivers/net/usb/r8152.c rtl8152_nic_reset(tp); tp 3780 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL0, RXFIFO_THR1_NORMAL); tp 3781 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL1, RXFIFO_THR2_NORMAL); tp 3782 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RXFIFO_CTRL2, RXFIFO_THR3_NORMAL); tp 3784 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_TXFIFO_CTRL, TXFIFO_THR_NORMAL2); tp 3787 drivers/net/usb/r8152.c static void r8153_enter_oob(struct r8152 *tp) tp 3792 drivers/net/usb/r8152.c r8153_mac_clk_spd(tp, true); tp 3794 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3796 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3798 drivers/net/usb/r8152.c rtl_disable(tp); tp 3799 drivers/net/usb/r8152.c rtl_reset_bmu(tp); tp 3802 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3808 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7); tp 3810 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, ocp_data); tp 3813 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3819 drivers/net/usb/r8152.c ocp_data = tp->netdev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN; tp 3820 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, ocp_data); tp 3822 drivers/net/usb/r8152.c switch (tp->version) { tp 3827 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG); tp 3829 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_CFG, ocp_data); tp 3838 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_TEREDO_WAKE_BASE, 0x00ff); tp 3845 drivers/net/usb/r8152.c rtl_rx_vlan_en(tp, true); tp 3847 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_BDC_CR); tp 3849 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_BDC_CR, ocp_data); tp 3851 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL); tp 3853 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data); tp 3855 drivers/net/usb/r8152.c rxdy_gated_en(tp, false); tp 3857 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 3859 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 3862 drivers/net/usb/r8152.c static void rtl8153_disable(struct r8152 *tp) tp 3864 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 3865 drivers/net/usb/r8152.c rtl_disable(tp); tp 3866 drivers/net/usb/r8152.c rtl_reset_bmu(tp); tp 3867 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 3870 drivers/net/usb/r8152.c static int rtl8152_set_speed(struct r8152 *tp, u8 autoneg, u32 speed, u8 duplex, tp 3885 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = FORCE_10M_FULL; tp 3887 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = FORCE_10M_HALF; tp 3894 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = FORCE_100M_FULL; tp 3896 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = FORCE_100M_HALF; tp 3900 drivers/net/usb/r8152.c if (tp->mii.supports_gmii) { tp 3902 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_1000M_FULL; tp 3912 drivers/net/usb/r8152.c tp->mii.full_duplex = 1; tp 3914 drivers/net/usb/r8152.c tp->mii.full_duplex = 0; tp 3916 drivers/net/usb/r8152.c tp->mii.force_media = 1; tp 3924 drivers/net/usb/r8152.c if (tp->mii.supports_gmii) tp 3930 drivers/net/usb/r8152.c anar = r8152_mdio_read(tp, MII_ADVERTISE); tp 3935 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_10M_HALF; tp 3939 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_10M_FULL; tp 3944 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_100M_HALF; tp 3948 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_100M_FULL; tp 3952 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_ADVERTISE, tmp1); tp 3953 drivers/net/usb/r8152.c tp->mii.advertising = tmp1; tp 3956 drivers/net/usb/r8152.c if (tp->mii.supports_gmii) { tp 3959 drivers/net/usb/r8152.c gbcr = r8152_mdio_read(tp, MII_CTRL1000); tp 3965 drivers/net/usb/r8152.c tp->ups_info.speed_duplex = NWAY_1000M_FULL; tp 3969 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_CTRL1000, tmp1); tp 3974 drivers/net/usb/r8152.c tp->mii.force_media = 0; tp 3977 drivers/net/usb/r8152.c if (test_and_clear_bit(PHY_RESET, &tp->flags)) tp 3980 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_BMCR, bmcr); tp 3987 drivers/net/usb/r8152.c if ((r8152_mdio_read(tp, MII_BMCR) & BMCR_RESET) == 0) tp 3996 drivers/net/usb/r8152.c static void rtl8152_up(struct r8152 *tp) tp 3998 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4001 drivers/net/usb/r8152.c r8152_aldps_en(tp, false); tp 4002 drivers/net/usb/r8152.c r8152b_exit_oob(tp); tp 4003 drivers/net/usb/r8152.c r8152_aldps_en(tp, true); tp 4006 drivers/net/usb/r8152.c static void rtl8152_down(struct r8152 *tp) tp 4008 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) { tp 4009 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 4013 drivers/net/usb/r8152.c r8152_power_cut_en(tp, false); tp 4014 drivers/net/usb/r8152.c r8152_aldps_en(tp, false); tp 4015 drivers/net/usb/r8152.c r8152b_enter_oob(tp); tp 4016 drivers/net/usb/r8152.c r8152_aldps_en(tp, true); tp 4019 drivers/net/usb/r8152.c static void rtl8153_up(struct r8152 *tp) tp 4023 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4026 drivers/net/usb/r8152.c r8153_u1u2en(tp, false); tp 4027 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4028 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 4029 drivers/net/usb/r8152.c r8153_first_init(tp); tp 4031 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); tp 4033 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); tp 4035 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG); tp 4037 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG, ocp_data); tp 4039 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1); tp 4041 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK1, ocp_data); tp 4043 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 4045 drivers/net/usb/r8152.c switch (tp->version) { tp 4052 drivers/net/usb/r8152.c r8153_u2p3en(tp, true); tp 4056 drivers/net/usb/r8152.c r8153_u1u2en(tp, true); tp 4059 drivers/net/usb/r8152.c static void rtl8153_down(struct r8152 *tp) tp 4063 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) { tp 4064 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 4068 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); tp 4070 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); tp 4072 drivers/net/usb/r8152.c r8153_u1u2en(tp, false); tp 4073 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4074 drivers/net/usb/r8152.c r8153_power_cut_en(tp, false); tp 4075 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 4076 drivers/net/usb/r8152.c r8153_enter_oob(tp); tp 4077 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 4080 drivers/net/usb/r8152.c static void rtl8153b_up(struct r8152 *tp) tp 4084 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4087 drivers/net/usb/r8152.c r8153b_u1u2en(tp, false); tp 4088 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4089 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 4091 drivers/net/usb/r8152.c r8153_first_init(tp); tp 4092 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_USB, USB_RX_BUF_TH, RX_THR_B); tp 4094 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); tp 4096 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); tp 4098 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 4099 drivers/net/usb/r8152.c r8153b_u1u2en(tp, true); tp 4102 drivers/net/usb/r8152.c static void rtl8153b_down(struct r8152 *tp) tp 4106 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) { tp 4107 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 4111 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); tp 4113 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); tp 4115 drivers/net/usb/r8152.c r8153b_u1u2en(tp, false); tp 4116 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4117 drivers/net/usb/r8152.c r8153b_power_cut_en(tp, false); tp 4118 drivers/net/usb/r8152.c r8153_aldps_en(tp, false); tp 4119 drivers/net/usb/r8152.c r8153_enter_oob(tp); tp 4120 drivers/net/usb/r8152.c r8153_aldps_en(tp, true); tp 4123 drivers/net/usb/r8152.c static bool rtl8152_in_nway(struct r8152 *tp) tp 4127 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_OCP_GPHY_BASE, 0x2000); tp 4128 drivers/net/usb/r8152.c tp->ocp_base = 0x2000; tp 4129 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, 0xb014, 0x4c); /* phy state */ tp 4130 drivers/net/usb/r8152.c nway_state = ocp_read_word(tp, MCU_TYPE_PLA, 0xb01a); tp 4139 drivers/net/usb/r8152.c static bool rtl8153_in_nway(struct r8152 *tp) tp 4141 drivers/net/usb/r8152.c u16 phy_state = ocp_reg_read(tp, OCP_PHY_STATE) & 0xff; tp 4149 drivers/net/usb/r8152.c static void set_carrier(struct r8152 *tp) tp 4151 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 4152 drivers/net/usb/r8152.c struct napi_struct *napi = &tp->napi; tp 4155 drivers/net/usb/r8152.c speed = rtl8152_get_speed(tp); tp 4159 drivers/net/usb/r8152.c tp->rtl_ops.enable(tp); tp 4163 drivers/net/usb/r8152.c rtl_start_rx(tp); tp 4164 drivers/net/usb/r8152.c clear_bit(RTL8152_SET_RX_MODE, &tp->flags); tp 4166 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 4168 drivers/net/usb/r8152.c netif_info(tp, link, netdev, "carrier on\n"); tp 4170 drivers/net/usb/r8152.c skb_queue_len(&tp->tx_queue) < tp->tx_qlen) { tp 4176 drivers/net/usb/r8152.c tasklet_disable(&tp->tx_tl); tp 4178 drivers/net/usb/r8152.c tp->rtl_ops.disable(tp); tp 4180 drivers/net/usb/r8152.c tasklet_enable(&tp->tx_tl); tp 4181 drivers/net/usb/r8152.c netif_info(tp, link, netdev, "carrier off\n"); tp 4188 drivers/net/usb/r8152.c struct r8152 *tp = container_of(work, struct r8152, schedule.work); tp 4193 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags) || !netif_running(tp->netdev)) tp 4196 drivers/net/usb/r8152.c if (usb_autopm_get_interface(tp->intf) < 0) tp 4199 drivers/net/usb/r8152.c if (!test_bit(WORK_ENABLE, &tp->flags)) tp 4202 drivers/net/usb/r8152.c if (!mutex_trylock(&tp->control)) { tp 4203 drivers/net/usb/r8152.c schedule_delayed_work(&tp->schedule, 0); tp 4207 drivers/net/usb/r8152.c if (test_and_clear_bit(RTL8152_LINK_CHG, &tp->flags)) tp 4208 drivers/net/usb/r8152.c set_carrier(tp); tp 4210 drivers/net/usb/r8152.c if (test_and_clear_bit(RTL8152_SET_RX_MODE, &tp->flags)) tp 4211 drivers/net/usb/r8152.c _rtl8152_set_rx_mode(tp->netdev); tp 4214 drivers/net/usb/r8152.c if (test_and_clear_bit(SCHEDULE_TASKLET, &tp->flags) && tp 4215 drivers/net/usb/r8152.c netif_carrier_ok(tp->netdev)) tp 4216 drivers/net/usb/r8152.c tasklet_schedule(&tp->tx_tl); tp 4218 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4221 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4226 drivers/net/usb/r8152.c struct r8152 *tp = container_of(work, struct r8152, hw_phy_work.work); tp 4228 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4231 drivers/net/usb/r8152.c if (usb_autopm_get_interface(tp->intf) < 0) tp 4234 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4236 drivers/net/usb/r8152.c tp->rtl_ops.hw_phy_cfg(tp); tp 4238 drivers/net/usb/r8152.c rtl8152_set_speed(tp, tp->autoneg, tp->speed, tp->duplex, tp 4239 drivers/net/usb/r8152.c tp->advertising); tp 4241 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4243 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4250 drivers/net/usb/r8152.c struct r8152 *tp = container_of(nb, struct r8152, pm_notifier); tp 4255 drivers/net/usb/r8152.c usb_autopm_get_interface(tp->intf); tp 4260 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4275 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 4278 drivers/net/usb/r8152.c res = alloc_all_mem(tp); tp 4282 drivers/net/usb/r8152.c res = usb_autopm_get_interface(tp->intf); tp 4286 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4288 drivers/net/usb/r8152.c tp->rtl_ops.up(tp); tp 4292 drivers/net/usb/r8152.c set_bit(WORK_ENABLE, &tp->flags); tp 4294 drivers/net/usb/r8152.c res = usb_submit_urb(tp->intr_urb, GFP_KERNEL); tp 4297 drivers/net/usb/r8152.c netif_device_detach(tp->netdev); tp 4298 drivers/net/usb/r8152.c netif_warn(tp, ifup, netdev, "intr_urb submit failed: %d\n", tp 4302 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 4303 drivers/net/usb/r8152.c tasklet_enable(&tp->tx_tl); tp 4305 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4307 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4309 drivers/net/usb/r8152.c tp->pm_notifier.notifier_call = rtl_notifier; tp 4310 drivers/net/usb/r8152.c register_pm_notifier(&tp->pm_notifier); tp 4315 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4316 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4318 drivers/net/usb/r8152.c free_all_mem(tp); tp 4325 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 4329 drivers/net/usb/r8152.c unregister_pm_notifier(&tp->pm_notifier); tp 4331 drivers/net/usb/r8152.c tasklet_disable(&tp->tx_tl); tp 4332 drivers/net/usb/r8152.c clear_bit(WORK_ENABLE, &tp->flags); tp 4333 drivers/net/usb/r8152.c usb_kill_urb(tp->intr_urb); tp 4334 drivers/net/usb/r8152.c cancel_delayed_work_sync(&tp->schedule); tp 4335 drivers/net/usb/r8152.c napi_disable(&tp->napi); tp 4338 drivers/net/usb/r8152.c res = usb_autopm_get_interface(tp->intf); tp 4339 drivers/net/usb/r8152.c if (res < 0 || test_bit(RTL8152_UNPLUG, &tp->flags)) { tp 4340 drivers/net/usb/r8152.c rtl_drop_queued_tx(tp); tp 4341 drivers/net/usb/r8152.c rtl_stop_rx(tp); tp 4343 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4345 drivers/net/usb/r8152.c tp->rtl_ops.down(tp); tp 4347 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4349 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4352 drivers/net/usb/r8152.c free_all_mem(tp); tp 4357 drivers/net/usb/r8152.c static void rtl_tally_reset(struct r8152 *tp) tp 4361 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY); tp 4363 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RSTTALLY, ocp_data); tp 4366 drivers/net/usb/r8152.c static void r8152b_init(struct r8152 *tp) tp 4371 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4374 drivers/net/usb/r8152.c data = r8152_mdio_read(tp, MII_BMCR); tp 4377 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_BMCR, data); tp 4380 drivers/net/usb/r8152.c r8152_aldps_en(tp, false); tp 4382 drivers/net/usb/r8152.c if (tp->version == RTL_VER_01) { tp 4383 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); tp 4385 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); tp 4388 drivers/net/usb/r8152.c r8152_power_cut_en(tp, false); tp 4390 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); tp 4392 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); tp 4393 drivers/net/usb/r8152.c ocp_data = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL); tp 4396 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL, ocp_data); tp 4399 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_GPHY_INTR_IMR, ocp_data); tp 4401 drivers/net/usb/r8152.c rtl_tally_reset(tp); tp 4404 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); tp 4406 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); tp 4409 drivers/net/usb/r8152.c static void r8153_init(struct r8152 *tp) tp 4415 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4418 drivers/net/usb/r8152.c r8153_u1u2en(tp, false); tp 4421 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & tp 4426 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4430 drivers/net/usb/r8152.c data = r8153_phy_status(tp, 0); tp 4432 drivers/net/usb/r8152.c if (tp->version == RTL_VER_03 || tp->version == RTL_VER_04 || tp 4433 drivers/net/usb/r8152.c tp->version == RTL_VER_05) tp 4434 drivers/net/usb/r8152.c ocp_reg_write(tp, OCP_ADC_CFG, CKADSEL_L | ADC_EN | EN_EMI_L); tp 4436 drivers/net/usb/r8152.c data = r8152_mdio_read(tp, MII_BMCR); tp 4439 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_BMCR, data); tp 4442 drivers/net/usb/r8152.c data = r8153_phy_status(tp, PHY_STAT_LAN_ON); tp 4444 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4446 drivers/net/usb/r8152.c if (tp->version == RTL_VER_04) { tp 4447 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2); tp 4450 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_SSPHYLINK2, ocp_data); tp 4452 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_USB2PHY); tp 4454 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_USB2PHY, ocp_data); tp 4455 drivers/net/usb/r8152.c } else if (tp->version == RTL_VER_05) { tp 4456 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0); tp 4458 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_DMY_REG0, ocp_data); tp 4460 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); tp 4461 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_USB, USB_BURST_SIZE) == 0) tp 4465 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); tp 4466 drivers/net/usb/r8152.c } else if (tp->version == RTL_VER_06) { tp 4467 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1); tp 4468 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_USB, USB_BURST_SIZE) == 0) tp 4472 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY1, ocp_data); tp 4475 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2); tp 4477 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_CSR_DUMMY2, ocp_data); tp 4479 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); tp 4481 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL, ocp_data); tp 4483 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE); tp 4485 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_LED_FEATURE, ocp_data); tp 4488 drivers/net/usb/r8152.c if (tp->version == RTL_VER_04 && tp->udev->speed < USB_SPEED_SUPER) tp 4492 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_USB, USB_LPM_CTRL, ocp_data); tp 4494 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2); tp 4497 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); tp 4499 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_CONNECT_TIMER, 0x0001); tp 4501 drivers/net/usb/r8152.c r8153_power_cut_en(tp, false); tp 4502 drivers/net/usb/r8152.c r8153_u1u2en(tp, true); tp 4503 drivers/net/usb/r8152.c r8153_mac_clk_spd(tp, false); tp 4504 drivers/net/usb/r8152.c usb_enable_lpm(tp->udev); tp 4506 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6); tp 4508 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6, ocp_data); tp 4510 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG); tp 4512 drivers/net/usb/r8152.c ocp_write_byte(tp, MCU_TYPE_PLA, PLA_LWAKE_CTRL_REG, ocp_data); tp 4515 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); tp 4517 drivers/net/usb/r8152.c if (test_bit(DELL_TB_RX_AGG_BUG, &tp->flags)) tp 4520 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); tp 4522 drivers/net/usb/r8152.c rtl_tally_reset(tp); tp 4524 drivers/net/usb/r8152.c switch (tp->udev->speed) { tp 4527 drivers/net/usb/r8152.c tp->coalesce = COALESCE_SUPER; tp 4530 drivers/net/usb/r8152.c tp->coalesce = COALESCE_HIGH; tp 4533 drivers/net/usb/r8152.c tp->coalesce = COALESCE_SLOW; tp 4538 drivers/net/usb/r8152.c static void r8153b_init(struct r8152 *tp) tp 4544 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4547 drivers/net/usb/r8152.c r8153b_u1u2en(tp, false); tp 4550 drivers/net/usb/r8152.c if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & tp 4555 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 4559 drivers/net/usb/r8152.c data = r8153_phy_status(tp, 0); tp 4561 drivers/net/usb/r8152.c data = r8152_mdio_read(tp, MII_BMCR); tp 4564 drivers/net/usb/r8152.c r8152_mdio_write(tp, MII_BMCR, data); tp 4567 drivers/net/usb/r8152.c data = r8153_phy_status(tp, PHY_STAT_LAN_ON); tp 4569 drivers/net/usb/r8152.c r8153_u2p3en(tp, false); tp 4572 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_MSC_TIMER, 0x0fff); tp 4575 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_U1U2_TIMER, 500); tp 4577 drivers/net/usb/r8152.c r8153b_power_cut_en(tp, false); tp 4578 drivers/net/usb/r8152.c r8153b_ups_en(tp, false); tp 4579 drivers/net/usb/r8152.c r8153_queue_wake(tp, false); tp 4580 drivers/net/usb/r8152.c rtl_runtime_suspend_enable(tp, false); tp 4581 drivers/net/usb/r8152.c r8153b_u1u2en(tp, true); tp 4582 drivers/net/usb/r8152.c usb_enable_lpm(tp->udev); tp 4585 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2); tp 4587 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL2, ocp_data); tp 4589 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3); tp 4591 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_MAC_PWR_CTRL3, ocp_data); tp 4593 drivers/net/usb/r8152.c if (tp->version == RTL_VER_09) { tp 4595 drivers/net/usb/r8152.c if (ocp_read_byte(tp, MCU_TYPE_PLA, 0xdc00) & BIT(5)) { tp 4596 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR); tp 4598 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_PHY_PWR, ocp_data); tp 4602 drivers/net/usb/r8152.c set_bit(GREEN_ETHERNET, &tp->flags); tp 4605 drivers/net/usb/r8152.c ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); tp 4607 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); tp 4609 drivers/net/usb/r8152.c rtl_tally_reset(tp); tp 4611 drivers/net/usb/r8152.c tp->coalesce = 15000; /* 15 us */ tp 4616 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 4619 drivers/net/usb/r8152.c if (!tp) tp 4622 drivers/net/usb/r8152.c netdev = tp->netdev; tp 4627 drivers/net/usb/r8152.c tasklet_disable(&tp->tx_tl); tp 4628 drivers/net/usb/r8152.c clear_bit(WORK_ENABLE, &tp->flags); tp 4629 drivers/net/usb/r8152.c usb_kill_urb(tp->intr_urb); tp 4630 drivers/net/usb/r8152.c cancel_delayed_work_sync(&tp->schedule); tp 4631 drivers/net/usb/r8152.c napi_disable(&tp->napi); tp 4633 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4634 drivers/net/usb/r8152.c tp->rtl_ops.disable(tp); tp 4635 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4643 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 4647 drivers/net/usb/r8152.c if (!tp) tp 4651 drivers/net/usb/r8152.c if (determine_ethernet_addr(tp, &sa) >= 0) { tp 4653 drivers/net/usb/r8152.c dev_set_mac_address (tp->netdev, &sa, NULL); tp 4657 drivers/net/usb/r8152.c netdev = tp->netdev; tp 4661 drivers/net/usb/r8152.c set_bit(WORK_ENABLE, &tp->flags); tp 4663 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4664 drivers/net/usb/r8152.c tp->rtl_ops.enable(tp); tp 4665 drivers/net/usb/r8152.c rtl_start_rx(tp); tp 4667 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4670 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 4671 drivers/net/usb/r8152.c tasklet_enable(&tp->tx_tl); tp 4673 drivers/net/usb/r8152.c usb_submit_urb(tp->intr_urb, GFP_KERNEL); tp 4675 drivers/net/usb/r8152.c if (!list_empty(&tp->rx_done)) tp 4676 drivers/net/usb/r8152.c napi_schedule(&tp->napi); tp 4681 drivers/net/usb/r8152.c static bool delay_autosuspend(struct r8152 *tp) tp 4683 drivers/net/usb/r8152.c bool sw_linking = !!netif_carrier_ok(tp->netdev); tp 4684 drivers/net/usb/r8152.c bool hw_linking = !!(rtl8152_get_speed(tp) & LINK_STATUS); tp 4690 drivers/net/usb/r8152.c if (work_busy(&tp->schedule.work) || sw_linking != hw_linking) tp 4696 drivers/net/usb/r8152.c if (!sw_linking && tp->rtl_ops.in_nway(tp)) tp 4698 drivers/net/usb/r8152.c else if (!skb_queue_empty(&tp->tx_queue)) tp 4704 drivers/net/usb/r8152.c static int rtl8152_runtime_resume(struct r8152 *tp) tp 4706 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 4709 drivers/net/usb/r8152.c struct napi_struct *napi = &tp->napi; tp 4711 drivers/net/usb/r8152.c tp->rtl_ops.autosuspend_en(tp, false); tp 4713 drivers/net/usb/r8152.c set_bit(WORK_ENABLE, &tp->flags); tp 4716 drivers/net/usb/r8152.c if (rtl8152_get_speed(tp) & LINK_STATUS) { tp 4717 drivers/net/usb/r8152.c rtl_start_rx(tp); tp 4720 drivers/net/usb/r8152.c tp->rtl_ops.disable(tp); tp 4721 drivers/net/usb/r8152.c netif_info(tp, link, netdev, "linking down\n"); tp 4726 drivers/net/usb/r8152.c clear_bit(SELECTIVE_SUSPEND, &tp->flags); tp 4729 drivers/net/usb/r8152.c if (!list_empty(&tp->rx_done)) tp 4730 drivers/net/usb/r8152.c napi_schedule(&tp->napi); tp 4732 drivers/net/usb/r8152.c usb_submit_urb(tp->intr_urb, GFP_NOIO); tp 4735 drivers/net/usb/r8152.c tp->rtl_ops.autosuspend_en(tp, false); tp 4737 drivers/net/usb/r8152.c clear_bit(SELECTIVE_SUSPEND, &tp->flags); tp 4743 drivers/net/usb/r8152.c static int rtl8152_system_resume(struct r8152 *tp) tp 4745 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 4750 drivers/net/usb/r8152.c tp->rtl_ops.up(tp); tp 4752 drivers/net/usb/r8152.c set_bit(WORK_ENABLE, &tp->flags); tp 4753 drivers/net/usb/r8152.c usb_submit_urb(tp->intr_urb, GFP_NOIO); tp 4759 drivers/net/usb/r8152.c static int rtl8152_runtime_suspend(struct r8152 *tp) tp 4761 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 4764 drivers/net/usb/r8152.c set_bit(SELECTIVE_SUSPEND, &tp->flags); tp 4767 drivers/net/usb/r8152.c if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) { tp 4773 drivers/net/usb/r8152.c rcr = ocp_read_dword(tp, MCU_TYPE_PLA, PLA_RCR); tp 4775 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, ocp_data); tp 4776 drivers/net/usb/r8152.c rxdy_gated_en(tp, true); tp 4777 drivers/net/usb/r8152.c ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, tp 4780 drivers/net/usb/r8152.c rxdy_gated_en(tp, false); tp 4781 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, rcr); tp 4782 drivers/net/usb/r8152.c clear_bit(SELECTIVE_SUSPEND, &tp->flags); tp 4789 drivers/net/usb/r8152.c clear_bit(WORK_ENABLE, &tp->flags); tp 4790 drivers/net/usb/r8152.c usb_kill_urb(tp->intr_urb); tp 4792 drivers/net/usb/r8152.c tp->rtl_ops.autosuspend_en(tp, true); tp 4795 drivers/net/usb/r8152.c struct napi_struct *napi = &tp->napi; tp 4798 drivers/net/usb/r8152.c rtl_stop_rx(tp); tp 4799 drivers/net/usb/r8152.c rxdy_gated_en(tp, false); tp 4800 drivers/net/usb/r8152.c ocp_write_dword(tp, MCU_TYPE_PLA, PLA_RCR, rcr); tp 4804 drivers/net/usb/r8152.c if (delay_autosuspend(tp)) { tp 4805 drivers/net/usb/r8152.c rtl8152_runtime_resume(tp); tp 4814 drivers/net/usb/r8152.c static int rtl8152_system_suspend(struct r8152 *tp) tp 4816 drivers/net/usb/r8152.c struct net_device *netdev = tp->netdev; tp 4820 drivers/net/usb/r8152.c if (netif_running(netdev) && test_bit(WORK_ENABLE, &tp->flags)) { tp 4821 drivers/net/usb/r8152.c struct napi_struct *napi = &tp->napi; tp 4823 drivers/net/usb/r8152.c clear_bit(WORK_ENABLE, &tp->flags); tp 4824 drivers/net/usb/r8152.c usb_kill_urb(tp->intr_urb); tp 4825 drivers/net/usb/r8152.c tasklet_disable(&tp->tx_tl); tp 4827 drivers/net/usb/r8152.c cancel_delayed_work_sync(&tp->schedule); tp 4828 drivers/net/usb/r8152.c tp->rtl_ops.down(tp); tp 4830 drivers/net/usb/r8152.c tasklet_enable(&tp->tx_tl); tp 4838 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 4841 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4844 drivers/net/usb/r8152.c ret = rtl8152_runtime_suspend(tp); tp 4846 drivers/net/usb/r8152.c ret = rtl8152_system_suspend(tp); tp 4848 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4855 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 4858 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4860 drivers/net/usb/r8152.c if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) tp 4861 drivers/net/usb/r8152.c ret = rtl8152_runtime_resume(tp); tp 4863 drivers/net/usb/r8152.c ret = rtl8152_system_resume(tp); tp 4865 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4872 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 4874 drivers/net/usb/r8152.c clear_bit(SELECTIVE_SUSPEND, &tp->flags); tp 4875 drivers/net/usb/r8152.c tp->rtl_ops.init(tp); tp 4876 drivers/net/usb/r8152.c queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); tp 4877 drivers/net/usb/r8152.c set_ethernet_addr(tp); tp 4883 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 4885 drivers/net/usb/r8152.c if (usb_autopm_get_interface(tp->intf) < 0) tp 4888 drivers/net/usb/r8152.c if (!rtl_can_wakeup(tp)) { tp 4892 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4894 drivers/net/usb/r8152.c wol->wolopts = __rtl_get_wol(tp); tp 4895 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4898 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4903 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 4906 drivers/net/usb/r8152.c if (!rtl_can_wakeup(tp)) tp 4912 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 4916 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4918 drivers/net/usb/r8152.c __rtl_set_wol(tp, wol->wolopts); tp 4919 drivers/net/usb/r8152.c tp->saved_wolopts = wol->wolopts & WAKE_ANY; tp 4921 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4923 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4931 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 4933 drivers/net/usb/r8152.c return tp->msg_enable; tp 4938 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 4940 drivers/net/usb/r8152.c tp->msg_enable = value; tp 4946 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 4950 drivers/net/usb/r8152.c usb_make_path(tp->udev, info->bus_info, sizeof(info->bus_info)); tp 4957 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 4960 drivers/net/usb/r8152.c if (!tp->mii.mdio_read) tp 4963 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 4967 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 4969 drivers/net/usb/r8152.c mii_ethtool_get_link_ksettings(&tp->mii, cmd); tp 4971 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 4973 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 4982 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 4986 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5014 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5016 drivers/net/usb/r8152.c ret = rtl8152_set_speed(tp, cmd->base.autoneg, cmd->base.speed, tp 5019 drivers/net/usb/r8152.c tp->autoneg = cmd->base.autoneg; tp 5020 drivers/net/usb/r8152.c tp->speed = cmd->base.speed; tp 5021 drivers/net/usb/r8152.c tp->duplex = cmd->base.duplex; tp 5022 drivers/net/usb/r8152.c tp->advertising = advertising; tp 5025 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5027 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5062 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 5065 drivers/net/usb/r8152.c if (usb_autopm_get_interface(tp->intf) < 0) tp 5068 drivers/net/usb/r8152.c generic_ocp_read(tp, PLA_TALLYCNT, sizeof(tally), &tally, MCU_TYPE_PLA); tp 5070 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5096 drivers/net/usb/r8152.c static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee) tp 5101 drivers/net/usb/r8152.c val = r8152_mmd_read(tp, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE); tp 5104 drivers/net/usb/r8152.c val = r8152_mmd_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_ADV); tp 5107 drivers/net/usb/r8152.c val = r8152_mmd_read(tp, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE); tp 5110 drivers/net/usb/r8152.c eee->eee_enabled = tp->eee_en; tp 5113 drivers/net/usb/r8152.c eee->advertised = tp->eee_adv; tp 5119 drivers/net/usb/r8152.c static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee) tp 5123 drivers/net/usb/r8152.c tp->eee_en = eee->eee_enabled; tp 5124 drivers/net/usb/r8152.c tp->eee_adv = val; tp 5126 drivers/net/usb/r8152.c rtl_eee_enable(tp, tp->eee_en); tp 5131 drivers/net/usb/r8152.c static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee) tp 5136 drivers/net/usb/r8152.c val = ocp_reg_read(tp, OCP_EEE_ABLE); tp 5139 drivers/net/usb/r8152.c val = ocp_reg_read(tp, OCP_EEE_ADV); tp 5142 drivers/net/usb/r8152.c val = ocp_reg_read(tp, OCP_EEE_LPABLE); tp 5145 drivers/net/usb/r8152.c eee->eee_enabled = tp->eee_en; tp 5148 drivers/net/usb/r8152.c eee->advertised = tp->eee_adv; tp 5157 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(net); tp 5160 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5164 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5166 drivers/net/usb/r8152.c ret = tp->rtl_ops.eee_get(tp, edata); tp 5168 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5170 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5179 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(net); tp 5182 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5186 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5188 drivers/net/usb/r8152.c ret = tp->rtl_ops.eee_set(tp, edata); tp 5190 drivers/net/usb/r8152.c ret = mii_nway_restart(&tp->mii); tp 5192 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5194 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5202 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 5205 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5209 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5211 drivers/net/usb/r8152.c ret = mii_nway_restart(&tp->mii); tp 5213 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5215 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5224 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5226 drivers/net/usb/r8152.c switch (tp->version) { tp 5235 drivers/net/usb/r8152.c coalesce->rx_coalesce_usecs = tp->coalesce; tp 5243 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5246 drivers/net/usb/r8152.c switch (tp->version) { tp 5258 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5262 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5264 drivers/net/usb/r8152.c if (tp->coalesce != coalesce->rx_coalesce_usecs) { tp 5265 drivers/net/usb/r8152.c tp->coalesce = coalesce->rx_coalesce_usecs; tp 5269 drivers/net/usb/r8152.c napi_disable(&tp->napi); tp 5270 drivers/net/usb/r8152.c tp->rtl_ops.disable(tp); tp 5271 drivers/net/usb/r8152.c tp->rtl_ops.enable(tp); tp 5272 drivers/net/usb/r8152.c rtl_start_rx(tp); tp 5273 drivers/net/usb/r8152.c clear_bit(RTL8152_SET_RX_MODE, &tp->flags); tp 5275 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 5280 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5282 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5290 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5294 drivers/net/usb/r8152.c *(u32 *)d = tp->rx_copybreak; tp 5307 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5314 drivers/net/usb/r8152.c netif_err(tp, rx_err, netdev, tp 5319 drivers/net/usb/r8152.c if (tp->rx_copybreak != val) { tp 5321 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5322 drivers/net/usb/r8152.c napi_disable(&tp->napi); tp 5323 drivers/net/usb/r8152.c tp->rx_copybreak = val; tp 5324 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 5325 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5327 drivers/net/usb/r8152.c tp->rx_copybreak = val; tp 5341 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5344 drivers/net/usb/r8152.c ring->rx_pending = tp->rx_pending; tp 5350 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5355 drivers/net/usb/r8152.c if (tp->rx_pending != ring->rx_pending) { tp 5357 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5358 drivers/net/usb/r8152.c napi_disable(&tp->napi); tp 5359 drivers/net/usb/r8152.c tp->rx_pending = ring->rx_pending; tp 5360 drivers/net/usb/r8152.c napi_enable(&tp->napi); tp 5361 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5363 drivers/net/usb/r8152.c tp->rx_pending = ring->rx_pending; tp 5395 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(netdev); tp 5399 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 5402 drivers/net/usb/r8152.c res = usb_autopm_get_interface(tp->intf); tp 5412 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5413 drivers/net/usb/r8152.c data->val_out = r8152_mdio_read(tp, data->reg_num); tp 5414 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5422 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5423 drivers/net/usb/r8152.c r8152_mdio_write(tp, data->reg_num, data->val_in); tp 5424 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5431 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5439 drivers/net/usb/r8152.c struct r8152 *tp = netdev_priv(dev); tp 5442 drivers/net/usb/r8152.c switch (tp->version) { tp 5452 drivers/net/usb/r8152.c ret = usb_autopm_get_interface(tp->intf); tp 5456 drivers/net/usb/r8152.c mutex_lock(&tp->control); tp 5463 drivers/net/usb/r8152.c ocp_write_word(tp, MCU_TYPE_PLA, PLA_RMS, rms); tp 5466 drivers/net/usb/r8152.c r8153_set_rx_early_size(tp); tp 5469 drivers/net/usb/r8152.c mutex_unlock(&tp->control); tp 5471 drivers/net/usb/r8152.c usb_autopm_put_interface(tp->intf); tp 5490 drivers/net/usb/r8152.c static void rtl8152_unload(struct r8152 *tp) tp 5492 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 5495 drivers/net/usb/r8152.c if (tp->version != RTL_VER_01) tp 5496 drivers/net/usb/r8152.c r8152_power_cut_en(tp, true); tp 5499 drivers/net/usb/r8152.c static void rtl8153_unload(struct r8152 *tp) tp 5501 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 5504 drivers/net/usb/r8152.c r8153_power_cut_en(tp, false); tp 5507 drivers/net/usb/r8152.c static void rtl8153b_unload(struct r8152 *tp) tp 5509 drivers/net/usb/r8152.c if (test_bit(RTL8152_UNPLUG, &tp->flags)) tp 5512 drivers/net/usb/r8152.c r8153b_power_cut_en(tp, false); tp 5515 drivers/net/usb/r8152.c static int rtl_ops_init(struct r8152 *tp) tp 5517 drivers/net/usb/r8152.c struct rtl_ops *ops = &tp->rtl_ops; tp 5520 drivers/net/usb/r8152.c switch (tp->version) { tp 5535 drivers/net/usb/r8152.c tp->rx_buf_sz = 16 * 1024; tp 5536 drivers/net/usb/r8152.c tp->eee_en = true; tp 5537 drivers/net/usb/r8152.c tp->eee_adv = MDIO_EEE_100TX; tp 5555 drivers/net/usb/r8152.c tp->rx_buf_sz = 32 * 1024; tp 5556 drivers/net/usb/r8152.c tp->eee_en = true; tp 5557 drivers/net/usb/r8152.c tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX; tp 5573 drivers/net/usb/r8152.c tp->rx_buf_sz = 32 * 1024; tp 5574 drivers/net/usb/r8152.c tp->eee_en = true; tp 5575 drivers/net/usb/r8152.c tp->eee_adv = MDIO_EEE_1000T | MDIO_EEE_100TX; tp 5580 drivers/net/usb/r8152.c netif_err(tp, probe, tp->netdev, "Unknown Device\n"); tp 5651 drivers/net/usb/r8152.c struct r8152 *tp; tp 5674 drivers/net/usb/r8152.c tp = netdev_priv(netdev); tp 5675 drivers/net/usb/r8152.c tp->msg_enable = 0x7FFF; tp 5677 drivers/net/usb/r8152.c tp->udev = udev; tp 5678 drivers/net/usb/r8152.c tp->netdev = netdev; tp 5679 drivers/net/usb/r8152.c tp->intf = intf; tp 5680 drivers/net/usb/r8152.c tp->version = version; tp 5686 drivers/net/usb/r8152.c tp->mii.supports_gmii = 0; tp 5689 drivers/net/usb/r8152.c tp->mii.supports_gmii = 1; tp 5693 drivers/net/usb/r8152.c ret = rtl_ops_init(tp); tp 5697 drivers/net/usb/r8152.c mutex_init(&tp->control); tp 5698 drivers/net/usb/r8152.c INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t); tp 5699 drivers/net/usb/r8152.c INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t); tp 5700 drivers/net/usb/r8152.c tasklet_init(&tp->tx_tl, bottom_half, (unsigned long)tp); tp 5701 drivers/net/usb/r8152.c tasklet_disable(&tp->tx_tl); tp 5718 drivers/net/usb/r8152.c if (tp->version == RTL_VER_01) { tp 5726 drivers/net/usb/r8152.c set_bit(DELL_TB_RX_AGG_BUG, &tp->flags); tp 5734 drivers/net/usb/r8152.c switch (tp->version) { tp 5744 drivers/net/usb/r8152.c tp->mii.dev = netdev; tp 5745 drivers/net/usb/r8152.c tp->mii.mdio_read = read_mii_word; tp 5746 drivers/net/usb/r8152.c tp->mii.mdio_write = write_mii_word; tp 5747 drivers/net/usb/r8152.c tp->mii.phy_id_mask = 0x3f; tp 5748 drivers/net/usb/r8152.c tp->mii.reg_num_mask = 0x1f; tp 5749 drivers/net/usb/r8152.c tp->mii.phy_id = R8152_PHY_ID; tp 5751 drivers/net/usb/r8152.c tp->autoneg = AUTONEG_ENABLE; tp 5752 drivers/net/usb/r8152.c tp->speed = SPEED_100; tp 5753 drivers/net/usb/r8152.c tp->advertising = RTL_ADVERTISED_10_HALF | RTL_ADVERTISED_10_FULL | tp 5755 drivers/net/usb/r8152.c if (tp->mii.supports_gmii) { tp 5756 drivers/net/usb/r8152.c tp->speed = SPEED_1000; tp 5757 drivers/net/usb/r8152.c tp->advertising |= RTL_ADVERTISED_1000_FULL; tp 5759 drivers/net/usb/r8152.c tp->duplex = DUPLEX_FULL; tp 5761 drivers/net/usb/r8152.c tp->rx_copybreak = RTL8152_RXFG_HEADSZ; tp 5762 drivers/net/usb/r8152.c tp->rx_pending = 10 * RTL8152_MAX_RX; tp 5766 drivers/net/usb/r8152.c if (!rtl_can_wakeup(tp)) tp 5767 drivers/net/usb/r8152.c __rtl_set_wol(tp, 0); tp 5769 drivers/net/usb/r8152.c tp->saved_wolopts = __rtl_get_wol(tp); tp 5771 drivers/net/usb/r8152.c tp->rtl_ops.init(tp); tp 5772 drivers/net/usb/r8152.c queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); tp 5773 drivers/net/usb/r8152.c set_ethernet_addr(tp); tp 5775 drivers/net/usb/r8152.c usb_set_intfdata(intf, tp); tp 5776 drivers/net/usb/r8152.c netif_napi_add(netdev, &tp->napi, r8152_poll, RTL8152_NAPI_WEIGHT); tp 5780 drivers/net/usb/r8152.c netif_err(tp, probe, netdev, "couldn't register the device\n"); tp 5784 drivers/net/usb/r8152.c if (tp->saved_wolopts) tp 5789 drivers/net/usb/r8152.c netif_info(tp, probe, netdev, "%s\n", DRIVER_VERSION); tp 5794 drivers/net/usb/r8152.c tasklet_kill(&tp->tx_tl); tp 5803 drivers/net/usb/r8152.c struct r8152 *tp = usb_get_intfdata(intf); tp 5806 drivers/net/usb/r8152.c if (tp) { tp 5807 drivers/net/usb/r8152.c rtl_set_unplug(tp); tp 5809 drivers/net/usb/r8152.c unregister_netdev(tp->netdev); tp 5810 drivers/net/usb/r8152.c tasklet_kill(&tp->tx_tl); tp 5811 drivers/net/usb/r8152.c cancel_delayed_work_sync(&tp->hw_phy_work); tp 5812 drivers/net/usb/r8152.c tp->rtl_ops.unload(tp); tp 5813 drivers/net/usb/r8152.c free_netdev(tp->netdev); tp 346 drivers/net/wireless/marvell/mwifiex/sta_event.c struct mwifiex_tx_pause_tlv *tp; tp 349 drivers/net/wireless/marvell/mwifiex/sta_event.c tp = (void *)tlv; tp 352 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->peermac, tp->tx_pause, tp 353 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->pkt_cnt); tp 355 drivers/net/wireless/marvell/mwifiex/sta_event.c if (ether_addr_equal(tp->peermac, priv->netdev->dev_addr)) { tp 356 drivers/net/wireless/marvell/mwifiex/sta_event.c if (tp->tx_pause) tp 360 drivers/net/wireless/marvell/mwifiex/sta_event.c } else if (is_multicast_ether_addr(tp->peermac)) { tp 361 drivers/net/wireless/marvell/mwifiex/sta_event.c mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause); tp 364 drivers/net/wireless/marvell/mwifiex/sta_event.c sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); tp 365 drivers/net/wireless/marvell/mwifiex/sta_event.c if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { tp 366 drivers/net/wireless/marvell/mwifiex/sta_event.c sta_ptr->tx_pause = tp->tx_pause; tp 367 drivers/net/wireless/marvell/mwifiex/sta_event.c mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp 368 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->tx_pause); tp 377 drivers/net/wireless/marvell/mwifiex/sta_event.c struct mwifiex_tx_pause_tlv *tp; tp 381 drivers/net/wireless/marvell/mwifiex/sta_event.c tp = (void *)tlv; tp 384 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->peermac, tp->tx_pause, tp 385 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->pkt_cnt); tp 387 drivers/net/wireless/marvell/mwifiex/sta_event.c if (ether_addr_equal(tp->peermac, priv->cfg_bssid)) { tp 388 drivers/net/wireless/marvell/mwifiex/sta_event.c if (tp->tx_pause) tp 396 drivers/net/wireless/marvell/mwifiex/sta_event.c status = mwifiex_get_tdls_link_status(priv, tp->peermac); tp 399 drivers/net/wireless/marvell/mwifiex/sta_event.c sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac); tp 400 drivers/net/wireless/marvell/mwifiex/sta_event.c if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) { tp 401 drivers/net/wireless/marvell/mwifiex/sta_event.c sta_ptr->tx_pause = tp->tx_pause; tp 403 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->peermac, tp 404 drivers/net/wireless/marvell/mwifiex/sta_event.c tp->tx_pause); tp 213 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c struct ieee80211_channel *chan, s8 *tp) tp 239 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c *tp = target_power + mt76x0_get_delta(dev); tp 280 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c *tp = data >> (8 * idx); tp 281 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c if (*tp < 0 || *tp > 0x3f) tp 282 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c *tp = 5; tp 24 drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h struct ieee80211_channel *chan, s8 *tp); tp 265 drivers/net/wireless/mediatek/mt76/mt76x0/init.c s8 tp; tp 272 drivers/net/wireless/mediatek/mt76/mt76x0/init.c mt76x0_get_power_info(dev, chan, &tp); tp 274 drivers/net/wireless/mediatek/mt76/mt76x0/init.c chan->orig_mpwr = (mt76x02_get_max_rate_power(&t) + tp) / 2; tp 119 drivers/platform/x86/intel_mid_thermal.c static int adc_to_temp(int direct, uint16_t adc_val, int *tp) tp 126 drivers/platform/x86/intel_mid_thermal.c *tp = to_msic_die_temp(adc_val) * 1000; tp 148 drivers/platform/x86/intel_mid_thermal.c *tp = temp * 1000; tp 10079 drivers/platform/x86/thinkpad_acpi.c struct thinkpad_id_data *tp) tp 10086 drivers/platform/x86/thinkpad_acpi.c if (!tp) tp 10089 drivers/platform/x86/thinkpad_acpi.c memset(tp, 0, sizeof(*tp)); tp 10092 drivers/platform/x86/thinkpad_acpi.c tp->vendor = PCI_VENDOR_ID_IBM; tp 10094 drivers/platform/x86/thinkpad_acpi.c tp->vendor = PCI_VENDOR_ID_LENOVO; tp 10099 drivers/platform/x86/thinkpad_acpi.c tp->bios_version_str = kstrdup(s, GFP_KERNEL); tp 10100 drivers/platform/x86/thinkpad_acpi.c if (s && !tp->bios_version_str) tp 10104 drivers/platform/x86/thinkpad_acpi.c t = tpacpi_parse_fw_id(tp->bios_version_str, tp 10105 drivers/platform/x86/thinkpad_acpi.c &tp->bios_model, &tp->bios_release); tp 10131 drivers/platform/x86/thinkpad_acpi.c tp->ec_version_str = kstrdup(ec_fw_string, GFP_KERNEL); tp 10132 drivers/platform/x86/thinkpad_acpi.c if (!tp->ec_version_str) tp 10136 drivers/platform/x86/thinkpad_acpi.c &tp->ec_model, &tp->ec_release); tp 10146 drivers/platform/x86/thinkpad_acpi.c tp->model_str = kstrdup(s, GFP_KERNEL); tp 10147 drivers/platform/x86/thinkpad_acpi.c if (!tp->model_str) tp 10152 drivers/platform/x86/thinkpad_acpi.c tp->model_str = kstrdup(s, GFP_KERNEL); tp 10153 drivers/platform/x86/thinkpad_acpi.c if (!tp->model_str) tp 10159 drivers/platform/x86/thinkpad_acpi.c tp->nummodel_str = kstrdup(s, GFP_KERNEL); tp 10160 drivers/platform/x86/thinkpad_acpi.c if (s && !tp->nummodel_str) tp 89 drivers/ptp/ptp_clock.c static int ptp_clock_getres(struct posix_clock *pc, struct timespec64 *tp) tp 91 drivers/ptp/ptp_clock.c tp->tv_sec = 0; tp 92 drivers/ptp/ptp_clock.c tp->tv_nsec = 1; tp 96 drivers/ptp/ptp_clock.c static int ptp_clock_settime(struct posix_clock *pc, const struct timespec64 *tp) tp 100 drivers/ptp/ptp_clock.c return ptp->info->settime64(ptp->info, tp); tp 103 drivers/ptp/ptp_clock.c static int ptp_clock_gettime(struct posix_clock *pc, struct timespec64 *tp) tp 109 drivers/ptp/ptp_clock.c err = ptp->info->gettimex64(ptp->info, tp, NULL); tp 111 drivers/ptp/ptp_clock.c err = ptp->info->gettime64(ptp->info, tp); tp 128 drivers/s390/char/tty3270.c static void tty3270_set_timer(struct tty3270 *tp, int expires) tp 130 drivers/s390/char/tty3270.c mod_timer(&tp->timer, jiffies + expires); tp 137 drivers/s390/char/tty3270.c tty3270_update_prompt(struct tty3270 *tp, char *input, int count) tp 142 drivers/s390/char/tty3270.c line = tp->prompt; tp 146 drivers/s390/char/tty3270.c line->string[5] = tp->inattr; tp 147 drivers/s390/char/tty3270.c if (count > tp->view.cols * 2 - 11) tp 148 drivers/s390/char/tty3270.c count = tp->view.cols * 2 - 11; tp 152 drivers/s390/char/tty3270.c if (count < tp->view.cols * 2 - 11) { tp 155 drivers/s390/char/tty3270.c off = tp->view.cols * tp->view.rows - 9; tp 156 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, line->string+count+8, off); tp 160 drivers/s390/char/tty3270.c tp->update_flags |= TTY_UPDATE_INPUT; tp 164 drivers/s390/char/tty3270.c tty3270_create_prompt(struct tty3270 *tp) tp 173 drivers/s390/char/tty3270.c line = alloc_string(&tp->freemem, tp 174 drivers/s390/char/tty3270.c sizeof(blueprint) + tp->view.cols * 2 - 9); tp 175 drivers/s390/char/tty3270.c tp->prompt = line; tp 176 drivers/s390/char/tty3270.c tp->inattr = TF_INPUT; tp 181 drivers/s390/char/tty3270.c offset = tp->view.cols * (tp->view.rows - 2); tp 182 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, line->string + 1, offset); tp 183 drivers/s390/char/tty3270.c offset = tp->view.cols * tp->view.rows - 9; tp 184 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, line->string + 8, offset); tp 187 drivers/s390/char/tty3270.c tp->input = alloc_string(&tp->freemem, tp->view.cols * 2 - 9 + 6); tp 195 drivers/s390/char/tty3270.c tty3270_update_status(struct tty3270 * tp) tp 199 drivers/s390/char/tty3270.c str = (tp->nr_up != 0) ? "History" : "Running"; tp 200 drivers/s390/char/tty3270.c memcpy(tp->status->string + 8, str, 7); tp 201 drivers/s390/char/tty3270.c codepage_convert(tp->view.ascebc, tp->status->string + 8, 7); tp 202 drivers/s390/char/tty3270.c tp->update_flags |= TTY_UPDATE_STATUS; tp 206 drivers/s390/char/tty3270.c tty3270_create_status(struct tty3270 * tp) tp 215 drivers/s390/char/tty3270.c line = alloc_string(&tp->freemem,sizeof(blueprint)); tp 216 drivers/s390/char/tty3270.c tp->status = line; tp 220 drivers/s390/char/tty3270.c offset = tp->view.cols * tp->view.rows - 9; tp 221 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, line->string + 1, offset); tp 229 drivers/s390/char/tty3270.c tty3270_update_string(struct tty3270 *tp, struct string *line, int nr) tp 233 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, line->string + 1, tp 234 drivers/s390/char/tty3270.c tp->view.cols * nr); tp 237 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, cp + 1, tp 238 drivers/s390/char/tty3270.c tp->view.cols * (nr + 1)); tp 245 drivers/s390/char/tty3270.c tty3270_rebuild_update(struct tty3270 *tp) tp 254 drivers/s390/char/tty3270.c list_for_each_entry_safe(s, n, &tp->update, update) tp 256 drivers/s390/char/tty3270.c line = tp->view.rows - 3; tp 257 drivers/s390/char/tty3270.c nr_up = tp->nr_up; tp 258 drivers/s390/char/tty3270.c list_for_each_entry_reverse(s, &tp->lines, list) { tp 263 drivers/s390/char/tty3270.c tty3270_update_string(tp, s, line); tp 264 drivers/s390/char/tty3270.c list_add(&s->update, &tp->update); tp 268 drivers/s390/char/tty3270.c tp->update_flags |= TTY_UPDATE_LIST; tp 276 drivers/s390/char/tty3270.c tty3270_alloc_string(struct tty3270 *tp, size_t size) tp 280 drivers/s390/char/tty3270.c s = alloc_string(&tp->freemem, size); tp 283 drivers/s390/char/tty3270.c list_for_each_entry_safe(s, n, &tp->lines, list) { tp 284 drivers/s390/char/tty3270.c BUG_ON(tp->nr_lines <= tp->view.rows - 2); tp 288 drivers/s390/char/tty3270.c tp->nr_lines--; tp 289 drivers/s390/char/tty3270.c if (free_string(&tp->freemem, s) >= size) tp 292 drivers/s390/char/tty3270.c s = alloc_string(&tp->freemem, size); tp 294 drivers/s390/char/tty3270.c if (tp->nr_up != 0 && tp 295 drivers/s390/char/tty3270.c tp->nr_up + tp->view.rows - 2 >= tp->nr_lines) { tp 296 drivers/s390/char/tty3270.c tp->nr_up = tp->nr_lines - tp->view.rows + 2; tp 297 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 298 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 307 drivers/s390/char/tty3270.c tty3270_blank_line(struct tty3270 *tp) tp 314 drivers/s390/char/tty3270.c s = tty3270_alloc_string(tp, sizeof(blueprint)); tp 317 drivers/s390/char/tty3270.c list_add_tail(&s->list, &tp->lines); tp 318 drivers/s390/char/tty3270.c tp->nr_lines++; tp 319 drivers/s390/char/tty3270.c if (tp->nr_up != 0) tp 320 drivers/s390/char/tty3270.c tp->nr_up++; tp 327 drivers/s390/char/tty3270.c tty3270_blank_screen(struct tty3270 *tp) tp 332 drivers/s390/char/tty3270.c for (i = 0; i < tp->view.rows - 2; i++) tp 333 drivers/s390/char/tty3270.c tp->screen[i].len = 0; tp 334 drivers/s390/char/tty3270.c tp->nr_up = 0; tp 335 drivers/s390/char/tty3270.c list_for_each_entry_safe(s, n, &tp->lines, list) { tp 339 drivers/s390/char/tty3270.c tp->nr_lines--; tp 340 drivers/s390/char/tty3270.c free_string(&tp->freemem, s); tp 350 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(rq->view, struct tty3270, view); tp 354 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 355 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 358 drivers/s390/char/tty3270.c xchg(&tp->write, rq); tp 367 drivers/s390/char/tty3270.c struct tty3270 *tp = from_timer(tp, t, timer); tp 375 drivers/s390/char/tty3270.c wrq = xchg(&tp->write, 0); tp 377 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 381 drivers/s390/char/tty3270.c spin_lock(&tp->view.lock); tp 383 drivers/s390/char/tty3270.c if (tp->update_flags & TTY_UPDATE_ALL) { tp 384 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 385 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 386 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ERASE | TTY_UPDATE_LIST | tp 389 drivers/s390/char/tty3270.c if (tp->update_flags & TTY_UPDATE_ERASE) { tp 396 drivers/s390/char/tty3270.c raw3270_request_add_data(wrq, &tp->wcc, 1); tp 397 drivers/s390/char/tty3270.c tp->wcc = TW_NONE; tp 402 drivers/s390/char/tty3270.c if (tp->update_flags & TTY_UPDATE_STATUS) tp 403 drivers/s390/char/tty3270.c if (raw3270_request_add_data(wrq, tp->status->string, tp 404 drivers/s390/char/tty3270.c tp->status->len) == 0) tp 410 drivers/s390/char/tty3270.c if (tp->update_flags & TTY_UPDATE_INPUT) tp 411 drivers/s390/char/tty3270.c if (raw3270_request_add_data(wrq, tp->prompt->string, tp 412 drivers/s390/char/tty3270.c tp->prompt->len) == 0) tp 417 drivers/s390/char/tty3270.c if (tp->update_flags & TTY_UPDATE_LIST) { tp 419 drivers/s390/char/tty3270.c list_for_each_entry_safe(s, n, &tp->update, update) { tp 437 drivers/s390/char/tty3270.c if (list_empty(&tp->update)) tp 441 drivers/s390/char/tty3270.c rc = raw3270_start(&tp->view, wrq); tp 443 drivers/s390/char/tty3270.c tp->update_flags &= ~updated; tp 444 drivers/s390/char/tty3270.c if (tp->update_flags) tp 445 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 448 drivers/s390/char/tty3270.c xchg(&tp->write, wrq); tp 450 drivers/s390/char/tty3270.c spin_unlock(&tp->view.lock); tp 457 drivers/s390/char/tty3270.c tty3270_rcl_add(struct tty3270 *tp, char *input, int len) tp 461 drivers/s390/char/tty3270.c tp->rcl_walk = NULL; tp 464 drivers/s390/char/tty3270.c if (tp->rcl_nr >= tp->rcl_max) { tp 465 drivers/s390/char/tty3270.c s = list_entry(tp->rcl_lines.next, struct string, list); tp 467 drivers/s390/char/tty3270.c free_string(&tp->freemem, s); tp 468 drivers/s390/char/tty3270.c tp->rcl_nr--; tp 470 drivers/s390/char/tty3270.c s = tty3270_alloc_string(tp, len); tp 472 drivers/s390/char/tty3270.c list_add_tail(&s->list, &tp->rcl_lines); tp 473 drivers/s390/char/tty3270.c tp->rcl_nr++; tp 479 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(kbd->port, struct tty3270, port); tp 482 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 483 drivers/s390/char/tty3270.c if (tp->inattr == TF_INPUT) { tp 484 drivers/s390/char/tty3270.c if (tp->rcl_walk && tp->rcl_walk->prev != &tp->rcl_lines) tp 485 drivers/s390/char/tty3270.c tp->rcl_walk = tp->rcl_walk->prev; tp 486 drivers/s390/char/tty3270.c else if (!list_empty(&tp->rcl_lines)) tp 487 drivers/s390/char/tty3270.c tp->rcl_walk = tp->rcl_lines.prev; tp 488 drivers/s390/char/tty3270.c s = tp->rcl_walk ? tp 489 drivers/s390/char/tty3270.c list_entry(tp->rcl_walk, struct string, list) : NULL; tp 490 drivers/s390/char/tty3270.c if (tp->rcl_walk) { tp 491 drivers/s390/char/tty3270.c s = list_entry(tp->rcl_walk, struct string, list); tp 492 drivers/s390/char/tty3270.c tty3270_update_prompt(tp, s->string, s->len); tp 494 drivers/s390/char/tty3270.c tty3270_update_prompt(tp, NULL, 0); tp 495 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 497 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 506 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(kbd->port, struct tty3270, port); tp 508 drivers/s390/char/tty3270.c raw3270_deactivate_view(&tp->view); tp 517 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(kbd->port, struct tty3270, port); tp 520 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 521 drivers/s390/char/tty3270.c nr_up = tp->nr_up - tp->view.rows + 2; tp 524 drivers/s390/char/tty3270.c if (nr_up != tp->nr_up) { tp 525 drivers/s390/char/tty3270.c tp->nr_up = nr_up; tp 526 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 527 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 528 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 530 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 539 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(kbd->port, struct tty3270, port); tp 542 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 543 drivers/s390/char/tty3270.c nr_up = tp->nr_up + tp->view.rows - 2; tp 544 drivers/s390/char/tty3270.c if (nr_up + tp->view.rows - 2 > tp->nr_lines) tp 545 drivers/s390/char/tty3270.c nr_up = tp->nr_lines - tp->view.rows + 2; tp 546 drivers/s390/char/tty3270.c if (nr_up != tp->nr_up) { tp 547 drivers/s390/char/tty3270.c tp->nr_up = nr_up; tp 548 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 549 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 550 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 552 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 562 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(rrq->view, struct tty3270, view); tp 566 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 574 drivers/s390/char/tty3270.c if (tp->input->string[0] == 0x7d) { tp 576 drivers/s390/char/tty3270.c input = tp->input->string + 6; tp 577 drivers/s390/char/tty3270.c len = tp->input->len - 6 - rrq->rescnt; tp 578 drivers/s390/char/tty3270.c if (tp->inattr != TF_INPUTN) tp 579 drivers/s390/char/tty3270.c tty3270_rcl_add(tp, input, len); tp 580 drivers/s390/char/tty3270.c if (tp->nr_up > 0) { tp 581 drivers/s390/char/tty3270.c tp->nr_up = 0; tp 582 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 583 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 586 drivers/s390/char/tty3270.c tty3270_update_prompt(tp, NULL, 0); tp 587 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 588 drivers/s390/char/tty3270.c } else if (tp->input->string[0] == 0x6d) { tp 590 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 591 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 593 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 596 drivers/s390/char/tty3270.c raw3270_request_reset(tp->kreset); tp 597 drivers/s390/char/tty3270.c raw3270_request_set_cmd(tp->kreset, TC_WRITE); tp 598 drivers/s390/char/tty3270.c raw3270_request_add_data(tp->kreset, &kreset_data, 1); tp 599 drivers/s390/char/tty3270.c raw3270_start(&tp->view, tp->kreset); tp 602 drivers/s390/char/tty3270.c kbd_keycode(tp->kbd, *input++); tp 604 drivers/s390/char/tty3270.c kbd_keycode(tp->kbd, 256 + tp->input->string[0]); tp 607 drivers/s390/char/tty3270.c xchg(&tp->read, rrq); tp 608 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 617 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(rq->view, struct tty3270, view); tp 620 drivers/s390/char/tty3270.c tasklet_schedule(&tp->readlet); tp 627 drivers/s390/char/tty3270.c tty3270_issue_read(struct tty3270 *tp, int lock) tp 632 drivers/s390/char/tty3270.c rrq = xchg(&tp->read, 0); tp 637 drivers/s390/char/tty3270.c rrq->callback_data = tp; tp 639 drivers/s390/char/tty3270.c raw3270_request_set_data(rrq, tp->input->string, tp->input->len); tp 642 drivers/s390/char/tty3270.c rc = raw3270_start(&tp->view, rrq); tp 644 drivers/s390/char/tty3270.c rc = raw3270_start_irq(&tp->view, rrq); tp 647 drivers/s390/char/tty3270.c xchg(&tp->read, rrq); tp 655 drivers/s390/char/tty3270.c tty3270_hangup_tasklet(struct tty3270 *tp) tp 657 drivers/s390/char/tty3270.c tty_port_tty_hangup(&tp->port, true); tp 658 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 667 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(view, struct tty3270, view); tp 669 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 670 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 677 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(view, struct tty3270, view); tp 679 drivers/s390/char/tty3270.c del_timer(&tp->timer); tp 683 drivers/s390/char/tty3270.c tty3270_irq(struct tty3270 *tp, struct raw3270_request *rq, struct irb *irb) tp 687 drivers/s390/char/tty3270.c if (!tp->throttle) tp 688 drivers/s390/char/tty3270.c tty3270_issue_read(tp, 0); tp 690 drivers/s390/char/tty3270.c tp->attn = 1; tp 696 drivers/s390/char/tty3270.c raw3270_get_view(&tp->view); tp 697 drivers/s390/char/tty3270.c tasklet_schedule(&tp->hanglet); tp 704 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 705 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 715 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 718 drivers/s390/char/tty3270.c tp = kzalloc(sizeof(struct tty3270), GFP_KERNEL); tp 719 drivers/s390/char/tty3270.c if (!tp) tp 721 drivers/s390/char/tty3270.c tp->freemem_pages = tp 724 drivers/s390/char/tty3270.c if (!tp->freemem_pages) tp 726 drivers/s390/char/tty3270.c INIT_LIST_HEAD(&tp->freemem); tp 727 drivers/s390/char/tty3270.c INIT_LIST_HEAD(&tp->lines); tp 728 drivers/s390/char/tty3270.c INIT_LIST_HEAD(&tp->update); tp 729 drivers/s390/char/tty3270.c INIT_LIST_HEAD(&tp->rcl_lines); tp 730 drivers/s390/char/tty3270.c tp->rcl_max = 20; tp 733 drivers/s390/char/tty3270.c tp->freemem_pages[pages] = (void *) tp 735 drivers/s390/char/tty3270.c if (!tp->freemem_pages[pages]) tp 737 drivers/s390/char/tty3270.c add_string_memory(&tp->freemem, tp 738 drivers/s390/char/tty3270.c tp->freemem_pages[pages], PAGE_SIZE); tp 740 drivers/s390/char/tty3270.c tp->write = raw3270_request_alloc(TTY3270_OUTPUT_BUFFER_SIZE); tp 741 drivers/s390/char/tty3270.c if (IS_ERR(tp->write)) tp 743 drivers/s390/char/tty3270.c tp->read = raw3270_request_alloc(0); tp 744 drivers/s390/char/tty3270.c if (IS_ERR(tp->read)) tp 746 drivers/s390/char/tty3270.c tp->kreset = raw3270_request_alloc(1); tp 747 drivers/s390/char/tty3270.c if (IS_ERR(tp->kreset)) tp 749 drivers/s390/char/tty3270.c tp->kbd = kbd_alloc(); tp 750 drivers/s390/char/tty3270.c if (!tp->kbd) tp 753 drivers/s390/char/tty3270.c tty_port_init(&tp->port); tp 754 drivers/s390/char/tty3270.c timer_setup(&tp->timer, tty3270_update, 0); tp 755 drivers/s390/char/tty3270.c tasklet_init(&tp->readlet, tp 757 drivers/s390/char/tty3270.c (unsigned long) tp->read); tp 758 drivers/s390/char/tty3270.c tasklet_init(&tp->hanglet, tp 760 drivers/s390/char/tty3270.c (unsigned long) tp); tp 761 drivers/s390/char/tty3270.c INIT_WORK(&tp->resize_work, tty3270_resize_work); tp 763 drivers/s390/char/tty3270.c return tp; tp 766 drivers/s390/char/tty3270.c raw3270_request_free(tp->kreset); tp 768 drivers/s390/char/tty3270.c raw3270_request_free(tp->read); tp 770 drivers/s390/char/tty3270.c raw3270_request_free(tp->write); tp 773 drivers/s390/char/tty3270.c free_pages((unsigned long) tp->freemem_pages[pages], 0); tp 774 drivers/s390/char/tty3270.c kfree(tp->freemem_pages); tp 775 drivers/s390/char/tty3270.c tty_port_destroy(&tp->port); tp 777 drivers/s390/char/tty3270.c kfree(tp); tp 786 drivers/s390/char/tty3270.c tty3270_free_view(struct tty3270 *tp) tp 790 drivers/s390/char/tty3270.c kbd_free(tp->kbd); tp 791 drivers/s390/char/tty3270.c raw3270_request_free(tp->kreset); tp 792 drivers/s390/char/tty3270.c raw3270_request_free(tp->read); tp 793 drivers/s390/char/tty3270.c raw3270_request_free(tp->write); tp 795 drivers/s390/char/tty3270.c free_pages((unsigned long) tp->freemem_pages[pages], 0); tp 796 drivers/s390/char/tty3270.c kfree(tp->freemem_pages); tp 797 drivers/s390/char/tty3270.c tty_port_destroy(&tp->port); tp 798 drivers/s390/char/tty3270.c kfree(tp); tp 848 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(work, struct tty3270, resize_work); tp 854 drivers/s390/char/tty3270.c screen = tty3270_alloc_screen(tp->n_rows, tp->n_cols); tp 858 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 859 drivers/s390/char/tty3270.c tty3270_blank_screen(tp); tp 860 drivers/s390/char/tty3270.c oscreen = tp->screen; tp 861 drivers/s390/char/tty3270.c orows = tp->view.rows; tp 862 drivers/s390/char/tty3270.c tp->view.model = tp->n_model; tp 863 drivers/s390/char/tty3270.c tp->view.rows = tp->n_rows; tp 864 drivers/s390/char/tty3270.c tp->view.cols = tp->n_cols; tp 865 drivers/s390/char/tty3270.c tp->screen = screen; tp 866 drivers/s390/char/tty3270.c free_string(&tp->freemem, tp->prompt); tp 867 drivers/s390/char/tty3270.c free_string(&tp->freemem, tp->status); tp 868 drivers/s390/char/tty3270.c tty3270_create_prompt(tp); tp 869 drivers/s390/char/tty3270.c tty3270_create_status(tp); tp 870 drivers/s390/char/tty3270.c while (tp->nr_lines < tp->view.rows - 2) tp 871 drivers/s390/char/tty3270.c tty3270_blank_line(tp); tp 872 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 873 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 875 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 877 drivers/s390/char/tty3270.c tty = tty_port_tty_get(&tp->port); tp 880 drivers/s390/char/tty3270.c ws.ws_row = tp->view.rows - 2; tp 881 drivers/s390/char/tty3270.c ws.ws_col = tp->view.cols; tp 889 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(view, struct tty3270, view); tp 891 drivers/s390/char/tty3270.c if (tp->n_model == model && tp->n_rows == rows && tp->n_cols == cols) tp 893 drivers/s390/char/tty3270.c tp->n_model = model; tp 894 drivers/s390/char/tty3270.c tp->n_rows = rows; tp 895 drivers/s390/char/tty3270.c tp->n_cols = cols; tp 896 drivers/s390/char/tty3270.c schedule_work(&tp->resize_work); tp 905 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(view, struct tty3270, view); tp 906 drivers/s390/char/tty3270.c struct tty_struct *tty = tty_port_tty_get(&tp->port); tp 910 drivers/s390/char/tty3270.c tty_port_tty_set(&tp->port, NULL); tp 912 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 923 drivers/s390/char/tty3270.c struct tty3270 *tp = container_of(view, struct tty3270, view); tp 925 drivers/s390/char/tty3270.c del_timer_sync(&tp->timer); tp 926 drivers/s390/char/tty3270.c tty3270_free_screen(tp->screen, tp->view.rows); tp 927 drivers/s390/char/tty3270.c tty3270_free_view(tp); tp 960 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 966 drivers/s390/char/tty3270.c tp = container_of(view, struct tty3270, view); tp 967 drivers/s390/char/tty3270.c tty->driver_data = tp; tp 968 drivers/s390/char/tty3270.c tty->winsize.ws_row = tp->view.rows - 2; tp 969 drivers/s390/char/tty3270.c tty->winsize.ws_col = tp->view.cols; tp 970 drivers/s390/char/tty3270.c tp->port.low_latency = 0; tp 971 drivers/s390/char/tty3270.c tp->inattr = TF_INPUT; tp 978 drivers/s390/char/tty3270.c tp = tty3270_alloc_view(); tp 979 drivers/s390/char/tty3270.c if (IS_ERR(tp)) tp 980 drivers/s390/char/tty3270.c return PTR_ERR(tp); tp 982 drivers/s390/char/tty3270.c rc = raw3270_add_view(&tp->view, &tty3270_fn, tp 986 drivers/s390/char/tty3270.c tty3270_free_view(tp); tp 990 drivers/s390/char/tty3270.c tp->screen = tty3270_alloc_screen(tp->view.rows, tp->view.cols); tp 991 drivers/s390/char/tty3270.c if (IS_ERR(tp->screen)) { tp 992 drivers/s390/char/tty3270.c rc = PTR_ERR(tp->screen); tp 993 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 994 drivers/s390/char/tty3270.c raw3270_del_view(&tp->view); tp 995 drivers/s390/char/tty3270.c tty3270_free_view(tp); tp 999 drivers/s390/char/tty3270.c tp->port.low_latency = 0; tp 1000 drivers/s390/char/tty3270.c tty->winsize.ws_row = tp->view.rows - 2; tp 1001 drivers/s390/char/tty3270.c tty->winsize.ws_col = tp->view.cols; tp 1003 drivers/s390/char/tty3270.c tty3270_create_prompt(tp); tp 1004 drivers/s390/char/tty3270.c tty3270_create_status(tp); tp 1005 drivers/s390/char/tty3270.c tty3270_update_status(tp); tp 1008 drivers/s390/char/tty3270.c for (i = 0; i < tp->view.rows - 2; i++) tp 1009 drivers/s390/char/tty3270.c tty3270_blank_line(tp); tp 1011 drivers/s390/char/tty3270.c tp->kbd->port = &tp->port; tp 1012 drivers/s390/char/tty3270.c tp->kbd->fn_handler[KVAL(K_INCRCONSOLE)] = tty3270_exit_tty; tp 1013 drivers/s390/char/tty3270.c tp->kbd->fn_handler[KVAL(K_SCROLLBACK)] = tty3270_scroll_backward; tp 1014 drivers/s390/char/tty3270.c tp->kbd->fn_handler[KVAL(K_SCROLLFORW)] = tty3270_scroll_forward; tp 1015 drivers/s390/char/tty3270.c tp->kbd->fn_handler[KVAL(K_CONS)] = tty3270_rcl_backward; tp 1016 drivers/s390/char/tty3270.c kbd_ascebc(tp->kbd, tp->view.ascebc); tp 1018 drivers/s390/char/tty3270.c raw3270_activate_view(&tp->view); tp 1021 drivers/s390/char/tty3270.c rc = tty_port_install(&tp->port, driver, tty); tp 1023 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 1027 drivers/s390/char/tty3270.c tty->driver_data = tp; tp 1038 drivers/s390/char/tty3270.c struct tty3270 *tp = tty->driver_data; tp 1039 drivers/s390/char/tty3270.c struct tty_port *port = &tp->port; tp 1053 drivers/s390/char/tty3270.c struct tty3270 *tp = tty->driver_data; tp 1057 drivers/s390/char/tty3270.c if (tp) tp 1058 drivers/s390/char/tty3270.c tty_port_tty_set(&tp->port, NULL); tp 1063 drivers/s390/char/tty3270.c struct tty3270 *tp = tty->driver_data; tp 1065 drivers/s390/char/tty3270.c if (tp) { tp 1067 drivers/s390/char/tty3270.c raw3270_put_view(&tp->view); tp 1084 drivers/s390/char/tty3270.c static void tty3270_put_character(struct tty3270 *tp, char ch) tp 1089 drivers/s390/char/tty3270.c line = tp->screen + tp->cy; tp 1090 drivers/s390/char/tty3270.c if (line->len <= tp->cx) { tp 1091 drivers/s390/char/tty3270.c while (line->len < tp->cx) { tp 1093 drivers/s390/char/tty3270.c cell->character = tp->view.ascebc[' ']; tp 1094 drivers/s390/char/tty3270.c cell->highlight = tp->highlight; tp 1095 drivers/s390/char/tty3270.c cell->f_color = tp->f_color; tp 1100 drivers/s390/char/tty3270.c cell = line->cells + tp->cx; tp 1101 drivers/s390/char/tty3270.c cell->character = tp->view.ascebc[(unsigned int) ch]; tp 1102 drivers/s390/char/tty3270.c cell->highlight = tp->highlight; tp 1103 drivers/s390/char/tty3270.c cell->f_color = tp->f_color; tp 1110 drivers/s390/char/tty3270.c tty3270_convert_line(struct tty3270 *tp, int line_nr) tp 1122 drivers/s390/char/tty3270.c line = tp->screen + line_nr; tp 1140 drivers/s390/char/tty3270.c if (line->len < tp->view.cols) tp 1144 drivers/s390/char/tty3270.c i = tp->view.rows - 2 - line_nr; tp 1145 drivers/s390/char/tty3270.c list_for_each_entry_reverse(s, &tp->lines, list) tp 1153 drivers/s390/char/tty3270.c n = tty3270_alloc_string(tp, flen); tp 1158 drivers/s390/char/tty3270.c free_string(&tp->freemem, s); tp 1195 drivers/s390/char/tty3270.c if (line->len < tp->view.cols) { tp 1202 drivers/s390/char/tty3270.c if (tp->nr_up + line_nr < tp->view.rows - 2) { tp 1204 drivers/s390/char/tty3270.c tty3270_update_string(tp, s, line_nr); tp 1207 drivers/s390/char/tty3270.c list_add_tail(&s->update, &tp->update); tp 1208 drivers/s390/char/tty3270.c tp->update_flags |= TTY_UPDATE_LIST; tp 1217 drivers/s390/char/tty3270.c tty3270_cr(struct tty3270 *tp) tp 1219 drivers/s390/char/tty3270.c tp->cx = 0; tp 1226 drivers/s390/char/tty3270.c tty3270_lf(struct tty3270 *tp) tp 1231 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1232 drivers/s390/char/tty3270.c if (tp->cy < tp->view.rows - 3) { tp 1233 drivers/s390/char/tty3270.c tp->cy++; tp 1237 drivers/s390/char/tty3270.c tty3270_blank_line(tp); tp 1238 drivers/s390/char/tty3270.c temp = tp->screen[0]; tp 1240 drivers/s390/char/tty3270.c for (i = 0; i < tp->view.rows - 3; i++) tp 1241 drivers/s390/char/tty3270.c tp->screen[i] = tp->screen[i+1]; tp 1242 drivers/s390/char/tty3270.c tp->screen[tp->view.rows - 3] = temp; tp 1243 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 1247 drivers/s390/char/tty3270.c tty3270_ri(struct tty3270 *tp) tp 1249 drivers/s390/char/tty3270.c if (tp->cy > 0) { tp 1250 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1251 drivers/s390/char/tty3270.c tp->cy--; tp 1259 drivers/s390/char/tty3270.c tty3270_insert_characters(struct tty3270 *tp, int n) tp 1264 drivers/s390/char/tty3270.c line = tp->screen + tp->cy; tp 1265 drivers/s390/char/tty3270.c while (line->len < tp->cx) { tp 1266 drivers/s390/char/tty3270.c line->cells[line->len].character = tp->view.ascebc[' ']; tp 1271 drivers/s390/char/tty3270.c if (n > tp->view.cols - tp->cx) tp 1272 drivers/s390/char/tty3270.c n = tp->view.cols - tp->cx; tp 1273 drivers/s390/char/tty3270.c k = min_t(int, line->len - tp->cx, tp->view.cols - tp->cx - n); tp 1275 drivers/s390/char/tty3270.c line->cells[tp->cx + n + k] = line->cells[tp->cx + k]; tp 1277 drivers/s390/char/tty3270.c if (line->len > tp->view.cols) tp 1278 drivers/s390/char/tty3270.c line->len = tp->view.cols; tp 1280 drivers/s390/char/tty3270.c line->cells[tp->cx + n].character = tp->view.ascebc[' ']; tp 1281 drivers/s390/char/tty3270.c line->cells[tp->cx + n].highlight = tp->highlight; tp 1282 drivers/s390/char/tty3270.c line->cells[tp->cx + n].f_color = tp->f_color; tp 1290 drivers/s390/char/tty3270.c tty3270_delete_characters(struct tty3270 *tp, int n) tp 1295 drivers/s390/char/tty3270.c line = tp->screen + tp->cy; tp 1296 drivers/s390/char/tty3270.c if (line->len <= tp->cx) tp 1298 drivers/s390/char/tty3270.c if (line->len - tp->cx <= n) { tp 1299 drivers/s390/char/tty3270.c line->len = tp->cx; tp 1302 drivers/s390/char/tty3270.c for (i = tp->cx; i + n < line->len; i++) tp 1311 drivers/s390/char/tty3270.c tty3270_erase_characters(struct tty3270 *tp, int n) tp 1316 drivers/s390/char/tty3270.c line = tp->screen + tp->cy; tp 1317 drivers/s390/char/tty3270.c while (line->len > tp->cx && n-- > 0) { tp 1318 drivers/s390/char/tty3270.c cell = line->cells + tp->cx++; tp 1323 drivers/s390/char/tty3270.c tp->cx += n; tp 1324 drivers/s390/char/tty3270.c tp->cx = min_t(int, tp->cx, tp->view.cols - 1); tp 1334 drivers/s390/char/tty3270.c tty3270_erase_line(struct tty3270 *tp, int mode) tp 1340 drivers/s390/char/tty3270.c line = tp->screen + tp->cy; tp 1342 drivers/s390/char/tty3270.c line->len = tp->cx; tp 1344 drivers/s390/char/tty3270.c for (i = 0; i < tp->cx; i++) { tp 1350 drivers/s390/char/tty3270.c if (line->len <= tp->cx) tp 1351 drivers/s390/char/tty3270.c line->len = tp->cx + 1; tp 1354 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1364 drivers/s390/char/tty3270.c tty3270_erase_display(struct tty3270 *tp, int mode) tp 1369 drivers/s390/char/tty3270.c tty3270_erase_line(tp, 0); tp 1370 drivers/s390/char/tty3270.c for (i = tp->cy + 1; i < tp->view.rows - 2; i++) { tp 1371 drivers/s390/char/tty3270.c tp->screen[i].len = 0; tp 1372 drivers/s390/char/tty3270.c tty3270_convert_line(tp, i); tp 1375 drivers/s390/char/tty3270.c for (i = 0; i < tp->cy; i++) { tp 1376 drivers/s390/char/tty3270.c tp->screen[i].len = 0; tp 1377 drivers/s390/char/tty3270.c tty3270_convert_line(tp, i); tp 1379 drivers/s390/char/tty3270.c tty3270_erase_line(tp, 1); tp 1381 drivers/s390/char/tty3270.c for (i = 0; i < tp->view.rows - 2; i++) { tp 1382 drivers/s390/char/tty3270.c tp->screen[i].len = 0; tp 1383 drivers/s390/char/tty3270.c tty3270_convert_line(tp, i); tp 1386 drivers/s390/char/tty3270.c tty3270_rebuild_update(tp); tp 1394 drivers/s390/char/tty3270.c tty3270_set_attributes(struct tty3270 *tp) tp 1402 drivers/s390/char/tty3270.c for (i = 0; i <= tp->esc_npar; i++) { tp 1403 drivers/s390/char/tty3270.c attr = tp->esc_par[i]; tp 1406 drivers/s390/char/tty3270.c tp->highlight = TAX_RESET; tp 1407 drivers/s390/char/tty3270.c tp->f_color = TAC_RESET; tp 1411 drivers/s390/char/tty3270.c tp->highlight = TAX_UNDER; tp 1414 drivers/s390/char/tty3270.c tp->highlight = TAX_BLINK; tp 1417 drivers/s390/char/tty3270.c tp->highlight = TAX_REVER; tp 1420 drivers/s390/char/tty3270.c if (tp->highlight == TAX_UNDER) tp 1421 drivers/s390/char/tty3270.c tp->highlight = TAX_RESET; tp 1424 drivers/s390/char/tty3270.c if (tp->highlight == TAX_BLINK) tp 1425 drivers/s390/char/tty3270.c tp->highlight = TAX_RESET; tp 1428 drivers/s390/char/tty3270.c if (tp->highlight == TAX_REVER) tp 1429 drivers/s390/char/tty3270.c tp->highlight = TAX_RESET; tp 1441 drivers/s390/char/tty3270.c tp->f_color = f_colors[attr - 30]; tp 1448 drivers/s390/char/tty3270.c tty3270_getpar(struct tty3270 *tp, int ix) tp 1450 drivers/s390/char/tty3270.c return (tp->esc_par[ix] > 0) ? tp->esc_par[ix] : 1; tp 1454 drivers/s390/char/tty3270.c tty3270_goto_xy(struct tty3270 *tp, int cx, int cy) tp 1459 drivers/s390/char/tty3270.c tp->cx = min_t(int, tp->view.cols - 1, max_cx); tp 1460 drivers/s390/char/tty3270.c cy = min_t(int, tp->view.rows - 3, max_cy); tp 1461 drivers/s390/char/tty3270.c if (cy != tp->cy) { tp 1462 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1463 drivers/s390/char/tty3270.c tp->cy = cy; tp 1488 drivers/s390/char/tty3270.c tty3270_escape_sequence(struct tty3270 *tp, char ch) tp 1492 drivers/s390/char/tty3270.c if (tp->esc_state == ESnormal) { tp 1495 drivers/s390/char/tty3270.c tp->esc_state = ESesc; tp 1498 drivers/s390/char/tty3270.c if (tp->esc_state == ESesc) { tp 1499 drivers/s390/char/tty3270.c tp->esc_state = ESnormal; tp 1502 drivers/s390/char/tty3270.c tp->esc_state = ESsquare; tp 1505 drivers/s390/char/tty3270.c tty3270_cr(tp); tp 1506 drivers/s390/char/tty3270.c tty3270_lf(tp); tp 1509 drivers/s390/char/tty3270.c tty3270_ri(tp); tp 1512 drivers/s390/char/tty3270.c tty3270_lf(tp); tp 1515 drivers/s390/char/tty3270.c kbd_puts_queue(&tp->port, "\033[?6c"); tp 1518 drivers/s390/char/tty3270.c tp->saved_cx = tp->cx; tp 1519 drivers/s390/char/tty3270.c tp->saved_cy = tp->cy; tp 1520 drivers/s390/char/tty3270.c tp->saved_highlight = tp->highlight; tp 1521 drivers/s390/char/tty3270.c tp->saved_f_color = tp->f_color; tp 1524 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1525 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->saved_cx, tp->saved_cy); tp 1526 drivers/s390/char/tty3270.c tp->highlight = tp->saved_highlight; tp 1527 drivers/s390/char/tty3270.c tp->f_color = tp->saved_f_color; tp 1530 drivers/s390/char/tty3270.c tp->cx = tp->saved_cx = 0; tp 1531 drivers/s390/char/tty3270.c tp->cy = tp->saved_cy = 0; tp 1532 drivers/s390/char/tty3270.c tp->highlight = tp->saved_highlight = TAX_RESET; tp 1533 drivers/s390/char/tty3270.c tp->f_color = tp->saved_f_color = TAC_RESET; tp 1534 drivers/s390/char/tty3270.c tty3270_erase_display(tp, 2); tp 1539 drivers/s390/char/tty3270.c if (tp->esc_state == ESsquare) { tp 1540 drivers/s390/char/tty3270.c tp->esc_state = ESgetpars; tp 1541 drivers/s390/char/tty3270.c memset(tp->esc_par, 0, sizeof(tp->esc_par)); tp 1542 drivers/s390/char/tty3270.c tp->esc_npar = 0; tp 1543 drivers/s390/char/tty3270.c tp->esc_ques = (ch == '?'); tp 1544 drivers/s390/char/tty3270.c if (tp->esc_ques) tp 1547 drivers/s390/char/tty3270.c if (tp->esc_state == ESgetpars) { tp 1548 drivers/s390/char/tty3270.c if (ch == ';' && tp->esc_npar < ESCAPE_NPAR - 1) { tp 1549 drivers/s390/char/tty3270.c tp->esc_npar++; tp 1553 drivers/s390/char/tty3270.c tp->esc_par[tp->esc_npar] *= 10; tp 1554 drivers/s390/char/tty3270.c tp->esc_par[tp->esc_npar] += ch - '0'; tp 1558 drivers/s390/char/tty3270.c tp->esc_state = ESnormal; tp 1559 drivers/s390/char/tty3270.c if (ch == 'n' && !tp->esc_ques) { tp 1560 drivers/s390/char/tty3270.c if (tp->esc_par[0] == 5) /* Status report. */ tp 1561 drivers/s390/char/tty3270.c kbd_puts_queue(&tp->port, "\033[0n"); tp 1562 drivers/s390/char/tty3270.c else if (tp->esc_par[0] == 6) { /* Cursor report. */ tp 1564 drivers/s390/char/tty3270.c sprintf(buf, "\033[%d;%dR", tp->cy + 1, tp->cx + 1); tp 1565 drivers/s390/char/tty3270.c kbd_puts_queue(&tp->port, buf); tp 1569 drivers/s390/char/tty3270.c if (tp->esc_ques) tp 1573 drivers/s390/char/tty3270.c tty3270_set_attributes(tp); tp 1577 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tty3270_getpar(tp, 1) - 1, tp 1578 drivers/s390/char/tty3270.c tty3270_getpar(tp, 0) - 1); tp 1581 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->cx, tty3270_getpar(tp, 0) - 1); tp 1585 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->cx, tp->cy - tty3270_getpar(tp, 0)); tp 1590 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->cx, tp->cy + tty3270_getpar(tp, 0)); tp 1594 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->cx + tty3270_getpar(tp, 0), tp->cy); tp 1597 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->cx - tty3270_getpar(tp, 0), tp->cy); tp 1601 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tty3270_getpar(tp, 0), tp->cy); tp 1604 drivers/s390/char/tty3270.c tty3270_erase_characters(tp, tty3270_getpar(tp, 0)); tp 1607 drivers/s390/char/tty3270.c tty3270_erase_display(tp, tp->esc_par[0]); tp 1610 drivers/s390/char/tty3270.c tty3270_erase_line(tp, tp->esc_par[0]); tp 1613 drivers/s390/char/tty3270.c tty3270_delete_characters(tp, tty3270_getpar(tp, 0)); tp 1616 drivers/s390/char/tty3270.c tty3270_insert_characters(tp, tty3270_getpar(tp, 0)); tp 1619 drivers/s390/char/tty3270.c tp->saved_cx = tp->cx; tp 1620 drivers/s390/char/tty3270.c tp->saved_cy = tp->cy; tp 1621 drivers/s390/char/tty3270.c tp->saved_highlight = tp->highlight; tp 1622 drivers/s390/char/tty3270.c tp->saved_f_color = tp->f_color; tp 1625 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1626 drivers/s390/char/tty3270.c tty3270_goto_xy(tp, tp->saved_cx, tp->saved_cy); tp 1627 drivers/s390/char/tty3270.c tp->highlight = tp->saved_highlight; tp 1628 drivers/s390/char/tty3270.c tp->f_color = tp->saved_f_color; tp 1637 drivers/s390/char/tty3270.c tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty, tp 1642 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 1644 drivers/s390/char/tty3270.c if (tp->esc_state != 0) { tp 1646 drivers/s390/char/tty3270.c tty3270_escape_sequence(tp, buf[i_msg]); tp 1652 drivers/s390/char/tty3270.c tp->wcc |= TW_PLUSALARM; tp 1655 drivers/s390/char/tty3270.c if (tp->cx > 0) { tp 1656 drivers/s390/char/tty3270.c tp->cx--; tp 1657 drivers/s390/char/tty3270.c tty3270_put_character(tp, ' '); tp 1661 drivers/s390/char/tty3270.c for (i = tp->cx % 8; i < 8; i++) { tp 1662 drivers/s390/char/tty3270.c if (tp->cx >= tp->view.cols) { tp 1663 drivers/s390/char/tty3270.c tty3270_cr(tp); tp 1664 drivers/s390/char/tty3270.c tty3270_lf(tp); tp 1667 drivers/s390/char/tty3270.c tty3270_put_character(tp, ' '); tp 1668 drivers/s390/char/tty3270.c tp->cx++; tp 1672 drivers/s390/char/tty3270.c tty3270_cr(tp); tp 1673 drivers/s390/char/tty3270.c tty3270_lf(tp); tp 1676 drivers/s390/char/tty3270.c tty3270_erase_display(tp, 2); tp 1677 drivers/s390/char/tty3270.c tp->cx = tp->cy = 0; tp 1680 drivers/s390/char/tty3270.c tp->cx = 0; tp 1685 drivers/s390/char/tty3270.c tty3270_escape_sequence(tp, buf[i_msg]); tp 1688 drivers/s390/char/tty3270.c if (tp->cx >= tp->view.cols) { tp 1689 drivers/s390/char/tty3270.c tty3270_cr(tp); tp 1690 drivers/s390/char/tty3270.c tty3270_lf(tp); tp 1692 drivers/s390/char/tty3270.c tty3270_put_character(tp, buf[i_msg]); tp 1693 drivers/s390/char/tty3270.c tp->cx++; tp 1698 drivers/s390/char/tty3270.c tty3270_convert_line(tp, tp->cy); tp 1701 drivers/s390/char/tty3270.c if (!timer_pending(&tp->timer)) tp 1702 drivers/s390/char/tty3270.c tty3270_set_timer(tp, HZ/10); tp 1704 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 1714 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1716 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1717 drivers/s390/char/tty3270.c if (!tp) tp 1719 drivers/s390/char/tty3270.c if (tp->char_count > 0) { tp 1720 drivers/s390/char/tty3270.c tty3270_do_write(tp, tty, tp->char_buf, tp->char_count); tp 1721 drivers/s390/char/tty3270.c tp->char_count = 0; tp 1723 drivers/s390/char/tty3270.c tty3270_do_write(tp, tty, buf, count); tp 1732 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1734 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1735 drivers/s390/char/tty3270.c if (!tp || tp->char_count >= TTY3270_CHAR_BUF_SIZE) tp 1737 drivers/s390/char/tty3270.c tp->char_buf[tp->char_count++] = ch; tp 1748 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1750 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1751 drivers/s390/char/tty3270.c if (!tp) tp 1753 drivers/s390/char/tty3270.c if (tp->char_count > 0) { tp 1754 drivers/s390/char/tty3270.c tty3270_do_write(tp, tty, tp->char_buf, tp->char_count); tp 1755 drivers/s390/char/tty3270.c tp->char_count = 0; tp 1781 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1784 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1785 drivers/s390/char/tty3270.c if (!tp) tp 1787 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 1790 drivers/s390/char/tty3270.c if (new != tp->inattr) { tp 1791 drivers/s390/char/tty3270.c tp->inattr = new; tp 1792 drivers/s390/char/tty3270.c tty3270_update_prompt(tp, NULL, 0); tp 1793 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 1796 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 1805 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1807 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1808 drivers/s390/char/tty3270.c if (!tp) tp 1810 drivers/s390/char/tty3270.c tp->throttle = 1; tp 1819 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1821 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1822 drivers/s390/char/tty3270.c if (!tp) tp 1824 drivers/s390/char/tty3270.c tp->throttle = 0; tp 1825 drivers/s390/char/tty3270.c if (tp->attn) tp 1826 drivers/s390/char/tty3270.c tty3270_issue_read(tp, 1); tp 1835 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1837 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1838 drivers/s390/char/tty3270.c if (!tp) tp 1840 drivers/s390/char/tty3270.c spin_lock_bh(&tp->view.lock); tp 1841 drivers/s390/char/tty3270.c tp->cx = tp->saved_cx = 0; tp 1842 drivers/s390/char/tty3270.c tp->cy = tp->saved_cy = 0; tp 1843 drivers/s390/char/tty3270.c tp->highlight = tp->saved_highlight = TAX_RESET; tp 1844 drivers/s390/char/tty3270.c tp->f_color = tp->saved_f_color = TAC_RESET; tp 1845 drivers/s390/char/tty3270.c tty3270_blank_screen(tp); tp 1846 drivers/s390/char/tty3270.c while (tp->nr_lines < tp->view.rows - 2) tp 1847 drivers/s390/char/tty3270.c tty3270_blank_line(tp); tp 1848 drivers/s390/char/tty3270.c tp->update_flags = TTY_UPDATE_ALL; tp 1849 drivers/s390/char/tty3270.c spin_unlock_bh(&tp->view.lock); tp 1850 drivers/s390/char/tty3270.c tty3270_set_timer(tp, 1); tp 1861 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1863 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1864 drivers/s390/char/tty3270.c if (!tp) tp 1868 drivers/s390/char/tty3270.c return kbd_ioctl(tp->kbd, cmd, arg); tp 1875 drivers/s390/char/tty3270.c struct tty3270 *tp; tp 1877 drivers/s390/char/tty3270.c tp = tty->driver_data; tp 1878 drivers/s390/char/tty3270.c if (!tp) tp 1882 drivers/s390/char/tty3270.c return kbd_ioctl(tp->kbd, cmd, (unsigned long)compat_ptr(arg)); tp 120 drivers/sbus/char/bbc_envctrl.c static void get_current_temps(struct bbc_cpu_temperature *tp) tp 122 drivers/sbus/char/bbc_envctrl.c tp->prev_amb_temp = tp->curr_amb_temp; tp 123 drivers/sbus/char/bbc_envctrl.c bbc_i2c_readb(tp->client, tp 124 drivers/sbus/char/bbc_envctrl.c (unsigned char *) &tp->curr_amb_temp, tp 126 drivers/sbus/char/bbc_envctrl.c tp->prev_cpu_temp = tp->curr_cpu_temp; tp 127 drivers/sbus/char/bbc_envctrl.c bbc_i2c_readb(tp->client, tp 128 drivers/sbus/char/bbc_envctrl.c (unsigned char *) &tp->curr_cpu_temp, tp 132 drivers/sbus/char/bbc_envctrl.c tp->index, tp 133 drivers/sbus/char/bbc_envctrl.c (int) tp->curr_cpu_temp, (int) tp->curr_amb_temp); tp 138 drivers/sbus/char/bbc_envctrl.c static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp) tp 147 drivers/sbus/char/bbc_envctrl.c if (tp->curr_amb_temp >= amb_temp_limits[tp->index].high_shutdown || tp 148 drivers/sbus/char/bbc_envctrl.c tp->curr_amb_temp < amb_temp_limits[tp->index].low_shutdown) { tp 150 drivers/sbus/char/bbc_envctrl.c val = tp->curr_amb_temp; tp 151 drivers/sbus/char/bbc_envctrl.c } else if (tp->curr_cpu_temp >= cpu_temp_limits[tp->index].high_shutdown || tp 152 drivers/sbus/char/bbc_envctrl.c tp->curr_cpu_temp < cpu_temp_limits[tp->index].low_shutdown) { tp 154 drivers/sbus/char/bbc_envctrl.c val = tp->curr_cpu_temp; tp 159 drivers/sbus/char/bbc_envctrl.c tp->index, type, val); tp 169 drivers/sbus/char/bbc_envctrl.c static void analyze_ambient_temp(struct bbc_cpu_temperature *tp, unsigned long *last_warn, int tick) tp 174 drivers/sbus/char/bbc_envctrl.c if (tp->curr_amb_temp >= tp 175 drivers/sbus/char/bbc_envctrl.c amb_temp_limits[tp->index].high_warn) { tp 178 drivers/sbus/char/bbc_envctrl.c tp->index, (int) tp->curr_amb_temp); tp 180 drivers/sbus/char/bbc_envctrl.c } else if (tp->curr_amb_temp < tp 181 drivers/sbus/char/bbc_envctrl.c amb_temp_limits[tp->index].low_warn) { tp 184 drivers/sbus/char/bbc_envctrl.c tp->index, (int) tp->curr_amb_temp); tp 189 drivers/sbus/char/bbc_envctrl.c } else if (tp->curr_amb_temp >= amb_temp_limits[tp->index].high_warn || tp 190 drivers/sbus/char/bbc_envctrl.c tp->curr_amb_temp < amb_temp_limits[tp->index].low_warn) tp 194 drivers/sbus/char/bbc_envctrl.c if (tp->curr_amb_temp >= amb_temp_limits[tp->index].high_shutdown || tp 195 drivers/sbus/char/bbc_envctrl.c tp->curr_amb_temp < amb_temp_limits[tp->index].low_shutdown) { tp 196 drivers/sbus/char/bbc_envctrl.c do_envctrl_shutdown(tp); tp 201 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_FULLBLAST; tp 203 drivers/sbus/char/bbc_envctrl.c s8 amb_goal_hi = amb_temp_limits[tp->index].high_warn - 10; tp 211 drivers/sbus/char/bbc_envctrl.c if (tp->avg_amb_temp < amb_goal_hi) { tp 212 drivers/sbus/char/bbc_envctrl.c if (tp->avg_amb_temp >= amb_goal_lo) tp 213 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_SAME; tp 215 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_SLOWER; tp 217 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_FASTER; tp 220 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_SAME; tp 224 drivers/sbus/char/bbc_envctrl.c static void analyze_cpu_temp(struct bbc_cpu_temperature *tp, unsigned long *last_warn, int tick) tp 229 drivers/sbus/char/bbc_envctrl.c if (tp->curr_cpu_temp >= tp 230 drivers/sbus/char/bbc_envctrl.c cpu_temp_limits[tp->index].high_warn) { tp 233 drivers/sbus/char/bbc_envctrl.c tp->index, (int) tp->curr_cpu_temp); tp 235 drivers/sbus/char/bbc_envctrl.c } else if (tp->curr_cpu_temp < tp 236 drivers/sbus/char/bbc_envctrl.c cpu_temp_limits[tp->index].low_warn) { tp 239 drivers/sbus/char/bbc_envctrl.c tp->index, (int) tp->curr_cpu_temp); tp 244 drivers/sbus/char/bbc_envctrl.c } else if (tp->curr_cpu_temp >= cpu_temp_limits[tp->index].high_warn || tp 245 drivers/sbus/char/bbc_envctrl.c tp->curr_cpu_temp < cpu_temp_limits[tp->index].low_warn) tp 249 drivers/sbus/char/bbc_envctrl.c if (tp->curr_cpu_temp >= cpu_temp_limits[tp->index].high_shutdown || tp 250 drivers/sbus/char/bbc_envctrl.c tp->curr_cpu_temp < cpu_temp_limits[tp->index].low_shutdown) { tp 251 drivers/sbus/char/bbc_envctrl.c do_envctrl_shutdown(tp); tp 256 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_FULLBLAST; tp 258 drivers/sbus/char/bbc_envctrl.c s8 cpu_goal_hi = cpu_temp_limits[tp->index].high_warn - 10; tp 266 drivers/sbus/char/bbc_envctrl.c if (tp->avg_cpu_temp < cpu_goal_hi) { tp 267 drivers/sbus/char/bbc_envctrl.c if (tp->avg_cpu_temp >= cpu_goal_lo) tp 268 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_SAME; tp 270 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_SLOWER; tp 272 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_FASTER; tp 275 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_SAME; tp 279 drivers/sbus/char/bbc_envctrl.c static void analyze_temps(struct bbc_cpu_temperature *tp, unsigned long *last_warn) tp 281 drivers/sbus/char/bbc_envctrl.c tp->avg_amb_temp = (s8)((int)((int)tp->avg_amb_temp + (int)tp->curr_amb_temp) / 2); tp 282 drivers/sbus/char/bbc_envctrl.c tp->avg_cpu_temp = (s8)((int)((int)tp->avg_cpu_temp + (int)tp->curr_cpu_temp) / 2); tp 284 drivers/sbus/char/bbc_envctrl.c analyze_ambient_temp(tp, last_warn, tp->sample_tick); tp 285 drivers/sbus/char/bbc_envctrl.c analyze_cpu_temp(tp, last_warn, tp->sample_tick); tp 287 drivers/sbus/char/bbc_envctrl.c tp->sample_tick++; tp 292 drivers/sbus/char/bbc_envctrl.c struct bbc_cpu_temperature *tp; tp 299 drivers/sbus/char/bbc_envctrl.c list_for_each_entry(tp, &all_temps, glob_list) { tp 300 drivers/sbus/char/bbc_envctrl.c if (tp->fan_todo[which_fan] == FAN_FULLBLAST) { tp 304 drivers/sbus/char/bbc_envctrl.c if (tp->fan_todo[which_fan] == FAN_SAME && tp 307 drivers/sbus/char/bbc_envctrl.c else if (tp->fan_todo[which_fan] == FAN_FASTER) tp 311 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[which_fan] == FAN_SLOWER) tp 425 drivers/sbus/char/bbc_envctrl.c struct bbc_cpu_temperature *tp; tp 432 drivers/sbus/char/bbc_envctrl.c list_for_each_entry(tp, &all_temps, glob_list) { tp 433 drivers/sbus/char/bbc_envctrl.c get_current_temps(tp); tp 434 drivers/sbus/char/bbc_envctrl.c analyze_temps(tp, &last_warning_jiffies); tp 449 drivers/sbus/char/bbc_envctrl.c struct bbc_cpu_temperature *tp; tp 451 drivers/sbus/char/bbc_envctrl.c tp = kzalloc(sizeof(*tp), GFP_KERNEL); tp 452 drivers/sbus/char/bbc_envctrl.c if (!tp) tp 455 drivers/sbus/char/bbc_envctrl.c INIT_LIST_HEAD(&tp->bp_list); tp 456 drivers/sbus/char/bbc_envctrl.c INIT_LIST_HEAD(&tp->glob_list); tp 458 drivers/sbus/char/bbc_envctrl.c tp->client = bbc_i2c_attach(bp, op); tp 459 drivers/sbus/char/bbc_envctrl.c if (!tp->client) { tp 460 drivers/sbus/char/bbc_envctrl.c kfree(tp); tp 465 drivers/sbus/char/bbc_envctrl.c tp->index = temp_idx; tp 467 drivers/sbus/char/bbc_envctrl.c list_add(&tp->glob_list, &all_temps); tp 468 drivers/sbus/char/bbc_envctrl.c list_add(&tp->bp_list, &bp->temps); tp 473 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, 0x00, MAX1617_WR_CFG_BYTE); tp 474 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, 0x02, MAX1617_WR_CVRATE_BYTE); tp 477 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, amb_temp_limits[tp->index].high_pwroff, tp 479 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, amb_temp_limits[tp->index].low_pwroff, tp 481 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, cpu_temp_limits[tp->index].high_pwroff, tp 483 drivers/sbus/char/bbc_envctrl.c bbc_i2c_writeb(tp->client, cpu_temp_limits[tp->index].low_pwroff, tp 486 drivers/sbus/char/bbc_envctrl.c get_current_temps(tp); tp 487 drivers/sbus/char/bbc_envctrl.c tp->prev_cpu_temp = tp->avg_cpu_temp = tp->curr_cpu_temp; tp 488 drivers/sbus/char/bbc_envctrl.c tp->prev_amb_temp = tp->avg_amb_temp = tp->curr_amb_temp; tp 490 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_AMBIENT] = FAN_SAME; tp 491 drivers/sbus/char/bbc_envctrl.c tp->fan_todo[FAN_CPU] = FAN_SAME; tp 532 drivers/sbus/char/bbc_envctrl.c static void destroy_one_temp(struct bbc_cpu_temperature *tp) tp 534 drivers/sbus/char/bbc_envctrl.c bbc_i2c_detach(tp->client); tp 535 drivers/sbus/char/bbc_envctrl.c kfree(tp); tp 540 drivers/sbus/char/bbc_envctrl.c struct bbc_cpu_temperature *tp, *tpos; tp 542 drivers/sbus/char/bbc_envctrl.c list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { tp 543 drivers/sbus/char/bbc_envctrl.c list_del(&tp->bp_list); tp 544 drivers/sbus/char/bbc_envctrl.c list_del(&tp->glob_list); tp 545 drivers/sbus/char/bbc_envctrl.c destroy_one_temp(tp); tp 549 drivers/scsi/esp_scsi.c static int esp_need_to_nego_wide(struct esp_target_data *tp) tp 551 drivers/scsi/esp_scsi.c struct scsi_target *target = tp->starget; tp 553 drivers/scsi/esp_scsi.c return spi_width(target) != tp->nego_goal_width; tp 556 drivers/scsi/esp_scsi.c static int esp_need_to_nego_sync(struct esp_target_data *tp) tp 558 drivers/scsi/esp_scsi.c struct scsi_target *target = tp->starget; tp 561 drivers/scsi/esp_scsi.c if (!spi_offset(target) && !tp->nego_goal_offset) tp 564 drivers/scsi/esp_scsi.c if (spi_offset(target) == tp->nego_goal_offset && tp 565 drivers/scsi/esp_scsi.c spi_period(target) == tp->nego_goal_period) tp 734 drivers/scsi/esp_scsi.c struct esp_target_data *tp; tp 760 drivers/scsi/esp_scsi.c tp = &esp->target[tgt]; tp 775 drivers/scsi/esp_scsi.c if (tp->flags & ESP_TGT_CHECK_NEGO) { tp 779 drivers/scsi/esp_scsi.c if (tp->flags & ESP_TGT_BROKEN) { tp 780 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_DISCONNECT; tp 781 drivers/scsi/esp_scsi.c tp->nego_goal_period = 0; tp 782 drivers/scsi/esp_scsi.c tp->nego_goal_offset = 0; tp 783 drivers/scsi/esp_scsi.c tp->nego_goal_width = 0; tp 784 drivers/scsi/esp_scsi.c tp->nego_goal_tags = 0; tp 788 drivers/scsi/esp_scsi.c if (spi_width(tp->starget) == tp->nego_goal_width && tp 789 drivers/scsi/esp_scsi.c spi_period(tp->starget) == tp->nego_goal_period && tp 790 drivers/scsi/esp_scsi.c spi_offset(tp->starget) == tp->nego_goal_offset) { tp 791 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_CHECK_NEGO; tp 795 drivers/scsi/esp_scsi.c if (esp->rev == FASHME && esp_need_to_nego_wide(tp)) { tp 798 drivers/scsi/esp_scsi.c (tp->nego_goal_width ? tp 800 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_NEGO_WIDE; tp 801 drivers/scsi/esp_scsi.c } else if (esp_need_to_nego_sync(tp)) { tp 804 drivers/scsi/esp_scsi.c tp->nego_goal_period, tp 805 drivers/scsi/esp_scsi.c tp->nego_goal_offset); tp 806 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_NEGO_SYNC; tp 808 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_CHECK_NEGO; tp 817 drivers/scsi/esp_scsi.c *p++ = IDENTIFY(tp->flags & ESP_TGT_DISCONNECT, lun); tp 1145 drivers/scsi/esp_scsi.c struct esp_target_data *tp; tp 1198 drivers/scsi/esp_scsi.c tp = &esp->target[target]; tp 1199 drivers/scsi/esp_scsi.c dev = __scsi_device_lookup_by_target(tp->starget, lun); tp 1251 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[cmd->device->id]; tp 1260 drivers/scsi/esp_scsi.c tp->flags &= ~(ESP_TGT_NEGO_SYNC | ESP_TGT_NEGO_WIDE); tp 1415 drivers/scsi/esp_scsi.c static void esp_setsync(struct esp *esp, struct esp_target_data *tp, tp 1419 drivers/scsi/esp_scsi.c spi_period(tp->starget) = scsi_period; tp 1420 drivers/scsi/esp_scsi.c spi_offset(tp->starget) = scsi_offset; tp 1421 drivers/scsi/esp_scsi.c spi_width(tp->starget) = (tp->flags & ESP_TGT_WIDE) ? 1 : 0; tp 1434 drivers/scsi/esp_scsi.c tp->esp_config3 |= bit; tp 1436 drivers/scsi/esp_scsi.c tp->esp_config3 &= ~bit; tp 1438 drivers/scsi/esp_scsi.c esp->prev_cfg3 = tp->esp_config3; tp 1443 drivers/scsi/esp_scsi.c tp->esp_period = esp->prev_stp = esp_stp; tp 1444 drivers/scsi/esp_scsi.c tp->esp_offset = esp->prev_soff = esp_soff; tp 1449 drivers/scsi/esp_scsi.c tp->flags &= ~(ESP_TGT_NEGO_SYNC | ESP_TGT_CHECK_NEGO); tp 1451 drivers/scsi/esp_scsi.c spi_display_xfer_agreement(tp->starget); tp 1458 drivers/scsi/esp_scsi.c struct esp_target_data *tp; tp 1462 drivers/scsi/esp_scsi.c tp = &esp->target[tgt]; tp 1464 drivers/scsi/esp_scsi.c if (tp->flags & ESP_TGT_NEGO_WIDE) { tp 1465 drivers/scsi/esp_scsi.c tp->flags &= ~(ESP_TGT_NEGO_WIDE | ESP_TGT_WIDE); tp 1467 drivers/scsi/esp_scsi.c if (!esp_need_to_nego_sync(tp)) { tp 1468 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_CHECK_NEGO; tp 1473 drivers/scsi/esp_scsi.c tp->nego_goal_period, tp 1474 drivers/scsi/esp_scsi.c tp->nego_goal_offset); tp 1475 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_NEGO_SYNC; tp 1481 drivers/scsi/esp_scsi.c if (tp->flags & ESP_TGT_NEGO_SYNC) { tp 1482 drivers/scsi/esp_scsi.c tp->flags &= ~(ESP_TGT_NEGO_SYNC | ESP_TGT_CHECK_NEGO); tp 1483 drivers/scsi/esp_scsi.c tp->esp_period = 0; tp 1484 drivers/scsi/esp_scsi.c tp->esp_offset = 0; tp 1485 drivers/scsi/esp_scsi.c esp_setsync(esp, tp, 0, 0, 0, 0); tp 1494 drivers/scsi/esp_scsi.c static void esp_msgin_sdtr(struct esp *esp, struct esp_target_data *tp) tp 1500 drivers/scsi/esp_scsi.c if (!(tp->flags & ESP_TGT_NEGO_SYNC)) tp 1526 drivers/scsi/esp_scsi.c esp_setsync(esp, tp, period, offset, stp, offset); tp 1536 drivers/scsi/esp_scsi.c tp->nego_goal_period = period; tp 1537 drivers/scsi/esp_scsi.c tp->nego_goal_offset = offset; tp 1540 drivers/scsi/esp_scsi.c tp->nego_goal_period, tp 1541 drivers/scsi/esp_scsi.c tp->nego_goal_offset); tp 1545 drivers/scsi/esp_scsi.c static void esp_msgin_wdtr(struct esp *esp, struct esp_target_data *tp) tp 1556 drivers/scsi/esp_scsi.c if (!(tp->flags & ESP_TGT_NEGO_WIDE)) tp 1559 drivers/scsi/esp_scsi.c cfg3 = tp->esp_config3; tp 1561 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_WIDE; tp 1564 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_WIDE; tp 1567 drivers/scsi/esp_scsi.c tp->esp_config3 = cfg3; tp 1571 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_NEGO_WIDE; tp 1573 drivers/scsi/esp_scsi.c spi_period(tp->starget) = 0; tp 1574 drivers/scsi/esp_scsi.c spi_offset(tp->starget) = 0; tp 1575 drivers/scsi/esp_scsi.c if (!esp_need_to_nego_sync(tp)) { tp 1576 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_CHECK_NEGO; tp 1581 drivers/scsi/esp_scsi.c tp->nego_goal_period, tp 1582 drivers/scsi/esp_scsi.c tp->nego_goal_offset); tp 1583 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_NEGO_SYNC; tp 1598 drivers/scsi/esp_scsi.c struct esp_target_data *tp; tp 1601 drivers/scsi/esp_scsi.c tp = &esp->target[tgt]; tp 1603 drivers/scsi/esp_scsi.c esp_msgin_sdtr(esp, tp); tp 1607 drivers/scsi/esp_scsi.c esp_msgin_wdtr(esp, tp); tp 2084 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[i]; tp 2086 drivers/scsi/esp_scsi.c tp->esp_period = 0; tp 2087 drivers/scsi/esp_scsi.c tp->esp_offset = 0; tp 2088 drivers/scsi/esp_scsi.c tp->esp_config3 &= ~(ESP_CONFIG3_EWIDE | tp 2091 drivers/scsi/esp_scsi.c tp->flags &= ~ESP_TGT_WIDE; tp 2092 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_CHECK_NEGO; tp 2094 drivers/scsi/esp_scsi.c if (tp->starget) tp 2095 drivers/scsi/esp_scsi.c __starget_for_each_device(tp->starget, NULL, tp 2436 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[starget->id]; tp 2438 drivers/scsi/esp_scsi.c tp->starget = starget; tp 2446 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[starget->id]; tp 2448 drivers/scsi/esp_scsi.c tp->starget = NULL; tp 2454 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[dev->id]; tp 2462 drivers/scsi/esp_scsi.c spi_min_period(tp->starget) = esp->min_period; tp 2463 drivers/scsi/esp_scsi.c spi_max_offset(tp->starget) = 15; tp 2466 drivers/scsi/esp_scsi.c spi_max_width(tp->starget) = 1; tp 2468 drivers/scsi/esp_scsi.c spi_max_width(tp->starget) = 0; tp 2476 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[dev->id]; tp 2481 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_DISCONNECT; tp 2708 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[target->id]; tp 2711 drivers/scsi/esp_scsi.c tp->nego_goal_offset = 0; tp 2713 drivers/scsi/esp_scsi.c tp->nego_goal_offset = offset; tp 2714 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_CHECK_NEGO; tp 2721 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[target->id]; tp 2723 drivers/scsi/esp_scsi.c tp->nego_goal_period = period; tp 2724 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_CHECK_NEGO; tp 2731 drivers/scsi/esp_scsi.c struct esp_target_data *tp = &esp->target[target->id]; tp 2733 drivers/scsi/esp_scsi.c tp->nego_goal_width = (width ? 1 : 0); tp 2734 drivers/scsi/esp_scsi.c tp->flags |= ESP_TGT_CHECK_NEGO; tp 215 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 218 drivers/scsi/mesh.c tlp = &tp->log[tp->log_ix]; tp 228 drivers/scsi/mesh.c if (++tp->log_ix >= N_DBG_LOG) tp 229 drivers/scsi/mesh.c tp->log_ix = 0; tp 230 drivers/scsi/mesh.c if (tp->n_log < N_DBG_LOG) tp 231 drivers/scsi/mesh.c ++tp->n_log; tp 240 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[t]; tp 244 drivers/scsi/mesh.c if (tp->n_log == 0) tp 246 drivers/scsi/mesh.c i = tp->log_ix - tp->n_log; tp 249 drivers/scsi/mesh.c tp->n_log = 0; tp 251 drivers/scsi/mesh.c lp = &tp->log[i]; tp 261 drivers/scsi/mesh.c } while (i != tp->log_ix); tp 308 drivers/scsi/mesh.c struct mesh_target *tp; tp 327 drivers/scsi/mesh.c tp = &ms->tgts[t]; tp 328 drivers/scsi/mesh.c if (tp->current_req == NULL) tp 331 drivers/scsi/mesh.c t, tp->current_req, tp->data_goes_out, tp->saved_ptr); tp 592 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 596 drivers/scsi/mesh.c tp->current_req = NULL; tp 640 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 644 drivers/scsi/mesh.c tp->sdtr_state = sdtr_done; tp 647 drivers/scsi/mesh.c if (SYNC_OFF(tp->sync_params)) tp 650 drivers/scsi/mesh.c tp->sync_params = ASYNC_PARAMS; tp 673 drivers/scsi/mesh.c tp->sync_params = SYNC_PARAMS(offset, v); tp 674 drivers/scsi/mesh.c out_8(&mr->sync_params, tp->sync_params); tp 685 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 769 drivers/scsi/mesh.c out_8(&mr->sync_params, tp->sync_params); tp 798 drivers/scsi/mesh.c out_8(&mr->sequence, (tp->data_goes_out? tp 860 drivers/scsi/mesh.c struct mesh_target *tp; tp 873 drivers/scsi/mesh.c tp = &ms->tgts[cmd->device->id]; tp 874 drivers/scsi/mesh.c tp->current_req = NULL; tp 951 drivers/scsi/mesh.c tp = &ms->tgts[t]; tp 952 drivers/scsi/mesh.c out_8(&mr->sync_params, tp->sync_params); tp 956 drivers/scsi/mesh.c tp->saved_ptr, tp->data_goes_out, tp->current_req); tp 958 drivers/scsi/mesh.c ms->current_req = tp->current_req; tp 959 drivers/scsi/mesh.c if (tp->current_req == NULL) { tp 963 drivers/scsi/mesh.c ms->data_ptr = tp->saved_ptr; tp 989 drivers/scsi/mesh.c struct mesh_target *tp; tp 994 drivers/scsi/mesh.c tp = &ms->tgts[tgt]; tp 995 drivers/scsi/mesh.c if ((cmd = tp->current_req) != NULL) { tp 997 drivers/scsi/mesh.c tp->current_req = NULL; tp 1161 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 1191 drivers/scsi/mesh.c if (tp->sdtr_state != sdtr_sent) { tp 1211 drivers/scsi/mesh.c tp->saved_ptr = ms->data_ptr; tp 1214 drivers/scsi/mesh.c ms->data_ptr = tp->saved_ptr; tp 1222 drivers/scsi/mesh.c if (tp->sdtr_state == sdtr_sent) tp 1447 drivers/scsi/mesh.c struct mesh_target *tp = &ms->tgts[ms->conn_tgt]; tp 1554 drivers/scsi/mesh.c } else if (tp->sdtr_state == do_sdtr) { tp 1558 drivers/scsi/mesh.c tp->sdtr_state = sdtr_sent; tp 1925 drivers/scsi/ncr53c8xx.c static void ncr_negotiate (struct ncb* np, struct tcb* tp); tp 3963 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[i]; tp 3965 drivers/scsi/ncr53c8xx.c tp->usrsync = driver_setup.default_sync; tp 3966 drivers/scsi/ncr53c8xx.c tp->usrwide = driver_setup.max_wide; tp 3967 drivers/scsi/ncr53c8xx.c tp->usrtags = MAX_TAGS; tp 3968 drivers/scsi/ncr53c8xx.c tp->period = 0xffff; tp 4053 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; tp 4056 drivers/scsi/ncr53c8xx.c struct scsi_target *starget = tp->starget; tp 4059 drivers/scsi/ncr53c8xx.c if (!tp->widedone) { tp 4063 drivers/scsi/ncr53c8xx.c tp->widedone=1; tp 4067 drivers/scsi/ncr53c8xx.c if (!nego && !tp->period) { tp 4071 drivers/scsi/ncr53c8xx.c tp->period =0xffff; tp 4079 drivers/scsi/ncr53c8xx.c tp->maxoffs ? tp->minsync : 0, tp->maxoffs); tp 4082 drivers/scsi/ncr53c8xx.c msglen += spi_populate_width_msg(msgptr + msglen, tp->usrwide); tp 4089 drivers/scsi/ncr53c8xx.c tp->nego_cp = cp; tp 4113 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[sdev->id]; tp 4114 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[sdev->lun]; tp 4145 drivers/scsi/ncr53c8xx.c (tp->usrflag & UF_NOSCAN)) { tp 4146 drivers/scsi/ncr53c8xx.c tp->usrflag &= ~UF_NOSCAN; tp 4186 drivers/scsi/ncr53c8xx.c (cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC))) tp 4266 drivers/scsi/ncr53c8xx.c if ((!tp->widedone || !tp->period) && !tp->nego_cp && lp) { tp 4354 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_scntl3 = tp->wval; tp 4355 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_sxfer = tp->sval; tp 4379 drivers/scsi/ncr53c8xx.c cp->sync_status = tp->sval; tp 4380 drivers/scsi/ncr53c8xx.c cp->wide_status = tp->wval; tp 4698 drivers/scsi/ncr53c8xx.c struct tcb *tp; tp 4772 drivers/scsi/ncr53c8xx.c tp=&np->target[target]; tp 4774 drivers/scsi/ncr53c8xx.c lp = tp->lp[lun]; tp 4810 drivers/scsi/ncr53c8xx.c struct tcb *tp; tp 4834 drivers/scsi/ncr53c8xx.c tp = &np->target[cmd->device->id]; tp 4835 drivers/scsi/ncr53c8xx.c lp = tp->lp[cmd->device->lun]; tp 4843 drivers/scsi/ncr53c8xx.c if (cp == tp->nego_cp) tp 4844 drivers/scsi/ncr53c8xx.c tp->nego_cp = NULL; tp 4931 drivers/scsi/ncr53c8xx.c tp->bytes += cp->data_len; tp 4932 drivers/scsi/ncr53c8xx.c tp->transfers ++; tp 5020 drivers/scsi/ncr53c8xx.c if (tp->usrflag & UF_TRACE) { tp 5085 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; tp 5086 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[cp->lun]; tp 5317 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[i]; tp 5319 drivers/scsi/ncr53c8xx.c tp->sval = 0; tp 5320 drivers/scsi/ncr53c8xx.c tp->wval = np->rv_scntl3; tp 5322 drivers/scsi/ncr53c8xx.c if (tp->usrsync != 255) { tp 5323 drivers/scsi/ncr53c8xx.c if (tp->usrsync <= np->maxsync) { tp 5324 drivers/scsi/ncr53c8xx.c if (tp->usrsync < np->minsync) { tp 5325 drivers/scsi/ncr53c8xx.c tp->usrsync = np->minsync; tp 5329 drivers/scsi/ncr53c8xx.c tp->usrsync = 255; tp 5332 drivers/scsi/ncr53c8xx.c if (tp->usrwide > np->maxwide) tp 5333 drivers/scsi/ncr53c8xx.c tp->usrwide = np->maxwide; tp 5359 drivers/scsi/ncr53c8xx.c static void ncr_negotiate (struct ncb* np, struct tcb* tp) tp 5365 drivers/scsi/ncr53c8xx.c u_long minsync = tp->usrsync; tp 5389 drivers/scsi/ncr53c8xx.c if (tp->maxoffs > np->maxoffs) tp 5390 drivers/scsi/ncr53c8xx.c tp->maxoffs = np->maxoffs; tp 5392 drivers/scsi/ncr53c8xx.c tp->minsync = minsync; tp 5393 drivers/scsi/ncr53c8xx.c tp->maxoffs = (minsync<255 ? tp->maxoffs : 0); tp 5399 drivers/scsi/ncr53c8xx.c tp->period=0; tp 5404 drivers/scsi/ncr53c8xx.c tp->widedone=0; tp 5489 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[target]; tp 5494 drivers/scsi/ncr53c8xx.c OUTB (nc_sxfer, tp->sval); tp 5495 drivers/scsi/ncr53c8xx.c np->sync_st = tp->sval; tp 5496 drivers/scsi/ncr53c8xx.c OUTB (nc_scntl3, tp->wval); tp 5497 drivers/scsi/ncr53c8xx.c np->wide_st = tp->wval; tp 5506 drivers/scsi/ncr53c8xx.c cp->sync_status = tp->sval; tp 5507 drivers/scsi/ncr53c8xx.c cp->wide_status = tp->wval; tp 5509 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_scntl3 = tp->wval; tp 5510 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_sxfer = tp->sval; tp 5524 drivers/scsi/ncr53c8xx.c struct tcb *tp; tp 5530 drivers/scsi/ncr53c8xx.c tp = &np->target[target]; tp 5534 drivers/scsi/ncr53c8xx.c scntl3 = (scntl3 & 0xf0) | (tp->wval & EWS) | (np->rv_scntl3 & 0x07); tp 5543 drivers/scsi/ncr53c8xx.c tp->period = (((sxfer>>5)+4)*div_10M[idiv-1])/np->clock_khz; tp 5545 drivers/scsi/ncr53c8xx.c tp->period = 0xffff; tp 5548 drivers/scsi/ncr53c8xx.c if (tp->sval == sxfer && tp->wval == scntl3) tp 5550 drivers/scsi/ncr53c8xx.c tp->sval = sxfer; tp 5551 drivers/scsi/ncr53c8xx.c tp->wval = scntl3; tp 5555 drivers/scsi/ncr53c8xx.c if (tp->period <= 2000) tp 5559 drivers/scsi/ncr53c8xx.c spi_display_xfer_agreement(tp->starget); tp 5582 drivers/scsi/ncr53c8xx.c struct tcb *tp; tp 5588 drivers/scsi/ncr53c8xx.c tp = &np->target[target]; tp 5589 drivers/scsi/ncr53c8xx.c tp->widedone = wide+1; tp 5590 drivers/scsi/ncr53c8xx.c scntl3 = (tp->wval & (~EWS)) | (wide ? EWS : 0); tp 5592 drivers/scsi/ncr53c8xx.c sxfer = ack ? 0 : tp->sval; tp 5597 drivers/scsi/ncr53c8xx.c if (tp->sval == sxfer && tp->wval == scntl3) return; tp 5598 drivers/scsi/ncr53c8xx.c tp->sval = sxfer; tp 5599 drivers/scsi/ncr53c8xx.c tp->wval = scntl3; tp 5626 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 5627 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[ln]; tp 5633 drivers/scsi/ncr53c8xx.c if ((!tp) || (!lp) || !sdev) tp 6535 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cmd->device->id]; tp 6536 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[cmd->device->lun]; tp 6691 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[target]; tp 6692 drivers/scsi/ncr53c8xx.c struct scsi_target *starget = tp->starget; tp 6716 drivers/scsi/ncr53c8xx.c if (tp->lp[0]) { tp 6717 drivers/scsi/ncr53c8xx.c OUTL_DSP (scr_to_cpu(tp->lp[0]->jump_ccb[0])); tp 6891 drivers/scsi/ncr53c8xx.c if (per < tp->minsync) tp 6892 drivers/scsi/ncr53c8xx.c {chg = 1; per = tp->minsync;} tp 6893 drivers/scsi/ncr53c8xx.c if (ofs > tp->maxoffs) tp 6894 drivers/scsi/ncr53c8xx.c {chg = 1; ofs = tp->maxoffs;} tp 6912 drivers/scsi/ncr53c8xx.c tp->minsync = 0; tp 6999 drivers/scsi/ncr53c8xx.c if (wide > tp->usrwide) tp 7000 drivers/scsi/ncr53c8xx.c {chg = 1; wide = tp->usrwide;} tp 7139 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 7140 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[ln]; tp 7248 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; tp 7249 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[cp->lun]; tp 7349 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 7350 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[ln]; tp 7398 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 7407 drivers/scsi/ncr53c8xx.c tp->jump_tcb.l_cmd = tp 7409 drivers/scsi/ncr53c8xx.c tp->jump_tcb.l_paddr = np->jump_tcb[th].l_paddr; tp 7415 drivers/scsi/ncr53c8xx.c tp->getscr[0] = cpu_to_scr(copy_1); tp 7416 drivers/scsi/ncr53c8xx.c tp->getscr[1] = cpu_to_scr(vtobus (&tp->sval)); tp 7418 drivers/scsi/ncr53c8xx.c tp->getscr[2] = cpu_to_scr(ncr_reg_bus_addr(nc_sxfer) ^ 3); tp 7420 drivers/scsi/ncr53c8xx.c tp->getscr[2] = cpu_to_scr(ncr_reg_bus_addr(nc_sxfer)); tp 7427 drivers/scsi/ncr53c8xx.c tp->getscr[3] = cpu_to_scr(copy_1); tp 7428 drivers/scsi/ncr53c8xx.c tp->getscr[4] = cpu_to_scr(vtobus (&tp->wval)); tp 7430 drivers/scsi/ncr53c8xx.c tp->getscr[5] = cpu_to_scr(ncr_reg_bus_addr(nc_scntl3) ^ 3); tp 7432 drivers/scsi/ncr53c8xx.c tp->getscr[5] = cpu_to_scr(ncr_reg_bus_addr(nc_scntl3)); tp 7439 drivers/scsi/ncr53c8xx.c tp->call_lun.l_cmd = cpu_to_scr(SCR_CALL); tp 7440 drivers/scsi/ncr53c8xx.c tp->call_lun.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, resel_lun)); tp 7448 drivers/scsi/ncr53c8xx.c tp->jump_lcb[i].l_cmd = tp 7450 drivers/scsi/ncr53c8xx.c tp->jump_lcb[i].l_paddr = tp 7457 drivers/scsi/ncr53c8xx.c np->jump_tcb[th].l_paddr = cpu_to_scr(vtobus (&tp->jump_tcb)); tp 7485 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 7486 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[ln]; tp 7503 drivers/scsi/ncr53c8xx.c tp->lp[ln] = lp; tp 7508 drivers/scsi/ncr53c8xx.c if (!tp->jump_tcb.l_cmd) tp 7540 drivers/scsi/ncr53c8xx.c lp->jump_lcb.l_paddr = tp->jump_lcb[lh].l_paddr; tp 7552 drivers/scsi/ncr53c8xx.c tp->jump_lcb[lh].l_paddr = cpu_to_scr(vtobus (&lp->jump_lcb)); tp 7576 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[tn]; tp 7577 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[ln]; tp 7959 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[device->id]; tp 7960 drivers/scsi/ncr53c8xx.c tp->starget = device->sdev_target; tp 7969 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[device->id]; tp 7970 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[device->lun]; tp 7982 drivers/scsi/ncr53c8xx.c if (numtags > tp->usrtags) tp 7983 drivers/scsi/ncr53c8xx.c numtags = tp->usrtags; tp 8531 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[starget->id]; tp 8538 drivers/scsi/ncr53c8xx.c tp->usrsync = period; tp 8540 drivers/scsi/ncr53c8xx.c ncr_negotiate(np, tp); tp 8547 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[starget->id]; tp 8554 drivers/scsi/ncr53c8xx.c tp->maxoffs = offset; tp 8556 drivers/scsi/ncr53c8xx.c ncr_negotiate(np, tp); tp 8563 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[starget->id]; tp 8570 drivers/scsi/ncr53c8xx.c tp->usrwide = width; tp 8572 drivers/scsi/ncr53c8xx.c ncr_negotiate(np, tp); tp 272 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp; \ tp 274 drivers/scsi/scsi_transport_spi.c tp = (struct spi_transport_attrs *)&starget->starget_data; \ tp 275 drivers/scsi/scsi_transport_spi.c return snprintf(buf, 20, format_string, tp->field); \ tp 287 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp; \ tp 289 drivers/scsi/scsi_transport_spi.c tp = (struct spi_transport_attrs *)&starget->starget_data; \ tp 291 drivers/scsi/scsi_transport_spi.c tp->field = val; \ tp 303 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp; \ tp 305 drivers/scsi/scsi_transport_spi.c tp = (struct spi_transport_attrs *)&starget->starget_data; \ tp 308 drivers/scsi/scsi_transport_spi.c return snprintf(buf, 20, format_string, tp->field); \ tp 339 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp \ tp 345 drivers/scsi/scsi_transport_spi.c if (val > tp->max_##field) \ tp 346 drivers/scsi/scsi_transport_spi.c val = tp->max_##field; \ tp 483 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp = tp 489 drivers/scsi/scsi_transport_spi.c return show_spi_transport_period_helper(buf, tp->period); tp 499 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp = tp 508 drivers/scsi/scsi_transport_spi.c if (period < tp->min_period) tp 509 drivers/scsi/scsi_transport_spi.c period = tp->min_period; tp 527 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp = tp 533 drivers/scsi/scsi_transport_spi.c return show_spi_transport_period_helper(buf, tp->min_period); tp 542 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp = tp 546 drivers/scsi/scsi_transport_spi.c &tp->min_period); tp 1120 drivers/scsi/scsi_transport_spi.c struct spi_transport_attrs *tp; tp 1121 drivers/scsi/scsi_transport_spi.c tp = (struct spi_transport_attrs *)&starget->starget_data; tp 1123 drivers/scsi/scsi_transport_spi.c if (tp->offset > 0 && tp->period > 0) { tp 1128 drivers/scsi/scsi_transport_spi.c if (tp->period <= SPI_STATIC_PPR) { tp 1129 drivers/scsi/scsi_transport_spi.c picosec = ppr_to_ps[tp->period]; tp 1130 drivers/scsi/scsi_transport_spi.c switch (tp->period) { tp 1139 drivers/scsi/scsi_transport_spi.c picosec = tp->period * 4000; tp 1140 drivers/scsi/scsi_transport_spi.c if (tp->period < 25) tp 1142 drivers/scsi/scsi_transport_spi.c else if (tp->period < 50) tp 1149 drivers/scsi/scsi_transport_spi.c if (tp->width) tp 1155 drivers/scsi/scsi_transport_spi.c scsi, tp->width ? "WIDE " : "", kb100/10, kb100 % 10, tp 1156 drivers/scsi/scsi_transport_spi.c tp->dt ? "DT" : "ST", tp 1157 drivers/scsi/scsi_transport_spi.c tp->iu ? " IU" : "", tp 1158 drivers/scsi/scsi_transport_spi.c tp->qas ? " QAS" : "", tp 1159 drivers/scsi/scsi_transport_spi.c tp->rd_strm ? " RDSTRM" : "", tp 1160 drivers/scsi/scsi_transport_spi.c tp->rti ? " RTI" : "", tp 1161 drivers/scsi/scsi_transport_spi.c tp->wr_flow ? " WRFLOW" : "", tp 1162 drivers/scsi/scsi_transport_spi.c tp->pcomp_en ? " PCOMP" : "", tp 1163 drivers/scsi/scsi_transport_spi.c tp->hold_mcs ? " HMCS" : "", tp 1164 drivers/scsi/scsi_transport_spi.c tmp, tp->offset); tp 1167 drivers/scsi/scsi_transport_spi.c tp->width ? "wide " : ""); tp 255 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[cp->target]; tp 269 drivers/scsi/sym53c8xx_2/sym_glue.c if ((len & 1) && (tp->head.wval & EWS)) { tp 290 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp; tp 298 drivers/scsi/sym53c8xx_2/sym_glue.c tp = &np->target[sdev->id]; tp 303 drivers/scsi/sym53c8xx_2/sym_glue.c lp = sym_lp(tp, sdev->lun); tp 702 drivers/scsi/sym53c8xx_2/sym_glue.c static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags) tp 704 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_lcb *lp = sym_lp(tp, lun); tp 718 drivers/scsi/sym53c8xx_2/sym_glue.c dev_info(&tp->starget->dev, tp 727 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[sdev->id]; tp 746 drivers/scsi/sym53c8xx_2/sym_glue.c if (tp->usrflags & SYM_SCAN_BOOT_DISABLED) { tp 747 drivers/scsi/sym53c8xx_2/sym_glue.c tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED; tp 754 drivers/scsi/sym53c8xx_2/sym_glue.c if (tp->usrflags & SYM_SCAN_LUNS_DISABLED) { tp 768 drivers/scsi/sym53c8xx_2/sym_glue.c if (tp->nlcb == 1) tp 769 drivers/scsi/sym53c8xx_2/sym_glue.c tp->starget = sdev->sdev_target; tp 771 drivers/scsi/sym53c8xx_2/sym_glue.c spi_min_period(tp->starget) = tp->usr_period; tp 772 drivers/scsi/sym53c8xx_2/sym_glue.c spi_max_width(tp->starget) = tp->usr_width; tp 787 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[sdev->id]; tp 788 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_lcb *lp = sym_lp(tp, sdev->lun); tp 803 drivers/scsi/sym53c8xx_2/sym_glue.c if (reqtags > tp->usrtags) tp 804 drivers/scsi/sym53c8xx_2/sym_glue.c reqtags = tp->usrtags; tp 812 drivers/scsi/sym53c8xx_2/sym_glue.c sym_tune_dev_queuing(tp, sdev->lun, reqtags); tp 823 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[sdev->id]; tp 824 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_lcb *lp = sym_lp(tp, sdev->lun); tp 838 drivers/scsi/sym53c8xx_2/sym_glue.c starget_printk(KERN_WARNING, tp->starget, tp 847 drivers/scsi/sym53c8xx_2/sym_glue.c tp->head.sval = 0; tp 848 drivers/scsi/sym53c8xx_2/sym_glue.c tp->head.wval = np->rv_scntl3; tp 849 drivers/scsi/sym53c8xx_2/sym_glue.c tp->head.uval = 0; tp 850 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 851 drivers/scsi/sym53c8xx_2/sym_glue.c tp->starget = NULL; tp 896 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp; tp 919 drivers/scsi/sym53c8xx_2/sym_glue.c tp = &np->target[t]; tp 920 drivers/scsi/sym53c8xx_2/sym_glue.c if (!tp->nlcb) tp 927 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = tp 928 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.qas = 0; tp 929 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.offset = 0; tp 933 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = tp 934 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.qas = 1; tp 935 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.width = 1; tp 936 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.period = uc->data; tp 937 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.offset = np->maxoffs_dt; tp 941 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = tp 942 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.qas = 0; tp 943 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.period = uc->data; tp 944 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.offset = np->maxoffs; tp 946 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 949 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.width = uc->data ? 1 : 0; tp 950 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 954 drivers/scsi/sym53c8xx_2/sym_glue.c sym_tune_dev_queuing(tp, l, uc->data); tp 957 drivers/scsi/sym53c8xx_2/sym_glue.c tp->to_reset = 1; tp 963 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_lcb *lp = sym_lp(tp, l); tp 970 drivers/scsi/sym53c8xx_2/sym_glue.c tp->usrflags = uc->data; tp 1891 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1893 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.offset = offset; tp 1894 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 1901 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1906 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.dt = 1; tp 1908 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.period = period; tp 1909 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 1916 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1921 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = tp->tgoal.qas = 0; tp 1923 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.width = width; tp 1924 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 1931 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1935 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.dt = 1; tp 1937 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = tp->tgoal.qas = 0; tp 1938 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 1946 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1949 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = tp->tgoal.dt = 1; tp 1951 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.iu = 0; tp 1952 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 1959 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[starget->id]; tp 1962 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.dt = tp->tgoal.qas = 1; tp 1964 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.qas = 0; tp 1965 drivers/scsi/sym53c8xx_2/sym_glue.c tp->tgoal.check_nego = 1; tp 70 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 71 drivers/scsi/sym53c8xx_2/sym_hipd.c dev_info(&tp->starget->dev, "%s: ", label); tp 902 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[i]; tp 904 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->usrflags |= (SYM_DISC_ENABLED | SYM_TAGS_ENABLED); tp 905 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->usrtags = SYM_SETUP_MAX_TAG; tp 906 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->usr_width = np->maxwide; tp 907 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->usr_period = 9; tp 909 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nvram_setup_target(tp, i, nvram); tp 911 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->usrtags) tp 912 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->usrflags &= ~SYM_TAGS_ENABLED; tp 1408 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; tp 1409 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_target *starget = tp->starget; tp 1410 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_trans *goal = &tp->tgoal; tp 1452 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->nego_cp = cp; /* Keep track a nego will be performed */ tp 1645 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; tp 1646 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, cp->lun); tp 1877 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[i]; tp 1879 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->to_reset = 0; tp 1880 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.sval = 0; tp 1881 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.wval = np->rv_scntl3; tp 1882 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.uval = 0; tp 1883 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lun0p) tp 1884 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lun0p->to_clear = 0; tp 1885 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lunmp) { tp 1889 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lunmp[ln]) tp 1890 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lunmp[ln]->to_clear = 0; tp 1936 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 1940 drivers/scsi/sym53c8xx_2/sym_hipd.c sval = tp->head.sval; tp 1941 drivers/scsi/sym53c8xx_2/sym_hipd.c wval = tp->head.wval; tp 1942 drivers/scsi/sym53c8xx_2/sym_hipd.c uval = tp->head.uval; tp 1994 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->head.sval == sval && tp 1995 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.wval == wval && tp 1996 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.uval == uval) tp 1998 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.sval = sval; tp 1999 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.wval = wval; tp 2000 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.uval = uval; tp 2012 drivers/scsi/sym53c8xx_2/sym_hipd.c OUTB(np, nc_sxfer, tp->head.sval); tp 2013 drivers/scsi/sym53c8xx_2/sym_hipd.c OUTB(np, nc_scntl3, tp->head.wval); tp 2016 drivers/scsi/sym53c8xx_2/sym_hipd.c OUTB(np, nc_scntl4, tp->head.uval); tp 2027 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl3 = tp->head.wval; tp 2028 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_sxfer = tp->head.sval; tp 2030 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl4 = tp->head.uval; tp 2035 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_announce_transfer_rate(struct sym_tcb *tp) tp 2037 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_target *starget = tp->starget; tp 2039 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->tprint.period != spi_period(starget) || tp 2040 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.offset != spi_offset(starget) || tp 2041 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.width != spi_width(starget) || tp 2042 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.iu != spi_iu(starget) || tp 2043 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.dt != spi_dt(starget) || tp 2044 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.qas != spi_qas(starget) || tp 2045 drivers/scsi/sym53c8xx_2/sym_hipd.c !tp->tprint.check_nego) { tp 2046 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.period = spi_period(starget); tp 2047 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.offset = spi_offset(starget); tp 2048 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.width = spi_width(starget); tp 2049 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.iu = spi_iu(starget); tp 2050 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.dt = spi_dt(starget); tp 2051 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.qas = spi_qas(starget); tp 2052 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tprint.check_nego = 1; tp 2064 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 2065 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_target *starget = tp->starget; tp 2070 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = NS_WIDE; tp 2072 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = 0; tp 2073 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 0; tp 2074 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.width = wide; tp 2083 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_announce_transfer_rate(tp); tp 2094 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 2095 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_target *starget = tp->starget; tp 2096 drivers/scsi/sym53c8xx_2/sym_hipd.c u_char wide = (tp->head.wval & EWS) ? BUS_16_BIT : BUS_8_BIT; tp 2101 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = NS_WIDE; tp 2103 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = NS_SYNC; tp 2105 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = 0; tp 2110 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->tgoal.dt && !tp->tgoal.iu && !tp->tgoal.qas) { tp 2111 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.period = per; tp 2112 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.offset = ofs; tp 2113 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 0; tp 2116 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_announce_transfer_rate(tp); tp 2127 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 2128 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_target *starget = tp->starget; tp 2133 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = NS_PPR; tp 2135 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = 0; tp 2136 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_width(starget) = tp->tgoal.width = wide; tp 2137 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_period(starget) = tp->tgoal.period = per; tp 2138 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_offset(starget) = tp->tgoal.offset = ofs; tp 2139 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_iu(starget) = tp->tgoal.iu = !!(opts & PPR_OPT_IU); tp 2140 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_dt(starget) = tp->tgoal.dt = !!(opts & PPR_OPT_DT); tp 2141 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_qas(starget) = tp->tgoal.qas = !!(opts & PPR_OPT_QAS); tp 2142 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 0; tp 2144 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_announce_transfer_rate(tp); tp 3273 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = NULL; /* gcc isn't quite smart enough yet */ tp 3289 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[i]; tp 3290 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->to_reset || tp 3291 drivers/scsi/sym53c8xx_2/sym_hipd.c (tp->lun0p && tp->lun0p->to_clear)) { tp 3295 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->lunmp) tp 3298 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lunmp[k] && tp->lunmp[k]->to_clear) { tp 3328 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[target]; tp 3330 drivers/scsi/sym53c8xx_2/sym_hipd.c np->abrt_sel.sel_scntl3 = tp->head.wval; tp 3331 drivers/scsi/sym53c8xx_2/sym_hipd.c np->abrt_sel.sel_sxfer = tp->head.sval; tp 3411 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[target]; tp 3420 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->to_reset) { tp 3423 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->to_reset = 0; tp 3430 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lun0p && tp->lun0p->to_clear) tp 3432 drivers/scsi/sym53c8xx_2/sym_hipd.c else if (tp->lunmp) { tp 3434 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->lunmp[k] && tp->lunmp[k]->to_clear) { tp 3446 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, lun); tp 3522 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[target]; tp 3523 drivers/scsi/sym53c8xx_2/sym_hipd.c starget = tp->starget; tp 3542 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.sval = 0; tp 3543 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.wval = np->rv_scntl3; tp 3544 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.uval = 0; tp 3551 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 1; tp 3552 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.renego = 0; tp 3589 drivers/scsi/sym53c8xx_2/sym_hipd.c dev_info(&tp->starget->dev, "control msgout:"); tp 3745 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_modify_dp(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp, int ofs) tp 4023 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_sync_nego(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp) tp 4062 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 4151 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.period = per; tp 4152 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.offset = ofs; tp 4153 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.width = wide; tp 4154 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.iu = tp->tgoal.dt = tp->tgoal.qas = 0; tp 4155 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 1; tp 4160 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_ppr_nego(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp) tp 4260 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_wide_nego(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp) tp 4290 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->tgoal.offset) { tp 4291 drivers/scsi/sym53c8xx_2/sym_hipd.c spi_populate_sync_msg(np->msgout, tp->tgoal.period, tp 4292 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.offset); tp 4324 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_nego_default(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp) tp 4331 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->tgoal.period < np->minsync) tp 4332 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.period = np->minsync; tp 4333 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->tgoal.offset > np->maxoffs) tp 4334 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.offset = np->maxoffs; tp 4335 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.iu = tp->tgoal.dt = tp->tgoal.qas = 0; tp 4336 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->tgoal.check_nego = 1; tp 4355 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_nego_rejected(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb *cp) tp 4357 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_default(np, tp, cp); tp 4361 drivers/scsi/sym53c8xx_2/sym_hipd.c #define sym_printk(lvl, tp, cp, fmt, v...) do { \ tp 4365 drivers/scsi/sym53c8xx_2/sym_hipd.c starget_printk(lvl, tp->starget, fmt, ##v); \ tp 4377 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[target]; tp 4413 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, tp 4421 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, tp 4429 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, tp 4458 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, tp 4560 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_modify_dp(np, tp, cp, tmp); tp 4563 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_sync_nego(np, tp, cp); tp 4566 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_ppr_nego(np, tp, cp); tp 4569 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_wide_nego(np, tp, cp); tp 4588 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_modify_dp(np, tp, cp, -1); tp 4592 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_rejected(np, tp, cp); tp 4625 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_default(np, tp, cp); tp 4649 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[tn]; tp 4650 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, ln); tp 4774 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; tp 4775 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, cp->lun); tp 4826 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp == tp->nego_cp) tp 4827 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->nego_cp = NULL; tp 4970 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[tn]; tp 4982 drivers/scsi/sym53c8xx_2/sym_hipd.c if (ln && !tp->luntbl) { tp 4983 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->luntbl = sym_calloc_dma(256, "LUNTBL"); tp 4984 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->luntbl) tp 4986 drivers/scsi/sym53c8xx_2/sym_hipd.c memset32(tp->luntbl, cpu_to_scr(vtobus(&np->badlun_sa)), 64); tp 4987 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.luntbl_sa = cpu_to_scr(vtobus(tp->luntbl)); tp 4993 drivers/scsi/sym53c8xx_2/sym_hipd.c if (ln && !tp->lunmp) { tp 4994 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lunmp = kcalloc(SYM_CONF_MAX_LUN, sizeof(struct sym_lcb *), tp 4996 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->lunmp) tp 5008 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lunmp[ln] = lp; tp 5009 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->luntbl[ln] = cpu_to_scr(vtobus(lp)); tp 5012 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lun0p = lp; tp 5013 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.lun0_sa = cpu_to_scr(vtobus(lp)); tp 5015 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->nlcb++; tp 5030 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->user_flags = tp->usrflags & (SYM_DISC_ENABLED | SYM_TAGS_ENABLED); tp 5051 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[tn]; tp 5052 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, ln); tp 5097 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[tn]; tp 5098 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, ln); tp 5100 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->nlcb--; tp 5103 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!tp->nlcb) { tp 5104 drivers/scsi/sym53c8xx_2/sym_hipd.c kfree(tp->lunmp); tp 5105 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_mfree_dma(tp->luntbl, 256, "LUNTBL"); tp 5106 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lunmp = NULL; tp 5107 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->luntbl = NULL; tp 5108 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.luntbl_sa = cpu_to_scr(vtobus(np->badluntbl)); tp 5110 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->luntbl[ln] = cpu_to_scr(vtobus(&np->badlun_sa)); tp 5111 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lunmp[ln] = NULL; tp 5114 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->lun0p = NULL; tp 5115 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->head.lun0_sa = cpu_to_scr(vtobus(&np->badlun_sa)); tp 5125 drivers/scsi/sym53c8xx_2/sym_hipd.c return tp->nlcb; tp 5134 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp; tp 5148 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; tp 5153 drivers/scsi/sym53c8xx_2/sym_hipd.c lp = sym_lp(tp, sdev->lun); tp 5219 drivers/scsi/sym53c8xx_2/sym_hipd.c if ((tp->tgoal.check_nego || tp 5221 drivers/scsi/sym53c8xx_2/sym_hipd.c !tp->nego_cp && lp) { tp 5235 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl3 = tp->head.wval; tp 5236 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_sxfer = tp->head.sval; tp 5237 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl4 = tp->head.uval; tp 5274 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp; tp 5279 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[target]; tp 5280 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->to_reset = 1; tp 5355 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp; tp 5376 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; tp 5377 drivers/scsi/sym53c8xx_2/sym_hipd.c lp = sym_lp(tp, sdev->lun); tp 5484 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp; tp 5504 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; tp 5505 drivers/scsi/sym53c8xx_2/sym_hipd.c lp = sym_lp(tp, cp->lun); tp 5797 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp; tp 5823 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[target]; tp 5824 drivers/scsi/sym53c8xx_2/sym_hipd.c if (tp->luntbl) tp 5825 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_mfree_dma(tp->luntbl, 256, "LUNTBL"); tp 5827 drivers/scsi/sym53c8xx_2/sym_hipd.c kfree(tp->lunmp); tp 568 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL tp 570 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_lp(tp, lun) \ tp 571 drivers/scsi/sym53c8xx_2/sym_hipd.h (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[((u8)lun)] : NULL tp 82 drivers/scsi/sym53c8xx_2/sym_nvram.c sym_Symbios_setup_target(struct sym_tcb *tp, int target, Symbios_nvram *nvram) tp 87 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrtags = 0; tp 89 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrflags &= ~SYM_DISC_ENABLED; tp 91 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrflags |= SYM_SCAN_BOOT_DISABLED; tp 93 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrflags |= SYM_SCAN_LUNS_DISABLED; tp 94 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usr_period = (tn->sync_period + 3) / 4; tp 95 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usr_width = (tn->bus_width == 0x8) ? 0 : 1; tp 106 drivers/scsi/sym53c8xx_2/sym_nvram.c sym_Tekram_setup_target(struct sym_tcb *tp, int target, Tekram_nvram *nvram) tp 111 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrtags = 2 << nvram->max_tags_index; tp 115 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usrflags |= SYM_DISC_ENABLED; tp 118 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usr_period = Tekram_sync[tn->sync_index & 0xf]; tp 119 drivers/scsi/sym53c8xx_2/sym_nvram.c tp->usr_width = (tn->flags & TEKRAM_WIDE_NEGO) ? 1 : 0; tp 125 drivers/scsi/sym53c8xx_2/sym_nvram.c void sym_nvram_setup_target(struct sym_tcb *tp, int target, struct sym_nvram *nvp) tp 129 drivers/scsi/sym53c8xx_2/sym_nvram.c sym_Symbios_setup_target(tp, target, &nvp->data.Symbios); tp 132 drivers/scsi/sym53c8xx_2/sym_nvram.c sym_Tekram_setup_target(tp, target, &nvp->data.Tekram); tp 184 drivers/scsi/sym53c8xx_2/sym_nvram.h void sym_nvram_setup_target (struct sym_tcb *tp, int target, struct sym_nvram *nvp); tp 189 drivers/scsi/sym53c8xx_2/sym_nvram.h static inline void sym_nvram_setup_target(struct sym_tcb *tp, struct sym_nvram *nvram) { } tp 653 drivers/spi/spi-bcm-qspi.c struct qspi_trans tp; tp 664 drivers/spi/spi-bcm-qspi.c tp = qspi->trans_pos; tp 667 drivers/spi/spi-bcm-qspi.c if (tp.trans->bits_per_word <= 8) { tp 668 drivers/spi/spi-bcm-qspi.c u8 *buf = tp.trans->rx_buf; tp 671 drivers/spi/spi-bcm-qspi.c buf[tp.byte] = read_rxram_slot_u8(qspi, slot); tp 673 drivers/spi/spi-bcm-qspi.c buf ? buf[tp.byte] : 0x0); tp 675 drivers/spi/spi-bcm-qspi.c u16 *buf = tp.trans->rx_buf; tp 678 drivers/spi/spi-bcm-qspi.c buf[tp.byte / 2] = read_rxram_slot_u16(qspi, tp 681 drivers/spi/spi-bcm-qspi.c buf ? buf[tp.byte / 2] : 0x0); tp 684 drivers/spi/spi-bcm-qspi.c update_qspi_trans_byte_count(qspi, &tp, tp 688 drivers/spi/spi-bcm-qspi.c qspi->trans_pos = tp; tp 724 drivers/spi/spi-bcm-qspi.c struct qspi_trans tp; tp 729 drivers/spi/spi-bcm-qspi.c tp = qspi->trans_pos; tp 730 drivers/spi/spi-bcm-qspi.c bcm_qspi_update_parms(qspi, spi, tp.trans); tp 734 drivers/spi/spi-bcm-qspi.c if (tp.trans->bits_per_word <= 8) { tp 735 drivers/spi/spi-bcm-qspi.c const u8 *buf = tp.trans->tx_buf; tp 736 drivers/spi/spi-bcm-qspi.c u8 val = buf ? buf[tp.byte] : 0x00; tp 741 drivers/spi/spi-bcm-qspi.c const u16 *buf = tp.trans->tx_buf; tp 742 drivers/spi/spi-bcm-qspi.c u16 val = buf ? buf[tp.byte / 2] : 0x0000; tp 755 drivers/spi/spi-bcm-qspi.c mspi_cdram |= ((tp.trans->bits_per_word <= 8) ? 0 : tp 760 drivers/spi/spi-bcm-qspi.c tstatus = update_qspi_trans_byte_count(qspi, &tp, tp 577 drivers/staging/exfat/exfat.h struct timestamp_t *tp, u8 mode); tp 579 drivers/staging/exfat/exfat.h struct timestamp_t *tp, u8 mode); tp 837 drivers/staging/exfat/exfat.h void fat_get_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 839 drivers/staging/exfat/exfat.h void exfat_get_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 841 drivers/staging/exfat/exfat.h void fat_set_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 843 drivers/staging/exfat/exfat.h void exfat_set_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 1139 drivers/staging/exfat/exfat_core.c void fat_get_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 1156 drivers/staging/exfat/exfat_core.c tp->sec = (t & 0x001F) << 1; tp 1157 drivers/staging/exfat/exfat_core.c tp->min = (t >> 5) & 0x003F; tp 1158 drivers/staging/exfat/exfat_core.c tp->hour = (t >> 11); tp 1159 drivers/staging/exfat/exfat_core.c tp->day = (d & 0x001F); tp 1160 drivers/staging/exfat/exfat_core.c tp->mon = (d >> 5) & 0x000F; tp 1161 drivers/staging/exfat/exfat_core.c tp->year = (d >> 9); tp 1164 drivers/staging/exfat/exfat_core.c void exfat_get_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 1185 drivers/staging/exfat/exfat_core.c tp->sec = (t & 0x001F) << 1; tp 1186 drivers/staging/exfat/exfat_core.c tp->min = (t >> 5) & 0x003F; tp 1187 drivers/staging/exfat/exfat_core.c tp->hour = (t >> 11); tp 1188 drivers/staging/exfat/exfat_core.c tp->day = (d & 0x001F); tp 1189 drivers/staging/exfat/exfat_core.c tp->mon = (d >> 5) & 0x000F; tp 1190 drivers/staging/exfat/exfat_core.c tp->year = (d >> 9); tp 1193 drivers/staging/exfat/exfat_core.c void fat_set_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 1199 drivers/staging/exfat/exfat_core.c t = (tp->hour << 11) | (tp->min << 5) | (tp->sec >> 1); tp 1200 drivers/staging/exfat/exfat_core.c d = (tp->year << 9) | (tp->mon << 5) | tp->day; tp 1214 drivers/staging/exfat/exfat_core.c void exfat_set_entry_time(struct dentry_t *p_entry, struct timestamp_t *tp, tp 1220 drivers/staging/exfat/exfat_core.c t = (tp->hour << 11) | (tp->min << 5) | (tp->sec >> 1); tp 1221 drivers/staging/exfat/exfat_core.c d = (tp->year << 9) | (tp->mon << 5) | tp->day; tp 1385 drivers/staging/exfat/exfat_core.c struct timestamp_t tm, *tp; tp 1392 drivers/staging/exfat/exfat_core.c tp = tm_current(&tm); tp 1393 drivers/staging/exfat/exfat_core.c fat_set_entry_time((struct dentry_t *)ep, tp, TM_CREATE); tp 1394 drivers/staging/exfat/exfat_core.c fat_set_entry_time((struct dentry_t *)ep, tp, TM_MODIFY); tp 1449 drivers/staging/exfat/exfat_core.c struct timestamp_t tm, *tp; tp 1453 drivers/staging/exfat/exfat_core.c tp = tm_current(&tm); tp 1454 drivers/staging/exfat/exfat_core.c exfat_set_entry_time((struct dentry_t *)ep, tp, TM_CREATE); tp 1455 drivers/staging/exfat/exfat_core.c exfat_set_entry_time((struct dentry_t *)ep, tp, TM_MODIFY); tp 1456 drivers/staging/exfat/exfat_core.c exfat_set_entry_time((struct dentry_t *)ep, tp, TM_ACCESS); tp 60 drivers/staging/exfat/exfat_super.c static void exfat_time_fat2unix(struct timespec64 *ts, struct date_time_t *tp) tp 62 drivers/staging/exfat/exfat_super.c ts->tv_sec = mktime64(tp->Year + 1980, tp->Month + 1, tp->Day, tp 63 drivers/staging/exfat/exfat_super.c tp->Hour, tp->Minute, tp->Second); tp 65 drivers/staging/exfat/exfat_super.c ts->tv_nsec = tp->MilliSecond * NSEC_PER_MSEC; tp 69 drivers/staging/exfat/exfat_super.c static void exfat_time_unix2fat(struct timespec64 *ts, struct date_time_t *tp) tp 77 drivers/staging/exfat/exfat_super.c tp->MilliSecond = 0; tp 78 drivers/staging/exfat/exfat_super.c tp->Second = 0; tp 79 drivers/staging/exfat/exfat_super.c tp->Minute = 0; tp 80 drivers/staging/exfat/exfat_super.c tp->Hour = 0; tp 81 drivers/staging/exfat/exfat_super.c tp->Day = 1; tp 82 drivers/staging/exfat/exfat_super.c tp->Month = 1; tp 83 drivers/staging/exfat/exfat_super.c tp->Year = 0; tp 88 drivers/staging/exfat/exfat_super.c tp->MilliSecond = 999; tp 89 drivers/staging/exfat/exfat_super.c tp->Second = 59; tp 90 drivers/staging/exfat/exfat_super.c tp->Minute = 59; tp 91 drivers/staging/exfat/exfat_super.c tp->Hour = 23; tp 92 drivers/staging/exfat/exfat_super.c tp->Day = 31; tp 93 drivers/staging/exfat/exfat_super.c tp->Month = 12; tp 94 drivers/staging/exfat/exfat_super.c tp->Year = 127; tp 98 drivers/staging/exfat/exfat_super.c tp->MilliSecond = ts->tv_nsec / NSEC_PER_MSEC; tp 99 drivers/staging/exfat/exfat_super.c tp->Second = tm.tm_sec; tp 100 drivers/staging/exfat/exfat_super.c tp->Minute = tm.tm_min; tp 101 drivers/staging/exfat/exfat_super.c tp->Hour = tm.tm_hour; tp 102 drivers/staging/exfat/exfat_super.c tp->Day = tm.tm_mday; tp 103 drivers/staging/exfat/exfat_super.c tp->Month = tm.tm_mon + 1; tp 104 drivers/staging/exfat/exfat_super.c tp->Year = tm.tm_year + 1900 - 1980; tp 107 drivers/staging/exfat/exfat_super.c struct timestamp_t *tm_current(struct timestamp_t *tp) tp 115 drivers/staging/exfat/exfat_super.c tp->sec = 0; tp 116 drivers/staging/exfat/exfat_super.c tp->min = 0; tp 117 drivers/staging/exfat/exfat_super.c tp->hour = 0; tp 118 drivers/staging/exfat/exfat_super.c tp->day = 1; tp 119 drivers/staging/exfat/exfat_super.c tp->mon = 1; tp 120 drivers/staging/exfat/exfat_super.c tp->year = 0; tp 121 drivers/staging/exfat/exfat_super.c return tp; tp 125 drivers/staging/exfat/exfat_super.c tp->sec = 59; tp 126 drivers/staging/exfat/exfat_super.c tp->min = 59; tp 127 drivers/staging/exfat/exfat_super.c tp->hour = 23; tp 128 drivers/staging/exfat/exfat_super.c tp->day = 31; tp 129 drivers/staging/exfat/exfat_super.c tp->mon = 12; tp 130 drivers/staging/exfat/exfat_super.c tp->year = 127; tp 131 drivers/staging/exfat/exfat_super.c return tp; tp 134 drivers/staging/exfat/exfat_super.c tp->sec = tm.tm_sec; tp 135 drivers/staging/exfat/exfat_super.c tp->min = tm.tm_min; tp 136 drivers/staging/exfat/exfat_super.c tp->hour = tm.tm_hour; tp 137 drivers/staging/exfat/exfat_super.c tp->day = tm.tm_mday; tp 138 drivers/staging/exfat/exfat_super.c tp->mon = tm.tm_mon + 1; tp 139 drivers/staging/exfat/exfat_super.c tp->year = tm.tm_year + 1900 - 1980; tp 141 drivers/staging/exfat/exfat_super.c return tp; tp 1735 drivers/tty/ipwireless/hardware.c struct ipw_tx_packet *tp, *tq; tp 1745 drivers/tty/ipwireless/hardware.c list_for_each_entry_safe(tp, tq, &hw->tx_queue[i], queue) { tp 1746 drivers/tty/ipwireless/hardware.c list_del(&tp->queue); tp 1747 drivers/tty/ipwireless/hardware.c kfree(tp); tp 512 drivers/tty/serial/jsm/jsm_tty.c struct tty_struct *tp; tp 526 drivers/tty/serial/jsm/jsm_tty.c tp = port->tty; tp 556 drivers/tty/serial/jsm/jsm_tty.c if (!tp || !C_CREAD(tp)) { tp 604 drivers/tty/serial/jsm/jsm_tty.c if (I_PARMRK(tp) || I_BRKINT(tp) || I_INPCK(tp)) { tp 1182 drivers/tty/tty_io.c struct ktermios *tp; tp 1189 drivers/tty/tty_io.c tp = tty->driver->termios[idx]; tp 1190 drivers/tty/tty_io.c if (tp != NULL) { tp 1191 drivers/tty/tty_io.c tty->termios = *tp; tp 1394 drivers/tty/tty_io.c struct ktermios *tp; tp 1402 drivers/tty/tty_io.c tp = tty->driver->termios[idx]; tp 1403 drivers/tty/tty_io.c if (tp == NULL) { tp 1404 drivers/tty/tty_io.c tp = kmalloc(sizeof(struct ktermios), GFP_KERNEL); tp 1405 drivers/tty/tty_io.c if (tp == NULL) tp 1407 drivers/tty/tty_io.c tty->driver->termios[idx] = tp; tp 1409 drivers/tty/tty_io.c *tp = tty->termios; tp 3111 drivers/tty/tty_io.c struct ktermios *tp; tp 3149 drivers/tty/tty_io.c tp = driver->termios[index]; tp 3150 drivers/tty/tty_io.c if (tp) { tp 3152 drivers/tty/tty_io.c kfree(tp); tp 3267 drivers/tty/tty_io.c struct ktermios *tp; tp 3271 drivers/tty/tty_io.c tp = driver->termios[i]; tp 3272 drivers/tty/tty_io.c if (tp) { tp 3274 drivers/tty/tty_io.c kfree(tp); tp 66 fs/jfs/jfs_dmap.c static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval); tp 67 fs/jfs/jfs_dmap.c static int dbBackSplit(dmtree_t * tp, int leafno); tp 68 fs/jfs/jfs_dmap.c static int dbJoin(dmtree_t * tp, int leafno, int newval); tp 69 fs/jfs/jfs_dmap.c static void dbAdjTree(dmtree_t * tp, int leafno, int newval); tp 90 fs/jfs/jfs_dmap.c static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx); tp 2168 fs/jfs/jfs_dmap.c dmtree_t *tp = (dmtree_t *) & dp->tree; tp 2218 fs/jfs/jfs_dmap.c dbSplit(tp, word, BUDMIN, tp 2259 fs/jfs/jfs_dmap.c dbSplit(tp, word, size, NOFREE); tp 2315 fs/jfs/jfs_dmap.c dmtree_t *tp = (dmtree_t *) & dp->tree; tp 2365 fs/jfs/jfs_dmap.c rc = dbJoin(tp, word, tp 2399 fs/jfs/jfs_dmap.c rc = dbJoin(tp, word, size); tp 2647 fs/jfs/jfs_dmap.c static void dbSplit(dmtree_t * tp, int leafno, int splitsz, int newval) tp 2651 fs/jfs/jfs_dmap.c s8 *leaf = tp->dmt_stree + le32_to_cpu(tp->dmt_leafidx); tp 2655 fs/jfs/jfs_dmap.c if (leaf[leafno] > tp->dmt_budmin) { tp 2662 fs/jfs/jfs_dmap.c budsz = BUDSIZE(cursz, tp->dmt_budmin); tp 2669 fs/jfs/jfs_dmap.c dbAdjTree(tp, leafno ^ budsz, cursz); tp 2681 fs/jfs/jfs_dmap.c dbAdjTree(tp, leafno, newval); tp 2712 fs/jfs/jfs_dmap.c static int dbBackSplit(dmtree_t * tp, int leafno) tp 2716 fs/jfs/jfs_dmap.c s8 *leaf = tp->dmt_stree + le32_to_cpu(tp->dmt_leafidx); tp 2731 fs/jfs/jfs_dmap.c LITOL2BSZ(leafno, le32_to_cpu(tp->dmt_l2nleafs), tp 2732 fs/jfs/jfs_dmap.c tp->dmt_budmin); tp 2738 fs/jfs/jfs_dmap.c budsz = BUDSIZE(size, tp->dmt_budmin); tp 2747 fs/jfs/jfs_dmap.c if (bsz >= le32_to_cpu(tp->dmt_nleafs)) { tp 2763 fs/jfs/jfs_dmap.c dbSplit(tp, bud, cursz, cursz); tp 2791 fs/jfs/jfs_dmap.c static int dbJoin(dmtree_t * tp, int leafno, int newval) tp 2798 fs/jfs/jfs_dmap.c if (newval >= tp->dmt_budmin) { tp 2801 fs/jfs/jfs_dmap.c leaf = tp->dmt_stree + le32_to_cpu(tp->dmt_leafidx); tp 2816 fs/jfs/jfs_dmap.c budsz = BUDSIZE(newval, tp->dmt_budmin); tp 2820 fs/jfs/jfs_dmap.c while (budsz < le32_to_cpu(tp->dmt_nleafs)) { tp 2846 fs/jfs/jfs_dmap.c dbAdjTree(tp, buddy, NOFREE); tp 2851 fs/jfs/jfs_dmap.c dbAdjTree(tp, leafno, NOFREE); tp 2864 fs/jfs/jfs_dmap.c dbAdjTree(tp, leafno, newval); tp 2885 fs/jfs/jfs_dmap.c static void dbAdjTree(dmtree_t * tp, int leafno, int newval) tp 2892 fs/jfs/jfs_dmap.c lp = leafno + le32_to_cpu(tp->dmt_leafidx); tp 2897 fs/jfs/jfs_dmap.c if (tp->dmt_stree[lp] == newval) tp 2902 fs/jfs/jfs_dmap.c tp->dmt_stree[lp] = newval; tp 2906 fs/jfs/jfs_dmap.c for (k = 0; k < le32_to_cpu(tp->dmt_height); k++) { tp 2918 fs/jfs/jfs_dmap.c max = TREEMAX(&tp->dmt_stree[lp]); tp 2923 fs/jfs/jfs_dmap.c if (tp->dmt_stree[pp] == max) tp 2928 fs/jfs/jfs_dmap.c tp->dmt_stree[pp] = max; tp 2959 fs/jfs/jfs_dmap.c static int dbFindLeaf(dmtree_t * tp, int l2nb, int *leafidx) tp 2966 fs/jfs/jfs_dmap.c if (l2nb > tp->dmt_stree[ROOT]) tp 2973 fs/jfs/jfs_dmap.c for (k = le32_to_cpu(tp->dmt_height), ti = 1; tp 2982 fs/jfs/jfs_dmap.c if (l2nb <= tp->dmt_stree[x + n]) tp 2995 fs/jfs/jfs_dmap.c *leafidx = x + n - le32_to_cpu(tp->dmt_leafidx); tp 3256 fs/jfs/jfs_dmap.c struct dmaptree *tp = (struct dmaptree *) & dp->tree; tp 3261 fs/jfs/jfs_dmap.c oldroot = tp->stree[ROOT]; tp 3340 fs/jfs/jfs_dmap.c if (tp->stree[ROOT] == oldroot) tp 3347 fs/jfs/jfs_dmap.c if ((rc = dbAdjCtl(bmp, blkno, tp->stree[ROOT], 1, 0))) tp 3838 fs/jfs/jfs_dmap.c struct dmaptree *tp; tp 3843 fs/jfs/jfs_dmap.c tp = &dp->tree; tp 3844 fs/jfs/jfs_dmap.c tp->nleafs = cpu_to_le32(LPERDMAP); tp 3845 fs/jfs/jfs_dmap.c tp->l2nleafs = cpu_to_le32(L2LPERDMAP); tp 3846 fs/jfs/jfs_dmap.c tp->leafidx = cpu_to_le32(LEAFIND); tp 3847 fs/jfs/jfs_dmap.c tp->height = cpu_to_le32(4); tp 3848 fs/jfs/jfs_dmap.c tp->budmin = BUDMIN; tp 3854 fs/jfs/jfs_dmap.c cp = tp->stree + le32_to_cpu(tp->leafidx); tp 3859 fs/jfs/jfs_dmap.c return (dbInitTree(tp)); tp 3886 fs/jfs/jfs_dmap.c s8 *tp, *cp, *cp1; tp 3888 fs/jfs/jfs_dmap.c tp = dtp->stree; tp 3913 fs/jfs/jfs_dmap.c for (i = 0, cp = tp + le32_to_cpu(dtp->leafidx); tp 3943 fs/jfs/jfs_dmap.c for (i = 0, cp = tp + child, cp1 = tp + parent; tp 3948 fs/jfs/jfs_dmap.c return (*tp); tp 1917 fs/nfs/nfs4xdr.c struct nfs4_slot_table *tp; tp 1921 fs/nfs/nfs4xdr.c tp = slot->table; tp 1922 fs/nfs/nfs4xdr.c session = tp->session; tp 1939 fs/nfs/nfs4xdr.c tp->highest_used_slotid, args->sa_cache_this); tp 1944 fs/nfs/nfs4xdr.c *p++ = cpu_to_be32(tp->highest_used_slotid); tp 2270 fs/proc/base.c struct timers_private *tp = m->private; tp 2272 fs/proc/base.c tp->task = get_pid_task(tp->pid, PIDTYPE_PID); tp 2273 fs/proc/base.c if (!tp->task) tp 2276 fs/proc/base.c tp->sighand = lock_task_sighand(tp->task, &tp->flags); tp 2277 fs/proc/base.c if (!tp->sighand) tp 2280 fs/proc/base.c return seq_list_start(&tp->task->signal->posix_timers, *pos); tp 2285 fs/proc/base.c struct timers_private *tp = m->private; tp 2286 fs/proc/base.c return seq_list_next(v, &tp->task->signal->posix_timers, pos); tp 2291 fs/proc/base.c struct timers_private *tp = m->private; tp 2293 fs/proc/base.c if (tp->sighand) { tp 2294 fs/proc/base.c unlock_task_sighand(tp->task, &tp->flags); tp 2295 fs/proc/base.c tp->sighand = NULL; tp 2298 fs/proc/base.c if (tp->task) { tp 2299 fs/proc/base.c put_task_struct(tp->task); tp 2300 fs/proc/base.c tp->task = NULL; tp 2307 fs/proc/base.c struct timers_private *tp = m->private; tp 2325 fs/proc/base.c pid_nr_ns(timer->it_pid, tp->ns)); tp 2340 fs/proc/base.c struct timers_private *tp; tp 2342 fs/proc/base.c tp = __seq_open_private(file, &proc_timers_seq_ops, tp 2344 fs/proc/base.c if (!tp) tp 2347 fs/proc/base.c tp->pid = proc_pid(inode); tp 2348 fs/proc/base.c tp->ns = proc_pid_ns(inode); tp 1396 fs/ufs/super.c const struct match_token *tp = tokens; tp 1398 fs/ufs/super.c while (tp->token != Opt_onerror_panic && tp->token != mval) tp 1399 fs/ufs/super.c ++tp; tp 1400 fs/ufs/super.c BUG_ON(tp->token == Opt_onerror_panic); tp 1401 fs/ufs/super.c seq_printf(seq, ",%s", tp->pattern); tp 1404 fs/ufs/super.c while (tp->token != Opt_err && tp->token != mval) tp 1405 fs/ufs/super.c ++tp; tp 1406 fs/ufs/super.c BUG_ON(tp->token == Opt_err); tp 1407 fs/ufs/super.c seq_printf(seq, ",%s", tp->pattern); tp 486 fs/xfs/libxfs/xfs_ag.c struct xfs_trans *tp, tp 498 fs/xfs/libxfs/xfs_ag.c error = xfs_ialloc_read_agi(mp, tp, id->agno, &bp); tp 506 fs/xfs/libxfs/xfs_ag.c xfs_ialloc_log_agi(tp, bp, XFS_AGI_LENGTH); tp 511 fs/xfs/libxfs/xfs_ag.c error = xfs_alloc_read_agf(mp, tp, id->agno, 0, &bp); tp 518 fs/xfs/libxfs/xfs_ag.c xfs_alloc_log_agf(tp, bp, XFS_AGF_LENGTH); tp 526 fs/xfs/libxfs/xfs_ag.c error = xfs_rmap_free(tp, bp, id->agno, tp 532 fs/xfs/libxfs/xfs_ag.c return xfs_free_extent(tp, XFS_AGB_TO_FSB(mp, id->agno, tp 27 fs/xfs/libxfs/xfs_ag.h int xfs_ag_extend_space(struct xfs_mount *mp, struct xfs_trans *tp, tp 244 fs/xfs/libxfs/xfs_ag_resv.c struct xfs_trans *tp) tp 256 fs/xfs/libxfs/xfs_ag_resv.c error = xfs_refcountbt_calc_reserves(mp, tp, agno, &ask, &used); tp 260 fs/xfs/libxfs/xfs_ag_resv.c error = xfs_finobt_calc_reserves(mp, tp, agno, &ask, &used); tp 278 fs/xfs/libxfs/xfs_ag_resv.c error = xfs_refcountbt_calc_reserves(mp, tp, agno, &ask, tp 294 fs/xfs/libxfs/xfs_ag_resv.c error = xfs_rmapbt_calc_reserves(mp, tp, agno, &ask, &used); tp 305 fs/xfs/libxfs/xfs_ag_resv.c error = xfs_alloc_pagf_init(pag->pag_mount, tp, pag->pag_agno, 0); tp 343 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(args->tp, field, -(int64_t)args->len); tp 352 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(args->tp, XFS_TRANS_SB_RES_FDBLOCKS, -(int64_t)len); tp 355 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(args->tp, XFS_TRANS_SB_FDBLOCKS, tp 364 fs/xfs/libxfs/xfs_ag_resv.c struct xfs_trans *tp, tp 383 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, (int64_t)len); tp 392 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_RES_FDBLOCKS, len); tp 395 fs/xfs/libxfs/xfs_ag_resv.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, len - leftover); tp 10 fs/xfs/libxfs/xfs_ag_resv.h int xfs_ag_resv_init(struct xfs_perag *pag, struct xfs_trans *tp); tp 19 fs/xfs/libxfs/xfs_ag_resv.h struct xfs_trans *tp, xfs_extlen_t len); tp 654 fs/xfs/libxfs/xfs_alloc.c xfs_trans_t *tp, /* transaction pointer */ tp 663 fs/xfs/libxfs/xfs_alloc.c mp, tp, mp->m_ddev_targp, tp 675 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 685 fs/xfs/libxfs/xfs_alloc.c xfs_trans_agblocks_delta(tp, len); tp 690 fs/xfs/libxfs/xfs_alloc.c xfs_alloc_log_agf(tp, agbp, XFS_AGF_FREEBLKS); tp 740 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_get_freelist(args->tp, args->agbp, &fbno, 0); tp 752 fs/xfs/libxfs/xfs_alloc.c bp = xfs_btree_get_bufs(args->mp, args->tp, args->agno, fbno); tp 757 fs/xfs/libxfs/xfs_alloc.c xfs_trans_binval(args->tp, bp); tp 771 fs/xfs/libxfs/xfs_alloc.c error = xfs_rmap_free(args->tp, args->agbp, args->agno, fbno, 1, tp 848 fs/xfs/libxfs/xfs_alloc.c error = xfs_rmap_alloc(args->tp, args->agbp, args->agno, tp 855 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_update_counters(args->tp, args->pag, tp 898 fs/xfs/libxfs/xfs_alloc.c bno_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 955 fs/xfs/libxfs/xfs_alloc.c cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 1143 fs/xfs/libxfs/xfs_alloc.c cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 1268 fs/xfs/libxfs/xfs_alloc.c bno_cur_lt = xfs_allocbt_init_cursor(args->mp, args->tp, tp 1297 fs/xfs/libxfs/xfs_alloc.c bno_cur_lt = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 1508 fs/xfs/libxfs/xfs_alloc.c cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 1650 fs/xfs/libxfs/xfs_alloc.c bno_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp, tp 1687 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 1711 fs/xfs/libxfs/xfs_alloc.c mp = tp->t_mountp; tp 1714 fs/xfs/libxfs/xfs_alloc.c error = xfs_rmap_free(tp, agbp, agno, bno, len, oinfo); tp 1722 fs/xfs/libxfs/xfs_alloc.c bno_cur = xfs_allocbt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_BNO); tp 1781 fs/xfs/libxfs/xfs_alloc.c cnt_cur = xfs_allocbt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_CNT); tp 1920 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_update_counters(tp, pag, agbp, len); tp 1921 fs/xfs/libxfs/xfs_alloc.c xfs_ag_resv_free_extent(pag, type, tp, len); tp 2075 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 2084 fs/xfs/libxfs/xfs_alloc.c error = xfs_free_ag_extent(tp, agbp, agno, agbno, 1, oinfo, tp 2089 fs/xfs/libxfs/xfs_alloc.c bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno); tp 2092 fs/xfs/libxfs/xfs_alloc.c xfs_trans_binval(tp, bp); tp 2159 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 2163 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = tp->t_mountp; tp 2177 fs/xfs/libxfs/xfs_alloc.c xfs_alloc_log_agf(tp, agbp, XFS_AGF_FLFIRST | XFS_AGF_FLLAST | tp 2197 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 2202 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = tp->t_mountp; tp 2215 fs/xfs/libxfs/xfs_alloc.c xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_AGFL_FREE, &new->xefi_list); tp 2229 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp = args->tp; tp 2238 fs/xfs/libxfs/xfs_alloc.c ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); tp 2241 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_read_agf(mp, tp, args->agno, flags, &agbp); tp 2272 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_read_agf(mp, tp, args->agno, flags, &agbp); tp 2284 fs/xfs/libxfs/xfs_alloc.c xfs_agfl_reset(tp, agbp, pag); tp 2322 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_get_freelist(tp, agbp, &bno, 0); tp 2327 fs/xfs/libxfs/xfs_alloc.c xfs_defer_agfl_block(tp, args->agno, bno, &targs.oinfo); tp 2330 fs/xfs/libxfs/xfs_alloc.c targs.tp = tp; tp 2337 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_read_agfl(mp, tp, targs.agno, &agflbp); tp 2366 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_put_freelist(tp, agbp, tp 2372 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, agflbp); tp 2377 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, agflbp); tp 2380 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, agbp); tp 2392 fs/xfs/libxfs/xfs_alloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2403 fs/xfs/libxfs/xfs_alloc.c xfs_mount_t *mp = tp->t_mountp; tp 2417 fs/xfs/libxfs/xfs_alloc.c error = xfs_alloc_read_agfl(mp, tp, be32_to_cpu(agf->agf_seqno), tp 2429 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, agflbp); tp 2436 fs/xfs/libxfs/xfs_alloc.c xfs_trans_agflist_delta(tp, -1); tp 2447 fs/xfs/libxfs/xfs_alloc.c xfs_alloc_log_agf(tp, agbp, logflags); tp 2458 fs/xfs/libxfs/xfs_alloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2487 fs/xfs/libxfs/xfs_alloc.c trace_xfs_agf(tp->t_mountp, XFS_BUF_TO_AGF(bp), fields, _RET_IP_); tp 2489 fs/xfs/libxfs/xfs_alloc.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_AGF_BUF); tp 2492 fs/xfs/libxfs/xfs_alloc.c xfs_trans_log_buf(tp, bp, (uint)first, (uint)last); tp 2501 fs/xfs/libxfs/xfs_alloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2508 fs/xfs/libxfs/xfs_alloc.c if ((error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp))) tp 2511 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, bp); tp 2520 fs/xfs/libxfs/xfs_alloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2536 fs/xfs/libxfs/xfs_alloc.c mp = tp->t_mountp; tp 2538 fs/xfs/libxfs/xfs_alloc.c if (!agflbp && (error = xfs_alloc_read_agfl(mp, tp, tp 2548 fs/xfs/libxfs/xfs_alloc.c xfs_trans_agflist_delta(tp, 1); tp 2559 fs/xfs/libxfs/xfs_alloc.c xfs_alloc_log_agf(tp, agbp, logflags); tp 2568 fs/xfs/libxfs/xfs_alloc.c xfs_alloc_log_agf(tp, agbp, logflags); tp 2570 fs/xfs/libxfs/xfs_alloc.c xfs_trans_buf_set_type(tp, agflbp, XFS_BLFT_AGFL_BUF); tp 2571 fs/xfs/libxfs/xfs_alloc.c xfs_trans_log_buf(tp, agflbp, startoff, tp 2688 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, /* transaction pointer */ tp 2699 fs/xfs/libxfs/xfs_alloc.c mp, tp, mp->m_ddev_targp, tp 2718 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, /* transaction pointer */ tp 2730 fs/xfs/libxfs/xfs_alloc.c error = xfs_read_agf(mp, tp, agno, tp 2909 fs/xfs/libxfs/xfs_alloc.c if (args->tp->t_firstblock != NULLFSBLOCK) tp 2977 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 2985 fs/xfs/libxfs/xfs_alloc.c args.tp = tp; tp 2986 fs/xfs/libxfs/xfs_alloc.c args.mp = tp->t_mountp; tp 3016 fs/xfs/libxfs/xfs_alloc.c struct xfs_trans *tp, tp 3023 fs/xfs/libxfs/xfs_alloc.c struct xfs_mount *mp = tp->t_mountp; tp 3037 fs/xfs/libxfs/xfs_alloc.c error = xfs_free_extent_fix_freelist(tp, agno, &agbp); tp 3048 fs/xfs/libxfs/xfs_alloc.c error = xfs_free_ag_extent(tp, agbp, agno, agbno, len, oinfo, type); tp 3054 fs/xfs/libxfs/xfs_alloc.c xfs_extent_busy_insert(tp, agno, agbno, len, busy_flags); tp 3058 fs/xfs/libxfs/xfs_alloc.c xfs_trans_brelse(tp, agbp); tp 53 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp; /* transaction pointer */ tp 124 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 134 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 144 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 153 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 165 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 182 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, /* transaction pointer */ tp 191 fs/xfs/libxfs/xfs_alloc.h struct xfs_trans *tp, tp 197 fs/xfs/libxfs/xfs_alloc.h return __xfs_free_extent(tp, bno, len, oinfo, type, false); tp 221 fs/xfs/libxfs/xfs_alloc.h int xfs_read_agf(struct xfs_mount *mp, struct xfs_trans *tp, tp 223 fs/xfs/libxfs/xfs_alloc.h int xfs_alloc_read_agfl(struct xfs_mount *mp, struct xfs_trans *tp, tp 228 fs/xfs/libxfs/xfs_alloc.h int xfs_free_extent_fix_freelist(struct xfs_trans *tp, xfs_agnumber_t agno, tp 480 fs/xfs/libxfs/xfs_alloc_btree.c struct xfs_trans *tp, /* transaction pointer */ tp 492 fs/xfs/libxfs/xfs_alloc_btree.c cur->bc_tp = tp; tp 116 fs/xfs/libxfs/xfs_attr.h struct xfs_trans *tp; tp 367 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_trans *tp, tp 375 fs/xfs/libxfs/xfs_attr_leaf.c err = xfs_da_read_buf(tp, dp, bno, mappedbno, bpp, tp 377 fs/xfs/libxfs/xfs_attr_leaf.c if (!err && tp && *bpp) tp 378 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_ATTR_LEAF_BUF); tp 547 fs/xfs/libxfs/xfs_attr_leaf.c xfs_sbversion_add_attr2(xfs_mount_t *mp, xfs_trans_t *tp) tp 555 fs/xfs/libxfs/xfs_attr_leaf.c xfs_log_sb(tp); tp 653 fs/xfs/libxfs/xfs_attr_leaf.c struct xfs_trans *tp) tp 662 fs/xfs/libxfs/xfs_attr_leaf.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 45 fs/xfs/libxfs/xfs_attr_leaf.h void xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp); tp 87 fs/xfs/libxfs/xfs_attr_leaf.h int xfs_attr3_leaf_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 531 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 539 fs/xfs/libxfs/xfs_bmap.c struct xfs_mount *mp = tp->t_mountp; tp 564 fs/xfs/libxfs/xfs_bmap.c trace_xfs_bmap_free_defer(tp->t_mountp, tp 565 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGNO(tp->t_mountp, bno), 0, tp 566 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGBNO(tp->t_mountp, bno), len); tp 567 fs/xfs/libxfs/xfs_bmap.c xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_FREE, &new->xefi_list); tp 583 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 617 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, tp, cbno, &cbp, XFS_BMAP_BTREE_REF, tp 627 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); tp 628 fs/xfs/libxfs/xfs_bmap.c xfs_trans_binval(tp, cbp); tp 645 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 689 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 696 fs/xfs/libxfs/xfs_bmap.c args.tp = tp; tp 699 fs/xfs/libxfs/xfs_bmap.c if (tp->t_firstblock == NULLFSBLOCK) { tp 702 fs/xfs/libxfs/xfs_bmap.c } else if (tp->t_flags & XFS_TRANS_LOWMODE) { tp 704 fs/xfs/libxfs/xfs_bmap.c args.fsbno = tp->t_firstblock; tp 707 fs/xfs/libxfs/xfs_bmap.c args.fsbno = tp->t_firstblock; tp 724 fs/xfs/libxfs/xfs_bmap.c ASSERT(tp->t_firstblock == NULLFSBLOCK || tp 725 fs/xfs/libxfs/xfs_bmap.c args.agno >= XFS_FSB_TO_AGNO(mp, tp->t_firstblock)); tp 726 fs/xfs/libxfs/xfs_bmap.c tp->t_firstblock = args.fsbno; tp 729 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L); tp 730 fs/xfs/libxfs/xfs_bmap.c abp = xfs_btree_get_bufl(mp, tp, args.fsbno); tp 777 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); tp 795 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 812 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 818 fs/xfs/libxfs/xfs_bmap.c xfs_trans_t *tp, /* transaction pointer */ tp 823 fs/xfs/libxfs/xfs_bmap.c void (*init_fn)(struct xfs_trans *tp, tp 845 fs/xfs/libxfs/xfs_bmap.c xfs_bmap_local_to_extents_empty(tp, ip, whichfork); tp 854 fs/xfs/libxfs/xfs_bmap.c args.tp = tp; tp 861 fs/xfs/libxfs/xfs_bmap.c if (tp->t_firstblock == NULLFSBLOCK) { tp 865 fs/xfs/libxfs/xfs_bmap.c args.fsbno = tp->t_firstblock; tp 877 fs/xfs/libxfs/xfs_bmap.c tp->t_firstblock = args.fsbno; tp 878 fs/xfs/libxfs/xfs_bmap.c bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno); tp 888 fs/xfs/libxfs/xfs_bmap.c init_fn(tp, bp, ip, ifp); tp 892 fs/xfs/libxfs/xfs_bmap.c xfs_bmap_local_to_extents_empty(tp, ip, whichfork); tp 907 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(tp, ip, tp 921 fs/xfs/libxfs/xfs_bmap.c xfs_trans_t *tp, /* transaction pointer */ tp 934 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, XFS_DATA_FORK); tp 960 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 970 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, flags, tp 992 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 1007 fs/xfs/libxfs/xfs_bmap.c dargs.trans = tp; tp 1012 fs/xfs/libxfs/xfs_bmap.c return xfs_bmap_local_to_extents(tp, ip, 1, flags, tp 1060 fs/xfs/libxfs/xfs_bmap.c xfs_trans_t *tp; /* transaction pointer */ tp 1074 fs/xfs/libxfs/xfs_bmap.c rsvd ? XFS_TRANS_RESERVE : 0, &tp); tp 1079 fs/xfs/libxfs/xfs_bmap.c error = xfs_trans_reserve_quota_nblks(tp, ip, blks, 0, rsvd ? tp 1098 fs/xfs/libxfs/xfs_bmap.c xfs_trans_ijoin(tp, ip, 0); tp 1099 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1109 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_attrfork_local(tp, ip, &logflags); tp 1112 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_attrfork_extents(tp, ip, &logflags); tp 1115 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_attrfork_btree(tp, ip, &logflags); tp 1122 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 1140 fs/xfs/libxfs/xfs_bmap.c xfs_log_sb(tp); tp 1143 fs/xfs/libxfs/xfs_bmap.c error = xfs_trans_commit(tp); tp 1148 fs/xfs/libxfs/xfs_bmap.c xfs_trans_cancel(tp); tp 1162 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 1203 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, tp 1214 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); tp 1269 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); tp 1276 fs/xfs/libxfs/xfs_bmap.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, tp 1293 fs/xfs/libxfs/xfs_bmap.c xfs_trans_brelse(tp, bp); tp 1307 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 1330 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 1359 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 1381 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 1393 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 1404 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 1808 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, tp 1885 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, tp 1965 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, tp 1991 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_map_extent(bma->tp, bma->ip, whichfork, new); tp 1998 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(bma->tp, bma->ip, tp 2036 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 2473 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_convert_extent(mp, tp, ip, whichfork, new); tp 2480 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, tp 2647 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 2833 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_map_extent(tp, ip, whichfork, new); tp 2840 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(tp, ip, curp, 0, tp 3059 fs/xfs/libxfs/xfs_bmap.c nullfb = ap->tp->t_firstblock == NULLFSBLOCK; tp 3063 fs/xfs/libxfs/xfs_bmap.c ap->tp->t_firstblock); tp 3193 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 3198 fs/xfs/libxfs/xfs_bmap.c struct xfs_mount *mp = tp->t_mountp; tp 3205 fs/xfs/libxfs/xfs_bmap.c error = xfs_alloc_pagf_init(mp, tp, ag, XFS_ALLOC_FLAG_TRYLOCK); tp 3273 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_longest_free_extent(args->tp, ag, blen, tp 3306 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_longest_free_extent(args->tp, ag, blen, ¬init); tp 3315 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_longest_free_extent(args->tp, ag, blen, tp 3362 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(ap->tp, ap->ip, XFS_TRANS_DQ_RES_BLKS, tp 3369 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE); tp 3374 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(ap->tp, ap->ip, tp 3425 fs/xfs/libxfs/xfs_bmap.c nullfb = ap->tp->t_firstblock == NULLFSBLOCK; tp 3427 fs/xfs/libxfs/xfs_bmap.c ap->tp->t_firstblock); tp 3438 fs/xfs/libxfs/xfs_bmap.c ap->blkno = ap->tp->t_firstblock; tp 3449 fs/xfs/libxfs/xfs_bmap.c ap->blkno = ap->tp->t_firstblock; tp 3455 fs/xfs/libxfs/xfs_bmap.c args.tp = ap->tp; tp 3476 fs/xfs/libxfs/xfs_bmap.c } else if (ap->tp->t_flags & XFS_TRANS_LOWMODE) { tp 3511 fs/xfs/libxfs/xfs_bmap.c if (!(ap->tp->t_flags & XFS_TRANS_LOWMODE) && ap->aeof) { tp 3603 fs/xfs/libxfs/xfs_bmap.c ap->tp->t_flags |= XFS_TRANS_LOWMODE; tp 3610 fs/xfs/libxfs/xfs_bmap.c ASSERT(ap->tp->t_firstblock == NULLFSBLOCK || tp 3611 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGNO(mp, ap->tp->t_firstblock) <= tp 3615 fs/xfs/libxfs/xfs_bmap.c if (ap->tp->t_firstblock == NULLFSBLOCK) tp 3616 fs/xfs/libxfs/xfs_bmap.c ap->tp->t_firstblock = args.fsbno; tp 4077 fs/xfs/libxfs/xfs_bmap.c bma->cur = xfs_bmbt_init_cursor(mp, bma->tp, bma->ip, whichfork); tp 4109 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_hole_real(bma->tp, bma->ip, tp 4160 fs/xfs/libxfs/xfs_bmap.c bma->cur = xfs_bmbt_init_cursor(bma->ip->i_mount, bma->tp, tp 4177 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork, tp 4213 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 4217 fs/xfs/libxfs/xfs_bmap.c if (tp && tp->t_firstblock != NULLFSBLOCK) tp 4244 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(bma->tp, bma->ip, bma->logflags); tp 4257 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 4267 fs/xfs/libxfs/xfs_bmap.c .tp = tp, tp 4297 fs/xfs/libxfs/xfs_bmap.c ASSERT(tp != NULL); tp 4331 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 4340 fs/xfs/libxfs/xfs_bmap.c bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); tp 4399 fs/xfs/libxfs/xfs_bmap.c xfs_refcount_alloc_cow_extent(tp, bma.blkno, tp 4432 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, tp 4466 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp; tp 4474 fs/xfs/libxfs/xfs_bmap.c XFS_TRANS_RESERVE, &tp); tp 4479 fs/xfs/libxfs/xfs_bmap.c xfs_trans_ijoin(tp, ip, 0); tp 4503 fs/xfs/libxfs/xfs_bmap.c bma.tp = tp; tp 4509 fs/xfs/libxfs/xfs_bmap.c bma.minleft = xfs_bmapi_minleft(tp, ip, whichfork); tp 4535 fs/xfs/libxfs/xfs_bmap.c xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length); tp 4537 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags, tp 4543 fs/xfs/libxfs/xfs_bmap.c error = xfs_trans_commit(tp); tp 4550 fs/xfs/libxfs/xfs_bmap.c xfs_trans_cancel(tp); tp 4557 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 4593 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 4605 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 4608 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 4620 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur, tp 4625 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, whichfork); tp 4634 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 4932 fs/xfs/libxfs/xfs_bmap.c xfs_trans_t *tp, /* current transaction pointer */ tp 4979 fs/xfs/libxfs/xfs_bmap.c if (tp->t_blk_res == 0 && tp 4999 fs/xfs/libxfs/xfs_bmap.c error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len); tp 5139 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_unmap_extent(tp, ip, whichfork, del); tp 5146 fs/xfs/libxfs/xfs_bmap.c xfs_refcount_decrease_extent(tp, del); tp 5148 fs/xfs/libxfs/xfs_bmap.c __xfs_bmap_add_free(tp, del->br_startblock, tp 5164 fs/xfs/libxfs/xfs_bmap.c xfs_trans_mod_dquot_byino(tp, ip, qfield, (long)-nblks); tp 5179 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, /* transaction pointer */ tp 5232 fs/xfs/libxfs/xfs_bmap.c if (tp && xfs_is_reflink_inode(ip) && whichfork == XFS_DATA_FORK) tp 5233 fs/xfs/libxfs/xfs_bmap.c max_len = min(len, xfs_refcount_max_unmap(tp->t_log_res)); tp 5238 fs/xfs/libxfs/xfs_bmap.c (error = xfs_iread_extents(tp, ip, whichfork))) tp 5257 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 5267 fs/xfs/libxfs/xfs_bmap.c xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); tp 5269 fs/xfs/libxfs/xfs_bmap.c xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL); tp 5359 fs/xfs/libxfs/xfs_bmap.c ASSERT(tp->t_blk_res > 0); tp 5370 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_unwritten_real(tp, ip, tp 5391 fs/xfs/libxfs/xfs_bmap.c tp->t_blk_res == 0)) { tp 5426 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_unwritten_real(tp, tp 5435 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_add_extent_unwritten_real(tp, tp 5449 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_del_extent_real(ip, tp, &icur, cur, tp 5484 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, tp 5488 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, tp 5508 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 5520 fs/xfs/libxfs/xfs_bmap.c xfs_trans_t *tp, tp 5530 fs/xfs/libxfs/xfs_bmap.c error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts); tp 5573 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 5631 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_btree_to_extents(tp, ip, cur, logflags, whichfork); tp 5642 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_unmap_extent(tp, ip, whichfork, got); tp 5645 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_map_extent(tp, ip, whichfork, &new); tp 5651 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 5685 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_unmap_extent(tp, ip, whichfork, &prev); tp 5686 fs/xfs/libxfs/xfs_bmap.c xfs_rmap_map_extent(tp, ip, whichfork, got); tp 5692 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 5722 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 5728 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 5747 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmse_merge(tp, ip, whichfork, tp 5761 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, tp 5777 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 5809 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 5840 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 5846 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 5888 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got, tp 5904 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 5916 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 5947 fs/xfs/libxfs/xfs_bmap.c error = xfs_iread_extents(tp, ip, whichfork); tp 5966 fs/xfs/libxfs/xfs_bmap.c cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); tp 6010 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, tp 6022 fs/xfs/libxfs/xfs_bmap.c xfs_trans_log_inode(tp, ip, logflags); tp 6032 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp; tp 6036 fs/xfs/libxfs/xfs_bmap.c XFS_DIOSTRAT_SPACE_RES(mp, 0), 0, 0, &tp); tp 6041 fs/xfs/libxfs/xfs_bmap.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 6043 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmap_split_extent_at(tp, ip, split_fsb); tp 6047 fs/xfs/libxfs/xfs_bmap.c return xfs_trans_commit(tp); tp 6050 fs/xfs/libxfs/xfs_bmap.c xfs_trans_cancel(tp); tp 6066 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 6074 fs/xfs/libxfs/xfs_bmap.c trace_xfs_bmap_defer(tp->t_mountp, tp 6075 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock), tp 6077 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGBNO(tp->t_mountp, bmap->br_startblock), tp 6090 fs/xfs/libxfs/xfs_bmap.c xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_BMAP, &bi->bi_list); tp 6097 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 6104 fs/xfs/libxfs/xfs_bmap.c __xfs_bmap_add(tp, XFS_BMAP_MAP, ip, XFS_DATA_FORK, PREV); tp 6110 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 6117 fs/xfs/libxfs/xfs_bmap.c __xfs_bmap_add(tp, XFS_BMAP_UNMAP, ip, XFS_DATA_FORK, PREV); tp 6126 fs/xfs/libxfs/xfs_bmap.c struct xfs_trans *tp, tp 6137 fs/xfs/libxfs/xfs_bmap.c ASSERT(tp->t_firstblock == NULLFSBLOCK); tp 6139 fs/xfs/libxfs/xfs_bmap.c trace_xfs_bmap_deferred(tp->t_mountp, tp 6140 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGNO(tp->t_mountp, startblock), type, tp 6141 fs/xfs/libxfs/xfs_bmap.c XFS_FSB_TO_AGBNO(tp->t_mountp, startblock), tp 6147 fs/xfs/libxfs/xfs_bmap.c if (XFS_TEST_ERROR(false, tp->t_mountp, tp 6153 fs/xfs/libxfs/xfs_bmap.c error = xfs_bmapi_remap(tp, ip, startoff, *blockcount, tp 6158 fs/xfs/libxfs/xfs_bmap.c error = __xfs_bunmapi(tp, ip, startoff, blockcount, tp 22 fs/xfs/libxfs/xfs_bmap.h struct xfs_trans *tp; /* transaction pointer */ tp 185 fs/xfs/libxfs/xfs_bmap.h void xfs_bmap_local_to_extents_empty(struct xfs_trans *tp, tp 187 fs/xfs/libxfs/xfs_bmap.h void __xfs_bmap_add_free(struct xfs_trans *tp, xfs_fsblock_t bno, tp 191 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip, tp 193 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip, tp 201 fs/xfs/libxfs/xfs_bmap.h int xfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip, tp 204 fs/xfs/libxfs/xfs_bmap.h int __xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip, tp 207 fs/xfs/libxfs/xfs_bmap.h int xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip, tp 217 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_collapse_extents(struct xfs_trans *tp, struct xfs_inode *ip, tp 222 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_insert_extents(struct xfs_trans *tp, struct xfs_inode *ip, tp 233 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_add_extent_unwritten_real(struct xfs_trans *tp, tp 240 fs/xfs/libxfs/xfs_bmap.h struct xfs_trans *tp, tp 245 fs/xfs/libxfs/xfs_bmap.h __xfs_bmap_add_free(tp, bno, len, oinfo, false); tp 261 fs/xfs/libxfs/xfs_bmap.h int xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_inode *ip, tp 265 fs/xfs/libxfs/xfs_bmap.h void xfs_bmap_map_extent(struct xfs_trans *tp, struct xfs_inode *ip, tp 267 fs/xfs/libxfs/xfs_bmap.h void xfs_bmap_unmap_extent(struct xfs_trans *tp, struct xfs_inode *ip, tp 285 fs/xfs/libxfs/xfs_bmap.h int xfs_bmapi_remap(struct xfs_trans *tp, struct xfs_inode *ip, tp 205 fs/xfs/libxfs/xfs_bmap_btree.c args.tp = cur->bc_tp; tp 225 fs/xfs/libxfs/xfs_bmap_btree.c args.minleft = args.tp->t_blk_res; tp 234 fs/xfs/libxfs/xfs_bmap_btree.c if (!args.wasdel && args.tp->t_blk_res == 0) { tp 264 fs/xfs/libxfs/xfs_bmap_btree.c xfs_trans_log_inode(args.tp, cur->bc_private.b.ip, XFS_ILOG_CORE); tp 265 fs/xfs/libxfs/xfs_bmap_btree.c xfs_trans_mod_dquot_byino(args.tp, cur->bc_private.b.ip, tp 284 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_trans *tp = cur->bc_tp; tp 292 fs/xfs/libxfs/xfs_bmap_btree.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 293 fs/xfs/libxfs/xfs_bmap_btree.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L); tp 547 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_trans *tp, /* transaction pointer */ tp 557 fs/xfs/libxfs/xfs_bmap_btree.c cur->bc_tp = tp; tp 628 fs/xfs/libxfs/xfs_bmap_btree.c struct xfs_trans *tp, tp 637 fs/xfs/libxfs/xfs_bmap_btree.c ASSERT(tp || buffer_list); tp 638 fs/xfs/libxfs/xfs_bmap_btree.c ASSERT(!(tp && buffer_list)); tp 644 fs/xfs/libxfs/xfs_bmap_btree.c cur = xfs_bmbt_init_cursor(ip->i_mount, tp, ip, whichfork); tp 102 fs/xfs/libxfs/xfs_bmap_btree.h extern int xfs_bmbt_change_owner(struct xfs_trans *tp, struct xfs_inode *ip, tp 404 fs/xfs/libxfs/xfs_btree.c xfs_trans_t *tp; /* transaction pointer, can be NULL */ tp 406 fs/xfs/libxfs/xfs_btree.c tp = cur->bc_tp; tp 427 fs/xfs/libxfs/xfs_btree.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, tp 690 fs/xfs/libxfs/xfs_btree.c xfs_trans_t *tp, /* transaction pointer */ tp 697 fs/xfs/libxfs/xfs_btree.c return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0); tp 707 fs/xfs/libxfs/xfs_btree.c xfs_trans_t *tp, /* transaction pointer */ tp 716 fs/xfs/libxfs/xfs_btree.c return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0); tp 841 fs/xfs/libxfs/xfs_btree.c struct xfs_trans *tp, /* transaction pointer */ tp 854 fs/xfs/libxfs/xfs_btree.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d, tp 303 fs/xfs/libxfs/xfs_btree.h struct xfs_trans *tp, /* transaction pointer */ tp 313 fs/xfs/libxfs/xfs_btree.h struct xfs_trans *tp, /* transaction pointer */ tp 344 fs/xfs/libxfs/xfs_btree.h struct xfs_trans *tp, /* transaction pointer */ tp 280 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp, tp 289 fs/xfs/libxfs/xfs_da_btree.c err = xfs_da_read_buf(tp, dp, bno, mappedbno, bpp, tp 291 fs/xfs/libxfs/xfs_da_btree.c if (!err && tp && *bpp) { tp 310 fs/xfs/libxfs/xfs_da_btree.c tp->t_mountp, info, sizeof(*info)); tp 311 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, *bpp); tp 315 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, *bpp, type); tp 336 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp = args->trans; tp 337 fs/xfs/libxfs/xfs_da_btree.c struct xfs_mount *mp = tp->t_mountp; tp 346 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, whichfork); tp 350 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF); tp 367 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, tp 551 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp; tp 570 fs/xfs/libxfs/xfs_da_btree.c tp = args->trans; tp 571 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da_get_buf(tp, dp, blkno, -1, &bp, args->whichfork); tp 589 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DA_NODE_BUF); tp 607 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAFN_BUF); tp 623 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, 0, size - 1); tp 660 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, bp, tp 781 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp; tp 817 fs/xfs/libxfs/xfs_da_btree.c tp = state->args->trans; tp 855 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk1->bp, tp 873 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk1->bp, tp 877 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, blk2->bp, tp 1410 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp; tp 1423 fs/xfs/libxfs/xfs_da_btree.c tp = state->args->trans; tp 1438 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, tp 1444 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, tp 1457 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, save_blk->bp, tp 2065 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp = args->trans; tp 2075 fs/xfs/libxfs/xfs_da_btree.c error = xfs_bmap_first_unused(tp, dp, count, bno, w); tp 2083 fs/xfs/libxfs/xfs_da_btree.c error = xfs_bmapi_write(tp, dp, *bno, count, tp 2105 fs/xfs/libxfs/xfs_da_btree.c error = xfs_bmapi_write(tp, dp, b, c, tp 2185 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp; tp 2207 fs/xfs/libxfs/xfs_da_btree.c tp = args->trans; tp 2213 fs/xfs/libxfs/xfs_da_btree.c error = xfs_bmap_last_before(tp, dp, &lastoff, w); tp 2225 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(tp, dp, last_blkno, -1, &last_buf, w); tp 2232 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, dead_buf, 0, args->geo->blksize - 1); tp 2261 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); tp 2274 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, sib_buf, tp 2283 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(tp, dp, sib_blkno, -1, &sib_buf, w); tp 2296 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, sib_buf, tp 2307 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); tp 2334 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, par_buf); tp 2350 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, par_buf); tp 2358 fs/xfs/libxfs/xfs_da_btree.c error = xfs_da3_node_read(tp, dp, par_blkno, -1, &par_buf, w); tp 2376 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_log_buf(tp, par_buf, tp 2384 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, par_buf); tp 2386 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, sib_buf); tp 2387 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_brelse(tp, last_buf); tp 2402 fs/xfs/libxfs/xfs_da_btree.c struct xfs_trans *tp; tp 2408 fs/xfs/libxfs/xfs_da_btree.c tp = args->trans; tp 2415 fs/xfs/libxfs/xfs_da_btree.c error = xfs_bunmapi(tp, dp, dead_blkno, count, tp 2428 fs/xfs/libxfs/xfs_da_btree.c xfs_trans_binval(tp, dead_buf); tp 174 fs/xfs/libxfs/xfs_da_btree.h int xfs_da3_node_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 188 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp) tp 194 fs/xfs/libxfs/xfs_defer.c list_for_each_entry(dfp, &tp->t_dfops, dfp_list) { tp 196 fs/xfs/libxfs/xfs_defer.c dfp->dfp_intent = ops->create_intent(tp, dfp->dfp_count); tp 197 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_create_intent(tp->t_mountp, dfp); tp 198 fs/xfs/libxfs/xfs_defer.c list_sort(tp->t_mountp, &dfp->dfp_work, ops->diff_items); tp 200 fs/xfs/libxfs/xfs_defer.c ops->log_item(tp, dfp->dfp_intent, li); tp 207 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp, tp 213 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_trans_abort(tp, _RET_IP_); tp 218 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_pending_abort(tp->t_mountp, dfp); tp 231 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp = *tpp; tp 241 fs/xfs/libxfs/xfs_defer.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 251 fs/xfs/libxfs/xfs_defer.c xfs_trans_dirty_buf(tp, bli->bli_buf); tp 263 fs/xfs/libxfs/xfs_defer.c xfs_trans_log_inode(tp, ili->ili_inode, tp 273 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_trans_roll(tp, _RET_IP_); tp 283 fs/xfs/libxfs/xfs_defer.c tp = *tpp; tp 287 fs/xfs/libxfs/xfs_defer.c xfs_trans_ijoin(tp, iplist[i], 0); tp 291 fs/xfs/libxfs/xfs_defer.c xfs_trans_bjoin(tp, bplist[i]); tp 292 fs/xfs/libxfs/xfs_defer.c xfs_trans_bhold(tp, bplist[i]); tp 296 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_trans_roll_error(tp, error); tp 305 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp) tp 307 fs/xfs/libxfs/xfs_defer.c ASSERT(list_empty(&tp->t_dfops)); tp 313 fs/xfs/libxfs/xfs_defer.c tp->t_flags &= ~XFS_TRANS_LOWMODE; tp 358 fs/xfs/libxfs/xfs_defer.c struct xfs_trans **tp) tp 368 fs/xfs/libxfs/xfs_defer.c ASSERT((*tp)->t_flags & XFS_TRANS_PERM_LOG_RES); tp 370 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_finish(*tp, _RET_IP_); tp 373 fs/xfs/libxfs/xfs_defer.c while (!list_empty(&dop_pending) || !list_empty(&(*tp)->t_dfops)) { tp 375 fs/xfs/libxfs/xfs_defer.c xfs_defer_create_intents(*tp); tp 376 fs/xfs/libxfs/xfs_defer.c list_splice_tail_init(&(*tp)->t_dfops, &dop_pending); tp 381 fs/xfs/libxfs/xfs_defer.c error = xfs_defer_trans_roll(tp); tp 389 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_pending_finish((*tp)->t_mountp, dfp); tp 390 fs/xfs/libxfs/xfs_defer.c dfp->dfp_done = ops->create_done(*tp, dfp->dfp_intent, tp 398 fs/xfs/libxfs/xfs_defer.c error = ops->finish_item(*tp, li, dfp->dfp_done, tp 416 fs/xfs/libxfs/xfs_defer.c ops->finish_cleanup(*tp, state, error); tp 428 fs/xfs/libxfs/xfs_defer.c dfp->dfp_intent = ops->create_intent(*tp, tp 432 fs/xfs/libxfs/xfs_defer.c ops->log_item(*tp, dfp->dfp_intent, li); tp 440 fs/xfs/libxfs/xfs_defer.c ops->finish_cleanup(*tp, state, error); tp 445 fs/xfs/libxfs/xfs_defer.c xfs_defer_trans_abort(*tp, &dop_pending); tp 446 fs/xfs/libxfs/xfs_defer.c xfs_force_shutdown((*tp)->t_mountp, SHUTDOWN_CORRUPT_INCORE); tp 447 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_finish_error(*tp, error); tp 448 fs/xfs/libxfs/xfs_defer.c xfs_defer_cancel_list((*tp)->t_mountp, &dop_pending); tp 449 fs/xfs/libxfs/xfs_defer.c xfs_defer_cancel(*tp); tp 453 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_finish_done(*tp, _RET_IP_); tp 459 fs/xfs/libxfs/xfs_defer.c struct xfs_trans **tp) tp 467 fs/xfs/libxfs/xfs_defer.c error = xfs_defer_finish_noroll(tp); tp 470 fs/xfs/libxfs/xfs_defer.c if ((*tp)->t_flags & XFS_TRANS_DIRTY) { tp 471 fs/xfs/libxfs/xfs_defer.c error = xfs_defer_trans_roll(tp); tp 473 fs/xfs/libxfs/xfs_defer.c xfs_force_shutdown((*tp)->t_mountp, tp 478 fs/xfs/libxfs/xfs_defer.c xfs_defer_reset(*tp); tp 484 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp) tp 486 fs/xfs/libxfs/xfs_defer.c struct xfs_mount *mp = tp->t_mountp; tp 488 fs/xfs/libxfs/xfs_defer.c trace_xfs_defer_cancel(tp, _RET_IP_); tp 489 fs/xfs/libxfs/xfs_defer.c xfs_defer_cancel_list(mp, &tp->t_dfops); tp 495 fs/xfs/libxfs/xfs_defer.c struct xfs_trans *tp, tp 502 fs/xfs/libxfs/xfs_defer.c ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); tp 510 fs/xfs/libxfs/xfs_defer.c if (!list_empty(&tp->t_dfops)) { tp 511 fs/xfs/libxfs/xfs_defer.c dfp = list_last_entry(&tp->t_dfops, tp 526 fs/xfs/libxfs/xfs_defer.c list_add_tail(&dfp->dfp_list, &tp->t_dfops); tp 37 fs/xfs/libxfs/xfs_defer.h void xfs_defer_add(struct xfs_trans *tp, enum xfs_defer_ops_type type, tp 39 fs/xfs/libxfs/xfs_defer.h int xfs_defer_finish_noroll(struct xfs_trans **tp); tp 40 fs/xfs/libxfs/xfs_defer.h int xfs_defer_finish(struct xfs_trans **tp); tp 208 fs/xfs/libxfs/xfs_dir2.c xfs_trans_t *tp, tp 216 fs/xfs/libxfs/xfs_dir2.c error = xfs_dir_ino_validate(tp->t_mountp, pdp->i_ino); tp 226 fs/xfs/libxfs/xfs_dir2.c args->trans = tp; tp 238 fs/xfs/libxfs/xfs_dir2.c struct xfs_trans *tp, tp 251 fs/xfs/libxfs/xfs_dir2.c rval = xfs_dir_ino_validate(tp->t_mountp, inum); tp 270 fs/xfs/libxfs/xfs_dir2.c args->trans = tp; tp 334 fs/xfs/libxfs/xfs_dir2.c xfs_trans_t *tp, tp 364 fs/xfs/libxfs/xfs_dir2.c args->trans = tp; tp 412 fs/xfs/libxfs/xfs_dir2.c struct xfs_trans *tp, tp 438 fs/xfs/libxfs/xfs_dir2.c args->trans = tp; tp 470 fs/xfs/libxfs/xfs_dir2.c struct xfs_trans *tp, tp 482 fs/xfs/libxfs/xfs_dir2.c rval = xfs_dir_ino_validate(tp->t_mountp, inum); tp 499 fs/xfs/libxfs/xfs_dir2.c args->trans = tp; tp 531 fs/xfs/libxfs/xfs_dir2.c xfs_trans_t *tp, tp 535 fs/xfs/libxfs/xfs_dir2.c return xfs_dir_createname(tp, dp, name, 0, 0); tp 643 fs/xfs/libxfs/xfs_dir2.c struct xfs_trans *tp; tp 649 fs/xfs/libxfs/xfs_dir2.c tp = args->trans; tp 653 fs/xfs/libxfs/xfs_dir2.c error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0, &done); tp 673 fs/xfs/libxfs/xfs_dir2.c xfs_trans_binval(tp, bp); tp 685 fs/xfs/libxfs/xfs_dir2.c if ((error = xfs_bmap_last_before(tp, dp, &bno, XFS_DATA_FORK))) { tp 699 fs/xfs/libxfs/xfs_dir2.c xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); tp 116 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp, tp 118 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp, tp 121 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp, tp 124 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp, tp 127 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp, tp 130 fs/xfs/libxfs/xfs_dir2.h extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, tp 27 fs/xfs/libxfs/xfs_dir2_block.c static void xfs_dir2_block_log_leaf(xfs_trans_t *tp, struct xfs_buf *bp, tp 29 fs/xfs/libxfs/xfs_dir2_block.c static void xfs_dir2_block_log_tail(xfs_trans_t *tp, struct xfs_buf *bp); tp 119 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_trans *tp, tp 126 fs/xfs/libxfs/xfs_dir2_block.c err = xfs_da_read_buf(tp, dp, mp->m_dir_geo->datablk, -1, bpp, tp 128 fs/xfs/libxfs/xfs_dir2_block.c if (!err && tp && *bpp) tp 129 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_BLOCK_BUF); tp 136 fs/xfs/libxfs/xfs_dir2_block.c struct xfs_trans *tp, tp 143 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_BLOCK_BUF); tp 346 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp; /* transaction structure */ tp 351 fs/xfs/libxfs/xfs_dir2_block.c tp = args->trans; tp 354 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_block_read(tp, dp, &bp); tp 378 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); tp 529 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); tp 554 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); tp 565 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp, /* transaction structure */ tp 574 fs/xfs/libxfs/xfs_dir2_block.c btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); tp 576 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_log_buf(tp, bp, (uint)((char *)&blp[first] - (char *)hdr), tp 585 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp, /* transaction structure */ tp 591 fs/xfs/libxfs/xfs_dir2_block.c btp = xfs_dir2_block_tail_p(tp->t_mountp->m_dir_geo, hdr); tp 592 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_log_buf(tp, bp, (uint)((char *)btp - (char *)hdr), tp 664 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp; /* transaction pointer */ tp 668 fs/xfs/libxfs/xfs_dir2_block.c tp = args->trans; tp 671 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_block_read(tp, dp, &bp); tp 694 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); tp 742 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_brelse(tp, bp); tp 766 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp; /* transaction pointer */ tp 778 fs/xfs/libxfs/xfs_dir2_block.c tp = args->trans; tp 799 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); tp 804 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, ent, ent); tp 916 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp; /* transaction pointer */ tp 923 fs/xfs/libxfs/xfs_dir2_block.c tp = args->trans; tp 956 fs/xfs/libxfs/xfs_dir2_block.c error = xfs_dir3_data_read(tp, dp, args->geo->datablk, -1, &dbp); tp 984 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_block_init(mp, tp, dbp, dp); tp 1001 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, dbp); tp 1012 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, dbp, 0, be32_to_cpu(btp->count) - 1); tp 1065 fs/xfs/libxfs/xfs_dir2_block.c xfs_trans_t *tp; /* transaction pointer */ tp 1072 fs/xfs/libxfs/xfs_dir2_block.c tp = args->trans; tp 1099 fs/xfs/libxfs/xfs_dir2_block.c xfs_bmap_local_to_extents_empty(tp, dp, XFS_DATA_FORK); tp 1114 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir3_block_init(mp, tp, bp, dp); tp 1248 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_leaf(tp, bp, 0, be32_to_cpu(btp->count) - 1); tp 1249 fs/xfs/libxfs/xfs_dir2_block.c xfs_dir2_block_log_tail(tp, bp); tp 354 fs/xfs/libxfs/xfs_dir2_data.c struct xfs_trans *tp, tp 362 fs/xfs/libxfs/xfs_dir2_data.c err = xfs_da_read_buf(tp, dp, bno, mapped_bno, bpp, tp 364 fs/xfs/libxfs/xfs_dir2_data.c if (!err && tp && *bpp) tp 365 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_DATA_BUF); tp 646 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_t *tp; /* transaction pointer */ tp 651 fs/xfs/libxfs/xfs_dir2_data.c tp = args->trans; tp 655 fs/xfs/libxfs/xfs_dir2_data.c error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, blkno), tp 660 fs/xfs/libxfs/xfs_dir2_data.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_DATA_BUF); tp 216 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_trans *tp, tp 224 fs/xfs/libxfs/xfs_dir2_leaf.c err = xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, tp 226 fs/xfs/libxfs/xfs_dir2_leaf.c if (!err && tp && *bpp) tp 227 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_LEAF1_BUF); tp 233 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_trans *tp, tp 241 fs/xfs/libxfs/xfs_dir2_leaf.c err = xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, tp 243 fs/xfs/libxfs/xfs_dir2_leaf.c if (!err && tp && *bpp) tp 244 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_LEAFN_BUF); tp 254 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_trans *tp, tp 289 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAF1_BUF); tp 292 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_LEAFN_BUF); tp 304 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_trans *tp = args->trans; tp 313 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, bno), tp 318 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_dir3_leaf_init(mp, tp, bp, dp->i_ino, magic); tp 347 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 355 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 411 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, dbp, XFS_BLFT_DIR_DATA_BUF); tp 566 fs/xfs/libxfs/xfs_dir2_leaf.c struct xfs_trans *tp = args->trans; tp 597 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); tp 684 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 708 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 716 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 747 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 754 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 784 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_data_read(tp, dp, tp 788 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 808 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1120 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 1131 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 1153 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, dbp); tp 1154 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1182 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 1189 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 1192 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_leaf_read(tp, dp, args->geo->leafblk, -1, &lbp); tp 1229 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, dbp); tp 1230 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_data_read(tp, dp, tp 1234 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1271 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, dbp); tp 1272 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_data_read(tp, dp, tp 1276 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1288 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, dbp); tp 1289 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1453 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 1483 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 1486 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, lbp); tp 1561 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 1564 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 1568 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir3_data_read(tp, dp, xfs_dir2_db_to_da(args->geo, db), tp 1594 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, dbp); tp 1648 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_t *tp; /* transaction pointer */ tp 1664 fs/xfs/libxfs/xfs_dir2_leaf.c tp = args->trans; tp 1690 fs/xfs/libxfs/xfs_dir2_leaf.c if ((error = xfs_bmap_last_before(tp, dp, &fo, XFS_DATA_FORK))) { tp 1708 fs/xfs/libxfs/xfs_dir2_leaf.c error = xfs_dir2_free_read(tp, dp, args->geo->freeblk, &fbp); tp 1721 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_brelse(tp, fbp); tp 1732 fs/xfs/libxfs/xfs_dir2_leaf.c xfs_trans_buf_set_type(tp, lbp, XFS_BLFT_DIR_LEAF1_BUF); tp 194 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp, tp 203 fs/xfs/libxfs/xfs_dir2_node.c err = xfs_da_read_buf(tp, dp, fbno, mappedbno, bpp, tp 212 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, *bpp); tp 217 fs/xfs/libxfs/xfs_dir2_node.c if (tp) tp 218 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_DIR_FREE_BUF); tp 225 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp, tp 230 fs/xfs/libxfs/xfs_dir2_node.c return __xfs_dir3_free_read(tp, dp, fbno, -1, bpp); tp 235 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp, tp 240 fs/xfs/libxfs/xfs_dir2_node.c return __xfs_dir3_free_read(tp, dp, fbno, -2, bpp); tp 249 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp = args->trans; tp 256 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(args->geo, fbno), tp 261 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DIR_FREE_BUF); tp 350 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_t *tp; /* transaction pointer */ tp 356 fs/xfs/libxfs/xfs_dir2_node.c tp = args->trans; tp 412 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, lbp, XFS_BLFT_DIR_LEAFN_BUF); tp 578 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_t *tp; /* transaction pointer */ tp 583 fs/xfs/libxfs/xfs_dir2_node.c tp = args->trans; tp 649 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, curbp); tp 651 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_read(tp, dp, tp 673 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, curbp); tp 729 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_t *tp; /* transaction pointer */ tp 735 fs/xfs/libxfs/xfs_dir2_node.c tp = args->trans; tp 785 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, curbp); tp 795 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir3_data_read(tp, dp, tp 821 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, state->extrablk.bp); tp 833 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, curbp, XFS_BLFT_DIR_DATA_BUF); tp 848 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_buf_set_type(tp, curbp, XFS_BLFT_DIR_DATA_BUF); tp 852 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, curbp); tp 1215 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_t *tp; /* transaction pointer */ tp 1223 fs/xfs/libxfs/xfs_dir2_node.c tp = args->trans; tp 1289 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_read(tp, dp, tp 1625 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp = args->trans; tp 1654 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_try_read(tp, dp, tp 1746 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp = args->trans; tp 1784 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, fbp); tp 1809 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_try_read(tp, dp, tp 1831 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, fbp); tp 1857 fs/xfs/libxfs/xfs_dir2_node.c struct xfs_trans *tp = args->trans; tp 1899 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir3_data_read(tp, dp, tp 1920 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, dbp); tp 2252 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_t *tp; /* transaction pointer */ tp 2256 fs/xfs/libxfs/xfs_dir2_node.c tp = args->trans; tp 2263 fs/xfs/libxfs/xfs_dir2_node.c error = xfs_dir2_free_try_read(tp, dp, fo, &bp); tp 2279 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, bp); tp 2294 fs/xfs/libxfs/xfs_dir2_node.c xfs_trans_brelse(tp, bp); tp 19 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir3_block_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 37 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir3_data_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 50 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir3_leaf_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 52 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir3_leafn_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 107 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_dir2_free_read(struct xfs_trans *tp, struct xfs_inode *dp, tp 123 fs/xfs/libxfs/xfs_dir2_priv.h extern int xfs_readdir(struct xfs_trans *tp, struct xfs_inode *dp, tp 173 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 186 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, btnum); tp 264 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 318 fs/xfs/libxfs/xfs_ialloc.c if (tp) tp 319 fs/xfs/libxfs/xfs_ialloc.c xfs_icreate_log(tp, agno, agbno, icount, tp 330 fs/xfs/libxfs/xfs_ialloc.c fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, tp 356 fs/xfs/libxfs/xfs_ialloc.c } else if (tp) { tp 358 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_log_buf(tp, fbuf, ioffset, tp 363 fs/xfs/libxfs/xfs_ialloc.c if (tp) { tp 372 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_inode_alloc_buf(tp, fbuf); tp 380 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_ordered_buf(tp, fbuf); tp 521 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 534 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, btnum); tp 605 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 621 fs/xfs/libxfs/xfs_ialloc.c struct xfs_ino_geometry *igeo = M_IGEO(tp->t_mountp); tp 625 fs/xfs/libxfs/xfs_ialloc.c args.tp = tp; tp 626 fs/xfs/libxfs/xfs_ialloc.c args.mp = tp->t_mountp; tp 632 fs/xfs/libxfs/xfs_ialloc.c if (xfs_sb_version_hassparseinodes(&tp->t_mountp->m_sb) && tp 804 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_inode_init(args.mp, tp, NULL, newlen, agno, tp 831 fs/xfs/libxfs/xfs_ialloc.c error = xfs_inobt_insert_sprec(args.mp, tp, agbp, XFS_BTNUM_INO, tp 856 fs/xfs/libxfs/xfs_ialloc.c error = xfs_inobt_insert_sprec(args.mp, tp, agbp, tp 864 fs/xfs/libxfs/xfs_ialloc.c error = xfs_inobt_insert(args.mp, tp, agbp, newino, newlen, tp 870 fs/xfs/libxfs/xfs_ialloc.c error = xfs_inobt_insert(args.mp, tp, agbp, newino, tp 891 fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_log_agi(tp, agbp, tp 896 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_ICOUNT, (long)newlen); tp 897 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, (long)newlen); tp 923 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_t *tp, /* transaction pointer */ tp 943 fs/xfs/libxfs/xfs_ialloc.c mp = tp->t_mountp; tp 972 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_pagi_init(mp, tp, agno); tp 983 fs/xfs/libxfs/xfs_ialloc.c error = xfs_alloc_pagf_init(mp, tp, agno, flags); tp 1116 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 1121 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = tp->t_mountp; tp 1142 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO); tp 1352 fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); tp 1360 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, -1); tp 1540 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 1545 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = tp->t_mountp; tp 1560 fs/xfs/libxfs/xfs_ialloc.c return xfs_dialloc_ag_inobt(tp, agbp, parent, inop); tp 1571 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_FINO); tp 1614 fs/xfs/libxfs/xfs_ialloc.c icur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO); tp 1629 fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); tp 1632 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, -1); tp 1678 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 1684 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = tp->t_mountp; tp 1709 fs/xfs/libxfs/xfs_ialloc.c start_agno = xfs_ialloc_ag_select(tp, parent, mode); tp 1744 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_pagi_init(mp, tp, agno); tp 1759 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); tp 1772 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_ag_alloc(tp, agbp, &ialloced); tp 1774 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_brelse(tp, agbp); tp 1800 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_brelse(tp, agbp); tp 1813 fs/xfs/libxfs/xfs_ialloc.c return xfs_dialloc_ag(tp, agbp, parent, inop); tp 1826 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 1830 fs/xfs/libxfs/xfs_ialloc.c struct xfs_mount *mp = tp->t_mountp; tp 1841 fs/xfs/libxfs/xfs_ialloc.c xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, sagbno), tp 1886 fs/xfs/libxfs/xfs_ialloc.c xfs_bmap_add_free(tp, XFS_AGB_TO_FSB(mp, agno, agbno), tp 1900 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 1922 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO); tp 1976 fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); tp 1981 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_ICOUNT, -ilen); tp 1982 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, -(ilen - 1)); tp 1990 fs/xfs/libxfs/xfs_ialloc.c xfs_difree_inode_chunk(tp, agno, &rec); tp 2005 fs/xfs/libxfs/xfs_ialloc.c xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); tp 2009 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IFREE, 1); tp 2031 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 2044 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_FINO); tp 2133 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, /* transaction pointer */ tp 2146 fs/xfs/libxfs/xfs_ialloc.c mp = tp->t_mountp; tp 2176 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); tp 2186 fs/xfs/libxfs/xfs_ialloc.c error = xfs_difree_inobt(mp, tp, agbp, agino, xic, &rec); tp 2194 fs/xfs/libxfs/xfs_ialloc.c error = xfs_difree_finobt(mp, tp, agbp, agino, &rec); tp 2208 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, tp 2222 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_read_agi(mp, tp, agno, &agbp); tp 2236 fs/xfs/libxfs/xfs_ialloc.c cur = xfs_inobt_init_cursor(mp, tp, agbp, agno, XFS_BTNUM_INO); tp 2245 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_brelse(tp, agbp); tp 2271 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2332 fs/xfs/libxfs/xfs_ialloc.c error = xfs_imap_lookup(mp, tp, agno, agino, agbno, tp 2363 fs/xfs/libxfs/xfs_ialloc.c error = xfs_imap_lookup(mp, tp, agno, agino, agbno, tp 2413 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2451 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_log_buf(tp, bp, first, last); tp 2462 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_log_buf(tp, bp, first, last); tp 2571 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, /* transaction pointer */ tp 2580 fs/xfs/libxfs/xfs_ialloc.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, tp 2585 fs/xfs/libxfs/xfs_ialloc.c if (tp) tp 2586 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_AGI_BUF); tp 2595 fs/xfs/libxfs/xfs_ialloc.c struct xfs_trans *tp, /* transaction pointer */ tp 2605 fs/xfs/libxfs/xfs_ialloc.c error = xfs_read_agi(mp, tp, agno, bpp); tp 2633 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_t *tp, /* transaction pointer */ tp 2639 fs/xfs/libxfs/xfs_ialloc.c error = xfs_ialloc_read_agi(mp, tp, agno, &bp); tp 2643 fs/xfs/libxfs/xfs_ialloc.c xfs_trans_brelse(tp, bp); tp 59 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 73 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 83 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 93 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 103 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 114 fs/xfs/libxfs/xfs_ialloc.h struct xfs_trans *tp, /* transaction pointer */ tp 132 fs/xfs/libxfs/xfs_ialloc.h int xfs_ialloc_inode_init(struct xfs_mount *mp, struct xfs_trans *tp, tp 137 fs/xfs/libxfs/xfs_ialloc.h int xfs_read_agi(struct xfs_mount *mp, struct xfs_trans *tp, tp 83 fs/xfs/libxfs/xfs_ialloc_btree.c args.tp = cur->bc_tp; tp 408 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_trans *tp, /* transaction pointer */ tp 418 fs/xfs/libxfs/xfs_ialloc_btree.c cur->bc_tp = tp; tp 569 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_trans *tp, tp 581 fs/xfs/libxfs/xfs_ialloc_btree.c error = xfs_ialloc_read_agi(mp, tp, agno, agi_bpp); tp 585 fs/xfs/libxfs/xfs_ialloc_btree.c cur = xfs_inobt_init_cursor(mp, tp, *agi_bpp, agno, which); tp 587 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_trans_brelse(tp, *agi_bpp); tp 598 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_trans *tp, tp 607 fs/xfs/libxfs/xfs_ialloc_btree.c error = xfs_inobt_cur(mp, tp, agno, btnum, &cur, &agbp); tp 613 fs/xfs/libxfs/xfs_ialloc_btree.c xfs_trans_brelse(tp, agbp); tp 624 fs/xfs/libxfs/xfs_ialloc_btree.c struct xfs_trans *tp, tp 635 fs/xfs/libxfs/xfs_ialloc_btree.c error = xfs_inobt_count_blocks(mp, tp, agno, XFS_BTNUM_FINO, &tree_len); tp 63 fs/xfs/libxfs/xfs_ialloc_btree.h int xfs_finobt_calc_reserves(struct xfs_mount *mp, struct xfs_trans *tp, tp 67 fs/xfs/libxfs/xfs_ialloc_btree.h int xfs_inobt_cur(struct xfs_mount *mp, struct xfs_trans *tp, tp 171 fs/xfs/libxfs/xfs_inode_buf.c struct xfs_trans *tp, tp 182 fs/xfs/libxfs/xfs_inode_buf.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, imap->im_blkno, tp 615 fs/xfs/libxfs/xfs_inode_buf.c xfs_trans_t *tp, tp 627 fs/xfs/libxfs/xfs_inode_buf.c error = xfs_imap(mp, tp, ip->i_ino, &ip->i_imap, iget_flags); tp 645 fs/xfs/libxfs/xfs_inode_buf.c error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &bp, 0, iget_flags); tp 717 fs/xfs/libxfs/xfs_inode_buf.c xfs_trans_brelse(tp, bp); tp 1055 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1066 fs/xfs/libxfs/xfs_refcount.c xfs_trans_brelse(tp, agbp); tp 1078 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1086 fs/xfs/libxfs/xfs_refcount.c struct xfs_mount *mp = tp->t_mountp; tp 1116 fs/xfs/libxfs/xfs_refcount.c xfs_refcount_finish_one_cleanup(tp, rcur, 0); tp 1121 fs/xfs/libxfs/xfs_refcount.c error = xfs_alloc_read_agf(tp->t_mountp, tp, agno, tp 1128 fs/xfs/libxfs/xfs_refcount.c rcur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno); tp 1169 fs/xfs/libxfs/xfs_refcount.c xfs_trans_brelse(tp, agbp); tp 1179 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1186 fs/xfs/libxfs/xfs_refcount.c trace_xfs_refcount_defer(tp->t_mountp, tp 1187 fs/xfs/libxfs/xfs_refcount.c XFS_FSB_TO_AGNO(tp->t_mountp, startblock), tp 1188 fs/xfs/libxfs/xfs_refcount.c type, XFS_FSB_TO_AGBNO(tp->t_mountp, startblock), tp 1198 fs/xfs/libxfs/xfs_refcount.c xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_REFCOUNT, &ri->ri_list); tp 1206 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1209 fs/xfs/libxfs/xfs_refcount.c if (!xfs_sb_version_hasreflink(&tp->t_mountp->m_sb)) tp 1212 fs/xfs/libxfs/xfs_refcount.c __xfs_refcount_add(tp, XFS_REFCOUNT_INCREASE, PREV->br_startblock, tp 1221 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1224 fs/xfs/libxfs/xfs_refcount.c if (!xfs_sb_version_hasreflink(&tp->t_mountp->m_sb)) tp 1227 fs/xfs/libxfs/xfs_refcount.c __xfs_refcount_add(tp, XFS_REFCOUNT_DECREASE, PREV->br_startblock, tp 1545 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1549 fs/xfs/libxfs/xfs_refcount.c struct xfs_mount *mp = tp->t_mountp; tp 1554 fs/xfs/libxfs/xfs_refcount.c __xfs_refcount_add(tp, XFS_REFCOUNT_ALLOC_COW, fsb, len); tp 1557 fs/xfs/libxfs/xfs_refcount.c xfs_rmap_alloc_extent(tp, XFS_FSB_TO_AGNO(mp, fsb), tp 1564 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp, tp 1568 fs/xfs/libxfs/xfs_refcount.c struct xfs_mount *mp = tp->t_mountp; tp 1574 fs/xfs/libxfs/xfs_refcount.c xfs_rmap_free_extent(tp, XFS_FSB_TO_AGNO(mp, fsb), tp 1576 fs/xfs/libxfs/xfs_refcount.c __xfs_refcount_add(tp, XFS_REFCOUNT_FREE_COW, fsb, len); tp 1610 fs/xfs/libxfs/xfs_refcount.c struct xfs_trans *tp; tp 1636 fs/xfs/libxfs/xfs_refcount.c error = xfs_trans_alloc_empty(mp, &tp); tp 1640 fs/xfs/libxfs/xfs_refcount.c error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); tp 1647 fs/xfs/libxfs/xfs_refcount.c cur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno); tp 1657 fs/xfs/libxfs/xfs_refcount.c xfs_trans_brelse(tp, agbp); tp 1658 fs/xfs/libxfs/xfs_refcount.c xfs_trans_cancel(tp); tp 1665 fs/xfs/libxfs/xfs_refcount.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp); tp 1674 fs/xfs/libxfs/xfs_refcount.c xfs_refcount_free_cow_extent(tp, fsb, tp 1678 fs/xfs/libxfs/xfs_refcount.c xfs_bmap_add_free(tp, fsb, rr->rr_rrec.rc_blockcount, NULL); tp 1680 fs/xfs/libxfs/xfs_refcount.c error = xfs_trans_commit(tp); tp 1690 fs/xfs/libxfs/xfs_refcount.c xfs_trans_cancel(tp); tp 32 fs/xfs/libxfs/xfs_refcount.h void xfs_refcount_increase_extent(struct xfs_trans *tp, tp 34 fs/xfs/libxfs/xfs_refcount.h void xfs_refcount_decrease_extent(struct xfs_trans *tp, tp 37 fs/xfs/libxfs/xfs_refcount.h extern void xfs_refcount_finish_one_cleanup(struct xfs_trans *tp, tp 39 fs/xfs/libxfs/xfs_refcount.h extern int xfs_refcount_finish_one(struct xfs_trans *tp, tp 48 fs/xfs/libxfs/xfs_refcount.h void xfs_refcount_alloc_cow_extent(struct xfs_trans *tp, xfs_fsblock_t fsb, tp 50 fs/xfs/libxfs/xfs_refcount.h void xfs_refcount_free_cow_extent(struct xfs_trans *tp, xfs_fsblock_t fsb, tp 66 fs/xfs/libxfs/xfs_refcount_btree.c args.tp = cur->bc_tp; tp 319 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_trans *tp, tp 330 fs/xfs/libxfs/xfs_refcount_btree.c cur->bc_tp = tp; tp 404 fs/xfs/libxfs/xfs_refcount_btree.c struct xfs_trans *tp, tp 419 fs/xfs/libxfs/xfs_refcount_btree.c error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); tp 426 fs/xfs/libxfs/xfs_refcount_btree.c xfs_trans_brelse(tp, agbp); tp 47 fs/xfs/libxfs/xfs_refcount_btree.h struct xfs_trans *tp, struct xfs_buf *agbp, tp 58 fs/xfs/libxfs/xfs_refcount_btree.h struct xfs_trans *tp, xfs_agnumber_t agno, xfs_extlen_t *ask, tp 648 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 655 fs/xfs/libxfs/xfs_rmap.c struct xfs_mount *mp = tp->t_mountp; tp 662 fs/xfs/libxfs/xfs_rmap.c cur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno); tp 885 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 892 fs/xfs/libxfs/xfs_rmap.c struct xfs_mount *mp = tp->t_mountp; tp 899 fs/xfs/libxfs/xfs_rmap.c cur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno); tp 2130 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2141 fs/xfs/libxfs/xfs_rmap.c xfs_trans_brelse(tp, agbp); tp 2153 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2163 fs/xfs/libxfs/xfs_rmap.c struct xfs_mount *mp = tp->t_mountp; tp 2189 fs/xfs/libxfs/xfs_rmap.c xfs_rmap_finish_one_cleanup(tp, rcur, 0); tp 2199 fs/xfs/libxfs/xfs_rmap.c error = xfs_free_extent_fix_freelist(tp, agno, &agbp); tp 2205 fs/xfs/libxfs/xfs_rmap.c rcur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno); tp 2250 fs/xfs/libxfs/xfs_rmap.c xfs_trans_brelse(tp, agbp); tp 2272 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2280 fs/xfs/libxfs/xfs_rmap.c trace_xfs_rmap_defer(tp->t_mountp, tp 2281 fs/xfs/libxfs/xfs_rmap.c XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock), tp 2283 fs/xfs/libxfs/xfs_rmap.c XFS_FSB_TO_AGBNO(tp->t_mountp, bmap->br_startblock), tp 2296 fs/xfs/libxfs/xfs_rmap.c xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_RMAP, &ri->ri_list); tp 2302 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2307 fs/xfs/libxfs/xfs_rmap.c if (!xfs_rmap_update_is_needed(tp->t_mountp, whichfork)) tp 2310 fs/xfs/libxfs/xfs_rmap.c __xfs_rmap_add(tp, xfs_is_reflink_inode(ip) ? tp 2318 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2323 fs/xfs/libxfs/xfs_rmap.c if (!xfs_rmap_update_is_needed(tp->t_mountp, whichfork)) tp 2326 fs/xfs/libxfs/xfs_rmap.c __xfs_rmap_add(tp, xfs_is_reflink_inode(ip) ? tp 2340 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2348 fs/xfs/libxfs/xfs_rmap.c __xfs_rmap_add(tp, xfs_is_reflink_inode(ip) ? tp 2356 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2364 fs/xfs/libxfs/xfs_rmap.c if (!xfs_rmap_update_is_needed(tp->t_mountp, XFS_DATA_FORK)) tp 2367 fs/xfs/libxfs/xfs_rmap.c bmap.br_startblock = XFS_AGB_TO_FSB(tp->t_mountp, agno, bno); tp 2372 fs/xfs/libxfs/xfs_rmap.c __xfs_rmap_add(tp, XFS_RMAP_ALLOC, owner, XFS_DATA_FORK, &bmap); tp 2378 fs/xfs/libxfs/xfs_rmap.c struct xfs_trans *tp, tp 2386 fs/xfs/libxfs/xfs_rmap.c if (!xfs_rmap_update_is_needed(tp->t_mountp, XFS_DATA_FORK)) tp 2389 fs/xfs/libxfs/xfs_rmap.c bmap.br_startblock = XFS_AGB_TO_FSB(tp->t_mountp, agno, bno); tp 2394 fs/xfs/libxfs/xfs_rmap.c __xfs_rmap_add(tp, XFS_RMAP_FREE, owner, XFS_DATA_FORK, &bmap); tp 115 fs/xfs/libxfs/xfs_rmap.h int xfs_rmap_alloc(struct xfs_trans *tp, struct xfs_buf *agbp, tp 118 fs/xfs/libxfs/xfs_rmap.h int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp, tp 165 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_map_extent(struct xfs_trans *tp, struct xfs_inode *ip, tp 167 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_unmap_extent(struct xfs_trans *tp, struct xfs_inode *ip, tp 169 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_convert_extent(struct xfs_mount *mp, struct xfs_trans *tp, tp 172 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_alloc_extent(struct xfs_trans *tp, xfs_agnumber_t agno, tp 174 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_free_extent(struct xfs_trans *tp, xfs_agnumber_t agno, tp 177 fs/xfs/libxfs/xfs_rmap.h void xfs_rmap_finish_one_cleanup(struct xfs_trans *tp, tp 179 fs/xfs/libxfs/xfs_rmap.h int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type, tp 457 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_trans *tp, tp 465 fs/xfs/libxfs/xfs_rmap_btree.c cur->bc_tp = tp; tp 554 fs/xfs/libxfs/xfs_rmap_btree.c struct xfs_trans *tp, tp 568 fs/xfs/libxfs/xfs_rmap_btree.c error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); tp 575 fs/xfs/libxfs/xfs_rmap_btree.c xfs_trans_brelse(tp, agbp); tp 44 fs/xfs/libxfs/xfs_rmap_btree.h struct xfs_trans *tp, struct xfs_buf *bp, tp 54 fs/xfs/libxfs/xfs_rmap_btree.h extern int xfs_rmapbt_calc_reserves(struct xfs_mount *mp, struct xfs_trans *tp, tp 56 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 77 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, tp 83 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_buf_set_type(tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF tp 96 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 119 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); tp 156 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 170 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 171 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, --block, 0, &bp); tp 202 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 216 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 217 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, --block, 0, &bp); tp 249 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 259 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 271 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 294 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); tp 330 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 344 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 345 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 375 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 389 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 390 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 419 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 429 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 446 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 481 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, *rbpp); tp 482 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, sb, 1, &bp); tp 506 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1); tp 516 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 523 fs/xfs/libxfs/xfs_rtbitmap.c return xfs_rtmodify_summary_int(mp, tp, log, bbno, tp 534 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 558 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); tp 600 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, tp 603 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 640 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, tp 643 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 678 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_buf(tp, bp, (uint)((char *)first - (char *)bufp), tp 690 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 705 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtmodify_range(mp, tp, start, len, 1); tp 714 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtfind_back(mp, tp, start, 0, &preblock); tp 721 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, tp 730 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtmodify_summary(mp, tp, tp 742 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtmodify_summary(mp, tp, tp 753 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtmodify_summary(mp, tp, tp 766 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 792 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, block, 0, &bp); tp 827 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 842 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 843 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 873 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 888 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 889 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtbuf_get(mp, tp, ++block, 0, &bp); tp 918 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 929 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_brelse(tp, bp); tp 942 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 950 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtcheck_range(mp, tp, bno, len, 0, &new, &stat); tp 965 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_t *tp, /* transaction pointer */ tp 974 fs/xfs/libxfs/xfs_rtbitmap.c mp = tp->t_mountp; tp 979 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtcheck_alloc_range(mp, tp, bno, len); tp 986 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtfree_range(mp, tp, bno, len, &sumbp, &sb); tp 993 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS, (long)len); tp 998 fs/xfs/libxfs/xfs_rtbitmap.c if (tp->t_frextents_delta + mp->m_sb.sb_frextents == tp 1003 fs/xfs/libxfs/xfs_rtbitmap.c xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); tp 1011 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_trans *tp, tp 1018 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_mount *mp = tp->t_mountp; tp 1038 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtcheck_range(mp, tp, rtstart, 1, 1, &rtend, tp 1044 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtfind_forw(mp, tp, rtstart, tp 1053 fs/xfs/libxfs/xfs_rtbitmap.c error = fn(tp, &rec, priv); tp 1068 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_trans *tp, tp 1075 fs/xfs/libxfs/xfs_rtbitmap.c keys[1].ar_startext = tp->t_mountp->m_sb.sb_rextents - 1; tp 1078 fs/xfs/libxfs/xfs_rtbitmap.c return xfs_rtalloc_query_range(tp, &keys[0], &keys[1], fn, priv); tp 1085 fs/xfs/libxfs/xfs_rtbitmap.c struct xfs_trans *tp, tp 1094 fs/xfs/libxfs/xfs_rtbitmap.c error = xfs_rtcheck_range(mp, tp, start, len, 1, &end, &matches); tp 920 fs/xfs/libxfs/xfs_sb.c struct xfs_trans *tp) tp 922 fs/xfs/libxfs/xfs_sb.c struct xfs_mount *mp = tp->t_mountp; tp 923 fs/xfs/libxfs/xfs_sb.c struct xfs_buf *bp = xfs_trans_getsb(tp, mp); tp 930 fs/xfs/libxfs/xfs_sb.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF); tp 931 fs/xfs/libxfs/xfs_sb.c xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsb) - 1); tp 950 fs/xfs/libxfs/xfs_sb.c struct xfs_trans *tp; tp 954 fs/xfs/libxfs/xfs_sb.c XFS_TRANS_NO_WRITECOUNT, &tp); tp 958 fs/xfs/libxfs/xfs_sb.c xfs_log_sb(tp); tp 960 fs/xfs/libxfs/xfs_sb.c xfs_trans_set_sync(tp); tp 961 fs/xfs/libxfs/xfs_sb.c return xfs_trans_commit(tp); tp 1045 fs/xfs/libxfs/xfs_sb.c struct xfs_trans *tp; tp 1049 fs/xfs/libxfs/xfs_sb.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_sb, 0, 0, 0, &tp); tp 1053 fs/xfs/libxfs/xfs_sb.c bp = xfs_trans_getsb(tp, mp); tp 1054 fs/xfs/libxfs/xfs_sb.c xfs_log_sb(tp); tp 1055 fs/xfs/libxfs/xfs_sb.c xfs_trans_bhold(tp, bp); tp 1056 fs/xfs/libxfs/xfs_sb.c xfs_trans_set_sync(tp); tp 1057 fs/xfs/libxfs/xfs_sb.c error = xfs_trans_commit(tp); tp 1160 fs/xfs/libxfs/xfs_sb.c struct xfs_trans *tp, tp 1168 fs/xfs/libxfs/xfs_sb.c error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, tp 1182 fs/xfs/libxfs/xfs_sb.c struct xfs_trans *tp, tp 1189 fs/xfs/libxfs/xfs_sb.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, tp 25 fs/xfs/libxfs/xfs_sb.h extern void xfs_log_sb(struct xfs_trans *tp); tp 39 fs/xfs/libxfs/xfs_sb.h struct xfs_trans *tp, xfs_agnumber_t agno, tp 42 fs/xfs/libxfs/xfs_sb.h struct xfs_trans *tp, xfs_agnumber_t agno, tp 134 fs/xfs/libxfs/xfs_shared.h void xfs_symlink_local_to_remote(struct xfs_trans *tp, struct xfs_buf *bp, tp 166 fs/xfs/libxfs/xfs_symlink_remote.c struct xfs_trans *tp, tp 174 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); tp 179 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1); tp 195 fs/xfs/libxfs/xfs_symlink_remote.c xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsymlink_hdr) + tp 26 fs/xfs/libxfs/xfs_trans_inode.c struct xfs_trans *tp, tp 43 fs/xfs/libxfs/xfs_trans_inode.c xfs_trans_add_item(tp, &iip->ili_item); tp 53 fs/xfs/libxfs/xfs_trans_inode.c struct xfs_trans *tp, tp 60 fs/xfs/libxfs/xfs_trans_inode.c ASSERT(tp); tp 86 fs/xfs/libxfs/xfs_trans_inode.c xfs_trans_t *tp, tp 131 fs/xfs/libxfs/xfs_trans_inode.c tp->t_flags |= XFS_TRANS_DIRTY; tp 75 fs/xfs/scrub/agheader.c error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp); tp 46 fs/xfs/scrub/agheader_repair.c error = xfs_sb_get_secondary(mp, sc->tp, agno, &bp); tp 55 fs/xfs/scrub/agheader_repair.c xfs_trans_buf_set_type(sc->tp, bp, XFS_BLFT_SB_BUF); tp 56 fs/xfs/scrub/agheader_repair.c xfs_trans_log_buf(sc->tp, bp, 0, BBTOB(bp->b_length) - 1); tp 248 fs/xfs/scrub/agheader_repair.c cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno, tp 262 fs/xfs/scrub/agheader_repair.c cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno, tp 271 fs/xfs/scrub/agheader_repair.c cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno); tp 283 fs/xfs/scrub/agheader_repair.c cur = xfs_refcountbt_init_cursor(mp, sc->tp, agf_bp, tp 311 fs/xfs/scrub/agheader_repair.c xfs_trans_buf_set_type(sc->tp, agf_bp, XFS_BLFT_AGF_BUF); tp 312 fs/xfs/scrub/agheader_repair.c xfs_trans_log_buf(sc->tp, agf_bp, 0, BBTOB(agf_bp->b_length) - 1); tp 373 fs/xfs/scrub/agheader_repair.c error = xfs_trans_read_buf(mp, sc->tp, mp->m_ddev_targp, tp 390 fs/xfs/scrub/agheader_repair.c error = xfs_alloc_read_agfl(mp, sc->tp, sc->sa.agno, &agfl_bp); tp 494 fs/xfs/scrub/agheader_repair.c cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno); tp 501 fs/xfs/scrub/agheader_repair.c cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno, tp 509 fs/xfs/scrub/agheader_repair.c cur = xfs_allocbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno, tp 567 fs/xfs/scrub/agheader_repair.c xfs_alloc_log_agf(sc->tp, agf_bp, tp 631 fs/xfs/scrub/agheader_repair.c xfs_trans_buf_set_type(sc->tp, agfl_bp, XFS_BLFT_AGFL_BUF); tp 632 fs/xfs/scrub/agheader_repair.c xfs_trans_log_buf(sc->tp, agfl_bp, 0, BBTOB(agfl_bp->b_length) - 1); tp 659 fs/xfs/scrub/agheader_repair.c error = xfs_alloc_read_agf(mp, sc->tp, sc->sa.agno, 0, &agf_bp); tp 669 fs/xfs/scrub/agheader_repair.c error = xfs_trans_read_buf(mp, sc->tp, mp->m_ddev_targp, tp 735 fs/xfs/scrub/agheader_repair.c error = xfs_alloc_read_agf(mp, sc->tp, sc->sa.agno, 0, &agf_bp); tp 820 fs/xfs/scrub/agheader_repair.c cur = xfs_inobt_init_cursor(mp, sc->tp, agi_bp, sc->sa.agno, tp 848 fs/xfs/scrub/agheader_repair.c xfs_trans_buf_set_type(sc->tp, agi_bp, XFS_BLFT_AGI_BUF); tp 849 fs/xfs/scrub/agheader_repair.c xfs_trans_log_buf(sc->tp, agi_bp, 0, BBTOB(agi_bp->b_length) - 1); tp 893 fs/xfs/scrub/agheader_repair.c error = xfs_trans_read_buf(mp, sc->tp, mp->m_ddev_targp, tp 161 fs/xfs/scrub/attr.c args.trans = context->tp; tp 498 fs/xfs/scrub/attr.c sx.context.tp = sc->tp; tp 438 fs/xfs/scrub/bmap.c error = xfs_iread_extents(sc->tp, ip, whichfork); tp 444 fs/xfs/scrub/bmap.c cur = xfs_bmbt_init_cursor(mp, sc->tp, ip, whichfork); tp 541 fs/xfs/scrub/bmap.c error = xfs_alloc_read_agf(sc->mp, sc->tp, agno, 0, &agf); tp 545 fs/xfs/scrub/bmap.c cur = xfs_rmapbt_init_cursor(sc->mp, sc->tp, agf, agno); tp 559 fs/xfs/scrub/bmap.c xfs_trans_brelse(sc->tp, agf); tp 412 fs/xfs/scrub/common.c error = xfs_ialloc_read_agi(mp, sc->tp, agno, agi); tp 416 fs/xfs/scrub/common.c error = xfs_alloc_read_agf(mp, sc->tp, agno, 0, agf); tp 420 fs/xfs/scrub/common.c error = xfs_alloc_read_agfl(mp, sc->tp, agno, agfl); tp 467 fs/xfs/scrub/common.c sa->bno_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, tp 476 fs/xfs/scrub/common.c sa->cnt_cur = xfs_allocbt_init_cursor(mp, sc->tp, sa->agf_bp, tp 485 fs/xfs/scrub/common.c sa->ino_cur = xfs_inobt_init_cursor(mp, sc->tp, sa->agi_bp, tp 494 fs/xfs/scrub/common.c sa->fino_cur = xfs_inobt_init_cursor(mp, sc->tp, sa->agi_bp, tp 503 fs/xfs/scrub/common.c sa->rmap_cur = xfs_rmapbt_init_cursor(mp, sc->tp, sa->agf_bp, tp 512 fs/xfs/scrub/common.c sa->refc_cur = xfs_refcountbt_init_cursor(mp, sc->tp, tp 531 fs/xfs/scrub/common.c xfs_trans_brelse(sc->tp, sa->agfl_bp); tp 535 fs/xfs/scrub/common.c xfs_trans_brelse(sc->tp, sa->agf_bp); tp 539 fs/xfs/scrub/common.c xfs_trans_brelse(sc->tp, sa->agi_bp); tp 605 fs/xfs/scrub/common.c resblks, 0, 0, &sc->tp); tp 607 fs/xfs/scrub/common.c return xfs_trans_alloc_empty(sc->mp, &sc->tp); tp 711 fs/xfs/scrub/common.c error = xfs_imap(sc->mp, sc->tp, sc->sm->sm_ino, &imap, tp 865 fs/xfs/scrub/common.c error = xfs_reflink_inode_has_shared_extents(sc->tp, sc->ip, tp 495 fs/xfs/scrub/dabtree.c ds.dargs.trans = sc->tp; tp 593 fs/xfs/scrub/dabtree.c xfs_trans_brelse(sc->tp, blks[level].bp); tp 70 fs/xfs/scrub/dir.c error = xfs_iget(mp, sdc->sc->tp, inum, 0, 0, &ip); tp 154 fs/xfs/scrub/dir.c error = xfs_dir_lookup(sdc->sc->tp, ip, &xname, &lookup_ino, NULL); tp 339 fs/xfs/scrub/dir.c error = xfs_dir3_block_read(sc->tp, sc->ip, &bp); tp 342 fs/xfs/scrub/dir.c error = xfs_dir3_data_read(sc->tp, sc->ip, lblk, -1, &bp); tp 441 fs/xfs/scrub/dir.c xfs_trans_brelse(sc->tp, bp); tp 495 fs/xfs/scrub/dir.c error = xfs_dir3_leaf_read(sc->tp, sc->ip, lblk, -1, &bp); tp 554 fs/xfs/scrub/dir.c error = xfs_dir3_data_read(sc->tp, sc->ip, tp 560 fs/xfs/scrub/dir.c xfs_trans_brelse(sc->tp, dbp); tp 585 fs/xfs/scrub/dir.c error = xfs_dir2_free_read(sc->tp, sc->ip, lblk, &bp); tp 606 fs/xfs/scrub/dir.c error = xfs_dir3_data_read(sc->tp, sc->ip, tp 613 fs/xfs/scrub/dir.c xfs_trans_brelse(sc->tp, dbp); tp 653 fs/xfs/scrub/dir.c args.trans = sc->tp; tp 832 fs/xfs/scrub/dir.c error = xfs_readdir(sc->tp, sc->ip, &sdc.dir_iter, bufsize); tp 80 fs/xfs/scrub/fscounters.c error = xfs_ialloc_read_agi(mp, sc->tp, agno, &agi_bp); tp 83 fs/xfs/scrub/fscounters.c error = xfs_alloc_read_agf(mp, sc->tp, agno, 0, &agf_bp); tp 476 fs/xfs/scrub/inode.c error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_DATA_FORK, tp 483 fs/xfs/scrub/inode.c error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_ATTR_FORK, tp 543 fs/xfs/scrub/inode.c error = xfs_reflink_inode_has_shared_extents(sc->tp, sc->ip, tp 97 fs/xfs/scrub/parent.c error = xfs_readdir(sc->tp, parent, &spc.dc, bufsize); tp 157 fs/xfs/scrub/parent.c error = xfs_iget(mp, sc->tp, dnum, XFS_IGET_UNTRUSTED, 0, &dp); tp 219 fs/xfs/scrub/parent.c error = xfs_dir_lookup(sc->tp, sc->ip, &xfs_name_dotdot, &dnum, NULL); tp 282 fs/xfs/scrub/parent.c error = xfs_dir_lookup(sc->tp, sc->ip, &xfs_name_dotdot, &dnum, NULL); tp 125 fs/xfs/scrub/repair.c xfs_trans_bhold(sc->tp, sc->sa.agi_bp); tp 127 fs/xfs/scrub/repair.c xfs_trans_bhold(sc->tp, sc->sa.agf_bp); tp 129 fs/xfs/scrub/repair.c xfs_trans_bhold(sc->tp, sc->sa.agfl_bp); tp 138 fs/xfs/scrub/repair.c error = xfs_trans_roll(&sc->tp); tp 144 fs/xfs/scrub/repair.c xfs_trans_bjoin(sc->tp, sc->sa.agi_bp); tp 146 fs/xfs/scrub/repair.c xfs_trans_bjoin(sc->tp, sc->sa.agf_bp); tp 148 fs/xfs/scrub/repair.c xfs_trans_bjoin(sc->tp, sc->sa.agfl_bp); tp 296 fs/xfs/scrub/repair.c error = xfs_alloc_get_freelist(sc->tp, sc->sa.agf_bp, &bno, 1); tp 311 fs/xfs/scrub/repair.c args.tp = sc->tp; tp 341 fs/xfs/scrub/repair.c struct xfs_trans *tp = sc->tp; tp 349 fs/xfs/scrub/repair.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb), tp 353 fs/xfs/scrub/repair.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF); tp 354 fs/xfs/scrub/repair.c xfs_trans_log_buf(tp, bp, 0, BBTOB(bp->b_length) - 1); tp 456 fs/xfs/scrub/repair.c xfs_trans_bjoin(sc->tp, bp); tp 457 fs/xfs/scrub/repair.c xfs_trans_binval(sc->tp, bp); tp 473 fs/xfs/scrub/repair.c args.tp = sc->tp; tp 502 fs/xfs/scrub/repair.c error = xfs_rmap_alloc(sc->tp, sc->sa.agf_bp, sc->sa.agno, agbno, 1, tp 508 fs/xfs/scrub/repair.c error = xfs_alloc_put_freelist(sc->tp, sc->sa.agf_bp, sc->sa.agfl_bp, tp 512 fs/xfs/scrub/repair.c xfs_extent_busy_insert(sc->tp, sc->sa.agno, agbno, 1, tp 542 fs/xfs/scrub/repair.c error = xfs_alloc_read_agf(sc->mp, sc->tp, agno, 0, &agf_bp); tp 550 fs/xfs/scrub/repair.c cur = xfs_rmapbt_init_cursor(sc->mp, sc->tp, agf_bp, agno); tp 572 fs/xfs/scrub/repair.c error = xfs_rmap_free(sc->tp, agf_bp, agno, agbno, 1, oinfo); tp 576 fs/xfs/scrub/repair.c error = xfs_free_extent(sc->tp, fsbno, 1, oinfo, resv); tp 578 fs/xfs/scrub/repair.c xfs_trans_brelse(sc->tp, agf_bp); tp 583 fs/xfs/scrub/repair.c return xfs_trans_roll_inode(&sc->tp, sc->ip); tp 588 fs/xfs/scrub/repair.c xfs_trans_brelse(sc->tp, agf_bp); tp 721 fs/xfs/scrub/repair.c error = xfs_trans_read_buf(mp, ri->sc->tp, mp->m_ddev_targp, daddr, tp 818 fs/xfs/scrub/repair.c xfs_trans_brelse(ri->sc->tp, bp); tp 889 fs/xfs/scrub/repair.c cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno); tp 912 fs/xfs/scrub/repair.c xfs_log_sb(sc->tp); tp 43 fs/xfs/scrub/rtbitmap.c struct xfs_trans *tp, tp 51 fs/xfs/scrub/rtbitmap.c startblock = rec->ar_startext * tp->t_mountp->m_sb.sb_rextsize; tp 52 fs/xfs/scrub/rtbitmap.c blockcount = rec->ar_extcount * tp->t_mountp->m_sb.sb_rextsize; tp 73 fs/xfs/scrub/rtbitmap.c error = xfs_rtalloc_query_all(sc->tp, xchk_rtbitmap_rec, sc); tp 140 fs/xfs/scrub/rtbitmap.c error = xfs_rtalloc_extent_is_free(sc->mp, sc->tp, startext, extcount, tp 155 fs/xfs/scrub/scrub.c if (sc->tp) { tp 157 fs/xfs/scrub/scrub.c error = xfs_trans_commit(sc->tp); tp 159 fs/xfs/scrub/scrub.c xfs_trans_cancel(sc->tp); tp 160 fs/xfs/scrub/scrub.c sc->tp = NULL; tp 61 fs/xfs/scrub/scrub.h struct xfs_trans *tp; tp 133 fs/xfs/xfs_aops.c struct xfs_trans *tp; tp 136 fs/xfs/xfs_aops.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp); tp 140 fs/xfs/xfs_aops.c ioend->io_append_trans = tp; tp 151 fs/xfs/xfs_aops.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 161 fs/xfs/xfs_aops.c struct xfs_trans *tp, tp 171 fs/xfs/xfs_aops.c xfs_trans_cancel(tp); tp 178 fs/xfs/xfs_aops.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 179 fs/xfs/xfs_aops.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 181 fs/xfs/xfs_aops.c return xfs_trans_commit(tp); tp 191 fs/xfs/xfs_aops.c struct xfs_trans *tp; tp 194 fs/xfs/xfs_aops.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp); tp 198 fs/xfs/xfs_aops.c return __xfs_setfilesize(ip, tp, offset, size); tp 207 fs/xfs/xfs_aops.c struct xfs_trans *tp = ioend->io_append_trans; tp 214 fs/xfs/xfs_aops.c current_set_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 219 fs/xfs/xfs_aops.c xfs_trans_cancel(tp); tp 223 fs/xfs/xfs_aops.c return __xfs_setfilesize(ip, tp, ioend->io_offset, ioend->io_size); tp 206 fs/xfs/xfs_attr_list.c struct xfs_trans *tp = context->tp; tp 216 fs/xfs/xfs_attr_list.c error = xfs_da3_node_read(tp, dp, cursor->blkno, -1, &bp, tp 255 fs/xfs/xfs_attr_list.c xfs_trans_brelse(tp, bp); tp 272 fs/xfs/xfs_attr_list.c xfs_trans_brelse(tp, bp); tp 301 fs/xfs/xfs_attr_list.c error = xfs_da3_node_read(context->tp, dp, cursor->blkno, -1, tp 313 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 325 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 330 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 336 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 366 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 367 fs/xfs/xfs_attr_list.c error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno, -1, &bp); tp 371 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 482 fs/xfs/xfs_attr_list.c error = xfs_attr3_leaf_read(context->tp, context->dp, 0, -1, &bp); tp 487 fs/xfs/xfs_attr_list.c xfs_trans_brelse(context->tp, bp); tp 216 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 222 fs/xfs/xfs_bmap_item.c xfs_log_item_init(tp->t_mountp, &budp->bud_item, XFS_LI_BUD, tp 227 fs/xfs/xfs_bmap_item.c xfs_trans_add_item(tp, &budp->bud_item); tp 238 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 250 fs/xfs/xfs_bmap_item.c error = xfs_bmap_finish_one(tp, ip, type, whichfork, startoff, tp 260 fs/xfs/xfs_bmap_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 284 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 290 fs/xfs/xfs_bmap_item.c ASSERT(tp != NULL); tp 292 fs/xfs/xfs_bmap_item.c buip = xfs_bui_init(tp->t_mountp); tp 298 fs/xfs/xfs_bmap_item.c xfs_trans_add_item(tp, &buip->bui_item); tp 328 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 339 fs/xfs/xfs_bmap_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 361 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 365 fs/xfs/xfs_bmap_item.c return xfs_trans_get_bud(tp, intent); tp 371 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp, tp 382 fs/xfs/xfs_bmap_item.c error = xfs_trans_log_finish_bmap_update(tp, done_item, tp 448 fs/xfs/xfs_bmap_item.c struct xfs_trans *tp; tp 497 fs/xfs/xfs_bmap_item.c XFS_EXTENTADD_SPACE_RES(mp, XFS_DATA_FORK), 0, 0, &tp); tp 505 fs/xfs/xfs_bmap_item.c xfs_defer_move(tp, parent_tp); tp 506 fs/xfs/xfs_bmap_item.c budp = xfs_trans_get_bud(tp, buip); tp 509 fs/xfs/xfs_bmap_item.c error = xfs_iget(mp, tp, bmap->me_owner, 0, XFS_ILOCK_EXCL, &ip); tp 531 fs/xfs/xfs_bmap_item.c xfs_trans_ijoin(tp, ip, 0); tp 534 fs/xfs/xfs_bmap_item.c error = xfs_trans_log_finish_bmap_update(tp, budp, type, ip, whichfork, tp 545 fs/xfs/xfs_bmap_item.c xfs_bmap_unmap_extent(tp, ip, &irec); tp 549 fs/xfs/xfs_bmap_item.c xfs_defer_move(parent_tp, tp); tp 550 fs/xfs/xfs_bmap_item.c error = xfs_trans_commit(tp); tp 557 fs/xfs/xfs_bmap_item.c xfs_defer_move(parent_tp, tp); tp 558 fs/xfs/xfs_bmap_item.c xfs_trans_cancel(tp); tp 119 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(ap->tp, mp->m_rbmip, XFS_ILOCK_EXCL); tp 121 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(ap->tp, mp->m_rsumip, XFS_ILOCK_EXCL); tp 130 fs/xfs/xfs_bmap_util.c error = xfs_rtpick_extent(mp, ap->tp, ralen, &rtx); tp 146 fs/xfs/xfs_bmap_util.c error = xfs_rtallocate_extent(ap->tp, ap->blkno, 1, ap->length, tp 157 fs/xfs/xfs_bmap_util.c xfs_trans_log_inode(ap->tp, ap->ip, XFS_ILOG_CORE); tp 164 fs/xfs/xfs_bmap_util.c xfs_trans_mod_dquot_byino(ap->tp, ap->ip, tp 258 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp, tp 274 fs/xfs/xfs_bmap_util.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, XFS_BMAP_BTREE_REF, tp 285 fs/xfs/xfs_bmap_util.c error = xfs_btree_read_bufl(mp, tp, nextbno, &nbp, tp 293 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, nbp); tp 299 fs/xfs/xfs_bmap_util.c error = xfs_bmap_count_tree(mp, tp, ifp, bno, level, nextents, tp 302 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); tp 307 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); tp 315 fs/xfs/xfs_bmap_util.c xfs_trans_brelse(tp, bp); tp 319 fs/xfs/xfs_bmap_util.c error = xfs_btree_read_bufl(mp, tp, bno, &bp, tp 337 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp, tp 365 fs/xfs/xfs_bmap_util.c error = xfs_iread_extents(tp, ip, whichfork); tp 382 fs/xfs/xfs_bmap_util.c error = xfs_bmap_count_tree(mp, tp, ifp, bno, level, tp 778 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp; tp 820 fs/xfs/xfs_bmap_util.c &tp); tp 827 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, 0); tp 835 fs/xfs/xfs_bmap_util.c error = xfs_itruncate_extents_flags(&tp, ip, XFS_DATA_FORK, tp 842 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 844 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 871 fs/xfs/xfs_bmap_util.c xfs_trans_t *tp; tp 946 fs/xfs/xfs_bmap_util.c resrtextents, 0, &tp); tp 959 fs/xfs/xfs_bmap_util.c error = xfs_trans_reserve_quota_nblks(tp, ip, qblocks, tp 964 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, 0); tp 966 fs/xfs/xfs_bmap_util.c error = xfs_bmapi_write(tp, ip, startoffset_fsb, tp 975 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 994 fs/xfs/xfs_bmap_util.c xfs_trans_unreserve_quota_nblks(tp, ip, (long)qblocks, 0, quota_flag); tp 997 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 1010 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp; tp 1014 fs/xfs/xfs_bmap_util.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); tp 1021 fs/xfs/xfs_bmap_util.c error = xfs_trans_reserve_quota(tp, mp, ip->i_udquot, ip->i_gdquot, tp 1026 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, 0); tp 1028 fs/xfs/xfs_bmap_util.c error = xfs_bunmapi(tp, ip, startoffset_fsb, len_fsb, 0, 2, done); tp 1032 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 1038 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 1230 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp; tp 1252 fs/xfs/xfs_bmap_util.c &tp); tp 1257 fs/xfs/xfs_bmap_util.c error = xfs_trans_reserve_quota(tp, mp, ip->i_udquot, tp 1262 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 1264 fs/xfs/xfs_bmap_util.c error = xfs_bmap_collapse_extents(tp, ip, &next_fsb, shift_fsb, tp 1269 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 1275 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 1298 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp; tp 1329 fs/xfs/xfs_bmap_util.c &tp); tp 1334 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 1335 fs/xfs/xfs_bmap_util.c error = xfs_bmap_insert_extents(tp, ip, &next_fsb, shift_fsb, tp 1340 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 1346 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 1473 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp = *tpp; tp 1515 fs/xfs/xfs_bmap_util.c ASSERT(tp->t_firstblock == NULLFSBLOCK); tp 1537 fs/xfs/xfs_bmap_util.c xfs_bmap_unmap_extent(tp, tip, &uirec); tp 1540 fs/xfs/xfs_bmap_util.c xfs_bmap_unmap_extent(tp, ip, &irec); tp 1543 fs/xfs/xfs_bmap_util.c xfs_bmap_map_extent(tp, ip, &uirec); tp 1546 fs/xfs/xfs_bmap_util.c xfs_bmap_map_extent(tp, tip, &irec); tp 1549 fs/xfs/xfs_bmap_util.c tp = *tpp; tp 1577 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp, tp 1594 fs/xfs/xfs_bmap_util.c error = xfs_bmap_count_blocks(tp, ip, XFS_ATTR_FORK, &junk, tp 1601 fs/xfs/xfs_bmap_util.c error = xfs_bmap_count_blocks(tp, tip, XFS_ATTR_FORK, &junk, tp 1689 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp = *tpp; tp 1692 fs/xfs/xfs_bmap_util.c error = xfs_bmbt_change_owner(tp, ip, XFS_DATA_FORK, ip->i_ino, tp 1701 fs/xfs/xfs_bmap_util.c tp = *tpp; tp 1707 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, 0); tp 1708 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, tmpip, 0); tp 1709 fs/xfs/xfs_bmap_util.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1710 fs/xfs/xfs_bmap_util.c xfs_trans_log_inode(tp, tmpip, XFS_ILOG_CORE); tp 1723 fs/xfs/xfs_bmap_util.c struct xfs_trans *tp; tp 1795 fs/xfs/xfs_bmap_util.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); tp 1805 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, ip, 0); tp 1806 fs/xfs/xfs_bmap_util.c xfs_trans_ijoin(tp, tip, 0); tp 1855 fs/xfs/xfs_bmap_util.c error = xfs_swap_extent_rmap(&tp, ip, tip); tp 1857 fs/xfs/xfs_bmap_util.c error = xfs_swap_extent_forks(tp, ip, tip, &src_log_flags, tp 1890 fs/xfs/xfs_bmap_util.c xfs_trans_log_inode(tp, ip, src_log_flags); tp 1891 fs/xfs/xfs_bmap_util.c xfs_trans_log_inode(tp, tip, target_log_flags); tp 1900 fs/xfs/xfs_bmap_util.c error = xfs_swap_change_owner(&tp, ip, tip); tp 1905 fs/xfs/xfs_bmap_util.c error = xfs_swap_change_owner(&tp, tip, ip); tp 1915 fs/xfs/xfs_bmap_util.c xfs_trans_set_sync(tp); tp 1917 fs/xfs/xfs_bmap_util.c error = xfs_trans_commit(tp); tp 1929 fs/xfs/xfs_bmap_util.c xfs_trans_cancel(tp); tp 53 fs/xfs/xfs_bmap_util.h int xfs_bmap_last_extent(struct xfs_trans *tp, struct xfs_inode *ip, tp 79 fs/xfs/xfs_bmap_util.h int xfs_bmap_count_blocks(struct xfs_trans *tp, struct xfs_inode *ip, tp 495 fs/xfs/xfs_dir2_readdir.c struct xfs_trans *tp, tp 514 fs/xfs/xfs_dir2_readdir.c args.trans = tp; tp 208 fs/xfs/xfs_dquot.c xfs_trans_t *tp, tp 219 fs/xfs/xfs_dquot.c ASSERT(tp); tp 241 fs/xfs/xfs_dquot.c xfs_trans_dquot_buf(tp, bp, tp 245 fs/xfs/xfs_dquot.c xfs_trans_log_buf(tp, bp, 0, BBTOB(q->qi_dqchunklen) - 1); tp 286 fs/xfs/xfs_dquot.c struct xfs_trans *tp = *tpp; tp 287 fs/xfs/xfs_dquot.c struct xfs_mount *mp = tp->t_mountp; tp 306 fs/xfs/xfs_dquot.c xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL); tp 307 fs/xfs/xfs_dquot.c error = xfs_bmapi_write(tp, quotip, dqp->q_fileoffset, tp 323 fs/xfs/xfs_dquot.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, dqp->q_blkno, tp 333 fs/xfs/xfs_dquot.c xfs_qm_init_dquot_blk(tp, mp, be32_to_cpu(dqp->q_core.d_id), tp 358 fs/xfs/xfs_dquot.c xfs_trans_bhold(tp, bp); tp 521 fs/xfs/xfs_dquot.c struct xfs_trans *tp; tp 525 fs/xfs/xfs_dquot.c XFS_QM_DQALLOC_SPACE_RES(mp), 0, 0, &tp); tp 529 fs/xfs/xfs_dquot.c error = xfs_dquot_disk_alloc(&tp, dqp, bpp); tp 533 fs/xfs/xfs_dquot.c error = xfs_trans_commit(tp); tp 546 fs/xfs/xfs_dquot.c xfs_trans_cancel(tp); tp 24 fs/xfs/xfs_extent_busy.c struct xfs_trans *tp, tp 44 fs/xfs/xfs_extent_busy.c trace_xfs_extent_busy(tp->t_mountp, agno, bno, len); tp 46 fs/xfs/xfs_extent_busy.c pag = xfs_perag_get(tp->t_mountp, new->agno); tp 67 fs/xfs/xfs_extent_busy.c list_add(&new->list, &tp->t_busy); tp 34 fs/xfs/xfs_extent_busy.h xfs_extent_busy_insert(struct xfs_trans *tp, xfs_agnumber_t agno, tp 325 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 341 fs/xfs/xfs_extfree_item.c xfs_log_item_init(tp->t_mountp, &efdp->efd_item, XFS_LI_EFD, tp 347 fs/xfs/xfs_extfree_item.c xfs_trans_add_item(tp, &efdp->efd_item); tp 358 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 365 fs/xfs/xfs_extfree_item.c struct xfs_mount *mp = tp->t_mountp; tp 373 fs/xfs/xfs_extfree_item.c trace_xfs_bmap_free_deferred(tp->t_mountp, agno, 0, agbno, ext_len); tp 375 fs/xfs/xfs_extfree_item.c error = __xfs_free_extent(tp, start_block, ext_len, tp 384 fs/xfs/xfs_extfree_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 417 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 422 fs/xfs/xfs_extfree_item.c ASSERT(tp != NULL); tp 425 fs/xfs/xfs_extfree_item.c efip = xfs_efi_init(tp->t_mountp, count); tp 431 fs/xfs/xfs_extfree_item.c xfs_trans_add_item(tp, &efip->efi_item); tp 438 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 449 fs/xfs/xfs_extfree_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 467 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 471 fs/xfs/xfs_extfree_item.c return xfs_trans_get_efd(tp, intent, count); tp 477 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 486 fs/xfs/xfs_extfree_item.c error = xfs_trans_free_extent(tp, done_item, tp 530 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp, tp 535 fs/xfs/xfs_extfree_item.c struct xfs_mount *mp = tp->t_mountp; tp 552 fs/xfs/xfs_extfree_item.c error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); tp 554 fs/xfs/xfs_extfree_item.c error = xfs_free_agfl_block(tp, agno, agbno, agbp, tp 564 fs/xfs/xfs_extfree_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 600 fs/xfs/xfs_extfree_item.c struct xfs_trans *tp; tp 631 fs/xfs/xfs_extfree_item.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); tp 634 fs/xfs/xfs_extfree_item.c efdp = xfs_trans_get_efd(tp, efip, efip->efi_format.efi_nextents); tp 638 fs/xfs/xfs_extfree_item.c error = xfs_trans_free_extent(tp, efdp, extp->ext_start, tp 647 fs/xfs/xfs_extfree_item.c error = xfs_trans_commit(tp); tp 651 fs/xfs/xfs_extfree_item.c xfs_trans_cancel(tp); tp 40 fs/xfs/xfs_file.c struct xfs_trans *tp; tp 44 fs/xfs/xfs_file.c 0, 0, 0, &tp); tp 49 fs/xfs/xfs_file.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 55 fs/xfs/xfs_file.c xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 63 fs/xfs/xfs_file.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 65 fs/xfs/xfs_file.c xfs_trans_set_sync(tp); tp 66 fs/xfs/xfs_file.c return xfs_trans_commit(tp); tp 379 fs/xfs/xfs_filestream.c if (ap->tp->t_flags & XFS_TRANS_LOWMODE) tp 172 fs/xfs/xfs_fsmap.c int (*fn)(struct xfs_trans *tp, tp 192 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 197 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 212 fs/xfs/xfs_fsmap.c cur = xfs_refcountbt_init_cursor(mp, tp, info->agf_bp, tp 232 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 238 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 316 fs/xfs/xfs_fsmap.c error = xfs_getfsmap_is_shared(tp, info, rec, &shared); tp 394 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 398 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 434 fs/xfs/xfs_fsmap.c return xfs_getfsmap_helper(tp, info, &rmap, 0); tp 441 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 445 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 457 fs/xfs/xfs_fsmap.c return xfs_getfsmap_helper(tp, info, &irec, rec_daddr); tp 463 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 469 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 503 fs/xfs/xfs_fsmap.c return query_fn(tp, info); tp 509 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 516 fs/xfs/xfs_fsmap.c xfs_ilock(tp->t_mountp->m_rbmip, XFS_ILOCK_SHARED); tp 520 fs/xfs/xfs_fsmap.c do_div(alow.ar_startext, tp->t_mountp->m_sb.sb_rextsize); tp 521 fs/xfs/xfs_fsmap.c if (do_div(ahigh.ar_startext, tp->t_mountp->m_sb.sb_rextsize)) tp 523 fs/xfs/xfs_fsmap.c error = xfs_rtalloc_query_range(tp, &alow, &ahigh, tp 530 fs/xfs/xfs_fsmap.c error = xfs_getfsmap_rtdev_rtbitmap_helper(tp, &ahigh, info); tp 534 fs/xfs/xfs_fsmap.c xfs_iunlock(tp->t_mountp->m_rbmip, XFS_ILOCK_SHARED); tp 541 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 546 fs/xfs/xfs_fsmap.c return __xfs_getfsmap_rtdev(tp, keys, xfs_getfsmap_rtdev_rtbitmap_query, tp 554 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 563 fs/xfs/xfs_fsmap.c struct xfs_mount *mp = tp->t_mountp; tp 622 fs/xfs/xfs_fsmap.c xfs_trans_brelse(tp, info->agf_bp); tp 626 fs/xfs/xfs_fsmap.c error = xfs_alloc_read_agf(mp, tp, info->agno, 0, tp 635 fs/xfs/xfs_fsmap.c error = query_fn(tp, info, &bt_cur, priv); tp 653 fs/xfs/xfs_fsmap.c error = query_fn(tp, info, &bt_cur, priv); tp 662 fs/xfs/xfs_fsmap.c xfs_trans_brelse(tp, info->agf_bp); tp 672 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 682 fs/xfs/xfs_fsmap.c *curpp = xfs_rmapbt_init_cursor(tp->t_mountp, tp, info->agf_bp, tp 691 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 696 fs/xfs/xfs_fsmap.c return __xfs_getfsmap_datadev(tp, keys, info, tp 703 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 715 fs/xfs/xfs_fsmap.c *curpp = xfs_allocbt_init_cursor(tp->t_mountp, tp, info->agf_bp, tp 726 fs/xfs/xfs_fsmap.c struct xfs_trans *tp, tp 733 fs/xfs/xfs_fsmap.c return __xfs_getfsmap_datadev(tp, keys, info, tp 821 fs/xfs/xfs_fsmap.c struct xfs_trans *tp = NULL; tp 920 fs/xfs/xfs_fsmap.c error = xfs_trans_alloc_empty(mp, &tp); tp 927 fs/xfs/xfs_fsmap.c error = handlers[i].fn(tp, dkeys, &info); tp 930 fs/xfs/xfs_fsmap.c xfs_trans_cancel(tp); tp 931 fs/xfs/xfs_fsmap.c tp = NULL; tp 935 fs/xfs/xfs_fsmap.c if (tp) tp 936 fs/xfs/xfs_fsmap.c xfs_trans_cancel(tp); tp 38 fs/xfs/xfs_fsops.c xfs_trans_t *tp; tp 73 fs/xfs/xfs_fsops.c XFS_GROWFS_SPACE_RES(mp), 0, XFS_TRANS_RESERVE, &tp); tp 110 fs/xfs/xfs_fsops.c xfs_trans_agblocks_delta(tp, id.nfree); tp 114 fs/xfs/xfs_fsops.c error = xfs_ag_extend_space(mp, tp, &id, new); tp 125 fs/xfs/xfs_fsops.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_AGCOUNT, nagcount - oagcount); tp 127 fs/xfs/xfs_fsops.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_DBLOCKS, tp 130 fs/xfs/xfs_fsops.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FDBLOCKS, id.nfree); tp 131 fs/xfs/xfs_fsops.c xfs_trans_set_sync(tp); tp 132 fs/xfs/xfs_fsops.c error = xfs_trans_commit(tp); tp 167 fs/xfs/xfs_fsops.c xfs_trans_cancel(tp); tp 198 fs/xfs/xfs_fsops.c struct xfs_trans *tp; tp 206 fs/xfs/xfs_fsops.c XFS_GROWFS_SPACE_RES(mp), 0, XFS_TRANS_RESERVE, &tp); tp 211 fs/xfs/xfs_fsops.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_IMAXPCT, dpct); tp 212 fs/xfs/xfs_fsops.c xfs_trans_set_sync(tp); tp 213 fs/xfs/xfs_fsops.c return xfs_trans_commit(tp); tp 494 fs/xfs/xfs_icache.c xfs_trans_t *tp, tp 509 fs/xfs/xfs_icache.c error = xfs_iread(mp, tp, ip, flags); tp 617 fs/xfs/xfs_icache.c xfs_trans_t *tp, tp 664 fs/xfs/xfs_icache.c error = xfs_iget_cache_miss(mp, pag, tp, ino, &ip, tp 712 fs/xfs/xfs_icache.c struct xfs_trans *tp, tp 719 fs/xfs/xfs_icache.c error = xfs_iget(mp, tp, ino, XFS_IGET_INCORE, 0, &ip); tp 45 fs/xfs/xfs_icache.h int xfs_iget(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t ino, tp 119 fs/xfs/xfs_icache.h int xfs_icache_inode_is_allocated(struct xfs_mount *mp, struct xfs_trans *tp, tp 82 fs/xfs/xfs_icreate_item.c struct xfs_trans *tp, tp 94 fs/xfs/xfs_icreate_item.c xfs_log_item_init(tp->t_mountp, &icp->ic_item, XFS_LI_ICREATE, tp 106 fs/xfs/xfs_icreate_item.c xfs_trans_add_item(tp, &icp->ic_item); tp 107 fs/xfs/xfs_icreate_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 17 fs/xfs/xfs_icreate_item.h void xfs_icreate_log(struct xfs_trans *tp, xfs_agnumber_t agno, tp 744 fs/xfs/xfs_inode.c xfs_trans_t *tp, tp 753 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 765 fs/xfs/xfs_inode.c error = xfs_dialloc(tp, pip ? pip->i_ino : 0, mode, tp 792 fs/xfs/xfs_inode.c error = xfs_iget(mp, tp, ino, XFS_IGET_CREATE, tp 939 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 940 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, flags); tp 972 fs/xfs/xfs_inode.c xfs_trans_t *tp; tp 979 fs/xfs/xfs_inode.c tp = *tpp; tp 980 fs/xfs/xfs_inode.c ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); tp 997 fs/xfs/xfs_inode.c code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, &ialloc_context, tp 1028 fs/xfs/xfs_inode.c xfs_trans_bhold(tp, ialloc_context); tp 1037 fs/xfs/xfs_inode.c if (tp->t_dqinfo) { tp 1038 fs/xfs/xfs_inode.c dqinfo = (void *)tp->t_dqinfo; tp 1039 fs/xfs/xfs_inode.c tp->t_dqinfo = NULL; tp 1040 fs/xfs/xfs_inode.c tflags = tp->t_flags & XFS_TRANS_DQ_DIRTY; tp 1041 fs/xfs/xfs_inode.c tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY); tp 1044 fs/xfs/xfs_inode.c code = xfs_trans_roll(&tp); tp 1050 fs/xfs/xfs_inode.c tp->t_dqinfo = dqinfo; tp 1051 fs/xfs/xfs_inode.c tp->t_flags |= tflags; tp 1056 fs/xfs/xfs_inode.c *tpp = tp; tp 1060 fs/xfs/xfs_inode.c xfs_trans_bjoin(tp, ialloc_context); tp 1067 fs/xfs/xfs_inode.c code = xfs_ialloc(tp, dp, mode, nlink, rdev, prid, tp 1075 fs/xfs/xfs_inode.c *tpp = tp; tp 1084 fs/xfs/xfs_inode.c *tpp = tp; tp 1096 fs/xfs/xfs_inode.c xfs_trans_t *tp, tp 1099 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); tp 1102 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1107 fs/xfs/xfs_inode.c return xfs_iunlink(tp, ip); tp 1115 fs/xfs/xfs_inode.c xfs_trans_t *tp, tp 1118 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); tp 1122 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1136 fs/xfs/xfs_inode.c struct xfs_trans *tp = NULL; tp 1177 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); tp 1181 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); tp 1192 fs/xfs/xfs_inode.c error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, tp 1202 fs/xfs/xfs_inode.c error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev, prid, &ip); tp 1213 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); tp 1216 fs/xfs/xfs_inode.c error = xfs_dir_createname(tp, dp, name, ip->i_ino, tp 1223 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 1224 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); tp 1227 fs/xfs/xfs_inode.c error = xfs_dir_init(tp, ip, dp); tp 1231 fs/xfs/xfs_inode.c xfs_bumplink(tp, dp); tp 1240 fs/xfs/xfs_inode.c xfs_trans_set_sync(tp); tp 1247 fs/xfs/xfs_inode.c xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); tp 1249 fs/xfs/xfs_inode.c error = xfs_trans_commit(tp); tp 1261 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 1290 fs/xfs/xfs_inode.c struct xfs_trans *tp = NULL; tp 1317 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, tres, resblks, 0, 0, &tp); tp 1321 fs/xfs/xfs_inode.c error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, tp 1326 fs/xfs/xfs_inode.c error = xfs_dir_ialloc(&tp, dp, mode, 0, 0, prid, &ip); tp 1331 fs/xfs/xfs_inode.c xfs_trans_set_sync(tp); tp 1338 fs/xfs/xfs_inode.c xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); tp 1340 fs/xfs/xfs_inode.c error = xfs_iunlink(tp, ip); tp 1344 fs/xfs/xfs_inode.c error = xfs_trans_commit(tp); tp 1356 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 1382 fs/xfs/xfs_inode.c xfs_trans_t *tp; tp 1402 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_link, resblks, 0, 0, &tp); tp 1405 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_link, 0, 0, 0, &tp); tp 1412 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL); tp 1413 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL); tp 1427 fs/xfs/xfs_inode.c error = xfs_dir_canenter(tp, tdp, target_name); tp 1436 fs/xfs/xfs_inode.c error = xfs_iunlink_remove(tp, sip); tp 1441 fs/xfs/xfs_inode.c error = xfs_dir_createname(tp, tdp, target_name, sip->i_ino, tp 1445 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, tdp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 1446 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, tdp, XFS_ILOG_CORE); tp 1448 fs/xfs/xfs_inode.c xfs_bumplink(tp, sip); tp 1456 fs/xfs/xfs_inode.c xfs_trans_set_sync(tp); tp 1458 fs/xfs/xfs_inode.c return xfs_trans_commit(tp); tp 1461 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 1514 fs/xfs/xfs_inode.c struct xfs_trans *tp = *tpp; tp 1525 fs/xfs/xfs_inode.c ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); tp 1551 fs/xfs/xfs_inode.c ASSERT(tp->t_firstblock == NULLFSBLOCK); tp 1552 fs/xfs/xfs_inode.c error = xfs_bunmapi(tp, ip, first_unmap_block, unmap_len, flags, tp 1561 fs/xfs/xfs_inode.c error = xfs_defer_finish(&tp); tp 1565 fs/xfs/xfs_inode.c error = xfs_trans_roll_inode(&tp, ip); tp 1572 fs/xfs/xfs_inode.c error = xfs_reflink_cancel_cow_blocks(ip, &tp, tp 1584 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1589 fs/xfs/xfs_inode.c *tpp = tp; tp 1683 fs/xfs/xfs_inode.c struct xfs_trans *tp; tp 1686 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); tp 1692 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, ip, 0); tp 1700 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1702 fs/xfs/xfs_inode.c error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, 0); tp 1708 fs/xfs/xfs_inode.c error = xfs_trans_commit(tp); tp 1716 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 1732 fs/xfs/xfs_inode.c struct xfs_trans *tp; tp 1749 fs/xfs/xfs_inode.c &tp); tp 1751 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ifree, 0, 0, 0, &tp); tp 1765 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, ip, 0); tp 1767 fs/xfs/xfs_inode.c error = xfs_ifree(tp, ip); tp 1779 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 1787 fs/xfs/xfs_inode.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_ICOUNT, -1); tp 1793 fs/xfs/xfs_inode.c error = xfs_trans_commit(tp); tp 2112 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2122 fs/xfs/xfs_inode.c ASSERT(xfs_verify_agino_or_null(tp->t_mountp, agno, new_agino)); tp 2125 fs/xfs/xfs_inode.c trace_xfs_iunlink_update_bucket(tp->t_mountp, agno, bucket_index, tp 2139 fs/xfs/xfs_inode.c xfs_trans_log_buf(tp, agibp, offset, offset + sizeof(xfs_agino_t) - 1); tp 2146 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2154 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2168 fs/xfs/xfs_inode.c xfs_trans_inode_buf(tp, ibp); tp 2169 fs/xfs/xfs_inode.c xfs_trans_log_buf(tp, ibp, offset, offset + sizeof(xfs_agino_t) - 1); tp 2176 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2182 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2190 fs/xfs/xfs_inode.c error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, 0, 0); tp 2214 fs/xfs/xfs_inode.c xfs_iunlink_update_dinode(tp, agno, XFS_INO_TO_AGINO(mp, ip->i_ino), tp 2218 fs/xfs/xfs_inode.c xfs_trans_brelse(tp, ibp); tp 2231 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2234 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2248 fs/xfs/xfs_inode.c error = xfs_read_agi(mp, tp, agno, &agibp); tp 2271 fs/xfs/xfs_inode.c error = xfs_iunlink_update_inode(tp, ip, agno, next_agino, tp 2289 fs/xfs/xfs_inode.c return xfs_iunlink_update_bucket(tp, agno, agibp, bucket_index, agino); tp 2295 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2302 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2306 fs/xfs/xfs_inode.c error = xfs_imap(mp, tp, XFS_AGINO_TO_INO(mp, agno, agino), imap, 0); tp 2313 fs/xfs/xfs_inode.c error = xfs_imap_to_bp(mp, tp, imap, dipp, bpp, 0, 0); tp 2335 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2345 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2355 fs/xfs/xfs_inode.c error = xfs_iunlink_map_ino(tp, agno, *agino, imap, dipp, bpp); tp 2366 fs/xfs/xfs_inode.c xfs_trans_brelse(tp, *bpp); tp 2379 fs/xfs/xfs_inode.c xfs_trans_brelse(tp, *bpp); tp 2382 fs/xfs/xfs_inode.c error = xfs_iunlink_map_ino(tp, agno, next_agino, imap, dipp, tp 2411 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2414 fs/xfs/xfs_inode.c struct xfs_mount *mp = tp->t_mountp; tp 2430 fs/xfs/xfs_inode.c error = xfs_read_agi(mp, tp, agno, &agibp); tp 2451 fs/xfs/xfs_inode.c error = xfs_iunlink_update_inode(tp, ip, agno, NULLAGINO, &next_agino); tp 2472 fs/xfs/xfs_inode.c error = xfs_iunlink_update_bucket(tp, agno, agibp, bucket_index, tp 2484 fs/xfs/xfs_inode.c error = xfs_iunlink_map_prev(tp, agno, head_agino, agino, tp 2491 fs/xfs/xfs_inode.c xfs_iunlink_update_dinode(tp, agno, prev_agino, last_ibp, tp 2521 fs/xfs/xfs_inode.c xfs_trans_t *tp, tp 2564 fs/xfs/xfs_inode.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, tp 2698 fs/xfs/xfs_inode.c xfs_trans_stale_inode_buf(tp, bp); tp 2699 fs/xfs/xfs_inode.c xfs_trans_binval(tp, bp); tp 2736 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 2752 fs/xfs/xfs_inode.c error = xfs_iunlink_remove(tp, ip); tp 2756 fs/xfs/xfs_inode.c error = xfs_difree(tp, ip->i_ino, &xic); tp 2779 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 2782 fs/xfs/xfs_inode.c error = xfs_ifree_cluster(ip, tp, &xic); tp 2864 fs/xfs/xfs_inode.c xfs_trans_t *tp = NULL; tp 2892 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_remove, resblks, 0, 0, &tp); tp 2896 fs/xfs/xfs_inode.c &tp); tp 2905 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); tp 2906 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 2923 fs/xfs/xfs_inode.c error = xfs_droplink(tp, dp); tp 2928 fs/xfs/xfs_inode.c error = xfs_droplink(tp, ip); tp 2937 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); tp 2939 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 2942 fs/xfs/xfs_inode.c error = xfs_droplink(tp, ip); tp 2946 fs/xfs/xfs_inode.c error = xfs_dir_removename(tp, dp, name, ip->i_ino, resblks); tp 2958 fs/xfs/xfs_inode.c xfs_trans_set_sync(tp); tp 2960 fs/xfs/xfs_inode.c error = xfs_trans_commit(tp); tp 2970 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 3028 fs/xfs/xfs_inode.c struct xfs_trans *tp) tp 3034 fs/xfs/xfs_inode.c if (tp->t_mountp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC)) tp 3035 fs/xfs/xfs_inode.c xfs_trans_set_sync(tp); tp 3037 fs/xfs/xfs_inode.c return xfs_trans_commit(tp); tp 3047 fs/xfs/xfs_inode.c struct xfs_trans *tp, tp 3062 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, dp1, name1, ip2->i_ino, spaceres); tp 3067 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, dp2, name2, ip1->i_ino, spaceres); tp 3080 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, ip2, &xfs_name_dotdot, tp 3087 fs/xfs/xfs_inode.c error = xfs_droplink(tp, dp2); tp 3090 fs/xfs/xfs_inode.c xfs_bumplink(tp, dp1); tp 3104 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, ip1, &xfs_name_dotdot, tp 3111 fs/xfs/xfs_inode.c error = xfs_droplink(tp, dp1); tp 3114 fs/xfs/xfs_inode.c xfs_bumplink(tp, dp2); tp 3129 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, ip1, ip1_flags); tp 3130 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip1, XFS_ILOG_CORE); tp 3133 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, ip2, ip2_flags); tp 3134 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, ip2, XFS_ILOG_CORE); tp 3137 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, dp2, dp2_flags); tp 3138 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, dp2, XFS_ILOG_CORE); tp 3140 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, dp1, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 3141 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, dp1, XFS_ILOG_CORE); tp 3142 fs/xfs/xfs_inode.c return xfs_finish_rename(tp); tp 3145 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 3196 fs/xfs/xfs_inode.c struct xfs_trans *tp; tp 3229 fs/xfs/xfs_inode.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_rename, spaceres, 0, 0, &tp); tp 3233 fs/xfs/xfs_inode.c &tp); tp 3258 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, src_dp, XFS_ILOCK_EXCL); tp 3260 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, target_dp, XFS_ILOCK_EXCL); tp 3261 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, src_ip, XFS_ILOCK_EXCL); tp 3263 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, target_ip, XFS_ILOCK_EXCL); tp 3265 fs/xfs/xfs_inode.c xfs_trans_ijoin(tp, wip, XFS_ILOCK_EXCL); tp 3280 fs/xfs/xfs_inode.c return xfs_cross_rename(tp, src_dp, src_name, src_ip, tp 3294 fs/xfs/xfs_inode.c error = xfs_dir_canenter(tp, target_dp, target_name); tp 3325 fs/xfs/xfs_inode.c error = xfs_iunlink_remove(tp, wip); tp 3329 fs/xfs/xfs_inode.c xfs_bumplink(tp, wip); tp 3330 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, wip, XFS_ILOG_CORE); tp 3343 fs/xfs/xfs_inode.c error = xfs_dir_createname(tp, target_dp, target_name, tp 3348 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, target_dp, tp 3352 fs/xfs/xfs_inode.c xfs_bumplink(tp, target_dp); tp 3364 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, target_dp, target_name, tp 3369 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, target_dp, tp 3376 fs/xfs/xfs_inode.c error = xfs_droplink(tp, target_ip); tp 3384 fs/xfs/xfs_inode.c error = xfs_droplink(tp, target_ip); tp 3398 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, src_ip, &xfs_name_dotdot, tp 3412 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, src_ip, XFS_ICHGTIME_CHG); tp 3413 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, src_ip, XFS_ILOG_CORE); tp 3426 fs/xfs/xfs_inode.c error = xfs_droplink(tp, src_dp); tp 3437 fs/xfs/xfs_inode.c error = xfs_dir_replace(tp, src_dp, src_name, wip->i_ino, tp 3440 fs/xfs/xfs_inode.c error = xfs_dir_removename(tp, src_dp, src_name, src_ip->i_ino, tp 3445 fs/xfs/xfs_inode.c xfs_trans_ichgtime(tp, src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 3446 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, src_dp, XFS_ILOG_CORE); tp 3448 fs/xfs/xfs_inode.c xfs_trans_log_inode(tp, target_dp, XFS_ILOG_CORE); tp 3450 fs/xfs/xfs_inode.c error = xfs_finish_rename(tp); tp 3456 fs/xfs/xfs_inode.c xfs_trans_cancel(tp); tp 300 fs/xfs/xfs_ioctl.c xfs_trans_t *tp; tp 309 fs/xfs/xfs_ioctl.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 314 fs/xfs/xfs_ioctl.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 319 fs/xfs/xfs_ioctl.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 320 fs/xfs/xfs_ioctl.c error = xfs_trans_commit(tp); tp 1247 fs/xfs/xfs_ioctl.c struct xfs_trans *tp, tp 1283 fs/xfs/xfs_ioctl.c xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); tp 1284 fs/xfs/xfs_ioctl.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1368 fs/xfs/xfs_ioctl.c struct xfs_trans *tp; tp 1377 fs/xfs/xfs_ioctl.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 1382 fs/xfs/xfs_ioctl.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL | join_flags); tp 1397 fs/xfs/xfs_ioctl.c xfs_trans_set_sync(tp); tp 1399 fs/xfs/xfs_ioctl.c return tp; tp 1402 fs/xfs/xfs_ioctl.c xfs_trans_cancel(tp); tp 1527 fs/xfs/xfs_ioctl.c struct xfs_trans *tp; tp 1567 fs/xfs/xfs_ioctl.c tp = xfs_ioctl_setattr_get_trans(ip, join_flags); tp 1568 fs/xfs/xfs_ioctl.c if (IS_ERR(tp)) { tp 1569 fs/xfs/xfs_ioctl.c code = PTR_ERR(tp); tp 1575 fs/xfs/xfs_ioctl.c code = xfs_qm_vop_chown_reserve(tp, ip, udqp, NULL, pdqp, tp 1594 fs/xfs/xfs_ioctl.c code = xfs_ioctl_setattr_xflags(tp, ip, fa); tp 1613 fs/xfs/xfs_ioctl.c olddquot = xfs_qm_vop_chown(tp, ip, tp 1636 fs/xfs/xfs_ioctl.c code = xfs_trans_commit(tp); tp 1648 fs/xfs/xfs_ioctl.c xfs_trans_cancel(tp); tp 1694 fs/xfs/xfs_ioctl.c struct xfs_trans *tp; tp 1726 fs/xfs/xfs_ioctl.c tp = xfs_ioctl_setattr_get_trans(ip, join_flags); tp 1727 fs/xfs/xfs_ioctl.c if (IS_ERR(tp)) { tp 1728 fs/xfs/xfs_ioctl.c error = PTR_ERR(tp); tp 1735 fs/xfs/xfs_ioctl.c xfs_trans_cancel(tp); tp 1739 fs/xfs/xfs_ioctl.c error = xfs_ioctl_setattr_xflags(tp, ip, &fa); tp 1741 fs/xfs/xfs_ioctl.c xfs_trans_cancel(tp); tp 1745 fs/xfs/xfs_ioctl.c error = xfs_trans_commit(tp); tp 183 fs/xfs/xfs_iomap.c xfs_trans_t *tp; tp 262 fs/xfs/xfs_iomap.c tflags, &tp); tp 269 fs/xfs/xfs_iomap.c error = xfs_trans_reserve_quota_nblks(tp, ip, qblocks, 0, quota_flag); tp 273 fs/xfs/xfs_iomap.c xfs_trans_ijoin(tp, ip, 0); tp 280 fs/xfs/xfs_iomap.c error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb, tp 288 fs/xfs/xfs_iomap.c error = xfs_trans_commit(tp); tp 308 fs/xfs/xfs_iomap.c xfs_trans_unreserve_quota_nblks(tp, ip, (long)qblocks, 0, quota_flag); tp 310 fs/xfs/xfs_iomap.c xfs_trans_cancel(tp); tp 743 fs/xfs/xfs_iomap.c xfs_trans_t *tp; tp 779 fs/xfs/xfs_iomap.c XFS_TRANS_RESERVE, &tp); tp 784 fs/xfs/xfs_iomap.c xfs_trans_ijoin(tp, ip, 0); tp 790 fs/xfs/xfs_iomap.c error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb, tp 809 fs/xfs/xfs_iomap.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 812 fs/xfs/xfs_iomap.c error = xfs_trans_commit(tp); tp 835 fs/xfs/xfs_iomap.c xfs_trans_cancel(tp); tp 625 fs/xfs/xfs_iops.c xfs_trans_t *tp; tp 673 fs/xfs/xfs_iops.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 678 fs/xfs/xfs_iops.c xfs_trans_ijoin(tp, ip, 0); tp 702 fs/xfs/xfs_iops.c ASSERT(tp); tp 703 fs/xfs/xfs_iops.c error = xfs_qm_vop_chown_reserve(tp, ip, udqp, gdqp, tp 733 fs/xfs/xfs_iops.c olddquot1 = xfs_qm_vop_chown(tp, ip, tp 745 fs/xfs/xfs_iops.c olddquot2 = xfs_qm_vop_chown(tp, ip, tp 758 fs/xfs/xfs_iops.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 763 fs/xfs/xfs_iops.c xfs_trans_set_sync(tp); tp 764 fs/xfs/xfs_iops.c error = xfs_trans_commit(tp); tp 795 fs/xfs/xfs_iops.c xfs_trans_cancel(tp); tp 833 fs/xfs/xfs_iops.c struct xfs_trans *tp; tp 934 fs/xfs/xfs_iops.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); tp 940 fs/xfs/xfs_iops.c xfs_trans_ijoin(tp, ip, 0); tp 972 fs/xfs/xfs_iops.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 975 fs/xfs/xfs_iops.c error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, newsize); tp 997 fs/xfs/xfs_iops.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1002 fs/xfs/xfs_iops.c xfs_trans_set_sync(tp); tp 1004 fs/xfs/xfs_iops.c error = xfs_trans_commit(tp); tp 1011 fs/xfs/xfs_iops.c xfs_trans_cancel(tp); tp 1070 fs/xfs/xfs_iops.c struct xfs_trans *tp; tp 1084 fs/xfs/xfs_iops.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp); tp 1096 fs/xfs/xfs_iops.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 1097 fs/xfs/xfs_iops.c xfs_trans_log_inode(tp, ip, log_flags); tp 1098 fs/xfs/xfs_iops.c return xfs_trans_commit(tp); tp 57 fs/xfs/xfs_itable.c struct xfs_trans *tp, tp 70 fs/xfs/xfs_itable.c error = xfs_iget(mp, tp, ino, tp 193 fs/xfs/xfs_itable.c struct xfs_trans *tp, tp 199 fs/xfs/xfs_itable.c error = xfs_bulkstat_one_int(mp, tp, ino, data); tp 330 fs/xfs/xfs_itable.c struct xfs_trans *tp, tp 53 fs/xfs/xfs_iwalk.c struct xfs_trans *tp; tp 177 fs/xfs/xfs_iwalk.c struct xfs_trans *tp = iwag->tp; tp 193 fs/xfs/xfs_iwalk.c error = iwag->inobt_walk_fn(mp, tp, agno, irec, tp 212 fs/xfs/xfs_iwalk.c error = iwag->iwalk_fn(mp, tp, ino, iwag->data); tp 224 fs/xfs/xfs_iwalk.c struct xfs_trans *tp, tp 234 fs/xfs/xfs_iwalk.c xfs_trans_brelse(tp, *agi_bpp); tp 264 fs/xfs/xfs_iwalk.c struct xfs_trans *tp = iwag->tp; tp 270 fs/xfs/xfs_iwalk.c error = xfs_inobt_cur(mp, tp, agno, XFS_BTNUM_INO, curpp, agi_bpp); tp 347 fs/xfs/xfs_iwalk.c struct xfs_trans *tp = iwag->tp; tp 355 fs/xfs/xfs_iwalk.c xfs_iwalk_del_inobt(tp, curpp, agi_bpp, 0); tp 370 fs/xfs/xfs_iwalk.c error = xfs_inobt_cur(mp, tp, agno, XFS_BTNUM_INO, curpp, agi_bpp); tp 383 fs/xfs/xfs_iwalk.c struct xfs_trans *tp = iwag->tp; tp 453 fs/xfs/xfs_iwalk.c xfs_iwalk_del_inobt(tp, &cur, &agi_bp, error); tp 520 fs/xfs/xfs_iwalk.c struct xfs_trans *tp, tp 529 fs/xfs/xfs_iwalk.c .tp = tp, tp 683 fs/xfs/xfs_iwalk.c struct xfs_trans *tp, tp 692 fs/xfs/xfs_iwalk.c .tp = tp, tp 18 fs/xfs/xfs_iwalk.h typedef int (*xfs_iwalk_fn)(struct xfs_mount *mp, struct xfs_trans *tp, tp 21 fs/xfs/xfs_iwalk.h int xfs_iwalk(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t startino, tp 34 fs/xfs/xfs_iwalk.h typedef int (*xfs_inobt_walk_fn)(struct xfs_mount *mp, struct xfs_trans *tp, tp 39 fs/xfs/xfs_iwalk.h int xfs_inobt_walk(struct xfs_mount *mp, struct xfs_trans *tp, tp 2066 fs/xfs/xfs_log.c struct xfs_trans *tp) tp 2068 fs/xfs/xfs_log.c struct xfs_mount *mp = tp->t_mountp; tp 2073 fs/xfs/xfs_log.c xfs_warn(mp, " log res = %d", tp->t_log_res); tp 2074 fs/xfs/xfs_log.c xfs_warn(mp, " log count = %d", tp->t_log_count); tp 2075 fs/xfs/xfs_log.c xfs_warn(mp, " flags = 0x%x", tp->t_flags); tp 2077 fs/xfs/xfs_log.c xlog_print_tic_res(mp, tp->t_ticket); tp 2080 fs/xfs/xfs_log.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 139 fs/xfs/xfs_log.h void xfs_log_commit_cil(struct xfs_mount *mp, struct xfs_trans *tp, tp 127 fs/xfs/xfs_log_cil.c struct xfs_trans *tp) tp 131 fs/xfs/xfs_log_cil.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 301 fs/xfs/xfs_log_cil.c struct xfs_trans *tp, tp 309 fs/xfs/xfs_log_cil.c if (list_empty(&tp->t_items)) { tp 314 fs/xfs/xfs_log_cil.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 389 fs/xfs/xfs_log_cil.c struct xfs_trans *tp) tp 399 fs/xfs/xfs_log_cil.c ASSERT(tp); tp 405 fs/xfs/xfs_log_cil.c xlog_cil_insert_format_items(log, tp, &len, &diff_iovecs); tp 415 fs/xfs/xfs_log_cil.c if (!list_empty(&tp->t_busy)) tp 416 fs/xfs/xfs_log_cil.c list_splice_init(&tp->t_busy, &ctx->busy_extents); tp 428 fs/xfs/xfs_log_cil.c tp->t_ticket->t_curr_res -= ctx_res; tp 440 fs/xfs/xfs_log_cil.c tp->t_ticket->t_curr_res -= split_res; tp 441 fs/xfs/xfs_log_cil.c ASSERT(tp->t_ticket->t_curr_res >= len); tp 443 fs/xfs/xfs_log_cil.c tp->t_ticket->t_curr_res -= len; tp 450 fs/xfs/xfs_log_cil.c if (WARN_ON(tp->t_ticket->t_curr_res < 0)) { tp 458 fs/xfs/xfs_log_cil.c xlog_print_trans(tp); tp 466 fs/xfs/xfs_log_cil.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 483 fs/xfs/xfs_log_cil.c if (tp->t_ticket->t_curr_res < 0) tp 995 fs/xfs/xfs_log_cil.c struct xfs_trans *tp, tp 1009 fs/xfs/xfs_log_cil.c xlog_cil_alloc_shadow_bufs(log, tp); tp 1014 fs/xfs/xfs_log_cil.c xlog_cil_insert_items(log, tp); tp 1020 fs/xfs/xfs_log_cil.c xfs_log_done(mp, tp->t_ticket, NULL, regrant); tp 1021 fs/xfs/xfs_log_cil.c tp->t_ticket = NULL; tp 1022 fs/xfs/xfs_log_cil.c xfs_trans_unreserve_and_mod_sb(tp); tp 1035 fs/xfs/xfs_log_cil.c trace_xfs_trans_commit_items(tp, _RET_IP_); tp 1036 fs/xfs/xfs_log_cil.c list_for_each_entry_safe(lip, next, &tp->t_items, li_trans) { tp 4746 fs/xfs/xfs_log_recover.c struct xfs_trans *tp; tp 4765 fs/xfs/xfs_log_recover.c 0, XFS_TRANS_RESERVE, &tp); tp 4769 fs/xfs/xfs_log_recover.c xfs_defer_move(tp, parent_tp); tp 4771 fs/xfs/xfs_log_recover.c return xfs_trans_commit(tp); tp 4936 fs/xfs/xfs_log_recover.c xfs_trans_t *tp; tp 4942 fs/xfs/xfs_log_recover.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_clearagi, 0, 0, 0, &tp); tp 4946 fs/xfs/xfs_log_recover.c error = xfs_read_agi(mp, tp, agno, &agibp); tp 4954 fs/xfs/xfs_log_recover.c xfs_trans_log_buf(tp, agibp, offset, tp 4957 fs/xfs/xfs_log_recover.c error = xfs_trans_commit(tp); tp 4963 fs/xfs/xfs_log_recover.c xfs_trans_cancel(tp); tp 234 fs/xfs/xfs_pnfs.c struct xfs_trans *tp; tp 283 fs/xfs/xfs_pnfs.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 288 fs/xfs/xfs_pnfs.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 289 fs/xfs/xfs_pnfs.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 297 fs/xfs/xfs_pnfs.c xfs_trans_set_sync(tp); tp 298 fs/xfs/xfs_pnfs.c error = xfs_trans_commit(tp); tp 738 fs/xfs/xfs_qm.c xfs_trans_t *tp; tp 774 fs/xfs/xfs_qm.c XFS_QM_QINOCREATE_SPACE_RES(mp), 0, 0, &tp); tp 779 fs/xfs/xfs_qm.c error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, 0, ip); tp 781 fs/xfs/xfs_qm.c xfs_trans_cancel(tp); tp 810 fs/xfs/xfs_qm.c xfs_log_sb(tp); tp 812 fs/xfs/xfs_qm.c error = xfs_trans_commit(tp); tp 1118 fs/xfs/xfs_qm.c struct xfs_trans *tp, tp 1140 fs/xfs/xfs_qm.c error = xfs_iget(mp, tp, ino, XFS_IGET_DONTCACHE, 0, &ip); tp 1152 fs/xfs/xfs_qm.c error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); tp 1742 fs/xfs/xfs_qm.c xfs_trans_t *tp, tp 1760 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, prevdq, bfield, -(ip->i_d.di_nblocks)); tp 1761 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, prevdq, XFS_TRANS_DQ_ICOUNT, -1); tp 1764 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, newdq, bfield, ip->i_d.di_nblocks); tp 1765 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, newdq, XFS_TRANS_DQ_ICOUNT, 1); tp 1781 fs/xfs/xfs_qm.c struct xfs_trans *tp, tp 1839 fs/xfs/xfs_qm.c error = xfs_trans_reserve_quota_bydquots(tp, ip->i_mount, tp 1902 fs/xfs/xfs_qm.c struct xfs_trans *tp, tp 1908 fs/xfs/xfs_qm.c struct xfs_mount *mp = tp->t_mountp; tp 1921 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, udqp, XFS_TRANS_DQ_ICOUNT, 1); tp 1927 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, gdqp, XFS_TRANS_DQ_ICOUNT, 1); tp 1934 fs/xfs/xfs_qm.c xfs_trans_mod_dquot(tp, pdqp, XFS_TRANS_DQ_ICOUNT, 1); tp 116 fs/xfs/xfs_qm.h extern void xfs_trans_mod_dquot(struct xfs_trans *tp, struct xfs_dquot *dqp, tp 211 fs/xfs/xfs_qm_syscalls.c struct xfs_trans *tp; tp 223 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); tp 230 fs/xfs/xfs_qm_syscalls.c xfs_trans_ijoin(tp, ip, 0); tp 233 fs/xfs/xfs_qm_syscalls.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 235 fs/xfs/xfs_qm_syscalls.c error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, 0); tp 237 fs/xfs/xfs_qm_syscalls.c xfs_trans_cancel(tp); tp 243 fs/xfs/xfs_qm_syscalls.c xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 244 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_commit(tp); tp 388 fs/xfs/xfs_qm_syscalls.c struct xfs_trans *tp; tp 421 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_setqlim, 0, 0, 0, &tp); tp 426 fs/xfs/xfs_qm_syscalls.c xfs_trans_dqjoin(tp, dqp); tp 530 fs/xfs/xfs_qm_syscalls.c xfs_trans_log_dquot(tp, dqp); tp 532 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_commit(tp); tp 547 fs/xfs/xfs_qm_syscalls.c xfs_trans_t *tp; tp 551 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_equotaoff, 0, 0, 0, &tp); tp 555 fs/xfs/xfs_qm_syscalls.c qoffi = xfs_trans_get_qoff_item(tp, startqoff, tp 557 fs/xfs/xfs_qm_syscalls.c xfs_trans_log_quotaoff_item(tp, qoffi); tp 564 fs/xfs/xfs_qm_syscalls.c xfs_trans_set_sync(tp); tp 565 fs/xfs/xfs_qm_syscalls.c return xfs_trans_commit(tp); tp 575 fs/xfs/xfs_qm_syscalls.c xfs_trans_t *tp; tp 581 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_quotaoff, 0, 0, 0, &tp); tp 585 fs/xfs/xfs_qm_syscalls.c qoffi = xfs_trans_get_qoff_item(tp, NULL, flags & XFS_ALL_QUOTA_ACCT); tp 586 fs/xfs/xfs_qm_syscalls.c xfs_trans_log_quotaoff_item(tp, qoffi); tp 592 fs/xfs/xfs_qm_syscalls.c xfs_log_sb(tp); tp 599 fs/xfs/xfs_qm_syscalls.c xfs_trans_set_sync(tp); tp 600 fs/xfs/xfs_qm_syscalls.c error = xfs_trans_commit(tp); tp 121 fs/xfs/xfs_quota.h #define xfs_trans_dup_dqinfo(tp, tp2) tp 122 fs/xfs/xfs_quota.h #define xfs_trans_free_dqinfo(tp) tp 123 fs/xfs/xfs_quota.h #define xfs_trans_mod_dquot_byino(tp, ip, fields, delta) tp 124 fs/xfs/xfs_quota.h #define xfs_trans_apply_dquot_deltas(tp) tp 125 fs/xfs/xfs_quota.h #define xfs_trans_unreserve_and_mod_dquots(tp) tp 126 fs/xfs/xfs_quota.h static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp, tp 131 fs/xfs/xfs_quota.h static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp, tp 138 fs/xfs/xfs_quota.h #define xfs_qm_vop_create_dqattach(tp, ip, u, g, p) tp 140 fs/xfs/xfs_quota.h #define xfs_qm_vop_chown(tp, ip, old, new) (NULL) tp 141 fs/xfs/xfs_quota.h #define xfs_qm_vop_chown_reserve(tp, ip, u, g, p, fl) (0) tp 153 fs/xfs/xfs_quota.h #define xfs_trans_unreserve_quota_nblks(tp, ip, nblks, ninos, flags) \ tp 154 fs/xfs/xfs_quota.h xfs_trans_reserve_quota_nblks(tp, ip, -(nblks), -(ninos), flags) tp 155 fs/xfs/xfs_quota.h #define xfs_trans_reserve_quota(tp, mp, ud, gd, pd, nb, ni, f) \ tp 156 fs/xfs/xfs_quota.h xfs_trans_reserve_quota_bydquots(tp, mp, ud, gd, pd, nb, ni, \ tp 221 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 227 fs/xfs/xfs_refcount_item.c xfs_log_item_init(tp->t_mountp, &cudp->cud_item, XFS_LI_CUD, tp 232 fs/xfs/xfs_refcount_item.c xfs_trans_add_item(tp, &cudp->cud_item); tp 243 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 254 fs/xfs/xfs_refcount_item.c error = xfs_refcount_finish_one(tp, type, startblock, tp 264 fs/xfs/xfs_refcount_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 290 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 295 fs/xfs/xfs_refcount_item.c ASSERT(tp != NULL); tp 298 fs/xfs/xfs_refcount_item.c cuip = xfs_cui_init(tp->t_mountp, count); tp 304 fs/xfs/xfs_refcount_item.c xfs_trans_add_item(tp, &cuip->cui_item); tp 330 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 341 fs/xfs/xfs_refcount_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 360 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 364 fs/xfs/xfs_refcount_item.c return xfs_trans_get_cud(tp, intent); tp 370 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 381 fs/xfs/xfs_refcount_item.c error = xfs_trans_log_finish_refcount_update(tp, done_item, tp 402 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp, tp 408 fs/xfs/xfs_refcount_item.c xfs_refcount_finish_one_cleanup(tp, rcur, error); tp 458 fs/xfs/xfs_refcount_item.c struct xfs_trans *tp; tp 517 fs/xfs/xfs_refcount_item.c mp->m_refc_maxlevels * 2, 0, XFS_TRANS_RESERVE, &tp); tp 525 fs/xfs/xfs_refcount_item.c xfs_defer_move(tp, parent_tp); tp 526 fs/xfs/xfs_refcount_item.c cudp = xfs_trans_get_cud(tp, cuip); tp 546 fs/xfs/xfs_refcount_item.c error = xfs_trans_log_finish_refcount_update(tp, cudp, tp 558 fs/xfs/xfs_refcount_item.c xfs_refcount_increase_extent(tp, &irec); tp 561 fs/xfs/xfs_refcount_item.c xfs_refcount_decrease_extent(tp, &irec); tp 564 fs/xfs/xfs_refcount_item.c xfs_refcount_alloc_cow_extent(tp, tp 569 fs/xfs/xfs_refcount_item.c xfs_refcount_free_cow_extent(tp, tp 580 fs/xfs/xfs_refcount_item.c xfs_refcount_finish_one_cleanup(tp, rcur, error); tp 582 fs/xfs/xfs_refcount_item.c xfs_defer_move(parent_tp, tp); tp 583 fs/xfs/xfs_refcount_item.c error = xfs_trans_commit(tp); tp 587 fs/xfs/xfs_refcount_item.c xfs_refcount_finish_one_cleanup(tp, rcur, error); tp 588 fs/xfs/xfs_refcount_item.c xfs_defer_move(parent_tp, tp); tp 589 fs/xfs/xfs_refcount_item.c xfs_trans_cancel(tp); tp 131 fs/xfs/xfs_reflink.c struct xfs_trans *tp, tp 143 fs/xfs/xfs_reflink.c error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp); tp 149 fs/xfs/xfs_reflink.c cur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno); tp 156 fs/xfs/xfs_reflink.c xfs_trans_brelse(tp, agbp); tp 358 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 381 fs/xfs/xfs_reflink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); tp 399 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 403 fs/xfs/xfs_reflink.c error = xfs_trans_reserve_quota_nblks(tp, ip, resblks, 0, tp 408 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, ip, 0); tp 412 fs/xfs/xfs_reflink.c error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount, tp 419 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 442 fs/xfs/xfs_reflink.c xfs_trans_unreserve_quota_nblks(tp, ip, (long)resblks, 0, tp 445 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 546 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 562 fs/xfs/xfs_reflink.c 0, 0, 0, &tp); tp 567 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, ip, 0); tp 570 fs/xfs/xfs_reflink.c error = xfs_reflink_cancel_cow_blocks(ip, &tp, offset_fsb, end_fsb, tp 575 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 581 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 607 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 621 fs/xfs/xfs_reflink.c XFS_TRANS_RESERVE, &tp); tp 631 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, ip, 0); tp 667 fs/xfs/xfs_reflink.c error = __xfs_bunmapi(tp, ip, del.br_startoff, &rlen, 0, 1); tp 676 fs/xfs/xfs_reflink.c xfs_refcount_free_cow_extent(tp, del.br_startblock, del.br_blockcount); tp 679 fs/xfs/xfs_reflink.c xfs_bmap_map_extent(tp, ip, &del); tp 682 fs/xfs/xfs_reflink.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_DELBCOUNT, tp 688 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 698 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 869 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 874 fs/xfs/xfs_reflink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 886 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, src, XFS_ILOCK_EXCL); tp 888 fs/xfs/xfs_reflink.c xfs_trans_log_inode(tp, src, XFS_ILOG_CORE); tp 898 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, dest, XFS_ILOCK_EXCL); tp 900 fs/xfs/xfs_reflink.c xfs_trans_log_inode(tp, dest, XFS_ILOG_CORE); tp 906 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 927 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 933 fs/xfs/xfs_reflink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_ichange, 0, 0, 0, &tp); tp 938 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, dest, XFS_ILOCK_EXCL); tp 951 fs/xfs/xfs_reflink.c xfs_trans_log_inode(tp, dest, XFS_ILOG_CORE); tp 953 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 1002 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 1023 fs/xfs/xfs_reflink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks, 0, 0, &tp); tp 1028 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, ip, 0); tp 1032 fs/xfs/xfs_reflink.c error = xfs_trans_reserve_quota_nblks(tp, ip, tp 1044 fs/xfs/xfs_reflink.c ASSERT(tp->t_firstblock == NULLFSBLOCK); tp 1045 fs/xfs/xfs_reflink.c error = __xfs_bunmapi(tp, ip, destoff, &rlen, 0, 1); tp 1067 fs/xfs/xfs_reflink.c xfs_refcount_increase_extent(tp, &uirec); tp 1070 fs/xfs/xfs_reflink.c xfs_bmap_map_extent(tp, ip, &uirec); tp 1073 fs/xfs/xfs_reflink.c xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, tp 1084 fs/xfs/xfs_reflink.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 1089 fs/xfs/xfs_reflink.c error = xfs_defer_finish(&tp); tp 1094 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 1101 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 1467 fs/xfs/xfs_reflink.c struct xfs_trans *tp, tp 1485 fs/xfs/xfs_reflink.c error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); tp 1500 fs/xfs/xfs_reflink.c error = xfs_reflink_find_shared(mp, tp, agno, agbno, aglen, tp 1562 fs/xfs/xfs_reflink.c struct xfs_trans *tp; tp 1566 fs/xfs/xfs_reflink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0, 0, &tp); tp 1571 fs/xfs/xfs_reflink.c xfs_trans_ijoin(tp, ip, 0); tp 1573 fs/xfs/xfs_reflink.c error = xfs_reflink_clear_inode_flag(ip, &tp); tp 1577 fs/xfs/xfs_reflink.c error = xfs_trans_commit(tp); tp 1584 fs/xfs/xfs_reflink.c xfs_trans_cancel(tp); tp 20 fs/xfs/xfs_reflink.h extern int xfs_reflink_find_shared(struct xfs_mount *mp, struct xfs_trans *tp, tp 45 fs/xfs/xfs_reflink.h extern int xfs_reflink_inode_has_shared_extents(struct xfs_trans *tp, tp 242 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 248 fs/xfs/xfs_rmap_item.c xfs_log_item_init(tp->t_mountp, &rudp->rud_item, XFS_LI_RUD, tp 253 fs/xfs/xfs_rmap_item.c xfs_trans_add_item(tp, &rudp->rud_item); tp 307 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 320 fs/xfs/xfs_rmap_item.c error = xfs_rmap_finish_one(tp, type, owner, whichfork, startoff, tp 330 fs/xfs/xfs_rmap_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 356 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 361 fs/xfs/xfs_rmap_item.c ASSERT(tp != NULL); tp 364 fs/xfs/xfs_rmap_item.c ruip = xfs_rui_init(tp->t_mountp, count); tp 370 fs/xfs/xfs_rmap_item.c xfs_trans_add_item(tp, &ruip->rui_item); tp 377 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 388 fs/xfs/xfs_rmap_item.c tp->t_flags |= XFS_TRANS_DIRTY; tp 410 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 414 fs/xfs/xfs_rmap_item.c return xfs_trans_get_rud(tp, intent); tp 420 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 429 fs/xfs/xfs_rmap_item.c error = xfs_trans_log_finish_rmap_update(tp, done_item, tp 444 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp, tp 450 fs/xfs/xfs_rmap_item.c xfs_rmap_finish_one_cleanup(tp, rcur, error); tp 502 fs/xfs/xfs_rmap_item.c struct xfs_trans *tp; tp 547 fs/xfs/xfs_rmap_item.c mp->m_rmap_maxlevels, 0, XFS_TRANS_RESERVE, &tp); tp 550 fs/xfs/xfs_rmap_item.c rudp = xfs_trans_get_rud(tp, ruip); tp 587 fs/xfs/xfs_rmap_item.c error = xfs_trans_log_finish_rmap_update(tp, rudp, type, tp 596 fs/xfs/xfs_rmap_item.c xfs_rmap_finish_one_cleanup(tp, rcur, error); tp 598 fs/xfs/xfs_rmap_item.c error = xfs_trans_commit(tp); tp 602 fs/xfs/xfs_rmap_item.c xfs_rmap_finish_one_cleanup(tp, rcur, error); tp 603 fs/xfs/xfs_rmap_item.c xfs_trans_cancel(tp); tp 32 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 39 fs/xfs/xfs_rtalloc.c return xfs_rtmodify_summary_int(mp, tp, log, bbno, 0, rbpp, rsb, sum); tp 49 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 72 fs/xfs/xfs_rtalloc.c error = xfs_rtget_summary(mp, tp, log, bbno, rbpp, rsb, &sum); tp 104 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp) /* transaction pointer */ tp 118 fs/xfs/xfs_rtalloc.c error = xfs_rtget_summary(omp, tp, log, bbno, &bp, tp 124 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_summary(omp, tp, log, bbno, -sum, tp 128 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_summary(nmp, tp, log, bbno, sum, tp 144 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 161 fs/xfs/xfs_rtalloc.c error = xfs_rtfind_back(mp, tp, start, 0, &preblock); tp 168 fs/xfs/xfs_rtalloc.c error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, tp 177 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_summary(mp, tp, tp 188 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_summary(mp, tp, tp 200 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_summary(mp, tp, tp 210 fs/xfs/xfs_rtalloc.c error = xfs_rtmodify_range(mp, tp, start, len, 0); tp 223 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 254 fs/xfs/xfs_rtalloc.c error = xfs_rtcheck_range(mp, tp, i, maxlen, 1, &next, &stat); tp 262 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_range(mp, tp, i, maxlen, rbpp, tp 290 fs/xfs/xfs_rtalloc.c error = xfs_rtfind_forw(mp, tp, next, end, &i); tp 315 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_range(mp, tp, besti, bestlen, rbpp, rsb); tp 340 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 359 fs/xfs/xfs_rtalloc.c error = xfs_rtcheck_range(mp, tp, bno, maxlen, 1, &next, &isfree); tp 367 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); tp 402 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); tp 419 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 448 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_exact(mp, tp, bno, minlen, maxlen, len, tp 472 fs/xfs/xfs_rtalloc.c error = xfs_rtany_summary(mp, tp, log2len, mp->m_rsumlevels - 1, tp 490 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_block(mp, tp, tp 519 fs/xfs/xfs_rtalloc.c error = xfs_rtany_summary(mp, tp, tp 536 fs/xfs/xfs_rtalloc.c tp, bbno + j, minlen, maxlen, tp 557 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_block(mp, tp, tp 614 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 648 fs/xfs/xfs_rtalloc.c error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, tp 661 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_block(mp, tp, i, maxlen, tp 707 fs/xfs/xfs_rtalloc.c error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, tp 722 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_block(mp, tp, i, tp 770 fs/xfs/xfs_rtalloc.c struct xfs_trans *tp; tp 781 fs/xfs/xfs_rtalloc.c 0, 0, &tp); tp 788 fs/xfs/xfs_rtalloc.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 794 fs/xfs/xfs_rtalloc.c error = xfs_bmapi_write(tp, ip, oblocks, nblocks - oblocks, tp 804 fs/xfs/xfs_rtalloc.c error = xfs_trans_commit(tp); tp 818 fs/xfs/xfs_rtalloc.c 0, 0, 0, &tp); tp 825 fs/xfs/xfs_rtalloc.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 830 fs/xfs/xfs_rtalloc.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, tp 837 fs/xfs/xfs_rtalloc.c xfs_trans_log_buf(tp, bp, 0, mp->m_sb.sb_blocksize - 1); tp 841 fs/xfs/xfs_rtalloc.c error = xfs_trans_commit(tp); tp 854 fs/xfs/xfs_rtalloc.c xfs_trans_cancel(tp); tp 977 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp; tp 1004 fs/xfs/xfs_rtalloc.c &tp); tp 1011 fs/xfs/xfs_rtalloc.c xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); tp 1017 fs/xfs/xfs_rtalloc.c xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); tp 1022 fs/xfs/xfs_rtalloc.c xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL); tp 1027 fs/xfs/xfs_rtalloc.c xfs_trans_log_inode(tp, mp->m_rsumip, XFS_ILOG_CORE); tp 1034 fs/xfs/xfs_rtalloc.c error = xfs_rtcopy_summary(mp, nmp, tp); tp 1042 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTSIZE, tp 1045 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_RBMBLOCKS, tp 1048 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_RBLOCKS, tp 1051 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTENTS, tp 1054 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_REXTSLOG, tp 1060 fs/xfs/xfs_rtalloc.c error = xfs_rtfree_range(nmp, tp, sbp->sb_rextents, tp 1064 fs/xfs/xfs_rtalloc.c xfs_trans_cancel(tp); tp 1070 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS, tp 1078 fs/xfs/xfs_rtalloc.c error = xfs_trans_commit(tp); tp 1112 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 1121 fs/xfs/xfs_rtalloc.c xfs_mount_t *mp = tp->t_mountp; tp 1149 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_size(mp, tp, minlen, maxlen, len, tp 1152 fs/xfs/xfs_rtalloc.c error = xfs_rtallocate_extent_near(mp, tp, bno, minlen, maxlen, tp 1167 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_RES_FREXTENTS, -slen); tp 1169 fs/xfs/xfs_rtalloc.c xfs_trans_mod_sb(tp, XFS_TRANS_SB_FREXTENTS, -slen); tp 1274 fs/xfs/xfs_rtalloc.c xfs_trans_t *tp, /* transaction pointer */ tp 1304 fs/xfs/xfs_rtalloc.c xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); tp 25 fs/xfs/xfs_rtalloc.h struct xfs_trans *tp, tp 41 fs/xfs/xfs_rtalloc.h struct xfs_trans *tp, /* transaction pointer */ tp 56 fs/xfs/xfs_rtalloc.h struct xfs_trans *tp, /* transaction pointer */ tp 88 fs/xfs/xfs_rtalloc.h struct xfs_trans *tp, /* transaction pointer */ tp 103 fs/xfs/xfs_rtalloc.h int xfs_rtbuf_get(struct xfs_mount *mp, struct xfs_trans *tp, tp 105 fs/xfs/xfs_rtalloc.h int xfs_rtcheck_range(struct xfs_mount *mp, struct xfs_trans *tp, tp 108 fs/xfs/xfs_rtalloc.h int xfs_rtfind_back(struct xfs_mount *mp, struct xfs_trans *tp, tp 111 fs/xfs/xfs_rtalloc.h int xfs_rtfind_forw(struct xfs_mount *mp, struct xfs_trans *tp, tp 114 fs/xfs/xfs_rtalloc.h int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp, tp 116 fs/xfs/xfs_rtalloc.h int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp, tp 120 fs/xfs/xfs_rtalloc.h int xfs_rtmodify_summary(struct xfs_mount *mp, struct xfs_trans *tp, int log, tp 123 fs/xfs/xfs_rtalloc.h int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp, tp 126 fs/xfs/xfs_rtalloc.h int xfs_rtalloc_query_range(struct xfs_trans *tp, tp 131 fs/xfs/xfs_rtalloc.h int xfs_rtalloc_query_all(struct xfs_trans *tp, tp 135 fs/xfs/xfs_rtalloc.h int xfs_rtalloc_extent_is_free(struct xfs_mount *mp, struct xfs_trans *tp, tp 971 fs/xfs/xfs_super.c struct xfs_trans *tp; tp 978 fs/xfs/xfs_super.c if (xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp)) tp 981 fs/xfs/xfs_super.c xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); tp 982 fs/xfs/xfs_super.c xfs_trans_log_inode(tp, ip, XFS_ILOG_TIMESTAMP); tp 983 fs/xfs/xfs_super.c xfs_trans_commit(tp); tp 153 fs/xfs/xfs_symlink.c struct xfs_trans *tp = NULL; tp 212 fs/xfs/xfs_symlink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_symlink, resblks, 0, 0, &tp); tp 230 fs/xfs/xfs_symlink.c error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, tp 238 fs/xfs/xfs_symlink.c error = xfs_dir_ialloc(&tp, dp, S_IFLNK | (mode & ~S_IFMT), 1, 0, tp 250 fs/xfs/xfs_symlink.c xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); tp 256 fs/xfs/xfs_symlink.c xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp); tp 268 fs/xfs/xfs_symlink.c xfs_trans_log_inode(tp, ip, XFS_ILOG_DDATA | XFS_ILOG_CORE); tp 275 fs/xfs/xfs_symlink.c error = xfs_bmapi_write(tp, ip, first_fsb, fs_blocks, tp 283 fs/xfs/xfs_symlink.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 292 fs/xfs/xfs_symlink.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, tp 313 fs/xfs/xfs_symlink.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); tp 314 fs/xfs/xfs_symlink.c xfs_trans_log_buf(tp, bp, 0, (buf + byte_cnt - 1) - tp 323 fs/xfs/xfs_symlink.c error = xfs_dir_createname(tp, dp, link_name, ip->i_ino, resblks); tp 326 fs/xfs/xfs_symlink.c xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); tp 327 fs/xfs/xfs_symlink.c xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE); tp 335 fs/xfs/xfs_symlink.c xfs_trans_set_sync(tp); tp 338 fs/xfs/xfs_symlink.c error = xfs_trans_commit(tp); tp 350 fs/xfs/xfs_symlink.c xfs_trans_cancel(tp); tp 392 fs/xfs/xfs_symlink.c xfs_trans_t *tp; tp 405 fs/xfs/xfs_symlink.c error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); tp 410 fs/xfs/xfs_symlink.c xfs_trans_ijoin(tp, ip, 0); tp 421 fs/xfs/xfs_symlink.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 435 fs/xfs/xfs_symlink.c bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, tp 442 fs/xfs/xfs_symlink.c xfs_trans_binval(tp, bp); tp 447 fs/xfs/xfs_symlink.c error = xfs_bunmapi(tp, ip, 0, size, 0, nmaps, &done); tp 456 fs/xfs/xfs_symlink.c xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); tp 457 fs/xfs/xfs_symlink.c error = xfs_trans_commit(tp); tp 474 fs/xfs/xfs_symlink.c xfs_trans_cancel(tp); tp 1609 fs/xfs/xfs_trace.h __entry->firstblock = args->tp->t_firstblock; tp 2243 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), tp 2244 fs/xfs/xfs_trace.h TP_ARGS(tp, caller_ip), tp 2247 fs/xfs/xfs_trace.h __field(struct xfs_trans *, tp) tp 2252 fs/xfs/xfs_trace.h __entry->dev = tp->t_mountp->m_super->s_dev; tp 2253 fs/xfs/xfs_trace.h __entry->tp = tp; tp 2258 fs/xfs/xfs_trace.h __entry->tp, tp 2263 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \ tp 2264 fs/xfs/xfs_trace.h TP_ARGS(tp, caller_ip)) tp 2267 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, int error), tp 2268 fs/xfs/xfs_trace.h TP_ARGS(tp, error), tp 2271 fs/xfs/xfs_trace.h __field(struct xfs_trans *, tp) tp 2276 fs/xfs/xfs_trace.h __entry->dev = tp->t_mountp->m_super->s_dev; tp 2277 fs/xfs/xfs_trace.h __entry->tp = tp; tp 2282 fs/xfs/xfs_trace.h __entry->tp, tp 2287 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, int error), \ tp 2288 fs/xfs/xfs_trace.h TP_ARGS(tp, error)) tp 3334 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), tp 3335 fs/xfs/xfs_trace.h TP_ARGS(tp, caller_ip), tp 3343 fs/xfs/xfs_trace.h __entry->dev = tp->t_mountp->m_super->s_dev; tp 3345 fs/xfs/xfs_trace.h if (tp->t_ticket) tp 3346 fs/xfs/xfs_trace.h __entry->tid = tp->t_ticket->t_tid; tp 3347 fs/xfs/xfs_trace.h __entry->flags = tp->t_flags; tp 3359 fs/xfs/xfs_trace.h TP_PROTO(struct xfs_trans *tp, unsigned long caller_ip), \ tp 3360 fs/xfs/xfs_trace.h TP_ARGS(tp, caller_ip)) tp 64 fs/xfs/xfs_trans.c struct xfs_trans *tp) tp 66 fs/xfs/xfs_trans.c xfs_extent_busy_sort(&tp->t_busy); tp 67 fs/xfs/xfs_trans.c xfs_extent_busy_clear(tp->t_mountp, &tp->t_busy, false); tp 69 fs/xfs/xfs_trans.c trace_xfs_trans_free(tp, _RET_IP_); tp 70 fs/xfs/xfs_trans.c atomic_dec(&tp->t_mountp->m_active_trans); tp 71 fs/xfs/xfs_trans.c if (!(tp->t_flags & XFS_TRANS_NO_WRITECOUNT)) tp 72 fs/xfs/xfs_trans.c sb_end_intwrite(tp->t_mountp->m_super); tp 73 fs/xfs/xfs_trans.c xfs_trans_free_dqinfo(tp); tp 74 fs/xfs/xfs_trans.c kmem_zone_free(xfs_trans_zone, tp); tp 87 fs/xfs/xfs_trans.c struct xfs_trans *tp) tp 91 fs/xfs/xfs_trans.c trace_xfs_trans_dup(tp, _RET_IP_); tp 99 fs/xfs/xfs_trans.c ntp->t_mountp = tp->t_mountp; tp 105 fs/xfs/xfs_trans.c ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES); tp 106 fs/xfs/xfs_trans.c ASSERT(tp->t_ticket != NULL); tp 109 fs/xfs/xfs_trans.c (tp->t_flags & XFS_TRANS_RESERVE) | tp 110 fs/xfs/xfs_trans.c (tp->t_flags & XFS_TRANS_NO_WRITECOUNT); tp 112 fs/xfs/xfs_trans.c tp->t_flags |= XFS_TRANS_NO_WRITECOUNT; tp 113 fs/xfs/xfs_trans.c ntp->t_ticket = xfs_log_ticket_get(tp->t_ticket); tp 115 fs/xfs/xfs_trans.c ASSERT(tp->t_blk_res >= tp->t_blk_res_used); tp 116 fs/xfs/xfs_trans.c ntp->t_blk_res = tp->t_blk_res - tp->t_blk_res_used; tp 117 fs/xfs/xfs_trans.c tp->t_blk_res = tp->t_blk_res_used; tp 119 fs/xfs/xfs_trans.c ntp->t_rtx_res = tp->t_rtx_res - tp->t_rtx_res_used; tp 120 fs/xfs/xfs_trans.c tp->t_rtx_res = tp->t_rtx_res_used; tp 121 fs/xfs/xfs_trans.c ntp->t_pflags = tp->t_pflags; tp 124 fs/xfs/xfs_trans.c xfs_defer_move(ntp, tp); tp 126 fs/xfs/xfs_trans.c xfs_trans_dup_dqinfo(tp, ntp); tp 128 fs/xfs/xfs_trans.c atomic_inc(&tp->t_mountp->m_active_trans); tp 148 fs/xfs/xfs_trans.c struct xfs_trans *tp, tp 154 fs/xfs/xfs_trans.c bool rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0; tp 157 fs/xfs/xfs_trans.c current_set_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 165 fs/xfs/xfs_trans.c error = xfs_mod_fdblocks(tp->t_mountp, -((int64_t)blocks), rsvd); tp 167 fs/xfs/xfs_trans.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 170 fs/xfs/xfs_trans.c tp->t_blk_res += blocks; tp 179 fs/xfs/xfs_trans.c ASSERT(tp->t_log_res == 0 || tp 180 fs/xfs/xfs_trans.c tp->t_log_res == resp->tr_logres); tp 181 fs/xfs/xfs_trans.c ASSERT(tp->t_log_count == 0 || tp 182 fs/xfs/xfs_trans.c tp->t_log_count == resp->tr_logcount); tp 185 fs/xfs/xfs_trans.c tp->t_flags |= XFS_TRANS_PERM_LOG_RES; tp 188 fs/xfs/xfs_trans.c ASSERT(tp->t_ticket == NULL); tp 189 fs/xfs/xfs_trans.c ASSERT(!(tp->t_flags & XFS_TRANS_PERM_LOG_RES)); tp 192 fs/xfs/xfs_trans.c if (tp->t_ticket != NULL) { tp 194 fs/xfs/xfs_trans.c error = xfs_log_regrant(tp->t_mountp, tp->t_ticket); tp 196 fs/xfs/xfs_trans.c error = xfs_log_reserve(tp->t_mountp, tp 199 fs/xfs/xfs_trans.c &tp->t_ticket, XFS_TRANSACTION, tp 206 fs/xfs/xfs_trans.c tp->t_log_res = resp->tr_logres; tp 207 fs/xfs/xfs_trans.c tp->t_log_count = resp->tr_logcount; tp 216 fs/xfs/xfs_trans.c error = xfs_mod_frextents(tp->t_mountp, -((int64_t)rtextents)); tp 221 fs/xfs/xfs_trans.c tp->t_rtx_res += rtextents; tp 232 fs/xfs/xfs_trans.c xfs_log_done(tp->t_mountp, tp->t_ticket, NULL, false); tp 233 fs/xfs/xfs_trans.c tp->t_ticket = NULL; tp 234 fs/xfs/xfs_trans.c tp->t_log_res = 0; tp 235 fs/xfs/xfs_trans.c tp->t_flags &= ~XFS_TRANS_PERM_LOG_RES; tp 240 fs/xfs/xfs_trans.c xfs_mod_fdblocks(tp->t_mountp, (int64_t)blocks, rsvd); tp 241 fs/xfs/xfs_trans.c tp->t_blk_res = 0; tp 244 fs/xfs/xfs_trans.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 258 fs/xfs/xfs_trans.c struct xfs_trans *tp; tp 266 fs/xfs/xfs_trans.c tp = kmem_zone_zalloc(xfs_trans_zone, 0); tp 278 fs/xfs/xfs_trans.c tp->t_magic = XFS_TRANS_HEADER_MAGIC; tp 279 fs/xfs/xfs_trans.c tp->t_flags = flags; tp 280 fs/xfs/xfs_trans.c tp->t_mountp = mp; tp 281 fs/xfs/xfs_trans.c INIT_LIST_HEAD(&tp->t_items); tp 282 fs/xfs/xfs_trans.c INIT_LIST_HEAD(&tp->t_busy); tp 283 fs/xfs/xfs_trans.c INIT_LIST_HEAD(&tp->t_dfops); tp 284 fs/xfs/xfs_trans.c tp->t_firstblock = NULLFSBLOCK; tp 286 fs/xfs/xfs_trans.c error = xfs_trans_reserve(tp, resp, blocks, rtextents); tp 288 fs/xfs/xfs_trans.c xfs_trans_cancel(tp); tp 292 fs/xfs/xfs_trans.c trace_xfs_trans_alloc(tp, _RET_IP_); tp 294 fs/xfs/xfs_trans.c *tpp = tp; tp 338 fs/xfs/xfs_trans.c xfs_trans_t *tp, tp 343 fs/xfs/xfs_trans.c xfs_mount_t *mp = tp->t_mountp; tp 347 fs/xfs/xfs_trans.c tp->t_icount_delta += delta; tp 352 fs/xfs/xfs_trans.c tp->t_ifree_delta += delta; tp 363 fs/xfs/xfs_trans.c tp->t_blk_res_used += (uint)-delta; tp 364 fs/xfs/xfs_trans.c if (tp->t_blk_res_used > tp->t_blk_res) tp 367 fs/xfs/xfs_trans.c tp->t_fdblocks_delta += delta; tp 377 fs/xfs/xfs_trans.c tp->t_res_fdblocks_delta += delta; tp 388 fs/xfs/xfs_trans.c tp->t_rtx_res_used += (uint)-delta; tp 389 fs/xfs/xfs_trans.c ASSERT(tp->t_rtx_res_used <= tp->t_rtx_res); tp 391 fs/xfs/xfs_trans.c tp->t_frextents_delta += delta; tp 400 fs/xfs/xfs_trans.c tp->t_res_frextents_delta += delta; tp 404 fs/xfs/xfs_trans.c tp->t_dblocks_delta += delta; tp 408 fs/xfs/xfs_trans.c tp->t_agcount_delta += delta; tp 411 fs/xfs/xfs_trans.c tp->t_imaxpct_delta += delta; tp 414 fs/xfs/xfs_trans.c tp->t_rextsize_delta += delta; tp 417 fs/xfs/xfs_trans.c tp->t_rbmblocks_delta += delta; tp 420 fs/xfs/xfs_trans.c tp->t_rblocks_delta += delta; tp 423 fs/xfs/xfs_trans.c tp->t_rextents_delta += delta; tp 426 fs/xfs/xfs_trans.c tp->t_rextslog_delta += delta; tp 433 fs/xfs/xfs_trans.c tp->t_flags |= flags; tp 446 fs/xfs/xfs_trans.c xfs_trans_t *tp) tp 452 fs/xfs/xfs_trans.c bp = xfs_trans_getsb(tp, tp->t_mountp); tp 458 fs/xfs/xfs_trans.c ASSERT((tp->t_fdblocks_delta + tp->t_res_fdblocks_delta) == tp 459 fs/xfs/xfs_trans.c (tp->t_ag_freeblks_delta + tp->t_ag_flist_delta + tp 460 fs/xfs/xfs_trans.c tp->t_ag_btree_delta)); tp 465 fs/xfs/xfs_trans.c if (!xfs_sb_version_haslazysbcount(&(tp->t_mountp->m_sb))) { tp 466 fs/xfs/xfs_trans.c if (tp->t_icount_delta) tp 467 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_icount, tp->t_icount_delta); tp 468 fs/xfs/xfs_trans.c if (tp->t_ifree_delta) tp 469 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_ifree, tp->t_ifree_delta); tp 470 fs/xfs/xfs_trans.c if (tp->t_fdblocks_delta) tp 471 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_fdblocks, tp->t_fdblocks_delta); tp 472 fs/xfs/xfs_trans.c if (tp->t_res_fdblocks_delta) tp 473 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_fdblocks, tp->t_res_fdblocks_delta); tp 476 fs/xfs/xfs_trans.c if (tp->t_frextents_delta) tp 477 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_frextents, tp->t_frextents_delta); tp 478 fs/xfs/xfs_trans.c if (tp->t_res_frextents_delta) tp 479 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_frextents, tp->t_res_frextents_delta); tp 481 fs/xfs/xfs_trans.c if (tp->t_dblocks_delta) { tp 482 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_dblocks, tp->t_dblocks_delta); tp 485 fs/xfs/xfs_trans.c if (tp->t_agcount_delta) { tp 486 fs/xfs/xfs_trans.c be32_add_cpu(&sbp->sb_agcount, tp->t_agcount_delta); tp 489 fs/xfs/xfs_trans.c if (tp->t_imaxpct_delta) { tp 490 fs/xfs/xfs_trans.c sbp->sb_imax_pct += tp->t_imaxpct_delta; tp 493 fs/xfs/xfs_trans.c if (tp->t_rextsize_delta) { tp 494 fs/xfs/xfs_trans.c be32_add_cpu(&sbp->sb_rextsize, tp->t_rextsize_delta); tp 497 fs/xfs/xfs_trans.c if (tp->t_rbmblocks_delta) { tp 498 fs/xfs/xfs_trans.c be32_add_cpu(&sbp->sb_rbmblocks, tp->t_rbmblocks_delta); tp 501 fs/xfs/xfs_trans.c if (tp->t_rblocks_delta) { tp 502 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_rblocks, tp->t_rblocks_delta); tp 505 fs/xfs/xfs_trans.c if (tp->t_rextents_delta) { tp 506 fs/xfs/xfs_trans.c be64_add_cpu(&sbp->sb_rextents, tp->t_rextents_delta); tp 509 fs/xfs/xfs_trans.c if (tp->t_rextslog_delta) { tp 510 fs/xfs/xfs_trans.c sbp->sb_rextslog += tp->t_rextslog_delta; tp 514 fs/xfs/xfs_trans.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF); tp 519 fs/xfs/xfs_trans.c xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_dsb_t) - 1); tp 525 fs/xfs/xfs_trans.c xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount), tp 592 fs/xfs/xfs_trans.c struct xfs_trans *tp) tp 594 fs/xfs/xfs_trans.c struct xfs_mount *mp = tp->t_mountp; tp 595 fs/xfs/xfs_trans.c bool rsvd = (tp->t_flags & XFS_TRANS_RESERVE) != 0; tp 603 fs/xfs/xfs_trans.c if (tp->t_blk_res > 0) tp 604 fs/xfs/xfs_trans.c blkdelta = tp->t_blk_res; tp 605 fs/xfs/xfs_trans.c if ((tp->t_fdblocks_delta != 0) && tp 607 fs/xfs/xfs_trans.c (tp->t_flags & XFS_TRANS_SB_DIRTY))) tp 608 fs/xfs/xfs_trans.c blkdelta += tp->t_fdblocks_delta; tp 610 fs/xfs/xfs_trans.c if (tp->t_rtx_res > 0) tp 611 fs/xfs/xfs_trans.c rtxdelta = tp->t_rtx_res; tp 612 fs/xfs/xfs_trans.c if ((tp->t_frextents_delta != 0) && tp 613 fs/xfs/xfs_trans.c (tp->t_flags & XFS_TRANS_SB_DIRTY)) tp 614 fs/xfs/xfs_trans.c rtxdelta += tp->t_frextents_delta; tp 617 fs/xfs/xfs_trans.c (tp->t_flags & XFS_TRANS_SB_DIRTY)) { tp 618 fs/xfs/xfs_trans.c idelta = tp->t_icount_delta; tp 619 fs/xfs/xfs_trans.c ifreedelta = tp->t_ifree_delta; tp 641 fs/xfs/xfs_trans.c if (rtxdelta == 0 && !(tp->t_flags & XFS_TRANS_SB_DIRTY)) tp 652 fs/xfs/xfs_trans.c if (tp->t_dblocks_delta != 0) { tp 653 fs/xfs/xfs_trans.c error = xfs_sb_mod64(&mp->m_sb.sb_dblocks, tp->t_dblocks_delta); tp 657 fs/xfs/xfs_trans.c if (tp->t_agcount_delta != 0) { tp 658 fs/xfs/xfs_trans.c error = xfs_sb_mod32(&mp->m_sb.sb_agcount, tp->t_agcount_delta); tp 662 fs/xfs/xfs_trans.c if (tp->t_imaxpct_delta != 0) { tp 663 fs/xfs/xfs_trans.c error = xfs_sb_mod8(&mp->m_sb.sb_imax_pct, tp->t_imaxpct_delta); tp 667 fs/xfs/xfs_trans.c if (tp->t_rextsize_delta != 0) { tp 669 fs/xfs/xfs_trans.c tp->t_rextsize_delta); tp 673 fs/xfs/xfs_trans.c if (tp->t_rbmblocks_delta != 0) { tp 675 fs/xfs/xfs_trans.c tp->t_rbmblocks_delta); tp 679 fs/xfs/xfs_trans.c if (tp->t_rblocks_delta != 0) { tp 680 fs/xfs/xfs_trans.c error = xfs_sb_mod64(&mp->m_sb.sb_rblocks, tp->t_rblocks_delta); tp 684 fs/xfs/xfs_trans.c if (tp->t_rextents_delta != 0) { tp 686 fs/xfs/xfs_trans.c tp->t_rextents_delta); tp 690 fs/xfs/xfs_trans.c if (tp->t_rextslog_delta != 0) { tp 692 fs/xfs/xfs_trans.c tp->t_rextslog_delta); tp 700 fs/xfs/xfs_trans.c if (tp->t_rextents_delta) tp 701 fs/xfs/xfs_trans.c xfs_sb_mod64(&mp->m_sb.sb_rextents, -tp->t_rextents_delta); tp 703 fs/xfs/xfs_trans.c if (tp->t_rblocks_delta) tp 704 fs/xfs/xfs_trans.c xfs_sb_mod64(&mp->m_sb.sb_rblocks, -tp->t_rblocks_delta); tp 706 fs/xfs/xfs_trans.c if (tp->t_rbmblocks_delta) tp 707 fs/xfs/xfs_trans.c xfs_sb_mod32(&mp->m_sb.sb_rbmblocks, -tp->t_rbmblocks_delta); tp 709 fs/xfs/xfs_trans.c if (tp->t_rextsize_delta) tp 710 fs/xfs/xfs_trans.c xfs_sb_mod32(&mp->m_sb.sb_rextsize, -tp->t_rextsize_delta); tp 712 fs/xfs/xfs_trans.c if (tp->t_rextsize_delta) tp 713 fs/xfs/xfs_trans.c xfs_sb_mod8(&mp->m_sb.sb_imax_pct, -tp->t_imaxpct_delta); tp 715 fs/xfs/xfs_trans.c if (tp->t_agcount_delta) tp 716 fs/xfs/xfs_trans.c xfs_sb_mod32(&mp->m_sb.sb_agcount, -tp->t_agcount_delta); tp 718 fs/xfs/xfs_trans.c if (tp->t_dblocks_delta) tp 719 fs/xfs/xfs_trans.c xfs_sb_mod64(&mp->m_sb.sb_dblocks, -tp->t_dblocks_delta); tp 741 fs/xfs/xfs_trans.c struct xfs_trans *tp, tp 744 fs/xfs/xfs_trans.c ASSERT(lip->li_mountp == tp->t_mountp); tp 745 fs/xfs/xfs_trans.c ASSERT(lip->li_ailp == tp->t_mountp->m_ail); tp 749 fs/xfs/xfs_trans.c list_add_tail(&lip->li_trans, &tp->t_items); tp 750 fs/xfs/xfs_trans.c trace_xfs_trans_add_item(tp, _RET_IP_); tp 769 fs/xfs/xfs_trans.c struct xfs_trans *tp, tp 774 fs/xfs/xfs_trans.c trace_xfs_trans_free_items(tp, _RET_IP_); tp 776 fs/xfs/xfs_trans.c list_for_each_entry_safe(lip, next, &tp->t_items, li_trans) { tp 928 fs/xfs/xfs_trans.c struct xfs_trans *tp, tp 931 fs/xfs/xfs_trans.c struct xfs_mount *mp = tp->t_mountp; tp 934 fs/xfs/xfs_trans.c int sync = tp->t_flags & XFS_TRANS_SYNC; tp 936 fs/xfs/xfs_trans.c trace_xfs_trans_commit(tp, _RET_IP_); tp 942 fs/xfs/xfs_trans.c WARN_ON_ONCE(!list_empty(&tp->t_dfops) && tp 943 fs/xfs/xfs_trans.c !(tp->t_flags & XFS_TRANS_PERM_LOG_RES)); tp 944 fs/xfs/xfs_trans.c if (!regrant && (tp->t_flags & XFS_TRANS_PERM_LOG_RES)) { tp 945 fs/xfs/xfs_trans.c error = xfs_defer_finish_noroll(&tp); tp 957 fs/xfs/xfs_trans.c if (!(tp->t_flags & XFS_TRANS_DIRTY)) tp 965 fs/xfs/xfs_trans.c ASSERT(tp->t_ticket != NULL); tp 970 fs/xfs/xfs_trans.c if (tp->t_flags & XFS_TRANS_SB_DIRTY) tp 971 fs/xfs/xfs_trans.c xfs_trans_apply_sb_deltas(tp); tp 972 fs/xfs/xfs_trans.c xfs_trans_apply_dquot_deltas(tp); tp 974 fs/xfs/xfs_trans.c xfs_log_commit_cil(mp, tp, &commit_lsn, regrant); tp 976 fs/xfs/xfs_trans.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 977 fs/xfs/xfs_trans.c xfs_trans_free(tp); tp 993 fs/xfs/xfs_trans.c xfs_trans_unreserve_and_mod_sb(tp); tp 1000 fs/xfs/xfs_trans.c xfs_trans_unreserve_and_mod_dquots(tp); tp 1001 fs/xfs/xfs_trans.c if (tp->t_ticket) { tp 1002 fs/xfs/xfs_trans.c commit_lsn = xfs_log_done(mp, tp->t_ticket, NULL, regrant); tp 1005 fs/xfs/xfs_trans.c tp->t_ticket = NULL; tp 1007 fs/xfs/xfs_trans.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 1008 fs/xfs/xfs_trans.c xfs_trans_free_items(tp, !!error); tp 1009 fs/xfs/xfs_trans.c xfs_trans_free(tp); tp 1017 fs/xfs/xfs_trans.c struct xfs_trans *tp) tp 1019 fs/xfs/xfs_trans.c return __xfs_trans_commit(tp, false); tp 1032 fs/xfs/xfs_trans.c struct xfs_trans *tp) tp 1034 fs/xfs/xfs_trans.c struct xfs_mount *mp = tp->t_mountp; tp 1035 fs/xfs/xfs_trans.c bool dirty = (tp->t_flags & XFS_TRANS_DIRTY); tp 1037 fs/xfs/xfs_trans.c trace_xfs_trans_cancel(tp, _RET_IP_); tp 1039 fs/xfs/xfs_trans.c if (tp->t_flags & XFS_TRANS_PERM_LOG_RES) tp 1040 fs/xfs/xfs_trans.c xfs_defer_cancel(tp); tp 1055 fs/xfs/xfs_trans.c list_for_each_entry(lip, &tp->t_items, li_trans) tp 1059 fs/xfs/xfs_trans.c xfs_trans_unreserve_and_mod_sb(tp); tp 1060 fs/xfs/xfs_trans.c xfs_trans_unreserve_and_mod_dquots(tp); tp 1062 fs/xfs/xfs_trans.c if (tp->t_ticket) { tp 1063 fs/xfs/xfs_trans.c xfs_log_done(mp, tp->t_ticket, NULL, false); tp 1064 fs/xfs/xfs_trans.c tp->t_ticket = NULL; tp 1068 fs/xfs/xfs_trans.c current_restore_flags_nested(&tp->t_pflags, PF_MEMALLOC_NOFS); tp 1070 fs/xfs/xfs_trans.c xfs_trans_free_items(tp, dirty); tp 1071 fs/xfs/xfs_trans.c xfs_trans_free(tp); tp 150 fs/xfs/xfs_trans.h #define xfs_trans_set_sync(tp) ((tp)->t_flags |= XFS_TRANS_SYNC) tp 153 fs/xfs/xfs_trans.h #define xfs_trans_agblocks_delta(tp, d) ((tp)->t_ag_freeblks_delta += (int64_t)d) tp 154 fs/xfs/xfs_trans.h #define xfs_trans_agflist_delta(tp, d) ((tp)->t_ag_flist_delta += (int64_t)d) tp 155 fs/xfs/xfs_trans.h #define xfs_trans_agbtree_delta(tp, d) ((tp)->t_ag_btree_delta += (int64_t)d) tp 157 fs/xfs/xfs_trans.h #define xfs_trans_agblocks_delta(tp, d) tp 158 fs/xfs/xfs_trans.h #define xfs_trans_agflist_delta(tp, d) tp 159 fs/xfs/xfs_trans.h #define xfs_trans_agbtree_delta(tp, d) tp 172 fs/xfs/xfs_trans.h struct xfs_buf *xfs_trans_get_buf_map(struct xfs_trans *tp, tp 179 fs/xfs/xfs_trans.h struct xfs_trans *tp, tp 186 fs/xfs/xfs_trans.h return xfs_trans_get_buf_map(tp, target, &map, 1, flags); tp 190 fs/xfs/xfs_trans.h struct xfs_trans *tp, tp 200 fs/xfs/xfs_trans.h struct xfs_trans *tp, tp 209 fs/xfs/xfs_trans.h return xfs_trans_read_buf_map(mp, tp, target, &map, 1, tp 24 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 37 fs/xfs/xfs_trans_buf.c list_for_each_entry(lip, &tp->t_items, li_trans) { tp 62 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 75 fs/xfs/xfs_trans_buf.c xfs_buf_item_init(bp, tp->t_mountp); tp 92 fs/xfs/xfs_trans_buf.c xfs_trans_add_item(tp, &bip->bli_item); tp 93 fs/xfs/xfs_trans_buf.c bp->b_transp = tp; tp 99 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 102 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 0); tp 117 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 126 fs/xfs/xfs_trans_buf.c if (!tp) tp 135 fs/xfs/xfs_trans_buf.c bp = xfs_trans_buf_item_match(tp, target, map, nmaps); tp 138 fs/xfs/xfs_trans_buf.c if (XFS_FORCED_SHUTDOWN(tp->t_mountp)) { tp 143 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 159 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); tp 174 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 184 fs/xfs/xfs_trans_buf.c if (tp == NULL) tp 194 fs/xfs/xfs_trans_buf.c if (bp->b_transp == tp) { tp 207 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); tp 225 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 246 fs/xfs/xfs_trans_buf.c if (tp) tp 247 fs/xfs/xfs_trans_buf.c bp = xfs_trans_buf_item_match(tp, target, map, nmaps); tp 250 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 281 fs/xfs/xfs_trans_buf.c if (tp->t_flags & XFS_TRANS_DIRTY) tp 282 fs/xfs/xfs_trans_buf.c xfs_force_shutdown(tp->t_mountp, tp 305 fs/xfs/xfs_trans_buf.c return tp ? 0 : -EAGAIN; tp 324 fs/xfs/xfs_trans_buf.c if (tp && (tp->t_flags & XFS_TRANS_DIRTY)) tp 325 fs/xfs/xfs_trans_buf.c xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR); tp 340 fs/xfs/xfs_trans_buf.c if (tp) { tp 341 fs/xfs/xfs_trans_buf.c _xfs_trans_bjoin(tp, bp, 1); tp 377 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 382 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 384 fs/xfs/xfs_trans_buf.c if (!tp) { tp 434 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 439 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 455 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 460 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 476 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 481 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 516 fs/xfs/xfs_trans_buf.c tp->t_flags |= XFS_TRANS_DIRTY; tp 531 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 541 fs/xfs/xfs_trans_buf.c xfs_trans_dirty_buf(tp, bp); tp 579 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 585 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 602 fs/xfs/xfs_trans_buf.c ASSERT(tp->t_flags & XFS_TRANS_DIRTY); tp 618 fs/xfs/xfs_trans_buf.c tp->t_flags |= XFS_TRANS_DIRTY; tp 634 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 639 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 644 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); tp 658 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 663 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 669 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); tp 683 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 688 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 693 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, XFS_BLFT_DINO_BUF); tp 705 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 710 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 724 fs/xfs/xfs_trans_buf.c xfs_trans_dirty_buf(tp, bp); tp 734 fs/xfs/xfs_trans_buf.c struct xfs_trans *tp, tp 740 fs/xfs/xfs_trans_buf.c if (!tp) tp 743 fs/xfs/xfs_trans_buf.c ASSERT(bp->b_transp == tp); tp 776 fs/xfs/xfs_trans_buf.c xfs_trans_t *tp, tp 803 fs/xfs/xfs_trans_buf.c xfs_trans_buf_set_type(tp, bp, type); tp 28 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 37 fs/xfs/xfs_trans_dquot.c xfs_trans_add_item(tp, &dqp->q_logitem.qli_item); tp 52 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 57 fs/xfs/xfs_trans_dquot.c tp->t_flags |= XFS_TRANS_DIRTY; tp 127 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 132 fs/xfs/xfs_trans_dquot.c xfs_mount_t *mp = tp->t_mountp; tp 139 fs/xfs/xfs_trans_dquot.c if (tp->t_dqinfo == NULL) tp 140 fs/xfs/xfs_trans_dquot.c xfs_trans_alloc_dqinfo(tp); tp 143 fs/xfs/xfs_trans_dquot.c (void) xfs_trans_mod_dquot(tp, ip->i_udquot, field, delta); tp 145 fs/xfs/xfs_trans_dquot.c (void) xfs_trans_mod_dquot(tp, ip->i_gdquot, field, delta); tp 147 fs/xfs/xfs_trans_dquot.c (void) xfs_trans_mod_dquot(tp, ip->i_pdquot, field, delta); tp 152 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp, tp 159 fs/xfs/xfs_trans_dquot.c qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_USR]; tp 161 fs/xfs/xfs_trans_dquot.c qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_GRP]; tp 163 fs/xfs/xfs_trans_dquot.c qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_PRJ]; tp 184 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp, tp 191 fs/xfs/xfs_trans_dquot.c ASSERT(tp); tp 192 fs/xfs/xfs_trans_dquot.c ASSERT(XFS_IS_QUOTA_RUNNING(tp->t_mountp)); tp 195 fs/xfs/xfs_trans_dquot.c if (tp->t_dqinfo == NULL) tp 196 fs/xfs/xfs_trans_dquot.c xfs_trans_alloc_dqinfo(tp); tp 201 fs/xfs/xfs_trans_dquot.c qtrx = xfs_trans_get_dqtrx(tp, dqp); tp 269 fs/xfs/xfs_trans_dquot.c tp->t_flags |= XFS_TRANS_DQ_DIRTY; tp 281 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp, tp 287 fs/xfs/xfs_trans_dquot.c xfs_trans_dqjoin(tp, q[0].qt_dquot); tp 291 fs/xfs/xfs_trans_dquot.c xfs_trans_dqjoin(tp, q[0].qt_dquot); tp 292 fs/xfs/xfs_trans_dquot.c xfs_trans_dqjoin(tp, q[1].qt_dquot); tp 307 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp) tp 316 fs/xfs/xfs_trans_dquot.c if (!(tp->t_flags & XFS_TRANS_DQ_DIRTY)) tp 319 fs/xfs/xfs_trans_dquot.c ASSERT(tp->t_dqinfo); tp 321 fs/xfs/xfs_trans_dquot.c qa = tp->t_dqinfo->dqs[j]; tp 328 fs/xfs/xfs_trans_dquot.c xfs_trans_dqlockedjoin(tp, qa); tp 390 fs/xfs/xfs_trans_dquot.c xfs_qm_adjust_dqlimits(tp->t_mountp, dqp); tp 391 fs/xfs/xfs_trans_dquot.c xfs_qm_adjust_dqtimers(tp->t_mountp, d); tp 398 fs/xfs/xfs_trans_dquot.c xfs_trans_log_dquot(tp, dqp); tp 489 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp) tp 496 fs/xfs/xfs_trans_dquot.c if (!tp->t_dqinfo || !(tp->t_flags & XFS_TRANS_DQ_DIRTY)) tp 500 fs/xfs/xfs_trans_dquot.c qa = tp->t_dqinfo->dqs[j]; tp 574 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 691 fs/xfs/xfs_trans_dquot.c if (tp) { tp 692 fs/xfs/xfs_trans_dquot.c ASSERT(tp->t_dqinfo); tp 695 fs/xfs/xfs_trans_dquot.c xfs_trans_mod_dquot(tp, dqp, tp 699 fs/xfs/xfs_trans_dquot.c xfs_trans_mod_dquot(tp, dqp, tp 732 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp, tp 746 fs/xfs/xfs_trans_dquot.c if (tp && tp->t_dqinfo == NULL) tp 747 fs/xfs/xfs_trans_dquot.c xfs_trans_alloc_dqinfo(tp); tp 752 fs/xfs/xfs_trans_dquot.c error = xfs_trans_dqresv(tp, mp, udqp, nblks, ninos, tp 759 fs/xfs/xfs_trans_dquot.c error = xfs_trans_dqresv(tp, mp, gdqp, nblks, ninos, flags); tp 765 fs/xfs/xfs_trans_dquot.c error = xfs_trans_dqresv(tp, mp, pdqp, nblks, ninos, flags); tp 778 fs/xfs/xfs_trans_dquot.c xfs_trans_dqresv(tp, mp, gdqp, -nblks, -ninos, flags); tp 782 fs/xfs/xfs_trans_dquot.c xfs_trans_dqresv(tp, mp, udqp, -nblks, -ninos, flags); tp 794 fs/xfs/xfs_trans_dquot.c struct xfs_trans *tp, tp 818 fs/xfs/xfs_trans_dquot.c return xfs_trans_reserve_quota_bydquots(tp, mp, tp 829 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 835 fs/xfs/xfs_trans_dquot.c ASSERT(tp != NULL); tp 837 fs/xfs/xfs_trans_dquot.c q = xfs_qm_qoff_logitem_init(tp->t_mountp, startqoff, flags); tp 843 fs/xfs/xfs_trans_dquot.c xfs_trans_add_item(tp, &q->qql_item); tp 855 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp, tp 858 fs/xfs/xfs_trans_dquot.c tp->t_flags |= XFS_TRANS_DIRTY; tp 864 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp) tp 866 fs/xfs/xfs_trans_dquot.c tp->t_dqinfo = kmem_zone_zalloc(xfs_qm_dqtrxzone, 0); tp 871 fs/xfs/xfs_trans_dquot.c xfs_trans_t *tp) tp 873 fs/xfs/xfs_trans_dquot.c if (!tp->t_dqinfo) tp 875 fs/xfs/xfs_trans_dquot.c kmem_zone_free(xfs_qm_dqtrxzone, tp->t_dqinfo); tp 876 fs/xfs/xfs_trans_dquot.c tp->t_dqinfo = NULL; tp 19 fs/xfs/xfs_trans_priv.h void xfs_trans_unreserve_and_mod_sb(struct xfs_trans *tp); tp 299 include/linux/atmdev.h int atm_pcr_goal(const struct atm_trafprm *tp); tp 327 include/linux/mfd/si476x-core.h bool tp; tp 622 include/linux/syscalls.h const struct __kernel_timespec __user *tp); tp 624 include/linux/syscalls.h struct __kernel_timespec __user *tp); tp 626 include/linux/syscalls.h struct __kernel_timespec __user *tp); tp 636 include/linux/syscalls.h struct old_timespec32 __user *tp); tp 638 include/linux/syscalls.h struct old_timespec32 __user *tp); tp 640 include/linux/syscalls.h struct old_timespec32 __user *tp); tp 462 include/linux/tcp.h static inline void tcp_move_syn(struct tcp_sock *tp, tp 465 include/linux/tcp.h tp->saved_syn = req->saved_syn; tp 469 include/linux/tcp.h static inline void tcp_saved_syn_free(struct tcp_sock *tp) tp 471 include/linux/tcp.h kfree(tp->saved_syn); tp 472 include/linux/tcp.h tp->saved_syn = NULL; tp 477 include/linux/tcp.h static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss) tp 482 include/linux/tcp.h u16 user_mss = READ_ONCE(tp->rx_opt.user_mss); tp 60 include/linux/torture.h void torture_shuffle_task_register(struct task_struct *tp); tp 80 include/linux/torture.h char *f, struct task_struct **tp); tp 81 include/linux/torture.h void _torture_stop_kthread(char *m, struct task_struct **tp); tp 83 include/linux/torture.h #define torture_create_kthread(n, arg, tp) \ tp 85 include/linux/torture.h "Failed to create " #n, &(tp)) tp 86 include/linux/torture.h #define torture_stop_kthread(n, tp) \ tp 87 include/linux/torture.h _torture_stop_kthread("Stopping " #n " task", &(tp)) tp 316 include/linux/trace_events.h return call->tp ? call->tp->name : NULL; tp 45 include/linux/tracepoint-defs.h struct tracepoint *tp; tp 38 include/linux/tracepoint.h tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data); tp 40 include/linux/tracepoint.h tracepoint_probe_register_prio(struct tracepoint *tp, void *probe, void *data, tp 43 include/linux/tracepoint.h tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data); tp 45 include/linux/tracepoint.h for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv), tp 162 include/linux/tracepoint.h #define __DO_TRACE(tp, proto, args, cond, rcuidle) \ tp 187 include/linux/tracepoint.h it_func_ptr = rcu_dereference_raw((tp)->funcs); \ tp 97 include/net/act_api.h int bind, bool rtnl_held, struct tcf_proto *tp, tp 177 include/net/act_api.h int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla, tp 181 include/net/act_api.h struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp, tp 192 include/net/act_api.h int tcf_action_check_ctrlact(int action, struct tcf_proto *tp, tp 44 include/net/netfilter/nf_tables_offload.h struct flow_dissector_key_ports tp; tp 341 include/net/netlink.h #define NLA_ENSURE_INT_TYPE(tp) \ tp 342 include/net/netlink.h (__NLA_ENSURE(tp == NLA_S8 || tp == NLA_U8 || \ tp 343 include/net/netlink.h tp == NLA_S16 || tp == NLA_U16 || \ tp 344 include/net/netlink.h tp == NLA_S32 || tp == NLA_U32 || \ tp 345 include/net/netlink.h tp == NLA_S64 || tp == NLA_U64) + tp) tp 346 include/net/netlink.h #define NLA_ENSURE_NO_VALIDATION_PTR(tp) \ tp 347 include/net/netlink.h (__NLA_ENSURE(tp != NLA_BITFIELD32 && \ tp 348 include/net/netlink.h tp != NLA_REJECT && \ tp 349 include/net/netlink.h tp != NLA_NESTED && \ tp 350 include/net/netlink.h tp != NLA_NESTED_ARRAY) + tp) tp 352 include/net/netlink.h #define NLA_POLICY_RANGE(tp, _min, _max) { \ tp 353 include/net/netlink.h .type = NLA_ENSURE_INT_TYPE(tp), \ tp 359 include/net/netlink.h #define NLA_POLICY_MIN(tp, _min) { \ tp 360 include/net/netlink.h .type = NLA_ENSURE_INT_TYPE(tp), \ tp 365 include/net/netlink.h #define NLA_POLICY_MAX(tp, _max) { \ tp 366 include/net/netlink.h .type = NLA_ENSURE_INT_TYPE(tp), \ tp 371 include/net/netlink.h #define NLA_POLICY_VALIDATE_FN(tp, fn, ...) { \ tp 372 include/net/netlink.h .type = NLA_ENSURE_NO_VALIDATION_PTR(tp), \ tp 45 include/net/pkt_cls.h struct tcf_proto *tp, bool rtnl_held); tp 73 include/net/pkt_cls.h int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 131 include/net/pkt_cls.h static inline int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 156 include/net/pkt_cls.h tcf_bind_filter(struct tcf_proto *tp, struct tcf_result *r, unsigned long base) tp 158 include/net/pkt_cls.h struct Qdisc *q = tp->chain->block->q; tp 180 include/net/pkt_cls.h tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) tp 182 include/net/pkt_cls.h struct Qdisc *q = tp->chain->block->q; tp 305 include/net/pkt_cls.h int tcf_exts_validate(struct net *net, struct tcf_proto *tp, tp 455 include/net/pkt_cls.h #define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0) tp 517 include/net/pkt_cls.h int tc_setup_cb_add(struct tcf_block *block, struct tcf_proto *tp, tp 520 include/net/pkt_cls.h int tc_setup_cb_replace(struct tcf_block *block, struct tcf_proto *tp, tp 525 include/net/pkt_cls.h int tc_setup_cb_destroy(struct tcf_block *block, struct tcf_proto *tp, tp 528 include/net/pkt_cls.h int tc_setup_cb_reoffload(struct tcf_block *block, struct tcf_proto *tp, tp 631 include/net/pkt_cls.h const struct tcf_proto *tp, u32 flags, tp 634 include/net/pkt_cls.h cls_common->chain_index = tp->chain->index; tp 635 include/net/pkt_cls.h cls_common->protocol = tp->protocol; tp 636 include/net/pkt_cls.h cls_common->prio = tp->prio >> 16; tp 298 include/net/sch_generic.h void (*destroy)(struct tcf_proto *tp, bool rtnl_held, tp 302 include/net/sch_generic.h void (*put)(struct tcf_proto *tp, void *f); tp 308 include/net/sch_generic.h int (*delete)(struct tcf_proto *tp, void *arg, tp 311 include/net/sch_generic.h bool (*delete_empty)(struct tcf_proto *tp); tp 312 include/net/sch_generic.h void (*walk)(struct tcf_proto *tp, tp 314 include/net/sch_generic.h int (*reoffload)(struct tcf_proto *tp, bool add, tp 317 include/net/sch_generic.h void (*hw_add)(struct tcf_proto *tp, tp 319 include/net/sch_generic.h void (*hw_del)(struct tcf_proto *tp, tp 436 include/net/sch_generic.h static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp) tp 438 include/net/sch_generic.h return lockdep_is_held(&tp->lock); tp 446 include/net/sch_generic.h static inline bool lockdep_tcf_proto_is_locked(struct tcf_proto *tp) tp 455 include/net/sch_generic.h #define tcf_proto_dereference(p, tp) \ tp 456 include/net/sch_generic.h rcu_dereference_protected(p, lockdep_tcf_proto_is_locked(tp)) tp 384 include/net/tcp.h void tcp_clear_retrans(struct tcp_sock *tp); tp 604 include/net/tcp.h void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb); tp 624 include/net/tcp.h static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) tp 635 include/net/tcp.h if (tp->max_window > TCP_MSS_DEFAULT) tp 636 include/net/tcp.h cutoff = (tp->max_window >> 1); tp 638 include/net/tcp.h cutoff = tp->max_window; tp 641 include/net/tcp.h return max_t(int, cutoff, 68U - tp->tcp_header_len); tp 666 include/net/tcp.h static inline u32 __tcp_set_rto(const struct tcp_sock *tp) tp 668 include/net/tcp.h return usecs_to_jiffies((tp->srtt_us >> 3) + tp->rttvar_us); tp 671 include/net/tcp.h static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) tp 673 include/net/tcp.h tp->pred_flags = htonl((tp->tcp_header_len << 26) | tp 678 include/net/tcp.h static inline void tcp_fast_path_on(struct tcp_sock *tp) tp 680 include/net/tcp.h __tcp_fast_path_on(tp, tp->snd_wnd >> tp->rx_opt.snd_wscale); tp 685 include/net/tcp.h struct tcp_sock *tp = tcp_sk(sk); tp 687 include/net/tcp.h if (RB_EMPTY_ROOT(&tp->out_of_order_queue) && tp 688 include/net/tcp.h tp->rcv_wnd && tp 690 include/net/tcp.h !tp->urg_data) tp 691 include/net/tcp.h tcp_fast_path_on(tp); tp 716 include/net/tcp.h static inline u32 tcp_min_rtt(const struct tcp_sock *tp) tp 718 include/net/tcp.h return minmax_get(&tp->rtt_min); tp 725 include/net/tcp.h static inline u32 tcp_receive_window(const struct tcp_sock *tp) tp 727 include/net/tcp.h s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt; tp 766 include/net/tcp.h static inline u32 tcp_time_stamp(const struct tcp_sock *tp) tp 768 include/net/tcp.h return div_u64(tp->tcp_mstamp, USEC_PER_SEC / TCP_TS_HZ); tp 777 include/net/tcp.h void tcp_mstamp_refresh(struct tcp_sock *tp); tp 1090 include/net/tcp.h u32 tcp_slow_start(struct tcp_sock *tp, u32 acked); tp 1091 include/net/tcp.h void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked); tp 1148 include/net/tcp.h static inline int tcp_is_sack(const struct tcp_sock *tp) tp 1150 include/net/tcp.h return likely(tp->rx_opt.sack_ok); tp 1153 include/net/tcp.h static inline bool tcp_is_reno(const struct tcp_sock *tp) tp 1155 include/net/tcp.h return !tcp_is_sack(tp); tp 1158 include/net/tcp.h static inline unsigned int tcp_left_out(const struct tcp_sock *tp) tp 1160 include/net/tcp.h return tp->sacked_out + tp->lost_out; tp 1177 include/net/tcp.h static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp) tp 1179 include/net/tcp.h return tp->packets_out - tcp_left_out(tp) + tp->retrans_out; tp 1184 include/net/tcp.h static inline bool tcp_in_slow_start(const struct tcp_sock *tp) tp 1186 include/net/tcp.h return tp->snd_cwnd < tp->snd_ssthresh; tp 1189 include/net/tcp.h static inline bool tcp_in_initial_slowstart(const struct tcp_sock *tp) tp 1191 include/net/tcp.h return tp->snd_ssthresh >= TCP_INFINITE_SSTHRESH; tp 1206 include/net/tcp.h const struct tcp_sock *tp = tcp_sk(sk); tp 1209 include/net/tcp.h return tp->snd_ssthresh; tp 1211 include/net/tcp.h return max(tp->snd_ssthresh, tp 1212 include/net/tcp.h ((tp->snd_cwnd >> 1) + tp 1213 include/net/tcp.h (tp->snd_cwnd >> 2))); tp 1217 include/net/tcp.h #define tcp_verify_left_out(tp) WARN_ON(tcp_left_out(tp) > tp->packets_out) tp 1220 include/net/tcp.h __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst); tp 1225 include/net/tcp.h static inline __u32 tcp_max_tso_deferred_mss(const struct tcp_sock *tp) tp 1231 include/net/tcp.h static inline u32 tcp_wnd_end(const struct tcp_sock *tp) tp 1233 include/net/tcp.h return tp->snd_una + tp->snd_wnd; tp 1251 include/net/tcp.h const struct tcp_sock *tp = tcp_sk(sk); tp 1254 include/net/tcp.h if (tcp_in_slow_start(tp)) tp 1255 include/net/tcp.h return tp->snd_cwnd < 2 * tp->max_packets_out; tp 1257 include/net/tcp.h return tp->is_cwnd_limited; tp 1322 include/net/tcp.h static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq) tp 1324 include/net/tcp.h tp->snd_wl1 = seq; tp 1327 include/net/tcp.h static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq) tp 1329 include/net/tcp.h tp->snd_wl1 = seq; tp 1365 include/net/tcp.h struct tcp_sock *tp = tcp_sk(sk); tp 1368 include/net/tcp.h if (!sock_net(sk)->ipv4.sysctl_tcp_slow_start_after_idle || tp->packets_out || tp 1371 include/net/tcp.h delta = tcp_jiffies32 - tp->lsndtime; tp 1424 include/net/tcp.h static inline int keepalive_intvl_when(const struct tcp_sock *tp) tp 1426 include/net/tcp.h struct net *net = sock_net((struct sock *)tp); tp 1428 include/net/tcp.h return tp->keepalive_intvl ? : net->ipv4.sysctl_tcp_keepalive_intvl; tp 1431 include/net/tcp.h static inline int keepalive_time_when(const struct tcp_sock *tp) tp 1433 include/net/tcp.h struct net *net = sock_net((struct sock *)tp); tp 1435 include/net/tcp.h return tp->keepalive_time ? : net->ipv4.sysctl_tcp_keepalive_time; tp 1438 include/net/tcp.h static inline int keepalive_probes(const struct tcp_sock *tp) tp 1440 include/net/tcp.h struct net *net = sock_net((struct sock *)tp); tp 1442 include/net/tcp.h return tp->keepalive_probes ? : net->ipv4.sysctl_tcp_keepalive_probes; tp 1445 include/net/tcp.h static inline u32 keepalive_time_elapsed(const struct tcp_sock *tp) tp 1447 include/net/tcp.h const struct inet_connection_sock *icsk = &tp->inet_conn; tp 1450 include/net/tcp.h tcp_jiffies32 - tp->rcv_tstamp); tp 1519 include/net/tcp.h static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) tp 1521 include/net/tcp.h tp->lost_skb_hint = NULL; tp 1524 include/net/tcp.h static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp) tp 1526 include/net/tcp.h tcp_clear_retrans_hints_partial(tp); tp 1527 include/net/tcp.h tp->retransmit_skb_hint = NULL; tp 1648 include/net/tcp.h void tcp_free_fastopen_req(struct tcp_sock *tp); tp 1832 include/net/tcp.h struct tcp_sock *tp = tcp_sk(sk); tp 1834 include/net/tcp.h __tcp_push_pending_frames(sk, tcp_current_mss(sk), tp->nonagle); tp 1842 include/net/tcp.h static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp) tp 1844 include/net/tcp.h if (!tp->sacked_out) tp 1845 include/net/tcp.h return tp->snd_una; tp 1847 include/net/tcp.h if (tp->highest_sack == NULL) tp 1848 include/net/tcp.h return tp->snd_nxt; tp 1850 include/net/tcp.h return TCP_SKB_CB(tp->highest_sack)->seq; tp 1892 include/net/tcp.h static inline bool tcp_stream_is_thin(struct tcp_sock *tp) tp 1894 include/net/tcp.h return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp); tp 1931 include/net/tcp.h static inline u32 tcp_notsent_lowat(const struct tcp_sock *tp) tp 1933 include/net/tcp.h struct net *net = sock_net((struct sock *)tp); tp 1934 include/net/tcp.h return tp->notsent_lowat ?: net->ipv4.sysctl_tcp_notsent_lowat; tp 1943 include/net/tcp.h const struct tcp_sock *tp = tcp_sk(sk); tp 1944 include/net/tcp.h u32 notsent_bytes = READ_ONCE(tp->write_seq) - tp 1945 include/net/tcp.h READ_ONCE(tp->snd_nxt); tp 1947 include/net/tcp.h return (notsent_bytes << wake) < tcp_notsent_lowat(tp); tp 2029 include/net/tcp.h extern s32 tcp_rack_skb_timeout(struct tcp_sock *tp, struct sk_buff *skb, tp 2032 include/net/tcp.h extern void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq, tp 2085 include/net/tcp.h struct tcp_sock *tp = tcp_sk(sk); tp 2091 include/net/tcp.h !tp->urg_data || tp 2092 include/net/tcp.h before(tp->urg_seq, tp->copied_seq) || tp 2093 include/net/tcp.h !before(tp->urg_seq, tp->rcv_nxt)) { tp 2095 include/net/tcp.h answ = tp->rcv_nxt - tp->copied_seq; tp 2101 include/net/tcp.h answ = tp->urg_seq - tp->copied_seq; tp 2109 include/net/tcp.h static inline void tcp_segs_in(struct tcp_sock *tp, const struct sk_buff *skb) tp 2114 include/net/tcp.h tp->segs_in += segs_in; tp 2116 include/net/tcp.h tp->data_segs_in += segs_in; tp 2293 include/net/tcp.h const struct tcp_sock *tp) tp 2296 include/net/tcp.h skb->skb_mstamp_ns += (u64)tp->tcp_tx_delay * NSEC_PER_USEC; tp 80 include/trace/bpf_probe.h .tp = &__tracepoint_##call, \ tp 256 include/trace/events/tcp.h const struct tcp_sock *tp = tcp_sk(sk); tp 269 include/trace/events/tcp.h __entry->snd_nxt = tp->snd_nxt; tp 270 include/trace/events/tcp.h __entry->snd_una = tp->snd_una; tp 271 include/trace/events/tcp.h __entry->snd_cwnd = tp->snd_cwnd; tp 272 include/trace/events/tcp.h __entry->snd_wnd = tp->snd_wnd; tp 273 include/trace/events/tcp.h __entry->rcv_wnd = tp->rcv_wnd; tp 275 include/trace/events/tcp.h __entry->srtt = tp->srtt_us >> 3; tp 778 include/trace/trace_events.h .tp = &__tracepoint_##call, \ tp 795 include/trace/trace_events.h .tp = &__tracepoint_##call, \ tp 52 include/uapi/linux/atmsvc.h #define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \ tp 53 include/uapi/linux/atmsvc.h (tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? (tp).max_pcr : \ tp 54 include/uapi/linux/atmsvc.h (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR) tp 176 include/uapi/linux/can.h struct { canid_t rx_id, tx_id; } tp; tp 70 include/uapi/linux/tcp.h #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) tp 2813 kernel/bpf/syscall.c btp->tp->name, 0, 0); tp 918 kernel/debug/kdb/kdb_main.c kdbtab_t *tp; tp 1009 kernel/debug/kdb/kdb_main.c for_each_kdbcmd(tp, i) { tp 1010 kernel/debug/kdb/kdb_main.c if (tp->cmd_name) { tp 1016 kernel/debug/kdb/kdb_main.c if (tp->cmd_minlen tp 1017 kernel/debug/kdb/kdb_main.c && (strlen(argv[0]) <= tp->cmd_minlen)) { tp 1019 kernel/debug/kdb/kdb_main.c tp->cmd_name, tp 1020 kernel/debug/kdb/kdb_main.c tp->cmd_minlen) == 0) { tp 1025 kernel/debug/kdb/kdb_main.c if (strcmp(argv[0], tp->cmd_name) == 0) tp 1036 kernel/debug/kdb/kdb_main.c for_each_kdbcmd(tp, i) { tp 1037 kernel/debug/kdb/kdb_main.c if (tp->cmd_name) { tp 1039 kernel/debug/kdb/kdb_main.c tp->cmd_name, tp 1040 kernel/debug/kdb/kdb_main.c strlen(tp->cmd_name)) == 0) { tp 1050 kernel/debug/kdb/kdb_main.c if (!kdb_check_flags(tp->cmd_flags, kdb_cmd_enabled, argc <= 1)) tp 1054 kernel/debug/kdb/kdb_main.c result = (*tp->cmd_func)(argc-1, (const char **)argv); tp 1059 kernel/debug/kdb/kdb_main.c if (tp->cmd_flags & KDB_REPEAT_WITH_ARGS) tp 1062 kernel/debug/kdb/kdb_main.c argc = tp->cmd_flags & KDB_REPEAT_NO_ARGS ? 1 : 0; tp 2871 kernel/futex.c ktime_t t, *tp = NULL; tp 2875 kernel/futex.c tp = &t; tp 2880 kernel/futex.c restart->futex.val, tp, restart->futex.bitset); tp 3932 kernel/futex.c ktime_t t, *tp = NULL; tp 3949 kernel/futex.c tp = &t; tp 3959 kernel/futex.c return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); tp 4126 kernel/futex.c ktime_t t, *tp = NULL; tp 4141 kernel/futex.c tp = &t; tp 4147 kernel/futex.c return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); tp 4552 kernel/module.c struct tracepoint * const *tp) tp 2517 kernel/sys.c struct timespec64 tp; tp 2521 kernel/sys.c ktime_get_boottime_ts64(&tp); tp 2522 kernel/sys.c info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0); tp 658 kernel/time/alarmtimer.c static int alarm_clock_getres(const clockid_t which_clock, struct timespec64 *tp) tp 663 kernel/time/alarmtimer.c tp->tv_sec = 0; tp 664 kernel/time/alarmtimer.c tp->tv_nsec = hrtimer_resolution; tp 675 kernel/time/alarmtimer.c static int alarm_clock_get(clockid_t which_clock, struct timespec64 *tp) tp 682 kernel/time/alarmtimer.c *tp = ktime_to_timespec64(base->gettime()); tp 163 kernel/time/posix-cpu-timers.c posix_cpu_clock_getres(const clockid_t which_clock, struct timespec64 *tp) tp 168 kernel/time/posix-cpu-timers.c tp->tv_sec = 0; tp 169 kernel/time/posix-cpu-timers.c tp->tv_nsec = ((NSEC_PER_SEC + HZ - 1) / HZ); tp 176 kernel/time/posix-cpu-timers.c tp->tv_nsec = 1; tp 183 kernel/time/posix-cpu-timers.c posix_cpu_clock_set(const clockid_t clock, const struct timespec64 *tp) tp 362 kernel/time/posix-cpu-timers.c static int posix_cpu_clock_get(const clockid_t clock, struct timespec64 *tp) tp 378 kernel/time/posix-cpu-timers.c *tp = ns_to_timespec64(t); tp 1358 kernel/time/posix-cpu-timers.c struct timespec64 *tp) tp 1360 kernel/time/posix-cpu-timers.c return posix_cpu_clock_getres(PROCESS_CLOCK, tp); tp 1363 kernel/time/posix-cpu-timers.c struct timespec64 *tp) tp 1365 kernel/time/posix-cpu-timers.c return posix_cpu_clock_get(PROCESS_CLOCK, tp); tp 1378 kernel/time/posix-cpu-timers.c struct timespec64 *tp) tp 1380 kernel/time/posix-cpu-timers.c return posix_cpu_clock_getres(THREAD_CLOCK, tp); tp 1383 kernel/time/posix-cpu-timers.c struct timespec64 *tp) tp 1385 kernel/time/posix-cpu-timers.c return posix_cpu_clock_get(THREAD_CLOCK, tp); tp 60 kernel/time/posix-stubs.c const struct __kernel_timespec __user *, tp) tp 66 kernel/time/posix-stubs.c if (get_timespec64(&new_tp, tp)) tp 72 kernel/time/posix-stubs.c int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp) tp 76 kernel/time/posix-stubs.c ktime_get_real_ts64(tp); tp 79 kernel/time/posix-stubs.c ktime_get_ts64(tp); tp 82 kernel/time/posix-stubs.c ktime_get_boottime_ts64(tp); tp 91 kernel/time/posix-stubs.c struct __kernel_timespec __user *, tp) tp 100 kernel/time/posix-stubs.c if (put_timespec64(&kernel_tp, tp)) tp 105 kernel/time/posix-stubs.c SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, struct __kernel_timespec __user *, tp) tp 116 kernel/time/posix-stubs.c if (put_timespec64(&rtn_tp, tp)) tp 163 kernel/time/posix-stubs.c struct old_timespec32 __user *, tp) tp 169 kernel/time/posix-stubs.c if (get_old_timespec32(&new_tp, tp)) tp 176 kernel/time/posix-stubs.c struct old_timespec32 __user *, tp) tp 185 kernel/time/posix-stubs.c if (put_old_timespec32(&kernel_tp, tp)) tp 191 kernel/time/posix-stubs.c struct old_timespec32 __user *, tp) tp 202 kernel/time/posix-stubs.c if (put_old_timespec32(&rtn_tp, tp)) tp 168 kernel/time/posix-timers.c static int posix_clock_realtime_get(clockid_t which_clock, struct timespec64 *tp) tp 170 kernel/time/posix-timers.c ktime_get_real_ts64(tp); tp 176 kernel/time/posix-timers.c const struct timespec64 *tp) tp 178 kernel/time/posix-timers.c return do_sys_settimeofday64(tp, NULL); tp 190 kernel/time/posix-timers.c static int posix_ktime_get_ts(clockid_t which_clock, struct timespec64 *tp) tp 192 kernel/time/posix-timers.c ktime_get_ts64(tp); tp 199 kernel/time/posix-timers.c static int posix_get_monotonic_raw(clockid_t which_clock, struct timespec64 *tp) tp 201 kernel/time/posix-timers.c ktime_get_raw_ts64(tp); tp 206 kernel/time/posix-timers.c static int posix_get_realtime_coarse(clockid_t which_clock, struct timespec64 *tp) tp 208 kernel/time/posix-timers.c ktime_get_coarse_real_ts64(tp); tp 213 kernel/time/posix-timers.c struct timespec64 *tp) tp 215 kernel/time/posix-timers.c ktime_get_coarse_ts64(tp); tp 219 kernel/time/posix-timers.c static int posix_get_coarse_res(const clockid_t which_clock, struct timespec64 *tp) tp 221 kernel/time/posix-timers.c *tp = ktime_to_timespec64(KTIME_LOW_RES); tp 225 kernel/time/posix-timers.c static int posix_get_boottime(const clockid_t which_clock, struct timespec64 *tp) tp 227 kernel/time/posix-timers.c ktime_get_boottime_ts64(tp); tp 231 kernel/time/posix-timers.c static int posix_get_tai(clockid_t which_clock, struct timespec64 *tp) tp 233 kernel/time/posix-timers.c ktime_get_clocktai_ts64(tp); tp 237 kernel/time/posix-timers.c static int posix_get_hrtimer_res(clockid_t which_clock, struct timespec64 *tp) tp 239 kernel/time/posix-timers.c tp->tv_sec = 0; tp 240 kernel/time/posix-timers.c tp->tv_nsec = hrtimer_resolution; tp 1046 kernel/time/posix-timers.c const struct __kernel_timespec __user *, tp) tp 1054 kernel/time/posix-timers.c if (get_timespec64(&new_tp, tp)) tp 1061 kernel/time/posix-timers.c struct __kernel_timespec __user *, tp) tp 1072 kernel/time/posix-timers.c if (!error && put_timespec64(&kernel_tp, tp)) tp 1108 kernel/time/posix-timers.c struct __kernel_timespec __user *, tp) tp 1119 kernel/time/posix-timers.c if (!error && tp && put_timespec64(&rtn_tp, tp)) tp 1128 kernel/time/posix-timers.c struct old_timespec32 __user *, tp) tp 1136 kernel/time/posix-timers.c if (get_old_timespec32(&ts, tp)) tp 1143 kernel/time/posix-timers.c struct old_timespec32 __user *, tp) tp 1154 kernel/time/posix-timers.c if (!err && put_old_timespec32(&ts, tp)) tp 1179 kernel/time/posix-timers.c struct old_timespec32 __user *, tp) tp 1189 kernel/time/posix-timers.c if (!err && tp && put_old_timespec32(&ts, tp)) tp 6 kernel/time/posix-timers.h struct timespec64 *tp); tp 8 kernel/time/posix-timers.h const struct timespec64 *tp); tp 10 kernel/time/posix-timers.h struct timespec64 *tp); tp 339 kernel/torture.c void torture_shuffle_task_register(struct task_struct *tp) tp 343 kernel/torture.c if (WARN_ON_ONCE(tp == NULL)) tp 348 kernel/torture.c stp->st_t = tp; tp 776 kernel/torture.c char *f, struct task_struct **tp) tp 781 kernel/torture.c *tp = kthread_run(fn, arg, "%s", s); tp 782 kernel/torture.c if (IS_ERR(*tp)) { tp 783 kernel/torture.c ret = PTR_ERR(*tp); tp 785 kernel/torture.c *tp = NULL; tp 787 kernel/torture.c torture_shuffle_task_register(*tp); tp 795 kernel/torture.c void _torture_stop_kthread(char *m, struct task_struct **tp) tp 797 kernel/torture.c if (*tp == NULL) tp 800 kernel/torture.c kthread_stop(*tp); tp 801 kernel/torture.c *tp = NULL; tp 44 kernel/trace/bpf_trace.c if (!strcmp(btp->tp->name, name)) { tp 1314 kernel/trace/bpf_trace.c if (!strcmp(btp->tp->name, name)) tp 1386 kernel/trace/bpf_trace.c struct tracepoint *tp = btp->tp; tp 1398 kernel/trace/bpf_trace.c return tracepoint_probe_register(tp, (void *)btp->bpf_func, prog); tp 1408 kernel/trace/bpf_trace.c return tracepoint_probe_unregister(btp->tp, (void *)btp->bpf_func, prog); tp 1433 kernel/trace/bpf_trace.c *buf = is_tracepoint ? event->tp_event->tp->name tp 288 kernel/trace/trace_events.c return tracepoint_probe_register(call->tp, tp 292 kernel/trace/trace_events.c tracepoint_probe_unregister(call->tp, tp 299 kernel/trace/trace_events.c return tracepoint_probe_register(call->tp, tp 303 kernel/trace/trace_events.c tracepoint_probe_unregister(call->tp, tp 410 kernel/trace/trace_events_hist.c struct tracepoint *tp; tp 1117 kernel/trace/trace_events_hist.c static void free_synth_tracepoint(struct tracepoint *tp) tp 1119 kernel/trace/trace_events_hist.c if (!tp) tp 1122 kernel/trace/trace_events_hist.c kfree(tp->name); tp 1123 kernel/trace/trace_events_hist.c kfree(tp); tp 1128 kernel/trace/trace_events_hist.c struct tracepoint *tp; tp 1130 kernel/trace/trace_events_hist.c tp = kzalloc(sizeof(*tp), GFP_KERNEL); tp 1131 kernel/trace/trace_events_hist.c if (!tp) tp 1134 kernel/trace/trace_events_hist.c tp->name = kstrdup(name, GFP_KERNEL); tp 1135 kernel/trace/trace_events_hist.c if (!tp->name) { tp 1136 kernel/trace/trace_events_hist.c kfree(tp); tp 1140 kernel/trace/trace_events_hist.c return tp; tp 1149 kernel/trace/trace_events_hist.c struct tracepoint *tp = event->tp; tp 1151 kernel/trace/trace_events_hist.c if (unlikely(atomic_read(&tp->key.enabled) > 0)) { tp 1159 kernel/trace/trace_events_hist.c probe_func_ptr = rcu_dereference_sched((tp)->funcs); tp 1198 kernel/trace/trace_events_hist.c event->tp = alloc_synth_tracepoint(event->name); tp 1199 kernel/trace/trace_events_hist.c if (IS_ERR(event->tp)) { tp 1200 kernel/trace/trace_events_hist.c ret = PTR_ERR(event->tp); tp 1201 kernel/trace/trace_events_hist.c event->tp = NULL; tp 1218 kernel/trace/trace_events_hist.c call->tp = event->tp; tp 1262 kernel/trace/trace_events_hist.c free_synth_tracepoint(event->tp); tp 61 kernel/trace/trace_kprobe.c struct trace_probe tp; tp 84 kernel/trace/trace_kprobe.c (offsetof(struct trace_kprobe, tp.args) + \ tp 138 kernel/trace/trace_kprobe.c return trace_probe_is_enabled(&tk->tp); tp 160 kernel/trace/trace_kprobe.c return trace_probe_match_command_args(&tk->tp, argc, argv); tp 168 kernel/trace/trace_kprobe.c return strcmp(trace_probe_name(&tk->tp), event) == 0 && tp 169 kernel/trace/trace_kprobe.c (!system || strcmp(trace_probe_group_name(&tk->tp), system) == 0) && tp 210 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 212 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call(call); tp 213 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 216 kernel/trace/trace_kprobe.c return container_of(tp, struct trace_kprobe, tp); tp 246 kernel/trace/trace_kprobe.c trace_probe_cleanup(&tk->tp); tp 293 kernel/trace/trace_kprobe.c ret = trace_probe_init(&tk->tp, event, group, false); tp 311 kernel/trace/trace_kprobe.c if (strcmp(trace_probe_name(&tk->tp), event) == 0 && tp 312 kernel/trace/trace_kprobe.c strcmp(trace_probe_group_name(&tk->tp), group) == 0) tp 331 kernel/trace/trace_kprobe.c static void __disable_trace_kprobe(struct trace_probe *tp) tp 336 kernel/trace/trace_kprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 337 kernel/trace/trace_kprobe.c tk = container_of(pos, struct trace_kprobe, tp); tp 354 kernel/trace/trace_kprobe.c struct trace_probe *pos, *tp; tp 359 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call(call); tp 360 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 362 kernel/trace/trace_kprobe.c enabled = trace_probe_is_enabled(tp); tp 366 kernel/trace/trace_kprobe.c ret = trace_probe_add_file(tp, file); tp 370 kernel/trace/trace_kprobe.c trace_probe_set_flag(tp, TP_FLAG_PROFILE); tp 375 kernel/trace/trace_kprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 376 kernel/trace/trace_kprobe.c tk = container_of(pos, struct trace_kprobe, tp); tp 388 kernel/trace/trace_kprobe.c __disable_trace_kprobe(tp); tp 390 kernel/trace/trace_kprobe.c trace_probe_remove_file(tp, file); tp 392 kernel/trace/trace_kprobe.c trace_probe_clear_flag(tp, TP_FLAG_PROFILE); tp 405 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 407 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call(call); tp 408 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 412 kernel/trace/trace_kprobe.c if (!trace_probe_get_file_link(tp, file)) tp 414 kernel/trace/trace_kprobe.c if (!trace_probe_has_single_file(tp)) tp 416 kernel/trace/trace_kprobe.c trace_probe_clear_flag(tp, TP_FLAG_TRACE); tp 418 kernel/trace/trace_kprobe.c trace_probe_clear_flag(tp, TP_FLAG_PROFILE); tp 420 kernel/trace/trace_kprobe.c if (!trace_probe_is_enabled(tp)) tp 421 kernel/trace/trace_kprobe.c __disable_trace_kprobe(tp); tp 431 kernel/trace/trace_kprobe.c trace_probe_remove_file(tp, file); tp 498 kernel/trace/trace_kprobe.c for (i = 0; i < tk->tp.nr_args; i++) { tp 499 kernel/trace/trace_kprobe.c ret = traceprobe_update_arg(&tk->tp.args[i]); tp 505 kernel/trace/trace_kprobe.c if (trace_probe_is_enabled(&tk->tp)) tp 538 kernel/trace/trace_kprobe.c if (trace_probe_has_sibling(&tk->tp)) tp 542 kernel/trace/trace_kprobe.c if (trace_probe_is_enabled(&tk->tp)) tp 552 kernel/trace/trace_kprobe.c trace_probe_unlink(&tk->tp); tp 560 kernel/trace/trace_kprobe.c struct trace_probe_event *tpe = orig->tp.event; tp 565 kernel/trace/trace_kprobe.c orig = container_of(pos, struct trace_kprobe, tp); tp 575 kernel/trace/trace_kprobe.c for (i = 0; i < orig->tp.nr_args; i++) { tp 576 kernel/trace/trace_kprobe.c if (strcmp(orig->tp.args[i].comm, tp 577 kernel/trace/trace_kprobe.c comp->tp.args[i].comm)) tp 581 kernel/trace/trace_kprobe.c if (i == orig->tp.nr_args) tp 592 kernel/trace/trace_kprobe.c ret = trace_probe_compare_arg_type(&tk->tp, &to->tp); tp 606 kernel/trace/trace_kprobe.c ret = trace_probe_append(&tk->tp, &to->tp); tp 618 kernel/trace/trace_kprobe.c trace_probe_unlink(&tk->tp); tp 633 kernel/trace/trace_kprobe.c old_tk = find_trace_kprobe(trace_probe_name(&tk->tp), tp 634 kernel/trace/trace_kprobe.c trace_probe_group_name(&tk->tp)); tp 691 kernel/trace/trace_kprobe.c trace_probe_name(&tk->tp), tp 860 kernel/trace/trace_kprobe.c ret = traceprobe_parse_probe_arg(&tk->tp, i, tmp, flags); tp 866 kernel/trace/trace_kprobe.c ret = traceprobe_set_print_fmt(&tk->tp, is_return); tp 923 kernel/trace/trace_kprobe.c seq_printf(m, ":%s/%s", trace_probe_group_name(&tk->tp), tp 924 kernel/trace/trace_kprobe.c trace_probe_name(&tk->tp)); tp 934 kernel/trace/trace_kprobe.c for (i = 0; i < tk->tp.nr_args; i++) tp 935 kernel/trace/trace_kprobe.c seq_printf(m, " %s=%s", tk->tp.args[i].name, tk->tp.args[i].comm); tp 1002 kernel/trace/trace_kprobe.c trace_probe_name(&tk->tp), tp 1184 kernel/trace/trace_kprobe.c struct trace_event_call *call = trace_probe_event_call(&tk->tp); tp 1194 kernel/trace/trace_kprobe.c dsize = __get_data_size(&tk->tp, regs); tp 1195 kernel/trace/trace_kprobe.c size = sizeof(*entry) + tk->tp.size + dsize; tp 1205 kernel/trace/trace_kprobe.c store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize); tp 1216 kernel/trace/trace_kprobe.c trace_probe_for_each_link_rcu(link, &tk->tp) tp 1232 kernel/trace/trace_kprobe.c struct trace_event_call *call = trace_probe_event_call(&tk->tp); tp 1242 kernel/trace/trace_kprobe.c dsize = __get_data_size(&tk->tp, regs); tp 1243 kernel/trace/trace_kprobe.c size = sizeof(*entry) + tk->tp.size + dsize; tp 1254 kernel/trace/trace_kprobe.c store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize); tp 1266 kernel/trace/trace_kprobe.c trace_probe_for_each_link_rcu(link, &tk->tp) tp 1278 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 1281 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call( tp 1283 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 1286 kernel/trace/trace_kprobe.c trace_seq_printf(s, "%s: (", trace_probe_name(tp)); tp 1293 kernel/trace/trace_kprobe.c if (print_probe_args(s, tp->args, tp->nr_args, tp 1308 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 1311 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call( tp 1313 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 1316 kernel/trace/trace_kprobe.c trace_seq_printf(s, "%s: (", trace_probe_name(tp)); tp 1328 kernel/trace/trace_kprobe.c if (print_probe_args(s, tp->args, tp->nr_args, tp 1343 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 1345 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call(event_call); tp 1346 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 1351 kernel/trace/trace_kprobe.c return traceprobe_define_arg_fields(event_call, sizeof(field), tp); tp 1358 kernel/trace/trace_kprobe.c struct trace_probe *tp; tp 1360 kernel/trace/trace_kprobe.c tp = trace_probe_primary_from_call(event_call); tp 1361 kernel/trace/trace_kprobe.c if (WARN_ON_ONCE(!tp)) tp 1367 kernel/trace/trace_kprobe.c return traceprobe_define_arg_fields(event_call, sizeof(field), tp); tp 1376 kernel/trace/trace_kprobe.c struct trace_event_call *call = trace_probe_event_call(&tk->tp); tp 1403 kernel/trace/trace_kprobe.c dsize = __get_data_size(&tk->tp, regs); tp 1404 kernel/trace/trace_kprobe.c __size = sizeof(*entry) + tk->tp.size + dsize; tp 1414 kernel/trace/trace_kprobe.c store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize); tp 1426 kernel/trace/trace_kprobe.c struct trace_event_call *call = trace_probe_event_call(&tk->tp); tp 1439 kernel/trace/trace_kprobe.c dsize = __get_data_size(&tk->tp, regs); tp 1440 kernel/trace/trace_kprobe.c __size = sizeof(*entry) + tk->tp.size + dsize; tp 1450 kernel/trace/trace_kprobe.c store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize); tp 1525 kernel/trace/trace_kprobe.c if (trace_probe_test_flag(&tk->tp, TP_FLAG_TRACE)) tp 1528 kernel/trace/trace_kprobe.c if (trace_probe_test_flag(&tk->tp, TP_FLAG_PROFILE)) tp 1542 kernel/trace/trace_kprobe.c if (trace_probe_test_flag(&tk->tp, TP_FLAG_TRACE)) tp 1545 kernel/trace/trace_kprobe.c if (trace_probe_test_flag(&tk->tp, TP_FLAG_PROFILE)) tp 1562 kernel/trace/trace_kprobe.c struct trace_event_call *call = trace_probe_event_call(&tk->tp); tp 1580 kernel/trace/trace_kprobe.c return trace_probe_register_event_call(&tk->tp); tp 1585 kernel/trace/trace_kprobe.c return trace_probe_unregister_event_call(&tk->tp); tp 1617 kernel/trace/trace_kprobe.c if (traceprobe_set_print_fmt(&tk->tp, trace_kprobe_is_return(tk)) < 0) { tp 1626 kernel/trace/trace_kprobe.c return trace_probe_event_call(&tk->tp); tp 1640 kernel/trace/trace_kprobe.c if (trace_probe_is_enabled(&tk->tp)) { tp 1661 kernel/trace/trace_kprobe.c if (file->event_call == trace_probe_event_call(&tk->tp)) tp 1737 kernel/trace/trace_kprobe.c if (file->event_call == trace_probe_event_call(&tk->tp)) tp 1784 kernel/trace/trace_kprobe.c trace_probe_event_call(&tk->tp), file); tp 1806 kernel/trace/trace_kprobe.c trace_probe_event_call(&tk->tp), file); tp 1840 kernel/trace/trace_kprobe.c trace_probe_event_call(&tk->tp), file); tp 1859 kernel/trace/trace_kprobe.c trace_probe_event_call(&tk->tp), file); tp 748 kernel/trace/trace_probe.c int traceprobe_parse_probe_arg(struct trace_probe *tp, int i, char *arg, tp 751 kernel/trace/trace_probe.c struct probe_arg *parg = &tp->args[i]; tp 755 kernel/trace/trace_probe.c tp->nr_args++; tp 780 kernel/trace/trace_probe.c if (traceprobe_conflict_field_name(parg->name, tp->args, i)) { tp 785 kernel/trace/trace_probe.c return traceprobe_parse_probe_arg_body(body, &tp->size, parg, flags, tp 841 kernel/trace/trace_probe.c static int __set_print_fmt(struct trace_probe *tp, char *buf, int len, tp 859 kernel/trace/trace_probe.c for (i = 0; i < tp->nr_args; i++) { tp 860 kernel/trace/trace_probe.c parg = tp->args + i; tp 876 kernel/trace/trace_probe.c for (i = 0; i < tp->nr_args; i++) { tp 877 kernel/trace/trace_probe.c parg = tp->args + i; tp 903 kernel/trace/trace_probe.c int traceprobe_set_print_fmt(struct trace_probe *tp, bool is_return) tp 905 kernel/trace/trace_probe.c struct trace_event_call *call = trace_probe_event_call(tp); tp 910 kernel/trace/trace_probe.c len = __set_print_fmt(tp, NULL, 0, is_return); tp 916 kernel/trace/trace_probe.c __set_print_fmt(tp, print_fmt, len + 1, is_return); tp 923 kernel/trace/trace_probe.c size_t offset, struct trace_probe *tp) tp 928 kernel/trace/trace_probe.c for (i = 0; i < tp->nr_args; i++) { tp 929 kernel/trace/trace_probe.c struct probe_arg *parg = &tp->args[i]; tp 955 kernel/trace/trace_probe.c int trace_probe_append(struct trace_probe *tp, struct trace_probe *to) tp 957 kernel/trace/trace_probe.c if (trace_probe_has_sibling(tp)) tp 960 kernel/trace/trace_probe.c list_del_init(&tp->list); tp 961 kernel/trace/trace_probe.c trace_probe_event_free(tp->event); tp 963 kernel/trace/trace_probe.c tp->event = to->event; tp 964 kernel/trace/trace_probe.c list_add_tail(&tp->list, trace_probe_probe_list(to)); tp 969 kernel/trace/trace_probe.c void trace_probe_unlink(struct trace_probe *tp) tp 971 kernel/trace/trace_probe.c list_del_init(&tp->list); tp 972 kernel/trace/trace_probe.c if (list_empty(trace_probe_probe_list(tp))) tp 973 kernel/trace/trace_probe.c trace_probe_event_free(tp->event); tp 974 kernel/trace/trace_probe.c tp->event = NULL; tp 977 kernel/trace/trace_probe.c void trace_probe_cleanup(struct trace_probe *tp) tp 981 kernel/trace/trace_probe.c for (i = 0; i < tp->nr_args; i++) tp 982 kernel/trace/trace_probe.c traceprobe_free_probe_arg(&tp->args[i]); tp 984 kernel/trace/trace_probe.c if (tp->event) tp 985 kernel/trace/trace_probe.c trace_probe_unlink(tp); tp 988 kernel/trace/trace_probe.c int trace_probe_init(struct trace_probe *tp, const char *event, tp 1001 kernel/trace/trace_probe.c tp->event = kzalloc(size, GFP_KERNEL); tp 1002 kernel/trace/trace_probe.c if (!tp->event) tp 1005 kernel/trace/trace_probe.c INIT_LIST_HEAD(&tp->event->files); tp 1006 kernel/trace/trace_probe.c INIT_LIST_HEAD(&tp->event->class.fields); tp 1007 kernel/trace/trace_probe.c INIT_LIST_HEAD(&tp->event->probes); tp 1008 kernel/trace/trace_probe.c INIT_LIST_HEAD(&tp->list); tp 1009 kernel/trace/trace_probe.c list_add(&tp->event->probes, &tp->list); tp 1011 kernel/trace/trace_probe.c call = trace_probe_event_call(tp); tp 1012 kernel/trace/trace_probe.c call->class = &tp->event->class; tp 1019 kernel/trace/trace_probe.c tp->event->class.system = kstrdup(group, GFP_KERNEL); tp 1020 kernel/trace/trace_probe.c if (!tp->event->class.system) { tp 1028 kernel/trace/trace_probe.c trace_probe_cleanup(tp); tp 1032 kernel/trace/trace_probe.c int trace_probe_register_event_call(struct trace_probe *tp) tp 1034 kernel/trace/trace_probe.c struct trace_event_call *call = trace_probe_event_call(tp); tp 1048 kernel/trace/trace_probe.c int trace_probe_add_file(struct trace_probe *tp, struct trace_event_file *file) tp 1058 kernel/trace/trace_probe.c list_add_tail_rcu(&link->list, &tp->event->files); tp 1059 kernel/trace/trace_probe.c trace_probe_set_flag(tp, TP_FLAG_TRACE); tp 1063 kernel/trace/trace_probe.c struct event_file_link *trace_probe_get_file_link(struct trace_probe *tp, tp 1068 kernel/trace/trace_probe.c trace_probe_for_each_link(link, tp) { tp 1076 kernel/trace/trace_probe.c int trace_probe_remove_file(struct trace_probe *tp, tp 1081 kernel/trace/trace_probe.c link = trace_probe_get_file_link(tp, file); tp 1089 kernel/trace/trace_probe.c if (list_empty(&tp->event->files)) tp 1090 kernel/trace/trace_probe.c trace_probe_clear_flag(tp, TP_FLAG_TRACE); tp 1120 kernel/trace/trace_probe.c bool trace_probe_match_command_args(struct trace_probe *tp, tp 1126 kernel/trace/trace_probe.c if (tp->nr_args < argc) tp 1131 kernel/trace/trace_probe.c tp->args[i].name, tp->args[i].comm); tp 255 kernel/trace/trace_probe.h static inline bool trace_probe_test_flag(struct trace_probe *tp, tp 258 kernel/trace/trace_probe.h return !!(tp->event->flags & flag); tp 261 kernel/trace/trace_probe.h static inline void trace_probe_set_flag(struct trace_probe *tp, tp 264 kernel/trace/trace_probe.h tp->event->flags |= flag; tp 267 kernel/trace/trace_probe.h static inline void trace_probe_clear_flag(struct trace_probe *tp, tp 270 kernel/trace/trace_probe.h tp->event->flags &= ~flag; tp 273 kernel/trace/trace_probe.h static inline bool trace_probe_is_enabled(struct trace_probe *tp) tp 275 kernel/trace/trace_probe.h return trace_probe_test_flag(tp, TP_FLAG_TRACE | TP_FLAG_PROFILE); tp 278 kernel/trace/trace_probe.h static inline const char *trace_probe_name(struct trace_probe *tp) tp 280 kernel/trace/trace_probe.h return trace_event_name(&tp->event->call); tp 283 kernel/trace/trace_probe.h static inline const char *trace_probe_group_name(struct trace_probe *tp) tp 285 kernel/trace/trace_probe.h return tp->event->call.class->system; tp 289 kernel/trace/trace_probe.h trace_probe_event_call(struct trace_probe *tp) tp 291 kernel/trace/trace_probe.h return &tp->event->call; tp 308 kernel/trace/trace_probe.h static inline struct list_head *trace_probe_probe_list(struct trace_probe *tp) tp 310 kernel/trace/trace_probe.h return &tp->event->probes; tp 313 kernel/trace/trace_probe.h static inline bool trace_probe_has_sibling(struct trace_probe *tp) tp 315 kernel/trace/trace_probe.h struct list_head *list = trace_probe_probe_list(tp); tp 320 kernel/trace/trace_probe.h static inline int trace_probe_unregister_event_call(struct trace_probe *tp) tp 323 kernel/trace/trace_probe.h return trace_remove_event_call(&tp->event->call); tp 326 kernel/trace/trace_probe.h static inline bool trace_probe_has_single_file(struct trace_probe *tp) tp 328 kernel/trace/trace_probe.h return !!list_is_singular(&tp->event->files); tp 331 kernel/trace/trace_probe.h int trace_probe_init(struct trace_probe *tp, const char *event, tp 333 kernel/trace/trace_probe.h void trace_probe_cleanup(struct trace_probe *tp); tp 334 kernel/trace/trace_probe.h int trace_probe_append(struct trace_probe *tp, struct trace_probe *to); tp 335 kernel/trace/trace_probe.h void trace_probe_unlink(struct trace_probe *tp); tp 336 kernel/trace/trace_probe.h int trace_probe_register_event_call(struct trace_probe *tp); tp 337 kernel/trace/trace_probe.h int trace_probe_add_file(struct trace_probe *tp, struct trace_event_file *file); tp 338 kernel/trace/trace_probe.h int trace_probe_remove_file(struct trace_probe *tp, tp 340 kernel/trace/trace_probe.h struct event_file_link *trace_probe_get_file_link(struct trace_probe *tp, tp 343 kernel/trace/trace_probe.h bool trace_probe_match_command_args(struct trace_probe *tp, tp 346 kernel/trace/trace_probe.h #define trace_probe_for_each_link(pos, tp) \ tp 347 kernel/trace/trace_probe.h list_for_each_entry(pos, &(tp)->event->files, list) tp 348 kernel/trace/trace_probe.h #define trace_probe_for_each_link_rcu(pos, tp) \ tp 349 kernel/trace/trace_probe.h list_for_each_entry_rcu(pos, &(tp)->event->files, list) tp 368 kernel/trace/trace_probe.h extern int traceprobe_parse_probe_arg(struct trace_probe *tp, int i, tp 378 kernel/trace/trace_probe.h extern int traceprobe_set_print_fmt(struct trace_probe *tp, bool is_return); tp 392 kernel/trace/trace_probe.h size_t offset, struct trace_probe *tp); tp 172 kernel/trace/trace_probe_tmpl.h __get_data_size(struct trace_probe *tp, struct pt_regs *regs) tp 177 kernel/trace/trace_probe_tmpl.h for (i = 0; i < tp->nr_args; i++) { tp 178 kernel/trace/trace_probe_tmpl.h arg = tp->args + i; tp 191 kernel/trace/trace_probe_tmpl.h store_trace_args(void *data, struct trace_probe *tp, struct pt_regs *regs, tp 196 kernel/trace/trace_probe_tmpl.h void *dyndata = data + tp->size; tp 200 kernel/trace/trace_probe_tmpl.h for (i = 0; i < tp->nr_args; i++) { tp 201 kernel/trace/trace_probe_tmpl.h arg = tp->args + i; tp 64 kernel/trace/trace_uprobe.c struct trace_probe tp; tp 87 kernel/trace/trace_uprobe.c (offsetof(struct trace_uprobe, tp.args) + \ tp 281 kernel/trace/trace_uprobe.c return trace_probe_is_enabled(&tu->tp); tp 309 kernel/trace/trace_uprobe.c return trace_probe_match_command_args(&tu->tp, argc, argv); tp 317 kernel/trace/trace_uprobe.c return strcmp(trace_probe_name(&tu->tp), event) == 0 && tp 318 kernel/trace/trace_uprobe.c (!system || strcmp(trace_probe_group_name(&tu->tp), system) == 0) && tp 325 kernel/trace/trace_uprobe.c struct trace_probe *tp; tp 327 kernel/trace/trace_uprobe.c tp = trace_probe_primary_from_call(call); tp 328 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(!tp)) tp 331 kernel/trace/trace_uprobe.c return container_of(tp, struct trace_uprobe, tp); tp 347 kernel/trace/trace_uprobe.c ret = trace_probe_init(&tu->tp, event, group, true); tp 355 kernel/trace/trace_uprobe.c init_trace_uprobe_filter(tu->tp.event->filter); tp 370 kernel/trace/trace_uprobe.c trace_probe_cleanup(&tu->tp); tp 381 kernel/trace/trace_uprobe.c if (strcmp(trace_probe_name(&tu->tp), event) == 0 && tp 382 kernel/trace/trace_uprobe.c strcmp(trace_probe_group_name(&tu->tp), group) == 0) tp 393 kernel/trace/trace_uprobe.c if (trace_probe_has_sibling(&tu->tp)) tp 402 kernel/trace/trace_uprobe.c trace_probe_unlink(&tu->tp); tp 410 kernel/trace/trace_uprobe.c struct trace_probe_event *tpe = orig->tp.event; tp 416 kernel/trace/trace_uprobe.c orig = container_of(pos, struct trace_uprobe, tp); tp 425 kernel/trace/trace_uprobe.c for (i = 0; i < orig->tp.nr_args; i++) { tp 426 kernel/trace/trace_uprobe.c if (strcmp(orig->tp.args[i].comm, tp 427 kernel/trace/trace_uprobe.c comp->tp.args[i].comm)) tp 431 kernel/trace/trace_uprobe.c if (i == orig->tp.nr_args) tp 442 kernel/trace/trace_uprobe.c ret = trace_probe_compare_arg_type(&tu->tp, &to->tp); tp 456 kernel/trace/trace_uprobe.c ret = trace_probe_append(&tu->tp, &to->tp); tp 502 kernel/trace/trace_uprobe.c old_tu = find_probe_event(trace_probe_name(&tu->tp), tp 503 kernel/trace/trace_uprobe.c trace_probe_group_name(&tu->tp)); tp 677 kernel/trace/trace_uprobe.c ret = traceprobe_parse_probe_arg(&tu->tp, i, tmp, tp 684 kernel/trace/trace_uprobe.c ret = traceprobe_set_print_fmt(&tu->tp, is_ret_probe(tu)); tp 731 kernel/trace/trace_uprobe.c seq_printf(m, "%c:%s/%s %s:0x%0*lx", c, trace_probe_group_name(&tu->tp), tp 732 kernel/trace/trace_uprobe.c trace_probe_name(&tu->tp), tu->filename, tp 738 kernel/trace/trace_uprobe.c for (i = 0; i < tu->tp.nr_args; i++) tp 739 kernel/trace/trace_uprobe.c seq_printf(m, " %s=%s", tu->tp.args[i].name, tu->tp.args[i].comm); tp 806 kernel/trace/trace_uprobe.c trace_probe_name(&tu->tp), tu->nhit); tp 938 kernel/trace/trace_uprobe.c struct trace_event_call *call = trace_probe_event_call(&tu->tp); tp 942 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(tu->tp.size + dsize > PAGE_SIZE)) tp 949 kernel/trace/trace_uprobe.c size = esize + tu->tp.size + dsize; tp 965 kernel/trace/trace_uprobe.c memcpy(data, ucb->buf, tu->tp.size + dsize); tp 980 kernel/trace/trace_uprobe.c trace_probe_for_each_link_rcu(link, &tu->tp) tp 994 kernel/trace/trace_uprobe.c trace_probe_for_each_link_rcu(link, &tu->tp) tp 1016 kernel/trace/trace_uprobe.c trace_probe_name(&tu->tp), tp 1021 kernel/trace/trace_uprobe.c trace_probe_name(&tu->tp), tp 1026 kernel/trace/trace_uprobe.c if (print_probe_args(s, tu->tp.args, tu->tp.nr_args, data, entry) < 0) tp 1058 kernel/trace/trace_uprobe.c static void __probe_event_disable(struct trace_probe *tp) tp 1063 kernel/trace/trace_uprobe.c tu = container_of(tp, struct trace_uprobe, tp); tp 1064 kernel/trace/trace_uprobe.c WARN_ON(!uprobe_filter_is_empty(tu->tp.event->filter)); tp 1066 kernel/trace/trace_uprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 1067 kernel/trace/trace_uprobe.c tu = container_of(pos, struct trace_uprobe, tp); tp 1079 kernel/trace/trace_uprobe.c struct trace_probe *pos, *tp; tp 1084 kernel/trace/trace_uprobe.c tp = trace_probe_primary_from_call(call); tp 1085 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(!tp)) tp 1087 kernel/trace/trace_uprobe.c enabled = trace_probe_is_enabled(tp); tp 1091 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(tp, TP_FLAG_PROFILE)) tp 1094 kernel/trace/trace_uprobe.c ret = trace_probe_add_file(tp, file); tp 1098 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(tp, TP_FLAG_TRACE)) tp 1101 kernel/trace/trace_uprobe.c trace_probe_set_flag(tp, TP_FLAG_PROFILE); tp 1104 kernel/trace/trace_uprobe.c tu = container_of(tp, struct trace_uprobe, tp); tp 1105 kernel/trace/trace_uprobe.c WARN_ON(!uprobe_filter_is_empty(tu->tp.event->filter)); tp 1114 kernel/trace/trace_uprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 1115 kernel/trace/trace_uprobe.c tu = container_of(pos, struct trace_uprobe, tp); tp 1118 kernel/trace/trace_uprobe.c __probe_event_disable(tp); tp 1130 kernel/trace/trace_uprobe.c trace_probe_remove_file(tp, file); tp 1132 kernel/trace/trace_uprobe.c trace_probe_clear_flag(tp, TP_FLAG_PROFILE); tp 1140 kernel/trace/trace_uprobe.c struct trace_probe *tp; tp 1142 kernel/trace/trace_uprobe.c tp = trace_probe_primary_from_call(call); tp 1143 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(!tp)) tp 1146 kernel/trace/trace_uprobe.c if (!trace_probe_is_enabled(tp)) tp 1150 kernel/trace/trace_uprobe.c if (trace_probe_remove_file(tp, file) < 0) tp 1153 kernel/trace/trace_uprobe.c if (trace_probe_is_enabled(tp)) tp 1156 kernel/trace/trace_uprobe.c trace_probe_clear_flag(tp, TP_FLAG_PROFILE); tp 1158 kernel/trace/trace_uprobe.c __probe_event_disable(tp); tp 1181 kernel/trace/trace_uprobe.c return traceprobe_define_arg_fields(event_call, size, &tu->tp); tp 1260 kernel/trace/trace_uprobe.c struct trace_probe *pos, *tp; tp 1264 kernel/trace/trace_uprobe.c tp = trace_probe_primary_from_call(call); tp 1265 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(!tp)) tp 1268 kernel/trace/trace_uprobe.c tu = container_of(tp, struct trace_uprobe, tp); tp 1269 kernel/trace/trace_uprobe.c if (trace_uprobe_filter_remove(tu->tp.event->filter, event)) tp 1272 kernel/trace/trace_uprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 1273 kernel/trace/trace_uprobe.c tu = container_of(pos, struct trace_uprobe, tp); tp 1285 kernel/trace/trace_uprobe.c struct trace_probe *pos, *tp; tp 1289 kernel/trace/trace_uprobe.c tp = trace_probe_primary_from_call(call); tp 1290 kernel/trace/trace_uprobe.c if (WARN_ON_ONCE(!tp)) tp 1293 kernel/trace/trace_uprobe.c tu = container_of(tp, struct trace_uprobe, tp); tp 1294 kernel/trace/trace_uprobe.c if (trace_uprobe_filter_add(tu->tp.event->filter, event)) tp 1297 kernel/trace/trace_uprobe.c list_for_each_entry(pos, trace_probe_probe_list(tp), list) { tp 1316 kernel/trace/trace_uprobe.c filter = tu->tp.event->filter; tp 1329 kernel/trace/trace_uprobe.c struct trace_event_call *call = trace_probe_event_call(&tu->tp); tp 1341 kernel/trace/trace_uprobe.c size = esize + tu->tp.size + dsize; tp 1364 kernel/trace/trace_uprobe.c memcpy(data, ucb->buf, tu->tp.size + dsize); tp 1366 kernel/trace/trace_uprobe.c if (size - esize > tu->tp.size + dsize) { tp 1367 kernel/trace/trace_uprobe.c int len = tu->tp.size + dsize; tp 1475 kernel/trace/trace_uprobe.c dsize = __get_data_size(&tu->tp, regs); tp 1479 kernel/trace/trace_uprobe.c store_trace_args(ucb->buf, &tu->tp, regs, esize, dsize); tp 1481 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(&tu->tp, TP_FLAG_TRACE)) tp 1485 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(&tu->tp, TP_FLAG_PROFILE)) tp 1510 kernel/trace/trace_uprobe.c dsize = __get_data_size(&tu->tp, regs); tp 1514 kernel/trace/trace_uprobe.c store_trace_args(ucb->buf, &tu->tp, regs, esize, dsize); tp 1516 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(&tu->tp, TP_FLAG_TRACE)) tp 1520 kernel/trace/trace_uprobe.c if (trace_probe_test_flag(&tu->tp, TP_FLAG_PROFILE)) tp 1533 kernel/trace/trace_uprobe.c struct trace_event_call *call = trace_probe_event_call(&tu->tp); tp 1546 kernel/trace/trace_uprobe.c return trace_probe_register_event_call(&tu->tp); tp 1551 kernel/trace/trace_uprobe.c return trace_probe_unregister_event_call(&tu->tp); tp 1593 kernel/trace/trace_uprobe.c if (traceprobe_set_print_fmt(&tu->tp, is_ret_probe(tu)) < 0) { tp 1598 kernel/trace/trace_uprobe.c return trace_probe_event_call(&tu->tp); tp 227 kernel/tracepoint.c static int tracepoint_add_func(struct tracepoint *tp, tp 233 kernel/tracepoint.c if (tp->regfunc && !static_key_enabled(&tp->key)) { tp 234 kernel/tracepoint.c ret = tp->regfunc(); tp 239 kernel/tracepoint.c tp_funcs = rcu_dereference_protected(tp->funcs, tp 253 kernel/tracepoint.c rcu_assign_pointer(tp->funcs, tp_funcs); tp 254 kernel/tracepoint.c if (!static_key_enabled(&tp->key)) tp 255 kernel/tracepoint.c static_key_slow_inc(&tp->key); tp 266 kernel/tracepoint.c static int tracepoint_remove_func(struct tracepoint *tp, tp 271 kernel/tracepoint.c tp_funcs = rcu_dereference_protected(tp->funcs, tp 281 kernel/tracepoint.c if (tp->unregfunc && static_key_enabled(&tp->key)) tp 282 kernel/tracepoint.c tp->unregfunc(); tp 284 kernel/tracepoint.c if (static_key_enabled(&tp->key)) tp 285 kernel/tracepoint.c static_key_slow_dec(&tp->key); tp 287 kernel/tracepoint.c rcu_assign_pointer(tp->funcs, tp_funcs); tp 305 kernel/tracepoint.c int tracepoint_probe_register_prio(struct tracepoint *tp, void *probe, tp 315 kernel/tracepoint.c ret = tracepoint_add_func(tp, &tp_func, prio); tp 333 kernel/tracepoint.c int tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data) tp 335 kernel/tracepoint.c return tracepoint_probe_register_prio(tp, probe, data, TRACEPOINT_DEFAULT_PRIO); tp 347 kernel/tracepoint.c int tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data) tp 355 kernel/tracepoint.c ret = tracepoint_remove_func(tp, &tp_func); tp 363 kernel/tracepoint.c void (*fct)(struct tracepoint *tp, void *priv), tp 438 kernel/tracepoint.c static void tp_module_going_check_quiescent(struct tracepoint *tp, void *priv) tp 440 kernel/tracepoint.c WARN_ON_ONCE(tp->funcs); tp 550 kernel/tracepoint.c void for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv), tp 123 lib/mpi/mpi-internal.h mpi_ptr_t tp; tp 179 lib/mpi/mpi-pow.c mpi_ptr_t tp; tp 210 lib/mpi/mpi-pow.c tp = rp; tp 212 lib/mpi/mpi-pow.c xp = tp; tp 238 lib/mpi/mpi-pow.c tp = rp; tp 240 lib/mpi/mpi-pow.c xp = tp; tp 343 lib/mpi/mpih-mul.c if (!ctx->tp || ctx->tp_size < vsize) { tp 344 lib/mpi/mpih-mul.c if (ctx->tp) tp 345 lib/mpi/mpih-mul.c mpi_free_limb_space(ctx->tp); tp 346 lib/mpi/mpih-mul.c ctx->tp = mpi_alloc_limb_space(2 * vsize); tp 347 lib/mpi/mpih-mul.c if (!ctx->tp) { tp 357 lib/mpi/mpih-mul.c MPN_MUL_N_RECURSE(ctx->tp, up, vp, vsize, ctx->tspace); tp 358 lib/mpi/mpih-mul.c cy = mpihelp_add_n(prodp, prodp, ctx->tp, vsize); tp 359 lib/mpi/mpih-mul.c mpihelp_add_1(prodp + vsize, ctx->tp + vsize, vsize, tp 397 lib/mpi/mpih-mul.c if (ctx->tp) tp 398 lib/mpi/mpih-mul.c mpi_free_limb_space(ctx->tp); tp 403 lib/mpi/mpih-mul.c if (ctx->tp) tp 404 lib/mpi/mpih-mul.c mpi_free_limb_space(ctx->tp); tp 12 lib/test_bitfield.c #define CHECK_ENC_GET_U(tp, v, field, res) do { \ tp 14 lib/test_bitfield.c u##tp _res; \ tp 16 lib/test_bitfield.c _res = u##tp##_encode_bits(v, field); \ tp 18 lib/test_bitfield.c pr_warn("u" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != " #res "\n",\ tp 22 lib/test_bitfield.c if (u##tp##_get_bits(_res, field) != v) \ tp 27 lib/test_bitfield.c #define CHECK_ENC_GET_LE(tp, v, field, res) do { \ tp 29 lib/test_bitfield.c __le##tp _res; \ tp 31 lib/test_bitfield.c _res = le##tp##_encode_bits(v, field); \ tp 32 lib/test_bitfield.c if (_res != cpu_to_le##tp(res)) { \ tp 33 lib/test_bitfield.c pr_warn("le" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx\n",\ tp 34 lib/test_bitfield.c (u64)le##tp##_to_cpu(_res), \ tp 38 lib/test_bitfield.c if (le##tp##_get_bits(_res, field) != v) \ tp 43 lib/test_bitfield.c #define CHECK_ENC_GET_BE(tp, v, field, res) do { \ tp 45 lib/test_bitfield.c __be##tp _res; \ tp 47 lib/test_bitfield.c _res = be##tp##_encode_bits(v, field); \ tp 48 lib/test_bitfield.c if (_res != cpu_to_be##tp(res)) { \ tp 49 lib/test_bitfield.c pr_warn("be" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != 0x%llx\n",\ tp 50 lib/test_bitfield.c (u64)be##tp##_to_cpu(_res), \ tp 54 lib/test_bitfield.c if (be##tp##_get_bits(_res, field) != v) \ tp 59 lib/test_bitfield.c #define CHECK_ENC_GET(tp, v, field, res) do { \ tp 60 lib/test_bitfield.c CHECK_ENC_GET_U(tp, v, field, res); \ tp 61 lib/test_bitfield.c CHECK_ENC_GET_LE(tp, v, field, res); \ tp 62 lib/test_bitfield.c CHECK_ENC_GET_BE(tp, v, field, res); \ tp 102 lib/test_bitfield.c #define CHECK(tp, mask) do { \ tp 106 lib/test_bitfield.c if (tp##_encode_bits(v, mask) != v << __ffs64(mask)) \ tp 76 net/atm/atm_misc.c int atm_pcr_goal(const struct atm_trafprm *tp) tp 78 net/atm/atm_misc.c if (tp->pcr && tp->pcr != ATM_MAX_PCR) tp 79 net/atm/atm_misc.c return -tp->pcr; tp 80 net/atm/atm_misc.c if (tp->min_pcr && !tp->pcr) tp 81 net/atm/atm_misc.c return tp->min_pcr; tp 82 net/atm/atm_misc.c if (tp->max_pcr != ATM_MAX_PCR) tp 83 net/atm/atm_misc.c return -tp->max_pcr; tp 285 net/atm/common.c static int adjust_tp(struct atm_trafprm *tp, unsigned char aal) tp 289 net/atm/common.c if (!tp->traffic_class) tp 304 net/atm/common.c if (!tp->max_sdu) tp 305 net/atm/common.c tp->max_sdu = max_sdu; tp 306 net/atm/common.c else if (tp->max_sdu > max_sdu) tp 308 net/atm/common.c if (!tp->max_cdv) tp 309 net/atm/common.c tp->max_cdv = ATM_MAX_CDV; tp 710 net/atm/common.c static int check_tp(const struct atm_trafprm *tp) tp 713 net/atm/common.c if (!tp->traffic_class || tp->traffic_class == ATM_ANYCLASS) tp 715 net/atm/common.c if (tp->traffic_class != ATM_UBR && !tp->min_pcr && !tp->pcr && tp 716 net/atm/common.c !tp->max_pcr) tp 718 net/atm/common.c if (tp->min_pcr == ATM_MAX_PCR) tp 720 net/atm/common.c if (tp->min_pcr && tp->max_pcr && tp->max_pcr != ATM_MAX_PCR && tp 721 net/atm/common.c tp->min_pcr > tp->max_pcr) tp 169 net/ceph/auth_x.c void *tp, *tpend; tp 219 net/ceph/auth_x.c tp = *p + ceph_x_encrypt_offset(); tp 224 net/ceph/auth_x.c ptp = &tp; tp 225 net/ceph/auth_x.c tpend = tp + ret; tp 2853 net/core/ethtool.c struct flow_dissector_key_ports tp; tp 2943 net/core/ethtool.c match->key.tp.src = v4_spec->psrc; tp 2944 net/core/ethtool.c match->mask.tp.src = v4_m_spec->psrc; tp 2947 net/core/ethtool.c match->key.tp.dst = v4_spec->pdst; tp 2948 net/core/ethtool.c match->mask.tp.dst = v4_m_spec->pdst; tp 2955 net/core/ethtool.c offsetof(struct ethtool_rx_flow_key, tp); tp 2995 net/core/ethtool.c match->key.tp.src = v6_spec->psrc; tp 2996 net/core/ethtool.c match->mask.tp.src = v6_m_spec->psrc; tp 2999 net/core/ethtool.c match->key.tp.dst = v6_spec->pdst; tp 3000 net/core/ethtool.c match->mask.tp.dst = v6_m_spec->pdst; tp 3007 net/core/ethtool.c offsetof(struct ethtool_rx_flow_key, tp); tp 4349 net/core/filter.c struct tcp_sock *tp = tcp_sk(sk); tp 4358 net/core/filter.c if (val <= 0 || tp->data_segs_out > tp->syn_data) tp 4361 net/core/filter.c tp->snd_cwnd = val; tp 4367 net/core/filter.c tp->snd_cwnd_clamp = val; tp 4368 net/core/filter.c tp->snd_ssthresh = val; tp 4375 net/core/filter.c tp->save_syn = val; tp 4409 net/core/filter.c struct tcp_sock *tp; tp 4421 net/core/filter.c tp = tcp_sk(sk); tp 4423 net/core/filter.c if (optlen <= 0 || !tp->saved_syn || tp 4424 net/core/filter.c optlen > tp->saved_syn[0]) tp 4426 net/core/filter.c memcpy(optval, tp->saved_syn + 1, optlen); tp 368 net/core/flow_dissector.c struct flow_dissector_key_ports *tp; tp 370 net/core/flow_dissector.c tp = skb_flow_dissector_target(flow_dissector, tp 373 net/core/flow_dissector.c tp->src = key->tp_src; tp 374 net/core/flow_dissector.c tp->dst = key->tp_dst; tp 904 net/core/pktgen.c char *tp = strndup_user(user_buffer, copy); tp 906 net/core/pktgen.c if (IS_ERR(tp)) tp 907 net/core/pktgen.c return PTR_ERR(tp); tp 909 net/core/pktgen.c pr_debug("%s,%zu buffer -:%s:-\n", name, count, tp); tp 910 net/core/pktgen.c kfree(tp); tp 202 net/ipv4/fib_trie.c static inline void node_set_parent(struct key_vector *n, struct key_vector *tp) tp 205 net/ipv4/fib_trie.c rcu_assign_pointer(tn_info(n)->parent, tp); tp 470 net/ipv4/fib_trie.c static inline void put_child_root(struct key_vector *tp, t_key key, tp 473 net/ipv4/fib_trie.c if (IS_TRIE(tp)) tp 474 net/ipv4/fib_trie.c rcu_assign_pointer(tp->tnode[0], n); tp 476 net/ipv4/fib_trie.c put_child(tp, get_index(key, tp), n); tp 513 net/ipv4/fib_trie.c struct key_vector *tp = node_parent(oldtnode); tp 517 net/ipv4/fib_trie.c NODE_INIT_PARENT(tn, tp); tp 518 net/ipv4/fib_trie.c put_child_root(tp, tn->key, tn); tp 535 net/ipv4/fib_trie.c return tp; tp 692 net/ipv4/fib_trie.c struct key_vector *n, *tp; tp 700 net/ipv4/fib_trie.c tp = node_parent(oldtnode); tp 701 net/ipv4/fib_trie.c put_child_root(tp, oldtnode->key, n); tp 702 net/ipv4/fib_trie.c node_set_parent(n, tp); tp 707 net/ipv4/fib_trie.c return tp; tp 805 net/ipv4/fib_trie.c static inline bool should_inflate(struct key_vector *tp, struct key_vector *tn) tp 811 net/ipv4/fib_trie.c threshold *= IS_TRIE(tp) ? inflate_threshold_root : inflate_threshold; tp 820 net/ipv4/fib_trie.c static inline bool should_halve(struct key_vector *tp, struct key_vector *tn) tp 826 net/ipv4/fib_trie.c threshold *= IS_TRIE(tp) ? halve_threshold_root : halve_threshold; tp 854 net/ipv4/fib_trie.c struct key_vector *tp = node_parent(tn); tp 855 net/ipv4/fib_trie.c unsigned long cindex = get_index(tn->key, tp); tp 865 net/ipv4/fib_trie.c BUG_ON(tn != get_child(tp, cindex)); tp 870 net/ipv4/fib_trie.c while (should_inflate(tp, tn) && max_work) { tp 871 net/ipv4/fib_trie.c tp = inflate(t, tn); tp 872 net/ipv4/fib_trie.c if (!tp) { tp 880 net/ipv4/fib_trie.c tn = get_child(tp, cindex); tp 884 net/ipv4/fib_trie.c tp = node_parent(tn); tp 888 net/ipv4/fib_trie.c return tp; tp 893 net/ipv4/fib_trie.c while (should_halve(tp, tn) && max_work) { tp 894 net/ipv4/fib_trie.c tp = halve(t, tn); tp 895 net/ipv4/fib_trie.c if (!tp) { tp 903 net/ipv4/fib_trie.c tn = get_child(tp, cindex); tp 938 net/ipv4/fib_trie.c struct key_vector **tp, u32 key) tp 974 net/ipv4/fib_trie.c *tp = pn; tp 1014 net/ipv4/fib_trie.c static int fib_insert_node(struct trie *t, struct key_vector *tp, tp 1024 net/ipv4/fib_trie.c n = get_child(tp, get_index(key, tp)); tp 1040 net/ipv4/fib_trie.c NODE_INIT_PARENT(tn, tp); tp 1044 net/ipv4/fib_trie.c put_child_root(tp, key, tn); tp 1048 net/ipv4/fib_trie.c tp = tn; tp 1052 net/ipv4/fib_trie.c node_push_suffix(tp, new->fa_slen); tp 1053 net/ipv4/fib_trie.c NODE_INIT_PARENT(l, tp); tp 1054 net/ipv4/fib_trie.c put_child_root(tp, key, l); tp 1055 net/ipv4/fib_trie.c trie_rebalance(t, tp); tp 1067 net/ipv4/fib_trie.c static int fib_insert_alias(struct trie *t, struct key_vector *tp, tp 1072 net/ipv4/fib_trie.c return fib_insert_node(t, tp, new, key); tp 1097 net/ipv4/fib_trie.c node_push_suffix(tp, new->fa_slen); tp 1126 net/ipv4/fib_trie.c struct key_vector *l, *tp; tp 1148 net/ipv4/fib_trie.c l = fib_find_node(t, &tp, key); tp 1275 net/ipv4/fib_trie.c err = fib_insert_alias(t, tp, l, new_fa, fa, key); tp 1515 net/ipv4/fib_trie.c static void fib_remove_alias(struct trie *t, struct key_vector *tp, tp 1529 net/ipv4/fib_trie.c if (tp->slen == l->slen) tp 1530 net/ipv4/fib_trie.c node_pull_suffix(tp, tp->pos); tp 1531 net/ipv4/fib_trie.c put_child_root(tp, l->key, NULL); tp 1533 net/ipv4/fib_trie.c trie_rebalance(t, tp); tp 1543 net/ipv4/fib_trie.c node_pull_suffix(tp, fa->fa_slen); tp 1552 net/ipv4/fib_trie.c struct key_vector *l, *tp; tp 1563 net/ipv4/fib_trie.c l = fib_find_node(t, &tp, key); tp 1607 net/ipv4/fib_trie.c fib_remove_alias(t, tp, l, fa_to_delete); tp 1736 net/ipv4/fib_trie.c struct key_vector *l, *tp = ot->kv; tp 1751 net/ipv4/fib_trie.c while ((l = leaf_walk_rcu(&tp, key)) != NULL) { tp 2044 net/ipv4/fib_trie.c struct key_vector *l, *tp = t->kv; tp 2047 net/ipv4/fib_trie.c while ((l = leaf_walk_rcu(&tp, key)) != NULL) { tp 2171 net/ipv4/fib_trie.c struct key_vector *l, *tp = t->kv; tp 2184 net/ipv4/fib_trie.c while ((l = leaf_walk_rcu(&tp, key)) != NULL) { tp 2669 net/ipv4/fib_trie.c struct key_vector *l, **tp = &iter->tnode; tp 2682 net/ipv4/fib_trie.c while ((l = leaf_walk_rcu(tp, key)) && (pos-- > 0)) { tp 289 net/ipv4/syncookies.c struct tcp_sock *tp = tcp_sk(sk); tp 388 net/ipv4/syncookies.c req->rsk_window_clamp = tp->window_clamp ? :dst_metric(&rt->dst, RTAX_WINDOW); tp 390 net/ipv4/tcp.c static u64 tcp_compute_delivery_rate(const struct tcp_sock *tp) tp 392 net/ipv4/tcp.c u32 rate = READ_ONCE(tp->rate_delivered); tp 393 net/ipv4/tcp.c u32 intv = READ_ONCE(tp->rate_interval_us); tp 397 net/ipv4/tcp.c rate64 = (u64)rate * tp->mss_cache * USEC_PER_SEC; tp 411 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 413 net/ipv4/tcp.c tp->out_of_order_queue = RB_ROOT; tp 416 net/ipv4/tcp.c INIT_LIST_HEAD(&tp->tsq_node); tp 417 net/ipv4/tcp.c INIT_LIST_HEAD(&tp->tsorted_sent_queue); tp 420 net/ipv4/tcp.c tp->mdev_us = jiffies_to_usecs(TCP_TIMEOUT_INIT); tp 421 net/ipv4/tcp.c minmax_reset(&tp->rtt_min, tcp_jiffies32, ~0U); tp 428 net/ipv4/tcp.c tp->snd_cwnd = TCP_INIT_CWND; tp 431 net/ipv4/tcp.c tp->app_limited = ~0U; tp 436 net/ipv4/tcp.c tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp 437 net/ipv4/tcp.c tp->snd_cwnd_clamp = ~0; tp 438 net/ipv4/tcp.c tp->mss_cache = TCP_MSS_DEFAULT; tp 440 net/ipv4/tcp.c tp->reordering = sock_net(sk)->ipv4.sysctl_tcp_reordering; tp 443 net/ipv4/tcp.c tp->tsoffset = 0; tp 444 net/ipv4/tcp.c tp->rack.reo_wnd_steps = 1; tp 477 net/ipv4/tcp.c static inline bool tcp_stream_is_readable(const struct tcp_sock *tp, tp 480 net/ipv4/tcp.c int avail = READ_ONCE(tp->rcv_nxt) - READ_ONCE(tp->copied_seq); tp 504 net/ipv4/tcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 554 net/ipv4/tcp.c (state != TCP_SYN_RECV || rcu_access_pointer(tp->fastopen_rsk))) { tp 557 net/ipv4/tcp.c if (READ_ONCE(tp->urg_seq) == READ_ONCE(tp->copied_seq) && tp 559 net/ipv4/tcp.c tp->urg_data) tp 562 net/ipv4/tcp.c if (tcp_stream_is_readable(tp, target, sk)) tp 584 net/ipv4/tcp.c if (tp->urg_data & TCP_URG_VALID) tp 604 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 618 net/ipv4/tcp.c answ = tp->urg_data && tp 619 net/ipv4/tcp.c READ_ONCE(tp->urg_seq) == READ_ONCE(tp->copied_seq); tp 628 net/ipv4/tcp.c answ = READ_ONCE(tp->write_seq) - tp->snd_una; tp 637 net/ipv4/tcp.c answ = READ_ONCE(tp->write_seq) - tp 638 net/ipv4/tcp.c READ_ONCE(tp->snd_nxt); tp 648 net/ipv4/tcp.c static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb) tp 651 net/ipv4/tcp.c tp->pushed_seq = tp->write_seq; tp 654 net/ipv4/tcp.c static inline bool forced_push(const struct tcp_sock *tp) tp 656 net/ipv4/tcp.c return after(tp->write_seq, tp->pushed_seq + (tp->max_window >> 1)); tp 661 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 665 net/ipv4/tcp.c tcb->seq = tcb->end_seq = tp->write_seq; tp 672 net/ipv4/tcp.c if (tp->nonagle & TCP_NAGLE_PUSH) tp 673 net/ipv4/tcp.c tp->nonagle &= ~TCP_NAGLE_PUSH; tp 678 net/ipv4/tcp.c static inline void tcp_mark_urg(struct tcp_sock *tp, int flags) tp 681 net/ipv4/tcp.c tp->snd_up = tp->write_seq; tp 706 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 712 net/ipv4/tcp.c if (!(flags & MSG_MORE) || forced_push(tp)) tp 713 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 715 net/ipv4/tcp.c tcp_mark_urg(tp, flags); tp 916 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 924 net/ipv4/tcp.c new_size_goal = tcp_bound_to_half_wnd(tp, new_size_goal); tp 927 net/ipv4/tcp.c size_goal = tp->gso_segs * mss_now; tp 930 net/ipv4/tcp.c tp->gso_segs = min_t(u16, new_size_goal / mss_now, tp 932 net/ipv4/tcp.c size_goal = tp->gso_segs * mss_now; tp 967 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1026 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 1048 net/ipv4/tcp.c WRITE_ONCE(tp->write_seq, tp->write_seq + copy); tp 1064 net/ipv4/tcp.c if (forced_push(tp)) { tp 1065 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 1088 net/ipv4/tcp.c tcp_push(sk, flags, mss_now, tp->nonagle, size_goal); tp 1131 net/ipv4/tcp.c void tcp_free_fastopen_req(struct tcp_sock *tp) tp 1133 net/ipv4/tcp.c if (tp->fastopen_req) { tp 1134 net/ipv4/tcp.c kfree(tp->fastopen_req); tp 1135 net/ipv4/tcp.c tp->fastopen_req = NULL; tp 1143 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1152 net/ipv4/tcp.c if (tp->fastopen_req) tp 1155 net/ipv4/tcp.c tp->fastopen_req = kzalloc(sizeof(struct tcp_fastopen_request), tp 1157 net/ipv4/tcp.c if (unlikely(!tp->fastopen_req)) tp 1159 net/ipv4/tcp.c tp->fastopen_req->data = msg; tp 1160 net/ipv4/tcp.c tp->fastopen_req->size = size; tp 1161 net/ipv4/tcp.c tp->fastopen_req->uarg = uarg; tp 1178 net/ipv4/tcp.c if (tp->fastopen_req) { tp 1179 net/ipv4/tcp.c *copied = tp->fastopen_req->copied; tp 1180 net/ipv4/tcp.c tcp_free_fastopen_req(tp); tp 1188 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1214 net/ipv4/tcp.c !tp->repair) { tp 1237 net/ipv4/tcp.c if (unlikely(tp->repair)) { tp 1238 net/ipv4/tcp.c if (tp->repair_queue == TCP_RECV_QUEUE) { tp 1244 net/ipv4/tcp.c if (tp->repair_queue == TCP_NO_QUEUE) tp 1307 net/ipv4/tcp.c if (tp->repair) tp 1333 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 1363 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 1374 net/ipv4/tcp.c WRITE_ONCE(tp->write_seq, tp->write_seq + copy); tp 1385 net/ipv4/tcp.c if (skb->len < size_goal || (flags & MSG_OOB) || unlikely(tp->repair)) tp 1388 net/ipv4/tcp.c if (forced_push(tp)) { tp 1389 net/ipv4/tcp.c tcp_mark_push(tp, skb); tp 1412 net/ipv4/tcp.c tcp_push(sk, flags, mss_now, tp->nonagle, size_goal); tp 1456 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1459 net/ipv4/tcp.c if (sock_flag(sk, SOCK_URGINLINE) || !tp->urg_data || tp 1460 net/ipv4/tcp.c tp->urg_data == TCP_URG_READ) tp 1466 net/ipv4/tcp.c if (tp->urg_data & TCP_URG_VALID) { tp 1468 net/ipv4/tcp.c char c = tp->urg_data; tp 1471 net/ipv4/tcp.c tp->urg_data = TCP_URG_READ; tp 1531 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1536 net/ipv4/tcp.c WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq), tp 1538 net/ipv4/tcp.c tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt); tp 1546 net/ipv4/tcp.c tp->rcv_nxt - tp->rcv_wup > icsk->icsk_ack.rcv_mss || tp 1568 net/ipv4/tcp.c __u32 rcv_window_now = tcp_receive_window(tp); tp 1571 net/ipv4/tcp.c if (2*rcv_window_now <= tp->window_clamp) { tp 1626 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1627 net/ipv4/tcp.c u32 seq = tp->copied_seq; tp 1640 net/ipv4/tcp.c if (tp->urg_data) { tp 1641 net/ipv4/tcp.c u32 urg_offset = tp->urg_seq - seq; tp 1679 net/ipv4/tcp.c WRITE_ONCE(tp->copied_seq, seq); tp 1681 net/ipv4/tcp.c WRITE_ONCE(tp->copied_seq, seq); tp 1754 net/ipv4/tcp.c struct tcp_sock *tp; tp 1775 net/ipv4/tcp.c tp = tcp_sk(sk); tp 1776 net/ipv4/tcp.c seq = tp->copied_seq; tp 1831 net/ipv4/tcp.c WRITE_ONCE(tp->copied_seq, seq); tp 1927 net/ipv4/tcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 1928 net/ipv4/tcp.c u32 copied_seq = READ_ONCE(tp->copied_seq); tp 1929 net/ipv4/tcp.c u32 rcv_nxt = READ_ONCE(tp->rcv_nxt); tp 1933 net/ipv4/tcp.c if (unlikely(inq < 0 || copied_seq != READ_ONCE(tp->copied_seq))) { tp 1935 net/ipv4/tcp.c inq = tp->rcv_nxt - tp->copied_seq; tp 1957 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 1983 net/ipv4/tcp.c cmsg_flags = tp->recvmsg_inq ? 1 : 0; tp 1990 net/ipv4/tcp.c if (unlikely(tp->repair)) { tp 1995 net/ipv4/tcp.c if (tp->repair_queue == TCP_SEND_QUEUE) tp 1999 net/ipv4/tcp.c if (tp->repair_queue == TCP_NO_QUEUE) tp 2005 net/ipv4/tcp.c seq = &tp->copied_seq; tp 2007 net/ipv4/tcp.c peek_seq = tp->copied_seq; tp 2017 net/ipv4/tcp.c if (tp->urg_data && tp->urg_seq == *seq) { tp 2036 net/ipv4/tcp.c *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, tp 2051 net/ipv4/tcp.c *seq, TCP_SKB_CB(skb)->seq, tp->rcv_nxt, flags); tp 2108 net/ipv4/tcp.c (peek_seq - copied - urg_hole != tp->copied_seq)) { tp 2112 net/ipv4/tcp.c peek_seq = tp->copied_seq; tp 2123 net/ipv4/tcp.c if (tp->urg_data) { tp 2124 net/ipv4/tcp.c u32 urg_offset = tp->urg_seq - *seq; tp 2157 net/ipv4/tcp.c if (tp->urg_data && after(tp->copied_seq, tp->urg_seq)) { tp 2158 net/ipv4/tcp.c tp->urg_data = 0; tp 2467 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 2468 net/ipv4/tcp.c if (tp->linger2 < 0) { tp 2573 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 2583 net/ipv4/tcp.c } else if (unlikely(tp->repair)) { tp 2586 net/ipv4/tcp.c (tp->snd_nxt != tp->write_seq && tp 2602 net/ipv4/tcp.c WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp 2603 net/ipv4/tcp.c tp->urg_data = 0; tp 2606 net/ipv4/tcp.c skb_rbtree_purge(&tp->out_of_order_queue); tp 2615 net/ipv4/tcp.c tp->srtt_us = 0; tp 2616 net/ipv4/tcp.c tp->mdev_us = jiffies_to_usecs(TCP_TIMEOUT_INIT); tp 2617 net/ipv4/tcp.c tp->rcv_rtt_last_tsecr = 0; tp 2619 net/ipv4/tcp.c seq = tp->write_seq + tp->max_window + 2; tp 2622 net/ipv4/tcp.c WRITE_ONCE(tp->write_seq, seq); tp 2625 net/ipv4/tcp.c tp->snd_cwnd = 2; tp 2628 net/ipv4/tcp.c tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp 2629 net/ipv4/tcp.c tp->snd_cwnd = TCP_INIT_CWND; tp 2630 net/ipv4/tcp.c tp->snd_cwnd_cnt = 0; tp 2631 net/ipv4/tcp.c tp->window_clamp = 0; tp 2632 net/ipv4/tcp.c tp->delivered = 0; tp 2633 net/ipv4/tcp.c tp->delivered_ce = 0; tp 2635 net/ipv4/tcp.c tp->is_sack_reneg = 0; tp 2636 net/ipv4/tcp.c tcp_clear_retrans(tp); tp 2637 net/ipv4/tcp.c tp->total_retrans = 0; tp 2643 net/ipv4/tcp.c memset(&tp->rx_opt, 0, sizeof(tp->rx_opt)); tp 2647 net/ipv4/tcp.c tcp_saved_syn_free(tp); tp 2648 net/ipv4/tcp.c tp->compressed_ack = 0; tp 2649 net/ipv4/tcp.c tp->segs_in = 0; tp 2650 net/ipv4/tcp.c tp->segs_out = 0; tp 2651 net/ipv4/tcp.c tp->bytes_sent = 0; tp 2652 net/ipv4/tcp.c tp->bytes_acked = 0; tp 2653 net/ipv4/tcp.c tp->bytes_received = 0; tp 2654 net/ipv4/tcp.c tp->bytes_retrans = 0; tp 2655 net/ipv4/tcp.c tp->data_segs_in = 0; tp 2656 net/ipv4/tcp.c tp->data_segs_out = 0; tp 2657 net/ipv4/tcp.c tp->duplicate_sack[0].start_seq = 0; tp 2658 net/ipv4/tcp.c tp->duplicate_sack[0].end_seq = 0; tp 2659 net/ipv4/tcp.c tp->dsack_dups = 0; tp 2660 net/ipv4/tcp.c tp->reord_seen = 0; tp 2661 net/ipv4/tcp.c tp->retrans_out = 0; tp 2662 net/ipv4/tcp.c tp->sacked_out = 0; tp 2663 net/ipv4/tcp.c tp->tlp_high_seq = 0; tp 2664 net/ipv4/tcp.c tp->last_oow_ack_time = 0; tp 2666 net/ipv4/tcp.c tp->app_limited = ~0U; tp 2667 net/ipv4/tcp.c tp->rack.mstamp = 0; tp 2668 net/ipv4/tcp.c tp->rack.advanced = 0; tp 2669 net/ipv4/tcp.c tp->rack.reo_wnd_steps = 1; tp 2670 net/ipv4/tcp.c tp->rack.last_delivered = 0; tp 2671 net/ipv4/tcp.c tp->rack.reo_wnd_persist = 0; tp 2672 net/ipv4/tcp.c tp->rack.dsack_seen = 0; tp 2673 net/ipv4/tcp.c tp->syn_data_acked = 0; tp 2674 net/ipv4/tcp.c tp->rx_opt.saw_tstamp = 0; tp 2675 net/ipv4/tcp.c tp->rx_opt.dsack = 0; tp 2676 net/ipv4/tcp.c tp->rx_opt.num_sacks = 0; tp 2677 net/ipv4/tcp.c tp->rcv_ooopack = 0; tp 2681 net/ipv4/tcp.c tcp_free_fastopen_req(tp); tp 2703 net/ipv4/tcp.c static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int len) tp 2707 net/ipv4/tcp.c if (!tp->repair) tp 2719 net/ipv4/tcp.c if (after(opt.snd_wl1, tp->rcv_nxt + opt.rcv_wnd)) tp 2722 net/ipv4/tcp.c if (after(opt.rcv_wup, tp->rcv_nxt)) tp 2725 net/ipv4/tcp.c tp->snd_wl1 = opt.snd_wl1; tp 2726 net/ipv4/tcp.c tp->snd_wnd = opt.snd_wnd; tp 2727 net/ipv4/tcp.c tp->max_window = opt.max_window; tp 2729 net/ipv4/tcp.c tp->rcv_wnd = opt.rcv_wnd; tp 2730 net/ipv4/tcp.c tp->rcv_wup = opt.rcv_wup; tp 2738 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 2750 net/ipv4/tcp.c tp->rx_opt.mss_clamp = opt.opt_val; tp 2761 net/ipv4/tcp.c tp->rx_opt.snd_wscale = snd_wscale; tp 2762 net/ipv4/tcp.c tp->rx_opt.rcv_wscale = rcv_wscale; tp 2763 net/ipv4/tcp.c tp->rx_opt.wscale_ok = 1; tp 2770 net/ipv4/tcp.c tp->rx_opt.sack_ok |= TCP_SACK_SEEN; tp 2776 net/ipv4/tcp.c tp->rx_opt.tstamp_ok = 1; tp 2805 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 2892 net/ipv4/tcp.c tp->rx_opt.user_mss = val; tp 2905 net/ipv4/tcp.c tp->nonagle |= TCP_NAGLE_OFF|TCP_NAGLE_PUSH; tp 2908 net/ipv4/tcp.c tp->nonagle &= ~TCP_NAGLE_OFF; tp 2916 net/ipv4/tcp.c tp->thin_lto = val; tp 2928 net/ipv4/tcp.c tp->repair = 1; tp 2930 net/ipv4/tcp.c tp->repair_queue = TCP_NO_QUEUE; tp 2932 net/ipv4/tcp.c tp->repair = 0; tp 2936 net/ipv4/tcp.c tp->repair = 0; tp 2944 net/ipv4/tcp.c if (!tp->repair) tp 2947 net/ipv4/tcp.c tp->repair_queue = val; tp 2955 net/ipv4/tcp.c else if (tp->repair_queue == TCP_SEND_QUEUE) tp 2956 net/ipv4/tcp.c WRITE_ONCE(tp->write_seq, val); tp 2957 net/ipv4/tcp.c else if (tp->repair_queue == TCP_RECV_QUEUE) { tp 2958 net/ipv4/tcp.c WRITE_ONCE(tp->rcv_nxt, val); tp 2959 net/ipv4/tcp.c WRITE_ONCE(tp->copied_seq, val); tp 2966 net/ipv4/tcp.c if (!tp->repair) tp 2989 net/ipv4/tcp.c tp->nonagle |= TCP_NAGLE_CORK; tp 2991 net/ipv4/tcp.c tp->nonagle &= ~TCP_NAGLE_CORK; tp 2992 net/ipv4/tcp.c if (tp->nonagle&TCP_NAGLE_OFF) tp 2993 net/ipv4/tcp.c tp->nonagle |= TCP_NAGLE_PUSH; tp 3002 net/ipv4/tcp.c tp->keepalive_time = val * HZ; tp 3006 net/ipv4/tcp.c u32 elapsed = keepalive_time_elapsed(tp); tp 3007 net/ipv4/tcp.c if (tp->keepalive_time > elapsed) tp 3008 net/ipv4/tcp.c elapsed = tp->keepalive_time - elapsed; tp 3019 net/ipv4/tcp.c tp->keepalive_intvl = val * HZ; tp 3025 net/ipv4/tcp.c tp->keepalive_probes = val; tp 3038 net/ipv4/tcp.c tp->save_syn = val; tp 3043 net/ipv4/tcp.c tp->linger2 = -1; tp 3045 net/ipv4/tcp.c tp->linger2 = 0; tp 3047 net/ipv4/tcp.c tp->linger2 = val * HZ; tp 3063 net/ipv4/tcp.c tp->window_clamp = 0; tp 3065 net/ipv4/tcp.c tp->window_clamp = val < SOCK_MIN_RCVBUF / 2 ? tp 3089 net/ipv4/tcp.c err = tp->af_specific->md5_parse(sk, optname, optval, optlen); tp 3119 net/ipv4/tcp.c tp->fastopen_connect = val; tp 3132 net/ipv4/tcp.c tp->fastopen_no_cookie = val; tp 3135 net/ipv4/tcp.c if (!tp->repair) tp 3138 net/ipv4/tcp.c tp->tsoffset = val - tcp_time_stamp_raw(); tp 3141 net/ipv4/tcp.c err = tcp_repair_set_window(tp, optval, optlen); tp 3144 net/ipv4/tcp.c tp->notsent_lowat = val; tp 3151 net/ipv4/tcp.c tp->recvmsg_inq = val; tp 3156 net/ipv4/tcp.c tp->tcp_tx_delay = val; tp 3191 net/ipv4/tcp.c static void tcp_get_info_chrono_stats(const struct tcp_sock *tp, tp 3198 net/ipv4/tcp.c stats[i] = tp->chrono_stat[i - 1]; tp 3199 net/ipv4/tcp.c if (i == tp->chrono_type) tp 3200 net/ipv4/tcp.c stats[i] += tcp_jiffies32 - tp->chrono_start; tp 3213 net/ipv4/tcp.c const struct tcp_sock *tp = tcp_sk(sk); /* iff sk_type == SOCK_STREAM */ tp 3235 net/ipv4/tcp.c info->tcpi_reordering = tp->reordering; tp 3236 net/ipv4/tcp.c info->tcpi_snd_cwnd = tp->snd_cwnd; tp 3255 net/ipv4/tcp.c if (tp->rx_opt.tstamp_ok) tp 3257 net/ipv4/tcp.c if (tcp_is_sack(tp)) tp 3259 net/ipv4/tcp.c if (tp->rx_opt.wscale_ok) { tp 3261 net/ipv4/tcp.c info->tcpi_snd_wscale = tp->rx_opt.snd_wscale; tp 3262 net/ipv4/tcp.c info->tcpi_rcv_wscale = tp->rx_opt.rcv_wscale; tp 3265 net/ipv4/tcp.c if (tp->ecn_flags & TCP_ECN_OK) tp 3267 net/ipv4/tcp.c if (tp->ecn_flags & TCP_ECN_SEEN) tp 3269 net/ipv4/tcp.c if (tp->syn_data_acked) tp 3274 net/ipv4/tcp.c info->tcpi_snd_mss = tp->mss_cache; tp 3277 net/ipv4/tcp.c info->tcpi_unacked = tp->packets_out; tp 3278 net/ipv4/tcp.c info->tcpi_sacked = tp->sacked_out; tp 3280 net/ipv4/tcp.c info->tcpi_lost = tp->lost_out; tp 3281 net/ipv4/tcp.c info->tcpi_retrans = tp->retrans_out; tp 3284 net/ipv4/tcp.c info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime); tp 3286 net/ipv4/tcp.c info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); tp 3289 net/ipv4/tcp.c info->tcpi_rcv_ssthresh = tp->rcv_ssthresh; tp 3290 net/ipv4/tcp.c info->tcpi_rtt = tp->srtt_us >> 3; tp 3291 net/ipv4/tcp.c info->tcpi_rttvar = tp->mdev_us >> 2; tp 3292 net/ipv4/tcp.c info->tcpi_snd_ssthresh = tp->snd_ssthresh; tp 3293 net/ipv4/tcp.c info->tcpi_advmss = tp->advmss; tp 3295 net/ipv4/tcp.c info->tcpi_rcv_rtt = tp->rcv_rtt_est.rtt_us >> 3; tp 3296 net/ipv4/tcp.c info->tcpi_rcv_space = tp->rcvq_space.space; tp 3298 net/ipv4/tcp.c info->tcpi_total_retrans = tp->total_retrans; tp 3300 net/ipv4/tcp.c info->tcpi_bytes_acked = tp->bytes_acked; tp 3301 net/ipv4/tcp.c info->tcpi_bytes_received = tp->bytes_received; tp 3302 net/ipv4/tcp.c info->tcpi_notsent_bytes = max_t(int, 0, tp->write_seq - tp->snd_nxt); tp 3303 net/ipv4/tcp.c tcp_get_info_chrono_stats(tp, info); tp 3305 net/ipv4/tcp.c info->tcpi_segs_out = tp->segs_out; tp 3306 net/ipv4/tcp.c info->tcpi_segs_in = tp->segs_in; tp 3308 net/ipv4/tcp.c info->tcpi_min_rtt = tcp_min_rtt(tp); tp 3309 net/ipv4/tcp.c info->tcpi_data_segs_in = tp->data_segs_in; tp 3310 net/ipv4/tcp.c info->tcpi_data_segs_out = tp->data_segs_out; tp 3312 net/ipv4/tcp.c info->tcpi_delivery_rate_app_limited = tp->rate_app_limited ? 1 : 0; tp 3313 net/ipv4/tcp.c rate64 = tcp_compute_delivery_rate(tp); tp 3316 net/ipv4/tcp.c info->tcpi_delivered = tp->delivered; tp 3317 net/ipv4/tcp.c info->tcpi_delivered_ce = tp->delivered_ce; tp 3318 net/ipv4/tcp.c info->tcpi_bytes_sent = tp->bytes_sent; tp 3319 net/ipv4/tcp.c info->tcpi_bytes_retrans = tp->bytes_retrans; tp 3320 net/ipv4/tcp.c info->tcpi_dsack_dups = tp->dsack_dups; tp 3321 net/ipv4/tcp.c info->tcpi_reord_seen = tp->reord_seen; tp 3322 net/ipv4/tcp.c info->tcpi_rcv_ooopack = tp->rcv_ooopack; tp 3323 net/ipv4/tcp.c info->tcpi_snd_wnd = tp->snd_wnd; tp 3358 net/ipv4/tcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 3368 net/ipv4/tcp.c tcp_get_info_chrono_stats(tp, &info); tp 3376 net/ipv4/tcp.c tp->data_segs_out, TCP_NLA_PAD); tp 3378 net/ipv4/tcp.c tp->total_retrans, TCP_NLA_PAD); tp 3384 net/ipv4/tcp.c rate64 = tcp_compute_delivery_rate(tp); tp 3387 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_SND_CWND, tp->snd_cwnd); tp 3388 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_REORDERING, tp->reordering); tp 3389 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_MIN_RTT, tcp_min_rtt(tp)); tp 3392 net/ipv4/tcp.c nla_put_u8(stats, TCP_NLA_DELIVERY_RATE_APP_LMT, !!tp->rate_app_limited); tp 3393 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_SND_SSTHRESH, tp->snd_ssthresh); tp 3394 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_DELIVERED, tp->delivered); tp 3395 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_DELIVERED_CE, tp->delivered_ce); tp 3397 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_SNDQ_SIZE, tp->write_seq - tp->snd_una); tp 3400 net/ipv4/tcp.c nla_put_u64_64bit(stats, TCP_NLA_BYTES_SENT, tp->bytes_sent, tp 3402 net/ipv4/tcp.c nla_put_u64_64bit(stats, TCP_NLA_BYTES_RETRANS, tp->bytes_retrans, tp 3404 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_DSACK_DUPS, tp->dsack_dups); tp 3405 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_REORD_SEEN, tp->reord_seen); tp 3406 net/ipv4/tcp.c nla_put_u32(stats, TCP_NLA_SRTT, tp->srtt_us >> 3); tp 3415 net/ipv4/tcp.c struct tcp_sock *tp = tcp_sk(sk); tp 3429 net/ipv4/tcp.c val = tp->mss_cache; tp 3431 net/ipv4/tcp.c val = tp->rx_opt.user_mss; tp 3432 net/ipv4/tcp.c if (tp->repair) tp 3433 net/ipv4/tcp.c val = tp->rx_opt.mss_clamp; tp 3436 net/ipv4/tcp.c val = !!(tp->nonagle&TCP_NAGLE_OFF); tp 3439 net/ipv4/tcp.c val = !!(tp->nonagle&TCP_NAGLE_CORK); tp 3442 net/ipv4/tcp.c val = keepalive_time_when(tp) / HZ; tp 3445 net/ipv4/tcp.c val = keepalive_intvl_when(tp) / HZ; tp 3448 net/ipv4/tcp.c val = keepalive_probes(tp); tp 3454 net/ipv4/tcp.c val = tp->linger2; tp 3463 net/ipv4/tcp.c val = tp->window_clamp; tp 3554 net/ipv4/tcp.c val = tp->thin_lto; tp 3562 net/ipv4/tcp.c val = tp->repair; tp 3566 net/ipv4/tcp.c if (tp->repair) tp 3567 net/ipv4/tcp.c val = tp->repair_queue; tp 3581 net/ipv4/tcp.c if (!tp->repair) tp 3584 net/ipv4/tcp.c opt.snd_wl1 = tp->snd_wl1; tp 3585 net/ipv4/tcp.c opt.snd_wnd = tp->snd_wnd; tp 3586 net/ipv4/tcp.c opt.max_window = tp->max_window; tp 3587 net/ipv4/tcp.c opt.rcv_wnd = tp->rcv_wnd; tp 3588 net/ipv4/tcp.c opt.rcv_wup = tp->rcv_wup; tp 3595 net/ipv4/tcp.c if (tp->repair_queue == TCP_SEND_QUEUE) tp 3596 net/ipv4/tcp.c val = tp->write_seq; tp 3597 net/ipv4/tcp.c else if (tp->repair_queue == TCP_RECV_QUEUE) tp 3598 net/ipv4/tcp.c val = tp->rcv_nxt; tp 3612 net/ipv4/tcp.c val = tp->fastopen_connect; tp 3616 net/ipv4/tcp.c val = tp->fastopen_no_cookie; tp 3620 net/ipv4/tcp.c val = tp->tcp_tx_delay; tp 3624 net/ipv4/tcp.c val = tcp_time_stamp_raw() + tp->tsoffset; tp 3627 net/ipv4/tcp.c val = tp->notsent_lowat; tp 3630 net/ipv4/tcp.c val = tp->recvmsg_inq; tp 3633 net/ipv4/tcp.c val = tp->save_syn; tp 3640 net/ipv4/tcp.c if (tp->saved_syn) { tp 3641 net/ipv4/tcp.c if (len < tp->saved_syn[0]) { tp 3642 net/ipv4/tcp.c if (put_user(tp->saved_syn[0], optlen)) { tp 3649 net/ipv4/tcp.c len = tp->saved_syn[0]; tp 3654 net/ipv4/tcp.c if (copy_to_user(optval, tp->saved_syn + 1, len)) { tp 3658 net/ipv4/tcp.c tcp_saved_syn_free(tp); tp 3810 net/ipv4/tcp.c const struct tcphdr *tp = tcp_hdr(skb); tp 3820 net/ipv4/tcp.c sg_set_buf(&sg, ((u8 *) tp) + header_len, head_data_len); tp 266 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 271 net/ipv4/tcp_bbr.c if (tp->srtt_us) { /* any RTT sample yet? */ tp 272 net/ipv4/tcp_bbr.c rtt_us = max(tp->srtt_us >> 3, 1U); tp 277 net/ipv4/tcp_bbr.c bw = (u64)tp->snd_cwnd * BW_UNIT; tp 285 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 289 net/ipv4/tcp_bbr.c if (unlikely(!bbr->has_seen_rtt && tp->srtt_us)) tp 303 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 312 net/ipv4/tcp_bbr.c segs = max_t(u32, bytes / tp->mss_cache, bbr_min_tso_segs(sk)); tp 320 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 324 net/ipv4/tcp_bbr.c bbr->prior_cwnd = tp->snd_cwnd; /* this cwnd is good enough */ tp 326 net/ipv4/tcp_bbr.c bbr->prior_cwnd = max(bbr->prior_cwnd, tp->snd_cwnd); tp 331 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 334 net/ipv4/tcp_bbr.c if (event == CA_EVENT_TX_START && tp->app_limited) { tp 336 net/ipv4/tcp_bbr.c bbr->ack_epoch_mstamp = tp->tcp_mstamp; tp 436 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 441 net/ipv4/tcp_bbr.c now_ns = tp->tcp_clock_cache; tp 442 net/ipv4/tcp_bbr.c edt_ns = max(tp->tcp_wstamp_ns, now_ns); tp 480 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 483 net/ipv4/tcp_bbr.c u32 cwnd = tp->snd_cwnd; tp 495 net/ipv4/tcp_bbr.c bbr->next_rtt_delivered = tp->delivered; /* start round now */ tp 497 net/ipv4/tcp_bbr.c cwnd = tcp_packets_in_flight(tp) + acked; tp 506 net/ipv4/tcp_bbr.c *new_cwnd = max(cwnd, tcp_packets_in_flight(tp) + acked); tp 519 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 521 net/ipv4/tcp_bbr.c u32 cwnd = tp->snd_cwnd, target_cwnd = 0; tp 540 net/ipv4/tcp_bbr.c else if (cwnd < target_cwnd || tp->delivered < TCP_INIT_CWND) tp 545 net/ipv4/tcp_bbr.c tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); /* apply global cap */ tp 547 net/ipv4/tcp_bbr.c tp->snd_cwnd = min(tp->snd_cwnd, bbr_cwnd_min_target); tp 554 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 557 net/ipv4/tcp_bbr.c tcp_stamp_us_delta(tp->delivered_mstamp, bbr->cycle_mstamp) > tp 590 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 594 net/ipv4/tcp_bbr.c bbr->cycle_mstamp = tp->delivered_mstamp; tp 634 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 637 net/ipv4/tcp_bbr.c bbr->lt_last_stamp = div_u64(tp->delivered_mstamp, USEC_PER_MSEC); tp 638 net/ipv4/tcp_bbr.c bbr->lt_last_delivered = tp->delivered; tp 639 net/ipv4/tcp_bbr.c bbr->lt_last_lost = tp->lost; tp 687 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 736 net/ipv4/tcp_bbr.c lost = tp->lost - bbr->lt_last_lost; tp 737 net/ipv4/tcp_bbr.c delivered = tp->delivered - bbr->lt_last_delivered; tp 743 net/ipv4/tcp_bbr.c t = div_u64(tp->delivered_mstamp, USEC_PER_MSEC) - bbr->lt_last_stamp; tp 760 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 770 net/ipv4/tcp_bbr.c bbr->next_rtt_delivered = tp->delivered; tp 819 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 837 net/ipv4/tcp_bbr.c epoch_us = tcp_stamp_us_delta(tp->delivered_mstamp, tp 849 net/ipv4/tcp_bbr.c bbr->ack_epoch_mstamp = tp->delivered_mstamp; tp 857 net/ipv4/tcp_bbr.c extra_acked = min(extra_acked, tp->snd_cwnd); tp 907 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 915 net/ipv4/tcp_bbr.c tp->snd_cwnd = max(tp->snd_cwnd, bbr->prior_cwnd); tp 940 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 963 net/ipv4/tcp_bbr.c tp->app_limited = tp 964 net/ipv4/tcp_bbr.c (tp->delivered + tcp_packets_in_flight(tp)) ? : 1; tp 967 net/ipv4/tcp_bbr.c tcp_packets_in_flight(tp) <= bbr_cwnd_min_target) { tp 971 net/ipv4/tcp_bbr.c bbr->next_rtt_delivered = tp->delivered; tp 1038 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 1042 net/ipv4/tcp_bbr.c tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp 1050 net/ipv4/tcp_bbr.c bbr->min_rtt_us = tcp_min_rtt(tp); tp 1068 net/ipv4/tcp_bbr.c bbr->ack_epoch_mstamp = tp->tcp_mstamp; tp 1109 net/ipv4/tcp_bbr.c struct tcp_sock *tp = tcp_sk(sk); tp 1113 net/ipv4/tcp_bbr.c bw = bw * tp->mss_cache * USEC_PER_SEC >> BW_SCALE; tp 142 net/ipv4/tcp_bic.c struct tcp_sock *tp = tcp_sk(sk); tp 148 net/ipv4/tcp_bic.c if (tcp_in_slow_start(tp)) tp 149 net/ipv4/tcp_bic.c tcp_slow_start(tp, acked); tp 151 net/ipv4/tcp_bic.c bictcp_update(ca, tp->snd_cwnd); tp 152 net/ipv4/tcp_bic.c tcp_cong_avoid_ai(tp, ca->cnt, 1); tp 162 net/ipv4/tcp_bic.c const struct tcp_sock *tp = tcp_sk(sk); tp 168 net/ipv4/tcp_bic.c if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) tp 169 net/ipv4/tcp_bic.c ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) tp 172 net/ipv4/tcp_bic.c ca->last_max_cwnd = tp->snd_cwnd; tp 174 net/ipv4/tcp_bic.c if (tp->snd_cwnd <= low_window) tp 175 net/ipv4/tcp_bic.c return max(tp->snd_cwnd >> 1U, 2U); tp 177 net/ipv4/tcp_bic.c return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); tp 143 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 150 net/ipv4/tcp_cdg.c u32 now_us = tp->tcp_mstamp; tp 164 net/ipv4/tcp_cdg.c tp->snd_cwnd); tp 165 net/ipv4/tcp_cdg.c tp->snd_ssthresh = tp->snd_cwnd; tp 183 net/ipv4/tcp_cdg.c tp->snd_cwnd); tp 184 net/ipv4/tcp_cdg.c tp->snd_ssthresh = tp->snd_cwnd; tp 244 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 255 net/ipv4/tcp_cdg.c ca->shadow_wnd = max(ca->shadow_wnd, tp->snd_cwnd); tp 265 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 269 net/ipv4/tcp_cdg.c if (tcp_in_slow_start(tp) && hystart_detect) tp 277 net/ipv4/tcp_cdg.c ca->rtt_seq = tp->snd_nxt; tp 288 net/ipv4/tcp_cdg.c ca->shadow_wnd = min(ca->shadow_wnd, tp->snd_cwnd); tp 292 net/ipv4/tcp_cdg.c prior_snd_cwnd = tp->snd_cwnd; tp 295 net/ipv4/tcp_cdg.c incr = tp->snd_cwnd - prior_snd_cwnd; tp 302 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 311 net/ipv4/tcp_cdg.c if (tp->sacked_out == 0) { tp 331 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 334 net/ipv4/tcp_cdg.c return max(2U, (tp->snd_cwnd * min(1024U, backoff_beta)) >> 10); tp 337 net/ipv4/tcp_cdg.c return tp->snd_cwnd; tp 339 net/ipv4/tcp_cdg.c ca->shadow_wnd = min(ca->shadow_wnd >> 1, tp->snd_cwnd); tp 341 net/ipv4/tcp_cdg.c return max3(2U, ca->shadow_wnd, tp->snd_cwnd >> 1); tp 342 net/ipv4/tcp_cdg.c return max(2U, tp->snd_cwnd >> 1); tp 348 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 359 net/ipv4/tcp_cdg.c ca->rtt_seq = tp->snd_nxt; tp 360 net/ipv4/tcp_cdg.c ca->shadow_wnd = tp->snd_cwnd; tp 364 net/ipv4/tcp_cdg.c ca->rtt_seq = tp->snd_nxt; tp 376 net/ipv4/tcp_cdg.c struct tcp_sock *tp = tcp_sk(sk); tp 382 net/ipv4/tcp_cdg.c ca->rtt_seq = tp->snd_nxt; tp 383 net/ipv4/tcp_cdg.c ca->shadow_wnd = tp->snd_cwnd; tp 394 net/ipv4/tcp_cong.c u32 tcp_slow_start(struct tcp_sock *tp, u32 acked) tp 396 net/ipv4/tcp_cong.c u32 cwnd = min(tp->snd_cwnd + acked, tp->snd_ssthresh); tp 398 net/ipv4/tcp_cong.c acked -= cwnd - tp->snd_cwnd; tp 399 net/ipv4/tcp_cong.c tp->snd_cwnd = min(cwnd, tp->snd_cwnd_clamp); tp 408 net/ipv4/tcp_cong.c void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked) tp 411 net/ipv4/tcp_cong.c if (tp->snd_cwnd_cnt >= w) { tp 412 net/ipv4/tcp_cong.c tp->snd_cwnd_cnt = 0; tp 413 net/ipv4/tcp_cong.c tp->snd_cwnd++; tp 416 net/ipv4/tcp_cong.c tp->snd_cwnd_cnt += acked; tp 417 net/ipv4/tcp_cong.c if (tp->snd_cwnd_cnt >= w) { tp 418 net/ipv4/tcp_cong.c u32 delta = tp->snd_cwnd_cnt / w; tp 420 net/ipv4/tcp_cong.c tp->snd_cwnd_cnt -= delta * w; tp 421 net/ipv4/tcp_cong.c tp->snd_cwnd += delta; tp 423 net/ipv4/tcp_cong.c tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_cwnd_clamp); tp 436 net/ipv4/tcp_cong.c struct tcp_sock *tp = tcp_sk(sk); tp 442 net/ipv4/tcp_cong.c if (tcp_in_slow_start(tp)) { tp 443 net/ipv4/tcp_cong.c acked = tcp_slow_start(tp, acked); tp 448 net/ipv4/tcp_cong.c tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); tp 455 net/ipv4/tcp_cong.c const struct tcp_sock *tp = tcp_sk(sk); tp 457 net/ipv4/tcp_cong.c return max(tp->snd_cwnd >> 1U, 2U); tp 463 net/ipv4/tcp_cong.c const struct tcp_sock *tp = tcp_sk(sk); tp 465 net/ipv4/tcp_cong.c return max(tp->snd_cwnd, tp->prior_cwnd); tp 131 net/ipv4/tcp_cubic.c struct tcp_sock *tp = tcp_sk(sk); tp 135 net/ipv4/tcp_cubic.c ca->end_seq = tp->snd_nxt; tp 337 net/ipv4/tcp_cubic.c struct tcp_sock *tp = tcp_sk(sk); tp 343 net/ipv4/tcp_cubic.c if (tcp_in_slow_start(tp)) { tp 346 net/ipv4/tcp_cubic.c acked = tcp_slow_start(tp, acked); tp 350 net/ipv4/tcp_cubic.c bictcp_update(ca, tp->snd_cwnd, acked); tp 351 net/ipv4/tcp_cubic.c tcp_cong_avoid_ai(tp, ca->cnt, acked); tp 356 net/ipv4/tcp_cubic.c const struct tcp_sock *tp = tcp_sk(sk); tp 362 net/ipv4/tcp_cubic.c if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence) tp 363 net/ipv4/tcp_cubic.c ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta)) tp 366 net/ipv4/tcp_cubic.c ca->last_max_cwnd = tp->snd_cwnd; tp 368 net/ipv4/tcp_cubic.c return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U); tp 381 net/ipv4/tcp_cubic.c struct tcp_sock *tp = tcp_sk(sk); tp 399 net/ipv4/tcp_cubic.c tp->snd_cwnd); tp 400 net/ipv4/tcp_cubic.c tp->snd_ssthresh = tp->snd_cwnd; tp 420 net/ipv4/tcp_cubic.c tp->snd_cwnd); tp 421 net/ipv4/tcp_cubic.c tp->snd_ssthresh = tp->snd_cwnd; tp 432 net/ipv4/tcp_cubic.c const struct tcp_sock *tp = tcp_sk(sk); tp 453 net/ipv4/tcp_cubic.c if (hystart && tcp_in_slow_start(tp) && tp 454 net/ipv4/tcp_cubic.c tp->snd_cwnd >= hystart_low_window) tp 67 net/ipv4/tcp_dctcp.c static void dctcp_reset(const struct tcp_sock *tp, struct dctcp *ca) tp 69 net/ipv4/tcp_dctcp.c ca->next_seq = tp->snd_nxt; tp 71 net/ipv4/tcp_dctcp.c ca->old_delivered = tp->delivered; tp 72 net/ipv4/tcp_dctcp.c ca->old_delivered_ce = tp->delivered_ce; tp 77 net/ipv4/tcp_dctcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 79 net/ipv4/tcp_dctcp.c if ((tp->ecn_flags & TCP_ECN_OK) || tp 84 net/ipv4/tcp_dctcp.c ca->prior_rcv_nxt = tp->rcv_nxt; tp 91 net/ipv4/tcp_dctcp.c dctcp_reset(tp, ca); tp 105 net/ipv4/tcp_dctcp.c struct tcp_sock *tp = tcp_sk(sk); tp 107 net/ipv4/tcp_dctcp.c ca->loss_cwnd = tp->snd_cwnd; tp 108 net/ipv4/tcp_dctcp.c return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->dctcp_alpha) >> 11U), 2U); tp 113 net/ipv4/tcp_dctcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 117 net/ipv4/tcp_dctcp.c if (!before(tp->snd_una, ca->next_seq)) { tp 118 net/ipv4/tcp_dctcp.c u32 delivered_ce = tp->delivered_ce - ca->old_delivered_ce; tp 125 net/ipv4/tcp_dctcp.c u32 delivered = tp->delivered - ca->old_delivered; tp 140 net/ipv4/tcp_dctcp.c dctcp_reset(tp, ca); tp 147 net/ipv4/tcp_dctcp.c struct tcp_sock *tp = tcp_sk(sk); tp 149 net/ipv4/tcp_dctcp.c ca->loss_cwnd = tp->snd_cwnd; tp 150 net/ipv4/tcp_dctcp.c tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U); tp 185 net/ipv4/tcp_dctcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 197 net/ipv4/tcp_dctcp.c info->dctcp.dctcp_ab_ecn = tp->mss_cache * tp 198 net/ipv4/tcp_dctcp.c (tp->delivered_ce - ca->old_delivered_ce); tp 199 net/ipv4/tcp_dctcp.c info->dctcp.dctcp_ab_tot = tp->mss_cache * tp 200 net/ipv4/tcp_dctcp.c (tp->delivered - ca->old_delivered); tp 6 net/ipv4/tcp_dctcp.h struct tcp_sock *tp = tcp_sk(sk); tp 9 net/ipv4/tcp_dctcp.h tp->ecn_flags |= TCP_ECN_DEMAND_CWR; tp 11 net/ipv4/tcp_dctcp.h tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR; tp 27 net/ipv4/tcp_diag.c const struct tcp_sock *tp = tcp_sk(sk); tp 29 net/ipv4/tcp_diag.c r->idiag_rqueue = max_t(int, READ_ONCE(tp->rcv_nxt) - tp 30 net/ipv4/tcp_diag.c READ_ONCE(tp->copied_seq), 0); tp 31 net/ipv4/tcp_diag.c r->idiag_wqueue = READ_ONCE(tp->write_seq) - tp->snd_una; tp 165 net/ipv4/tcp_fastopen.c struct tcp_sock *tp = tcp_sk(sk); tp 167 net/ipv4/tcp_fastopen.c if (TCP_SKB_CB(skb)->end_seq == tp->rcv_nxt) tp 181 net/ipv4/tcp_fastopen.c tp->segs_in = 0; tp 182 net/ipv4/tcp_fastopen.c tcp_segs_in(tp, skb); tp 190 net/ipv4/tcp_fastopen.c tp->rcv_nxt = TCP_SKB_CB(skb)->end_seq; tp 192 net/ipv4/tcp_fastopen.c tp->syn_data_acked = 1; tp 197 net/ipv4/tcp_fastopen.c tp->bytes_received = skb->len; tp 236 net/ipv4/tcp_fastopen.c struct tcp_sock *tp; tp 254 net/ipv4/tcp_fastopen.c tp = tcp_sk(child); tp 256 net/ipv4/tcp_fastopen.c rcu_assign_pointer(tp->fastopen_rsk, req); tp 262 net/ipv4/tcp_fastopen.c tp->snd_wnd = ntohs(tcp_hdr(skb)->window); tp 263 net/ipv4/tcp_fastopen.c tp->max_window = tp->snd_wnd; tp 277 net/ipv4/tcp_fastopen.c tp->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; tp 281 net/ipv4/tcp_fastopen.c tcp_rsk(req)->rcv_nxt = tp->rcv_nxt; tp 282 net/ipv4/tcp_fastopen.c tp->rcv_wup = tp->rcv_nxt; tp 438 net/ipv4/tcp_fastopen.c struct tcp_sock *tp = tcp_sk(sk); tp 441 net/ipv4/tcp_fastopen.c if (tp->fastopen_connect && !tp->fastopen_req) { tp 450 net/ipv4/tcp_fastopen.c tp->fastopen_req = kzalloc(sizeof(*tp->fastopen_req), tp 452 net/ipv4/tcp_fastopen.c if (tp->fastopen_req) tp 453 net/ipv4/tcp_fastopen.c tp->fastopen_req->cookie = cookie; tp 524 net/ipv4/tcp_fastopen.c struct tcp_sock *tp = tcp_sk(sk); tp 528 net/ipv4/tcp_fastopen.c if (!tp->syn_fastopen) tp 531 net/ipv4/tcp_fastopen.c if (!tp->data_segs_in) { tp 532 net/ipv4/tcp_fastopen.c skb = skb_rb_first(&tp->out_of_order_queue); tp 539 net/ipv4/tcp_fastopen.c } else if (tp->syn_fastopen_ch && tp 551 net/ipv4/tcp_fastopen.c struct tcp_sock *tp = tcp_sk(sk); tp 558 net/ipv4/tcp_fastopen.c if ((tp->syn_fastopen || tp->syn_data || tp->syn_data_acked) && tp 102 net/ipv4/tcp_highspeed.c struct tcp_sock *tp = tcp_sk(sk); tp 109 net/ipv4/tcp_highspeed.c tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); tp 114 net/ipv4/tcp_highspeed.c struct tcp_sock *tp = tcp_sk(sk); tp 120 net/ipv4/tcp_highspeed.c if (tcp_in_slow_start(tp)) tp 121 net/ipv4/tcp_highspeed.c tcp_slow_start(tp, acked); tp 130 net/ipv4/tcp_highspeed.c if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) { tp 131 net/ipv4/tcp_highspeed.c while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd && tp 134 net/ipv4/tcp_highspeed.c } else if (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) { tp 135 net/ipv4/tcp_highspeed.c while (ca->ai && tp->snd_cwnd <= hstcp_aimd_vals[ca->ai-1].cwnd) tp 140 net/ipv4/tcp_highspeed.c if (tp->snd_cwnd < tp->snd_cwnd_clamp) { tp 142 net/ipv4/tcp_highspeed.c tp->snd_cwnd_cnt += ca->ai + 1; tp 143 net/ipv4/tcp_highspeed.c if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp 144 net/ipv4/tcp_highspeed.c tp->snd_cwnd_cnt -= tp->snd_cwnd; tp 145 net/ipv4/tcp_highspeed.c tp->snd_cwnd++; tp 153 net/ipv4/tcp_highspeed.c const struct tcp_sock *tp = tcp_sk(sk); tp 157 net/ipv4/tcp_highspeed.c return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U); tp 105 net/ipv4/tcp_htcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 127 net/ipv4/tcp_htcp.c if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) && tp 224 net/ipv4/tcp_htcp.c const struct tcp_sock *tp = tcp_sk(sk); tp 228 net/ipv4/tcp_htcp.c return max((tp->snd_cwnd * ca->beta) >> 7, 2U); tp 233 net/ipv4/tcp_htcp.c struct tcp_sock *tp = tcp_sk(sk); tp 239 net/ipv4/tcp_htcp.c if (tcp_in_slow_start(tp)) tp 240 net/ipv4/tcp_htcp.c tcp_slow_start(tp, acked); tp 245 net/ipv4/tcp_htcp.c if ((tp->snd_cwnd_cnt * ca->alpha)>>7 >= tp->snd_cwnd) { tp 246 net/ipv4/tcp_htcp.c if (tp->snd_cwnd < tp->snd_cwnd_clamp) tp 247 net/ipv4/tcp_htcp.c tp->snd_cwnd++; tp 248 net/ipv4/tcp_htcp.c tp->snd_cwnd_cnt = 0; tp 251 net/ipv4/tcp_htcp.c tp->snd_cwnd_cnt += ca->pkts_acked; tp 48 net/ipv4/tcp_hybla.c struct tcp_sock *tp = tcp_sk(sk); tp 57 net/ipv4/tcp_hybla.c tp->snd_cwnd = 2; tp 58 net/ipv4/tcp_hybla.c tp->snd_cwnd_clamp = 65535; tp 64 net/ipv4/tcp_hybla.c ca->minrtt_us = tp->srtt_us; tp 65 net/ipv4/tcp_hybla.c tp->snd_cwnd = ca->rho; tp 92 net/ipv4/tcp_hybla.c struct tcp_sock *tp = tcp_sk(sk); tp 98 net/ipv4/tcp_hybla.c if (tp->srtt_us < ca->minrtt_us) { tp 100 net/ipv4/tcp_hybla.c ca->minrtt_us = tp->srtt_us; tp 116 net/ipv4/tcp_hybla.c if (tcp_in_slow_start(tp)) { tp 140 net/ipv4/tcp_hybla.c increment = ca->rho2_7ls / tp->snd_cwnd; tp 142 net/ipv4/tcp_hybla.c tp->snd_cwnd_cnt++; tp 146 net/ipv4/tcp_hybla.c tp->snd_cwnd += increment >> 7; tp 151 net/ipv4/tcp_hybla.c tp->snd_cwnd++; tp 153 net/ipv4/tcp_hybla.c tp->snd_cwnd_cnt = 0; tp 156 net/ipv4/tcp_hybla.c if (increment == 0 && odd == 0 && tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp 157 net/ipv4/tcp_hybla.c tp->snd_cwnd++; tp 158 net/ipv4/tcp_hybla.c tp->snd_cwnd_cnt = 0; tp 162 net/ipv4/tcp_hybla.c tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); tp 164 net/ipv4/tcp_hybla.c tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp); tp 59 net/ipv4/tcp_illinois.c struct tcp_sock *tp = tcp_sk(sk); tp 62 net/ipv4/tcp_illinois.c ca->end_seq = tp->snd_nxt; tp 224 net/ipv4/tcp_illinois.c struct tcp_sock *tp = tcp_sk(sk); tp 227 net/ipv4/tcp_illinois.c if (tp->snd_cwnd < win_thresh) { tp 262 net/ipv4/tcp_illinois.c struct tcp_sock *tp = tcp_sk(sk); tp 273 net/ipv4/tcp_illinois.c if (tcp_in_slow_start(tp)) tp 274 net/ipv4/tcp_illinois.c tcp_slow_start(tp, acked); tp 280 net/ipv4/tcp_illinois.c tp->snd_cwnd_cnt += ca->acked; tp 286 net/ipv4/tcp_illinois.c delta = (tp->snd_cwnd_cnt * ca->alpha) >> ALPHA_SHIFT; tp 287 net/ipv4/tcp_illinois.c if (delta >= tp->snd_cwnd) { tp 288 net/ipv4/tcp_illinois.c tp->snd_cwnd = min(tp->snd_cwnd + delta / tp->snd_cwnd, tp 289 net/ipv4/tcp_illinois.c (u32)tp->snd_cwnd_clamp); tp 290 net/ipv4/tcp_illinois.c tp->snd_cwnd_cnt = 0; tp 297 net/ipv4/tcp_illinois.c struct tcp_sock *tp = tcp_sk(sk); tp 301 net/ipv4/tcp_illinois.c return max(tp->snd_cwnd - ((tp->snd_cwnd * ca->beta) >> BETA_SHIFT), 2U); tp 248 net/ipv4/tcp_input.c static void tcp_ecn_queue_cwr(struct tcp_sock *tp) tp 250 net/ipv4/tcp_input.c if (tp->ecn_flags & TCP_ECN_OK) tp 251 net/ipv4/tcp_input.c tp->ecn_flags |= TCP_ECN_QUEUE_CWR; tp 267 net/ipv4/tcp_input.c static void tcp_ecn_withdraw_cwr(struct tcp_sock *tp) tp 269 net/ipv4/tcp_input.c tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; tp 274 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 282 net/ipv4/tcp_input.c if (tp->ecn_flags & TCP_ECN_SEEN) tp 289 net/ipv4/tcp_input.c if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) { tp 292 net/ipv4/tcp_input.c tp->ecn_flags |= TCP_ECN_DEMAND_CWR; tp 294 net/ipv4/tcp_input.c tp->ecn_flags |= TCP_ECN_SEEN; tp 299 net/ipv4/tcp_input.c tp->ecn_flags |= TCP_ECN_SEEN; tp 310 net/ipv4/tcp_input.c static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th) tp 312 net/ipv4/tcp_input.c if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || th->cwr)) tp 313 net/ipv4/tcp_input.c tp->ecn_flags &= ~TCP_ECN_OK; tp 316 net/ipv4/tcp_input.c static void tcp_ecn_rcv_syn(struct tcp_sock *tp, const struct tcphdr *th) tp 318 net/ipv4/tcp_input.c if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || !th->cwr)) tp 319 net/ipv4/tcp_input.c tp->ecn_flags &= ~TCP_ECN_OK; tp 322 net/ipv4/tcp_input.c static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr *th) tp 324 net/ipv4/tcp_input.c if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK)) tp 336 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 344 net/ipv4/tcp_input.c per_mss = max_t(u32, tp->rx_opt.mss_clamp, tp->mss_cache) + tp 351 net/ipv4/tcp_input.c nr_segs = max_t(u32, TCP_INIT_CWND, tp->snd_cwnd); tp 352 net/ipv4/tcp_input.c nr_segs = max_t(u32, nr_segs, tp->reordering + 1); tp 394 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 399 net/ipv4/tcp_input.c while (tp->rcv_ssthresh <= window) { tp 411 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 414 net/ipv4/tcp_input.c room = min_t(int, tp->window_clamp, tcp_space(sk)) - tp->rcv_ssthresh; tp 424 net/ipv4/tcp_input.c incr = 2 * tp->advmss; tp 430 net/ipv4/tcp_input.c tp->rcv_ssthresh += min(room, incr); tp 442 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 448 net/ipv4/tcp_input.c tp->rcvq_space.space = min_t(u32, tp->rcv_wnd, TCP_INIT_CWND * tp->advmss); tp 449 net/ipv4/tcp_input.c tcp_mstamp_refresh(tp); tp 450 net/ipv4/tcp_input.c tp->rcvq_space.time = tp->tcp_mstamp; tp 451 net/ipv4/tcp_input.c tp->rcvq_space.seq = tp->copied_seq; tp 455 net/ipv4/tcp_input.c if (tp->window_clamp >= maxwin) { tp 456 net/ipv4/tcp_input.c tp->window_clamp = maxwin; tp 458 net/ipv4/tcp_input.c if (tcp_app_win && maxwin > 4 * tp->advmss) tp 459 net/ipv4/tcp_input.c tp->window_clamp = max(maxwin - tp 461 net/ipv4/tcp_input.c 4 * tp->advmss); tp 466 net/ipv4/tcp_input.c tp->window_clamp > 2 * tp->advmss && tp 467 net/ipv4/tcp_input.c tp->window_clamp + tp->advmss > maxwin) tp 468 net/ipv4/tcp_input.c tp->window_clamp = max(2 * tp->advmss, maxwin - tp->advmss); tp 470 net/ipv4/tcp_input.c tp->rcv_ssthresh = min(tp->rcv_ssthresh, tp->window_clamp); tp 471 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 477 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 492 net/ipv4/tcp_input.c tp->rcv_ssthresh = min(tp->window_clamp, 2U * tp->advmss); tp 504 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 505 net/ipv4/tcp_input.c unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache); tp 507 net/ipv4/tcp_input.c hint = min(hint, tp->rcv_wnd / 2); tp 526 net/ipv4/tcp_input.c static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep) tp 528 net/ipv4/tcp_input.c u32 new_sample = tp->rcv_rtt_est.rtt_us; tp 555 net/ipv4/tcp_input.c tp->rcv_rtt_est.rtt_us = new_sample; tp 558 net/ipv4/tcp_input.c static inline void tcp_rcv_rtt_measure(struct tcp_sock *tp) tp 562 net/ipv4/tcp_input.c if (tp->rcv_rtt_est.time == 0) tp 564 net/ipv4/tcp_input.c if (before(tp->rcv_nxt, tp->rcv_rtt_est.seq)) tp 566 net/ipv4/tcp_input.c delta_us = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcv_rtt_est.time); tp 569 net/ipv4/tcp_input.c tcp_rcv_rtt_update(tp, delta_us, 1); tp 572 net/ipv4/tcp_input.c tp->rcv_rtt_est.seq = tp->rcv_nxt + tp->rcv_wnd; tp 573 net/ipv4/tcp_input.c tp->rcv_rtt_est.time = tp->tcp_mstamp; tp 579 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 581 net/ipv4/tcp_input.c if (tp->rx_opt.rcv_tsecr == tp->rcv_rtt_last_tsecr) tp 583 net/ipv4/tcp_input.c tp->rcv_rtt_last_tsecr = tp->rx_opt.rcv_tsecr; tp 587 net/ipv4/tcp_input.c u32 delta = tcp_time_stamp(tp) - tp->rx_opt.rcv_tsecr; tp 594 net/ipv4/tcp_input.c tcp_rcv_rtt_update(tp, delta_us, 0); tp 605 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 611 net/ipv4/tcp_input.c tcp_mstamp_refresh(tp); tp 612 net/ipv4/tcp_input.c time = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcvq_space.time); tp 613 net/ipv4/tcp_input.c if (time < (tp->rcv_rtt_est.rtt_us >> 3) || tp->rcv_rtt_est.rtt_us == 0) tp 617 net/ipv4/tcp_input.c copied = tp->copied_seq - tp->rcvq_space.seq; tp 618 net/ipv4/tcp_input.c if (copied <= tp->rcvq_space.space) tp 638 net/ipv4/tcp_input.c rcvwin = ((u64)copied << 1) + 16 * tp->advmss; tp 641 net/ipv4/tcp_input.c grow = rcvwin * (copied - tp->rcvq_space.space); tp 642 net/ipv4/tcp_input.c do_div(grow, tp->rcvq_space.space); tp 645 net/ipv4/tcp_input.c rcvmem = SKB_TRUESIZE(tp->advmss + MAX_TCP_HEADER); tp 646 net/ipv4/tcp_input.c while (tcp_win_from_space(sk, rcvmem) < tp->advmss) tp 649 net/ipv4/tcp_input.c do_div(rcvwin, tp->advmss); tp 656 net/ipv4/tcp_input.c tp->window_clamp = tcp_win_from_space(sk, rcvbuf); tp 659 net/ipv4/tcp_input.c tp->rcvq_space.space = copied; tp 662 net/ipv4/tcp_input.c tp->rcvq_space.seq = tp->copied_seq; tp 663 net/ipv4/tcp_input.c tp->rcvq_space.time = tp->tcp_mstamp; tp 678 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 686 net/ipv4/tcp_input.c tcp_rcv_rtt_measure(tp); tp 733 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 735 net/ipv4/tcp_input.c u32 srtt = tp->srtt_us; tp 758 net/ipv4/tcp_input.c m -= (tp->mdev_us >> 2); /* similar update on mdev */ tp 770 net/ipv4/tcp_input.c m -= (tp->mdev_us >> 2); /* similar update on mdev */ tp 772 net/ipv4/tcp_input.c tp->mdev_us += m; /* mdev = 3/4 mdev + 1/4 new */ tp 773 net/ipv4/tcp_input.c if (tp->mdev_us > tp->mdev_max_us) { tp 774 net/ipv4/tcp_input.c tp->mdev_max_us = tp->mdev_us; tp 775 net/ipv4/tcp_input.c if (tp->mdev_max_us > tp->rttvar_us) tp 776 net/ipv4/tcp_input.c tp->rttvar_us = tp->mdev_max_us; tp 778 net/ipv4/tcp_input.c if (after(tp->snd_una, tp->rtt_seq)) { tp 779 net/ipv4/tcp_input.c if (tp->mdev_max_us < tp->rttvar_us) tp 780 net/ipv4/tcp_input.c tp->rttvar_us -= (tp->rttvar_us - tp->mdev_max_us) >> 2; tp 781 net/ipv4/tcp_input.c tp->rtt_seq = tp->snd_nxt; tp 782 net/ipv4/tcp_input.c tp->mdev_max_us = tcp_rto_min_us(sk); tp 789 net/ipv4/tcp_input.c tp->mdev_us = m << 1; /* make sure rto = 3*rtt */ tp 790 net/ipv4/tcp_input.c tp->rttvar_us = max(tp->mdev_us, tcp_rto_min_us(sk)); tp 791 net/ipv4/tcp_input.c tp->mdev_max_us = tp->rttvar_us; tp 792 net/ipv4/tcp_input.c tp->rtt_seq = tp->snd_nxt; tp 796 net/ipv4/tcp_input.c tp->srtt_us = max(1U, srtt); tp 801 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 805 net/ipv4/tcp_input.c rate = (u64)tp->mss_cache * ((USEC_PER_SEC / 100) << 3); tp 815 net/ipv4/tcp_input.c if (tp->snd_cwnd < tp->snd_ssthresh / 2) tp 820 net/ipv4/tcp_input.c rate *= max(tp->snd_cwnd, tp->packets_out); tp 822 net/ipv4/tcp_input.c if (likely(tp->srtt_us)) tp 823 net/ipv4/tcp_input.c do_div(rate, tp->srtt_us); tp 838 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 849 net/ipv4/tcp_input.c inet_csk(sk)->icsk_rto = __tcp_set_rto(tp); tp 863 net/ipv4/tcp_input.c __u32 tcp_init_cwnd(const struct tcp_sock *tp, const struct dst_entry *dst) tp 869 net/ipv4/tcp_input.c return min_t(__u32, cwnd, tp->snd_cwnd_clamp); tp 873 net/ipv4/tcp_input.c static void tcp_dsack_seen(struct tcp_sock *tp) tp 875 net/ipv4/tcp_input.c tp->rx_opt.sack_ok |= TCP_DSACK_SEEN; tp 876 net/ipv4/tcp_input.c tp->rack.dsack_seen = 1; tp 877 net/ipv4/tcp_input.c tp->dsack_dups++; tp 887 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 888 net/ipv4/tcp_input.c const u32 mss = tp->mss_cache; tp 891 net/ipv4/tcp_input.c fack = tcp_highest_sack_seq(tp); tp 896 net/ipv4/tcp_input.c if ((metric > tp->reordering * mss) && mss) { tp 899 net/ipv4/tcp_input.c tp->rx_opt.sack_ok, inet_csk(sk)->icsk_ca_state, tp 900 net/ipv4/tcp_input.c tp->reordering, tp 902 net/ipv4/tcp_input.c tp->sacked_out, tp 903 net/ipv4/tcp_input.c tp->undo_marker ? tp->undo_retrans : 0); tp 905 net/ipv4/tcp_input.c tp->reordering = min_t(u32, (metric + mss - 1) / mss, tp 910 net/ipv4/tcp_input.c tp->reord_seen++; tp 916 net/ipv4/tcp_input.c static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb) tp 918 net/ipv4/tcp_input.c if ((!tp->retransmit_skb_hint && tp->retrans_out >= tp->lost_out) || tp 919 net/ipv4/tcp_input.c (tp->retransmit_skb_hint && tp 921 net/ipv4/tcp_input.c TCP_SKB_CB(tp->retransmit_skb_hint)->seq))) tp 922 net/ipv4/tcp_input.c tp->retransmit_skb_hint = skb; tp 932 net/ipv4/tcp_input.c static void tcp_sum_lost(struct tcp_sock *tp, struct sk_buff *skb) tp 938 net/ipv4/tcp_input.c tp->lost += tcp_skb_pcount(skb); tp 941 net/ipv4/tcp_input.c static void tcp_skb_mark_lost(struct tcp_sock *tp, struct sk_buff *skb) tp 944 net/ipv4/tcp_input.c tcp_verify_retransmit_hint(tp, skb); tp 946 net/ipv4/tcp_input.c tp->lost_out += tcp_skb_pcount(skb); tp 947 net/ipv4/tcp_input.c tcp_sum_lost(tp, skb); tp 952 net/ipv4/tcp_input.c void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb) tp 954 net/ipv4/tcp_input.c tcp_verify_retransmit_hint(tp, skb); tp 956 net/ipv4/tcp_input.c tcp_sum_lost(tp, skb); tp 958 net/ipv4/tcp_input.c tp->lost_out += tcp_skb_pcount(skb); tp 1056 net/ipv4/tcp_input.c static bool tcp_is_sackblock_valid(struct tcp_sock *tp, bool is_dsack, tp 1060 net/ipv4/tcp_input.c if (after(end_seq, tp->snd_nxt) || !before(start_seq, end_seq)) tp 1064 net/ipv4/tcp_input.c if (!before(start_seq, tp->snd_nxt)) tp 1070 net/ipv4/tcp_input.c if (after(start_seq, tp->snd_una)) tp 1073 net/ipv4/tcp_input.c if (!is_dsack || !tp->undo_marker) tp 1077 net/ipv4/tcp_input.c if (after(end_seq, tp->snd_una)) tp 1080 net/ipv4/tcp_input.c if (!before(start_seq, tp->undo_marker)) tp 1084 net/ipv4/tcp_input.c if (!after(end_seq, tp->undo_marker)) tp 1090 net/ipv4/tcp_input.c return !before(start_seq, end_seq - tp->max_window); tp 1097 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1104 net/ipv4/tcp_input.c tcp_dsack_seen(tp); tp 1113 net/ipv4/tcp_input.c tcp_dsack_seen(tp); tp 1120 net/ipv4/tcp_input.c if (dup_sack && tp->undo_marker && tp->undo_retrans > 0 && tp 1122 net/ipv4/tcp_input.c after(end_seq_0, tp->undo_marker)) tp 1123 net/ipv4/tcp_input.c tp->undo_retrans--; tp 1204 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1208 net/ipv4/tcp_input.c if (tp->undo_marker && tp->undo_retrans > 0 && tp 1209 net/ipv4/tcp_input.c after(end_seq, tp->undo_marker)) tp 1210 net/ipv4/tcp_input.c tp->undo_retrans--; tp 1217 net/ipv4/tcp_input.c if (!after(end_seq, tp->snd_una)) tp 1221 net/ipv4/tcp_input.c tcp_rack_advance(tp, sacked, end_seq, xmit_time); tp 1230 net/ipv4/tcp_input.c tp->lost_out -= pcount; tp 1231 net/ipv4/tcp_input.c tp->retrans_out -= pcount; tp 1239 net/ipv4/tcp_input.c tcp_highest_sack_seq(tp)) && tp 1243 net/ipv4/tcp_input.c if (!after(end_seq, tp->high_seq)) tp 1252 net/ipv4/tcp_input.c tp->lost_out -= pcount; tp 1258 net/ipv4/tcp_input.c tp->sacked_out += pcount; tp 1259 net/ipv4/tcp_input.c tp->delivered += pcount; /* Out-of-order packets delivered */ tp 1262 net/ipv4/tcp_input.c if (tp->lost_skb_hint && tp 1263 net/ipv4/tcp_input.c before(start_seq, TCP_SKB_CB(tp->lost_skb_hint)->seq)) tp 1264 net/ipv4/tcp_input.c tp->lost_cnt_hint += pcount; tp 1273 net/ipv4/tcp_input.c tp->retrans_out -= pcount; tp 1288 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1305 net/ipv4/tcp_input.c if (skb == tp->lost_skb_hint) tp 1306 net/ipv4/tcp_input.c tp->lost_cnt_hint += pcount; tp 1338 net/ipv4/tcp_input.c if (skb == tp->retransmit_skb_hint) tp 1339 net/ipv4/tcp_input.c tp->retransmit_skb_hint = prev; tp 1340 net/ipv4/tcp_input.c if (skb == tp->lost_skb_hint) { tp 1341 net/ipv4/tcp_input.c tp->lost_skb_hint = prev; tp 1342 net/ipv4/tcp_input.c tp->lost_cnt_hint -= tcp_skb_pcount(prev); tp 1401 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1415 net/ipv4/tcp_input.c if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) tp 1495 net/ipv4/tcp_input.c if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una)) tp 1538 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1597 net/ipv4/tcp_input.c tcp_highest_sack_seq(tp))) tp 1653 net/ipv4/tcp_input.c static int tcp_sack_cache_ok(const struct tcp_sock *tp, const struct tcp_sack_block *cache) tp 1655 net/ipv4/tcp_input.c return cache < tp->recv_sack_cache + ARRAY_SIZE(tp->recv_sack_cache); tp 1662 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1676 net/ipv4/tcp_input.c state->reord = tp->snd_nxt; tp 1678 net/ipv4/tcp_input.c if (!tp->sacked_out) tp 1685 net/ipv4/tcp_input.c tp->delivered++; /* A spurious retransmission is delivered */ tp 1692 net/ipv4/tcp_input.c if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window)) tp 1695 net/ipv4/tcp_input.c if (!tp->packets_out) tp 1706 net/ipv4/tcp_input.c if (!tcp_is_sackblock_valid(tp, dup_sack, tp 1712 net/ipv4/tcp_input.c if (!tp->undo_marker) tp 1718 net/ipv4/tcp_input.c if ((TCP_SKB_CB(ack_skb)->ack_seq != tp->snd_una) && tp 1719 net/ipv4/tcp_input.c !after(sp[used_sacks].end_seq, tp->snd_una)) tp 1757 net/ipv4/tcp_input.c if (!tp->sacked_out) { tp 1759 net/ipv4/tcp_input.c cache = tp->recv_sack_cache + ARRAY_SIZE(tp->recv_sack_cache); tp 1761 net/ipv4/tcp_input.c cache = tp->recv_sack_cache; tp 1763 net/ipv4/tcp_input.c while (tcp_sack_cache_ok(tp, cache) && !cache->start_seq && tp 1778 net/ipv4/tcp_input.c while (tcp_sack_cache_ok(tp, cache) && tp 1783 net/ipv4/tcp_input.c if (tcp_sack_cache_ok(tp, cache) && !dup_sack && tp 1805 net/ipv4/tcp_input.c if (tcp_highest_sack_seq(tp) == cache->end_seq) { tp 1820 net/ipv4/tcp_input.c if (!before(start_seq, tcp_highest_sack_seq(tp))) { tp 1836 net/ipv4/tcp_input.c for (i = 0; i < ARRAY_SIZE(tp->recv_sack_cache) - used_sacks; i++) { tp 1837 net/ipv4/tcp_input.c tp->recv_sack_cache[i].start_seq = 0; tp 1838 net/ipv4/tcp_input.c tp->recv_sack_cache[i].end_seq = 0; tp 1841 net/ipv4/tcp_input.c tp->recv_sack_cache[i++] = sp[j]; tp 1843 net/ipv4/tcp_input.c if (inet_csk(sk)->icsk_ca_state != TCP_CA_Loss || tp->undo_marker) tp 1846 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 1850 net/ipv4/tcp_input.c WARN_ON((int)tp->sacked_out < 0); tp 1851 net/ipv4/tcp_input.c WARN_ON((int)tp->lost_out < 0); tp 1852 net/ipv4/tcp_input.c WARN_ON((int)tp->retrans_out < 0); tp 1853 net/ipv4/tcp_input.c WARN_ON((int)tcp_packets_in_flight(tp) < 0); tp 1861 net/ipv4/tcp_input.c static bool tcp_limit_reno_sacked(struct tcp_sock *tp) tp 1865 net/ipv4/tcp_input.c holes = max(tp->lost_out, 1U); tp 1866 net/ipv4/tcp_input.c holes = min(holes, tp->packets_out); tp 1868 net/ipv4/tcp_input.c if ((tp->sacked_out + holes) > tp->packets_out) { tp 1869 net/ipv4/tcp_input.c tp->sacked_out = tp->packets_out - holes; tp 1881 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1883 net/ipv4/tcp_input.c if (!tcp_limit_reno_sacked(tp)) tp 1886 net/ipv4/tcp_input.c tp->reordering = min_t(u32, tp->packets_out + addend, tp 1888 net/ipv4/tcp_input.c tp->reord_seen++; tp 1897 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1898 net/ipv4/tcp_input.c u32 prior_sacked = tp->sacked_out; tp 1901 net/ipv4/tcp_input.c tp->sacked_out += num_dupack; tp 1903 net/ipv4/tcp_input.c delivered = tp->sacked_out - prior_sacked; tp 1905 net/ipv4/tcp_input.c tp->delivered += delivered; tp 1906 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 1914 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1918 net/ipv4/tcp_input.c tp->delivered += max_t(int, acked - tp->sacked_out, 1); tp 1919 net/ipv4/tcp_input.c if (acked - 1 >= tp->sacked_out) tp 1920 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 1922 net/ipv4/tcp_input.c tp->sacked_out -= acked - 1; tp 1925 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 1928 net/ipv4/tcp_input.c static inline void tcp_reset_reno_sack(struct tcp_sock *tp) tp 1930 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 1933 net/ipv4/tcp_input.c void tcp_clear_retrans(struct tcp_sock *tp) tp 1935 net/ipv4/tcp_input.c tp->retrans_out = 0; tp 1936 net/ipv4/tcp_input.c tp->lost_out = 0; tp 1937 net/ipv4/tcp_input.c tp->undo_marker = 0; tp 1938 net/ipv4/tcp_input.c tp->undo_retrans = -1; tp 1939 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 1942 net/ipv4/tcp_input.c static inline void tcp_init_undo(struct tcp_sock *tp) tp 1944 net/ipv4/tcp_input.c tp->undo_marker = tp->snd_una; tp 1946 net/ipv4/tcp_input.c tp->undo_retrans = tp->retrans_out ? : -1; tp 1960 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 1968 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 1970 net/ipv4/tcp_input.c tp->is_sack_reneg = 1; tp 1971 net/ipv4/tcp_input.c } else if (tcp_is_reno(tp)) { tp 1972 net/ipv4/tcp_input.c tcp_reset_reno_sack(tp); tp 1980 net/ipv4/tcp_input.c tcp_rack_skb_timeout(tp, skb, 0) > 0) tp 1984 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 1985 net/ipv4/tcp_input.c tcp_clear_all_retrans_hints(tp); tp 1992 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2000 net/ipv4/tcp_input.c !after(tp->high_seq, tp->snd_una) || tp 2002 net/ipv4/tcp_input.c tp->prior_ssthresh = tcp_current_ssthresh(sk); tp 2003 net/ipv4/tcp_input.c tp->prior_cwnd = tp->snd_cwnd; tp 2004 net/ipv4/tcp_input.c tp->snd_ssthresh = icsk->icsk_ca_ops->ssthresh(sk); tp 2006 net/ipv4/tcp_input.c tcp_init_undo(tp); tp 2008 net/ipv4/tcp_input.c tp->snd_cwnd = tcp_packets_in_flight(tp) + 1; tp 2009 net/ipv4/tcp_input.c tp->snd_cwnd_cnt = 0; tp 2010 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 2016 net/ipv4/tcp_input.c tp->sacked_out >= net->ipv4.sysctl_tcp_reordering) tp 2017 net/ipv4/tcp_input.c tp->reordering = min_t(unsigned int, tp->reordering, tp 2020 net/ipv4/tcp_input.c tp->high_seq = tp->snd_nxt; tp 2021 net/ipv4/tcp_input.c tcp_ecn_queue_cwr(tp); tp 2027 net/ipv4/tcp_input.c tp->frto = net->ipv4.sysctl_tcp_frto && tp 2045 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2046 net/ipv4/tcp_input.c unsigned long delay = max(usecs_to_jiffies(tp->srtt_us >> 4), tp 2067 net/ipv4/tcp_input.c static inline int tcp_dupack_heuristics(const struct tcp_sock *tp) tp 2069 net/ipv4/tcp_input.c return tp->sacked_out + 1; tp 2171 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2174 net/ipv4/tcp_input.c if (tp->lost_out) tp 2178 net/ipv4/tcp_input.c if (!tcp_is_rack(sk) && tcp_dupack_heuristics(tp) > tp->reordering) tp 2192 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2197 net/ipv4/tcp_input.c const u32 loss_high = tcp_is_sack(tp) ? tp->snd_nxt : tp->high_seq; tp 2199 net/ipv4/tcp_input.c WARN_ON(packets > tp->packets_out); tp 2200 net/ipv4/tcp_input.c skb = tp->lost_skb_hint; tp 2203 net/ipv4/tcp_input.c if (mark_head && after(TCP_SKB_CB(skb)->seq, tp->snd_una)) tp 2205 net/ipv4/tcp_input.c cnt = tp->lost_cnt_hint; tp 2214 net/ipv4/tcp_input.c tp->lost_skb_hint = skb; tp 2215 net/ipv4/tcp_input.c tp->lost_cnt_hint = cnt; tp 2221 net/ipv4/tcp_input.c if (tcp_is_reno(tp) || tp 2226 net/ipv4/tcp_input.c if (tcp_is_sack(tp) || tp 2241 net/ipv4/tcp_input.c tcp_skb_mark_lost(tp, skb); tp 2246 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 2253 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2255 net/ipv4/tcp_input.c if (tcp_is_sack(tp)) { tp 2256 net/ipv4/tcp_input.c int sacked_upto = tp->sacked_out - tp->reordering; tp 2264 net/ipv4/tcp_input.c static bool tcp_tsopt_ecr_before(const struct tcp_sock *tp, u32 when) tp 2266 net/ipv4/tcp_input.c return tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && tp 2267 net/ipv4/tcp_input.c before(tp->rx_opt.rcv_tsecr, when); tp 2273 net/ipv4/tcp_input.c static bool tcp_skb_spurious_retrans(const struct tcp_sock *tp, tp 2277 net/ipv4/tcp_input.c tcp_tsopt_ecr_before(tp, tcp_skb_timestamp(skb)); tp 2283 net/ipv4/tcp_input.c static inline bool tcp_packet_delayed(const struct tcp_sock *tp) tp 2285 net/ipv4/tcp_input.c return tp->retrans_stamp && tp 2286 net/ipv4/tcp_input.c tcp_tsopt_ecr_before(tp, tp->retrans_stamp); tp 2307 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 2310 net/ipv4/tcp_input.c if (tp->retrans_out) tp 2323 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2330 net/ipv4/tcp_input.c tp->snd_cwnd, tcp_left_out(tp), tp 2331 net/ipv4/tcp_input.c tp->snd_ssthresh, tp->prior_ssthresh, tp 2332 net/ipv4/tcp_input.c tp->packets_out); tp 2339 net/ipv4/tcp_input.c tp->snd_cwnd, tcp_left_out(tp), tp 2340 net/ipv4/tcp_input.c tp->snd_ssthresh, tp->prior_ssthresh, tp 2341 net/ipv4/tcp_input.c tp->packets_out); tp 2349 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2357 net/ipv4/tcp_input.c tp->lost_out = 0; tp 2358 net/ipv4/tcp_input.c tcp_clear_all_retrans_hints(tp); tp 2361 net/ipv4/tcp_input.c if (tp->prior_ssthresh) { tp 2364 net/ipv4/tcp_input.c tp->snd_cwnd = icsk->icsk_ca_ops->undo_cwnd(sk); tp 2366 net/ipv4/tcp_input.c if (tp->prior_ssthresh > tp->snd_ssthresh) { tp 2367 net/ipv4/tcp_input.c tp->snd_ssthresh = tp->prior_ssthresh; tp 2368 net/ipv4/tcp_input.c tcp_ecn_withdraw_cwr(tp); tp 2371 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 2372 net/ipv4/tcp_input.c tp->undo_marker = 0; tp 2373 net/ipv4/tcp_input.c tp->rack.advanced = 1; /* Force RACK to re-exam losses */ tp 2376 net/ipv4/tcp_input.c static inline bool tcp_may_undo(const struct tcp_sock *tp) tp 2378 net/ipv4/tcp_input.c return tp->undo_marker && (!tp->undo_retrans || tcp_packet_delayed(tp)); tp 2384 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2386 net/ipv4/tcp_input.c if (tcp_may_undo(tp)) { tp 2400 net/ipv4/tcp_input.c } else if (tp->rack.reo_wnd_persist) { tp 2401 net/ipv4/tcp_input.c tp->rack.reo_wnd_persist--; tp 2403 net/ipv4/tcp_input.c if (tp->snd_una == tp->high_seq && tcp_is_reno(tp)) { tp 2408 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 2412 net/ipv4/tcp_input.c tp->is_sack_reneg = 0; tp 2419 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2421 net/ipv4/tcp_input.c if (tp->undo_marker && !tp->undo_retrans) { tp 2422 net/ipv4/tcp_input.c tp->rack.reo_wnd_persist = min(TCP_RACK_RECOVERY_THRESH, tp 2423 net/ipv4/tcp_input.c tp->rack.reo_wnd_persist + 1); tp 2435 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2437 net/ipv4/tcp_input.c if (frto_undo || tcp_may_undo(tp)) { tp 2446 net/ipv4/tcp_input.c if (frto_undo || tcp_is_sack(tp)) { tp 2448 net/ipv4/tcp_input.c tp->is_sack_reneg = 0; tp 2466 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2468 net/ipv4/tcp_input.c tp->high_seq = tp->snd_nxt; tp 2469 net/ipv4/tcp_input.c tp->tlp_high_seq = 0; tp 2470 net/ipv4/tcp_input.c tp->snd_cwnd_cnt = 0; tp 2471 net/ipv4/tcp_input.c tp->prior_cwnd = tp->snd_cwnd; tp 2472 net/ipv4/tcp_input.c tp->prr_delivered = 0; tp 2473 net/ipv4/tcp_input.c tp->prr_out = 0; tp 2474 net/ipv4/tcp_input.c tp->snd_ssthresh = inet_csk(sk)->icsk_ca_ops->ssthresh(sk); tp 2475 net/ipv4/tcp_input.c tcp_ecn_queue_cwr(tp); tp 2480 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2482 net/ipv4/tcp_input.c int delta = tp->snd_ssthresh - tcp_packets_in_flight(tp); tp 2484 net/ipv4/tcp_input.c if (newly_acked_sacked <= 0 || WARN_ON_ONCE(!tp->prior_cwnd)) tp 2487 net/ipv4/tcp_input.c tp->prr_delivered += newly_acked_sacked; tp 2489 net/ipv4/tcp_input.c u64 dividend = (u64)tp->snd_ssthresh * tp->prr_delivered + tp 2490 net/ipv4/tcp_input.c tp->prior_cwnd - 1; tp 2491 net/ipv4/tcp_input.c sndcnt = div_u64(dividend, tp->prior_cwnd) - tp->prr_out; tp 2495 net/ipv4/tcp_input.c max_t(int, tp->prr_delivered - tp->prr_out, tp 2501 net/ipv4/tcp_input.c sndcnt = max(sndcnt, (tp->prr_out ? 0 : 1)); tp 2502 net/ipv4/tcp_input.c tp->snd_cwnd = tcp_packets_in_flight(tp) + sndcnt; tp 2507 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2513 net/ipv4/tcp_input.c if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH && tp 2514 net/ipv4/tcp_input.c (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR || tp->undo_marker)) { tp 2515 net/ipv4/tcp_input.c tp->snd_cwnd = tp->snd_ssthresh; tp 2516 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 2524 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2526 net/ipv4/tcp_input.c tp->prior_ssthresh = 0; tp 2528 net/ipv4/tcp_input.c tp->undo_marker = 0; tp 2537 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2540 net/ipv4/tcp_input.c if (tcp_left_out(tp) || tcp_any_retrans_done(sk)) tp 2545 net/ipv4/tcp_input.c tp->high_seq = tp->snd_nxt; tp 2551 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2553 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 2556 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 2577 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2581 net/ipv4/tcp_input.c tp->prior_ssthresh = tcp_current_ssthresh(sk); tp 2582 net/ipv4/tcp_input.c tp->snd_cwnd = tp->snd_cwnd * tp 2583 net/ipv4/tcp_input.c tcp_mss_to_mtu(sk, tp->mss_cache) / tp 2585 net/ipv4/tcp_input.c tp->snd_cwnd_cnt = 0; tp 2586 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 2587 net/ipv4/tcp_input.c tp->snd_ssthresh = tcp_current_ssthresh(sk); tp 2602 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2611 net/ipv4/tcp_input.c tp->retrans_out -= tcp_skb_pcount(skb); tp 2613 net/ipv4/tcp_input.c tcp_skb_mark_lost_uncond_verify(tp, skb); tp 2617 net/ipv4/tcp_input.c tcp_clear_retrans_hints_partial(tp); tp 2619 net/ipv4/tcp_input.c if (!tp->lost_out) tp 2622 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) tp 2623 net/ipv4/tcp_input.c tcp_limit_reno_sacked(tp); tp 2625 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 2633 net/ipv4/tcp_input.c tp->high_seq = tp->snd_nxt; tp 2634 net/ipv4/tcp_input.c tp->snd_ssthresh = tcp_current_ssthresh(sk); tp 2635 net/ipv4/tcp_input.c tp->prior_ssthresh = 0; tp 2636 net/ipv4/tcp_input.c tp->undo_marker = 0; tp 2645 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2648 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) tp 2655 net/ipv4/tcp_input.c tp->prior_ssthresh = 0; tp 2656 net/ipv4/tcp_input.c tcp_init_undo(tp); tp 2660 net/ipv4/tcp_input.c tp->prior_ssthresh = tcp_current_ssthresh(sk); tp 2672 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2673 net/ipv4/tcp_input.c bool recovered = !before(tp->snd_una, tp->high_seq); tp 2675 net/ipv4/tcp_input.c if ((flag & FLAG_SND_UNA_ADVANCED || rcu_access_pointer(tp->fastopen_rsk)) && tp 2679 net/ipv4/tcp_input.c if (tp->frto) { /* F-RTO RFC5682 sec 3.1 (sack enhanced version). */ tp 2687 net/ipv4/tcp_input.c if (after(tp->snd_nxt, tp->high_seq)) { tp 2689 net/ipv4/tcp_input.c tp->frto = 0; /* Step 3.a. loss was real */ tp 2691 net/ipv4/tcp_input.c tp->high_seq = tp->snd_nxt; tp 2697 net/ipv4/tcp_input.c after(tcp_wnd_end(tp), tp->snd_nxt)) { tp 2701 net/ipv4/tcp_input.c tp->frto = 0; tp 2710 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) { tp 2714 net/ipv4/tcp_input.c if (after(tp->snd_nxt, tp->high_seq) && num_dupack) tp 2717 net/ipv4/tcp_input.c tcp_reset_reno_sack(tp); tp 2725 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2727 net/ipv4/tcp_input.c if (tp->undo_marker && tcp_packet_delayed(tp)) { tp 2738 net/ipv4/tcp_input.c if (tp->retrans_out) tp 2742 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 2755 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2760 net/ipv4/tcp_input.c if (unlikely(tcp_is_reno(tp))) { tp 2763 net/ipv4/tcp_input.c u32 prior_retrans = tp->retrans_out; tp 2766 net/ipv4/tcp_input.c if (prior_retrans > tp->retrans_out) tp 2773 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2775 net/ipv4/tcp_input.c return after(tcp_highest_sack_seq(tp), tp 2776 net/ipv4/tcp_input.c tp->snd_una + tp->reordering * tp->mss_cache); tp 2795 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2800 net/ipv4/tcp_input.c if (!tp->packets_out && tp->sacked_out) tp 2801 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 2806 net/ipv4/tcp_input.c tp->prior_ssthresh = 0; tp 2813 net/ipv4/tcp_input.c tcp_verify_left_out(tp); tp 2818 net/ipv4/tcp_input.c WARN_ON(tp->retrans_out != 0); tp 2819 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 2820 net/ipv4/tcp_input.c } else if (!before(tp->snd_una, tp->high_seq)) { tp 2825 net/ipv4/tcp_input.c if (tp->snd_una != tp->high_seq) { tp 2832 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) tp 2833 net/ipv4/tcp_input.c tcp_reset_reno_sack(tp); tp 2845 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) tp 2851 net/ipv4/tcp_input.c do_lost = tcp_is_reno(tp) || tp 2869 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) { tp 2871 net/ipv4/tcp_input.c tcp_reset_reno_sack(tp); tp 2887 net/ipv4/tcp_input.c tp->snd_una == tp->mtu_probe.probe_seq_start) { tp 2890 net/ipv4/tcp_input.c tp->snd_cwnd++; tp 2908 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2910 net/ipv4/tcp_input.c if ((flag & FLAG_ACK_MAYBE_DELAYED) && rtt_us > tcp_min_rtt(tp)) { tp 2917 net/ipv4/tcp_input.c minmax_running_min(&tp->rtt_min, wlen, tcp_jiffies32, tp 2925 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 2941 net/ipv4/tcp_input.c if (seq_rtt_us < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && tp 2943 net/ipv4/tcp_input.c u32 delta = tcp_time_stamp(tp) - tp->rx_opt.rcv_tsecr; tp 2994 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 2999 net/ipv4/tcp_input.c if (rcu_access_pointer(tp->fastopen_rsk)) tp 3002 net/ipv4/tcp_input.c if (!tp->packets_out) { tp 3030 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3033 net/ipv4/tcp_input.c BUG_ON(!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)); tp 3036 net/ipv4/tcp_input.c if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) tp 3076 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3077 net/ipv4/tcp_input.c u32 prior_sacked = tp->sacked_out; tp 3078 net/ipv4/tcp_input.c u32 reord = tp->snd_nxt; /* lowest acked un-retx un-sacked seq */ tp 3100 net/ipv4/tcp_input.c if (after(scb->end_seq, tp->snd_una)) { tp 3102 net/ipv4/tcp_input.c !after(tp->snd_una, scb->seq)) tp 3115 net/ipv4/tcp_input.c tp->retrans_out -= acked_pcount; tp 3126 net/ipv4/tcp_input.c if (!after(scb->end_seq, tp->high_seq)) tp 3131 net/ipv4/tcp_input.c tp->sacked_out -= acked_pcount; tp 3132 net/ipv4/tcp_input.c } else if (tcp_is_sack(tp)) { tp 3133 net/ipv4/tcp_input.c tp->delivered += acked_pcount; tp 3134 net/ipv4/tcp_input.c if (!tcp_skb_spurious_retrans(tp, skb)) tp 3135 net/ipv4/tcp_input.c tcp_rack_advance(tp, sacked, scb->end_seq, tp 3139 net/ipv4/tcp_input.c tp->lost_out -= acked_pcount; tp 3141 net/ipv4/tcp_input.c tp->packets_out -= acked_pcount; tp 3156 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 3163 net/ipv4/tcp_input.c if (unlikely(skb == tp->retransmit_skb_hint)) tp 3164 net/ipv4/tcp_input.c tp->retransmit_skb_hint = NULL; tp 3165 net/ipv4/tcp_input.c if (unlikely(skb == tp->lost_skb_hint)) tp 3166 net/ipv4/tcp_input.c tp->lost_skb_hint = NULL; tp 3174 net/ipv4/tcp_input.c if (likely(between(tp->snd_up, prior_snd_una, tp->snd_una))) tp 3175 net/ipv4/tcp_input.c tp->snd_up = tp->snd_una; tp 3181 net/ipv4/tcp_input.c seq_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, first_ackt); tp 3182 net/ipv4/tcp_input.c ca_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, last_ackt); tp 3184 net/ipv4/tcp_input.c if (pkts_acked == 1 && last_in_flight < tp->mss_cache && tp 3186 net/ipv4/tcp_input.c sack->rate->prior_delivered + 1 == tp->delivered && tp 3196 net/ipv4/tcp_input.c sack_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, sack->first_sackt); tp 3197 net/ipv4/tcp_input.c ca_rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, sack->last_sackt); tp 3205 net/ipv4/tcp_input.c !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) { tp 3209 net/ipv4/tcp_input.c if (tcp_is_reno(tp)) { tp 3227 net/ipv4/tcp_input.c delta = prior_sacked - tp->sacked_out; tp 3228 net/ipv4/tcp_input.c tp->lost_cnt_hint -= min(tp->lost_cnt_hint, delta); tp 3231 net/ipv4/tcp_input.c sack_rtt_us > tcp_stamp_us_delta(tp->tcp_mstamp, tp 3249 net/ipv4/tcp_input.c WARN_ON((int)tp->sacked_out < 0); tp 3250 net/ipv4/tcp_input.c WARN_ON((int)tp->lost_out < 0); tp 3251 net/ipv4/tcp_input.c WARN_ON((int)tp->retrans_out < 0); tp 3252 net/ipv4/tcp_input.c if (!tp->packets_out && tcp_is_sack(tp)) { tp 3254 net/ipv4/tcp_input.c if (tp->lost_out) { tp 3256 net/ipv4/tcp_input.c tp->lost_out, icsk->icsk_ca_state); tp 3257 net/ipv4/tcp_input.c tp->lost_out = 0; tp 3259 net/ipv4/tcp_input.c if (tp->sacked_out) { tp 3261 net/ipv4/tcp_input.c tp->sacked_out, icsk->icsk_ca_state); tp 3262 net/ipv4/tcp_input.c tp->sacked_out = 0; tp 3264 net/ipv4/tcp_input.c if (tp->retrans_out) { tp 3266 net/ipv4/tcp_input.c tp->retrans_out, icsk->icsk_ca_state); tp 3267 net/ipv4/tcp_input.c tp->retrans_out = 0; tp 3278 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 3283 net/ipv4/tcp_input.c if (!after(TCP_SKB_CB(head)->end_seq, tcp_wnd_end(tp))) { tp 3346 net/ipv4/tcp_input.c static inline bool tcp_may_update_window(const struct tcp_sock *tp, tp 3350 net/ipv4/tcp_input.c return after(ack, tp->snd_una) || tp 3351 net/ipv4/tcp_input.c after(ack_seq, tp->snd_wl1) || tp 3352 net/ipv4/tcp_input.c (ack_seq == tp->snd_wl1 && nwin > tp->snd_wnd); tp 3356 net/ipv4/tcp_input.c static void tcp_snd_una_update(struct tcp_sock *tp, u32 ack) tp 3358 net/ipv4/tcp_input.c u32 delta = ack - tp->snd_una; tp 3360 net/ipv4/tcp_input.c sock_owned_by_me((struct sock *)tp); tp 3361 net/ipv4/tcp_input.c tp->bytes_acked += delta; tp 3362 net/ipv4/tcp_input.c tp->snd_una = ack; tp 3366 net/ipv4/tcp_input.c static void tcp_rcv_nxt_update(struct tcp_sock *tp, u32 seq) tp 3368 net/ipv4/tcp_input.c u32 delta = seq - tp->rcv_nxt; tp 3370 net/ipv4/tcp_input.c sock_owned_by_me((struct sock *)tp); tp 3371 net/ipv4/tcp_input.c tp->bytes_received += delta; tp 3372 net/ipv4/tcp_input.c WRITE_ONCE(tp->rcv_nxt, seq); tp 3383 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3388 net/ipv4/tcp_input.c nwin <<= tp->rx_opt.snd_wscale; tp 3390 net/ipv4/tcp_input.c if (tcp_may_update_window(tp, ack, ack_seq, nwin)) { tp 3392 net/ipv4/tcp_input.c tcp_update_wl(tp, ack_seq); tp 3394 net/ipv4/tcp_input.c if (tp->snd_wnd != nwin) { tp 3395 net/ipv4/tcp_input.c tp->snd_wnd = nwin; tp 3400 net/ipv4/tcp_input.c tp->pred_flags = 0; tp 3406 net/ipv4/tcp_input.c if (nwin > tp->max_window) { tp 3407 net/ipv4/tcp_input.c tp->max_window = nwin; tp 3413 net/ipv4/tcp_input.c tcp_snd_una_update(tp, ack); tp 3459 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3466 net/ipv4/tcp_input.c &tp->last_oow_ack_time)) tp 3486 net/ipv4/tcp_input.c static void tcp_store_ts_recent(struct tcp_sock *tp) tp 3488 net/ipv4/tcp_input.c tp->rx_opt.ts_recent = tp->rx_opt.rcv_tsval; tp 3489 net/ipv4/tcp_input.c tp->rx_opt.ts_recent_stamp = ktime_get_seconds(); tp 3492 net/ipv4/tcp_input.c static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq) tp 3494 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && !after(seq, tp->rcv_wup)) { tp 3502 net/ipv4/tcp_input.c if (tcp_paws_check(&tp->rx_opt, 0)) tp 3503 net/ipv4/tcp_input.c tcp_store_ts_recent(tp); tp 3514 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3516 net/ipv4/tcp_input.c if (before(ack, tp->tlp_high_seq)) tp 3521 net/ipv4/tcp_input.c tp->tlp_high_seq = 0; tp 3522 net/ipv4/tcp_input.c } else if (after(ack, tp->tlp_high_seq)) { tp 3535 net/ipv4/tcp_input.c tp->tlp_high_seq = 0; tp 3553 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3561 net/ipv4/tcp_input.c if (after(tp->snd_nxt, tp->high_seq)) tp 3563 net/ipv4/tcp_input.c tp->frto = 0; tp 3572 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3575 net/ipv4/tcp_input.c delivered = tp->delivered - prior_delivered; tp 3578 net/ipv4/tcp_input.c tp->delivered_ce += delivered; tp 3588 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 3591 net/ipv4/tcp_input.c u32 prior_snd_una = tp->snd_una; tp 3592 net/ipv4/tcp_input.c bool is_sack_reneg = tp->is_sack_reneg; tp 3596 net/ipv4/tcp_input.c int prior_packets = tp->packets_out; tp 3597 net/ipv4/tcp_input.c u32 delivered = tp->delivered; tp 3598 net/ipv4/tcp_input.c u32 lost = tp->lost; tp 3613 net/ipv4/tcp_input.c if (before(ack, prior_snd_una - tp->max_window)) { tp 3624 net/ipv4/tcp_input.c if (after(ack, tp->snd_nxt)) tp 3638 net/ipv4/tcp_input.c prior_fack = tcp_is_sack(tp) ? tcp_highest_sack_seq(tp) : tp->snd_una; tp 3639 net/ipv4/tcp_input.c rs.prior_in_flight = tcp_packets_in_flight(tp); tp 3645 net/ipv4/tcp_input.c tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); tp 3653 net/ipv4/tcp_input.c tcp_update_wl(tp, ack_seq); tp 3654 net/ipv4/tcp_input.c tcp_snd_una_update(tp, ack); tp 3674 net/ipv4/tcp_input.c if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) { tp 3690 net/ipv4/tcp_input.c tp->rcv_tstamp = tcp_jiffies32; tp 3699 net/ipv4/tcp_input.c if (tp->tlp_high_seq) tp 3720 net/ipv4/tcp_input.c lost = tp->lost - lost; /* freshly marked lost */ tp 3740 net/ipv4/tcp_input.c if (tp->tlp_high_seq) tp 3957 net/ipv4/tcp_input.c static bool tcp_parse_aligned_timestamp(struct tcp_sock *tp, const struct tcphdr *th) tp 3963 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp = 1; tp 3965 net/ipv4/tcp_input.c tp->rx_opt.rcv_tsval = ntohl(*ptr); tp 3968 net/ipv4/tcp_input.c tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset; tp 3970 net/ipv4/tcp_input.c tp->rx_opt.rcv_tsecr = 0; tp 3981 net/ipv4/tcp_input.c const struct tcphdr *th, struct tcp_sock *tp) tp 3987 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp = 0; tp 3989 net/ipv4/tcp_input.c } else if (tp->rx_opt.tstamp_ok && tp 3991 net/ipv4/tcp_input.c if (tcp_parse_aligned_timestamp(tp, th)) tp 3995 net/ipv4/tcp_input.c tcp_parse_options(net, skb, &tp->rx_opt, 1, NULL); tp 3996 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp 3997 net/ipv4/tcp_input.c tp->rx_opt.rcv_tsecr -= tp->tsoffset; tp 4062 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 4068 net/ipv4/tcp_input.c (th->ack && seq == TCP_SKB_CB(skb)->end_seq && seq == tp->rcv_nxt) && tp 4071 net/ipv4/tcp_input.c ack == tp->snd_una && tp 4074 net/ipv4/tcp_input.c !tcp_may_update_window(tp, ack, seq, ntohs(th->window) << tp->rx_opt.snd_wscale) && tp 4077 net/ipv4/tcp_input.c (s32)(tp->rx_opt.ts_recent - tp->rx_opt.rcv_tsval) <= (inet_csk(sk)->icsk_rto * 1024) / HZ); tp 4083 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 4085 net/ipv4/tcp_input.c return !tcp_paws_check(&tp->rx_opt, TCP_PAWS_WINDOW) && tp 4102 net/ipv4/tcp_input.c static inline bool tcp_sequence(const struct tcp_sock *tp, u32 seq, u32 end_seq) tp 4104 net/ipv4/tcp_input.c return !before(end_seq, tp->rcv_wup) && tp 4105 net/ipv4/tcp_input.c !after(seq, tp->rcv_nxt + tcp_receive_window(tp)); tp 4152 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4202 net/ipv4/tcp_input.c skb_rbtree_purge(&tp->out_of_order_queue); tp 4203 net/ipv4/tcp_input.c if (tcp_is_sack(tp)) tp 4204 net/ipv4/tcp_input.c tcp_sack_reset(&tp->rx_opt); tp 4234 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4236 net/ipv4/tcp_input.c if (tcp_is_sack(tp) && sock_net(sk)->ipv4.sysctl_tcp_dsack) { tp 4239 net/ipv4/tcp_input.c if (before(seq, tp->rcv_nxt)) tp 4246 net/ipv4/tcp_input.c tp->rx_opt.dsack = 1; tp 4247 net/ipv4/tcp_input.c tp->duplicate_sack[0].start_seq = seq; tp 4248 net/ipv4/tcp_input.c tp->duplicate_sack[0].end_seq = end_seq; tp 4254 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4256 net/ipv4/tcp_input.c if (!tp->rx_opt.dsack) tp 4259 net/ipv4/tcp_input.c tcp_sack_extend(tp->duplicate_sack, seq, end_seq); tp 4275 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4278 net/ipv4/tcp_input.c before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { tp 4282 net/ipv4/tcp_input.c if (tcp_is_sack(tp) && sock_net(sk)->ipv4.sysctl_tcp_dsack) { tp 4286 net/ipv4/tcp_input.c if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) tp 4287 net/ipv4/tcp_input.c end_seq = tp->rcv_nxt; tp 4298 net/ipv4/tcp_input.c static void tcp_sack_maybe_coalesce(struct tcp_sock *tp) tp 4301 net/ipv4/tcp_input.c struct tcp_sack_block *sp = &tp->selective_acks[0]; tp 4307 net/ipv4/tcp_input.c for (this_sack = 1; this_sack < tp->rx_opt.num_sacks;) { tp 4314 net/ipv4/tcp_input.c tp->rx_opt.num_sacks--; tp 4315 net/ipv4/tcp_input.c for (i = this_sack; i < tp->rx_opt.num_sacks; i++) tp 4325 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4326 net/ipv4/tcp_input.c struct tcp_sack_block *sp = &tp->selective_acks[0]; tp 4327 net/ipv4/tcp_input.c int cur_sacks = tp->rx_opt.num_sacks; tp 4339 net/ipv4/tcp_input.c tcp_sack_maybe_coalesce(tp); tp 4351 net/ipv4/tcp_input.c if (tp->compressed_ack > TCP_FASTRETRANS_THRESH) tp 4354 net/ipv4/tcp_input.c tp->rx_opt.num_sacks--; tp 4364 net/ipv4/tcp_input.c tp->rx_opt.num_sacks++; tp 4369 net/ipv4/tcp_input.c static void tcp_sack_remove(struct tcp_sock *tp) tp 4371 net/ipv4/tcp_input.c struct tcp_sack_block *sp = &tp->selective_acks[0]; tp 4372 net/ipv4/tcp_input.c int num_sacks = tp->rx_opt.num_sacks; tp 4376 net/ipv4/tcp_input.c if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { tp 4377 net/ipv4/tcp_input.c tp->rx_opt.num_sacks = 0; tp 4383 net/ipv4/tcp_input.c if (!before(tp->rcv_nxt, sp->start_seq)) { tp 4387 net/ipv4/tcp_input.c WARN_ON(before(tp->rcv_nxt, sp->end_seq)); tp 4391 net/ipv4/tcp_input.c tp->selective_acks[i-1] = tp->selective_acks[i]; tp 4398 net/ipv4/tcp_input.c tp->rx_opt.num_sacks = num_sacks; tp 4480 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4481 net/ipv4/tcp_input.c __u32 dsack_high = tp->rcv_nxt; tp 4486 net/ipv4/tcp_input.c p = rb_first(&tp->out_of_order_queue); tp 4489 net/ipv4/tcp_input.c if (after(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) tp 4499 net/ipv4/tcp_input.c rb_erase(&skb->rbnode, &tp->out_of_order_queue); tp 4501 net/ipv4/tcp_input.c if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) { tp 4508 net/ipv4/tcp_input.c tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq); tp 4547 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4562 net/ipv4/tcp_input.c tp->pred_flags = 0; tp 4565 net/ipv4/tcp_input.c tp->rcv_ooopack += max_t(u16, 1, skb_shinfo(skb)->gso_segs); tp 4570 net/ipv4/tcp_input.c p = &tp->out_of_order_queue.rb_node; tp 4571 net/ipv4/tcp_input.c if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { tp 4573 net/ipv4/tcp_input.c if (tcp_is_sack(tp)) { tp 4574 net/ipv4/tcp_input.c tp->rx_opt.num_sacks = 1; tp 4575 net/ipv4/tcp_input.c tp->selective_acks[0].start_seq = seq; tp 4576 net/ipv4/tcp_input.c tp->selective_acks[0].end_seq = end_seq; tp 4579 net/ipv4/tcp_input.c rb_insert_color(&skb->rbnode, &tp->out_of_order_queue); tp 4580 net/ipv4/tcp_input.c tp->ooo_last_skb = skb; tp 4587 net/ipv4/tcp_input.c if (tcp_ooo_try_coalesce(sk, tp->ooo_last_skb, tp 4596 net/ipv4/tcp_input.c if (!before(seq, TCP_SKB_CB(tp->ooo_last_skb)->end_seq)) { tp 4597 net/ipv4/tcp_input.c parent = &tp->ooo_last_skb->rbnode; tp 4629 net/ipv4/tcp_input.c &tp->out_of_order_queue); tp 4647 net/ipv4/tcp_input.c rb_insert_color(&skb->rbnode, &tp->out_of_order_queue); tp 4659 net/ipv4/tcp_input.c rb_erase(&skb1->rbnode, &tp->out_of_order_queue); tp 4667 net/ipv4/tcp_input.c tp->ooo_last_skb = skb; tp 4670 net/ipv4/tcp_input.c if (tcp_is_sack(tp)) tp 4751 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 4752 net/ipv4/tcp_input.c int avail = tp->rcv_nxt - tp->copied_seq; tp 4763 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 4776 net/ipv4/tcp_input.c tp->rx_opt.dsack = 0; tp 4782 net/ipv4/tcp_input.c if (TCP_SKB_CB(skb)->seq == tp->rcv_nxt) { tp 4783 net/ipv4/tcp_input.c if (tcp_receive_window(tp) == 0) { tp 4803 net/ipv4/tcp_input.c if (!RB_EMPTY_ROOT(&tp->out_of_order_queue)) { tp 4809 net/ipv4/tcp_input.c if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) tp 4813 net/ipv4/tcp_input.c if (tp->rx_opt.num_sacks) tp 4814 net/ipv4/tcp_input.c tcp_sack_remove(tp); tp 4825 net/ipv4/tcp_input.c if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) { tp 4840 net/ipv4/tcp_input.c if (!before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt + tcp_receive_window(tp))) tp 4843 net/ipv4/tcp_input.c if (before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) { tp 4845 net/ipv4/tcp_input.c tcp_dsack_set(sk, TCP_SKB_CB(skb)->seq, tp->rcv_nxt); tp 4850 net/ipv4/tcp_input.c if (!tcp_receive_window(tp)) { tp 5018 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5023 net/ipv4/tcp_input.c skb = skb_rb_first(&tp->out_of_order_queue); tp 5026 net/ipv4/tcp_input.c tp->ooo_last_skb = skb_rb_last(&tp->out_of_order_queue); tp 5045 net/ipv4/tcp_input.c tcp_collapse(sk, NULL, &tp->out_of_order_queue, tp 5076 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5080 net/ipv4/tcp_input.c if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) tp 5085 net/ipv4/tcp_input.c node = &tp->ooo_last_skb->rbnode; tp 5088 net/ipv4/tcp_input.c rb_erase(node, &tp->out_of_order_queue); tp 5100 net/ipv4/tcp_input.c tp->ooo_last_skb = rb_to_skb(prev); tp 5107 net/ipv4/tcp_input.c if (tp->rx_opt.sack_ok) tp 5108 net/ipv4/tcp_input.c tcp_sack_reset(&tp->rx_opt); tp 5121 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5128 net/ipv4/tcp_input.c tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U * tp->advmss); tp 5138 net/ipv4/tcp_input.c tp->copied_seq, tp->rcv_nxt); tp 5159 net/ipv4/tcp_input.c tp->pred_flags = 0; tp 5165 net/ipv4/tcp_input.c const struct tcp_sock *tp = tcp_sk(sk); tp 5182 net/ipv4/tcp_input.c if (tcp_packets_in_flight(tp) >= tp->snd_cwnd) tp 5196 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5200 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 5232 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5236 net/ipv4/tcp_input.c if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && tp 5242 net/ipv4/tcp_input.c (tp->rcv_nxt - tp->copied_seq < sk->sk_rcvlowat || tp 5243 net/ipv4/tcp_input.c __tcp_select_window(sk) >= tp->rcv_wnd)) || tp 5253 net/ipv4/tcp_input.c if (!ofo_possible || RB_EMPTY_ROOT(&tp->out_of_order_queue)) { tp 5258 net/ipv4/tcp_input.c if (!tcp_is_sack(tp) || tp 5259 net/ipv4/tcp_input.c tp->compressed_ack >= sock_net(sk)->ipv4.sysctl_tcp_comp_sack_nr) tp 5262 net/ipv4/tcp_input.c if (tp->compressed_ack_rcv_nxt != tp->rcv_nxt) { tp 5263 net/ipv4/tcp_input.c tp->compressed_ack_rcv_nxt = tp->rcv_nxt; tp 5264 net/ipv4/tcp_input.c if (tp->compressed_ack > TCP_FASTRETRANS_THRESH) tp 5266 net/ipv4/tcp_input.c tp->compressed_ack - TCP_FASTRETRANS_THRESH); tp 5267 net/ipv4/tcp_input.c tp->compressed_ack = 0; tp 5270 net/ipv4/tcp_input.c if (++tp->compressed_ack <= TCP_FASTRETRANS_THRESH) tp 5273 net/ipv4/tcp_input.c if (hrtimer_is_queued(&tp->compressed_ack_timer)) tp 5278 net/ipv4/tcp_input.c rtt = tp->rcv_rtt_est.rtt_us; tp 5279 net/ipv4/tcp_input.c if (tp->srtt_us && tp->srtt_us < rtt) tp 5280 net/ipv4/tcp_input.c rtt = tp->srtt_us; tp 5285 net/ipv4/tcp_input.c hrtimer_start(&tp->compressed_ack_timer, ns_to_ktime(delay), tp 5310 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5318 net/ipv4/tcp_input.c if (after(tp->copied_seq, ptr)) tp 5331 net/ipv4/tcp_input.c if (before(ptr, tp->rcv_nxt)) tp 5335 net/ipv4/tcp_input.c if (tp->urg_data && !after(ptr, tp->urg_seq)) tp 5356 net/ipv4/tcp_input.c if (tp->urg_seq == tp->copied_seq && tp->urg_data && tp 5357 net/ipv4/tcp_input.c !sock_flag(sk, SOCK_URGINLINE) && tp->copied_seq != tp->rcv_nxt) { tp 5359 net/ipv4/tcp_input.c tp->copied_seq++; tp 5360 net/ipv4/tcp_input.c if (skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq)) { tp 5366 net/ipv4/tcp_input.c tp->urg_data = TCP_URG_NOTYET; tp 5367 net/ipv4/tcp_input.c WRITE_ONCE(tp->urg_seq, ptr); tp 5370 net/ipv4/tcp_input.c tp->pred_flags = 0; tp 5376 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5383 net/ipv4/tcp_input.c if (tp->urg_data == TCP_URG_NOTYET) { tp 5384 net/ipv4/tcp_input.c u32 ptr = tp->urg_seq - ntohl(th->seq) + (th->doff * 4) - tp 5392 net/ipv4/tcp_input.c tp->urg_data = TCP_URG_VALID | tmp; tp 5409 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5411 net/ipv4/tcp_input.c return unlikely(TCP_SKB_CB(skb)->seq == (tp->rcv_nxt - 1) && tp 5422 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5426 net/ipv4/tcp_input.c if (tcp_fast_parse_options(sock_net(sk), skb, th, tp) && tp 5427 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp && tp 5433 net/ipv4/tcp_input.c &tp->last_oow_ack_time)) tp 5441 net/ipv4/tcp_input.c if (!tcp_sequence(tp, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq)) { tp 5453 net/ipv4/tcp_input.c &tp->last_oow_ack_time)) tp 5472 net/ipv4/tcp_input.c if (TCP_SKB_CB(skb)->seq == tp->rcv_nxt || tp 5475 net/ipv4/tcp_input.c } else if (tcp_is_sack(tp) && tp->rx_opt.num_sacks > 0) { tp 5476 net/ipv4/tcp_input.c struct tcp_sack_block *sp = &tp->selective_acks[0]; tp 5480 net/ipv4/tcp_input.c for (this_sack = 1; this_sack < tp->rx_opt.num_sacks; tp 5498 net/ipv4/tcp_input.c if (tp->syn_fastopen && !tp->data_segs_in && tp 5553 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5559 net/ipv4/tcp_input.c tcp_mstamp_refresh(tp); tp 5577 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp = 0; tp 5588 net/ipv4/tcp_input.c if ((tcp_flag_word(th) & TCP_HP_BITS) == tp->pred_flags && tp 5589 net/ipv4/tcp_input.c TCP_SKB_CB(skb)->seq == tp->rcv_nxt && tp 5590 net/ipv4/tcp_input.c !after(TCP_SKB_CB(skb)->ack_seq, tp->snd_nxt)) { tp 5591 net/ipv4/tcp_input.c int tcp_header_len = tp->tcp_header_len; tp 5601 net/ipv4/tcp_input.c if (!tcp_parse_aligned_timestamp(tp, th)) tp 5605 net/ipv4/tcp_input.c if ((s32)(tp->rx_opt.rcv_tsval - tp->rx_opt.ts_recent) < 0) tp 5624 net/ipv4/tcp_input.c tp->rcv_nxt == tp->rcv_wup) tp 5625 net/ipv4/tcp_input.c tcp_store_ts_recent(tp); tp 5637 net/ipv4/tcp_input.c tp->rcv_rtt_last_tsecr = tp->rx_opt.rcv_tsecr; tp 5659 net/ipv4/tcp_input.c tp->rcv_nxt == tp->rcv_wup) tp 5660 net/ipv4/tcp_input.c tcp_store_ts_recent(tp); tp 5672 net/ipv4/tcp_input.c if (TCP_SKB_CB(skb)->ack_seq != tp->snd_una) { tp 5731 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5743 net/ipv4/tcp_input.c if (tp->total_retrans > 1 && tp->undo_marker) tp 5744 net/ipv4/tcp_input.c tp->snd_cwnd = 1; tp 5746 net/ipv4/tcp_input.c tp->snd_cwnd = tcp_init_cwnd(tp, __sk_dst_get(sk)); tp 5747 net/ipv4/tcp_input.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 5756 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5773 net/ipv4/tcp_input.c tp->lsndtime = tcp_jiffies32; tp 5776 net/ipv4/tcp_input.c inet_csk_reset_keepalive_timer(sk, keepalive_time_when(tp)); tp 5778 net/ipv4/tcp_input.c if (!tp->rx_opt.snd_wscale) tp 5779 net/ipv4/tcp_input.c __tcp_fast_path_on(tp, tp->snd_wnd); tp 5781 net/ipv4/tcp_input.c tp->pred_flags = 0; tp 5787 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5788 net/ipv4/tcp_input.c struct sk_buff *data = tp->syn_data ? tcp_rtx_queue_head(sk) : NULL; tp 5789 net/ipv4/tcp_input.c u16 mss = tp->rx_opt.mss_clamp, try_exp = 0; tp 5792 net/ipv4/tcp_input.c if (mss == tp->rx_opt.user_mss) { tp 5802 net/ipv4/tcp_input.c if (!tp->syn_fastopen) { tp 5805 net/ipv4/tcp_input.c } else if (tp->total_retrans) { tp 5812 net/ipv4/tcp_input.c } else if (cookie->len < 0 && !tp->syn_data) { tp 5817 net/ipv4/tcp_input.c try_exp = tp->syn_fastopen_exp ? 2 : 1; tp 5832 net/ipv4/tcp_input.c tp->syn_data_acked = tp->syn_data; tp 5833 net/ipv4/tcp_input.c if (tp->syn_data_acked) { tp 5836 net/ipv4/tcp_input.c if (tp->delivered > 1) tp 5837 net/ipv4/tcp_input.c --tp->delivered; tp 5845 net/ipv4/tcp_input.c static void smc_check_reset_syn(struct tcp_sock *tp) tp 5849 net/ipv4/tcp_input.c if (tp->syn_smc && !tp->rx_opt.smc_ok) tp 5850 net/ipv4/tcp_input.c tp->syn_smc = 0; tp 5857 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5864 net/ipv4/tcp_input.c syn_stamp = tp->retrans_stamp; tp 5865 net/ipv4/tcp_input.c if (tp->undo_marker && syn_stamp && tp->rx_opt.saw_tstamp && tp 5866 net/ipv4/tcp_input.c syn_stamp == tp->rx_opt.rcv_tsecr) tp 5867 net/ipv4/tcp_input.c tp->undo_marker = 0; tp 5874 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 5876 net/ipv4/tcp_input.c int saved_clamp = tp->rx_opt.mss_clamp; tp 5879 net/ipv4/tcp_input.c tcp_parse_options(sock_net(sk), skb, &tp->rx_opt, 0, &foc); tp 5880 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp 5881 net/ipv4/tcp_input.c tp->rx_opt.rcv_tsecr -= tp->tsoffset; tp 5892 net/ipv4/tcp_input.c if (!after(TCP_SKB_CB(skb)->ack_seq, tp->snd_una) || tp 5893 net/ipv4/tcp_input.c after(TCP_SKB_CB(skb)->ack_seq, tp->snd_nxt)) tp 5896 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && tp 5897 net/ipv4/tcp_input.c !between(tp->rx_opt.rcv_tsecr, tp->retrans_stamp, tp 5898 net/ipv4/tcp_input.c tcp_time_stamp(tp))) { tp 5934 net/ipv4/tcp_input.c tcp_ecn_rcv_synack(tp, th); tp 5936 net/ipv4/tcp_input.c tcp_init_wl(tp, TCP_SKB_CB(skb)->seq); tp 5943 net/ipv4/tcp_input.c WRITE_ONCE(tp->rcv_nxt, TCP_SKB_CB(skb)->seq + 1); tp 5944 net/ipv4/tcp_input.c tp->rcv_wup = TCP_SKB_CB(skb)->seq + 1; tp 5949 net/ipv4/tcp_input.c tp->snd_wnd = ntohs(th->window); tp 5951 net/ipv4/tcp_input.c if (!tp->rx_opt.wscale_ok) { tp 5952 net/ipv4/tcp_input.c tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0; tp 5953 net/ipv4/tcp_input.c tp->window_clamp = min(tp->window_clamp, 65535U); tp 5956 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp) { tp 5957 net/ipv4/tcp_input.c tp->rx_opt.tstamp_ok = 1; tp 5958 net/ipv4/tcp_input.c tp->tcp_header_len = tp 5960 net/ipv4/tcp_input.c tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; tp 5961 net/ipv4/tcp_input.c tcp_store_ts_recent(tp); tp 5963 net/ipv4/tcp_input.c tp->tcp_header_len = sizeof(struct tcphdr); tp 5972 net/ipv4/tcp_input.c WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp 5974 net/ipv4/tcp_input.c smc_check_reset_syn(tp); tp 5980 net/ipv4/tcp_input.c fastopen_fail = (tp->syn_fastopen || tp->syn_data) && tp 6026 net/ipv4/tcp_input.c if (tp->rx_opt.ts_recent_stamp && tp->rx_opt.saw_tstamp && tp 6027 net/ipv4/tcp_input.c tcp_paws_reject(&tp->rx_opt, 0)) tp 6037 net/ipv4/tcp_input.c if (tp->rx_opt.saw_tstamp) { tp 6038 net/ipv4/tcp_input.c tp->rx_opt.tstamp_ok = 1; tp 6039 net/ipv4/tcp_input.c tcp_store_ts_recent(tp); tp 6040 net/ipv4/tcp_input.c tp->tcp_header_len = tp 6043 net/ipv4/tcp_input.c tp->tcp_header_len = sizeof(struct tcphdr); tp 6046 net/ipv4/tcp_input.c WRITE_ONCE(tp->rcv_nxt, TCP_SKB_CB(skb)->seq + 1); tp 6047 net/ipv4/tcp_input.c WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp 6048 net/ipv4/tcp_input.c tp->rcv_wup = TCP_SKB_CB(skb)->seq + 1; tp 6053 net/ipv4/tcp_input.c tp->snd_wnd = ntohs(th->window); tp 6054 net/ipv4/tcp_input.c tp->snd_wl1 = TCP_SKB_CB(skb)->seq; tp 6055 net/ipv4/tcp_input.c tp->max_window = tp->snd_wnd; tp 6057 net/ipv4/tcp_input.c tcp_ecn_rcv_syn(tp, th); tp 6086 net/ipv4/tcp_input.c tcp_clear_options(&tp->rx_opt); tp 6087 net/ipv4/tcp_input.c tp->rx_opt.mss_clamp = saved_clamp; tp 6091 net/ipv4/tcp_input.c tcp_clear_options(&tp->rx_opt); tp 6092 net/ipv4/tcp_input.c tp->rx_opt.mss_clamp = saved_clamp; tp 6137 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 6175 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp = 0; tp 6176 net/ipv4/tcp_input.c tcp_mstamp_refresh(tp); tp 6188 net/ipv4/tcp_input.c tcp_mstamp_refresh(tp); tp 6189 net/ipv4/tcp_input.c tp->rx_opt.saw_tstamp = 0; tp 6190 net/ipv4/tcp_input.c req = rcu_dereference_protected(tp->fastopen_rsk, tp 6221 net/ipv4/tcp_input.c tp->delivered++; /* SYN-ACK delivery isn't tracked in tcp_ack */ tp 6222 net/ipv4/tcp_input.c if (!tp->srtt_us) tp 6229 net/ipv4/tcp_input.c tp->retrans_stamp = 0; tp 6231 net/ipv4/tcp_input.c WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp 6244 net/ipv4/tcp_input.c tp->snd_una = TCP_SKB_CB(skb)->ack_seq; tp 6245 net/ipv4/tcp_input.c tp->snd_wnd = ntohs(th->window) << tp->rx_opt.snd_wscale; tp 6246 net/ipv4/tcp_input.c tcp_init_wl(tp, TCP_SKB_CB(skb)->seq); tp 6248 net/ipv4/tcp_input.c if (tp->rx_opt.tstamp_ok) tp 6249 net/ipv4/tcp_input.c tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; tp 6255 net/ipv4/tcp_input.c tp->lsndtime = tcp_jiffies32; tp 6258 net/ipv4/tcp_input.c tcp_fast_path_on(tp); tp 6267 net/ipv4/tcp_input.c if (tp->snd_una != tp->write_seq) tp 6281 net/ipv4/tcp_input.c if (tp->linger2 < 0) { tp 6287 net/ipv4/tcp_input.c after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt)) { tp 6289 net/ipv4/tcp_input.c if (tp->syn_fastopen && th->fin) tp 6315 net/ipv4/tcp_input.c if (tp->snd_una == tp->write_seq) { tp 6322 net/ipv4/tcp_input.c if (tp->snd_una == tp->write_seq) { tp 6338 net/ipv4/tcp_input.c if (!before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) tp 6349 net/ipv4/tcp_input.c after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt)) { tp 6535 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 6550 net/ipv4/tcp_input.c mss = tcp_parse_mss_option(th, tp->rx_opt.user_mss); tp 6565 net/ipv4/tcp_input.c struct tcp_sock *tp = tcp_sk(sk); tp 6598 net/ipv4/tcp_input.c tmp_opt.user_mss = tp->rx_opt.user_mss; tp 110 net/ipv4/tcp_ipv4.c struct tcp_sock *tp = tcp_sk(sk); tp 166 net/ipv4/tcp_ipv4.c if (likely(!tp->repair)) { tp 171 net/ipv4/tcp_ipv4.c WRITE_ONCE(tp->write_seq, seq); tp 172 net/ipv4/tcp_ipv4.c tp->rx_opt.ts_recent = tcptw->tw_ts_recent; tp 173 net/ipv4/tcp_ipv4.c tp->rx_opt.ts_recent_stamp = tcptw->tw_ts_recent_stamp; tp 203 net/ipv4/tcp_ipv4.c struct tcp_sock *tp = tcp_sk(sk); tp 253 net/ipv4/tcp_ipv4.c if (tp->rx_opt.ts_recent_stamp && inet->inet_daddr != daddr) { tp 255 net/ipv4/tcp_ipv4.c tp->rx_opt.ts_recent = 0; tp 256 net/ipv4/tcp_ipv4.c tp->rx_opt.ts_recent_stamp = 0; tp 257 net/ipv4/tcp_ipv4.c if (likely(!tp->repair)) tp 258 net/ipv4/tcp_ipv4.c WRITE_ONCE(tp->write_seq, 0); tp 268 net/ipv4/tcp_ipv4.c tp->rx_opt.mss_clamp = TCP_MSS_DEFAULT; tp 294 net/ipv4/tcp_ipv4.c if (likely(!tp->repair)) { tp 295 net/ipv4/tcp_ipv4.c if (!tp->write_seq) tp 296 net/ipv4/tcp_ipv4.c WRITE_ONCE(tp->write_seq, tp 301 net/ipv4/tcp_ipv4.c tp->tsoffset = secure_tcp_ts_off(sock_net(sk), tp 429 net/ipv4/tcp_ipv4.c struct tcp_sock *tp; tp 482 net/ipv4/tcp_ipv4.c tp = tcp_sk(sk); tp 484 net/ipv4/tcp_ipv4.c fastopen = rcu_dereference(tp->fastopen_rsk); tp 485 net/ipv4/tcp_ipv4.c snd_una = fastopen ? tcp_rsk(fastopen)->snt_isn : tp->snd_una; tp 487 net/ipv4/tcp_ipv4.c !between(seq, snd_una, tp->snd_nxt)) { tp 515 net/ipv4/tcp_ipv4.c tp->mtu_info = info; tp 530 net/ipv4/tcp_ipv4.c if (seq != tp->snd_una || !icsk->icsk_retransmits || tp 542 net/ipv4/tcp_ipv4.c icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) : tp 547 net/ipv4/tcp_ipv4.c tcp_mstamp_refresh(tp); tp 548 net/ipv4/tcp_ipv4.c delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb)); tp 992 net/ipv4/tcp_ipv4.c const struct tcp_sock *tp = tcp_sk(sk); tp 1000 net/ipv4/tcp_ipv4.c md5sig = rcu_dereference_check(tp->md5sig_info, tp 1034 net/ipv4/tcp_ipv4.c const struct tcp_sock *tp = tcp_sk(sk); tp 1040 net/ipv4/tcp_ipv4.c md5sig = rcu_dereference_check(tp->md5sig_info, tp 1075 net/ipv4/tcp_ipv4.c struct tcp_sock *tp = tcp_sk(sk); tp 1086 net/ipv4/tcp_ipv4.c md5sig = rcu_dereference_protected(tp->md5sig_info, tp 1095 net/ipv4/tcp_ipv4.c rcu_assign_pointer(tp->md5sig_info, md5sig); tp 1135 net/ipv4/tcp_ipv4.c struct tcp_sock *tp = tcp_sk(sk); tp 1140 net/ipv4/tcp_ipv4.c md5sig = rcu_dereference_protected(tp->md5sig_info, 1); tp 2095 net/ipv4/tcp_ipv4.c struct tcp_sock *tp = tcp_sk(sk); tp 2112 net/ipv4/tcp_ipv4.c skb_rbtree_purge(&tp->out_of_order_queue); tp 2116 net/ipv4/tcp_ipv4.c if (tp->md5sig_info) { tp 2118 net/ipv4/tcp_ipv4.c kfree_rcu(rcu_dereference_protected(tp->md5sig_info, 1), rcu); tp 2119 net/ipv4/tcp_ipv4.c tp->md5sig_info = NULL; tp 2127 net/ipv4/tcp_ipv4.c BUG_ON(rcu_access_pointer(tp->fastopen_rsk)); tp 2130 net/ipv4/tcp_ipv4.c tcp_free_fastopen_req(tp); tp 2132 net/ipv4/tcp_ipv4.c tcp_saved_syn_free(tp); tp 2428 net/ipv4/tcp_ipv4.c const struct tcp_sock *tp = tcp_sk(sk); tp 2462 net/ipv4/tcp_ipv4.c rx_queue = max_t(int, READ_ONCE(tp->rcv_nxt) - tp 2463 net/ipv4/tcp_ipv4.c READ_ONCE(tp->copied_seq), 0); tp 2468 net/ipv4/tcp_ipv4.c READ_ONCE(tp->write_seq) - tp->snd_una, tp 2480 net/ipv4/tcp_ipv4.c tp->snd_cwnd, tp 2483 net/ipv4/tcp_ipv4.c (tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh)); tp 136 net/ipv4/tcp_lp.c struct tcp_sock *tp = tcp_sk(sk); tp 147 net/ipv4/tcp_lp.c if (tp->rx_opt.rcv_tsval == lp->remote_ref_time || tp 148 net/ipv4/tcp_lp.c tp->rx_opt.rcv_tsecr == lp->local_ref_time) tp 152 net/ipv4/tcp_lp.c (tp->rx_opt.rcv_tsval - lp->remote_ref_time) / tp 153 net/ipv4/tcp_lp.c (tp->rx_opt.rcv_tsecr - lp->local_ref_time); tp 171 net/ipv4/tcp_lp.c lp->remote_ref_time = tp->rx_opt.rcv_tsval; tp 172 net/ipv4/tcp_lp.c lp->local_ref_time = tp->rx_opt.rcv_tsecr; tp 189 net/ipv4/tcp_lp.c struct tcp_sock *tp = tcp_sk(sk); tp 197 net/ipv4/tcp_lp.c tp->rx_opt.rcv_tsval * (LP_RESOL / lp->remote_hz) - tp 198 net/ipv4/tcp_lp.c tp->rx_opt.rcv_tsecr * (LP_RESOL / TCP_TS_HZ); tp 266 net/ipv4/tcp_lp.c struct tcp_sock *tp = tcp_sk(sk); tp 268 net/ipv4/tcp_lp.c u32 now = tcp_time_stamp(tp); tp 275 net/ipv4/tcp_lp.c delta = now - tp->rx_opt.rcv_tsecr; tp 293 net/ipv4/tcp_lp.c tp->snd_cwnd, lp->remote_hz, lp->owd_min, lp->owd_max, tp 309 net/ipv4/tcp_lp.c tp->snd_cwnd = 1U; tp 314 net/ipv4/tcp_lp.c tp->snd_cwnd = max(tp->snd_cwnd >> 1U, 1U); tp 324 net/ipv4/tcp_metrics.c struct tcp_sock *tp = tcp_sk(sk); tp 336 net/ipv4/tcp_metrics.c if (icsk->icsk_backoff || !tp->srtt_us) { tp 352 net/ipv4/tcp_metrics.c m = rtt - tp->srtt_us; tp 360 net/ipv4/tcp_metrics.c rtt = tp->srtt_us; tp 374 net/ipv4/tcp_metrics.c if (m < tp->mdev_us) tp 375 net/ipv4/tcp_metrics.c m = tp->mdev_us; tp 386 net/ipv4/tcp_metrics.c if (tcp_in_initial_slowstart(tp)) { tp 390 net/ipv4/tcp_metrics.c if (val && (tp->snd_cwnd >> 1) > val) tp 392 net/ipv4/tcp_metrics.c tp->snd_cwnd >> 1); tp 396 net/ipv4/tcp_metrics.c if (tp->snd_cwnd > val) tp 398 net/ipv4/tcp_metrics.c tp->snd_cwnd); tp 400 net/ipv4/tcp_metrics.c } else if (!tcp_in_slow_start(tp) && tp 405 net/ipv4/tcp_metrics.c max(tp->snd_cwnd >> 1, tp->snd_ssthresh)); tp 408 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_CWND, (val + tp->snd_cwnd) >> 1); tp 417 net/ipv4/tcp_metrics.c (val + tp->snd_ssthresh) >> 1); tp 421 net/ipv4/tcp_metrics.c if (val && tp->snd_ssthresh > val) tp 423 net/ipv4/tcp_metrics.c tp->snd_ssthresh); tp 427 net/ipv4/tcp_metrics.c if (val < tp->reordering && tp 428 net/ipv4/tcp_metrics.c tp->reordering != net->ipv4.sysctl_tcp_reordering) tp 430 net/ipv4/tcp_metrics.c tp->reordering); tp 443 net/ipv4/tcp_metrics.c struct tcp_sock *tp = tcp_sk(sk); tp 459 net/ipv4/tcp_metrics.c tp->snd_cwnd_clamp = tcp_metric_get(tm, TCP_METRIC_CWND); tp 463 net/ipv4/tcp_metrics.c tp->snd_ssthresh = val; tp 464 net/ipv4/tcp_metrics.c if (tp->snd_ssthresh > tp->snd_cwnd_clamp) tp 465 net/ipv4/tcp_metrics.c tp->snd_ssthresh = tp->snd_cwnd_clamp; tp 470 net/ipv4/tcp_metrics.c tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp 473 net/ipv4/tcp_metrics.c if (val && tp->reordering != val) tp 474 net/ipv4/tcp_metrics.c tp->reordering = val; tp 499 net/ipv4/tcp_metrics.c if (crtt > tp->srtt_us) { tp 503 net/ipv4/tcp_metrics.c } else if (tp->srtt_us == 0) { tp 510 net/ipv4/tcp_metrics.c tp->rttvar_us = jiffies_to_usecs(TCP_TIMEOUT_FALLBACK); tp 511 net/ipv4/tcp_metrics.c tp->mdev_us = tp->mdev_max_us = tp->rttvar_us; tp 256 net/ipv4/tcp_minisocks.c const struct tcp_sock *tp = tcp_sk(sk); tp 270 net/ipv4/tcp_minisocks.c tw->tw_rcv_wscale = tp->rx_opt.rcv_wscale; tp 271 net/ipv4/tcp_minisocks.c tcptw->tw_rcv_nxt = tp->rcv_nxt; tp 272 net/ipv4/tcp_minisocks.c tcptw->tw_snd_nxt = tp->snd_nxt; tp 273 net/ipv4/tcp_minisocks.c tcptw->tw_rcv_wnd = tcp_receive_window(tp); tp 274 net/ipv4/tcp_minisocks.c tcptw->tw_ts_recent = tp->rx_opt.ts_recent; tp 275 net/ipv4/tcp_minisocks.c tcptw->tw_ts_recent_stamp = tp->rx_opt.ts_recent_stamp; tp 276 net/ipv4/tcp_minisocks.c tcptw->tw_ts_offset = tp->tsoffset; tp 278 net/ipv4/tcp_minisocks.c tcptw->tw_tx_delay = tp->tcp_tx_delay; tp 304 net/ipv4/tcp_minisocks.c key = tp->af_specific->md5_lookup(sk, sk); tp 365 net/ipv4/tcp_minisocks.c const struct tcp_sock *tp = tcp_sk(sk_listener); tp 372 net/ipv4/tcp_minisocks.c mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); tp 373 net/ipv4/tcp_minisocks.c window_clamp = READ_ONCE(tp->window_clamp); tp 400 net/ipv4/tcp_minisocks.c static void tcp_ecn_openreq_child(struct tcp_sock *tp, tp 403 net/ipv4/tcp_minisocks.c tp->ecn_flags = inet_rsk(req)->ecn_ok ? TCP_ECN_OK : 0; tp 126 net/ipv4/tcp_nv.c struct tcp_sock *tp = tcp_sk(sk); tp 133 net/ipv4/tcp_nv.c ca->nv_rtt_start_seq = tp->snd_una; tp 135 net/ipv4/tcp_nv.c ca->nv_last_snd_una = tp->snd_una; tp 183 net/ipv4/tcp_nv.c struct tcp_sock *tp = tcp_sk(sk); tp 194 net/ipv4/tcp_nv.c if (tcp_in_slow_start(tp)) { tp 195 net/ipv4/tcp_nv.c acked = tcp_slow_start(tp, acked); tp 201 net/ipv4/tcp_nv.c cnt = tp->snd_cwnd << -ca->cwnd_growth_factor; tp 202 net/ipv4/tcp_nv.c tcp_cong_avoid_ai(tp, cnt, acked); tp 204 net/ipv4/tcp_nv.c cnt = max(4U, tp->snd_cwnd >> ca->cwnd_growth_factor); tp 205 net/ipv4/tcp_nv.c tcp_cong_avoid_ai(tp, cnt, acked); tp 211 net/ipv4/tcp_nv.c const struct tcp_sock *tp = tcp_sk(sk); tp 213 net/ipv4/tcp_nv.c return max((tp->snd_cwnd * nv_loss_dec_factor) >> 10, 2U); tp 243 net/ipv4/tcp_nv.c struct tcp_sock *tp = tcp_sk(sk); tp 261 net/ipv4/tcp_nv.c if (ca->nv_catchup && tp->snd_cwnd >= nv_min_cwnd) { tp 266 net/ipv4/tcp_nv.c bytes_acked = tp->snd_una - ca->nv_last_snd_una; tp 267 net/ipv4/tcp_nv.c ca->nv_last_snd_una = tp->snd_una; tp 338 net/ipv4/tcp_nv.c if (before(ca->nv_rtt_start_seq, tp->snd_una)) { tp 339 net/ipv4/tcp_nv.c ca->nv_rtt_start_seq = tp->snd_nxt; tp 350 net/ipv4/tcp_nv.c bytes_acked >= (ca->nv_min_cwnd - 1) * tp->mss_cache && tp 355 net/ipv4/tcp_nv.c ca->nv_rtt_start_seq = tp->snd_nxt + tp 356 net/ipv4/tcp_nv.c ca->nv_min_cwnd * tp->mss_cache; tp 368 net/ipv4/tcp_nv.c 80000ULL * tp->mss_cache); tp 375 net/ipv4/tcp_nv.c if (tp->snd_cwnd > max_win) { tp 385 net/ipv4/tcp_nv.c } else if (tp->snd_ssthresh == TCP_INFINITE_SSTHRESH) { tp 400 net/ipv4/tcp_nv.c tp->snd_ssthresh = tp 402 net/ipv4/tcp_nv.c if (tp->snd_cwnd - max_win > 2) { tp 406 net/ipv4/tcp_nv.c dec = max(2U, ((tp->snd_cwnd - max_win) * tp 408 net/ipv4/tcp_nv.c tp->snd_cwnd -= dec; tp 410 net/ipv4/tcp_nv.c tp->snd_cwnd = max_win; tp 415 net/ipv4/tcp_nv.c } else if (tp->snd_cwnd <= max_win - nv_pad_buffer) { tp 448 net/ipv4/tcp_nv.c if (tp->snd_cwnd < nv_min_cwnd) tp 449 net/ipv4/tcp_nv.c tp->snd_cwnd = nv_min_cwnd; tp 52 net/ipv4/tcp_output.c void tcp_mstamp_refresh(struct tcp_sock *tp) tp 56 net/ipv4/tcp_output.c tp->tcp_clock_cache = val; tp 57 net/ipv4/tcp_output.c tp->tcp_mstamp = div_u64(val, NSEC_PER_USEC); tp 67 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 68 net/ipv4/tcp_output.c unsigned int prior_packets = tp->packets_out; tp 70 net/ipv4/tcp_output.c WRITE_ONCE(tp->snd_nxt, TCP_SKB_CB(skb)->end_seq); tp 75 net/ipv4/tcp_output.c if (tp->highest_sack == NULL) tp 76 net/ipv4/tcp_output.c tp->highest_sack = skb; tp 78 net/ipv4/tcp_output.c tp->packets_out += tcp_skb_pcount(skb); tp 95 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 97 net/ipv4/tcp_output.c if (!before(tcp_wnd_end(tp), tp->snd_nxt) || tp 98 net/ipv4/tcp_output.c (tp->rx_opt.wscale_ok && tp 99 net/ipv4/tcp_output.c ((tp->snd_nxt - tcp_wnd_end(tp)) < (1 << tp->rx_opt.rcv_wscale)))) tp 100 net/ipv4/tcp_output.c return tp->snd_nxt; tp 102 net/ipv4/tcp_output.c return tcp_wnd_end(tp); tp 121 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 123 net/ipv4/tcp_output.c int mss = tp->advmss; tp 130 net/ipv4/tcp_output.c tp->advmss = mss; tp 142 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 143 net/ipv4/tcp_output.c u32 restart_cwnd = tcp_init_cwnd(tp, __sk_dst_get(sk)); tp 144 net/ipv4/tcp_output.c u32 cwnd = tp->snd_cwnd; tp 148 net/ipv4/tcp_output.c tp->snd_ssthresh = tcp_current_ssthresh(sk); tp 153 net/ipv4/tcp_output.c tp->snd_cwnd = max(cwnd, restart_cwnd); tp 154 net/ipv4/tcp_output.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 155 net/ipv4/tcp_output.c tp->snd_cwnd_used = 0; tp 159 net/ipv4/tcp_output.c static void tcp_event_data_sent(struct tcp_sock *tp, tp 165 net/ipv4/tcp_output.c if (tcp_packets_in_flight(tp) == 0) tp 173 net/ipv4/tcp_output.c if (before(tp->lsndtime, icsk->icsk_ack.lrcvtime) && tp 177 net/ipv4/tcp_output.c tp->lsndtime = now; tp 184 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 186 net/ipv4/tcp_output.c if (unlikely(tp->compressed_ack > TCP_FASTRETRANS_THRESH)) { tp 188 net/ipv4/tcp_output.c tp->compressed_ack - TCP_FASTRETRANS_THRESH); tp 189 net/ipv4/tcp_output.c tp->compressed_ack = TCP_FASTRETRANS_THRESH; tp 190 net/ipv4/tcp_output.c if (hrtimer_try_to_cancel(&tp->compressed_ack_timer) == 1) tp 194 net/ipv4/tcp_output.c if (unlikely(rcv_nxt != tp->rcv_nxt)) tp 260 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 261 net/ipv4/tcp_output.c u32 old_win = tp->rcv_wnd; tp 262 net/ipv4/tcp_output.c u32 cur_win = tcp_receive_window(tp); tp 277 net/ipv4/tcp_output.c new_win = ALIGN(cur_win, 1 << tp->rx_opt.rcv_wscale); tp 279 net/ipv4/tcp_output.c tp->rcv_wnd = new_win; tp 280 net/ipv4/tcp_output.c tp->rcv_wup = tp->rcv_nxt; tp 285 net/ipv4/tcp_output.c if (!tp->rx_opt.rcv_wscale && tp 289 net/ipv4/tcp_output.c new_win = min(new_win, (65535U << tp->rx_opt.rcv_wscale)); tp 292 net/ipv4/tcp_output.c new_win >>= tp->rx_opt.rcv_wscale; tp 296 net/ipv4/tcp_output.c tp->pred_flags = 0; tp 310 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 313 net/ipv4/tcp_output.c if (!(tp->ecn_flags & TCP_ECN_OK)) tp 323 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 335 net/ipv4/tcp_output.c tp->ecn_flags = 0; tp 339 net/ipv4/tcp_output.c tp->ecn_flags = TCP_ECN_OK; tp 367 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 369 net/ipv4/tcp_output.c if (tp->ecn_flags & TCP_ECN_OK) { tp 372 net/ipv4/tcp_output.c !before(TCP_SKB_CB(skb)->seq, tp->snd_nxt)) { tp 374 net/ipv4/tcp_output.c if (tp->ecn_flags & TCP_ECN_QUEUE_CWR) { tp 375 net/ipv4/tcp_output.c tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; tp 383 net/ipv4/tcp_output.c if (tp->ecn_flags & TCP_ECN_DEMAND_CWR) tp 406 net/ipv4/tcp_output.c static inline bool tcp_urg_mode(const struct tcp_sock *tp) tp 408 net/ipv4/tcp_output.c return tp->snd_una != tp->snd_up; tp 457 net/ipv4/tcp_output.c static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, tp 508 net/ipv4/tcp_output.c struct tcp_sack_block *sp = tp->rx_opt.dsack ? tp 509 net/ipv4/tcp_output.c tp->duplicate_sack : tp->selective_acks; tp 524 net/ipv4/tcp_output.c tp->rx_opt.dsack = 0; tp 554 net/ipv4/tcp_output.c static void smc_set_option(const struct tcp_sock *tp, tp 560 net/ipv4/tcp_output.c if (tp->syn_smc) { tp 570 net/ipv4/tcp_output.c static void smc_set_option_cond(const struct tcp_sock *tp, tp 577 net/ipv4/tcp_output.c if (tp->syn_smc && ireq->smc_ok) { tp 594 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 596 net/ipv4/tcp_output.c struct tcp_fastopen_request *fastopen = tp->fastopen_req; tp 601 net/ipv4/tcp_output.c rcu_access_pointer(tp->md5sig_info)) { tp 602 net/ipv4/tcp_output.c *md5 = tp->af_specific->md5_lookup(sk, sk); tp 624 net/ipv4/tcp_output.c opts->tsval = tcp_skb_timestamp(skb) + tp->tsoffset; tp 625 net/ipv4/tcp_output.c opts->tsecr = tp->rx_opt.ts_recent; tp 629 net/ipv4/tcp_output.c opts->ws = tp->rx_opt.rcv_wscale; tp 649 net/ipv4/tcp_output.c tp->syn_fastopen = 1; tp 650 net/ipv4/tcp_output.c tp->syn_fastopen_exp = fastopen->cookie.exp ? 1 : 0; tp 654 net/ipv4/tcp_output.c smc_set_option(tp, opts, &remaining); tp 729 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 738 net/ipv4/tcp_output.c rcu_access_pointer(tp->md5sig_info)) { tp 739 net/ipv4/tcp_output.c *md5 = tp->af_specific->md5_lookup(sk, sk); tp 747 net/ipv4/tcp_output.c if (likely(tp->rx_opt.tstamp_ok)) { tp 749 net/ipv4/tcp_output.c opts->tsval = skb ? tcp_skb_timestamp(skb) + tp->tsoffset : 0; tp 750 net/ipv4/tcp_output.c opts->tsecr = tp->rx_opt.ts_recent; tp 754 net/ipv4/tcp_output.c eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; tp 795 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 797 net/ipv4/tcp_output.c if (tp->lost_out > tp->retrans_out && tp 798 net/ipv4/tcp_output.c tp->snd_cwnd > tcp_packets_in_flight(tp)) { tp 799 net/ipv4/tcp_output.c tcp_mstamp_refresh(tp); tp 803 net/ipv4/tcp_output.c tcp_write_xmit(sk, tcp_current_mss(sk), tp->nonagle, tp 829 net/ipv4/tcp_output.c struct tcp_sock *tp; tp 837 net/ipv4/tcp_output.c tp = list_entry(q, struct tcp_sock, tsq_node); tp 838 net/ipv4/tcp_output.c list_del(&tp->tsq_node); tp 840 net/ipv4/tcp_output.c sk = (struct sock *)tp; tp 924 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 958 net/ipv4/tcp_output.c list_add(&tp->tsq_node, &tsq->head); tp 973 net/ipv4/tcp_output.c struct tcp_sock *tp = container_of(timer, struct tcp_sock, pacing_timer); tp 974 net/ipv4/tcp_output.c struct sock *sk = (struct sock *)tp; tp 985 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 994 net/ipv4/tcp_output.c if (rate != ~0UL && rate && tp->data_segs_out >= 10) { tp 996 net/ipv4/tcp_output.c u64 credit = tp->tcp_wstamp_ns - prior_wstamp; tp 1000 net/ipv4/tcp_output.c tp->tcp_wstamp_ns += len_ns; tp 1003 net/ipv4/tcp_output.c list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue); tp 1022 net/ipv4/tcp_output.c struct tcp_sock *tp; tp 1033 net/ipv4/tcp_output.c tp = tcp_sk(sk); tp 1034 net/ipv4/tcp_output.c prior_wstamp = tp->tcp_wstamp_ns; tp 1035 net/ipv4/tcp_output.c tp->tcp_wstamp_ns = max(tp->tcp_wstamp_ns, tp->tcp_clock_cache); tp 1036 net/ipv4/tcp_output.c skb->skb_mstamp_ns = tp->tcp_wstamp_ns; tp 1039 net/ipv4/tcp_output.c - tp->snd_una; tp 1119 net/ipv4/tcp_output.c if (unlikely(tcp_urg_mode(tp) && before(tcb->seq, tp->snd_up))) { tp 1120 net/ipv4/tcp_output.c if (before(tp->snd_up, tcb->seq + 0x10000)) { tp 1121 net/ipv4/tcp_output.c th->urg_ptr = htons(tp->snd_up - tcb->seq); tp 1123 net/ipv4/tcp_output.c } else if (after(tcb->seq + 0xFFFF, tp->snd_nxt)) { tp 1129 net/ipv4/tcp_output.c tcp_options_write((__be32 *)(th + 1), tp, &opts); tp 1138 net/ipv4/tcp_output.c th->window = htons(min(tp->rcv_wnd, 65535U)); tp 1144 net/ipv4/tcp_output.c tp->af_specific->calc_md5_hash(opts.hash_location, tp 1155 net/ipv4/tcp_output.c tcp_event_data_sent(tp, sk); tp 1156 net/ipv4/tcp_output.c tp->data_segs_out += tcp_skb_pcount(skb); tp 1157 net/ipv4/tcp_output.c tp->bytes_sent += skb->len - tcp_header_size; tp 1160 net/ipv4/tcp_output.c if (after(tcb->end_seq, tp->snd_nxt) || tcb->seq == tcb->end_seq) tp 1164 net/ipv4/tcp_output.c tp->segs_out += tcp_skb_pcount(skb); tp 1175 net/ipv4/tcp_output.c tcp_add_tx_delay(skb, tp); tp 1204 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1207 net/ipv4/tcp_output.c WRITE_ONCE(tp->write_seq, TCP_SKB_CB(skb)->end_seq); tp 1234 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1236 net/ipv4/tcp_output.c tp->packets_out -= decr; tp 1239 net/ipv4/tcp_output.c tp->sacked_out -= decr; tp 1241 net/ipv4/tcp_output.c tp->retrans_out -= decr; tp 1243 net/ipv4/tcp_output.c tp->lost_out -= decr; tp 1246 net/ipv4/tcp_output.c if (tcp_is_reno(tp) && decr > 0) tp 1247 net/ipv4/tcp_output.c tp->sacked_out -= min_t(u32, tp->sacked_out, decr); tp 1249 net/ipv4/tcp_output.c if (tp->lost_skb_hint && tp 1250 net/ipv4/tcp_output.c before(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(tp->lost_skb_hint)->seq) && tp 1252 net/ipv4/tcp_output.c tp->lost_cnt_hint -= decr; tp 1254 net/ipv4/tcp_output.c tcp_verify_left_out(tp); tp 1307 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1381 net/ipv4/tcp_output.c if (!before(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) { tp 1469 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 1487 net/ipv4/tcp_output.c if (mss_now > tp->rx_opt.mss_clamp) tp 1488 net/ipv4/tcp_output.c mss_now = tp->rx_opt.mss_clamp; tp 1509 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 1514 net/ipv4/tcp_output.c tp->tcp_header_len + tp 1532 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1537 net/ipv4/tcp_output.c icsk->icsk_mtup.search_high = tp->rx_opt.mss_clamp + sizeof(struct tcphdr) + tp 1570 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1578 net/ipv4/tcp_output.c mss_now = tcp_bound_to_half_wnd(tp, mss_now); tp 1584 net/ipv4/tcp_output.c tp->mss_cache = mss_now; tp 1595 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 1602 net/ipv4/tcp_output.c mss_now = tp->mss_cache; tp 1616 net/ipv4/tcp_output.c if (header_len != tp->tcp_header_len) { tp 1617 net/ipv4/tcp_output.c int delta = (int) header_len - tp->tcp_header_len; tp 1630 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1635 net/ipv4/tcp_output.c u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk)); tp 1636 net/ipv4/tcp_output.c u32 win_used = max(tp->snd_cwnd_used, init_win); tp 1637 net/ipv4/tcp_output.c if (win_used < tp->snd_cwnd) { tp 1638 net/ipv4/tcp_output.c tp->snd_ssthresh = tcp_current_ssthresh(sk); tp 1639 net/ipv4/tcp_output.c tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1; tp 1641 net/ipv4/tcp_output.c tp->snd_cwnd_used = 0; tp 1643 net/ipv4/tcp_output.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 1649 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1654 net/ipv4/tcp_output.c if (!before(tp->snd_una, tp->max_packets_seq) || tp 1655 net/ipv4/tcp_output.c tp->packets_out > tp->max_packets_out) { tp 1656 net/ipv4/tcp_output.c tp->max_packets_out = tp->packets_out; tp 1657 net/ipv4/tcp_output.c tp->max_packets_seq = tp->snd_nxt; tp 1658 net/ipv4/tcp_output.c tp->is_cwnd_limited = is_cwnd_limited; tp 1663 net/ipv4/tcp_output.c tp->snd_cwnd_used = 0; tp 1664 net/ipv4/tcp_output.c tp->snd_cwnd_stamp = tcp_jiffies32; tp 1667 net/ipv4/tcp_output.c if (tp->packets_out > tp->snd_cwnd_used) tp 1668 net/ipv4/tcp_output.c tp->snd_cwnd_used = tp->packets_out; tp 1671 net/ipv4/tcp_output.c (s32)(tcp_jiffies32 - tp->snd_cwnd_stamp) >= inet_csk(sk)->icsk_rto && tp 1690 net/ipv4/tcp_output.c static bool tcp_minshall_check(const struct tcp_sock *tp) tp 1692 net/ipv4/tcp_output.c return after(tp->snd_sml, tp->snd_una) && tp 1693 net/ipv4/tcp_output.c !after(tp->snd_sml, tp->snd_nxt); tp 1704 net/ipv4/tcp_output.c static void tcp_minshall_update(struct tcp_sock *tp, unsigned int mss_now, tp 1708 net/ipv4/tcp_output.c tp->snd_sml = TCP_SKB_CB(skb)->end_seq; tp 1718 net/ipv4/tcp_output.c static bool tcp_nagle_check(bool partial, const struct tcp_sock *tp, tp 1723 net/ipv4/tcp_output.c (!nonagle && tp->packets_out && tcp_minshall_check(tp))); tp 1771 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 1774 net/ipv4/tcp_output.c window = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq; tp 1790 net/ipv4/tcp_output.c if (tcp_nagle_check(partial != 0, tp, nonagle)) tp 1799 net/ipv4/tcp_output.c static inline unsigned int tcp_cwnd_test(const struct tcp_sock *tp, tp 1809 net/ipv4/tcp_output.c in_flight = tcp_packets_in_flight(tp); tp 1810 net/ipv4/tcp_output.c cwnd = tp->snd_cwnd; tp 1840 net/ipv4/tcp_output.c static inline bool tcp_nagle_test(const struct tcp_sock *tp, const struct sk_buff *skb, tp 1853 net/ipv4/tcp_output.c if (tcp_urg_mode(tp) || (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)) tp 1856 net/ipv4/tcp_output.c if (!tcp_nagle_check(skb->len < cur_mss, tp, nonagle)) tp 1863 net/ipv4/tcp_output.c static bool tcp_snd_wnd_test(const struct tcp_sock *tp, tp 1872 net/ipv4/tcp_output.c return !after(end_seq, tcp_wnd_end(tp)); tp 1946 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 1959 net/ipv4/tcp_output.c delta = tp->tcp_clock_cache - tp->tcp_wstamp_ns - NSEC_PER_MSEC; tp 1963 net/ipv4/tcp_output.c in_flight = tcp_packets_in_flight(tp); tp 1966 net/ipv4/tcp_output.c BUG_ON(tp->snd_cwnd <= in_flight); tp 1968 net/ipv4/tcp_output.c send_win = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq; tp 1971 net/ipv4/tcp_output.c cong_win = (tp->snd_cwnd - in_flight) * tp->mss_cache; tp 1976 net/ipv4/tcp_output.c if (limit >= max_segs * tp->mss_cache) tp 1985 net/ipv4/tcp_output.c u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); tp 1999 net/ipv4/tcp_output.c if (limit > tcp_max_tso_deferred_mss(tp) * tp->mss_cache) tp 2007 net/ipv4/tcp_output.c delta = tp->tcp_clock_cache - head->tstamp; tp 2009 net/ipv4/tcp_output.c if ((s64)(delta - (u64)NSEC_PER_USEC * (tp->srtt_us >> 4)) < 0) tp 2044 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2056 net/ipv4/tcp_output.c icsk->icsk_mtup.search_high = tp->rx_opt.mss_clamp + tp 2096 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2113 net/ipv4/tcp_output.c tp->snd_cwnd < 11 || tp 2114 net/ipv4/tcp_output.c tp->rx_opt.num_sacks || tp->rx_opt.dsack)) tp 2124 net/ipv4/tcp_output.c size_needed = probe_size + (tp->reordering + 1) * tp->mss_cache; tp 2140 net/ipv4/tcp_output.c if (tp->write_seq - tp->snd_nxt < size_needed) tp 2143 net/ipv4/tcp_output.c if (tp->snd_wnd < size_needed) tp 2145 net/ipv4/tcp_output.c if (after(tp->snd_nxt + size_needed, tcp_wnd_end(tp))) tp 2149 net/ipv4/tcp_output.c if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) { tp 2150 net/ipv4/tcp_output.c if (!tcp_packets_in_flight(tp)) tp 2220 net/ipv4/tcp_output.c tp->snd_cwnd--; tp 2224 net/ipv4/tcp_output.c tp->mtu_probe.probe_seq_start = TCP_SKB_CB(nskb)->seq; tp 2225 net/ipv4/tcp_output.c tp->mtu_probe.probe_seq_end = TCP_SKB_CB(nskb)->end_seq; tp 2235 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2240 net/ipv4/tcp_output.c if (tp->tcp_wstamp_ns <= tp->tcp_clock_cache) tp 2243 net/ipv4/tcp_output.c if (!hrtimer_is_queued(&tp->pacing_timer)) { tp 2244 net/ipv4/tcp_output.c hrtimer_start(&tp->pacing_timer, tp 2245 net/ipv4/tcp_output.c ns_to_ktime(tp->tcp_wstamp_ns), tp 2309 net/ipv4/tcp_output.c static void tcp_chrono_set(struct tcp_sock *tp, const enum tcp_chrono new) tp 2312 net/ipv4/tcp_output.c enum tcp_chrono old = tp->chrono_type; tp 2315 net/ipv4/tcp_output.c tp->chrono_stat[old - 1] += now - tp->chrono_start; tp 2316 net/ipv4/tcp_output.c tp->chrono_start = now; tp 2317 net/ipv4/tcp_output.c tp->chrono_type = new; tp 2322 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2329 net/ipv4/tcp_output.c if (type > tp->chrono_type) tp 2330 net/ipv4/tcp_output.c tcp_chrono_set(tp, type); tp 2335 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2346 net/ipv4/tcp_output.c tcp_chrono_set(tp, TCP_CHRONO_UNSPEC); tp 2347 net/ipv4/tcp_output.c else if (type == tp->chrono_type) tp 2348 net/ipv4/tcp_output.c tcp_chrono_set(tp, TCP_CHRONO_BUSY); tp 2368 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2378 net/ipv4/tcp_output.c tcp_mstamp_refresh(tp); tp 2393 net/ipv4/tcp_output.c if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) { tp 2395 net/ipv4/tcp_output.c skb->skb_mstamp_ns = tp->tcp_wstamp_ns = tp->tcp_clock_cache; tp 2396 net/ipv4/tcp_output.c list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue); tp 2407 net/ipv4/tcp_output.c cwnd_quota = tcp_cwnd_test(tp, skb); tp 2416 net/ipv4/tcp_output.c if (unlikely(!tcp_snd_wnd_test(tp, skb, mss_now))) { tp 2422 net/ipv4/tcp_output.c if (unlikely(!tcp_nagle_test(tp, skb, mss_now, tp 2434 net/ipv4/tcp_output.c if (tso_segs > 1 && !tcp_urg_mode(tp)) tp 2465 net/ipv4/tcp_output.c tcp_minshall_update(tp, mss_now, skb); tp 2479 net/ipv4/tcp_output.c tp->prr_out += sent_pkts; tp 2484 net/ipv4/tcp_output.c is_cwnd_limited |= (tcp_packets_in_flight(tp) >= tp->snd_cwnd); tp 2488 net/ipv4/tcp_output.c return !tp->packets_out && !tcp_write_queue_empty(sk); tp 2494 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2501 net/ipv4/tcp_output.c if (rcu_access_pointer(tp->fastopen_rsk)) tp 2509 net/ipv4/tcp_output.c !tp->packets_out || !tcp_is_sack(tp) || tp 2518 net/ipv4/tcp_output.c if (tp->srtt_us) { tp 2519 net/ipv4/tcp_output.c timeout = usecs_to_jiffies(tp->srtt_us >> 2); tp 2520 net/ipv4/tcp_output.c if (tp->packets_out == 1) tp 2560 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2566 net/ipv4/tcp_output.c if (skb && tcp_snd_wnd_test(tp, skb, mss)) { tp 2567 net/ipv4/tcp_output.c pcount = tp->packets_out; tp 2569 net/ipv4/tcp_output.c if (tp->packets_out > pcount) tp 2575 net/ipv4/tcp_output.c WARN_ONCE(tp->packets_out, tp 2577 net/ipv4/tcp_output.c tp->packets_out, sk->sk_state, tp->snd_cwnd, mss); tp 2583 net/ipv4/tcp_output.c if (tp->tlp_high_seq) tp 2608 net/ipv4/tcp_output.c tp->tlp_high_seq = tp->snd_nxt; tp 2704 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2714 net/ipv4/tcp_output.c int full_space = min_t(int, tp->window_clamp, allowed_space); tp 2726 net/ipv4/tcp_output.c tp->rcv_ssthresh = min(tp->rcv_ssthresh, tp 2727 net/ipv4/tcp_output.c 4U * tp->advmss); tp 2732 net/ipv4/tcp_output.c free_space = round_down(free_space, 1 << tp->rx_opt.rcv_wscale); tp 2745 net/ipv4/tcp_output.c if (free_space > tp->rcv_ssthresh) tp 2746 net/ipv4/tcp_output.c free_space = tp->rcv_ssthresh; tp 2751 net/ipv4/tcp_output.c if (tp->rx_opt.rcv_wscale) { tp 2758 net/ipv4/tcp_output.c window = ALIGN(window, (1 << tp->rx_opt.rcv_wscale)); tp 2760 net/ipv4/tcp_output.c window = tp->rcv_wnd; tp 2797 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2827 net/ipv4/tcp_output.c tcp_clear_retrans_hints_partial(tp); tp 2828 net/ipv4/tcp_output.c if (next_skb == tp->retransmit_skb_hint) tp 2829 net/ipv4/tcp_output.c tp->retransmit_skb_hint = skb; tp 2859 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2885 net/ipv4/tcp_output.c if (after(TCP_SKB_CB(skb)->end_seq, tcp_wnd_end(tp))) tp 2900 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 2920 net/ipv4/tcp_output.c if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) { tp 2921 net/ipv4/tcp_output.c if (unlikely(before(TCP_SKB_CB(skb)->end_seq, tp->snd_una))) { tp 2925 net/ipv4/tcp_output.c if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) tp 2939 net/ipv4/tcp_output.c if (!before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp)) && tp 2940 net/ipv4/tcp_output.c TCP_SKB_CB(skb)->seq != tp->snd_una) tp 2970 net/ipv4/tcp_output.c tp->total_retrans += segs; tp 2971 net/ipv4/tcp_output.c tp->bytes_retrans += skb->len; tp 2992 net/ipv4/tcp_output.c tcp_update_skb_after_send(sk, skb, tp->tcp_wstamp_ns); tp 3004 net/ipv4/tcp_output.c if (BPF_SOCK_OPS_TEST_FLAG(tp, BPF_SOCK_OPS_RETRANS_CB_FLAG)) tp 3018 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3028 net/ipv4/tcp_output.c tp->retrans_out += tcp_skb_pcount(skb); tp 3032 net/ipv4/tcp_output.c if (!tp->retrans_stamp) tp 3033 net/ipv4/tcp_output.c tp->retrans_stamp = tcp_skb_timestamp(skb); tp 3035 net/ipv4/tcp_output.c if (tp->undo_retrans < 0) tp 3036 net/ipv4/tcp_output.c tp->undo_retrans = 0; tp 3037 net/ipv4/tcp_output.c tp->undo_retrans += tcp_skb_pcount(skb); tp 3050 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3054 net/ipv4/tcp_output.c if (!tp->packets_out) tp 3058 net/ipv4/tcp_output.c skb = tp->retransmit_skb_hint ?: rtx_head; tp 3069 net/ipv4/tcp_output.c tp->retransmit_skb_hint = skb; tp 3071 net/ipv4/tcp_output.c segs = tp->snd_cwnd - tcp_packets_in_flight(tp); tp 3080 net/ipv4/tcp_output.c if (tp->retrans_out >= tp->lost_out) { tp 3106 net/ipv4/tcp_output.c tp->prr_out += tcp_skb_pcount(skb); tp 3144 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3157 net/ipv4/tcp_output.c tp->write_seq++; tp 3165 net/ipv4/tcp_output.c WRITE_ONCE(tp->snd_nxt, tp->snd_nxt + 1); tp 3177 net/ipv4/tcp_output.c tcp_init_nondata_skb(skb, tp->write_seq, tp 3272 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 3308 net/ipv4/tcp_output.c mss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); tp 3362 net/ipv4/tcp_output.c tcp_add_tx_delay(skb, tp); tp 3391 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3398 net/ipv4/tcp_output.c tp->tcp_header_len = sizeof(struct tcphdr); tp 3400 net/ipv4/tcp_output.c tp->tcp_header_len += TCPOLEN_TSTAMP_ALIGNED; tp 3403 net/ipv4/tcp_output.c if (tp->af_specific->md5_lookup(sk, sk)) tp 3404 net/ipv4/tcp_output.c tp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED; tp 3408 net/ipv4/tcp_output.c if (tp->rx_opt.user_mss) tp 3409 net/ipv4/tcp_output.c tp->rx_opt.mss_clamp = tp->rx_opt.user_mss; tp 3410 net/ipv4/tcp_output.c tp->max_window = 0; tp 3416 net/ipv4/tcp_output.c if (!tp->window_clamp) tp 3417 net/ipv4/tcp_output.c tp->window_clamp = dst_metric(dst, RTAX_WINDOW); tp 3418 net/ipv4/tcp_output.c tp->advmss = tcp_mss_clamp(tp, dst_metric_advmss(dst)); tp 3424 net/ipv4/tcp_output.c (tp->window_clamp > tcp_full_space(sk) || tp->window_clamp == 0)) tp 3425 net/ipv4/tcp_output.c tp->window_clamp = tcp_full_space(sk); tp 3432 net/ipv4/tcp_output.c tp->advmss - (tp->rx_opt.ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), tp 3433 net/ipv4/tcp_output.c &tp->rcv_wnd, tp 3434 net/ipv4/tcp_output.c &tp->window_clamp, tp 3439 net/ipv4/tcp_output.c tp->rx_opt.rcv_wscale = rcv_wscale; tp 3440 net/ipv4/tcp_output.c tp->rcv_ssthresh = tp->rcv_wnd; tp 3444 net/ipv4/tcp_output.c tp->snd_wnd = 0; tp 3445 net/ipv4/tcp_output.c tcp_init_wl(tp, 0); tp 3447 net/ipv4/tcp_output.c tp->snd_una = tp->write_seq; tp 3448 net/ipv4/tcp_output.c tp->snd_sml = tp->write_seq; tp 3449 net/ipv4/tcp_output.c tp->snd_up = tp->write_seq; tp 3450 net/ipv4/tcp_output.c WRITE_ONCE(tp->snd_nxt, tp->write_seq); tp 3452 net/ipv4/tcp_output.c if (likely(!tp->repair)) tp 3453 net/ipv4/tcp_output.c tp->rcv_nxt = 0; tp 3455 net/ipv4/tcp_output.c tp->rcv_tstamp = tcp_jiffies32; tp 3456 net/ipv4/tcp_output.c tp->rcv_wup = tp->rcv_nxt; tp 3457 net/ipv4/tcp_output.c WRITE_ONCE(tp->copied_seq, tp->rcv_nxt); tp 3461 net/ipv4/tcp_output.c tcp_clear_retrans(tp); tp 3466 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3473 net/ipv4/tcp_output.c WRITE_ONCE(tp->write_seq, tcb->end_seq); tp 3474 net/ipv4/tcp_output.c tp->packets_out += tcp_skb_pcount(skb); tp 3486 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3487 net/ipv4/tcp_output.c struct tcp_fastopen_request *fo = tp->fastopen_req; tp 3491 net/ipv4/tcp_output.c tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ tp 3492 net/ipv4/tcp_output.c if (!tcp_fastopen_cookie_check(sk, &tp->rx_opt.mss_clamp, &fo->cookie)) tp 3499 net/ipv4/tcp_output.c tp->rx_opt.mss_clamp = tcp_mss_clamp(tp, tp->rx_opt.mss_clamp); tp 3549 net/ipv4/tcp_output.c tp->syn_data = (fo->copied > 0); tp 3557 net/ipv4/tcp_output.c tp->packets_out -= tcp_skb_pcount(syn_data); tp 3565 net/ipv4/tcp_output.c tp->syn_fastopen = 0; tp 3574 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3585 net/ipv4/tcp_output.c if (unlikely(tp->repair)) { tp 3594 net/ipv4/tcp_output.c tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN); tp 3595 net/ipv4/tcp_output.c tcp_mstamp_refresh(tp); tp 3596 net/ipv4/tcp_output.c tp->retrans_stamp = tcp_time_stamp(tp); tp 3602 net/ipv4/tcp_output.c err = tp->fastopen_req ? tcp_send_syn_data(sk, buff) : tp 3610 net/ipv4/tcp_output.c WRITE_ONCE(tp->snd_nxt, tp->write_seq); tp 3611 net/ipv4/tcp_output.c tp->pushed_seq = tp->write_seq; tp 3614 net/ipv4/tcp_output.c WRITE_ONCE(tp->snd_nxt, TCP_SKB_CB(buff)->seq); tp 3615 net/ipv4/tcp_output.c tp->pushed_seq = TCP_SKB_CB(buff)->seq; tp 3637 net/ipv4/tcp_output.c const struct tcp_sock *tp = tcp_sk(sk); tp 3650 net/ipv4/tcp_output.c if (tp->srtt_us) { tp 3651 net/ipv4/tcp_output.c int rtt = max_t(int, usecs_to_jiffies(tp->srtt_us >> 3), tp 3739 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3754 net/ipv4/tcp_output.c tcp_init_nondata_skb(skb, tp->snd_una - !urgent, TCPHDR_ACK); tp 3772 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3779 net/ipv4/tcp_output.c if (skb && before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(tp))) { tp 3782 net/ipv4/tcp_output.c unsigned int seg_size = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq; tp 3784 net/ipv4/tcp_output.c if (before(tp->pushed_seq, TCP_SKB_CB(skb)->end_seq)) tp 3785 net/ipv4/tcp_output.c tp->pushed_seq = TCP_SKB_CB(skb)->end_seq; tp 3807 net/ipv4/tcp_output.c if (between(tp->snd_up, tp->snd_una + 1, tp->snd_una + 0xFFFF)) tp 3819 net/ipv4/tcp_output.c struct tcp_sock *tp = tcp_sk(sk); tp 3826 net/ipv4/tcp_output.c if (tp->packets_out || tcp_write_queue_empty(sk)) { tp 42 net/ipv4/tcp_rate.c struct tcp_sock *tp = tcp_sk(sk); tp 58 net/ipv4/tcp_rate.c if (!tp->packets_out) { tp 61 net/ipv4/tcp_rate.c tp->first_tx_mstamp = tstamp_us; tp 62 net/ipv4/tcp_rate.c tp->delivered_mstamp = tstamp_us; tp 65 net/ipv4/tcp_rate.c TCP_SKB_CB(skb)->tx.first_tx_mstamp = tp->first_tx_mstamp; tp 66 net/ipv4/tcp_rate.c TCP_SKB_CB(skb)->tx.delivered_mstamp = tp->delivered_mstamp; tp 67 net/ipv4/tcp_rate.c TCP_SKB_CB(skb)->tx.delivered = tp->delivered; tp 68 net/ipv4/tcp_rate.c TCP_SKB_CB(skb)->tx.is_app_limited = tp->app_limited ? 1 : 0; tp 81 net/ipv4/tcp_rate.c struct tcp_sock *tp = tcp_sk(sk); tp 95 net/ipv4/tcp_rate.c tp->first_tx_mstamp = tcp_skb_timestamp_us(skb); tp 97 net/ipv4/tcp_rate.c rs->interval_us = tcp_stamp_us_delta(tp->first_tx_mstamp, tp 113 net/ipv4/tcp_rate.c struct tcp_sock *tp = tcp_sk(sk); tp 117 net/ipv4/tcp_rate.c if (tp->app_limited && after(tp->delivered, tp->app_limited)) tp 118 net/ipv4/tcp_rate.c tp->app_limited = 0; tp 125 net/ipv4/tcp_rate.c tp->delivered_mstamp = tp->tcp_mstamp; tp 139 net/ipv4/tcp_rate.c rs->delivered = tp->delivered - rs->prior_delivered; tp 147 net/ipv4/tcp_rate.c ack_us = tcp_stamp_us_delta(tp->tcp_mstamp, tp 162 net/ipv4/tcp_rate.c if (unlikely(rs->interval_us < tcp_min_rtt(tp))) { tp 167 net/ipv4/tcp_rate.c tp->rx_opt.sack_ok, tcp_min_rtt(tp)); tp 174 net/ipv4/tcp_rate.c ((u64)rs->delivered * tp->rate_interval_us >= tp 175 net/ipv4/tcp_rate.c (u64)tp->rate_delivered * rs->interval_us)) { tp 176 net/ipv4/tcp_rate.c tp->rate_delivered = rs->delivered; tp 177 net/ipv4/tcp_rate.c tp->rate_interval_us = rs->interval_us; tp 178 net/ipv4/tcp_rate.c tp->rate_app_limited = rs->is_app_limited; tp 185 net/ipv4/tcp_rate.c struct tcp_sock *tp = tcp_sk(sk); tp 188 net/ipv4/tcp_rate.c tp->write_seq - tp->snd_nxt < tp->mss_cache && tp 192 net/ipv4/tcp_rate.c tcp_packets_in_flight(tp) < tp->snd_cwnd && tp 194 net/ipv4/tcp_rate.c tp->lost_out <= tp->retrans_out) tp 195 net/ipv4/tcp_rate.c tp->app_limited = tp 196 net/ipv4/tcp_rate.c (tp->delivered + tcp_packets_in_flight(tp)) ? : 1; tp 7 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 9 net/ipv4/tcp_recovery.c tcp_skb_mark_lost_uncond_verify(tp, skb); tp 13 net/ipv4/tcp_recovery.c tp->retrans_out -= tcp_skb_pcount(skb); tp 26 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 28 net/ipv4/tcp_recovery.c if (!tp->reord_seen) { tp 35 net/ipv4/tcp_recovery.c if (tp->sacked_out >= tp->reordering && tp 46 net/ipv4/tcp_recovery.c return min((tcp_min_rtt(tp) >> 2) * tp->rack.reo_wnd_steps, tp 47 net/ipv4/tcp_recovery.c tp->srtt_us >> 3); tp 50 net/ipv4/tcp_recovery.c s32 tcp_rack_skb_timeout(struct tcp_sock *tp, struct sk_buff *skb, u32 reo_wnd) tp 52 net/ipv4/tcp_recovery.c return tp->rack.rtt_us + reo_wnd - tp 53 net/ipv4/tcp_recovery.c tcp_stamp_us_delta(tp->tcp_mstamp, tcp_skb_timestamp_us(skb)); tp 78 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 84 net/ipv4/tcp_recovery.c list_for_each_entry_safe(skb, n, &tp->tsorted_sent_queue, tp 94 net/ipv4/tcp_recovery.c if (!tcp_rack_sent_after(tp->rack.mstamp, tp 96 net/ipv4/tcp_recovery.c tp->rack.end_seq, scb->end_seq)) tp 102 net/ipv4/tcp_recovery.c remaining = tcp_rack_skb_timeout(tp, skb, reo_wnd); tp 115 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 118 net/ipv4/tcp_recovery.c if (!tp->rack.advanced) tp 122 net/ipv4/tcp_recovery.c tp->rack.advanced = 0; tp 135 net/ipv4/tcp_recovery.c void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq, tp 140 net/ipv4/tcp_recovery.c rtt_us = tcp_stamp_us_delta(tp->tcp_mstamp, xmit_time); tp 141 net/ipv4/tcp_recovery.c if (rtt_us < tcp_min_rtt(tp) && (sacked & TCPCB_RETRANS)) { tp 154 net/ipv4/tcp_recovery.c tp->rack.advanced = 1; tp 155 net/ipv4/tcp_recovery.c tp->rack.rtt_us = rtt_us; tp 156 net/ipv4/tcp_recovery.c if (tcp_rack_sent_after(xmit_time, tp->rack.mstamp, tp 157 net/ipv4/tcp_recovery.c end_seq, tp->rack.end_seq)) { tp 158 net/ipv4/tcp_recovery.c tp->rack.mstamp = xmit_time; tp 159 net/ipv4/tcp_recovery.c tp->rack.end_seq = end_seq; tp 168 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 171 net/ipv4/tcp_recovery.c prior_inflight = tcp_packets_in_flight(tp); tp 173 net/ipv4/tcp_recovery.c if (prior_inflight != tcp_packets_in_flight(tp)) { tp 204 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 211 net/ipv4/tcp_recovery.c if (before(rs->prior_delivered, tp->rack.last_delivered)) tp 212 net/ipv4/tcp_recovery.c tp->rack.dsack_seen = 0; tp 215 net/ipv4/tcp_recovery.c if (tp->rack.dsack_seen) { tp 216 net/ipv4/tcp_recovery.c tp->rack.reo_wnd_steps = min_t(u32, 0xFF, tp 217 net/ipv4/tcp_recovery.c tp->rack.reo_wnd_steps + 1); tp 218 net/ipv4/tcp_recovery.c tp->rack.dsack_seen = 0; tp 219 net/ipv4/tcp_recovery.c tp->rack.last_delivered = tp->delivered; tp 220 net/ipv4/tcp_recovery.c tp->rack.reo_wnd_persist = TCP_RACK_RECOVERY_THRESH; tp 221 net/ipv4/tcp_recovery.c } else if (!tp->rack.reo_wnd_persist) { tp 222 net/ipv4/tcp_recovery.c tp->rack.reo_wnd_steps = 1; tp 234 net/ipv4/tcp_recovery.c struct tcp_sock *tp = tcp_sk(sk); tp 236 net/ipv4/tcp_recovery.c if ((state < TCP_CA_Recovery && tp->sacked_out >= tp->reordering) || tp 249 net/ipv4/tcp_recovery.c tcp_skb_mark_lost_uncond_verify(tp, skb); tp 21 net/ipv4/tcp_scalable.c struct tcp_sock *tp = tcp_sk(sk); tp 26 net/ipv4/tcp_scalable.c if (tcp_in_slow_start(tp)) tp 27 net/ipv4/tcp_scalable.c tcp_slow_start(tp, acked); tp 29 net/ipv4/tcp_scalable.c tcp_cong_avoid_ai(tp, min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT), tp 35 net/ipv4/tcp_scalable.c const struct tcp_sock *tp = tcp_sk(sk); tp 37 net/ipv4/tcp_scalable.c return max(tp->snd_cwnd - (tp->snd_cwnd>>TCP_SCALABLE_MD_SCALE), 2U); tp 86 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 91 net/ipv4/tcp_timer.c if ((s32)(tcp_jiffies32 - tp->lsndtime) > 2*TCP_RTO_MAX || !do_reset) tp 101 net/ipv4/tcp_timer.c if ((s32)(tcp_jiffies32 - tp->lsndtime) <= TCP_TIMEWAIT_LEN || tp 103 net/ipv4/tcp_timer.c (!tp->snd_wnd && !tp->packets_out)) tp 216 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 256 net/ipv4/tcp_timer.c if (BPF_SOCK_OPS_TEST_FLAG(tp, BPF_SOCK_OPS_RTO_CB_FLAG)) tp 342 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 345 net/ipv4/tcp_timer.c if (tp->packets_out || !skb) { tp 394 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 413 net/ipv4/tcp_timer.c if (!tp->retrans_stamp) tp 414 net/ipv4/tcp_timer.c tp->retrans_stamp = tcp_time_stamp(tp); tp 433 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 438 net/ipv4/tcp_timer.c req = rcu_dereference_protected(tp->fastopen_rsk, tp 449 net/ipv4/tcp_timer.c if (!tp->packets_out || WARN_ON_ONCE(tcp_rtx_queue_empty(sk))) tp 452 net/ipv4/tcp_timer.c tp->tlp_high_seq = 0; tp 454 net/ipv4/tcp_timer.c if (!tp->snd_wnd && !sock_flag(sk, SOCK_DEAD) && tp 467 net/ipv4/tcp_timer.c tp->snd_una, tp->snd_nxt); tp 475 net/ipv4/tcp_timer.c tp->snd_una, tp->snd_nxt); tp 478 net/ipv4/tcp_timer.c if (tcp_jiffies32 - tp->rcv_tstamp > TCP_RTO_MAX) { tp 496 net/ipv4/tcp_timer.c if (tcp_is_sack(tp)) tp 503 net/ipv4/tcp_timer.c tp->sacked_out) { tp 504 net/ipv4/tcp_timer.c if (tcp_is_sack(tp)) tp 554 net/ipv4/tcp_timer.c (tp->thin_lto || net->ipv4.sysctl_tcp_thin_linear_timeouts) && tp 555 net/ipv4/tcp_timer.c tcp_stream_is_thin(tp) && tp 558 net/ipv4/tcp_timer.c icsk->icsk_rto = min(__tcp_set_rto(tp), TCP_RTO_MAX); tp 654 net/ipv4/tcp_timer.c struct tcp_sock *tp = tcp_sk(sk); tp 670 net/ipv4/tcp_timer.c tcp_mstamp_refresh(tp); tp 672 net/ipv4/tcp_timer.c if (tp->linger2 >= 0) { tp 688 net/ipv4/tcp_timer.c elapsed = keepalive_time_when(tp); tp 691 net/ipv4/tcp_timer.c if (tp->packets_out || !tcp_write_queue_empty(sk)) tp 694 net/ipv4/tcp_timer.c elapsed = keepalive_time_elapsed(tp); tp 696 net/ipv4/tcp_timer.c if (elapsed >= keepalive_time_when(tp)) { tp 704 net/ipv4/tcp_timer.c icsk->icsk_probes_out >= keepalive_probes(tp))) { tp 711 net/ipv4/tcp_timer.c elapsed = keepalive_intvl_when(tp); tp 720 net/ipv4/tcp_timer.c elapsed = keepalive_time_when(tp) - elapsed; tp 739 net/ipv4/tcp_timer.c struct tcp_sock *tp = container_of(timer, struct tcp_sock, compressed_ack_timer); tp 740 net/ipv4/tcp_timer.c struct sock *sk = (struct sock *)tp; tp 744 net/ipv4/tcp_timer.c if (tp->compressed_ack > TCP_FASTRETRANS_THRESH) tp 73 net/ipv4/tcp_vegas.c const struct tcp_sock *tp = tcp_sk(sk); tp 80 net/ipv4/tcp_vegas.c vegas->beg_snd_nxt = tp->snd_nxt; tp 160 net/ipv4/tcp_vegas.c static inline u32 tcp_vegas_ssthresh(struct tcp_sock *tp) tp 162 net/ipv4/tcp_vegas.c return min(tp->snd_ssthresh, tp->snd_cwnd); tp 167 net/ipv4/tcp_vegas.c struct tcp_sock *tp = tcp_sk(sk); tp 181 net/ipv4/tcp_vegas.c vegas->beg_snd_nxt = tp->snd_nxt; tp 220 net/ipv4/tcp_vegas.c target_cwnd = (u64)tp->snd_cwnd * vegas->baseRTT; tp 227 net/ipv4/tcp_vegas.c diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; tp 229 net/ipv4/tcp_vegas.c if (diff > gamma && tcp_in_slow_start(tp)) { tp 241 net/ipv4/tcp_vegas.c tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1); tp 242 net/ipv4/tcp_vegas.c tp->snd_ssthresh = tcp_vegas_ssthresh(tp); tp 244 net/ipv4/tcp_vegas.c } else if (tcp_in_slow_start(tp)) { tp 246 net/ipv4/tcp_vegas.c tcp_slow_start(tp, acked); tp 257 net/ipv4/tcp_vegas.c tp->snd_cwnd--; tp 258 net/ipv4/tcp_vegas.c tp->snd_ssthresh tp 259 net/ipv4/tcp_vegas.c = tcp_vegas_ssthresh(tp); tp 264 net/ipv4/tcp_vegas.c tp->snd_cwnd++; tp 272 net/ipv4/tcp_vegas.c if (tp->snd_cwnd < 2) tp 273 net/ipv4/tcp_vegas.c tp->snd_cwnd = 2; tp 274 net/ipv4/tcp_vegas.c else if (tp->snd_cwnd > tp->snd_cwnd_clamp) tp 275 net/ipv4/tcp_vegas.c tp->snd_cwnd = tp->snd_cwnd_clamp; tp 277 net/ipv4/tcp_vegas.c tp->snd_ssthresh = tcp_current_ssthresh(sk); tp 285 net/ipv4/tcp_vegas.c else if (tcp_in_slow_start(tp)) tp 286 net/ipv4/tcp_vegas.c tcp_slow_start(tp, acked); tp 121 net/ipv4/tcp_veno.c struct tcp_sock *tp = tcp_sk(sk); tp 149 net/ipv4/tcp_veno.c target_cwnd = (u64)tp->snd_cwnd * veno->basertt; tp 153 net/ipv4/tcp_veno.c veno->diff = (tp->snd_cwnd << V_PARAM_SHIFT) - target_cwnd; tp 155 net/ipv4/tcp_veno.c if (tcp_in_slow_start(tp)) { tp 157 net/ipv4/tcp_veno.c tcp_slow_start(tp, acked); tp 164 net/ipv4/tcp_veno.c tcp_cong_avoid_ai(tp, tp->snd_cwnd, 1); tp 169 net/ipv4/tcp_veno.c if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp 171 net/ipv4/tcp_veno.c tp->snd_cwnd < tp->snd_cwnd_clamp) { tp 172 net/ipv4/tcp_veno.c tp->snd_cwnd++; tp 176 net/ipv4/tcp_veno.c tp->snd_cwnd_cnt = 0; tp 178 net/ipv4/tcp_veno.c tp->snd_cwnd_cnt++; tp 181 net/ipv4/tcp_veno.c if (tp->snd_cwnd < 2) tp 182 net/ipv4/tcp_veno.c tp->snd_cwnd = 2; tp 183 net/ipv4/tcp_veno.c else if (tp->snd_cwnd > tp->snd_cwnd_clamp) tp 184 net/ipv4/tcp_veno.c tp->snd_cwnd = tp->snd_cwnd_clamp; tp 194 net/ipv4/tcp_veno.c const struct tcp_sock *tp = tcp_sk(sk); tp 199 net/ipv4/tcp_veno.c return max(tp->snd_cwnd * 4 / 5, 2U); tp 202 net/ipv4/tcp_veno.c return max(tp->snd_cwnd >> 1U, 2U); tp 165 net/ipv4/tcp_westwood.c const struct tcp_sock *tp = tcp_sk(sk); tp 170 net/ipv4/tcp_westwood.c w->bk += tp->snd_una - w->snd_una; tp 171 net/ipv4/tcp_westwood.c w->snd_una = tp->snd_una; tp 182 net/ipv4/tcp_westwood.c const struct tcp_sock *tp = tcp_sk(sk); tp 185 net/ipv4/tcp_westwood.c w->cumul_ack = tp->snd_una - w->snd_una; tp 191 net/ipv4/tcp_westwood.c w->accounted += tp->mss_cache; tp 192 net/ipv4/tcp_westwood.c w->cumul_ack = tp->mss_cache; tp 195 net/ipv4/tcp_westwood.c if (w->cumul_ack > tp->mss_cache) { tp 199 net/ipv4/tcp_westwood.c w->cumul_ack = tp->mss_cache; tp 206 net/ipv4/tcp_westwood.c w->snd_una = tp->snd_una; tp 219 net/ipv4/tcp_westwood.c const struct tcp_sock *tp = tcp_sk(sk); tp 222 net/ipv4/tcp_westwood.c return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); tp 242 net/ipv4/tcp_westwood.c struct tcp_sock *tp = tcp_sk(sk); tp 247 net/ipv4/tcp_westwood.c tp->snd_cwnd = tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk); tp 250 net/ipv4/tcp_westwood.c tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk); tp 45 net/ipv4/tcp_yeah.c struct tcp_sock *tp = tcp_sk(sk); tp 57 net/ipv4/tcp_yeah.c tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); tp 74 net/ipv4/tcp_yeah.c struct tcp_sock *tp = tcp_sk(sk); tp 80 net/ipv4/tcp_yeah.c if (tcp_in_slow_start(tp)) tp 81 net/ipv4/tcp_yeah.c tcp_slow_start(tp, acked); tp 86 net/ipv4/tcp_yeah.c tp->snd_cwnd_cnt += yeah->pkts_acked; tp 87 net/ipv4/tcp_yeah.c if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)) { tp 88 net/ipv4/tcp_yeah.c if (tp->snd_cwnd < tp->snd_cwnd_clamp) tp 89 net/ipv4/tcp_yeah.c tp->snd_cwnd++; tp 90 net/ipv4/tcp_yeah.c tp->snd_cwnd_cnt = 0; tp 97 net/ipv4/tcp_yeah.c tcp_cong_avoid_ai(tp, tp->snd_cwnd, 1); tp 152 net/ipv4/tcp_yeah.c bw = tp->snd_cwnd; tp 160 net/ipv4/tcp_yeah.c tp->snd_cwnd > yeah->reno_count) { tp 162 net/ipv4/tcp_yeah.c tp->snd_cwnd >> TCP_YEAH_EPSILON); tp 164 net/ipv4/tcp_yeah.c tp->snd_cwnd -= reduction; tp 166 net/ipv4/tcp_yeah.c tp->snd_cwnd = max(tp->snd_cwnd, tp 169 net/ipv4/tcp_yeah.c tp->snd_ssthresh = tp->snd_cwnd; tp 173 net/ipv4/tcp_yeah.c yeah->reno_count = max(tp->snd_cwnd>>1, 2U); tp 197 net/ipv4/tcp_yeah.c yeah->vegas.beg_snd_nxt = tp->snd_nxt; tp 198 net/ipv4/tcp_yeah.c yeah->vegas.beg_snd_cwnd = tp->snd_cwnd; tp 208 net/ipv4/tcp_yeah.c const struct tcp_sock *tp = tcp_sk(sk); tp 215 net/ipv4/tcp_yeah.c reduction = min(reduction, max(tp->snd_cwnd>>1, 2U)); tp 217 net/ipv4/tcp_yeah.c reduction = max(reduction, tp->snd_cwnd >> TCP_YEAH_DELTA); tp 219 net/ipv4/tcp_yeah.c reduction = max(tp->snd_cwnd>>1, 2U); tp 224 net/ipv4/tcp_yeah.c return max_t(int, tp->snd_cwnd - reduction, 2); tp 157 net/ipv6/icmp.c u8 _type, *tp; tp 158 net/ipv6/icmp.c tp = skb_header_pointer(skb, tp 161 net/ipv6/icmp.c if (!tp || !(*tp & ICMPV6_INFOMSG_MASK)) tp 299 net/ipv6/ip6_gre.c struct ip6_tnl __rcu **tp = ip6gre_bucket(ign, t); tp 301 net/ipv6/ip6_gre.c rcu_assign_pointer(t->next, rtnl_dereference(*tp)); tp 302 net/ipv6/ip6_gre.c rcu_assign_pointer(*tp, t); tp 307 net/ipv6/ip6_gre.c struct ip6_tnl __rcu **tp; tp 310 net/ipv6/ip6_gre.c for (tp = ip6gre_bucket(ign, t); tp 311 net/ipv6/ip6_gre.c (iter = rtnl_dereference(*tp)) != NULL; tp 312 net/ipv6/ip6_gre.c tp = &iter->next) { tp 314 net/ipv6/ip6_gre.c rcu_assign_pointer(*tp, t->next); tp 329 net/ipv6/ip6_gre.c struct ip6_tnl __rcu **tp; tp 332 net/ipv6/ip6_gre.c for (tp = __ip6gre_bucket(ign, parms); tp 333 net/ipv6/ip6_gre.c (t = rtnl_dereference(*tp)) != NULL; tp 334 net/ipv6/ip6_gre.c tp = &t->next) tp 213 net/ipv6/ip6_tunnel.c struct ip6_tnl __rcu **tp = ip6_tnl_bucket(ip6n, &t->parms); tp 217 net/ipv6/ip6_tunnel.c rcu_assign_pointer(t->next , rtnl_dereference(*tp)); tp 218 net/ipv6/ip6_tunnel.c rcu_assign_pointer(*tp, t); tp 229 net/ipv6/ip6_tunnel.c struct ip6_tnl __rcu **tp; tp 235 net/ipv6/ip6_tunnel.c for (tp = ip6_tnl_bucket(ip6n, &t->parms); tp 236 net/ipv6/ip6_tunnel.c (iter = rtnl_dereference(*tp)) != NULL; tp 237 net/ipv6/ip6_tunnel.c tp = &iter->next) { tp 239 net/ipv6/ip6_tunnel.c rcu_assign_pointer(*tp, t->next); tp 346 net/ipv6/ip6_tunnel.c struct ip6_tnl __rcu **tp; tp 350 net/ipv6/ip6_tunnel.c for (tp = ip6_tnl_bucket(ip6n, p); tp 351 net/ipv6/ip6_tunnel.c (t = rtnl_dereference(*tp)) != NULL; tp 352 net/ipv6/ip6_tunnel.c tp = &t->next) { tp 154 net/ipv6/ip6_vti.c struct ip6_tnl __rcu **tp = vti6_tnl_bucket(ip6n, &t->parms); tp 156 net/ipv6/ip6_vti.c rcu_assign_pointer(t->next , rtnl_dereference(*tp)); tp 157 net/ipv6/ip6_vti.c rcu_assign_pointer(*tp, t); tp 163 net/ipv6/ip6_vti.c struct ip6_tnl __rcu **tp; tp 166 net/ipv6/ip6_vti.c for (tp = vti6_tnl_bucket(ip6n, &t->parms); tp 167 net/ipv6/ip6_vti.c (iter = rtnl_dereference(*tp)) != NULL; tp 168 net/ipv6/ip6_vti.c tp = &iter->next) { tp 170 net/ipv6/ip6_vti.c rcu_assign_pointer(*tp, t->next); tp 260 net/ipv6/ip6_vti.c struct ip6_tnl __rcu **tp; tp 264 net/ipv6/ip6_vti.c for (tp = vti6_tnl_bucket(ip6n, p); tp 265 net/ipv6/ip6_vti.c (t = rtnl_dereference(*tp)) != NULL; tp 266 net/ipv6/ip6_vti.c tp = &t->next) { tp 55 net/ipv6/netfilter/ip6t_hbh.c const u_int8_t *tp = NULL; tp 105 net/ipv6/netfilter/ip6t_hbh.c tp = skb_header_pointer(skb, ptr, sizeof(_opttype), tp 107 net/ipv6/netfilter/ip6t_hbh.c if (tp == NULL) tp 111 net/ipv6/netfilter/ip6t_hbh.c if (*tp != (optinfo->opts[temp] & 0xFF00) >> 8) { tp 112 net/ipv6/netfilter/ip6t_hbh.c pr_debug("Tbad %02X %02X\n", *tp, tp 119 net/ipv6/netfilter/ip6t_hbh.c if (*tp) { tp 155 net/ipv6/sit.c struct ip_tunnel __rcu **tp; tp 158 net/ipv6/sit.c for (tp = ipip6_bucket(sitn, t); tp 159 net/ipv6/sit.c (iter = rtnl_dereference(*tp)) != NULL; tp 160 net/ipv6/sit.c tp = &iter->next) { tp 162 net/ipv6/sit.c rcu_assign_pointer(*tp, t->next); tp 170 net/ipv6/sit.c struct ip_tunnel __rcu **tp = ipip6_bucket(sitn, t); tp 172 net/ipv6/sit.c rcu_assign_pointer(t->next, rtnl_dereference(*tp)); tp 173 net/ipv6/sit.c rcu_assign_pointer(*tp, t); tp 229 net/ipv6/sit.c struct ip_tunnel __rcu **tp; tp 234 net/ipv6/sit.c for (tp = __ipip6_bucket(sitn, parms); tp 235 net/ipv6/sit.c (t = rtnl_dereference(*tp)) != NULL; tp 236 net/ipv6/sit.c tp = &t->next) { tp 134 net/ipv6/syncookies.c struct tcp_sock *tp = tcp_sk(sk); tp 243 net/ipv6/syncookies.c req->rsk_window_clamp = tp->window_clamp ? :dst_metric(dst, RTAX_WINDOW); tp 151 net/ipv6/tcp_ipv6.c struct tcp_sock *tp = tcp_sk(sk); tp 214 net/ipv6/tcp_ipv6.c if (tp->rx_opt.ts_recent_stamp && tp 216 net/ipv6/tcp_ipv6.c tp->rx_opt.ts_recent = 0; tp 217 net/ipv6/tcp_ipv6.c tp->rx_opt.ts_recent_stamp = 0; tp 218 net/ipv6/tcp_ipv6.c WRITE_ONCE(tp->write_seq, 0); tp 242 net/ipv6/tcp_ipv6.c tp->af_specific = &tcp_sock_ipv6_mapped_specific; tp 252 net/ipv6/tcp_ipv6.c tp->af_specific = &tcp_sock_ipv6_specific; tp 301 net/ipv6/tcp_ipv6.c tp->rx_opt.mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr); tp 312 net/ipv6/tcp_ipv6.c if (likely(!tp->repair)) { tp 313 net/ipv6/tcp_ipv6.c if (!tp->write_seq) tp 314 net/ipv6/tcp_ipv6.c WRITE_ONCE(tp->write_seq, tp 319 net/ipv6/tcp_ipv6.c tp->tsoffset = secure_tcpv6_ts_off(sock_net(sk), tp 368 net/ipv6/tcp_ipv6.c struct tcp_sock *tp; tp 408 net/ipv6/tcp_ipv6.c tp = tcp_sk(sk); tp 410 net/ipv6/tcp_ipv6.c fastopen = rcu_dereference(tp->fastopen_rsk); tp 411 net/ipv6/tcp_ipv6.c snd_una = fastopen ? tcp_rsk(fastopen)->snt_isn : tp->snd_una; tp 413 net/ipv6/tcp_ipv6.c !between(seq, snd_una, tp->snd_nxt)) { tp 441 net/ipv6/tcp_ipv6.c tp->mtu_info = ntohl(info); tp 1331 net/ipv6/tcp_ipv6.c struct tcp_sock *tp; tp 1430 net/ipv6/tcp_ipv6.c tp = tcp_sk(sk); tp 1431 net/ipv6/tcp_ipv6.c if (TCP_SKB_CB(opt_skb)->end_seq == tp->rcv_nxt && tp 1865 net/ipv6/tcp_ipv6.c const struct tcp_sock *tp = tcp_sk(sp); tp 1899 net/ipv6/tcp_ipv6.c rx_queue = max_t(int, READ_ONCE(tp->rcv_nxt) - tp 1900 net/ipv6/tcp_ipv6.c READ_ONCE(tp->copied_seq), 0); tp 1911 net/ipv6/tcp_ipv6.c READ_ONCE(tp->write_seq) - tp->snd_una, tp 1923 net/ipv6/tcp_ipv6.c tp->snd_cwnd, tp 1926 net/ipv6/tcp_ipv6.c (tcp_in_initial_slowstart(tp) ? -1 : tp->snd_ssthresh) tp 288 net/netfilter/nft_payload.c NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_PORTS, tp, src, tp 295 net/netfilter/nft_payload.c NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_PORTS, tp, dst, tp 316 net/netfilter/nft_payload.c NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_PORTS, tp, src, tp 323 net/netfilter/nft_payload.c NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_PORTS, tp, dst, tp 659 net/openvswitch/actions.c flow_key->tp.src = src; tp 663 net/openvswitch/actions.c flow_key->tp.dst = dst; tp 671 net/openvswitch/actions.c flow_key->tp.src = src; tp 672 net/openvswitch/actions.c flow_key->tp.dst = dst; tp 697 net/openvswitch/actions.c flow_key->tp.src = src; tp 702 net/openvswitch/actions.c flow_key->tp.dst = dst; tp 735 net/openvswitch/actions.c flow_key->tp.src = sh->source; tp 736 net/openvswitch/actions.c flow_key->tp.dst = sh->dest; tp 839 net/openvswitch/conntrack.c key->tp.src = src; tp 861 net/openvswitch/conntrack.c key->tp.dst = dst; tp 247 net/openvswitch/datapath.c ovs_flow_stats_update(flow, key->tp.flags, skb); tp 57 net/openvswitch/flow.c #define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) tp 413 net/openvswitch/flow.c key->tp.src = htons(icmp->icmp6_type); tp 414 net/openvswitch/flow.c key->tp.dst = htons(icmp->icmp6_code); tp 563 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 576 net/openvswitch/flow.c key->tp.src = tcp->source; tp 577 net/openvswitch/flow.c key->tp.dst = tcp->dest; tp 578 net/openvswitch/flow.c key->tp.flags = TCP_FLAGS_BE16(tcp); tp 580 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 586 net/openvswitch/flow.c key->tp.src = udp->source; tp 587 net/openvswitch/flow.c key->tp.dst = udp->dest; tp 589 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 594 net/openvswitch/flow.c key->tp.src = sctp->source; tp 595 net/openvswitch/flow.c key->tp.dst = sctp->dest; tp 597 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 605 net/openvswitch/flow.c key->tp.src = htons(icmp->type); tp 606 net/openvswitch/flow.c key->tp.dst = htons(icmp->code); tp 608 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 682 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 692 net/openvswitch/flow.c key->tp.src = tcp->source; tp 693 net/openvswitch/flow.c key->tp.dst = tcp->dest; tp 694 net/openvswitch/flow.c key->tp.flags = TCP_FLAGS_BE16(tcp); tp 696 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 701 net/openvswitch/flow.c key->tp.src = udp->source; tp 702 net/openvswitch/flow.c key->tp.dst = udp->dest; tp 704 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 709 net/openvswitch/flow.c key->tp.src = sctp->source; tp 710 net/openvswitch/flow.c key->tp.dst = sctp->dest; tp 712 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 720 net/openvswitch/flow.c memset(&key->tp, 0, sizeof(key->tp)); tp 761 net/openvswitch/flow.c key->tp.flags = 0; tp 102 net/openvswitch/flow.h } tp; tp 156 net/openvswitch/flow.h key->tp.dst == 0 && tp 157 net/openvswitch/flow.h (key->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) || tp 158 net/openvswitch/flow.h key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)); tp 263 net/openvswitch/flow_netlink.c if (match->key->tp.src == tp 265 net/openvswitch/flow_netlink.c match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { tp 273 net/openvswitch/flow_netlink.c if (match->mask && (match->mask->key.tp.src == htons(0xff))) tp 1643 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.src, tcp_key->tcp_src, is_mask); tp 1644 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.dst, tcp_key->tcp_dst, is_mask); tp 1649 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.flags, tp 1659 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.src, udp_key->udp_src, is_mask); tp 1660 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.dst, udp_key->udp_dst, is_mask); tp 1668 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.src, sctp_key->sctp_src, is_mask); tp 1669 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.dst, sctp_key->sctp_dst, is_mask); tp 1677 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.src, tp 1679 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.dst, tp 1688 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.src, tp 1690 net/openvswitch/flow_netlink.c SW_FLOW_KEY_PUT(match, tp.dst, tp 2137 net/openvswitch/flow_netlink.c tcp_key->tcp_src = output->tp.src; tp 2138 net/openvswitch/flow_netlink.c tcp_key->tcp_dst = output->tp.dst; tp 2140 net/openvswitch/flow_netlink.c output->tp.flags)) tp 2149 net/openvswitch/flow_netlink.c udp_key->udp_src = output->tp.src; tp 2150 net/openvswitch/flow_netlink.c udp_key->udp_dst = output->tp.dst; tp 2158 net/openvswitch/flow_netlink.c sctp_key->sctp_src = output->tp.src; tp 2159 net/openvswitch/flow_netlink.c sctp_key->sctp_dst = output->tp.dst; tp 2168 net/openvswitch/flow_netlink.c icmp_key->icmp_type = ntohs(output->tp.src); tp 2169 net/openvswitch/flow_netlink.c icmp_key->icmp_code = ntohs(output->tp.dst); tp 2179 net/openvswitch/flow_netlink.c icmpv6_key->icmpv6_type = ntohs(output->tp.src); tp 2180 net/openvswitch/flow_netlink.c icmpv6_key->icmpv6_code = ntohs(output->tp.dst); tp 51 net/sched/act_api.c int tcf_action_check_ctrlact(int action, struct tcf_proto *tp, tp 69 net/sched/act_api.c if (!tp || !newchain) { tp 75 net/sched/act_api.c *newchain = tcf_chain_get_by_act(tp->chain->block, chain_index); tp 842 net/sched/act_api.c struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp, tp 917 net/sched/act_api.c rtnl_held, tp, extack); tp 920 net/sched/act_api.c tp, extack); tp 955 net/sched/act_api.c int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla, tp 972 net/sched/act_api.c act = tcf_action_init_1(net, tp, tb[i], est, name, ovr, bind, tp 137 net/sched/act_bpf.c unsigned char *tp = skb_tail_pointer(skb); tp 169 net/sched/act_bpf.c nlmsg_trim(skb, tp); tp 278 net/sched/act_bpf.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 326 net/sched/act_bpf.c ret = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 97 net/sched/act_connmark.c struct tcf_proto *tp, tp 131 net/sched/act_connmark.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, tp 149 net/sched/act_connmark.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, tp 45 net/sched/act_csum.c int bind, bool rtnl_held, struct tcf_proto *tp, tp 89 net/sched/act_csum.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 670 net/sched/act_ct.c struct tcf_proto *tp, tp 718 net/sched/act_ct.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 156 net/sched/act_ctinfo.c struct tcf_proto *tp, tp 230 net/sched/act_ctinfo.c err = tcf_action_check_ctrlact(actparm->action, tp, &goto_ch, extack); tp 56 net/sched/act_gact.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 119 net/sched/act_gact.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 468 net/sched/act_ife.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 542 net/sched/act_ife.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 98 net/sched/act_ipt.c struct tcf_proto *tp) tp 207 net/sched/act_ipt.c int bind, bool rtnl_held, struct tcf_proto *tp, tp 211 net/sched/act_ipt.c bind, tp); tp 216 net/sched/act_ipt.c int bind, bool unlocked, struct tcf_proto *tp, tp 220 net/sched/act_ipt.c bind, tp); tp 95 net/sched/act_mirred.c struct tcf_proto *tp, tp 167 net/sched/act_mirred.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 137 net/sched/act_mpls.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 242 net/sched/act_mpls.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 38 net/sched/act_nat.c bool rtnl_held, struct tcf_proto *tp, tp 80 net/sched/act_nat.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 140 net/sched/act_pedit.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 209 net/sched/act_pedit.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 50 net/sched/act_police.c struct tcf_proto *tp, tp 101 net/sched/act_police.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 38 net/sched/act_sample.c int bind, bool rtnl_held, struct tcf_proto *tp, tp 82 net/sched/act_sample.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 60 net/sched/act_simple.c struct tc_defact *p, struct tcf_proto *tp, tp 67 net/sched/act_simple.c err = tcf_action_check_ctrlact(p->action, tp, &goto_ch, extack); tp 89 net/sched/act_simple.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 137 net/sched/act_simple.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, tp 154 net/sched/act_simple.c err = reset_policy(*a, tb[TCA_DEF_DATA], parm, tp, extack); tp 89 net/sched/act_skbedit.c struct tcf_proto *tp, tp 183 net/sched/act_skbedit.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 82 net/sched/act_skbmod.c struct tcf_proto *tp, tp 157 net/sched/act_skbmod.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 215 net/sched/act_tunnel_key.c struct tcf_proto *tp, tp 368 net/sched/act_tunnel_key.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 105 net/sched/act_vlan.c struct tcf_proto *tp, struct netlink_ext_ack *extack) tp 204 net/sched/act_vlan.c err = tcf_action_check_ctrlact(parm->action, tp, &goto_ch, extack); tp 51 net/sched/cls_api.c static u32 destroy_obj_hashfn(const struct tcf_proto *tp) tp 53 net/sched/cls_api.c return jhash_3words(tp->chain->index, tp->prio, tp 54 net/sched/cls_api.c (__force __u32)tp->protocol, 0); tp 58 net/sched/cls_api.c struct tcf_proto *tp) tp 63 net/sched/cls_api.c hash_add_rcu(block->proto_destroy_ht, &tp->destroy_ht_node, tp 64 net/sched/cls_api.c destroy_obj_hashfn(tp)); tp 77 net/sched/cls_api.c struct tcf_proto *tp) tp 79 net/sched/cls_api.c u32 hash = destroy_obj_hashfn(tp); tp 86 net/sched/cls_api.c if (tcf_proto_cmp(tp, iter)) { tp 97 net/sched/cls_api.c tcf_proto_signal_destroyed(struct tcf_chain *chain, struct tcf_proto *tp) tp 102 net/sched/cls_api.c if (hash_hashed(&tp->destroy_ht_node)) tp 103 net/sched/cls_api.c hash_del_rcu(&tp->destroy_ht_node); tp 212 net/sched/cls_api.c static inline u32 tcf_auto_prio(struct tcf_proto *tp) tp 216 net/sched/cls_api.c if (tp) tp 217 net/sched/cls_api.c first = tp->prio - 1; tp 255 net/sched/cls_api.c struct tcf_proto *tp; tp 258 net/sched/cls_api.c tp = kzalloc(sizeof(*tp), GFP_KERNEL); tp 259 net/sched/cls_api.c if (!tp) tp 262 net/sched/cls_api.c tp->ops = tcf_proto_lookup_ops(kind, rtnl_held, extack); tp 263 net/sched/cls_api.c if (IS_ERR(tp->ops)) { tp 264 net/sched/cls_api.c err = PTR_ERR(tp->ops); tp 267 net/sched/cls_api.c tp->classify = tp->ops->classify; tp 268 net/sched/cls_api.c tp->protocol = protocol; tp 269 net/sched/cls_api.c tp->prio = prio; tp 270 net/sched/cls_api.c tp->chain = chain; tp 271 net/sched/cls_api.c spin_lock_init(&tp->lock); tp 272 net/sched/cls_api.c refcount_set(&tp->refcnt, 1); tp 274 net/sched/cls_api.c err = tp->ops->init(tp); tp 276 net/sched/cls_api.c module_put(tp->ops->owner); tp 279 net/sched/cls_api.c return tp; tp 282 net/sched/cls_api.c kfree(tp); tp 286 net/sched/cls_api.c static void tcf_proto_get(struct tcf_proto *tp) tp 288 net/sched/cls_api.c refcount_inc(&tp->refcnt); tp 293 net/sched/cls_api.c static void tcf_proto_destroy(struct tcf_proto *tp, bool rtnl_held, tp 296 net/sched/cls_api.c tp->ops->destroy(tp, rtnl_held, extack); tp 298 net/sched/cls_api.c tcf_proto_signal_destroyed(tp->chain, tp); tp 299 net/sched/cls_api.c tcf_chain_put(tp->chain); tp 300 net/sched/cls_api.c module_put(tp->ops->owner); tp 301 net/sched/cls_api.c kfree_rcu(tp, rcu); tp 304 net/sched/cls_api.c static void tcf_proto_put(struct tcf_proto *tp, bool rtnl_held, tp 307 net/sched/cls_api.c if (refcount_dec_and_test(&tp->refcnt)) tp 308 net/sched/cls_api.c tcf_proto_destroy(tp, rtnl_held, true, extack); tp 311 net/sched/cls_api.c static bool tcf_proto_check_delete(struct tcf_proto *tp) tp 313 net/sched/cls_api.c if (tp->ops->delete_empty) tp 314 net/sched/cls_api.c return tp->ops->delete_empty(tp); tp 316 net/sched/cls_api.c tp->deleting = true; tp 317 net/sched/cls_api.c return tp->deleting; tp 320 net/sched/cls_api.c static void tcf_proto_mark_delete(struct tcf_proto *tp) tp 322 net/sched/cls_api.c spin_lock(&tp->lock); tp 323 net/sched/cls_api.c tp->deleting = true; tp 324 net/sched/cls_api.c spin_unlock(&tp->lock); tp 327 net/sched/cls_api.c static bool tcf_proto_is_deleting(struct tcf_proto *tp) tp 331 net/sched/cls_api.c spin_lock(&tp->lock); tp 332 net/sched/cls_api.c deleting = tp->deleting; tp 333 net/sched/cls_api.c spin_unlock(&tp->lock); tp 583 net/sched/cls_api.c struct tcf_proto *tp, *tp_next; tp 586 net/sched/cls_api.c tp = tcf_chain_dereference(chain->filter_chain, chain); tp 587 net/sched/cls_api.c while (tp) { tp 588 net/sched/cls_api.c tp_next = rcu_dereference_protected(tp->next, 1); tp 589 net/sched/cls_api.c tcf_proto_signal_destroying(chain, tp); tp 590 net/sched/cls_api.c tp = tp_next; tp 592 net/sched/cls_api.c tp = tcf_chain_dereference(chain->filter_chain, chain); tp 598 net/sched/cls_api.c while (tp) { tp 599 net/sched/cls_api.c tp_next = rcu_dereference_protected(tp->next, 1); tp 600 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 601 net/sched/cls_api.c tp = tp_next; tp 988 net/sched/cls_api.c __tcf_get_next_proto(struct tcf_chain *chain, struct tcf_proto *tp) tp 995 net/sched/cls_api.c if (!tp) { tp 996 net/sched/cls_api.c tp = tcf_chain_dereference(chain->filter_chain, chain); tp 997 net/sched/cls_api.c } else if (tcf_proto_is_deleting(tp)) { tp 1002 net/sched/cls_api.c prio = tp->prio + 1; tp 1003 net/sched/cls_api.c tp = tcf_chain_dereference(chain->filter_chain, chain); tp 1005 net/sched/cls_api.c for (; tp; tp = tcf_chain_dereference(tp->next, chain)) tp 1006 net/sched/cls_api.c if (!tp->deleting && tp->prio >= prio) tp 1009 net/sched/cls_api.c tp = tcf_chain_dereference(tp->next, chain); tp 1012 net/sched/cls_api.c if (tp) tp 1013 net/sched/cls_api.c tcf_proto_get(tp); tp 1017 net/sched/cls_api.c return tp; tp 1029 net/sched/cls_api.c tcf_get_next_proto(struct tcf_chain *chain, struct tcf_proto *tp, tp 1032 net/sched/cls_api.c struct tcf_proto *tp_next = __tcf_get_next_proto(chain, tp); tp 1034 net/sched/cls_api.c if (tp) tp 1035 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 1440 net/sched/cls_api.c struct tcf_proto *tp, *tp_prev; tp 1450 net/sched/cls_api.c for (tp = __tcf_get_next_proto(chain, NULL); tp; tp 1451 net/sched/cls_api.c tp_prev = tp, tp 1452 net/sched/cls_api.c tp = __tcf_get_next_proto(chain, tp), tp 1454 net/sched/cls_api.c if (tp->ops->reoffload) { tp 1455 net/sched/cls_api.c err = tp->ops->reoffload(tp, add, cb, cb_priv, tp 1470 net/sched/cls_api.c tcf_proto_put(tp, true, NULL); tp 1562 net/sched/cls_api.c int tcf_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 1567 net/sched/cls_api.c const struct tcf_proto *orig_tp = tp; tp 1573 net/sched/cls_api.c for (; tp; tp = rcu_dereference_bh(tp->next)) { tp 1577 net/sched/cls_api.c if (tp->protocol != protocol && tp 1578 net/sched/cls_api.c tp->protocol != htons(ETH_P_ALL)) tp 1581 net/sched/cls_api.c err = tp->classify(skb, tp, res); tp 1612 net/sched/cls_api.c tp->chain->block->index, tp 1613 net/sched/cls_api.c tp->prio & 0xffff, tp 1614 net/sched/cls_api.c ntohs(tp->protocol)); tp 1618 net/sched/cls_api.c tp = first_tp; tp 1637 net/sched/cls_api.c struct tcf_proto *tp) tp 1643 net/sched/cls_api.c tcf_chain0_head_change(chain, tp); tp 1644 net/sched/cls_api.c tcf_proto_get(tp); tp 1645 net/sched/cls_api.c RCU_INIT_POINTER(tp->next, tcf_chain_tp_prev(chain, chain_info)); tp 1646 net/sched/cls_api.c rcu_assign_pointer(*chain_info->pprev, tp); tp 1653 net/sched/cls_api.c struct tcf_proto *tp) tp 1657 net/sched/cls_api.c tcf_proto_mark_delete(tp); tp 1658 net/sched/cls_api.c if (tp == chain->filter_chain) tp 1679 net/sched/cls_api.c struct tcf_proto *tp; tp 1690 net/sched/cls_api.c tp = tcf_chain_tp_find(chain, &chain_info, tp 1692 net/sched/cls_api.c if (!tp) tp 1696 net/sched/cls_api.c if (tp) { tp 1698 net/sched/cls_api.c tp_new = tp; tp 1708 net/sched/cls_api.c struct tcf_proto *tp, bool rtnl_held, tp 1722 net/sched/cls_api.c if (tp_iter == tp) { tp 1733 net/sched/cls_api.c if (!tp_iter || !tcf_proto_check_delete(tp)) { tp 1738 net/sched/cls_api.c tcf_proto_signal_destroying(chain, tp); tp 1740 net/sched/cls_api.c if (tp == chain->filter_chain) tp 1745 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, extack); tp 1754 net/sched/cls_api.c struct tcf_proto *tp; tp 1758 net/sched/cls_api.c (tp = tcf_chain_dereference(*pprev, chain)); tp 1759 net/sched/cls_api.c pprev = &tp->next) { tp 1760 net/sched/cls_api.c if (tp->prio >= prio) { tp 1761 net/sched/cls_api.c if (tp->prio == prio) { tp 1763 net/sched/cls_api.c (tp->protocol != protocol && protocol)) tp 1766 net/sched/cls_api.c tp = NULL; tp 1772 net/sched/cls_api.c if (tp) { tp 1773 net/sched/cls_api.c chain_info->next = tp->next; tp 1774 net/sched/cls_api.c tcf_proto_get(tp); tp 1778 net/sched/cls_api.c return tp; tp 1782 net/sched/cls_api.c struct tcf_proto *tp, struct tcf_block *block, tp 1805 net/sched/cls_api.c tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); tp 1806 net/sched/cls_api.c if (nla_put_string(skb, TCA_KIND, tp->ops->kind)) tp 1808 net/sched/cls_api.c if (nla_put_u32(skb, TCA_CHAIN, tp->chain->index)) tp 1813 net/sched/cls_api.c if (tp->ops->dump && tp 1814 net/sched/cls_api.c tp->ops->dump(net, tp, fh, skb, tcm, rtnl_held) < 0) tp 1827 net/sched/cls_api.c struct nlmsghdr *n, struct tcf_proto *tp, tp 1840 net/sched/cls_api.c if (tcf_fill_node(net, skb, tp, block, q, parent, fh, portid, tp 1859 net/sched/cls_api.c struct nlmsghdr *n, struct tcf_proto *tp, tp 1872 net/sched/cls_api.c if (tcf_fill_node(net, skb, tp, block, q, parent, fh, portid, tp 1880 net/sched/cls_api.c err = tp->ops->delete(tp, fh, last, rtnl_held, extack); tp 1905 net/sched/cls_api.c struct tcf_proto *tp; tp 1907 net/sched/cls_api.c for (tp = tcf_get_next_proto(chain, NULL, rtnl_held); tp 1908 net/sched/cls_api.c tp; tp = tcf_get_next_proto(chain, tp, rtnl_held)) tp 1909 net/sched/cls_api.c tfilter_notify(net, oskb, n, tp, block, tp 1913 net/sched/cls_api.c static void tfilter_put(struct tcf_proto *tp, void *fh) tp 1915 net/sched/cls_api.c if (tp->ops->put && fh) tp 1916 net/sched/cls_api.c tp->ops->put(tp, fh); tp 1935 net/sched/cls_api.c struct tcf_proto *tp; tp 1958 net/sched/cls_api.c tp = NULL; tp 2024 net/sched/cls_api.c tp = tcf_chain_tp_find(chain, &chain_info, protocol, tp 2026 net/sched/cls_api.c if (IS_ERR(tp)) { tp 2028 net/sched/cls_api.c err = PTR_ERR(tp); tp 2032 net/sched/cls_api.c if (tp == NULL) { tp 2067 net/sched/cls_api.c tp = tcf_chain_tp_insert_unique(chain, tp_new, protocol, prio, tp 2069 net/sched/cls_api.c if (IS_ERR(tp)) { tp 2070 net/sched/cls_api.c err = PTR_ERR(tp); tp 2077 net/sched/cls_api.c if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) { tp 2083 net/sched/cls_api.c fh = tp->ops->get(tp, t->tcm_handle); tp 2092 net/sched/cls_api.c tfilter_put(tp, fh); tp 2098 net/sched/cls_api.c if (chain->tmplt_ops && chain->tmplt_ops != tp->ops) { tp 2104 net/sched/cls_api.c err = tp->ops->change(net, skb, tp, cl, t->tcm_handle, tca, &fh, tp 2108 net/sched/cls_api.c tfilter_notify(net, skb, n, tp, block, q, parent, fh, tp 2110 net/sched/cls_api.c tfilter_put(tp, fh); tp 2118 net/sched/cls_api.c tcf_chain_tp_delete_empty(chain, tp, rtnl_held, NULL); tp 2121 net/sched/cls_api.c if (tp && !IS_ERR(tp)) tp 2122 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 2161 net/sched/cls_api.c struct tcf_proto *tp = NULL; tp 2247 net/sched/cls_api.c tp = tcf_chain_tp_find(chain, &chain_info, protocol, tp 2249 net/sched/cls_api.c if (!tp || IS_ERR(tp)) { tp 2251 net/sched/cls_api.c err = tp ? PTR_ERR(tp) : -ENOENT; tp 2253 net/sched/cls_api.c } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) { tp 2258 net/sched/cls_api.c tcf_proto_signal_destroying(chain, tp); tp 2259 net/sched/cls_api.c tcf_chain_tp_remove(chain, &chain_info, tp); tp 2262 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 2263 net/sched/cls_api.c tfilter_notify(net, skb, n, tp, block, q, parent, fh, tp 2270 net/sched/cls_api.c fh = tp->ops->get(tp, t->tcm_handle); tp 2278 net/sched/cls_api.c err = tfilter_del_notify(net, skb, n, tp, block, tp 2285 net/sched/cls_api.c tcf_chain_tp_delete_empty(chain, tp, rtnl_held, extack); tp 2290 net/sched/cls_api.c if (tp && !IS_ERR(tp)) tp 2291 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 2321 net/sched/cls_api.c struct tcf_proto *tp = NULL; tp 2388 net/sched/cls_api.c tp = tcf_chain_tp_find(chain, &chain_info, protocol, tp 2391 net/sched/cls_api.c if (!tp || IS_ERR(tp)) { tp 2393 net/sched/cls_api.c err = tp ? PTR_ERR(tp) : -ENOENT; tp 2395 net/sched/cls_api.c } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) { tp 2401 net/sched/cls_api.c fh = tp->ops->get(tp, t->tcm_handle); tp 2407 net/sched/cls_api.c err = tfilter_notify(net, skb, n, tp, block, q, parent, tp 2413 net/sched/cls_api.c tfilter_put(tp, fh); tp 2416 net/sched/cls_api.c if (tp && !IS_ERR(tp)) tp 2417 net/sched/cls_api.c tcf_proto_put(tp, rtnl_held, NULL); tp 2437 net/sched/cls_api.c static int tcf_node_dump(struct tcf_proto *tp, void *n, struct tcf_walker *arg) tp 2442 net/sched/cls_api.c return tcf_fill_node(net, a->skb, tp, a->block, a->q, a->parent, tp 2455 net/sched/cls_api.c struct tcf_proto *tp, *tp_prev; tp 2458 net/sched/cls_api.c for (tp = __tcf_get_next_proto(chain, NULL); tp 2459 net/sched/cls_api.c tp; tp 2460 net/sched/cls_api.c tp_prev = tp, tp 2461 net/sched/cls_api.c tp = __tcf_get_next_proto(chain, tp), tp 2467 net/sched/cls_api.c TC_H_MAJ(tcm->tcm_info) != tp->prio) tp 2470 net/sched/cls_api.c TC_H_MIN(tcm->tcm_info) != tp->protocol) tp 2476 net/sched/cls_api.c if (tcf_fill_node(net, skb, tp, block, q, parent, NULL, tp 2483 net/sched/cls_api.c if (!tp->ops->walk) tp 2495 net/sched/cls_api.c tp->ops->walk(tp, &arg.w, true); tp 2504 net/sched/cls_api.c tcf_proto_put(tp, true, NULL); tp 3009 net/sched/cls_api.c int tcf_exts_validate(struct net *net, struct tcf_proto *tp, struct nlattr **tb, tp 3019 net/sched/cls_api.c act = tcf_action_init_1(net, tp, tb[exts->police], tp 3032 net/sched/cls_api.c err = tcf_action_init(net, tp, tb[exts->action], tp 3143 net/sched/cls_api.c struct tcf_proto *tp, u32 *cnt, tp 3148 net/sched/cls_api.c spin_lock(&tp->lock); tp 3158 net/sched/cls_api.c spin_unlock(&tp->lock); tp 3162 net/sched/cls_api.c tc_cls_offload_cnt_reset(struct tcf_block *block, struct tcf_proto *tp, tp 3167 net/sched/cls_api.c spin_lock(&tp->lock); tp 3170 net/sched/cls_api.c spin_unlock(&tp->lock); tp 3228 net/sched/cls_api.c int tc_setup_cb_add(struct tcf_block *block, struct tcf_proto *tp, tp 3259 net/sched/cls_api.c if (tp->ops->hw_add) tp 3260 net/sched/cls_api.c tp->ops->hw_add(tp, type_data); tp 3262 net/sched/cls_api.c tc_cls_offload_cnt_update(block, tp, in_hw_count, flags, tp 3278 net/sched/cls_api.c int tc_setup_cb_replace(struct tcf_block *block, struct tcf_proto *tp, tp 3307 net/sched/cls_api.c tc_cls_offload_cnt_reset(block, tp, old_in_hw_count, old_flags); tp 3308 net/sched/cls_api.c if (tp->ops->hw_del) tp 3309 net/sched/cls_api.c tp->ops->hw_del(tp, type_data); tp 3315 net/sched/cls_api.c if (tp->ops->hw_add) tp 3316 net/sched/cls_api.c tp->ops->hw_add(tp, type_data); tp 3318 net/sched/cls_api.c tc_cls_offload_cnt_update(block, tp, new_in_hw_count, tp 3332 net/sched/cls_api.c int tc_setup_cb_destroy(struct tcf_block *block, struct tcf_proto *tp, tp 3355 net/sched/cls_api.c tc_cls_offload_cnt_reset(block, tp, in_hw_count, flags); tp 3356 net/sched/cls_api.c if (tp->ops->hw_del) tp 3357 net/sched/cls_api.c tp->ops->hw_del(tp, type_data); tp 3366 net/sched/cls_api.c int tc_setup_cb_reoffload(struct tcf_block *block, struct tcf_proto *tp, tp 3377 net/sched/cls_api.c tc_cls_offload_cnt_update(block, tp, in_hw_count, flags, 1, tp 33 net/sched/cls_basic.c struct tcf_proto *tp; tp 39 net/sched/cls_basic.c static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 43 net/sched/cls_basic.c struct basic_head *head = rcu_dereference_bh(tp->root); tp 60 net/sched/cls_basic.c static void *basic_get(struct tcf_proto *tp, u32 handle) tp 62 net/sched/cls_basic.c struct basic_head *head = rtnl_dereference(tp->root); tp 74 net/sched/cls_basic.c static int basic_init(struct tcf_proto *tp) tp 83 net/sched/cls_basic.c rcu_assign_pointer(tp->root, head); tp 106 net/sched/cls_basic.c static void basic_destroy(struct tcf_proto *tp, bool rtnl_held, tp 109 net/sched/cls_basic.c struct basic_head *head = rtnl_dereference(tp->root); tp 114 net/sched/cls_basic.c tcf_unbind_filter(tp, &f->res); tp 125 net/sched/cls_basic.c static int basic_delete(struct tcf_proto *tp, void *arg, bool *last, tp 128 net/sched/cls_basic.c struct basic_head *head = rtnl_dereference(tp->root); tp 132 net/sched/cls_basic.c tcf_unbind_filter(tp, &f->res); tp 145 net/sched/cls_basic.c static int basic_set_parms(struct net *net, struct tcf_proto *tp, tp 153 net/sched/cls_basic.c err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, true, extack); tp 157 net/sched/cls_basic.c err = tcf_em_tree_validate(tp, tb[TCA_BASIC_EMATCHES], &f->ematches); tp 163 net/sched/cls_basic.c tcf_bind_filter(tp, &f->res, base); tp 166 net/sched/cls_basic.c f->tp = tp; tp 171 net/sched/cls_basic.c struct tcf_proto *tp, unsigned long base, u32 handle, tp 176 net/sched/cls_basic.c struct basic_head *head = rtnl_dereference(tp->root); tp 219 net/sched/cls_basic.c err = basic_set_parms(net, tp, fnew, base, tb, tca[TCA_RATE], ovr, tp 232 net/sched/cls_basic.c tcf_unbind_filter(tp, &fold->res); tp 247 net/sched/cls_basic.c static void basic_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 250 net/sched/cls_basic.c struct basic_head *head = rtnl_dereference(tp->root); tp 257 net/sched/cls_basic.c if (arg->fn(tp, f, arg) < 0) { tp 279 net/sched/cls_basic.c static int basic_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 49 net/sched/cls_bpf.c struct tcf_proto *tp; tp 80 net/sched/cls_bpf.c static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 83 net/sched/cls_bpf.c struct cls_bpf_head *head = rcu_dereference_bh(tp->root); tp 144 net/sched/cls_bpf.c static int cls_bpf_offload_cmd(struct tcf_proto *tp, struct cls_bpf_prog *prog, tp 148 net/sched/cls_bpf.c struct tcf_block *block = tp->chain->block; tp 157 net/sched/cls_bpf.c tc_cls_common_offload_init(&cls_bpf.common, tp, obj->gen_flags, extack); tp 166 net/sched/cls_bpf.c err = tc_setup_cb_replace(block, tp, TC_SETUP_CLSBPF, &cls_bpf, tp 172 net/sched/cls_bpf.c err = tc_setup_cb_add(block, tp, TC_SETUP_CLSBPF, &cls_bpf, tp 176 net/sched/cls_bpf.c err = tc_setup_cb_destroy(block, tp, TC_SETUP_CLSBPF, &cls_bpf, tp 181 net/sched/cls_bpf.c cls_bpf_offload_cmd(tp, oldprog, prog, extack); tp 196 net/sched/cls_bpf.c static int cls_bpf_offload(struct tcf_proto *tp, struct cls_bpf_prog *prog, tp 212 net/sched/cls_bpf.c return cls_bpf_offload_cmd(tp, prog, oldprog, extack); tp 215 net/sched/cls_bpf.c static void cls_bpf_stop_offload(struct tcf_proto *tp, tp 221 net/sched/cls_bpf.c err = cls_bpf_offload_cmd(tp, NULL, prog, extack); tp 226 net/sched/cls_bpf.c static void cls_bpf_offload_update_stats(struct tcf_proto *tp, tp 229 net/sched/cls_bpf.c struct tcf_block *block = tp->chain->block; tp 232 net/sched/cls_bpf.c tc_cls_common_offload_init(&cls_bpf.common, tp, prog->gen_flags, NULL); tp 242 net/sched/cls_bpf.c static int cls_bpf_init(struct tcf_proto *tp) tp 252 net/sched/cls_bpf.c rcu_assign_pointer(tp->root, head); tp 287 net/sched/cls_bpf.c static void __cls_bpf_delete(struct tcf_proto *tp, struct cls_bpf_prog *prog, tp 290 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 293 net/sched/cls_bpf.c cls_bpf_stop_offload(tp, prog, extack); tp 295 net/sched/cls_bpf.c tcf_unbind_filter(tp, &prog->res); tp 302 net/sched/cls_bpf.c static int cls_bpf_delete(struct tcf_proto *tp, void *arg, bool *last, tp 305 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 307 net/sched/cls_bpf.c __cls_bpf_delete(tp, arg, extack); tp 312 net/sched/cls_bpf.c static void cls_bpf_destroy(struct tcf_proto *tp, bool rtnl_held, tp 315 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 319 net/sched/cls_bpf.c __cls_bpf_delete(tp, prog, extack); tp 325 net/sched/cls_bpf.c static void *cls_bpf_get(struct tcf_proto *tp, u32 handle) tp 327 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 376 net/sched/cls_bpf.c u32 gen_flags, const struct tcf_proto *tp) tp 403 net/sched/cls_bpf.c tcf_block_netif_keep_dst(tp->chain->block); tp 408 net/sched/cls_bpf.c static int cls_bpf_set_parms(struct net *net, struct tcf_proto *tp, tp 422 net/sched/cls_bpf.c ret = tcf_exts_validate(net, tp, tb, est, &prog->exts, ovr, true, tp 446 net/sched/cls_bpf.c cls_bpf_prog_from_efd(tb, prog, gen_flags, tp); tp 452 net/sched/cls_bpf.c tcf_bind_filter(tp, &prog->res, base); tp 459 net/sched/cls_bpf.c struct tcf_proto *tp, unsigned long base, tp 464 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 506 net/sched/cls_bpf.c ret = cls_bpf_set_parms(net, tp, prog, base, tb, tca[TCA_RATE], ovr, tp 511 net/sched/cls_bpf.c ret = cls_bpf_offload(tp, prog, oldprog, extack); tp 521 net/sched/cls_bpf.c tcf_unbind_filter(tp, &oldprog->res); tp 581 net/sched/cls_bpf.c static int cls_bpf_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 594 net/sched/cls_bpf.c cls_bpf_offload_update_stats(tp, prog); tp 647 net/sched/cls_bpf.c static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 650 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 656 net/sched/cls_bpf.c if (arg->fn(tp, prog, arg) < 0) { tp 665 net/sched/cls_bpf.c static int cls_bpf_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, tp 668 net/sched/cls_bpf.c struct cls_bpf_head *head = rtnl_dereference(tp->root); tp 669 net/sched/cls_bpf.c struct tcf_block *block = tp->chain->block; tp 678 net/sched/cls_bpf.c tc_cls_common_offload_init(&cls_bpf.common, tp, prog->gen_flags, tp 687 net/sched/cls_bpf.c err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSBPF, tp 21 net/sched/cls_cgroup.c struct tcf_proto *tp; tp 25 net/sched/cls_cgroup.c static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 28 net/sched/cls_cgroup.c struct cls_cgroup_head *head = rcu_dereference_bh(tp->root); tp 44 net/sched/cls_cgroup.c static void *cls_cgroup_get(struct tcf_proto *tp, u32 handle) tp 49 net/sched/cls_cgroup.c static int cls_cgroup_init(struct tcf_proto *tp) tp 77 net/sched/cls_cgroup.c struct tcf_proto *tp, unsigned long base, tp 83 net/sched/cls_cgroup.c struct cls_cgroup_head *head = rtnl_dereference(tp->root); tp 104 net/sched/cls_cgroup.c new->tp = tp; tp 111 net/sched/cls_cgroup.c err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &new->exts, ovr, tp 116 net/sched/cls_cgroup.c err = tcf_em_tree_validate(tp, tb[TCA_CGROUP_EMATCHES], &new->ematches); tp 120 net/sched/cls_cgroup.c rcu_assign_pointer(tp->root, new); tp 132 net/sched/cls_cgroup.c static void cls_cgroup_destroy(struct tcf_proto *tp, bool rtnl_held, tp 135 net/sched/cls_cgroup.c struct cls_cgroup_head *head = rtnl_dereference(tp->root); tp 146 net/sched/cls_cgroup.c static int cls_cgroup_delete(struct tcf_proto *tp, void *arg, bool *last, tp 152 net/sched/cls_cgroup.c static void cls_cgroup_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 155 net/sched/cls_cgroup.c struct cls_cgroup_head *head = rtnl_dereference(tp->root); tp 162 net/sched/cls_cgroup.c if (arg->fn(tp, head, arg) < 0) { tp 170 net/sched/cls_cgroup.c static int cls_cgroup_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 173 net/sched/cls_cgroup.c struct cls_cgroup_head *head = rtnl_dereference(tp->root); tp 41 net/sched/cls_flow.c struct tcf_proto *tp; tp 295 net/sched/cls_flow.c static int flow_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 298 net/sched/cls_flow.c struct flow_head *head = rcu_dereference_bh(tp->root); tp 388 net/sched/cls_flow.c struct tcf_proto *tp, unsigned long base, tp 393 net/sched/cls_flow.c struct flow_head *head = rtnl_dereference(tp->root); tp 437 net/sched/cls_flow.c err = tcf_em_tree_validate(tp, tb[TCA_FLOW_EMATCHES], &fnew->ematches); tp 445 net/sched/cls_flow.c err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &fnew->exts, ovr, tp 457 net/sched/cls_flow.c fnew->tp = fold->tp; tp 503 net/sched/cls_flow.c struct Qdisc *q = tcf_block_q(tp->chain->block); tp 512 net/sched/cls_flow.c fnew->tp = tp; tp 518 net/sched/cls_flow.c tcf_block_netif_keep_dst(tp->chain->block); tp 566 net/sched/cls_flow.c static int flow_delete(struct tcf_proto *tp, void *arg, bool *last, tp 569 net/sched/cls_flow.c struct flow_head *head = rtnl_dereference(tp->root); tp 579 net/sched/cls_flow.c static int flow_init(struct tcf_proto *tp) tp 587 net/sched/cls_flow.c rcu_assign_pointer(tp->root, head); tp 591 net/sched/cls_flow.c static void flow_destroy(struct tcf_proto *tp, bool rtnl_held, tp 594 net/sched/cls_flow.c struct flow_head *head = rtnl_dereference(tp->root); tp 607 net/sched/cls_flow.c static void *flow_get(struct tcf_proto *tp, u32 handle) tp 609 net/sched/cls_flow.c struct flow_head *head = rtnl_dereference(tp->root); tp 618 net/sched/cls_flow.c static int flow_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 679 net/sched/cls_flow.c static void flow_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 682 net/sched/cls_flow.c struct flow_head *head = rtnl_dereference(tp->root); tp 688 net/sched/cls_flow.c if (arg->fn(tp, f, arg) < 0) { tp 43 net/sched/cls_flower.c struct flow_dissector_key_ports tp; tp 58 net/sched/cls_flower.c struct flow_dissector_key_ports tp; tp 212 net/sched/cls_flower.c if (htons(key->tp_range.tp.dst) < min_val || tp 213 net/sched/cls_flower.c htons(key->tp_range.tp.dst) > max_val) tp 235 net/sched/cls_flower.c if (htons(key->tp_range.tp.src) < min_val || tp 236 net/sched/cls_flower.c htons(key->tp_range.tp.src) > max_val) tp 296 net/sched/cls_flower.c static int fl_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 299 net/sched/cls_flower.c struct cls_fl_head *head = rcu_dereference_bh(tp->root); tp 331 net/sched/cls_flower.c static int fl_init(struct tcf_proto *tp) tp 342 net/sched/cls_flower.c rcu_assign_pointer(tp->root, head); tp 390 net/sched/cls_flower.c static struct cls_fl_head *fl_head_dereference(struct tcf_proto *tp) tp 397 net/sched/cls_flower.c return rcu_dereference_raw(tp->root); tp 415 net/sched/cls_flower.c static void fl_hw_destroy_filter(struct tcf_proto *tp, struct cls_fl_filter *f, tp 418 net/sched/cls_flower.c struct tcf_block *block = tp->chain->block; tp 421 net/sched/cls_flower.c tc_cls_common_offload_init(&cls_flower.common, tp, f->flags, extack); tp 425 net/sched/cls_flower.c tc_setup_cb_destroy(block, tp, TC_SETUP_CLSFLOWER, &cls_flower, false, tp 430 net/sched/cls_flower.c static int fl_hw_replace_filter(struct tcf_proto *tp, tp 434 net/sched/cls_flower.c struct tcf_block *block = tp->chain->block; tp 443 net/sched/cls_flower.c tc_cls_common_offload_init(&cls_flower.common, tp, f->flags, extack); tp 462 net/sched/cls_flower.c err = tc_setup_cb_add(block, tp, TC_SETUP_CLSFLOWER, &cls_flower, tp 468 net/sched/cls_flower.c fl_hw_destroy_filter(tp, f, rtnl_held, NULL); tp 478 net/sched/cls_flower.c static void fl_hw_update_stats(struct tcf_proto *tp, struct cls_fl_filter *f, tp 481 net/sched/cls_flower.c struct tcf_block *block = tp->chain->block; tp 484 net/sched/cls_flower.c tc_cls_common_offload_init(&cls_flower.common, tp, f->flags, NULL); tp 521 net/sched/cls_flower.c static int __fl_delete(struct tcf_proto *tp, struct cls_fl_filter *f, tp 525 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 529 net/sched/cls_flower.c spin_lock(&tp->lock); tp 531 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 540 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 544 net/sched/cls_flower.c fl_hw_destroy_filter(tp, f, rtnl_held, extack); tp 545 net/sched/cls_flower.c tcf_unbind_filter(tp, &f->res); tp 562 net/sched/cls_flower.c static void fl_destroy(struct tcf_proto *tp, bool rtnl_held, tp 565 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 572 net/sched/cls_flower.c __fl_delete(tp, f, &last, rtnl_held, extack); tp 583 net/sched/cls_flower.c static void fl_put(struct tcf_proto *tp, void *arg) tp 590 net/sched/cls_flower.c static void *fl_get(struct tcf_proto *tp, u32 handle) tp 592 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1134 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.src, TCA_FLOWER_KEY_TCP_SRC, tp 1135 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_TCP_SRC_MASK, tp 1136 net/sched/cls_flower.c sizeof(key->tp.src)); tp 1137 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.dst, TCA_FLOWER_KEY_TCP_DST, tp 1138 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_TCP_DST_MASK, tp 1139 net/sched/cls_flower.c sizeof(key->tp.dst)); tp 1144 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.src, TCA_FLOWER_KEY_UDP_SRC, tp 1145 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_UDP_SRC_MASK, tp 1146 net/sched/cls_flower.c sizeof(key->tp.src)); tp 1147 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.dst, TCA_FLOWER_KEY_UDP_DST, tp 1148 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_UDP_DST_MASK, tp 1149 net/sched/cls_flower.c sizeof(key->tp.dst)); tp 1151 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.src, TCA_FLOWER_KEY_SCTP_SRC, tp 1152 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_SCTP_SRC_MASK, tp 1153 net/sched/cls_flower.c sizeof(key->tp.src)); tp 1154 net/sched/cls_flower.c fl_set_key_val(tb, &key->tp.dst, TCA_FLOWER_KEY_SCTP_DST, tp 1155 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_SCTP_DST_MASK, tp 1156 net/sched/cls_flower.c sizeof(key->tp.dst)); tp 1333 net/sched/cls_flower.c FLOW_DISSECTOR_KEY_PORTS, tp); tp 1468 net/sched/cls_flower.c static int fl_set_parms(struct net *net, struct tcf_proto *tp, tp 1477 net/sched/cls_flower.c err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, rtnl_held, tp 1486 net/sched/cls_flower.c tcf_bind_filter(tp, &f->res, base); tp 1529 net/sched/cls_flower.c struct tcf_proto *tp, unsigned long base, tp 1534 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1590 net/sched/cls_flower.c err = fl_set_parms(net, tp, fnew, mask, base, tb, tca[TCA_RATE], ovr, tp 1591 net/sched/cls_flower.c tp->chain->tmplt_priv, rtnl_held, extack); tp 1604 net/sched/cls_flower.c err = fl_hw_replace_filter(tp, fnew, rtnl_held, extack); tp 1612 net/sched/cls_flower.c spin_lock(&tp->lock); tp 1617 net/sched/cls_flower.c if (tp->deleting) { tp 1651 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1655 net/sched/cls_flower.c fl_hw_destroy_filter(tp, fold, rtnl_held, NULL); tp 1656 net/sched/cls_flower.c tcf_unbind_filter(tp, &fold->res); tp 1687 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1697 net/sched/cls_flower.c spin_lock(&tp->lock); tp 1700 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1702 net/sched/cls_flower.c fl_hw_destroy_filter(tp, fnew, rtnl_held, NULL); tp 1720 net/sched/cls_flower.c static int fl_delete(struct tcf_proto *tp, void *arg, bool *last, tp 1723 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1728 net/sched/cls_flower.c err = __fl_delete(tp, f, &last_on_mask, rtnl_held, extack); tp 1735 net/sched/cls_flower.c static void fl_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 1738 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1748 net/sched/cls_flower.c if (arg->fn(tp, f, arg) < 0) { tp 1760 net/sched/cls_flower.c fl_get_next_hw_filter(struct tcf_proto *tp, struct cls_fl_filter *f, bool add) tp 1762 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1764 net/sched/cls_flower.c spin_lock(&tp->lock); tp 1766 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1775 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1780 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1784 net/sched/cls_flower.c static int fl_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, tp 1787 net/sched/cls_flower.c struct tcf_block *block = tp->chain->block; tp 1798 net/sched/cls_flower.c while ((f = fl_get_next_hw_filter(tp, f, add))) { tp 1806 net/sched/cls_flower.c tc_cls_common_offload_init(&cls_flower.common, tp, f->flags, tp 1829 net/sched/cls_flower.c err = tc_setup_cb_reoffload(block, tp, add, cb, tp 1847 net/sched/cls_flower.c static void fl_hw_add(struct tcf_proto *tp, void *type_data) tp 1852 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 1854 net/sched/cls_flower.c spin_lock(&tp->lock); tp 1856 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 1859 net/sched/cls_flower.c static void fl_hw_del(struct tcf_proto *tp, void *type_data) tp 1865 net/sched/cls_flower.c spin_lock(&tp->lock); tp 1868 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 2306 net/sched/cls_flower.c (fl_dump_key_val(skb, &key->tp.src, TCA_FLOWER_KEY_TCP_SRC, tp 2307 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_TCP_SRC_MASK, tp 2308 net/sched/cls_flower.c sizeof(key->tp.src)) || tp 2309 net/sched/cls_flower.c fl_dump_key_val(skb, &key->tp.dst, TCA_FLOWER_KEY_TCP_DST, tp 2310 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_TCP_DST_MASK, tp 2311 net/sched/cls_flower.c sizeof(key->tp.dst)) || tp 2317 net/sched/cls_flower.c (fl_dump_key_val(skb, &key->tp.src, TCA_FLOWER_KEY_UDP_SRC, tp 2318 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_UDP_SRC_MASK, tp 2319 net/sched/cls_flower.c sizeof(key->tp.src)) || tp 2320 net/sched/cls_flower.c fl_dump_key_val(skb, &key->tp.dst, TCA_FLOWER_KEY_UDP_DST, tp 2321 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_UDP_DST_MASK, tp 2322 net/sched/cls_flower.c sizeof(key->tp.dst)))) tp 2325 net/sched/cls_flower.c (fl_dump_key_val(skb, &key->tp.src, TCA_FLOWER_KEY_SCTP_SRC, tp 2326 net/sched/cls_flower.c &mask->tp.src, TCA_FLOWER_KEY_SCTP_SRC_MASK, tp 2327 net/sched/cls_flower.c sizeof(key->tp.src)) || tp 2328 net/sched/cls_flower.c fl_dump_key_val(skb, &key->tp.dst, TCA_FLOWER_KEY_SCTP_DST, tp 2329 net/sched/cls_flower.c &mask->tp.dst, TCA_FLOWER_KEY_SCTP_DST_MASK, tp 2330 net/sched/cls_flower.c sizeof(key->tp.dst)))) tp 2433 net/sched/cls_flower.c static int fl_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 2450 net/sched/cls_flower.c spin_lock(&tp->lock); tp 2466 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 2469 net/sched/cls_flower.c fl_hw_update_stats(tp, f, rtnl_held); tp 2485 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 2529 net/sched/cls_flower.c static bool fl_delete_empty(struct tcf_proto *tp) tp 2531 net/sched/cls_flower.c struct cls_fl_head *head = fl_head_dereference(tp); tp 2533 net/sched/cls_flower.c spin_lock(&tp->lock); tp 2534 net/sched/cls_flower.c tp->deleting = idr_is_empty(&head->handle_idr); tp 2535 net/sched/cls_flower.c spin_unlock(&tp->lock); tp 2537 net/sched/cls_flower.c return tp->deleting; tp 39 net/sched/cls_fw.c struct tcf_proto *tp; tp 50 net/sched/cls_fw.c static int fw_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 53 net/sched/cls_fw.c struct fw_head *head = rcu_dereference_bh(tp->root); tp 75 net/sched/cls_fw.c struct Qdisc *q = tcf_block_q(tp->chain->block); tp 89 net/sched/cls_fw.c static void *fw_get(struct tcf_proto *tp, u32 handle) tp 91 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 105 net/sched/cls_fw.c static int fw_init(struct tcf_proto *tp) tp 130 net/sched/cls_fw.c static void fw_destroy(struct tcf_proto *tp, bool rtnl_held, tp 133 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 144 net/sched/cls_fw.c tcf_unbind_filter(tp, &f->res); tp 154 net/sched/cls_fw.c static int fw_delete(struct tcf_proto *tp, void *arg, bool *last, tp 157 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 173 net/sched/cls_fw.c tcf_unbind_filter(tp, &f->res); tp 199 net/sched/cls_fw.c static int fw_set_parms(struct net *net, struct tcf_proto *tp, tp 204 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 208 net/sched/cls_fw.c err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &f->exts, ovr, tp 215 net/sched/cls_fw.c tcf_bind_filter(tp, &f->res, base); tp 238 net/sched/cls_fw.c struct tcf_proto *tp, unsigned long base, tp 243 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 271 net/sched/cls_fw.c fnew->tp = f->tp; tp 280 net/sched/cls_fw.c err = fw_set_parms(net, tp, fnew, tb, tca, base, ovr, extack); tp 295 net/sched/cls_fw.c tcf_unbind_filter(tp, &f->res); tp 316 net/sched/cls_fw.c rcu_assign_pointer(tp->root, head); tp 327 net/sched/cls_fw.c f->tp = tp; tp 329 net/sched/cls_fw.c err = fw_set_parms(net, tp, f, tb, tca, base, ovr, extack); tp 345 net/sched/cls_fw.c static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 348 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 366 net/sched/cls_fw.c if (arg->fn(tp, f, arg) < 0) { tp 375 net/sched/cls_fw.c static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 378 net/sched/cls_fw.c struct fw_head *head = rtnl_dereference(tp->root); tp 27 net/sched/cls_matchall.c static int mall_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 30 net/sched/cls_matchall.c struct cls_mall_head *head = rcu_dereference_bh(tp->root); tp 43 net/sched/cls_matchall.c static int mall_init(struct tcf_proto *tp) tp 66 net/sched/cls_matchall.c static void mall_destroy_hw_filter(struct tcf_proto *tp, tp 72 net/sched/cls_matchall.c struct tcf_block *block = tp->chain->block; tp 74 net/sched/cls_matchall.c tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); tp 78 net/sched/cls_matchall.c tc_setup_cb_destroy(block, tp, TC_SETUP_CLSMATCHALL, &cls_mall, false, tp 82 net/sched/cls_matchall.c static int mall_replace_hw_filter(struct tcf_proto *tp, tp 88 net/sched/cls_matchall.c struct tcf_block *block = tp->chain->block; tp 96 net/sched/cls_matchall.c tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); tp 103 net/sched/cls_matchall.c mall_destroy_hw_filter(tp, head, cookie, NULL); tp 112 net/sched/cls_matchall.c err = tc_setup_cb_add(block, tp, TC_SETUP_CLSMATCHALL, &cls_mall, tp 118 net/sched/cls_matchall.c mall_destroy_hw_filter(tp, head, cookie, NULL); tp 128 net/sched/cls_matchall.c static void mall_destroy(struct tcf_proto *tp, bool rtnl_held, tp 131 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 136 net/sched/cls_matchall.c tcf_unbind_filter(tp, &head->res); tp 139 net/sched/cls_matchall.c mall_destroy_hw_filter(tp, head, (unsigned long) head, extack); tp 147 net/sched/cls_matchall.c static void *mall_get(struct tcf_proto *tp, u32 handle) tp 149 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 163 net/sched/cls_matchall.c static int mall_set_parms(struct net *net, struct tcf_proto *tp, tp 171 net/sched/cls_matchall.c err = tcf_exts_validate(net, tp, tb, est, &head->exts, ovr, true, tp 178 net/sched/cls_matchall.c tcf_bind_filter(tp, &head->res, base); tp 184 net/sched/cls_matchall.c struct tcf_proto *tp, unsigned long base, tp 189 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 230 net/sched/cls_matchall.c err = mall_set_parms(net, tp, new, base, tb, tca[TCA_RATE], ovr, tp 236 net/sched/cls_matchall.c err = mall_replace_hw_filter(tp, new, (unsigned long)new, tp 246 net/sched/cls_matchall.c rcu_assign_pointer(tp->root, new); tp 259 net/sched/cls_matchall.c static int mall_delete(struct tcf_proto *tp, void *arg, bool *last, tp 262 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 269 net/sched/cls_matchall.c static void mall_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 272 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 279 net/sched/cls_matchall.c if (arg->fn(tp, head, arg) < 0) tp 285 net/sched/cls_matchall.c static int mall_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, tp 288 net/sched/cls_matchall.c struct cls_mall_head *head = rtnl_dereference(tp->root); tp 290 net/sched/cls_matchall.c struct tcf_block *block = tp->chain->block; tp 300 net/sched/cls_matchall.c tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, extack); tp 315 net/sched/cls_matchall.c err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSMATCHALL, tp 327 net/sched/cls_matchall.c static void mall_stats_hw_filter(struct tcf_proto *tp, tp 332 net/sched/cls_matchall.c struct tcf_block *block = tp->chain->block; tp 334 net/sched/cls_matchall.c tc_cls_common_offload_init(&cls_mall.common, tp, head->flags, NULL); tp 344 net/sched/cls_matchall.c static int mall_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 356 net/sched/cls_matchall.c mall_stats_hw_filter(tp, head, (unsigned long)head); tp 55 net/sched/cls_route.c struct tcf_proto *tp; tp 124 net/sched/cls_route.c static int route4_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 127 net/sched/cls_route.c struct route4_head *head = rcu_dereference_bh(tp->root); tp 215 net/sched/cls_route.c static void *route4_get(struct tcf_proto *tp, u32 handle) tp 217 net/sched/cls_route.c struct route4_head *head = rtnl_dereference(tp->root); tp 241 net/sched/cls_route.c static int route4_init(struct tcf_proto *tp) tp 249 net/sched/cls_route.c rcu_assign_pointer(tp->root, head); tp 275 net/sched/cls_route.c static void route4_destroy(struct tcf_proto *tp, bool rtnl_held, tp 278 net/sched/cls_route.c struct route4_head *head = rtnl_dereference(tp->root); tp 297 net/sched/cls_route.c tcf_unbind_filter(tp, &f->res); tp 311 net/sched/cls_route.c static int route4_delete(struct tcf_proto *tp, void *arg, bool *last, tp 314 net/sched/cls_route.c struct route4_head *head = rtnl_dereference(tp->root); tp 342 net/sched/cls_route.c tcf_unbind_filter(tp, &f->res); tp 381 net/sched/cls_route.c static int route4_set_parms(struct net *net, struct tcf_proto *tp, tp 393 net/sched/cls_route.c err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, true, extack); tp 455 net/sched/cls_route.c f->tp = tp; tp 459 net/sched/cls_route.c tcf_bind_filter(tp, &f->res, base); tp 466 net/sched/cls_route.c struct tcf_proto *tp, unsigned long base, u32 handle, tp 470 net/sched/cls_route.c struct route4_head *head = rtnl_dereference(tp->root); tp 507 net/sched/cls_route.c f->tp = fold->tp; tp 512 net/sched/cls_route.c err = route4_set_parms(net, tp, base, f, handle, head, tb, tp 525 net/sched/cls_route.c tcf_block_netif_keep_dst(tp->chain->block); tp 548 net/sched/cls_route.c tcf_unbind_filter(tp, &fold->res); tp 561 net/sched/cls_route.c static void route4_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 564 net/sched/cls_route.c struct route4_head *head = rtnl_dereference(tp->root); tp 584 net/sched/cls_route.c if (arg->fn(tp, f, arg) < 0) { tp 595 net/sched/cls_route.c static int route4_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 127 net/sched/cls_rsvp.h static int rsvp_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 130 net/sched/cls_rsvp.h struct rsvp_head *head = rcu_dereference_bh(tp->root); tp 220 net/sched/cls_rsvp.h static void rsvp_replace(struct tcf_proto *tp, struct rsvp_filter *n, u32 h) tp 222 net/sched/cls_rsvp.h struct rsvp_head *head = rtnl_dereference(tp->root); tp 247 net/sched/cls_rsvp.h static void *rsvp_get(struct tcf_proto *tp, u32 handle) tp 249 net/sched/cls_rsvp.h struct rsvp_head *head = rtnl_dereference(tp->root); tp 269 net/sched/cls_rsvp.h static int rsvp_init(struct tcf_proto *tp) tp 275 net/sched/cls_rsvp.h rcu_assign_pointer(tp->root, data); tp 298 net/sched/cls_rsvp.h static void rsvp_delete_filter(struct tcf_proto *tp, struct rsvp_filter *f) tp 300 net/sched/cls_rsvp.h tcf_unbind_filter(tp, &f->res); tp 311 net/sched/cls_rsvp.h static void rsvp_destroy(struct tcf_proto *tp, bool rtnl_held, tp 314 net/sched/cls_rsvp.h struct rsvp_head *data = rtnl_dereference(tp->root); tp 331 net/sched/cls_rsvp.h rsvp_delete_filter(tp, f); tp 340 net/sched/cls_rsvp.h static int rsvp_delete(struct tcf_proto *tp, void *arg, bool *last, tp 343 net/sched/cls_rsvp.h struct rsvp_head *head = rtnl_dereference(tp->root); tp 356 net/sched/cls_rsvp.h rsvp_delete_filter(tp, f); tp 391 net/sched/cls_rsvp.h static unsigned int gen_handle(struct tcf_proto *tp, unsigned salt) tp 393 net/sched/cls_rsvp.h struct rsvp_head *data = rtnl_dereference(tp->root); tp 402 net/sched/cls_rsvp.h if (!rsvp_get(tp, h)) tp 472 net/sched/cls_rsvp.h struct tcf_proto *tp, unsigned long base, tp 478 net/sched/cls_rsvp.h struct rsvp_head *data = rtnl_dereference(tp->root); tp 502 net/sched/cls_rsvp.h err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &e, ovr, true, tp 530 net/sched/cls_rsvp.h tcf_bind_filter(tp, &n->res, base); tp 534 net/sched/cls_rsvp.h rsvp_replace(tp, n, handle); tp 570 net/sched/cls_rsvp.h if ((f->handle = gen_handle(tp, h1 | (h2<<8))) == 0) tp 604 net/sched/cls_rsvp.h tcf_bind_filter(tp, &f->res, base); tp 656 net/sched/cls_rsvp.h static void rsvp_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 659 net/sched/cls_rsvp.h struct rsvp_head *head = rtnl_dereference(tp->root); tp 679 net/sched/cls_rsvp.h if (arg->fn(tp, f, arg) < 0) { tp 690 net/sched/cls_rsvp.h static int rsvp_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 50 net/sched/cls_tcindex.c struct tcf_proto *tp; tp 102 net/sched/cls_tcindex.c static int tcindex_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 105 net/sched/cls_tcindex.c struct tcindex_data *p = rcu_dereference_bh(tp->root); tp 110 net/sched/cls_tcindex.c skb, tp, res, p); tp 114 net/sched/cls_tcindex.c struct Qdisc *q = tcf_block_q(tp->chain->block); tp 130 net/sched/cls_tcindex.c static void *tcindex_get(struct tcf_proto *tp, u32 handle) tp 132 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 135 net/sched/cls_tcindex.c pr_debug("tcindex_get(tp %p,handle 0x%08x)\n", tp, handle); tp 142 net/sched/cls_tcindex.c static int tcindex_init(struct tcf_proto *tp) tp 146 net/sched/cls_tcindex.c pr_debug("tcindex_init(tp %p)\n", tp); tp 156 net/sched/cls_tcindex.c rcu_assign_pointer(tp->root, p); tp 197 net/sched/cls_tcindex.c static int tcindex_delete(struct tcf_proto *tp, void *arg, bool *last, tp 200 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 205 net/sched/cls_tcindex.c pr_debug("tcindex_delete(tp %p,arg %p),p %p\n", tp, arg, p); tp 225 net/sched/cls_tcindex.c tcf_unbind_filter(tp, &r->res); tp 327 net/sched/cls_tcindex.c tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, tp 342 net/sched/cls_tcindex.c err = tcf_exts_validate(net, tp, tb, est, &e, ovr, true, extack); tp 360 net/sched/cls_tcindex.c cp->tp = tp; tp 471 net/sched/cls_tcindex.c tcf_bind_filter(tp, &cr, base); tp 486 net/sched/cls_tcindex.c rcu_assign_pointer(tp->root, cp); tp 524 net/sched/cls_tcindex.c struct tcf_proto *tp, unsigned long base, u32 handle, tp 530 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 536 net/sched/cls_tcindex.c tp, handle, tca, arg, opt, p, r, arg ? *arg : NULL); tp 546 net/sched/cls_tcindex.c return tcindex_set_parms(net, tp, base, handle, p, r, tb, tp 550 net/sched/cls_tcindex.c static void tcindex_walk(struct tcf_proto *tp, struct tcf_walker *walker, tp 553 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 557 net/sched/cls_tcindex.c pr_debug("tcindex_walk(tp %p,walker %p),p %p\n", tp, walker, p); tp 563 net/sched/cls_tcindex.c if (walker->fn(tp, p->perfect + i, walker) < 0) { tp 577 net/sched/cls_tcindex.c if (walker->fn(tp, &f->result, walker) < 0) { tp 587 net/sched/cls_tcindex.c static void tcindex_destroy(struct tcf_proto *tp, bool rtnl_held, tp 590 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 593 net/sched/cls_tcindex.c pr_debug("tcindex_destroy(tp %p),p %p\n", tp, p); tp 607 net/sched/cls_tcindex.c tcf_unbind_filter(tp, &r->res); tp 622 net/sched/cls_tcindex.c tcindex_delete(tp, &f->result, &last, rtnl_held, NULL); tp 630 net/sched/cls_tcindex.c static int tcindex_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 633 net/sched/cls_tcindex.c struct tcindex_data *p = rtnl_dereference(tp->root); tp 638 net/sched/cls_tcindex.c tp, fh, skb, t, p, r); tp 103 net/sched/cls_u32.c static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp, tp 111 net/sched/cls_u32.c struct tc_u_hnode *ht = rcu_dereference_bh(tp->root); tp 286 net/sched/cls_u32.c static void *u32_get(struct tcf_proto *tp, u32 handle) tp 289 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 292 net/sched/cls_u32.c ht = rtnl_dereference(tp->root); tp 319 net/sched/cls_u32.c static void *tc_u_common_ptr(const struct tcf_proto *tp) tp 321 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 350 net/sched/cls_u32.c static int u32_init(struct tcf_proto *tp) tp 353 net/sched/cls_u32.c void *key = tc_u_common_ptr(tp); tp 362 net/sched/cls_u32.c root_ht->prio = tp->prio; tp 384 net/sched/cls_u32.c rcu_assign_pointer(tp->root, root_ht); tp 385 net/sched/cls_u32.c tp->data = tp_c; tp 444 net/sched/cls_u32.c static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key) tp 446 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 459 net/sched/cls_u32.c tcf_unbind_filter(tp, &key->res); tp 471 net/sched/cls_u32.c static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, tp 474 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 477 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, h->flags, extack); tp 486 net/sched/cls_u32.c static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, tp 489 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 495 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, flags, extack); tp 503 net/sched/cls_u32.c u32_clear_hw_hnode(tp, h, NULL); tp 515 net/sched/cls_u32.c static void u32_remove_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, tp 518 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 521 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, n->flags, extack); tp 525 net/sched/cls_u32.c tc_setup_cb_destroy(block, tp, TC_SETUP_CLSU32, &cls_u32, false, tp 529 net/sched/cls_u32.c static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, tp 533 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 538 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, flags, extack); tp 555 net/sched/cls_u32.c err = tc_setup_cb_add(block, tp, TC_SETUP_CLSU32, &cls_u32, skip_sw, tp 558 net/sched/cls_u32.c u32_remove_hw_knode(tp, n, NULL); tp 568 net/sched/cls_u32.c static void u32_clear_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, tp 571 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 580 net/sched/cls_u32.c tcf_unbind_filter(tp, &n->res); tp 581 net/sched/cls_u32.c u32_remove_hw_knode(tp, n, extack); tp 591 net/sched/cls_u32.c static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, tp 594 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 600 net/sched/cls_u32.c u32_clear_hnode(tp, ht, extack); tp 607 net/sched/cls_u32.c u32_clear_hw_hnode(tp, ht, extack); tp 619 net/sched/cls_u32.c static void u32_destroy(struct tcf_proto *tp, bool rtnl_held, tp 622 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 623 net/sched/cls_u32.c struct tc_u_hnode *root_ht = rtnl_dereference(tp->root); tp 628 net/sched/cls_u32.c u32_destroy_hnode(tp, root_ht, extack); tp 636 net/sched/cls_u32.c u32_clear_hnode(tp, ht, extack); tp 650 net/sched/cls_u32.c tp->data = NULL; tp 653 net/sched/cls_u32.c static int u32_delete(struct tcf_proto *tp, void *arg, bool *last, tp 657 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 661 net/sched/cls_u32.c u32_remove_hw_knode(tp, (struct tc_u_knode *)ht, extack); tp 662 net/sched/cls_u32.c ret = u32_delete_key(tp, (struct tc_u_knode *)ht); tp 672 net/sched/cls_u32.c u32_destroy_hnode(tp, ht, extack); tp 709 net/sched/cls_u32.c static int u32_set_parms(struct net *net, struct tcf_proto *tp, tp 717 net/sched/cls_u32.c err = tcf_exts_validate(net, tp, tb, est, &n->exts, ovr, true, extack); tp 731 net/sched/cls_u32.c ht_down = u32_lookup_ht(tp->data, handle); tp 752 net/sched/cls_u32.c tcf_bind_filter(tp, &n->res, base); tp 765 net/sched/cls_u32.c static void u32_replace_knode(struct tcf_proto *tp, struct tc_u_common *tp_c, tp 773 net/sched/cls_u32.c ht = rtnl_dereference(tp->root); tp 792 net/sched/cls_u32.c static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp, tp 844 net/sched/cls_u32.c struct tcf_proto *tp, unsigned long base, u32 handle, tp 848 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 898 net/sched/cls_u32.c new = u32_init_knode(net, tp, n); tp 902 net/sched/cls_u32.c err = u32_set_parms(net, tp, base, new, tb, tp 910 net/sched/cls_u32.c err = u32_replace_hw_knode(tp, new, flags, extack); tp 919 net/sched/cls_u32.c u32_replace_knode(tp, tp_c, new); tp 920 net/sched/cls_u32.c tcf_unbind_filter(tp, &n->res); tp 945 net/sched/cls_u32.c handle = gen_new_htid(tp->data, ht); tp 961 net/sched/cls_u32.c ht->prio = tp->prio; tp 965 net/sched/cls_u32.c err = u32_replace_hw_hnode(tp, ht, flags, extack); tp 982 net/sched/cls_u32.c ht = rtnl_dereference(tp->root); tp 985 net/sched/cls_u32.c ht = u32_lookup_ht(tp->data, TC_U32_HTID(htid)); tp 992 net/sched/cls_u32.c ht = rtnl_dereference(tp->root); tp 1068 net/sched/cls_u32.c err = u32_set_parms(net, tp, base, n, tb, tca[TCA_RATE], ovr, tp 1074 net/sched/cls_u32.c err = u32_replace_hw_knode(tp, n, flags, extack); tp 1111 net/sched/cls_u32.c static void u32_walk(struct tcf_proto *tp, struct tcf_walker *arg, tp 1114 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 1125 net/sched/cls_u32.c if (ht->prio != tp->prio) tp 1128 net/sched/cls_u32.c if (arg->fn(tp, ht, arg) < 0) { tp 1142 net/sched/cls_u32.c if (arg->fn(tp, n, arg) < 0) { tp 1152 net/sched/cls_u32.c static int u32_reoffload_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, tp 1159 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, ht->flags, extack); tp 1172 net/sched/cls_u32.c static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n, tp 1177 net/sched/cls_u32.c struct tcf_block *block = tp->chain->block; tp 1181 net/sched/cls_u32.c tc_cls_common_offload_init(&cls_u32.common, tp, n->flags, extack); tp 1202 net/sched/cls_u32.c err = tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSU32, tp 1211 net/sched/cls_u32.c static int u32_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, tp 1214 net/sched/cls_u32.c struct tc_u_common *tp_c = tp->data; tp 1223 net/sched/cls_u32.c if (ht->prio != tp->prio) tp 1231 net/sched/cls_u32.c err = u32_reoffload_hnode(tp, ht, add, cb, cb_priv, tp 1244 net/sched/cls_u32.c err = u32_reoffload_knode(tp, n, add, cb, tp 1252 net/sched/cls_u32.c u32_reoffload_hnode(tp, ht, add, cb, cb_priv, extack); tp 1271 net/sched/cls_u32.c static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh, tp 169 net/sched/ematch.c static int tcf_em_validate(struct tcf_proto *tp, tp 177 net/sched/ematch.c struct net *net = tp->chain->block->net; tp 303 net/sched/ematch.c int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, tp 362 net/sched/ematch.c err = tcf_em_validate(tp, tree_hdr, em, rt_match, idx); tp 1899 net/sched/sch_api.c static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg) tp 1903 net/sched/sch_api.c if (tp->ops->bind_class) { tp 1904 net/sched/sch_api.c struct Qdisc *q = tcf_block_q(tp->chain->block); tp 1907 net/sched/sch_api.c tp->ops->bind_class(n, a->classid, a->cl, q, a->base); tp 1934 net/sched/sch_api.c struct tcf_proto *tp; tp 1936 net/sched/sch_api.c for (tp = tcf_get_next_proto(chain, NULL, true); tp 1937 net/sched/sch_api.c tp; tp = tcf_get_next_proto(chain, tp, true)) { tp 1944 net/sched/sch_api.c tp->ops->walk(tp, &arg.w, true); tp 76 net/sctp/output.c struct sctp_transport *tp = packet->transport; tp 77 net/sctp/output.c struct sctp_association *asoc = tp->asoc; tp 89 net/sctp/output.c packet->max_size = tp->pathmtu; tp 102 net/sctp/output.c if (!sctp_transport_dst_check(tp)) { tp 103 net/sctp/output.c sctp_transport_route(tp, NULL, sp); tp 106 net/sctp/output.c } else if (!sctp_transport_pmtu_check(tp)) { tp 127 net/sctp/output.c if (!tp->dst) tp 132 net/sctp/output.c if (__sk_dst_get(sk) != tp->dst) { tp 133 net/sctp/output.c dst_hold(tp->dst); tp 134 net/sctp/output.c sk_setup_caps(sk, tp->dst); tp 136 net/sctp/output.c packet->max_size = sk_can_gso(sk) ? tp->dst->dev->gso_max_size tp 409 net/sctp/output.c struct sctp_transport *tp = packet->transport; tp 436 net/sctp/output.c tp->pathmtu) tp 438 net/sctp/output.c else if (pkt_size + padded > tp->pathmtu) tp 456 net/sctp/output.c !tp->rto_pending) { tp 458 net/sctp/output.c tp->rto_pending = 1; tp 490 net/sctp/output.c sctp_auth_calculate_hmac(tp->asoc, nskb, auth, tp 512 net/sctp/output.c if (skb_dst(head) != tp->dst) { tp 513 net/sctp/output.c dst_hold(tp->dst); tp 514 net/sctp/output.c sk_setup_caps(sk, tp->dst); tp 547 net/sctp/output.c struct sctp_transport *tp = packet->transport; tp 548 net/sctp/output.c struct sctp_association *asoc = tp->asoc; tp 563 net/sctp/output.c if (packet->size > tp->pathmtu && !packet->ipfragok) { tp 588 net/sctp/output.c dst = dst_clone(tp->dst); tp 617 net/sctp/output.c tp->af_specific->ecn_capable(sk); tp 620 net/sctp/output.c if (asoc->peer.last_sent_to != tp) tp 621 net/sctp/output.c asoc->peer.last_sent_to = tp; tp 624 net/sctp/output.c if (tp->dst_pending_confirm) tp 629 net/sctp/output.c if (tp->af_specific->sctp_xmit(head, tp) >= 0 && tp 630 net/sctp/output.c tp->dst_pending_confirm) tp 631 net/sctp/output.c tp->dst_pending_confirm = 0; tp 1064 net/sctp/socket.c struct sctp_transport **tp) tp 1093 net/sctp/socket.c *tp = sctp_assoc_add_peer(asoc, daddr, GFP_KERNEL, SCTP_UNKNOWN); tp 1094 net/sctp/socket.c if (!*tp) { tp 1662 net/sctp/socket.c struct sctp_transport **tp) tp 1671 net/sctp/socket.c *tp = NULL; tp 1695 net/sctp/socket.c err = sctp_connect_new_asoc(ep, daddr, cmsgs->init, tp); tp 1698 net/sctp/socket.c asoc = (*tp)->asoc; tp 330 net/sctp/transport.c void sctp_transport_update_rto(struct sctp_transport *tp, __u32 rtt) tp 332 net/sctp/transport.c if (unlikely(!tp->rto_pending)) tp 334 net/sctp/transport.c pr_debug("%s: rto_pending not set on transport %p!\n", __func__, tp); tp 336 net/sctp/transport.c if (tp->rttvar || tp->srtt) { tp 337 net/sctp/transport.c struct net *net = sock_net(tp->asoc->base.sk); tp 349 net/sctp/transport.c tp->rttvar = tp->rttvar - (tp->rttvar >> net->sctp.rto_beta) tp 350 net/sctp/transport.c + (((__u32)abs((__s64)tp->srtt - (__s64)rtt)) >> net->sctp.rto_beta); tp 351 net/sctp/transport.c tp->srtt = tp->srtt - (tp->srtt >> net->sctp.rto_alpha) tp 357 net/sctp/transport.c tp->srtt = rtt; tp 358 net/sctp/transport.c tp->rttvar = rtt >> 1; tp 364 net/sctp/transport.c if (tp->rttvar == 0) tp 365 net/sctp/transport.c tp->rttvar = SCTP_CLOCK_GRANULARITY; tp 368 net/sctp/transport.c tp->rto = tp->srtt + (tp->rttvar << 2); tp 373 net/sctp/transport.c if (tp->rto < tp->asoc->rto_min) tp 374 net/sctp/transport.c tp->rto = tp->asoc->rto_min; tp 379 net/sctp/transport.c if (tp->rto > tp->asoc->rto_max) tp 380 net/sctp/transport.c tp->rto = tp->asoc->rto_max; tp 382 net/sctp/transport.c sctp_max_rto(tp->asoc, tp); tp 383 net/sctp/transport.c tp->rtt = rtt; tp 388 net/sctp/transport.c tp->rto_pending = 0; tp 391 net/sctp/transport.c __func__, tp, rtt, tp->srtt, tp->rttvar, tp->rto); tp 125 net/smc/smc_tx.c struct tcp_sock *tp = tcp_sk(smc->clcsock->sk); tp 127 net/smc/smc_tx.c return (tp->nonagle & TCP_NAGLE_CORK) ? true : false; tp 262 net/tls/tls_device.c struct tcp_sock *tp = tcp_sk(sk); tp 266 net/tls/tls_device.c record->end_seq = tp->write_seq + record->len; tp 271 net/tls/tls_device.c tls_device_resync_tx(sk, ctx, tp->write_seq); tp 350 net/wireless/pmsr.c #define PUT(tp, attr, val) \ tp 352 net/wireless/pmsr.c if (nla_put_##tp(msg, \ tp 358 net/wireless/pmsr.c #define PUTOPT(tp, attr, val) \ tp 361 net/wireless/pmsr.c PUT(tp, attr, val); \ tp 2420 net/xfrm/xfrm_policy.c struct xfrm_state *tp[XFRM_MAX_DEPTH]; tp 2421 net/xfrm/xfrm_policy.c struct xfrm_state **tpp = (npols > 1) ? tp : xfrm; tp 3604 net/xfrm/xfrm_policy.c struct xfrm_tmpl *tp[XFRM_MAX_DEPTH]; tp 3606 net/xfrm/xfrm_policy.c struct xfrm_tmpl **tpp = tp; tp 1564 net/xfrm/xfrm_user.c static int copy_from_user_policy_type(u8 *tp, struct nlattr **attrs) tp 1580 net/xfrm/xfrm_user.c *tp = type; tp 90 samples/bpf/hbm_kern.h struct bpf_tcp_sock *tp; tp 97 samples/bpf/hbm_kern.h tp = bpf_tcp_sock(sk); tp 98 samples/bpf/hbm_kern.h if (tp) { tp 99 samples/bpf/hbm_kern.h pkti->cwnd = tp->snd_cwnd; tp 100 samples/bpf/hbm_kern.h pkti->rtt = tp->srtt_us >> 3; tp 101 samples/bpf/hbm_kern.h pkti->packets_out = tp->packets_out; tp 98 security/apparmor/domain.c struct aa_profile *tp, tp 105 security/apparmor/domain.c if (profile->ns == tp->ns) tp 106 security/apparmor/domain.c return aa_dfa_match(profile->file.dfa, state, tp->base.hname); tp 109 security/apparmor/domain.c ns_name = aa_ns_name(profile->ns, tp->ns, true); tp 113 security/apparmor/domain.c return aa_dfa_match(profile->file.dfa, state, tp->base.hname); tp 137 security/apparmor/domain.c struct aa_profile *tp; tp 142 security/apparmor/domain.c label_for_each(i, label, tp) { tp 143 security/apparmor/domain.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 145 security/apparmor/domain.c state = match_component(profile, tp, stack, state); tp 156 security/apparmor/domain.c label_for_each_cont(i, label, tp) { tp 157 security/apparmor/domain.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 160 security/apparmor/domain.c state = match_component(profile, tp, false, state); tp 197 security/apparmor/domain.c struct aa_profile *tp; tp 204 security/apparmor/domain.c label_for_each(i, label, tp) { tp 205 security/apparmor/domain.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 207 security/apparmor/domain.c state = match_component(profile, tp, stack, start); tp 220 security/apparmor/domain.c label_for_each_cont(i, label, tp) { tp 221 security/apparmor/domain.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 223 security/apparmor/domain.c state = match_component(profile, tp, stack, start); tp 1242 security/apparmor/label.c struct aa_profile *tp, tp 1247 security/apparmor/label.c if (profile->ns == tp->ns) tp 1248 security/apparmor/label.c return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); tp 1251 security/apparmor/label.c ns_name = aa_ns_name(profile->ns, tp->ns, true); tp 1255 security/apparmor/label.c return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); tp 1278 security/apparmor/label.c struct aa_profile *tp; tp 1282 security/apparmor/label.c label_for_each(i, label, tp) { tp 1283 security/apparmor/label.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 1285 security/apparmor/label.c state = match_component(profile, tp, state); tp 1296 security/apparmor/label.c label_for_each_cont(i, label, tp) { tp 1297 security/apparmor/label.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 1300 security/apparmor/label.c state = match_component(profile, tp, state); tp 1336 security/apparmor/label.c struct aa_profile *tp; tp 1342 security/apparmor/label.c label_for_each(i, label, tp) { tp 1343 security/apparmor/label.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 1345 security/apparmor/label.c state = match_component(profile, tp, start); tp 1358 security/apparmor/label.c label_for_each_cont(i, label, tp) { tp 1359 security/apparmor/label.c if (!aa_ns_visible(profile->ns, tp->ns, subns)) tp 1361 security/apparmor/label.c state = match_component(profile, tp, start); tp 1296 tools/perf/builtin-kvm.c char *tp, *name, *sys; tp 1306 tools/perf/builtin-kvm.c tp = strdup(*events_tp); tp 1307 tools/perf/builtin-kvm.c if (tp == NULL) tp 1311 tools/perf/builtin-kvm.c sys = tp; tp 1312 tools/perf/builtin-kvm.c name = strchr(tp, ':'); tp 1316 tools/perf/builtin-kvm.c free(tp); tp 1324 tools/perf/builtin-kvm.c free(tp); tp 1328 tools/perf/builtin-kvm.c free(tp); tp 312 tools/perf/builtin-trace.c static int perf_evsel__init_augmented_syscall_tp(struct evsel *evsel, struct evsel *tp) tp 317 tools/perf/builtin-trace.c struct tep_format_field *syscall_id = perf_evsel__field(tp, "id"); tp 319 tools/perf/builtin-trace.c syscall_id = perf_evsel__field(tp, "__syscall_nr"); tp 272 tools/perf/pmu-events/jevents.c char *tp; tp 276 tools/perf/pmu-events/jevents.c i = asprintf(&tp, "%s", topic); tp 282 tools/perf/pmu-events/jevents.c for (i = 0; i < (int) strlen(tp); i++) { tp 283 tools/perf/pmu-events/jevents.c char c = tp[i]; tp 286 tools/perf/pmu-events/jevents.c tp[i] = ' '; tp 288 tools/perf/pmu-events/jevents.c tp[i] = '\0'; tp 293 tools/perf/pmu-events/jevents.c return tp; tp 31 tools/perf/util/cputopo.c static int build_cpu_topology(struct cpu_topology *tp, int cpu) tp 56 tools/perf/util/cputopo.c for (i = 0; i < tp->core_sib; i++) { tp 57 tools/perf/util/cputopo.c if (!strcmp(buf, tp->core_siblings[i])) tp 60 tools/perf/util/cputopo.c if (i == tp->core_sib) { tp 61 tools/perf/util/cputopo.c tp->core_siblings[i] = buf; tp 62 tools/perf/util/cputopo.c tp->core_sib++; tp 69 tools/perf/util/cputopo.c if (!tp->die_siblings) tp 87 tools/perf/util/cputopo.c for (i = 0; i < tp->die_sib; i++) { tp 88 tools/perf/util/cputopo.c if (!strcmp(buf, tp->die_siblings[i])) tp 91 tools/perf/util/cputopo.c if (i == tp->die_sib) { tp 92 tools/perf/util/cputopo.c tp->die_siblings[i] = buf; tp 93 tools/perf/util/cputopo.c tp->die_sib++; tp 117 tools/perf/util/cputopo.c for (i = 0; i < tp->thread_sib; i++) { tp 118 tools/perf/util/cputopo.c if (!strcmp(buf, tp->thread_siblings[i])) tp 121 tools/perf/util/cputopo.c if (i == tp->thread_sib) { tp 122 tools/perf/util/cputopo.c tp->thread_siblings[i] = buf; tp 123 tools/perf/util/cputopo.c tp->thread_sib++; tp 134 tools/perf/util/cputopo.c void cpu_topology__delete(struct cpu_topology *tp) tp 138 tools/perf/util/cputopo.c if (!tp) tp 141 tools/perf/util/cputopo.c for (i = 0 ; i < tp->core_sib; i++) tp 142 tools/perf/util/cputopo.c zfree(&tp->core_siblings[i]); tp 144 tools/perf/util/cputopo.c if (tp->die_sib) { tp 145 tools/perf/util/cputopo.c for (i = 0 ; i < tp->die_sib; i++) tp 146 tools/perf/util/cputopo.c zfree(&tp->die_siblings[i]); tp 149 tools/perf/util/cputopo.c for (i = 0 ; i < tp->thread_sib; i++) tp 150 tools/perf/util/cputopo.c zfree(&tp->thread_siblings[i]); tp 152 tools/perf/util/cputopo.c free(tp); tp 176 tools/perf/util/cputopo.c struct cpu_topology *tp = NULL; tp 201 tools/perf/util/cputopo.c addr = calloc(1, sizeof(*tp) + nr_addr * sz); tp 205 tools/perf/util/cputopo.c tp = addr; tp 206 tools/perf/util/cputopo.c addr += sizeof(*tp); tp 207 tools/perf/util/cputopo.c tp->core_siblings = addr; tp 210 tools/perf/util/cputopo.c tp->die_siblings = addr; tp 213 tools/perf/util/cputopo.c tp->thread_siblings = addr; tp 219 tools/perf/util/cputopo.c ret = build_cpu_topology(tp, i); tp 227 tools/perf/util/cputopo.c cpu_topology__delete(tp); tp 228 tools/perf/util/cputopo.c tp = NULL; tp 230 tools/perf/util/cputopo.c return tp; tp 296 tools/perf/util/cputopo.c struct numa_topology *tp = NULL; tp 324 tools/perf/util/cputopo.c tp = zalloc(sizeof(*tp) + sizeof(tp->nodes[0])*nr); tp 325 tools/perf/util/cputopo.c if (!tp) tp 328 tools/perf/util/cputopo.c tp->nr = nr; tp 331 tools/perf/util/cputopo.c if (load_numa_node(&tp->nodes[i], node_map->map[i])) { tp 332 tools/perf/util/cputopo.c numa_topology__delete(tp); tp 333 tools/perf/util/cputopo.c tp = NULL; tp 342 tools/perf/util/cputopo.c return tp; tp 345 tools/perf/util/cputopo.c void numa_topology__delete(struct numa_topology *tp) tp 349 tools/perf/util/cputopo.c for (i = 0; i < tp->nr; i++) tp 350 tools/perf/util/cputopo.c zfree(&tp->nodes[i].cpus); tp 352 tools/perf/util/cputopo.c free(tp); tp 29 tools/perf/util/cputopo.h void cpu_topology__delete(struct cpu_topology *tp); tp 32 tools/perf/util/cputopo.h void numa_topology__delete(struct numa_topology *tp); tp 573 tools/perf/util/header.c struct cpu_topology *tp; tp 577 tools/perf/util/header.c tp = cpu_topology__new(); tp 578 tools/perf/util/header.c if (!tp) tp 581 tools/perf/util/header.c ret = do_write(ff, &tp->core_sib, sizeof(tp->core_sib)); tp 585 tools/perf/util/header.c for (i = 0; i < tp->core_sib; i++) { tp 586 tools/perf/util/header.c ret = do_write_string(ff, tp->core_siblings[i]); tp 590 tools/perf/util/header.c ret = do_write(ff, &tp->thread_sib, sizeof(tp->thread_sib)); tp 594 tools/perf/util/header.c for (i = 0; i < tp->thread_sib; i++) { tp 595 tools/perf/util/header.c ret = do_write_string(ff, tp->thread_siblings[i]); tp 615 tools/perf/util/header.c if (!tp->die_sib) tp 618 tools/perf/util/header.c ret = do_write(ff, &tp->die_sib, sizeof(tp->die_sib)); tp 622 tools/perf/util/header.c for (i = 0; i < tp->die_sib; i++) { tp 623 tools/perf/util/header.c ret = do_write_string(ff, tp->die_siblings[i]); tp 636 tools/perf/util/header.c cpu_topology__delete(tp); tp 674 tools/perf/util/header.c struct numa_topology *tp; tp 678 tools/perf/util/header.c tp = numa_topology__new(); tp 679 tools/perf/util/header.c if (!tp) tp 682 tools/perf/util/header.c ret = do_write(ff, &tp->nr, sizeof(u32)); tp 686 tools/perf/util/header.c for (i = 0; i < tp->nr; i++) { tp 687 tools/perf/util/header.c struct numa_topology_node *n = &tp->nodes[i]; tp 709 tools/perf/util/header.c numa_topology__delete(tp); tp 568 tools/perf/util/probe-event.c static int find_perf_probe_point_from_dwarf(struct probe_trace_point *tp, tp 574 tools/perf/util/probe-event.c u64 addr = tp->address; tp 583 tools/perf/util/probe-event.c ret = get_text_start_address(tp->module, &stext, NULL); tp 587 tools/perf/util/probe-event.c } else if (tp->symbol) { tp 589 tools/perf/util/probe-event.c ret = kernel_get_symbol_address_by_name(tp->symbol, &addr, tp 590 tools/perf/util/probe-event.c false, !!tp->module); tp 593 tools/perf/util/probe-event.c addr += tp->offset; tp 597 tools/perf/util/probe-event.c tp->module ? : "kernel"); tp 599 tools/perf/util/probe-event.c dinfo = debuginfo_cache__open(tp->module, verbose <= 0); tp 607 tools/perf/util/probe-event.c pp->retprobe = tp->retprobe; tp 616 tools/perf/util/probe-event.c static int post_process_probe_trace_point(struct probe_trace_point *tp, tp 620 tools/perf/util/probe-event.c u64 addr = tp->address - offs; tp 626 tools/perf/util/probe-event.c if (strcmp(sym->name, tp->symbol)) { tp 628 tools/perf/util/probe-event.c if (!tp->realname) tp 629 tools/perf/util/probe-event.c tp->realname = tp->symbol; tp 631 tools/perf/util/probe-event.c free(tp->symbol); tp 632 tools/perf/util/probe-event.c tp->symbol = strdup(sym->name); tp 633 tools/perf/util/probe-event.c if (!tp->symbol) tp 636 tools/perf/util/probe-event.c tp->offset = addr - sym->start; tp 637 tools/perf/util/probe-event.c tp->address -= offs; tp 1142 tools/perf/util/probe-event.c find_perf_probe_point_from_dwarf(struct probe_trace_point *tp __maybe_unused, tp 1732 tools/perf/util/probe-event.c struct probe_trace_point *tp = &tev->point; tp 1774 tools/perf/util/probe-event.c tp->retprobe = (pr == 'r'); tp 1779 tools/perf/util/probe-event.c tp->module = strndup(argv[1], p - argv[1]); tp 1780 tools/perf/util/probe-event.c if (!tp->module) { tp 1784 tools/perf/util/probe-event.c tev->uprobes = (tp->module[0] == '/'); tp 1803 tools/perf/util/probe-event.c tp->address = 0; tp 1812 tools/perf/util/probe-event.c tp->address = strtoul(fmt1_str, NULL, 0); tp 1815 tools/perf/util/probe-event.c tp->symbol = strdup(fmt1_str); tp 1816 tools/perf/util/probe-event.c if (tp->symbol == NULL) { tp 1822 tools/perf/util/probe-event.c tp->offset = 0; tp 1824 tools/perf/util/probe-event.c tp->offset = strtoul(fmt2_str, NULL, 10); tp 1830 tools/perf/util/probe-event.c tp->ref_ctr_offset = strtoul(fmt2_str + 1, NULL, 0); tp 2029 tools/perf/util/probe-event.c struct probe_trace_point *tp = &tev->point; tp 2032 tools/perf/util/probe-event.c err = strbuf_addf(buf, "%s:0x%lx", tp->module, tp->address); tp 2034 tools/perf/util/probe-event.c if (err >= 0 && tp->ref_ctr_offset) { tp 2037 tools/perf/util/probe-event.c err = strbuf_addf(buf, "(0x%lx)", tp->ref_ctr_offset); tp 2044 tools/perf/util/probe-event.c struct probe_trace_point *tp = &tev->point; tp 2050 tools/perf/util/probe-event.c if (tev->uprobes && !tp->module) tp 2056 tools/perf/util/probe-event.c if (strbuf_addf(&buf, "%c:%s/%s ", tp->retprobe ? 'r' : 'p', tp 2065 tools/perf/util/probe-event.c if (tev->uprobes && !tp->address) { tp 2066 tools/perf/util/probe-event.c if (!tp->symbol || strcmp(tp->symbol, "0x0")) tp 2073 tools/perf/util/probe-event.c } else if (!strncmp(tp->symbol, "0x", 2)) { tp 2075 tools/perf/util/probe-event.c err = strbuf_addf(&buf, "%s%s0x%lx", tp->module ?: "", tp 2076 tools/perf/util/probe-event.c tp->module ? ":" : "", tp->address); tp 2078 tools/perf/util/probe-event.c err = strbuf_addf(&buf, "%s%s%s+%lu", tp->module ?: "", tp 2079 tools/perf/util/probe-event.c tp->module ? ":" : "", tp->symbol, tp->offset); tp 2095 tools/perf/util/probe-event.c static int find_perf_probe_point_from_map(struct probe_trace_point *tp, tp 2101 tools/perf/util/probe-event.c u64 addr = tp->address; tp 2105 tools/perf/util/probe-event.c map = dso__new_map(tp->module); tp 2110 tools/perf/util/probe-event.c if (tp->symbol && !addr) { tp 2111 tools/perf/util/probe-event.c if (kernel_get_symbol_address_by_name(tp->symbol, tp 2116 tools/perf/util/probe-event.c addr += tp->offset; tp 2124 tools/perf/util/probe-event.c pp->retprobe = tp->retprobe; tp 2137 tools/perf/util/probe-event.c static int convert_to_perf_probe_point(struct probe_trace_point *tp, tp 2144 tools/perf/util/probe-event.c ret = find_perf_probe_point_from_dwarf(tp, pp, is_kprobe); tp 2147 tools/perf/util/probe-event.c ret = find_perf_probe_point_from_map(tp, pp, is_kprobe); tp 2153 tools/perf/util/probe-event.c if (tp->symbol) { tp 2154 tools/perf/util/probe-event.c pp->function = strdup(tp->symbol); tp 2155 tools/perf/util/probe-event.c pp->offset = tp->offset; tp 2157 tools/perf/util/probe-event.c ret = e_snprintf(buf, 128, "0x%" PRIx64, (u64)tp->address); tp 2166 tools/perf/util/probe-event.c pp->retprobe = tp->retprobe; tp 2665 tools/perf/util/probe-event.c struct probe_trace_point *tp = &tev->point; tp 2667 tools/perf/util/probe-event.c if (tp->ref_ctr_offset && !uprobe_ref_ctr_is_supported()) { tp 2888 tools/perf/util/probe-event.c struct probe_trace_point *tp; tp 2946 tools/perf/util/probe-event.c tp = &tev->point; tp 2960 tools/perf/util/probe-event.c tp->address = map->unmap_ip(map, sym->start) + pp->offset; tp 2964 tools/perf/util/probe-event.c kprobe_warn_out_range(sym->name, tp->address)) { tp 2965 tools/perf/util/probe-event.c tp->symbol = NULL; /* Skip it */ tp 2968 tools/perf/util/probe-event.c tp->symbol = strdup_or_goto(reloc_sym->name, nomem_out); tp 2969 tools/perf/util/probe-event.c tp->offset = tp->address - reloc_sym->addr; tp 2971 tools/perf/util/probe-event.c tp->symbol = strdup_or_goto(sym->name, nomem_out); tp 2972 tools/perf/util/probe-event.c tp->offset = pp->offset; tp 2974 tools/perf/util/probe-event.c tp->realname = strdup_or_goto(sym->name, nomem_out); tp 2976 tools/perf/util/probe-event.c tp->retprobe = pp->retprobe; tp 3036 tools/perf/util/probe-event.c struct probe_trace_point *tp; tp 3055 tools/perf/util/probe-event.c tp = &tev->point; tp 3062 tools/perf/util/probe-event.c tp->address = pev->point.abs_address; tp 3063 tools/perf/util/probe-event.c tp->retprobe = pp->retprobe; tp 3072 tools/perf/util/probe-event.c if (asprintf(&tp->symbol, "0x%lx", tp->address) < 0) tp 3083 tools/perf/util/probe-event.c if (asprintf(&tp->realname, "abs_%lx", tp->address) < 0) tp 3087 tools/perf/util/probe-event.c tp->module = strdup(pev->target); tp 3088 tools/perf/util/probe-event.c if (!tp->module) tp 605 tools/perf/util/probe-finder.c struct probe_trace_point *tp) tp 632 tools/perf/util/probe-finder.c tp->offset = (unsigned long)(paddr - eaddr); tp 633 tools/perf/util/probe-finder.c tp->address = (unsigned long)paddr; tp 634 tools/perf/util/probe-finder.c tp->symbol = strdup(symbol); tp 635 tools/perf/util/probe-finder.c if (!tp->symbol) tp 647 tools/perf/util/probe-finder.c tp->retprobe = true; tp 266 tools/power/x86/turbostat/turbostat.c struct msr_counter *tp; tp 666 tools/power/x86/turbostat/turbostat.c for (mp = sys.tp; mp; mp = mp->next) { tp 820 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 1007 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 1383 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 1472 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) tp 1508 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 1631 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 1867 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.tp; mp; i++, mp = mp->next) { tp 5356 tools/power/x86/turbostat/turbostat.c msrp->next = sys.tp; tp 5357 tools/power/x86/turbostat/turbostat.c sys.tp = msrp; tp 146 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c struct bpf_tcp_sock *tp, *tp_ret; tp 161 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c tp = bpf_tcp_sock(sk); tp 162 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c if (!tp) tp 183 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c tpcpy(tp_ret, tp); tp 218 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c struct bpf_tcp_sock *tp, *tp_ret; tp 240 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c tp = bpf_tcp_sock(sk); tp 241 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c if (!tp) tp 250 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c tpcpy(tp_ret, tp); tp 105 tools/testing/selftests/bpf/test_sock_fields.c static void print_tp(const struct bpf_tcp_sock *tp) tp 113 tools/testing/selftests/bpf/test_sock_fields.c tp->snd_cwnd, tp->srtt_us, tp->rtt_min, tp->snd_ssthresh, tp 114 tools/testing/selftests/bpf/test_sock_fields.c tp->rcv_nxt, tp->snd_nxt, tp->snd_una, tp->mss_cache, tp 115 tools/testing/selftests/bpf/test_sock_fields.c tp->ecn_flags, tp->rate_delivered, tp->rate_interval_us, tp 116 tools/testing/selftests/bpf/test_sock_fields.c tp->packets_out, tp->retrans_out, tp->total_retrans, tp 117 tools/testing/selftests/bpf/test_sock_fields.c tp->segs_in, tp->data_segs_in, tp->segs_out, tp 118 tools/testing/selftests/bpf/test_sock_fields.c tp->data_segs_out, tp->lost_out, tp->sacked_out, tp 119 tools/testing/selftests/bpf/test_sock_fields.c tp->bytes_received, tp->bytes_acked); tp 178 tools/testing/selftests/ptp/testptp.c int64_t t1, t2, tp; tp 453 tools/testing/selftests/ptp/testptp.c tp = pctns(pct+2*i+1); tp 456 tools/testing/selftests/ptp/testptp.c offset = (t2 + t1) / 2 - tp; tp 137 tools/thermal/tmon/sysfs.c ptdata.tzi[tzid].tp[tpid].type = trip_type; tp 189 tools/thermal/tmon/sysfs.c tzi->tp[tp_id].temp = temp_ulong; tp 187 tools/thermal/tmon/tmon.c trip_type_name[ptdata.tzi[i].tp[j].type], tp 188 tools/thermal/tmon/tmon.c ptdata.tzi[i].tp[j].temp); tp 79 tools/thermal/tmon/tmon.h struct trip_point tp[MAX_NR_TRIP]; tp 555 tools/thermal/tmon/tui.c x = ptdata.tzi[tz].tp[j].temp / 1000; tp 557 tools/thermal/tmon/tui.c "%c%d", trip_type_to_char(ptdata.tzi[tz].tp[j].type), tp 560 tools/thermal/tmon/tui.c tz, j, ptdata.tzi[tz].tp[j].temp); tp 638 tools/thermal/tmon/tui.c type = trip_type_to_char(ptdata.tzi[i].tp[j].type);