cp 1673 arch/alpha/kernel/smc37c669.c struct DEVICE_CONFIG *cp; cp 1678 arch/alpha/kernel/smc37c669.c if ( ( cp = SMC37c669_get_config ( func ) ) != NULL ) { cp 1683 arch/alpha/kernel/smc37c669.c cp->drq = drq; cp 1686 arch/alpha/kernel/smc37c669.c cp->irq = irq; cp 1689 arch/alpha/kernel/smc37c669.c cp->port1 = port; cp 1839 arch/alpha/kernel/smc37c669.c struct DEVICE_CONFIG *cp; cp 1844 arch/alpha/kernel/smc37c669.c if ( ( cp = SMC37c669_get_config( func ) ) != NULL ) { cp 1846 arch/alpha/kernel/smc37c669.c *drq = cp->drq; cp 1850 arch/alpha/kernel/smc37c669.c *irq = cp->irq; cp 1854 arch/alpha/kernel/smc37c669.c *port = cp->port1; cp 2202 arch/alpha/kernel/smc37c669.c struct DEVICE_CONFIG *cp = NULL; cp 2206 arch/alpha/kernel/smc37c669.c cp = &local_config[ SERIAL_0 ]; cp 2209 arch/alpha/kernel/smc37c669.c cp = &local_config[ SERIAL_1 ]; cp 2212 arch/alpha/kernel/smc37c669.c cp = &local_config[ PARALLEL_0 ]; cp 2215 arch/alpha/kernel/smc37c669.c cp = &local_config[ FLOPPY_0 ]; cp 2218 arch/alpha/kernel/smc37c669.c cp = &local_config[ IDE_0 ]; cp 2221 arch/alpha/kernel/smc37c669.c return cp; cp 26 arch/arm/mach-omap1/clock.h #define CLK(dev, con, ck, cp) \ cp 28 arch/arm/mach-omap1/clock.h .cpu = cp, \ cp 434 arch/arm/mm/mmu.c struct cachepolicy *cp; cp 559 arch/arm/mm/mmu.c cp = &cache_policies[cachepolicy]; cp 560 arch/arm/mm/mmu.c vecs_pgprot = kern_pgprot = user_pgprot = cp->pte; cp 561 arch/arm/mm/mmu.c s2_pgprot = cp->pte_s2; cp 675 arch/arm/mm/mmu.c mem_types[MT_MEMORY_RWX].prot_sect |= ecc_mask | cp->pmd; cp 677 arch/arm/mm/mmu.c mem_types[MT_MEMORY_RW].prot_sect |= ecc_mask | cp->pmd; cp 681 arch/arm/mm/mmu.c mem_types[MT_ROM].prot_sect |= cp->pmd; cp 683 arch/arm/mm/mmu.c switch (cp->pmd) { cp 693 arch/arm/mm/mmu.c ecc_mask ? "ECC enabled, " : "", cp->policy); cp 16 arch/arm/vfp/vfpinstr.h #define CPNUM(cp) ((cp) << 8) cp 2092 arch/arm64/kvm/sys_regs.c int cp = -1; cp 2097 arch/arm64/kvm/sys_regs.c cp = 15; cp 2101 arch/arm64/kvm/sys_regs.c cp = 14; cp 2108 arch/arm64/kvm/sys_regs.c cp, *vcpu_pc(vcpu), *vcpu_cpsr(vcpu)); cp 480 arch/ia64/kernel/efi.c char *cp, vendor[100] = "unknown"; cp 490 arch/ia64/kernel/efi.c for (cp = boot_command_line; *cp; ) { cp 491 arch/ia64/kernel/efi.c if (memcmp(cp, "mem=", 4) == 0) { cp 492 arch/ia64/kernel/efi.c mem_limit = memparse(cp + 4, &cp); cp 493 arch/ia64/kernel/efi.c } else if (memcmp(cp, "max_addr=", 9) == 0) { cp 494 arch/ia64/kernel/efi.c max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp)); cp 495 arch/ia64/kernel/efi.c } else if (memcmp(cp, "min_addr=", 9) == 0) { cp 496 arch/ia64/kernel/efi.c min_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp)); cp 498 arch/ia64/kernel/efi.c while (*cp != ' ' && *cp) cp 499 arch/ia64/kernel/efi.c ++cp; cp 500 arch/ia64/kernel/efi.c while (*cp == ' ') cp 501 arch/ia64/kernel/efi.c ++cp; cp 197 arch/ia64/kernel/sal.c char *cp; cp 199 arch/ia64/kernel/sal.c for (cp = boot_command_line; *cp; ) { cp 200 arch/ia64/kernel/sal.c if (memcmp(cp, "nointroute", 10) == 0) { cp 205 arch/ia64/kernel/sal.c while (*cp != ' ' && *cp) cp 206 arch/ia64/kernel/sal.c ++cp; cp 207 arch/ia64/kernel/sal.c while (*cp == ' ') cp 208 arch/ia64/kernel/sal.c ++cp; cp 672 arch/ia64/kernel/setup.c char features[128], *cp, *sep; cp 682 arch/ia64/kernel/setup.c cp = features; cp 687 arch/ia64/kernel/setup.c cp += snprintf(cp, size, "%s%s", sep, cp 691 arch/ia64/kernel/setup.c size = sizeof(features) - (cp - features); cp 696 arch/ia64/kernel/setup.c snprintf(cp, size, "%s0x%lx", sep, mask); cp 297 arch/ia64/kernel/traps.c struct fpu_swa_msg *cp = this_cpu_ptr(&cpulast); cp 299 arch/ia64/kernel/traps.c if (unlikely(current_jiffies > cp->time)) cp 300 arch/ia64/kernel/traps.c cp->count = 0; cp 301 arch/ia64/kernel/traps.c if (unlikely(cp->count < 5)) { cp 302 arch/ia64/kernel/traps.c cp->count++; cp 303 arch/ia64/kernel/traps.c cp->time = current_jiffies + 5 * HZ; cp 42 arch/ia64/kernel/unaligned.c unsigned char *cp = vp; cp 47 arch/ia64/kernel/unaligned.c printk (" %02x", *cp++); cp 771 arch/ia64/kernel/unwind.c unsigned char kind, mask = 0, *cp = sr->imask; cp 784 arch/ia64/kernel/unwind.c mask = *cp++; cp 850 arch/m68k/kernel/traps.c u16 c, *cp; cp 923 arch/m68k/kernel/traps.c cp = (u16 *)regs->pc; cp 925 arch/m68k/kernel/traps.c if (get_user(c, cp + i) && i >= 0) { cp 261 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 324 arch/mips/alchemy/common/dbdma.c cp = (au1x_dma_chan_t *)dcp; cp 343 arch/mips/alchemy/common/dbdma.c cp->ddma_cfg = i; cp 756 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 761 arch/mips/alchemy/common/dbdma.c cp = ctp->chan_ptr; cp 762 arch/mips/alchemy/common/dbdma.c cp->ddma_cfg &= ~DDMA_CFG_EN; /* Disable channel */ cp 764 arch/mips/alchemy/common/dbdma.c while (!(cp->ddma_stat & DDMA_STAT_H)) { cp 773 arch/mips/alchemy/common/dbdma.c cp->ddma_stat |= (DDMA_STAT_DB | DDMA_STAT_V); cp 786 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 789 arch/mips/alchemy/common/dbdma.c cp = ctp->chan_ptr; cp 790 arch/mips/alchemy/common/dbdma.c cp->ddma_desptr = virt_to_phys(ctp->cur_ptr); cp 791 arch/mips/alchemy/common/dbdma.c cp->ddma_cfg |= DDMA_CFG_EN; /* Enable channel */ cp 793 arch/mips/alchemy/common/dbdma.c cp->ddma_dbell = 0; cp 827 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 831 arch/mips/alchemy/common/dbdma.c cp = ctp->chan_ptr; cp 834 arch/mips/alchemy/common/dbdma.c rv = cp->ddma_bytecnt; cp 868 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 875 arch/mips/alchemy/common/dbdma.c cp = ctp->chan_ptr; cp 879 arch/mips/alchemy/common/dbdma.c cp->ddma_irq = 0; cp 894 arch/mips/alchemy/common/dbdma.c au1x_dma_chan_t *cp; cp 900 arch/mips/alchemy/common/dbdma.c cp = ctp->chan_ptr; cp 909 arch/mips/alchemy/common/dbdma.c printk(KERN_DEBUG "dbdma chan %x\n", (u32)cp); cp 911 arch/mips/alchemy/common/dbdma.c cp->ddma_cfg, cp->ddma_desptr, cp->ddma_statptr); cp 913 arch/mips/alchemy/common/dbdma.c cp->ddma_dbell, cp->ddma_irq, cp->ddma_stat, cp 914 arch/mips/alchemy/common/dbdma.c cp->ddma_bytecnt); cp 35 arch/mips/fw/arc/cmdline.c static char * __init move_firmware_args(char* cp) cp 48 arch/mips/fw/arc/cmdline.c strcat(cp, used_arc[i][1]); cp 49 arch/mips/fw/arc/cmdline.c cp += strlen(used_arc[i][1]); cp 54 arch/mips/fw/arc/cmdline.c strcpy(cp, s); cp 55 arch/mips/fw/arc/cmdline.c cp += strlen(s); cp 57 arch/mips/fw/arc/cmdline.c *cp++ = ' '; cp 64 arch/mips/fw/arc/cmdline.c return cp; cp 69 arch/mips/fw/arc/cmdline.c char *cp; cp 74 arch/mips/fw/arc/cmdline.c cp = arcs_cmdline; cp 79 arch/mips/fw/arc/cmdline.c cp = move_firmware_args(cp); cp 89 arch/mips/fw/arc/cmdline.c strcpy(cp, prom_argv(actr)); cp 90 arch/mips/fw/arc/cmdline.c cp += strlen(prom_argv(actr)); cp 91 arch/mips/fw/arc/cmdline.c *cp++ = ' '; cp 97 arch/mips/fw/arc/cmdline.c if (cp != arcs_cmdline) /* get rid of trailing space */ cp 98 arch/mips/fw/arc/cmdline.c --cp; cp 99 arch/mips/fw/arc/cmdline.c *cp = '\0'; cp 409 arch/mips/include/asm/octeon/cvmx-pci-defs.h uint32_t cp:8; cp 411 arch/mips/include/asm/octeon/cvmx-pci-defs.h uint32_t cp:8; cp 24 arch/mips/include/asm/pmon.h int (*smpfork) (unsigned long cp, char *sp); cp 42 arch/mips/include/asm/pmon.h #define pmon_smpfork(cp, sp) debug_vectors->_s.smpfork(cp, sp) cp 314 arch/mips/pmcs-msp71xx/msp_prom.c char *cp; cp 319 arch/mips/pmcs-msp71xx/msp_prom.c cp = &(arcs_cmdline[0]); cp 321 arch/mips/pmcs-msp71xx/msp_prom.c strcpy(cp, prom_argv[actr]); cp 322 arch/mips/pmcs-msp71xx/msp_prom.c cp += strlen(prom_argv[actr]); cp 323 arch/mips/pmcs-msp71xx/msp_prom.c *cp++ = ' '; cp 326 arch/mips/pmcs-msp71xx/msp_prom.c if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */ cp 327 arch/mips/pmcs-msp71xx/msp_prom.c --cp; cp 328 arch/mips/pmcs-msp71xx/msp_prom.c *cp = '\0'; cp 58 arch/mips/rb532/prom.c char *cp, *board; cp 66 arch/mips/rb532/prom.c cp = cmd_line; cp 81 arch/mips/rb532/prom.c *(cp++) = ' '; cp 91 arch/mips/rb532/prom.c strcpy(cp, prom_argv[i]); cp 92 arch/mips/rb532/prom.c cp += strlen(prom_argv[i]); cp 94 arch/mips/rb532/prom.c *(cp++) = ' '; cp 98 arch/mips/rb532/prom.c *(cp++) = ' '; cp 99 arch/mips/rb532/prom.c strcpy(cp, arcs_cmdline); cp 100 arch/mips/rb532/prom.c cp += strlen(arcs_cmdline); cp 88 arch/parisc/mm/init.c char *cp, *end; cp 94 arch/parisc/mm/init.c for (cp = boot_command_line; *cp; ) { cp 95 arch/parisc/mm/init.c if (memcmp(cp, "mem=", 4) == 0) { cp 96 arch/parisc/mm/init.c cp += 4; cp 97 arch/parisc/mm/init.c limit = memparse(cp, &end); cp 98 arch/parisc/mm/init.c if (end != cp) cp 100 arch/parisc/mm/init.c cp = end; cp 102 arch/parisc/mm/init.c while (*cp != ' ' && *cp) cp 103 arch/parisc/mm/init.c ++cp; cp 104 arch/parisc/mm/init.c while (*cp == ' ') cp 105 arch/parisc/mm/init.c ++cp; cp 46 arch/powerpc/boot/mktree.c unsigned int cksum, *cp; cp 93 arch/powerpc/boot/mktree.c cp = (void *)&bt; cp 95 arch/powerpc/boot/mktree.c cksum += *cp++; cp 129 arch/powerpc/boot/mktree.c cp = tmpbuf; cp 131 arch/powerpc/boot/mktree.c cksum += *cp++; cp 39 arch/powerpc/boot/serial.c char ch, *cp; cp 42 arch/powerpc/boot/serial.c cp = buf; cp 44 arch/powerpc/boot/serial.c cp = &buf[count]; cp 52 arch/powerpc/boot/serial.c if (cp != buf) { cp 53 arch/powerpc/boot/serial.c cp--; cp 59 arch/powerpc/boot/serial.c while (cp != buf) { cp 60 arch/powerpc/boot/serial.c cp--; cp 65 arch/powerpc/boot/serial.c *cp++ = ch; cp 74 arch/powerpc/boot/serial.c *cp = 0; cp 59 arch/powerpc/include/asm/cpm1.h extern void __init cpm_load_patch(cpm8xx_t *cp); cp 702 arch/powerpc/kernel/prom_init.c static unsigned long prom_strtoul(const char *cp, const char **endp) cp 706 arch/powerpc/kernel/prom_init.c if (*cp == '0') { cp 708 arch/powerpc/kernel/prom_init.c cp++; cp 709 arch/powerpc/kernel/prom_init.c if (toupper(*cp) == 'X') { cp 710 arch/powerpc/kernel/prom_init.c cp++; cp 715 arch/powerpc/kernel/prom_init.c while (isxdigit(*cp) && cp 716 arch/powerpc/kernel/prom_init.c (value = isdigit(*cp) ? *cp - '0' : toupper(*cp) - 'A' + 10) < base) { cp 718 arch/powerpc/kernel/prom_init.c cp++; cp 722 arch/powerpc/kernel/prom_init.c *endp = cp; cp 2195 arch/powerpc/kvm/powerpc.c static int pseries_get_cpu_char(struct kvm_ppc_cpu_char *cp) cp 2205 arch/powerpc/kvm/powerpc.c cp->character = c.character; cp 2206 arch/powerpc/kvm/powerpc.c cp->behaviour = c.behaviour; cp 2207 arch/powerpc/kvm/powerpc.c cp->character_mask = KVM_PPC_CPU_CHAR_SPEC_BAR_ORI31 | cp 2216 arch/powerpc/kvm/powerpc.c cp->behaviour_mask = KVM_PPC_CPU_BEHAV_FAVOUR_SECURITY | cp 2224 arch/powerpc/kvm/powerpc.c static int pseries_get_cpu_char(struct kvm_ppc_cpu_char *cp) cp 2244 arch/powerpc/kvm/powerpc.c static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp) cp 2249 arch/powerpc/kvm/powerpc.c memset(cp, 0, sizeof(*cp)); cp 2250 arch/powerpc/kvm/powerpc.c r = pseries_get_cpu_char(cp); cp 2262 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_SPEC_BAR_ORI31; cp 2265 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_BCCTRL_SERIALISED; cp 2268 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_L1D_FLUSH_ORI30; cp 2271 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_L1D_FLUSH_TRIG2; cp 2274 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_L1D_THREAD_PRIV; cp 2277 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_COUNT_CACHE_DIS; cp 2280 arch/powerpc/kvm/powerpc.c cp->character |= KVM_PPC_CPU_CHAR_BCCTR_FLUSH_ASSIST; cp 2281 arch/powerpc/kvm/powerpc.c cp->character_mask = KVM_PPC_CPU_CHAR_SPEC_BAR_ORI31 | cp 2291 arch/powerpc/kvm/powerpc.c cp->behaviour |= KVM_PPC_CPU_BEHAV_FAVOUR_SECURITY; cp 2294 arch/powerpc/kvm/powerpc.c cp->behaviour |= KVM_PPC_CPU_BEHAV_L1D_FLUSH_PR; cp 2297 arch/powerpc/kvm/powerpc.c cp->behaviour |= KVM_PPC_CPU_BEHAV_BNDS_CHK_SPEC_BAR; cp 2300 arch/powerpc/kvm/powerpc.c cp->behaviour |= KVM_PPC_CPU_BEHAV_FLUSH_COUNT_CACHE; cp 2301 arch/powerpc/kvm/powerpc.c cp->behaviour_mask = KVM_PPC_CPU_BEHAV_FAVOUR_SECURITY | cp 325 arch/powerpc/platforms/8xx/micropatch.c static void __init cpm_write_patch(cpm8xx_t *cp, int offset, uint *patch, int len) cp 329 arch/powerpc/platforms/8xx/micropatch.c memcpy_toio(cp->cp_dpmem + offset, patch, len); cp 332 arch/powerpc/platforms/8xx/micropatch.c void __init cpm_load_patch(cpm8xx_t *cp) cp 334 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_rccr, 0); cp 336 arch/powerpc/platforms/8xx/micropatch.c cpm_write_patch(cp, 0, patch_2000, sizeof(patch_2000)); cp 337 arch/powerpc/platforms/8xx/micropatch.c cpm_write_patch(cp, 0xf00, patch_2f00, sizeof(patch_2f00)); cp 338 arch/powerpc/platforms/8xx/micropatch.c cpm_write_patch(cp, 0xe00, patch_2e00, sizeof(patch_2e00)); cp 346 arch/powerpc/platforms/8xx/micropatch.c iip = (iic_t *)&cp->cp_dparam[PROFF_IIC]; cp 350 arch/powerpc/platforms/8xx/micropatch.c spp = (struct spi_pram *)&cp->cp_dparam[PROFF_SPI]; cp 356 arch/powerpc/platforms/8xx/micropatch.c smp = (smc_uart_t *)&cp->cp_dparam[PROFF_SMC1]; cp 364 arch/powerpc/platforms/8xx/micropatch.c smp = (smc_uart_t *)&cp->cp_dparam[PROFF_SMC1]; cp 366 arch/powerpc/platforms/8xx/micropatch.c smp = (smc_uart_t *)&cp->cp_dparam[PROFF_SMC2]; cp 370 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_cpmcr1, patch_params.cpmcr1); cp 371 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_cpmcr2, patch_params.cpmcr2); cp 372 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_cpmcr3, patch_params.cpmcr3); cp 373 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_cpmcr4, patch_params.cpmcr4); cp 375 arch/powerpc/platforms/8xx/micropatch.c out_be16(&cp->cp_rccr, patch_params.rccr); cp 55 arch/powerpc/platforms/embedded6xx/mvme5100.c struct device_node *cp = NULL; cp 75 arch/powerpc/platforms/embedded6xx/mvme5100.c cp = of_find_compatible_node(NULL, NULL, "chrp,iic"); cp 76 arch/powerpc/platforms/embedded6xx/mvme5100.c if (cp == NULL) { cp 81 arch/powerpc/platforms/embedded6xx/mvme5100.c cirq = irq_of_parse_and_map(cp, 0); cp 101 arch/powerpc/platforms/embedded6xx/mvme5100.c i8259_init(cp, intack); cp 102 arch/powerpc/platforms/embedded6xx/mvme5100.c of_node_put(cp); cp 1548 arch/powerpc/platforms/pseries/vio.c const char *cp; cp 1555 arch/powerpc/platforms/pseries/vio.c cp = of_get_property(dn, "compatible", NULL); cp 1556 arch/powerpc/platforms/pseries/vio.c if (!cp) { cp 1561 arch/powerpc/platforms/pseries/vio.c return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); cp 1594 arch/powerpc/platforms/pseries/vio.c const char *cp; cp 1599 arch/powerpc/platforms/pseries/vio.c cp = of_get_property(dn, "compatible", NULL); cp 1600 arch/powerpc/platforms/pseries/vio.c if (!cp) cp 1603 arch/powerpc/platforms/pseries/vio.c add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); cp 51 arch/s390/boot/string.c static unsigned int simple_guess_base(const char *cp) cp 53 arch/s390/boot/string.c if (cp[0] == '0') { cp 54 arch/s390/boot/string.c if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2])) cp 70 arch/s390/boot/string.c unsigned long long simple_strtoull(const char *cp, char **endp, cp 76 arch/s390/boot/string.c base = simple_guess_base(cp); cp 78 arch/s390/boot/string.c if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') cp 79 arch/s390/boot/string.c cp += 2; cp 81 arch/s390/boot/string.c while (isxdigit(*cp)) { cp 84 arch/s390/boot/string.c value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10; cp 88 arch/s390/boot/string.c cp++; cp 91 arch/s390/boot/string.c *endp = (char *)cp; cp 96 arch/s390/boot/string.c long simple_strtol(const char *cp, char **endp, unsigned int base) cp 98 arch/s390/boot/string.c if (*cp == '-') cp 99 arch/s390/boot/string.c return -simple_strtoull(cp + 1, endp, base); cp 101 arch/s390/boot/string.c return simple_strtoull(cp, endp, base); cp 47 arch/s390/include/asm/nmi.h u64 cp : 1; /* 09 channel-report pending */ cp 345 arch/s390/kernel/dis.c unsigned char *cp; cp 350 arch/s390/kernel/dis.c cp = code + operand->shift / 8; cp 355 arch/s390/kernel/dis.c val |= (unsigned int) *cp++; cp 442 arch/s390/kernel/nmi.c if (mci.cp) { cp 137 arch/s390/kernel/sthyi.c struct cpu_inf cp; cp 268 arch/s390/kernel/sthyi.c cpu_inf = &part_inf->cp; cp 295 arch/s390/kernel/sthyi.c part_inf->cp.lpar_weight = weight_cp; cp 298 arch/s390/kernel/sthyi.c part_inf->cp.all_weight += weight_cp; cp 354 arch/s390/kernel/sthyi.c sctns->par.infplgcp = scale_cap(lpar_inf.cp.lpar_grp_cap); cp 359 arch/s390/kernel/sthyi.c sctns->par.infpscps = lpar_inf.cp.cpu_num_shd; cp 360 arch/s390/kernel/sthyi.c sctns->par.infpdcps = lpar_inf.cp.cpu_num_ded; cp 365 arch/s390/kernel/sthyi.c sctns->par.infpabcp = scale_cap(lpar_inf.cp.lpar_cap); cp 380 arch/s390/kernel/sthyi.c if (lpar_inf.cp.lpar_weight) { cp 382 arch/s390/kernel/sthyi.c lpar_inf.cp.lpar_weight / lpar_inf.cp.all_weight; cp 239 arch/s390/mm/cmm.c static int cmm_skip_blanks(char *cp, char **endp) cp 243 arch/s390/mm/cmm.c for (str = cp; *str == ' ' || *str == '\t'; str++) cp 246 arch/s390/mm/cmm.c return str != cp; cp 136 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 147 arch/sparc/kernel/ds.c static void md_update_data(struct ds_info *dp, struct ds_cap_state *cp, cp 150 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 153 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 157 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 161 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 164 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 281 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 301 arch/sparc/kernel/ds.c pkt.data.handle = cp->handle; cp 320 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 339 arch/sparc/kernel/ds.c pkt.data.handle = cp->handle; cp 360 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 379 arch/sparc/kernel/ds.c pkt.data.handle = cp->handle; cp 423 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 435 arch/sparc/kernel/ds.c pkt.data.handle = cp->handle; cp 449 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 455 arch/sparc/kernel/ds.c __dr_cpu_send_error(dp, cp, data); cp 533 arch/sparc/kernel/ds.c static int dr_cpu_configure(struct ds_info *dp, struct ds_cap_state *cp, cp 546 arch/sparc/kernel/ds.c dr_cpu_init_response(resp, req_num, cp->handle, cp 591 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 605 arch/sparc/kernel/ds.c dr_cpu_init_response(resp, req_num, cp->handle, cp 630 arch/sparc/kernel/ds.c static void dr_cpu_data(struct ds_info *dp, struct ds_cap_state *cp, void *buf, cp 648 arch/sparc/kernel/ds.c dr_cpu_send_error(dp, cp, data); cp 664 arch/sparc/kernel/ds.c err = dr_cpu_configure(dp, cp, req_num, &mask); cp 666 arch/sparc/kernel/ds.c err = dr_cpu_unconfigure(dp, cp, req_num, &mask); cp 669 arch/sparc/kernel/ds.c dr_cpu_send_error(dp, cp, data); cp 682 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 727 arch/sparc/kernel/ds.c struct ds_cap_state *cp, cp 746 arch/sparc/kernel/ds.c struct ds_cap_state *cp; cp 751 arch/sparc/kernel/ds.c cp = NULL; cp 757 arch/sparc/kernel/ds.c cp = tmp; cp 761 arch/sparc/kernel/ds.c if (!cp) { cp 767 arch/sparc/kernel/ds.c cp = tmp; cp 774 arch/sparc/kernel/ds.c if (cp) { cp 797 arch/sparc/kernel/ds.c pkt.header.data.handle = cp->handle; cp 894 arch/sparc/kernel/ds.c struct ds_cap_state *cp = &dp->ds_states[i]; cp 898 arch/sparc/kernel/ds.c if (cp->state == CAP_STATE_REGISTERED) cp 902 arch/sparc/kernel/ds.c cp->handle = ((u64) i << 32) | new_count; cp 905 arch/sparc/kernel/ds.c strlen(cp->service_id)); cp 910 arch/sparc/kernel/ds.c pbuf.req.handle = cp->handle; cp 913 arch/sparc/kernel/ds.c strcpy(pbuf.id_buf, cp->service_id); cp 917 arch/sparc/kernel/ds.c cp->state = CAP_STATE_REG_SENT; cp 939 arch/sparc/kernel/ds.c struct ds_cap_state *cp = find_cap(dp, ap->handle); cp 941 arch/sparc/kernel/ds.c if (!cp) { cp 947 arch/sparc/kernel/ds.c dp->id, cp->service_id); cp 948 arch/sparc/kernel/ds.c cp->state = CAP_STATE_REGISTERED; cp 951 arch/sparc/kernel/ds.c struct ds_cap_state *cp = find_cap(dp, np->handle); cp 953 arch/sparc/kernel/ds.c if (!cp) { cp 959 arch/sparc/kernel/ds.c cp->state = CAP_STATE_UNKNOWN; cp 1008 arch/sparc/kernel/ds.c struct ds_cap_state *cp = find_cap(dp, dpkt->handle); cp 1011 arch/sparc/kernel/ds.c if (!cp) { cp 1020 arch/sparc/kernel/ds.c cp->data(dp, cp, dpkt, req_len); cp 1087 arch/sparc/kernel/ds.c struct ds_cap_state *cp = &dp->ds_states[i]; cp 1089 arch/sparc/kernel/ds.c cp->state = CAP_STATE_UNKNOWN; cp 425 arch/sparc/kernel/of_device_64.c struct device_node *cp; cp 475 arch/sparc/kernel/of_device_64.c cp = of_find_node_by_phandle(handle); cp 477 arch/sparc/kernel/of_device_64.c return cp; cp 928 arch/sparc/kernel/perf_event.c struct perf_event *cp = cpuc->event[i]; cp 931 arch/sparc/kernel/perf_event.c cpuc->current_idx[i] != cp->hw.idx) { cp 932 arch/sparc/kernel/perf_event.c sparc_perf_event_update(cp, &cp->hw, cp 935 arch/sparc/kernel/perf_event.c if (cp->hw.state & PERF_HES_STOPPED) cp 936 arch/sparc/kernel/perf_event.c cp->hw.state |= PERF_HES_ARCH; cp 956 arch/sparc/kernel/perf_event.c struct perf_event *cp = cpuc->event[i]; cp 957 arch/sparc/kernel/perf_event.c struct hw_perf_event *hwc = &cp->hw; cp 964 arch/sparc/kernel/perf_event.c sparc_perf_event_set_period(cp, hwc, idx); cp 991 arch/sparc/kernel/perf_event.c struct perf_event *cp = cpuc->event[i]; cp 992 arch/sparc/kernel/perf_event.c struct hw_perf_event *hwc = &cp->hw; cp 1000 arch/sparc/kernel/perf_event.c if (cp->hw.state & PERF_HES_ARCH) cp 1003 arch/sparc/kernel/perf_event.c sparc_pmu_start(cp, PERF_EF_RELOAD); cp 1007 arch/sparc/kernel/perf_event.c struct perf_event *cp = cpuc->event[i]; cp 1008 arch/sparc/kernel/perf_event.c int idx = cp->hw.idx; cp 1010 arch/sparc/kernel/perf_event.c cpuc->pcr[idx] |= cp->hw.config_base; cp 20 arch/sparc/prom/bootstr_32.c char *cp, *arg; cp 29 arch/sparc/prom/bootstr_32.c cp = barg_buf; cp 37 arch/sparc/prom/bootstr_32.c if (cp >= barg_buf + BARG_LEN - 2) cp 40 arch/sparc/prom/bootstr_32.c *cp++ = *arg++; cp 42 arch/sparc/prom/bootstr_32.c *cp++ = ' '; cp 43 arch/sparc/prom/bootstr_32.c if (cp >= barg_buf + BARG_LEN - 1) cp 47 arch/sparc/prom/bootstr_32.c *cp = 0; cp 251 arch/sparc/vdso/vma.c struct page *cp, **cpp = NULL; cp 275 arch/sparc/vdso/vma.c cp = alloc_page(GFP_KERNEL); cp 276 arch/sparc/vdso/vma.c if (!cp) cp 278 arch/sparc/vdso/vma.c cpp[i] = cp; cp 279 arch/sparc/vdso/vma.c copy_page(page_address(cp), image->data + i * PAGE_SIZE); cp 81 arch/um/drivers/pty.c char *pty, *bank, *cp; cp 92 arch/um/drivers/pty.c for (cp = "0123456789abcdef"; *cp; cp++) { cp 93 arch/um/drivers/pty.c *pty = *cp; cp 330 arch/x86/boot/boot.h unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base); cp 102 arch/x86/boot/string.c static unsigned int simple_guess_base(const char *cp) cp 104 arch/x86/boot/string.c if (cp[0] == '0') { cp 105 arch/x86/boot/string.c if (TOLOWER(cp[1]) == 'x' && isxdigit(cp[2])) cp 121 arch/x86/boot/string.c unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) cp 126 arch/x86/boot/string.c base = simple_guess_base(cp); cp 128 arch/x86/boot/string.c if (base == 16 && cp[0] == '0' && TOLOWER(cp[1]) == 'x') cp 129 arch/x86/boot/string.c cp += 2; cp 131 arch/x86/boot/string.c while (isxdigit(*cp)) { cp 134 arch/x86/boot/string.c value = isdigit(*cp) ? *cp - '0' : TOLOWER(*cp) - 'a' + 10; cp 138 arch/x86/boot/string.c cp++; cp 141 arch/x86/boot/string.c *endp = (char *)cp; cp 146 arch/x86/boot/string.c long simple_strtol(const char *cp, char **endp, unsigned int base) cp 148 arch/x86/boot/string.c if (*cp == '-') cp 149 arch/x86/boot/string.c return -simple_strtoull(cp + 1, endp, base); cp 151 arch/x86/boot/string.c return simple_strtoull(cp, endp, base); cp 29 arch/x86/boot/string.h extern unsigned long long simple_strtoull(const char *cp, char **endp, cp 458 arch/x86/kernel/cpu/microcode/amd.c static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family) cp 467 arch/x86/kernel/cpu/microcode/amd.c return get_builtin_firmware(cp, fw_name); cp 476 arch/x86/kernel/cpu/microcode/amd.c struct cpio_data cp; cp 490 arch/x86/kernel/cpu/microcode/amd.c if (!get_builtin_microcode(&cp, x86_family(cpuid_1_eax))) cp 491 arch/x86/kernel/cpu/microcode/amd.c cp = find_microcode_in_initrd(path, use_pa); cp 496 arch/x86/kernel/cpu/microcode/amd.c *ret = cp; cp 501 arch/x86/kernel/cpu/microcode/amd.c struct cpio_data cp = { }; cp 503 arch/x86/kernel/cpu/microcode/amd.c __load_ucode_amd(cpuid_1_eax, &cp); cp 504 arch/x86/kernel/cpu/microcode/amd.c if (!(cp.data && cp.size)) cp 507 arch/x86/kernel/cpu/microcode/amd.c apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, true); cp 513 arch/x86/kernel/cpu/microcode/amd.c struct cpio_data cp; cp 534 arch/x86/kernel/cpu/microcode/amd.c __load_ucode_amd(cpuid_1_eax, &cp); cp 535 arch/x86/kernel/cpu/microcode/amd.c if (!(cp.data && cp.size)) cp 538 arch/x86/kernel/cpu/microcode/amd.c apply_microcode_early_amd(cpuid_1_eax, cp.data, cp.size, false); cp 548 arch/x86/kernel/cpu/microcode/amd.c struct cpio_data cp; cp 550 arch/x86/kernel/cpu/microcode/amd.c cp = find_microcode_in_initrd(ucode_path, false); cp 551 arch/x86/kernel/cpu/microcode/amd.c if (!(cp.data && cp.size)) cp 556 arch/x86/kernel/cpu/microcode/amd.c scan_containers(cp.data, cp.size, &desc); cp 499 arch/x86/kernel/cpu/microcode/intel.c static bool load_builtin_intel_microcode(struct cpio_data *cp) cp 512 arch/x86/kernel/cpu/microcode/intel.c return get_builtin_firmware(cp, name); cp 627 arch/x86/kernel/cpu/microcode/intel.c struct cpio_data cp; cp 637 arch/x86/kernel/cpu/microcode/intel.c if (!load_builtin_intel_microcode(&cp)) cp 638 arch/x86/kernel/cpu/microcode/intel.c cp = find_microcode_in_initrd(ucode_path, false); cp 640 arch/x86/kernel/cpu/microcode/intel.c if (!(cp.data && cp.size)) cp 645 arch/x86/kernel/cpu/microcode/intel.c scan_microcode(cp.data, cp.size, &uci, true); cp 658 arch/x86/kernel/cpu/microcode/intel.c struct cpio_data cp; cp 670 arch/x86/kernel/cpu/microcode/intel.c if (!load_builtin_intel_microcode(&cp)) cp 671 arch/x86/kernel/cpu/microcode/intel.c cp = find_microcode_in_initrd(path, use_pa); cp 673 arch/x86/kernel/cpu/microcode/intel.c if (!(cp.data && cp.size)) cp 678 arch/x86/kernel/cpu/microcode/intel.c return scan_microcode(cp.data, cp.size, uci, false); cp 1799 arch/x86/platform/uv/tlb_uv.c char *cp; cp 1810 arch/x86/platform/uv/tlb_uv.c cp = (char *)pqp + 31; cp 1811 arch/x86/platform/uv/tlb_uv.c pqp = (struct bau_pq_entry *)(((unsigned long)cp >> 5) << 5); cp 41 arch/xtensa/kernel/signal.c xtregs_coprocessor_t cp; cp 159 arch/xtensa/kernel/signal.c err |= __copy_to_user(&frame->xtregs.cp, &ti->xtregs_cp, cp 160 arch/xtensa/kernel/signal.c sizeof (frame->xtregs.cp)); cp 223 arch/xtensa/kernel/signal.c err |= __copy_from_user(&ti->xtregs_cp, &frame->xtregs.cp, cp 224 arch/xtensa/kernel/signal.c sizeof (frame->xtregs.cp)); cp 242 block/opal_proto.h struct opal_compacket cp; cp 341 block/sed-opal.c hdr->cp.outstandingData, cp 342 block/sed-opal.c hdr->cp.minTransfer); cp 344 block/sed-opal.c if (hdr->cp.outstandingData == 0 || cp 345 block/sed-opal.c hdr->cp.minTransfer != 0) cp 678 block/sed-opal.c hdr->cp.extendedComID[0] = comid >> 8; cp 679 block/sed-opal.c hdr->cp.extendedComID[1] = comid; cp 680 block/sed-opal.c hdr->cp.extendedComID[2] = 0; cp 681 block/sed-opal.c hdr->cp.extendedComID[3] = 0; cp 721 block/sed-opal.c hdr->pkt.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp) - cp 723 block/sed-opal.c hdr->cp.length = cpu_to_be32(cmd->pos - sizeof(hdr->cp)); cp 867 block/sed-opal.c clen = be32_to_cpu(hdr->cp.length); cp 101 drivers/amba/bus.c char *driver_override, *old, *cp; cp 111 drivers/amba/bus.c cp = strchr(driver_override, '\n'); cp 112 drivers/amba/bus.c if (cp) cp 113 drivers/amba/bus.c *cp = '\0'; cp 979 drivers/atm/iphase.c static void xdump( u_char* cp, int length, char* prefix ) cp 990 drivers/atm/iphase.c pBuf += sprintf( pBuf, "%02X ", cp[count + col] ); cp 999 drivers/atm/iphase.c if (isprint((int)cp[count + col])) cp 1000 drivers/atm/iphase.c pBuf += sprintf( pBuf, "%c", cp[count + col] ); cp 28 drivers/base/class.c struct subsys_private *cp = to_subsys_private(kobj); cp 32 drivers/base/class.c ret = class_attr->show(cp->class, class_attr, buf); cp 40 drivers/base/class.c struct subsys_private *cp = to_subsys_private(kobj); cp 44 drivers/base/class.c ret = class_attr->store(cp->class, class_attr, buf, count); cp 50 drivers/base/class.c struct subsys_private *cp = to_subsys_private(kobj); cp 51 drivers/base/class.c struct class *class = cp->class; cp 61 drivers/base/class.c kfree(cp); cp 66 drivers/base/class.c struct subsys_private *cp = to_subsys_private(kobj); cp 67 drivers/base/class.c struct class *class = cp->class; cp 154 drivers/base/class.c struct subsys_private *cp; cp 159 drivers/base/class.c cp = kzalloc(sizeof(*cp), GFP_KERNEL); cp 160 drivers/base/class.c if (!cp) cp 162 drivers/base/class.c klist_init(&cp->klist_devices, klist_class_dev_get, klist_class_dev_put); cp 163 drivers/base/class.c INIT_LIST_HEAD(&cp->interfaces); cp 164 drivers/base/class.c kset_init(&cp->glue_dirs); cp 165 drivers/base/class.c __mutex_init(&cp->mutex, "subsys mutex", key); cp 166 drivers/base/class.c error = kobject_set_name(&cp->subsys.kobj, "%s", cls->name); cp 168 drivers/base/class.c kfree(cp); cp 179 drivers/base/class.c cp->subsys.kobj.kset = class_kset; cp 181 drivers/base/class.c cp->subsys.kobj.kset = class_kset; cp 183 drivers/base/class.c cp->subsys.kobj.ktype = &class_ktype; cp 184 drivers/base/class.c cp->class = cls; cp 185 drivers/base/class.c cls->p = cp; cp 187 drivers/base/class.c error = kset_register(&cp->subsys); cp 189 drivers/base/class.c kfree(cp); cp 974 drivers/base/platform.c char *driver_override, *old, *cp; cp 984 drivers/base/platform.c cp = strchr(driver_override, '\n'); cp 985 drivers/base/platform.c if (cp) cp 986 drivers/base/platform.c *cp = '\0'; cp 2005 drivers/base/power/domain.c struct of_genpd_provider *cp; cp 2007 drivers/base/power/domain.c cp = kzalloc(sizeof(*cp), GFP_KERNEL); cp 2008 drivers/base/power/domain.c if (!cp) cp 2011 drivers/base/power/domain.c cp->node = of_node_get(np); cp 2012 drivers/base/power/domain.c cp->data = data; cp 2013 drivers/base/power/domain.c cp->xlate = xlate; cp 2016 drivers/base/power/domain.c list_add(&cp->link, &of_genpd_providers); cp 2167 drivers/base/power/domain.c struct of_genpd_provider *cp, *tmp; cp 2172 drivers/base/power/domain.c list_for_each_entry_safe(cp, tmp, &of_genpd_providers, link) { cp 2173 drivers/base/power/domain.c if (cp->node == np) { cp 2191 drivers/base/power/domain.c list_del(&cp->link); cp 2192 drivers/base/power/domain.c of_node_put(cp->node); cp 2193 drivers/base/power/domain.c kfree(cp); cp 237 drivers/block/swim3.c static void init_dma(struct dbdma_cmd *cp, int cmd, void *buf, int count); cp 407 drivers/block/swim3.c static inline void init_dma(struct dbdma_cmd *cp, int cmd, cp 410 drivers/block/swim3.c cp->req_count = cpu_to_le16(count); cp 411 drivers/block/swim3.c cp->command = cpu_to_le16(cmd); cp 412 drivers/block/swim3.c cp->phy_addr = cpu_to_le32(virt_to_bus(buf)); cp 413 drivers/block/swim3.c cp->xfer_status = 0; cp 420 drivers/block/swim3.c struct dbdma_cmd *cp = fs->dma_cmd; cp 444 drivers/block/swim3.c out_le32(&dr->cmdptr, virt_to_bus(cp)); cp 447 drivers/block/swim3.c init_dma(cp, OUTPUT_MORE, write_preamble, sizeof(write_preamble)); cp 448 drivers/block/swim3.c ++cp; cp 449 drivers/block/swim3.c init_dma(cp, OUTPUT_MORE, bio_data(req->bio), 512); cp 450 drivers/block/swim3.c ++cp; cp 451 drivers/block/swim3.c init_dma(cp, OUTPUT_LAST, write_postamble, sizeof(write_postamble)); cp 453 drivers/block/swim3.c init_dma(cp, INPUT_LAST, bio_data(req->bio), n * 512); cp 455 drivers/block/swim3.c ++cp; cp 456 drivers/block/swim3.c out_le16(&cp->command, DBDMA_STOP); cp 645 drivers/block/swim3.c struct dbdma_cmd *cp; cp 715 drivers/block/swim3.c cp = fs->dma_cmd; cp 717 drivers/block/swim3.c ++cp; cp 725 drivers/block/swim3.c if ((intr & ERROR_INTR) == 0 && cp->xfer_status == 0) { cp 728 drivers/block/swim3.c if (cp->xfer_status != 0) cp 736 drivers/block/swim3.c stat = le16_to_cpu(cp->xfer_status); cp 737 drivers/block/swim3.c resid = le16_to_cpu(cp->res_count); cp 392 drivers/bluetooth/btintel.c struct ibt_cp_reg_access cp; cp 402 drivers/bluetooth/btintel.c cp.mode = IBT_REG_MODE_8BIT; cp 405 drivers/bluetooth/btintel.c cp.mode = IBT_REG_MODE_16BIT; cp 408 drivers/bluetooth/btintel.c cp.mode = IBT_REG_MODE_32BIT; cp 415 drivers/bluetooth/btintel.c cp.addr = *(__le32 *)addr; cp 416 drivers/bluetooth/btintel.c cp.len = val_size; cp 418 drivers/bluetooth/btintel.c bt_dev_dbg(ctx->hdev, "Register (0x%x) read", le32_to_cpu(cp.addr)); cp 420 drivers/bluetooth/btintel.c skb = hci_cmd_sync(ctx->hdev, ctx->op_read, sizeof(cp), &cp, cp 425 drivers/bluetooth/btintel.c le32_to_cpu(cp.addr), err); cp 431 drivers/bluetooth/btintel.c le32_to_cpu(cp.addr)); cp 438 drivers/bluetooth/btintel.c if (rp->addr != cp.addr) { cp 457 drivers/bluetooth/btintel.c struct ibt_cp_reg_access *cp; cp 459 drivers/bluetooth/btintel.c int plen = sizeof(*cp) + val_size; cp 480 drivers/bluetooth/btintel.c cp = kmalloc(plen, GFP_KERNEL); cp 481 drivers/bluetooth/btintel.c if (!cp) cp 485 drivers/bluetooth/btintel.c cp->addr = *(__le32 *)addr; cp 486 drivers/bluetooth/btintel.c cp->mode = mode; cp 487 drivers/bluetooth/btintel.c cp->len = val_size; cp 488 drivers/bluetooth/btintel.c memcpy(&cp->data, val, val_size); cp 490 drivers/bluetooth/btintel.c bt_dev_dbg(ctx->hdev, "Register (0x%x) write", le32_to_cpu(cp->addr)); cp 492 drivers/bluetooth/btintel.c skb = hci_cmd_sync(ctx->hdev, ctx->op_write, plen, cp, HCI_CMD_TIMEOUT); cp 496 drivers/bluetooth/btintel.c le32_to_cpu(cp->addr), err); cp 502 drivers/bluetooth/btintel.c kfree(cp); cp 442 drivers/bus/arm-cci.c struct device_node *cp; cp 458 drivers/bus/arm-cci.c for_each_available_child_of_node(np, cp) { cp 459 drivers/bus/arm-cci.c if (!of_match_node(arm_cci_ctrl_if_matches, cp)) cp 467 drivers/bus/arm-cci.c if (of_property_read_string(cp, "interface-type", cp 470 drivers/bus/arm-cci.c cp); cp 476 drivers/bus/arm-cci.c cp); cp 480 drivers/bus/arm-cci.c ret = of_address_to_resource(cp, 0, &res); cp 501 drivers/bus/arm-cci.c ports[i].dn = cp; cp 929 drivers/char/random.c static int crng_fast_load(const char *cp, size_t len) cp 942 drivers/char/random.c p[crng_init_cnt % CHACHA_KEY_SIZE] ^= *cp; cp 943 drivers/char/random.c cp++; crng_init_cnt++; len--; cp 969 drivers/char/random.c static int crng_slow_load(const char *cp, size_t len) cp 975 drivers/char/random.c const char * src_buf = cp; cp 4313 drivers/clk/clk.c struct of_clk_provider *cp; cp 4316 drivers/clk/clk.c cp = kzalloc(sizeof(*cp), GFP_KERNEL); cp 4317 drivers/clk/clk.c if (!cp) cp 4320 drivers/clk/clk.c cp->node = of_node_get(np); cp 4321 drivers/clk/clk.c cp->data = data; cp 4322 drivers/clk/clk.c cp->get = clk_src_get; cp 4325 drivers/clk/clk.c list_add(&cp->link, &of_clk_providers); cp 4350 drivers/clk/clk.c struct of_clk_provider *cp; cp 4353 drivers/clk/clk.c cp = kzalloc(sizeof(*cp), GFP_KERNEL); cp 4354 drivers/clk/clk.c if (!cp) cp 4357 drivers/clk/clk.c cp->node = of_node_get(np); cp 4358 drivers/clk/clk.c cp->data = data; cp 4359 drivers/clk/clk.c cp->get_hw = get; cp 4362 drivers/clk/clk.c list_add(&cp->link, &of_clk_providers); cp 4446 drivers/clk/clk.c struct of_clk_provider *cp; cp 4449 drivers/clk/clk.c list_for_each_entry(cp, &of_clk_providers, link) { cp 4450 drivers/clk/clk.c if (cp->node == np) { cp 4451 drivers/clk/clk.c list_del(&cp->link); cp 4452 drivers/clk/clk.c of_node_put(cp->node); cp 4453 drivers/clk/clk.c kfree(cp); cp 50 drivers/clk/st/clkgen-pll.c struct clkgen_field cp; cp 101 drivers/clk/st/clkgen-pll.c .cp = CLKGEN_FIELD(0x1a8, C32_CP_MASK, 1), cp 151 drivers/clk/st/clkgen-pll.c u32 cp; cp 163 drivers/clk/st/clkgen-pll.c unsigned long cp; cp 297 drivers/clk/st/clkgen-pll.c for (pll->cp = 6; pll->ndiv > cp_table[pll->cp-6]; (pll->cp)++) cp 381 drivers/clk/st/clkgen-pll.c pll->cp = params.cp; cp 390 drivers/clk/st/clkgen-pll.c CLKGEN_WRITE(pll, cp, pll->cp); cp 833 drivers/crypto/n2_core.c static int __n2_crypt_chunk(struct crypto_tfm *tfm, struct n2_crypto_chunk *cp, cp 841 drivers/crypto/n2_core.c ent = spu_queue_alloc(qp, cp->arr_len); cp 844 drivers/crypto/n2_core.c cp->arr_len); cp 848 drivers/crypto/n2_core.c in_place = (cp->dest_paddr == cp->arr[0].src_paddr); cp 850 drivers/crypto/n2_core.c ent->control = control_word_base(cp->arr[0].src_len, cp 855 drivers/crypto/n2_core.c ent->src_addr = cp->arr[0].src_paddr; cp 860 drivers/crypto/n2_core.c ent->enc_iv_addr = cp->iv_paddr; cp 861 drivers/crypto/n2_core.c ent->dest_addr = (in_place ? 0UL : cp->dest_paddr); cp 863 drivers/crypto/n2_core.c for (i = 1; i < cp->arr_len; i++) { cp 866 drivers/crypto/n2_core.c ent->control = cp->arr[i].src_len - 1; cp 867 drivers/crypto/n2_core.c ent->src_addr = cp->arr[i].src_paddr; cp 48 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_destroy(struct compressor **cp); cp 51 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_power_up_fbc(struct compressor *cp); cp 53 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_enable_fbc(struct compressor *cp, cp 56 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_disable_fbc(struct compressor *cp); cp 58 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_set_fbc_invalidation_triggers(struct compressor *cp, cp 62 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h struct compressor *cp, cp 65 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h bool dce110_compressor_is_fbc_enabled_in_hw(struct compressor *cp, cp 69 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_enable_lpt(struct compressor *cp); cp 71 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_disable_lpt(struct compressor *cp); cp 73 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h void dce110_compressor_program_lpt_control(struct compressor *cp, cp 76 drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.h bool dce110_compressor_is_lpt_enabled_in_hw(struct compressor *cp); cp 48 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_destroy(struct compressor **cp); cp 51 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_power_up_fbc(struct compressor *cp); cp 53 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_enable_fbc(struct compressor *cp, uint32_t paths_num, cp 56 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_disable_fbc(struct compressor *cp); cp 58 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_set_fbc_invalidation_triggers(struct compressor *cp, cp 62 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h struct compressor *cp, cp 65 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h bool dce112_compressor_is_fbc_enabled_in_hw(struct compressor *cp, cp 69 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_enable_lpt(struct compressor *cp); cp 71 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_disable_lpt(struct compressor *cp); cp 73 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h void dce112_compressor_program_lpt_control(struct compressor *cp, cp 76 drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.h bool dce112_compressor_is_lpt_enabled_in_hw(struct compressor *cp); cp 66 drivers/gpu/drm/amd/display/dc/inc/compressor.h void (*power_up_fbc)(struct compressor *cp); cp 67 drivers/gpu/drm/amd/display/dc/inc/compressor.h void (*enable_fbc)(struct compressor *cp, cp 69 drivers/gpu/drm/amd/display/dc/inc/compressor.h void (*disable_fbc)(struct compressor *cp); cp 70 drivers/gpu/drm/amd/display/dc/inc/compressor.h void (*set_fbc_invalidation_triggers)(struct compressor *cp, cp 73 drivers/gpu/drm/amd/display/dc/inc/compressor.h struct compressor *cp, cp 75 drivers/gpu/drm/amd/display/dc/inc/compressor.h bool (*is_fbc_enabled_in_hw)(struct compressor *cp, cp 1017 drivers/gpu/drm/radeon/radeon.h void radeon_ring_free_size(struct radeon_device *rdev, struct radeon_ring *cp); cp 1018 drivers/gpu/drm/radeon/radeon.h int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw); cp 1019 drivers/gpu/drm/radeon/radeon.h int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ndw); cp 1020 drivers/gpu/drm/radeon/radeon.h void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *cp, cp 1022 drivers/gpu/drm/radeon/radeon.h void radeon_ring_unlock_commit(struct radeon_device *rdev, struct radeon_ring *cp, cp 1025 drivers/gpu/drm/radeon/radeon.h void radeon_ring_unlock_undo(struct radeon_device *rdev, struct radeon_ring *cp); cp 1026 drivers/gpu/drm/radeon/radeon.h int radeon_ring_test(struct radeon_device *rdev, struct radeon_ring *cp); cp 1034 drivers/gpu/drm/radeon/radeon.h int radeon_ring_init(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size, cp 1036 drivers/gpu/drm/radeon/radeon.h void radeon_ring_fini(struct radeon_device *rdev, struct radeon_ring *cp); cp 1824 drivers/gpu/drm/radeon/radeon.h bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp, cp 1830 drivers/gpu/drm/radeon/radeon.h int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp); cp 1831 drivers/gpu/drm/radeon/radeon.h int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp); cp 1832 drivers/gpu/drm/radeon/radeon.h bool (*is_lockup)(struct radeon_device *rdev, struct radeon_ring *cp); cp 1835 drivers/gpu/drm/radeon/radeon.h void (*ring_start)(struct radeon_device *rdev, struct radeon_ring *cp); cp 2715 drivers/gpu/drm/radeon/radeon.h #define radeon_ring_start(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_start((rdev), (cp)) cp 2716 drivers/gpu/drm/radeon/radeon.h #define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp)) cp 2717 drivers/gpu/drm/radeon/radeon.h #define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp)) cp 2720 drivers/gpu/drm/radeon/radeon.h #define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp)) cp 2733 drivers/gpu/drm/radeon/radeon.h #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) cp 66 drivers/gpu/drm/radeon/radeon_asic.h bool r100_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 79 drivers/gpu/drm/radeon/radeon_asic.h struct radeon_ring *cp, cp 96 drivers/gpu/drm/radeon/radeon_asic.h int r100_ring_test(struct radeon_device *rdev, struct radeon_ring *cp); cp 325 drivers/gpu/drm/radeon/radeon_asic.h struct radeon_ring *cp, cp 336 drivers/gpu/drm/radeon/radeon_asic.h bool r600_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 345 drivers/gpu/drm/radeon/radeon_asic.h int r600_ring_test(struct radeon_device *rdev, struct radeon_ring *cp); cp 346 drivers/gpu/drm/radeon/radeon_asic.h int r600_dma_ring_test(struct radeon_device *rdev, struct radeon_ring *cp); cp 373 drivers/gpu/drm/radeon/radeon_asic.h void r600_ring_init(struct radeon_device *rdev, struct radeon_ring *cp, unsigned ring_size); cp 515 drivers/gpu/drm/radeon/radeon_asic.h bool evergreen_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 516 drivers/gpu/drm/radeon/radeon_asic.h bool evergreen_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 714 drivers/gpu/drm/radeon/radeon_asic.h bool si_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 715 drivers/gpu/drm/radeon/radeon_asic.h bool si_dma_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 812 drivers/gpu/drm/radeon/radeon_asic.h struct radeon_ring *cp, cp 820 drivers/gpu/drm/radeon/radeon_asic.h bool cik_gfx_is_lockup(struct radeon_device *rdev, struct radeon_ring *cp); cp 361 drivers/gpu/drm/radeon/radeon_pm.c int cp = rdev->pm.profile; cp 364 drivers/gpu/drm/radeon/radeon_pm.c (cp == PM_PROFILE_AUTO) ? "auto" : cp 365 drivers/gpu/drm/radeon/radeon_pm.c (cp == PM_PROFILE_LOW) ? "low" : cp 366 drivers/gpu/drm/radeon/radeon_pm.c (cp == PM_PROFILE_MID) ? "mid" : cp 367 drivers/gpu/drm/radeon/radeon_pm.c (cp == PM_PROFILE_HIGH) ? "high" : "default"); cp 575 drivers/hv/vmbus_drv.c char *driver_override, *old, *cp; cp 585 drivers/hv/vmbus_drv.c cp = strchr(driver_override, '\n'); cp 586 drivers/hv/vmbus_drv.c if (cp) cp 587 drivers/hv/vmbus_drv.c *cp = '\0'; cp 1846 drivers/hwtracing/intel_th/msu.c char *cp, *mode; cp 1852 drivers/hwtracing/intel_th/msu.c cp = memchr(buf, '\n', len); cp 1853 drivers/hwtracing/intel_th/msu.c if (cp) cp 1854 drivers/hwtracing/intel_th/msu.c len = cp - buf; cp 937 drivers/infiniband/hw/cxgb3/iwch_provider.c char *cp, *next; cp 943 drivers/infiniband/hw/cxgb3/iwch_provider.c cp = strsep(&next, "."); cp 944 drivers/infiniband/hw/cxgb3/iwch_provider.c sscanf(cp, "%i", &fw_maj); cp 945 drivers/infiniband/hw/cxgb3/iwch_provider.c cp = strsep(&next, "."); cp 946 drivers/infiniband/hw/cxgb3/iwch_provider.c sscanf(cp, "%i", &fw_min); cp 947 drivers/infiniband/hw/cxgb3/iwch_provider.c cp = strsep(&next, "."); cp 948 drivers/infiniband/hw/cxgb3/iwch_provider.c sscanf(cp, "%i", &fw_mic); cp 262 drivers/infiniband/hw/hfi1/pio.c int cp = sc_mem_pool_config[i].centipercent; cp 269 drivers/infiniband/hw/hfi1/pio.c if (cp >= 0) { /* centipercent valid */ cp 270 drivers/infiniband/hw/hfi1/pio.c cp_total += cp; cp 281 drivers/infiniband/hw/hfi1/pio.c mem_pool_info[i].centipercent = cp; cp 558 drivers/infiniband/hw/hfi1/qsfp.c int refresh_qsfp_cache(struct hfi1_pportdata *ppd, struct qsfp_data *cp) cp 563 drivers/infiniband/hw/hfi1/qsfp.c u8 *cache = &cp->cache[0]; cp 226 drivers/infiniband/hw/hfi1/qsfp.h struct qsfp_data *cp); cp 1746 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_chippport_specific *cp = from_timer(cp, t, chase_timer); cp 1747 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_pportdata *ppd = cp->ppd; cp 6466 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_chippport_specific *cp = ppd->cpspec; cp 6555 drivers/infiniband/hw/qib/qib_iba7322.c init_waitqueue_head(&cp->autoneg_wait); cp 6556 drivers/infiniband/hw/qib/qib_iba7322.c INIT_DELAYED_WORK(&cp->autoneg_work, cp 6559 drivers/infiniband/hw/qib/qib_iba7322.c INIT_DELAYED_WORK(&cp->ipg_work, ipg_7322_work); cp 6571 drivers/infiniband/hw/qib/qib_iba7322.c cp->h1_val = IS_QMH(dd) ? H1_FORCE_QMH : H1_FORCE_QME; cp 6579 drivers/infiniband/hw/qib/qib_iba7322.c cp->h1_val = H1_FORCE_VAL; cp 6585 drivers/infiniband/hw/qib/qib_iba7322.c timer_setup(&cp->chase_timer, reenable_chase, 0); cp 273 drivers/infiniband/hw/qib/qib_qsfp.c int qib_refresh_qsfp_cache(struct qib_pportdata *ppd, struct qib_qsfp_cache *cp) cp 281 drivers/infiniband/hw/qib/qib_qsfp.c memset(cp, 0, sizeof(*cp)); cp 311 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_ID_OFFS, &cp->id, 1); cp 314 drivers/infiniband/hw/qib/qib_qsfp.c if ((cp->id & 0xFE) != 0x0C) cp 316 drivers/infiniband/hw/qib/qib_qsfp.c "QSFP ID byte is 0x%02X, S/B 0x0C/D\n", cp->id); cp 317 drivers/infiniband/hw/qib/qib_qsfp.c cks = cp->id; cp 319 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_PWR_OFFS, &cp->pwr, 1); cp 322 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->pwr; cp 329 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_LEN_OFFS, &cp->len, 1); cp 332 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->len; cp 334 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_MOD_TECH_OFFS, &cp->tech, 1); cp 337 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->tech; cp 339 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_VEND_OFFS, &cp->vendor, QSFP_VEND_LEN); cp 343 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->vendor[idx]; cp 345 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_IBXCV_OFFS, &cp->xt_xcv, 1); cp 348 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->xt_xcv; cp 350 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_VOUI_OFFS, &cp->oui, QSFP_VOUI_LEN); cp 354 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->oui[idx]; cp 356 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_PN_OFFS, &cp->partnum, QSFP_PN_LEN); cp 360 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->partnum[idx]; cp 362 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_REV_OFFS, &cp->rev, QSFP_REV_LEN); cp 366 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->rev[idx]; cp 368 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_ATTEN_OFFS, &cp->atten, QSFP_ATTEN_LEN); cp 372 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->atten[idx]; cp 380 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_CC_OFFS, &cp->cks1, 1); cp 383 drivers/infiniband/hw/qib/qib_qsfp.c if (cks != cp->cks1) cp 385 drivers/infiniband/hw/qib/qib_qsfp.c "QSFP cks1 is %02X, computed %02X\n", cp->cks1, cp 394 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_SN_OFFS, &cp->serial, QSFP_SN_LEN); cp 398 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->serial[idx]; cp 400 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_DATE_OFFS, &cp->date, QSFP_DATE_LEN); cp 404 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->date[idx]; cp 406 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_LOT_OFFS, &cp->lot, QSFP_LOT_LEN); cp 410 drivers/infiniband/hw/qib/qib_qsfp.c cks += cp->lot[idx]; cp 417 drivers/infiniband/hw/qib/qib_qsfp.c ret = qsfp_read(ppd, QSFP_CC_EXT_OFFS, &cp->cks2, 1); cp 421 drivers/infiniband/hw/qib/qib_qsfp.c if (cks != cp->cks2) cp 423 drivers/infiniband/hw/qib/qib_qsfp.c "QSFP cks2 is %02X, computed %02X\n", cp->cks2, cp 428 drivers/infiniband/hw/qib/qib_qsfp.c cp->id = 0; cp 185 drivers/infiniband/hw/qib/qib_qsfp.h struct qib_qsfp_cache *cp); cp 2384 drivers/infiniband/ulp/isert/ib_isert.c struct rdma_conn_param cp; cp 2388 drivers/infiniband/ulp/isert/ib_isert.c memset(&cp, 0, sizeof(struct rdma_conn_param)); cp 2389 drivers/infiniband/ulp/isert/ib_isert.c cp.initiator_depth = isert_conn->initiator_depth; cp 2390 drivers/infiniband/ulp/isert/ib_isert.c cp.retry_count = 7; cp 2391 drivers/infiniband/ulp/isert/ib_isert.c cp.rnr_retry_count = 7; cp 2397 drivers/infiniband/ulp/isert/ib_isert.c cp.private_data = (void *)&rsp_hdr; cp 2398 drivers/infiniband/ulp/isert/ib_isert.c cp.private_data_len = sizeof(rsp_hdr); cp 2400 drivers/infiniband/ulp/isert/ib_isert.c ret = rdma_accept(cm_id, &cp); cp 117 drivers/input/serio/serport.c static void serport_ldisc_receive(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) cp 146 drivers/input/serio/serport.c serio_interrupt(serport->serio, cp[i], ch_flags); cp 102 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = (struct imx_mu_con_priv *)data; cp 104 drivers/mailbox/imx-mailbox.c mbox_chan_txdone(cp->chan, 0); cp 111 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = chan->con_priv; cp 117 drivers/mailbox/imx-mailbox.c switch (cp->type) { cp 119 drivers/mailbox/imx-mailbox.c val &= IMX_MU_xSR_TEn(cp->idx) & cp 120 drivers/mailbox/imx-mailbox.c (ctrl & IMX_MU_xCR_TIEn(cp->idx)); cp 123 drivers/mailbox/imx-mailbox.c val &= IMX_MU_xSR_RFn(cp->idx) & cp 124 drivers/mailbox/imx-mailbox.c (ctrl & IMX_MU_xCR_RIEn(cp->idx)); cp 127 drivers/mailbox/imx-mailbox.c val &= IMX_MU_xSR_GIPn(cp->idx) & cp 128 drivers/mailbox/imx-mailbox.c (ctrl & IMX_MU_xCR_GIEn(cp->idx)); cp 137 drivers/mailbox/imx-mailbox.c if (val == IMX_MU_xSR_TEn(cp->idx)) { cp 138 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx)); cp 140 drivers/mailbox/imx-mailbox.c } else if (val == IMX_MU_xSR_RFn(cp->idx)) { cp 141 drivers/mailbox/imx-mailbox.c dat = imx_mu_read(priv, IMX_MU_xRRn(cp->idx)); cp 143 drivers/mailbox/imx-mailbox.c } else if (val == IMX_MU_xSR_GIPn(cp->idx)) { cp 144 drivers/mailbox/imx-mailbox.c imx_mu_write(priv, IMX_MU_xSR_GIPn(cp->idx), IMX_MU_xSR); cp 157 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = chan->con_priv; cp 160 drivers/mailbox/imx-mailbox.c switch (cp->type) { cp 162 drivers/mailbox/imx-mailbox.c imx_mu_write(priv, *arg, IMX_MU_xTRn(cp->idx)); cp 163 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, IMX_MU_xCR_TIEn(cp->idx), 0); cp 166 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, IMX_MU_xCR_GIRn(cp->idx), 0); cp 167 drivers/mailbox/imx-mailbox.c tasklet_schedule(&cp->txdb_tasklet); cp 170 drivers/mailbox/imx-mailbox.c dev_warn_ratelimited(priv->dev, "Send data on wrong channel type: %d\n", cp->type); cp 180 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = chan->con_priv; cp 183 drivers/mailbox/imx-mailbox.c if (cp->type == IMX_MU_TYPE_TXDB) { cp 185 drivers/mailbox/imx-mailbox.c tasklet_init(&cp->txdb_tasklet, imx_mu_txdb_tasklet, cp 186 drivers/mailbox/imx-mailbox.c (unsigned long)cp); cp 191 drivers/mailbox/imx-mailbox.c IRQF_NO_SUSPEND, cp->irq_desc, chan); cp 198 drivers/mailbox/imx-mailbox.c switch (cp->type) { cp 200 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, IMX_MU_xCR_RIEn(cp->idx), 0); cp 203 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, IMX_MU_xCR_GIEn(cp->idx), 0); cp 215 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = chan->con_priv; cp 217 drivers/mailbox/imx-mailbox.c if (cp->type == IMX_MU_TYPE_TXDB) { cp 218 drivers/mailbox/imx-mailbox.c tasklet_kill(&cp->txdb_tasklet); cp 222 drivers/mailbox/imx-mailbox.c switch (cp->type) { cp 224 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx)); cp 227 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_RIEn(cp->idx)); cp 230 drivers/mailbox/imx-mailbox.c imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_GIEn(cp->idx)); cp 313 drivers/mailbox/imx-mailbox.c struct imx_mu_con_priv *cp = &priv->con_priv[i]; cp 315 drivers/mailbox/imx-mailbox.c cp->idx = i % 4; cp 316 drivers/mailbox/imx-mailbox.c cp->type = i >> 2; cp 317 drivers/mailbox/imx-mailbox.c cp->chan = &priv->mbox_chans[i]; cp 318 drivers/mailbox/imx-mailbox.c priv->mbox_chans[i].con_priv = cp; cp 319 drivers/mailbox/imx-mailbox.c snprintf(cp->irq_desc, sizeof(cp->irq_desc), cp 320 drivers/mailbox/imx-mailbox.c "imx_mu_chan[%i-%i]", cp->type, cp->idx); cp 106 drivers/md/bcache/sysfs.h #define strtoul_or_return(cp) \ cp 109 drivers/md/bcache/sysfs.h int _r = kstrtoul(cp, 10, &_v); \ cp 115 drivers/md/bcache/sysfs.h #define strtoi_h_or_return(cp, v) \ cp 117 drivers/md/bcache/sysfs.h int _r = strtoi_h(cp, &v); \ cp 24 drivers/md/bcache/util.c int bch_ ## name ## _h(const char *cp, type *res) \ cp 28 drivers/md/bcache/util.c type i = simple_ ## name(cp, &e, 10); \ cp 54 drivers/md/bcache/util.c if (e++ == cp) \ cp 290 drivers/md/bcache/util.h int bch_strtoint_h(const char *cp, int *res); cp 291 drivers/md/bcache/util.h int bch_strtouint_h(const char *cp, unsigned int *res); cp 292 drivers/md/bcache/util.h int bch_strtoll_h(const char *cp, long long *res); cp 293 drivers/md/bcache/util.h int bch_strtoull_h(const char *cp, unsigned long long *res); cp 295 drivers/md/bcache/util.h static inline int bch_strtol_h(const char *cp, long *res) cp 298 drivers/md/bcache/util.h return bch_strtoint_h(cp, (int *) res); cp 300 drivers/md/bcache/util.h return bch_strtoll_h(cp, (long long *) res); cp 304 drivers/md/bcache/util.h static inline int bch_strtoul_h(const char *cp, long *res) cp 307 drivers/md/bcache/util.h return bch_strtouint_h(cp, (unsigned int *) res); cp 309 drivers/md/bcache/util.h return bch_strtoull_h(cp, (unsigned long long *) res); cp 313 drivers/md/bcache/util.h #define strtoi_h(cp, res) \ cp 315 drivers/md/bcache/util.h ? bch_strtoint_h(cp, (void *) res) \ cp 317 drivers/md/bcache/util.h ? bch_strtol_h(cp, (void *) res) \ cp 319 drivers/md/bcache/util.h ? bch_strtoll_h(cp, (void *) res) \ cp 321 drivers/md/bcache/util.h ? bch_strtouint_h(cp, (void *) res) \ cp 323 drivers/md/bcache/util.h ? bch_strtoul_h(cp, (void *) res) \ cp 325 drivers/md/bcache/util.h ? bch_strtoull_h(cp, (void *) res) : -EINVAL) cp 327 drivers/md/bcache/util.h #define strtoul_safe(cp, var) \ cp 330 drivers/md/bcache/util.h int _r = kstrtoul(cp, 10, &_v); \ cp 336 drivers/md/bcache/util.h #define strtoul_safe_clamp(cp, var, min, max) \ cp 339 drivers/md/bcache/util.h int _r = kstrtoul(cp, 10, &_v); \ cp 3707 drivers/md/md.c int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale) cp 3711 drivers/md/md.c while (isdigit(*cp) || (*cp == '.' && decimals < 0)) { cp 3712 drivers/md/md.c if (*cp == '.') cp 3716 drivers/md/md.c value = *cp - '0'; cp 3721 drivers/md/md.c cp++; cp 3723 drivers/md/md.c if (*cp == '\n') cp 3724 drivers/md/md.c cp++; cp 3725 drivers/md/md.c if (*cp) cp 721 drivers/md/md.h extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale); cp 1314 drivers/md/raid5-cache.c static void r5l_write_super(struct r5l_log *log, sector_t cp); cp 2522 drivers/md/raid5-cache.c static void r5l_write_super(struct r5l_log *log, sector_t cp) cp 2526 drivers/md/raid5-cache.c log->rdev->journal_tail = cp; cp 2963 drivers/md/raid5-cache.c sector_t cp = log->rdev->journal_tail; cp 2969 drivers/md/raid5-cache.c if (cp >= rdev->sectors || round_down(cp, BLOCK_SECTORS) != cp) cp 2970 drivers/md/raid5-cache.c cp = 0; cp 2975 drivers/md/raid5-cache.c if (!sync_page_io(rdev, cp, PAGE_SIZE, page, REQ_OP_READ, 0, false)) { cp 2993 drivers/md/raid5-cache.c if (le64_to_cpu(mb->position) != cp) { cp 3000 drivers/md/raid5-cache.c cp = 0; cp 3001 drivers/md/raid5-cache.c r5l_log_write_empty_meta_block(log, cp, log->last_cp_seq); cp 3007 drivers/md/raid5-cache.c r5l_write_super(log, cp); cp 3015 drivers/md/raid5-cache.c log->last_checkpoint = cp; cp 3020 drivers/md/raid5-cache.c log->log_start = r5l_ring_add(log, cp, BLOCK_SECTORS); cp 3022 drivers/md/raid5-cache.c log->next_checkpoint = cp; cp 808 drivers/media/dvb-frontends/stv0910.c u32 cp = 7; cp 812 drivers/media/dvb-frontends/stv0910.c cp = 7; cp 814 drivers/media/dvb-frontends/stv0910.c cp = 8; cp 816 drivers/media/dvb-frontends/stv0910.c cp = 9; cp 818 drivers/media/dvb-frontends/stv0910.c cp = 10; cp 820 drivers/media/dvb-frontends/stv0910.c cp = 11; cp 822 drivers/media/dvb-frontends/stv0910.c cp = 12; cp 824 drivers/media/dvb-frontends/stv0910.c cp = 13; cp 826 drivers/media/dvb-frontends/stv0910.c cp = 14; cp 828 drivers/media/dvb-frontends/stv0910.c cp = 15; cp 830 drivers/media/dvb-frontends/stv0910.c cp = 16; cp 832 drivers/media/dvb-frontends/stv0910.c cp = 17; cp 834 drivers/media/dvb-frontends/stv0910.c cp = 18; cp 836 drivers/media/dvb-frontends/stv0910.c cp = 19; cp 838 drivers/media/dvb-frontends/stv0910.c cp = 20; cp 840 drivers/media/dvb-frontends/stv0910.c cp = 21; cp 842 drivers/media/dvb-frontends/stv0910.c cp = 22; cp 844 drivers/media/dvb-frontends/stv0910.c cp = 23; cp 846 drivers/media/dvb-frontends/stv0910.c cp = 24; cp 848 drivers/media/dvb-frontends/stv0910.c cp = 25; cp 850 drivers/media/dvb-frontends/stv0910.c cp = 26; cp 852 drivers/media/dvb-frontends/stv0910.c cp = 27; cp 854 drivers/media/dvb-frontends/stv0910.c write_reg(state, RSTV0910_NCOARSE, (cp << 3) | idf); cp 3383 drivers/media/i2c/adv7842.c struct i2c_client *cp; cp 3392 drivers/media/i2c/adv7842.c cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1); cp 3393 drivers/media/i2c/adv7842.c if (IS_ERR(cp)) { cp 3395 drivers/media/i2c/adv7842.c desc, addr, PTR_ERR(cp)); cp 3396 drivers/media/i2c/adv7842.c cp = NULL; cp 3399 drivers/media/i2c/adv7842.c return cp; cp 147 drivers/media/pci/bt8xx/dvb-bt8xx.c unsigned char cp = 0; cp 155 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xb4; cp 157 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xbc; cp 159 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xf4; cp 171 drivers/media/pci/bt8xx/dvb-bt8xx.c pllbuf[3] = cp; cp 342 drivers/media/pci/bt8xx/dvb-bt8xx.c unsigned char cp = 0; cp 349 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xB4; cp 351 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xBC; cp 353 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xB4; cp 355 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xBC; cp 357 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xF4; cp 359 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xFC; cp 361 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xBC; cp 363 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xF4; cp 365 drivers/media/pci/bt8xx/dvb-bt8xx.c cp = 0xFC; cp 385 drivers/media/pci/bt8xx/dvb-bt8xx.c pllbuf[3] = cp; cp 277 drivers/media/pci/saa7134/saa7134-dvb.c u8 band, cp, filter; cp 284 drivers/media/pci/saa7134/saa7134-dvb.c cp = 3; cp 286 drivers/media/pci/saa7134/saa7134-dvb.c cp = 5; cp 288 drivers/media/pci/saa7134/saa7134-dvb.c cp = 6; cp 290 drivers/media/pci/saa7134/saa7134-dvb.c cp = 3; cp 292 drivers/media/pci/saa7134/saa7134-dvb.c cp = 5; cp 294 drivers/media/pci/saa7134/saa7134-dvb.c cp = 6; cp 296 drivers/media/pci/saa7134/saa7134-dvb.c cp = 3; cp 298 drivers/media/pci/saa7134/saa7134-dvb.c cp = 5; cp 300 drivers/media/pci/saa7134/saa7134-dvb.c cp = 7; cp 343 drivers/media/pci/saa7134/saa7134-dvb.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 1020 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct v4l2_captureparm *cp = &sp->parm.capture; cp 1022 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->capability = V4L2_CAP_TIMEPERFRAME; cp 1023 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->timeperframe.numerator = solo_enc->interval; cp 1024 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->timeperframe.denominator = solo_enc->solo_dev->fps; cp 1025 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->capturemode = 0; cp 1027 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->readbuffers = 2; cp 692 drivers/media/pci/ttpci/budget-av.c u8 band, cp, filter; cp 699 drivers/media/pci/ttpci/budget-av.c cp = 3; cp 701 drivers/media/pci/ttpci/budget-av.c cp = 5; cp 703 drivers/media/pci/ttpci/budget-av.c cp = 6; cp 705 drivers/media/pci/ttpci/budget-av.c cp = 3; cp 707 drivers/media/pci/ttpci/budget-av.c cp = 5; cp 709 drivers/media/pci/ttpci/budget-av.c cp = 6; cp 711 drivers/media/pci/ttpci/budget-av.c cp = 3; cp 713 drivers/media/pci/ttpci/budget-av.c cp = 5; cp 715 drivers/media/pci/ttpci/budget-av.c cp = 7; cp 757 drivers/media/pci/ttpci/budget-av.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 735 drivers/media/pci/ttpci/budget-ci.c u8 band, cp, filter; cp 742 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 744 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 746 drivers/media/pci/ttpci/budget-ci.c cp = 6; cp 748 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 750 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 752 drivers/media/pci/ttpci/budget-ci.c cp = 6; cp 754 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 756 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 758 drivers/media/pci/ttpci/budget-ci.c cp = 7; cp 803 drivers/media/pci/ttpci/budget-ci.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 854 drivers/media/pci/ttpci/budget-ci.c u8 band, cp, filter; cp 861 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 864 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 867 drivers/media/pci/ttpci/budget-ci.c cp = 6; cp 870 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 873 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 876 drivers/media/pci/ttpci/budget-ci.c cp = 6; cp 879 drivers/media/pci/ttpci/budget-ci.c cp = 3; cp 882 drivers/media/pci/ttpci/budget-ci.c cp = 5; cp 885 drivers/media/pci/ttpci/budget-ci.c cp = 7; cp 900 drivers/media/pci/ttpci/budget-ci.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 782 drivers/media/pci/tw5864/tw5864-video.c struct v4l2_captureparm *cp = &sp->parm.capture; cp 785 drivers/media/pci/tw5864/tw5864-video.c cp->capability = V4L2_CAP_TIMEPERFRAME; cp 787 drivers/media/pci/tw5864/tw5864-video.c ret = tw5864_frameinterval_get(input, &cp->timeperframe); cp 788 drivers/media/pci/tw5864/tw5864-video.c cp->timeperframe.numerator *= input->frame_interval; cp 789 drivers/media/pci/tw5864/tw5864-video.c cp->capturemode = 0; cp 790 drivers/media/pci/tw5864/tw5864-video.c cp->readbuffers = 2; cp 942 drivers/media/pci/tw686x/tw686x-video.c struct v4l2_captureparm *cp = &sp->parm.capture; cp 948 drivers/media/pci/tw686x/tw686x-video.c cp->capability = V4L2_CAP_TIMEPERFRAME; cp 949 drivers/media/pci/tw686x/tw686x-video.c cp->timeperframe.numerator = 1; cp 950 drivers/media/pci/tw686x/tw686x-video.c cp->timeperframe.denominator = vc->fps; cp 958 drivers/media/pci/tw686x/tw686x-video.c struct v4l2_captureparm *cp = &sp->parm.capture; cp 959 drivers/media/pci/tw686x/tw686x-video.c unsigned int denominator = cp->timeperframe.denominator; cp 960 drivers/media/pci/tw686x/tw686x-video.c unsigned int numerator = cp->timeperframe.numerator; cp 1305 drivers/media/platform/exynos4-is/media-dev.c struct cam_clk_provider *cp = &fmd->clk_provider; cp 1308 drivers/media/platform/exynos4-is/media-dev.c if (cp->of_node) cp 1309 drivers/media/platform/exynos4-is/media-dev.c of_clk_del_provider(cp->of_node); cp 1311 drivers/media/platform/exynos4-is/media-dev.c for (i = 0; i < cp->num_clocks; i++) cp 1312 drivers/media/platform/exynos4-is/media-dev.c clk_unregister(cp->clks[i]); cp 1317 drivers/media/platform/exynos4-is/media-dev.c struct cam_clk_provider *cp = &fmd->clk_provider; cp 1322 drivers/media/platform/exynos4-is/media-dev.c struct cam_clk *camclk = &cp->camclk[i]; cp 1341 drivers/media/platform/exynos4-is/media-dev.c cp->clks[i] = clk_register(NULL, &camclk->hw); cp 1342 drivers/media/platform/exynos4-is/media-dev.c if (IS_ERR(cp->clks[i])) { cp 1344 drivers/media/platform/exynos4-is/media-dev.c init.name, PTR_ERR(cp->clks[i])); cp 1345 drivers/media/platform/exynos4-is/media-dev.c ret = PTR_ERR(cp->clks[i]); cp 1348 drivers/media/platform/exynos4-is/media-dev.c cp->num_clocks++; cp 1351 drivers/media/platform/exynos4-is/media-dev.c if (cp->num_clocks == 0) { cp 1356 drivers/media/platform/exynos4-is/media-dev.c cp->clk_data.clks = cp->clks; cp 1357 drivers/media/platform/exynos4-is/media-dev.c cp->clk_data.clk_num = cp->num_clocks; cp 1358 drivers/media/platform/exynos4-is/media-dev.c cp->of_node = dev->of_node; cp 1360 drivers/media/platform/exynos4-is/media-dev.c &cp->clk_data); cp 68 drivers/media/platform/ti-vpe/sc.c const u16 *cp; cp 88 drivers/media/platform/ti-vpe/sc.c cp = scaler_hs_coeffs[idx]; cp 92 drivers/media/platform/ti-vpe/sc.c *coeff_h++ = *cp++; cp 117 drivers/media/platform/ti-vpe/sc.c const u16 *cp; cp 130 drivers/media/platform/ti-vpe/sc.c cp = scaler_vs_coeffs[idx]; cp 134 drivers/media/platform/ti-vpe/sc.c *coeff_v++ = *cp++; cp 654 drivers/media/platform/ti-vpe/vpe.c const unsigned short *cp, *end_cp; cp 656 drivers/media/platform/ti-vpe/vpe.c cp = &us_coeffs[0].anchor_fid0_c0; cp 659 drivers/media/platform/ti-vpe/vpe.c cp += sizeof(us_coeffs[0]) / sizeof(*cp); cp 661 drivers/media/platform/ti-vpe/vpe.c end_cp = cp + sizeof(us_coeffs[0]) / sizeof(*cp); cp 663 drivers/media/platform/ti-vpe/vpe.c while (cp < end_cp) { cp 664 drivers/media/platform/ti-vpe/vpe.c write_field(us1_reg, *cp++, VPE_US_C0_MASK, VPE_US_C0_SHIFT); cp 665 drivers/media/platform/ti-vpe/vpe.c write_field(us1_reg, *cp++, VPE_US_C1_MASK, VPE_US_C1_SHIFT); cp 86 drivers/media/tuners/tda827x.c u8 cp; cp 92 drivers/media/tuners/tda827x.c { .lomax = 62000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, cp 93 drivers/media/tuners/tda827x.c { .lomax = 66000000, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 1}, cp 94 drivers/media/tuners/tda827x.c { .lomax = 76000000, .spd = 3, .bs = 1, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, cp 95 drivers/media/tuners/tda827x.c { .lomax = 84000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 3, .div1p5 = 0}, cp 96 drivers/media/tuners/tda827x.c { .lomax = 93000000, .spd = 3, .bs = 2, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 97 drivers/media/tuners/tda827x.c { .lomax = 98000000, .spd = 3, .bs = 3, .bp = 0, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 98 drivers/media/tuners/tda827x.c { .lomax = 109000000, .spd = 3, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 99 drivers/media/tuners/tda827x.c { .lomax = 123000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 100 drivers/media/tuners/tda827x.c { .lomax = 133000000, .spd = 2, .bs = 3, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 101 drivers/media/tuners/tda827x.c { .lomax = 151000000, .spd = 2, .bs = 1, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 102 drivers/media/tuners/tda827x.c { .lomax = 154000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 103 drivers/media/tuners/tda827x.c { .lomax = 181000000, .spd = 2, .bs = 2, .bp = 1, .cp = 0, .gc3 = 0, .div1p5 = 0}, cp 104 drivers/media/tuners/tda827x.c { .lomax = 185000000, .spd = 2, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 105 drivers/media/tuners/tda827x.c { .lomax = 217000000, .spd = 2, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 106 drivers/media/tuners/tda827x.c { .lomax = 244000000, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 107 drivers/media/tuners/tda827x.c { .lomax = 265000000, .spd = 1, .bs = 3, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 108 drivers/media/tuners/tda827x.c { .lomax = 302000000, .spd = 1, .bs = 1, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 109 drivers/media/tuners/tda827x.c { .lomax = 324000000, .spd = 1, .bs = 2, .bp = 2, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 110 drivers/media/tuners/tda827x.c { .lomax = 370000000, .spd = 1, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 111 drivers/media/tuners/tda827x.c { .lomax = 454000000, .spd = 1, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 112 drivers/media/tuners/tda827x.c { .lomax = 493000000, .spd = 0, .bs = 2, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 113 drivers/media/tuners/tda827x.c { .lomax = 530000000, .spd = 0, .bs = 3, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 1}, cp 114 drivers/media/tuners/tda827x.c { .lomax = 554000000, .spd = 0, .bs = 1, .bp = 3, .cp = 0, .gc3 = 1, .div1p5 = 0}, cp 115 drivers/media/tuners/tda827x.c { .lomax = 604000000, .spd = 0, .bs = 1, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, cp 116 drivers/media/tuners/tda827x.c { .lomax = 696000000, .spd = 0, .bs = 2, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, cp 117 drivers/media/tuners/tda827x.c { .lomax = 740000000, .spd = 0, .bs = 2, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, cp 118 drivers/media/tuners/tda827x.c { .lomax = 820000000, .spd = 0, .bs = 3, .bp = 4, .cp = 0, .gc3 = 0, .div1p5 = 0}, cp 119 drivers/media/tuners/tda827x.c { .lomax = 865000000, .spd = 0, .bs = 3, .bp = 4, .cp = 1, .gc3 = 0, .div1p5 = 0}, cp 120 drivers/media/tuners/tda827x.c { .lomax = 0, .spd = 0, .bs = 0, .bp = 0, .cp = 0, .gc3 = 0, .div1p5 = 0} cp 201 drivers/media/tuners/tda827x.c buf[1] = 0x50 + tda827x_table[i].cp; cp 305 drivers/media/tuners/tda827x.c reg2[1] = (tuner_reg[4] & 0xfc) + tda827x_table[i].cp; cp 43 drivers/media/usb/au0828/au0828-core.c u16 index, unsigned char *cp, u16 size); cp 93 drivers/media/usb/au0828/au0828-core.c u16 index, unsigned char *cp, u16 size) cp 114 drivers/media/usb/au0828/au0828-core.c memcpy(cp, dev->ctrlmsg, size); cp 88 drivers/media/usb/cx231xx/cx231xx-audio.c unsigned char *cp; cp 122 drivers/media/usb/cx231xx/cx231xx-audio.c cp = (unsigned char *)urb->transfer_buffer + cp 133 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 135 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area, cp + cnt * stride, cp 138 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 179 drivers/media/usb/cx231xx/cx231xx-audio.c unsigned char *cp; cp 213 drivers/media/usb/cx231xx/cx231xx-audio.c cp = (unsigned char *)urb->transfer_buffer; cp 220 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 222 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area, cp + cnt * stride, cp 225 drivers/media/usb/cx231xx/cx231xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 85 drivers/media/usb/em28xx/em28xx-audio.c unsigned char *cp; cp 122 drivers/media/usb/em28xx/em28xx-audio.c cp = (unsigned char *)urb->transfer_buffer + cp 132 drivers/media/usb/em28xx/em28xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 134 drivers/media/usb/em28xx/em28xx-audio.c memcpy(runtime->dma_area, cp + cnt * stride, cp 137 drivers/media/usb/em28xx/em28xx-audio.c memcpy(runtime->dma_area + oldptr * stride, cp, cp 1538 drivers/media/usb/gspca/ov534.c struct v4l2_captureparm *cp = &parm->parm.capture; cp 1539 drivers/media/usb/gspca/ov534.c struct v4l2_fract *tpf = &cp->timeperframe; cp 1550 drivers/media/usb/gspca/ov534.c struct v4l2_captureparm *cp = &parm->parm.capture; cp 1551 drivers/media/usb/gspca/ov534.c struct v4l2_fract *tpf = &cp->timeperframe; cp 170 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c int cp; cp 182 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c cp = hdcs->exp.cto + (hdcs->w * ct / 2); cp 185 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c rp = hdcs->exp.rs + cp; cp 201 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c srowexp = cp - hdcs->exp.er - 6 - cycles; cp 204 drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c max_srowexp = cp - mnct * ct - 1; cp 4767 drivers/media/usb/gspca/topro.c struct v4l2_captureparm *cp = &parm->parm.capture; cp 4768 drivers/media/usb/gspca/topro.c struct v4l2_fract *tpf = &cp->timeperframe; cp 4789 drivers/media/usb/gspca/topro.c struct v4l2_captureparm *cp = &parm->parm.capture; cp 4790 drivers/media/usb/gspca/topro.c struct v4l2_fract *tpf = &cp->timeperframe; cp 237 drivers/media/usb/pvrusb2/pvrusb2-context.c struct pvr2_channel *cp; cp 241 drivers/media/usb/pvrusb2/pvrusb2-context.c for (cp = mp->mc_first; cp; cp = cp->mc_next) { cp 242 drivers/media/usb/pvrusb2/pvrusb2-context.c if (!cp->input_mask) continue; cp 243 drivers/media/usb/pvrusb2/pvrusb2-context.c tmsk &= cp->input_mask; cp 275 drivers/media/usb/pvrusb2/pvrusb2-context.c void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) cp 278 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->hdw = mp->hdw; cp 279 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->mc_head = mp; cp 280 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->mc_next = NULL; cp 281 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->mc_prev = mp->mc_last; cp 283 drivers/media/usb/pvrusb2/pvrusb2-context.c mp->mc_last->mc_next = cp; cp 285 drivers/media/usb/pvrusb2/pvrusb2-context.c mp->mc_first = cp; cp 287 drivers/media/usb/pvrusb2/pvrusb2-context.c mp->mc_last = cp; cp 292 drivers/media/usb/pvrusb2/pvrusb2-context.c static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) cp 294 drivers/media/usb/pvrusb2/pvrusb2-context.c if (!cp->stream) return; cp 295 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_stream_kill(cp->stream->stream); cp 296 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->stream->user = NULL; cp 297 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->stream = NULL; cp 301 drivers/media/usb/pvrusb2/pvrusb2-context.c void pvr2_channel_done(struct pvr2_channel *cp) cp 303 drivers/media/usb/pvrusb2/pvrusb2-context.c struct pvr2_context *mp = cp->mc_head; cp 305 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->input_mask = 0; cp 306 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_channel_disclaim_stream(cp); cp 308 drivers/media/usb/pvrusb2/pvrusb2-context.c if (cp->mc_next) { cp 309 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->mc_next->mc_prev = cp->mc_prev; cp 311 drivers/media/usb/pvrusb2/pvrusb2-context.c mp->mc_last = cp->mc_prev; cp 313 drivers/media/usb/pvrusb2/pvrusb2-context.c if (cp->mc_prev) { cp 314 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->mc_prev->mc_next = cp->mc_next; cp 316 drivers/media/usb/pvrusb2/pvrusb2-context.c mp->mc_first = cp->mc_next; cp 318 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->hdw = NULL; cp 323 drivers/media/usb/pvrusb2/pvrusb2-context.c int pvr2_channel_limit_inputs(struct pvr2_channel *cp,unsigned int cmsk) cp 328 drivers/media/usb/pvrusb2/pvrusb2-context.c struct pvr2_hdw *hdw = cp->hdw; cp 332 drivers/media/usb/pvrusb2/pvrusb2-context.c if (cmsk == cp->input_mask) { cp 337 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_context_enter(cp->mc_head); cp 340 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->input_mask = 0; cp 341 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_context_reset_input_limits(cp->mc_head); cp 345 drivers/media/usb/pvrusb2/pvrusb2-context.c for (p2 = cp->mc_head->mc_first; p2; p2 = p2->mc_next) { cp 346 drivers/media/usb/pvrusb2/pvrusb2-context.c if (p2 == cp) continue; cp 360 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->input_mask = cmsk; cp 363 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_context_exit(cp->mc_head); cp 368 drivers/media/usb/pvrusb2/pvrusb2-context.c unsigned int pvr2_channel_get_limited_inputs(struct pvr2_channel *cp) cp 370 drivers/media/usb/pvrusb2/pvrusb2-context.c return cp->input_mask; cp 374 drivers/media/usb/pvrusb2/pvrusb2-context.c int pvr2_channel_claim_stream(struct pvr2_channel *cp, cp 378 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_context_enter(cp->mc_head); do { cp 379 drivers/media/usb/pvrusb2/pvrusb2-context.c if (sp == cp->stream) break; cp 384 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_channel_disclaim_stream(cp); cp 386 drivers/media/usb/pvrusb2/pvrusb2-context.c sp->user = cp; cp 387 drivers/media/usb/pvrusb2/pvrusb2-context.c cp->stream = sp; cp 389 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_context_exit(cp->mc_head); cp 402 drivers/media/usb/pvrusb2/pvrusb2-context.c struct pvr2_ioread *cp; cp 403 drivers/media/usb/pvrusb2/pvrusb2-context.c cp = pvr2_ioread_create(); cp 404 drivers/media/usb/pvrusb2/pvrusb2-context.c if (!cp) return NULL; cp 405 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_ioread_setup(cp,sp->stream); cp 406 drivers/media/usb/pvrusb2/pvrusb2-context.c pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); cp 407 drivers/media/usb/pvrusb2/pvrusb2-context.c return cp; cp 39 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static int pvr2_ioread_init(struct pvr2_ioread *cp) cp 43 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream = NULL; cp 44 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_init(&cp->mutex); cp 47 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->buffer_storage[idx] = kmalloc(BUFFER_SIZE,GFP_KERNEL); cp 48 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->buffer_storage[idx])) break; cp 54 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->buffer_storage[idx])) continue; cp 55 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp->buffer_storage[idx]); cp 62 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static void pvr2_ioread_done(struct pvr2_ioread *cp) cp 66 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_setup(cp,NULL); cp 68 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->buffer_storage[idx])) continue; cp 69 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp->buffer_storage[idx]); cp 75 drivers/media/usb/pvrusb2/pvrusb2-ioread.c struct pvr2_ioread *cp; cp 76 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp = kzalloc(sizeof(*cp),GFP_KERNEL); cp 77 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp) return NULL; cp 78 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); cp 79 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (pvr2_ioread_init(cp) < 0) { cp 80 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp); cp 83 drivers/media/usb/pvrusb2/pvrusb2-ioread.c return cp; cp 86 drivers/media/usb/pvrusb2/pvrusb2-ioread.c void pvr2_ioread_destroy(struct pvr2_ioread *cp) cp 88 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp) return; cp 89 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_done(cp); cp 90 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); cp 91 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_key_ptr) { cp 92 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp->sync_key_ptr); cp 93 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_ptr = NULL; cp 95 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp); cp 98 drivers/media/usb/pvrusb2/pvrusb2-ioread.c void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp, cp 102 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp) return; cp 105 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if ((sync_key_len == cp->sync_key_len) && cp 107 drivers/media/usb/pvrusb2/pvrusb2-ioread.c (!memcmp(sync_key_ptr,cp->sync_key_ptr,sync_key_len)))) return; cp 109 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (sync_key_len != cp->sync_key_len) { cp 110 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_key_ptr) { cp 111 drivers/media/usb/pvrusb2/pvrusb2-ioread.c kfree(cp->sync_key_ptr); cp 112 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_ptr = NULL; cp 114 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_len = 0; cp 116 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_ptr = kmalloc(sync_key_len,GFP_KERNEL); cp 117 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_key_ptr) { cp 118 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_len = sync_key_len; cp 122 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp->sync_key_len) return; cp 123 drivers/media/usb/pvrusb2/pvrusb2-ioread.c memcpy(cp->sync_key_ptr,sync_key_ptr,cp->sync_key_len); cp 126 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static void pvr2_ioread_stop(struct pvr2_ioread *cp) cp 128 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->enabled)) return; cp 130 drivers/media/usb/pvrusb2/pvrusb2-ioread.c "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); cp 131 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_stream_kill(cp->stream); cp 132 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_buf = NULL; cp 133 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_ptr = NULL; cp 134 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_len = 0; cp 135 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs = 0; cp 136 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->enabled = 0; cp 137 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream_running = 0; cp 138 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->spigot_open = 0; cp 139 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state) { cp 142 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_state = 0; cp 146 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static int pvr2_ioread_start(struct pvr2_ioread *cp) cp 150 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->enabled) return 0; cp 151 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->stream)) return 0; cp 153 drivers/media/usb/pvrusb2/pvrusb2-ioread.c "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp); cp 154 drivers/media/usb/pvrusb2/pvrusb2-ioread.c while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != NULL) { cp 159 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp,stat); cp 160 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_stop(cp); cp 164 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->enabled = !0; cp 165 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_buf = NULL; cp 166 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_ptr = NULL; cp 167 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_len = 0; cp 168 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs = 0; cp 169 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream_running = 0; cp 170 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_key_len) { cp 173 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_state = 1; cp 174 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_trashed_count = 0; cp 175 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_buf_offs = 0; cp 177 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->spigot_open = 0; cp 181 drivers/media/usb/pvrusb2/pvrusb2-ioread.c struct pvr2_stream *pvr2_ioread_get_stream(struct pvr2_ioread *cp) cp 183 drivers/media/usb/pvrusb2/pvrusb2-ioread.c return cp->stream; cp 186 drivers/media/usb/pvrusb2/pvrusb2-ioread.c int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) cp 192 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_lock(&cp->mutex); cp 194 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->stream) { cp 197 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp); cp 198 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_stop(cp); cp 199 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_stream_kill(cp->stream); cp 200 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (pvr2_stream_get_buffer_count(cp->stream)) { cp 201 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_stream_set_buffer_count(cp->stream,0); cp 203 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream = NULL; cp 208 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp); cp 212 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_unlock(&cp->mutex); cp 218 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->buffer_storage[idx], cp 221 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream = sp; cp 224 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_unlock(&cp->mutex); cp 229 drivers/media/usb/pvrusb2/pvrusb2-ioread.c int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl) cp 232 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if ((!fl) == (!(cp->enabled))) return ret; cp 234 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_lock(&cp->mutex); cp 237 drivers/media/usb/pvrusb2/pvrusb2-ioread.c ret = pvr2_ioread_start(cp); cp 239 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_stop(cp); cp 242 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_unlock(&cp->mutex); cp 246 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) cp 250 drivers/media/usb/pvrusb2/pvrusb2-ioread.c while (cp->c_data_len <= cp->c_data_offs) { cp 251 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->c_buf) { cp 253 drivers/media/usb/pvrusb2/pvrusb2-ioread.c stat = pvr2_buffer_queue(cp->c_buf); cp 258 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp,stat); cp 259 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_stop(cp); cp 262 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_buf = NULL; cp 263 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_ptr = NULL; cp 264 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_len = 0; cp 265 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs = 0; cp 268 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_buf = pvr2_stream_get_ready_buffer(cp->stream); cp 269 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp->c_buf) break; // Nothing ready; done. cp 270 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_len = pvr2_buffer_get_count(cp->c_buf); cp 271 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp->c_data_len) { cp 273 drivers/media/usb/pvrusb2/pvrusb2-ioread.c stat = pvr2_buffer_get_status(cp->c_buf); cp 278 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp,stat); cp 279 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_stop(cp); cp 286 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs = 0; cp 287 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_ptr = cp->buffer_storage[ cp 288 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_buffer_get_id(cp->c_buf)]; cp 293 drivers/media/usb/pvrusb2/pvrusb2-ioread.c static void pvr2_ioread_filter(struct pvr2_ioread *cp) cp 296 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp->enabled) return; cp 297 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state != 1) return; cp 302 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_lock(&cp->mutex); cp 305 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!pvr2_ioread_get_buffer(cp)) break; cp 306 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!cp->c_data_len) break; cp 310 drivers/media/usb/pvrusb2/pvrusb2-ioread.c for (idx = cp->c_data_offs; idx < cp->c_data_len; idx++) { cp 311 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_buf_offs >= cp->sync_key_len) break; cp 312 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->c_data_ptr[idx] == cp 313 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_key_ptr[cp->sync_buf_offs]) { cp 315 drivers/media/usb/pvrusb2/pvrusb2-ioread.c (cp->sync_buf_offs)++; cp 318 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_buf_offs = 0; cp 323 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs += idx; cp 324 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_trashed_count += idx; cp 327 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_buf_offs >= cp->sync_key_len) { cp 328 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_trashed_count -= cp->sync_key_len; cp 331 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_trashed_count); cp 332 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_state = 2; cp 333 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_buf_offs = 0; cp 337 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->c_data_offs < cp->c_data_len) { cp 341 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_len,cp->c_data_offs); cp 349 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_unlock(&cp->mutex); cp 352 drivers/media/usb/pvrusb2/pvrusb2-ioread.c int pvr2_ioread_avail(struct pvr2_ioread *cp) cp 355 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!(cp->enabled)) { cp 360 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state == 1) { cp 361 drivers/media/usb/pvrusb2/pvrusb2-ioread.c pvr2_ioread_filter(cp); cp 362 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state == 1) return -EAGAIN; cp 366 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->stream_running) { cp 367 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!pvr2_stream_get_ready_count(cp->stream)) { cp 372 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (pvr2_stream_get_ready_count(cp->stream) < BUFFER_COUNT/2) { cp 378 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if ((!(cp->spigot_open)) != (!(ret == 0))) { cp 379 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->spigot_open = (ret == 0); cp 382 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->spigot_open ? "available" : "pending"); cp 388 drivers/media/usb/pvrusb2/pvrusb2-ioread.c int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) cp 400 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp); cp 404 drivers/media/usb/pvrusb2/pvrusb2-ioread.c stat = pvr2_ioread_avail(cp); cp 407 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->stream_running = !0; cp 409 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_lock(&cp->mutex); cp 416 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (!pvr2_ioread_get_buffer(cp)) { cp 423 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state == 2) { cp 426 drivers/media/usb/pvrusb2/pvrusb2-ioread.c src = cp->sync_key_ptr + cp->sync_buf_offs; cp 427 drivers/media/usb/pvrusb2/pvrusb2-ioread.c bcnt = cp->sync_key_len - cp->sync_buf_offs; cp 430 drivers/media/usb/pvrusb2/pvrusb2-ioread.c src = cp->c_data_ptr + cp->c_data_offs; cp 431 drivers/media/usb/pvrusb2/pvrusb2-ioread.c bcnt = cp->c_data_len - cp->c_data_offs; cp 450 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_state == 2) { cp 453 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_buf_offs += bcnt; cp 454 drivers/media/usb/pvrusb2/pvrusb2-ioread.c if (cp->sync_buf_offs >= cp->sync_key_len) { cp 459 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->sync_state = 0; cp 463 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp->c_data_offs += bcnt; cp 468 drivers/media/usb/pvrusb2/pvrusb2-ioread.c mutex_unlock(&cp->mutex); cp 483 drivers/media/usb/pvrusb2/pvrusb2-ioread.c cp,req_cnt,ret); cp 1069 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 band, cp, filter; cp 1074 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 130000000) cp = 3; cp 1075 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 160000000) cp = 5; cp 1076 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 200000000) cp = 6; cp 1077 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 290000000) cp = 3; cp 1078 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 420000000) cp = 5; cp 1079 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 480000000) cp = 6; cp 1080 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 620000000) cp = 3; cp 1081 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 830000000) cp = 5; cp 1082 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 895000000) cp = 7; cp 1125 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 1396 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c u8 band, cp, filter; cp 1401 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 130000000) {cp = 3; band = 1;} cp 1402 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 160000000) {cp = 5; band = 1;} cp 1403 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 200000000) {cp = 6; band = 1;} cp 1404 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 290000000) {cp = 3; band = 2;} cp 1405 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 420000000) {cp = 5; band = 2;} cp 1406 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 480000000) {cp = 6; band = 2;} cp 1407 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 620000000) {cp = 3; band = 4;} cp 1408 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 830000000) {cp = 5; band = 4;} cp 1409 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c else if (tuner_frequency < 895000000) {cp = 7; band = 4;} cp 1423 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c tuner_buf[3] = (cp << 5) | (filter << 3) | band; cp 196 drivers/media/usb/zr364xx/zr364xx.c u16 index, unsigned char *cp, u16 size) cp 200 drivers/media/usb/zr364xx/zr364xx.c unsigned char *transfer_buffer = kmemdup(cp, size, GFP_KERNEL); cp 425 drivers/memstick/core/ms_block.c if (msb->regs.param.cp == MEMSTICK_CP_EXTRA) { cp 794 drivers/memstick/core/ms_block.c msb->regs.param.cp = MEMSTICK_CP_OVERWRITE; cp 832 drivers/memstick/core/ms_block.c msb->regs.param.cp = MEMSTICK_CP_BLOCK; cp 905 drivers/memstick/core/ms_block.c msb->regs.param.cp = MEMSTICK_CP_PAGE; cp 952 drivers/memstick/core/ms_block.c msb->regs.param.cp = MEMSTICK_CP_EXTRA; cp 1033 drivers/memstick/core/ms_block.c msb->regs.param.cp = MEMSTICK_CP_BLOCK; cp 103 drivers/mfd/qcom-pm8xxx.c pm8xxx_config_irq(struct pm_irq_chip *chip, unsigned int bp, unsigned int cp) cp 114 drivers/mfd/qcom-pm8xxx.c cp |= PM_IRQF_WRITE; cp 115 drivers/mfd/qcom-pm8xxx.c rc = regmap_write(chip->regmap, SSBI_REG_ADDR_IRQ_CONFIG, cp); cp 68 drivers/misc/eeprom/at25.c u8 *cp; cp 81 drivers/misc/eeprom/at25.c cp = command; cp 87 drivers/misc/eeprom/at25.c *cp++ = instr; cp 92 drivers/misc/eeprom/at25.c *cp++ = offset >> 16; cp 95 drivers/misc/eeprom/at25.c *cp++ = offset >> 8; cp 99 drivers/misc/eeprom/at25.c *cp++ = offset >> 0; cp 160 drivers/misc/eeprom/at25.c u8 *cp = bounce; cp 164 drivers/misc/eeprom/at25.c *cp = AT25_WREN; cp 165 drivers/misc/eeprom/at25.c status = spi_write(at25->spi, cp, 1); cp 175 drivers/misc/eeprom/at25.c *cp++ = instr; cp 180 drivers/misc/eeprom/at25.c *cp++ = offset >> 16; cp 183 drivers/misc/eeprom/at25.c *cp++ = offset >> 8; cp 187 drivers/misc/eeprom/at25.c *cp++ = offset >> 0; cp 194 drivers/misc/eeprom/at25.c memcpy(cp, buf, segment); cp 372 drivers/mmc/host/au1xmmc.c au1x_dma_chan_t *cp = c->chan_ptr; cp 373 drivers/mmc/host/au1xmmc.c data->bytes_xfered = cp->ddma_bytecnt; cp 186 drivers/mmc/host/mmc_spi.c u8 *cp = host->data->status; cp 198 drivers/mmc/host/mmc_spi.c if (cp[i] != byte) cp 199 drivers/mmc/host/mmc_spi.c return cp[i]; cp 251 drivers/mmc/host/mmc_spi.c u8 *cp = host->data->status; cp 252 drivers/mmc/host/mmc_spi.c u8 *end = cp + host->t.len; cp 269 drivers/mmc/host/mmc_spi.c cp += 8; cp 270 drivers/mmc/host/mmc_spi.c while (cp < end && *cp == 0xff) cp 271 drivers/mmc/host/mmc_spi.c cp++; cp 274 drivers/mmc/host/mmc_spi.c if (cp == end) { cp 275 drivers/mmc/host/mmc_spi.c cp = host->data->status; cp 276 drivers/mmc/host/mmc_spi.c end = cp+1; cp 293 drivers/mmc/host/mmc_spi.c if (*cp != 0xff) cp 302 drivers/mmc/host/mmc_spi.c if (*cp & 0x80) { cp 304 drivers/mmc/host/mmc_spi.c rotator = *cp++ << 8; cp 306 drivers/mmc/host/mmc_spi.c if (cp == end) { cp 310 drivers/mmc/host/mmc_spi.c cp = host->data->status; cp 311 drivers/mmc/host/mmc_spi.c end = cp+1; cp 313 drivers/mmc/host/mmc_spi.c rotator |= *cp++; cp 321 drivers/mmc/host/mmc_spi.c cmd->resp[0] = *cp++; cp 347 drivers/mmc/host/mmc_spi.c while (cp < end && *cp == 0) cp 348 drivers/mmc/host/mmc_spi.c cp++; cp 349 drivers/mmc/host/mmc_spi.c if (cp == end) cp 358 drivers/mmc/host/mmc_spi.c if (cp == end) { cp 362 drivers/mmc/host/mmc_spi.c cp = host->data->status; cp 363 drivers/mmc/host/mmc_spi.c end = cp+1; cp 367 drivers/mmc/host/mmc_spi.c rotator |= *cp << bitshift; cp 370 drivers/mmc/host/mmc_spi.c cmd->resp[0] |= *cp << 8; cp 381 drivers/mmc/host/mmc_spi.c if (cp == end) { cp 385 drivers/mmc/host/mmc_spi.c cp = host->data->status; cp 386 drivers/mmc/host/mmc_spi.c end = cp+1; cp 389 drivers/mmc/host/mmc_spi.c rotator |= *cp++ << bitshift; cp 393 drivers/mmc/host/mmc_spi.c cmd->resp[1] |= *cp++; cp 436 drivers/mmc/host/mmc_spi.c u8 *cp = data->status; cp 453 drivers/mmc/host/mmc_spi.c memset(cp, 0xff, sizeof(data->status)); cp 455 drivers/mmc/host/mmc_spi.c cp[1] = 0x40 | cmd->opcode; cp 456 drivers/mmc/host/mmc_spi.c put_unaligned_be32(cmd->arg, cp + 2); cp 457 drivers/mmc/host/mmc_spi.c cp[6] = crc7_be(0, cp + 1, 5) | 0x01; cp 458 drivers/mmc/host/mmc_spi.c cp += 7; cp 496 drivers/mmc/host/mmc_spi.c cp += 2; /* min(N(CR)) + status */ cp 499 drivers/mmc/host/mmc_spi.c cp += 10; /* max(N(CR)) + status + min(N(RC),N(WR)) */ cp 501 drivers/mmc/host/mmc_spi.c cp++; cp 503 drivers/mmc/host/mmc_spi.c cp += 4; cp 505 drivers/mmc/host/mmc_spi.c cp = data->status + sizeof(data->status); cp 519 drivers/mmc/host/mmc_spi.c t->len = cp - data->status; cp 823 drivers/mmc/host/mmc_spi.c u8 *cp = t->rx_buf; cp 828 drivers/mmc/host/mmc_spi.c temp = *cp; cp 829 drivers/mmc/host/mmc_spi.c *cp++ = leftover | (temp >> bitshift); cp 832 drivers/mmc/host/mmc_spi.c cp = (u8 *) &scratch->crc_val; cp 833 drivers/mmc/host/mmc_spi.c temp = *cp; cp 834 drivers/mmc/host/mmc_spi.c *cp++ = leftover | (temp >> bitshift); cp 836 drivers/mmc/host/mmc_spi.c temp = *cp; cp 837 drivers/mmc/host/mmc_spi.c *cp = leftover | (temp >> bitshift); cp 17 drivers/mtd/chips/gen_probe.c struct chip_probe *cp); cp 18 drivers/mtd/chips/gen_probe.c static int genprobe_new_chip(struct map_info *map, struct chip_probe *cp, cp 21 drivers/mtd/chips/gen_probe.c struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp) cp 27 drivers/mtd/chips/gen_probe.c cfi = genprobe_ident_chips(map, cp); cp 59 drivers/mtd/chips/gen_probe.c static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chip_probe *cp) cp 71 drivers/mtd/chips/gen_probe.c if (!genprobe_new_chip(map, cp, &cfi)) { cp 74 drivers/mtd/chips/gen_probe.c cp->name, map->name); cp 130 drivers/mtd/chips/gen_probe.c cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi); cp 165 drivers/mtd/chips/gen_probe.c static int genprobe_new_chip(struct map_info *map, struct chip_probe *cp, cp 186 drivers/mtd/chips/gen_probe.c if (cp->probe_chip(map, 0, NULL, cfi)) cp 326 drivers/mtd/devices/block2mtd.c static int ustrtoul(const char *cp, char **endp, unsigned int base) cp 328 drivers/mtd/devices/block2mtd.c unsigned long result = simple_strtoul(cp, endp, base); cp 473 drivers/net/can/slcan.c const unsigned char *cp, char *fp, int count) cp 485 drivers/net/can/slcan.c cp++; cp 488 drivers/net/can/slcan.c slcan_unesc(sl, *cp++); cp 197 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(volatile struct dbdma_cmd *cp, cp 201 drivers/net/ethernet/apple/bmac.c out_le16(&cp->command, cmd); cp 202 drivers/net/ethernet/apple/bmac.c out_le16(&cp->req_count, count); cp 203 drivers/net/ethernet/apple/bmac.c out_le32(&cp->phy_addr, addr); cp 204 drivers/net/ethernet/apple/bmac.c out_le32(&cp->cmd_dep, cmd_dep); cp 205 drivers/net/ethernet/apple/bmac.c out_le16(&cp->xfer_status, 0); cp 206 drivers/net/ethernet/apple/bmac.c out_le16(&cp->res_count, 0); cp 561 drivers/net/ethernet/apple/bmac.c bmac_construct_xmt(struct sk_buff *skb, volatile struct dbdma_cmd *cp) cp 571 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(cp, (OUTPUT_LAST | INTR_ALWAYS | WAIT_IFCLR), len, baddr, 0); cp 575 drivers/net/ethernet/apple/bmac.c bmac_construct_rxbuff(struct sk_buff *skb, volatile struct dbdma_cmd *cp) cp 579 drivers/net/ethernet/apple/bmac.c dbdma_setcmd(cp, (INPUT_LAST | INTR_ALWAYS), RX_BUFLEN, cp 679 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_cmd *cp; cp 696 drivers/net/ethernet/apple/bmac.c cp = &bp->rx_cmds[i]; cp 697 drivers/net/ethernet/apple/bmac.c stat = le16_to_cpu(cp->xfer_status); cp 698 drivers/net/ethernet/apple/bmac.c residual = le16_to_cpu(cp->res_count); cp 726 drivers/net/ethernet/apple/bmac.c cp->res_count = cpu_to_le16(0); cp 727 drivers/net/ethernet/apple/bmac.c cp->xfer_status = cpu_to_le16(0); cp 752 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_cmd *cp; cp 766 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[bp->tx_empty]; cp 767 drivers/net/ethernet/apple/bmac.c stat = le16_to_cpu(cp->xfer_status); cp 775 drivers/net/ethernet/apple/bmac.c if (cp == bus_to_virt(in_le32(&bp->tx_dma->cmdptr))) cp 1475 drivers/net/ethernet/apple/bmac.c volatile struct dbdma_cmd *cp; cp 1487 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[bp->tx_empty]; cp 1502 drivers/net/ethernet/apple/bmac.c cp = bus_to_virt(le32_to_cpu(rd->cmdptr)); cp 1504 drivers/net/ethernet/apple/bmac.c out_le16(&cp->xfer_status, 0); cp 1505 drivers/net/ethernet/apple/bmac.c out_le32(&rd->cmdptr, virt_to_bus(cp)); cp 1522 drivers/net/ethernet/apple/bmac.c cp = &bp->tx_cmds[i]; cp 1523 drivers/net/ethernet/apple/bmac.c out_le16(&cp->xfer_status, 0); cp 1524 drivers/net/ethernet/apple/bmac.c out_le16(&cp->command, OUTPUT_LAST); cp 1525 drivers/net/ethernet/apple/bmac.c out_le32(&td->cmdptr, virt_to_bus(cp)); cp 1541 drivers/net/ethernet/apple/bmac.c static void dump_dbdma(volatile struct dbdma_cmd *cp,int count) cp 1546 drivers/net/ethernet/apple/bmac.c ip = (int*)(cp+i); cp 434 drivers/net/ethernet/apple/mace.c volatile struct dbdma_cmd *cp; cp 445 drivers/net/ethernet/apple/mace.c cp = mp->rx_cmds; cp 455 drivers/net/ethernet/apple/mace.c cp->req_count = cpu_to_le16(RX_BUFLEN); cp 456 drivers/net/ethernet/apple/mace.c cp->command = cpu_to_le16(INPUT_LAST + INTR_ALWAYS); cp 457 drivers/net/ethernet/apple/mace.c cp->phy_addr = cpu_to_le32(virt_to_bus(data)); cp 458 drivers/net/ethernet/apple/mace.c cp->xfer_status = 0; cp 459 drivers/net/ethernet/apple/mace.c ++cp; cp 462 drivers/net/ethernet/apple/mace.c cp->command = cpu_to_le16(DBDMA_STOP); cp 467 drivers/net/ethernet/apple/mace.c ++cp; cp 468 drivers/net/ethernet/apple/mace.c cp->command = cpu_to_le16(DBDMA_NOP + BR_ALWAYS); cp 469 drivers/net/ethernet/apple/mace.c cp->cmd_dep = cpu_to_le32(virt_to_bus(mp->rx_cmds)); cp 477 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * N_TX_RING; cp 478 drivers/net/ethernet/apple/mace.c cp->command = cpu_to_le16(DBDMA_NOP + BR_ALWAYS); cp 479 drivers/net/ethernet/apple/mace.c cp->cmd_dep = cpu_to_le32(virt_to_bus(mp->tx_cmds)); cp 533 drivers/net/ethernet/apple/mace.c volatile struct dbdma_cmd *cp, *np; cp 558 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * fill; cp 559 drivers/net/ethernet/apple/mace.c cp->req_count = cpu_to_le16(len); cp 560 drivers/net/ethernet/apple/mace.c cp->phy_addr = cpu_to_le32(virt_to_bus(skb->data)); cp 569 drivers/net/ethernet/apple/mace.c out_le16(&cp->xfer_status, 0); cp 570 drivers/net/ethernet/apple/mace.c out_le16(&cp->command, OUTPUT_LAST); cp 663 drivers/net/ethernet/apple/mace.c volatile struct dbdma_cmd *cp; cp 724 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * i; cp 725 drivers/net/ethernet/apple/mace.c stat = le16_to_cpu(cp->xfer_status); cp 789 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * i; cp 790 drivers/net/ethernet/apple/mace.c out_le16(&cp->xfer_status, 0); cp 791 drivers/net/ethernet/apple/mace.c out_le16(&cp->command, OUTPUT_LAST); cp 810 drivers/net/ethernet/apple/mace.c volatile struct dbdma_cmd *cp; cp 822 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * mp->tx_empty; cp 831 drivers/net/ethernet/apple/mace.c cp = bus_to_virt(le32_to_cpu(rd->cmdptr)); cp 833 drivers/net/ethernet/apple/mace.c out_le16(&cp->xfer_status, 0); cp 834 drivers/net/ethernet/apple/mace.c out_le32(&rd->cmdptr, virt_to_bus(cp)); cp 852 drivers/net/ethernet/apple/mace.c cp = mp->tx_cmds + NCMDS_TX * i; cp 853 drivers/net/ethernet/apple/mace.c out_le16(&cp->xfer_status, 0); cp 854 drivers/net/ethernet/apple/mace.c out_le16(&cp->command, OUTPUT_LAST); cp 855 drivers/net/ethernet/apple/mace.c out_le32(&td->cmdptr, virt_to_bus(cp)); cp 879 drivers/net/ethernet/apple/mace.c volatile struct dbdma_cmd *cp, *np; cp 889 drivers/net/ethernet/apple/mace.c cp = mp->rx_cmds + i; cp 890 drivers/net/ethernet/apple/mace.c stat = le16_to_cpu(cp->xfer_status); cp 903 drivers/net/ethernet/apple/mace.c nb = le16_to_cpu(cp->req_count) - le16_to_cpu(cp->res_count); cp 904 drivers/net/ethernet/apple/mace.c out_le16(&cp->command, DBDMA_STOP); cp 954 drivers/net/ethernet/apple/mace.c cp = mp->rx_cmds + i; cp 963 drivers/net/ethernet/apple/mace.c cp->req_count = cpu_to_le16(RX_BUFLEN); cp 965 drivers/net/ethernet/apple/mace.c cp->phy_addr = cpu_to_le32(virt_to_bus(data)); cp 966 drivers/net/ethernet/apple/mace.c out_le16(&cp->xfer_status, 0); cp 967 drivers/net/ethernet/apple/mace.c out_le16(&cp->command, INPUT_LAST + INTR_ALWAYS); cp 356 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 361 drivers/net/ethernet/broadcom/bnx2.c cp->drv_state |= CNIC_DRV_STATE_USING_MSIX; cp 364 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].irq_flags |= CNIC_IRQ_FL_MSIX; cp 366 drivers/net/ethernet/broadcom/bnx2.c cp->drv_state &= ~CNIC_DRV_STATE_USING_MSIX; cp 370 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].irq_flags &= ~CNIC_IRQ_FL_MSIX; cp 373 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].vector = bp->irq_tbl[sb_id].vector; cp 374 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].status_blk = (void *) cp 377 drivers/net/ethernet/broadcom/bnx2.c cp->irq_arr[0].status_blk_num = sb_id; cp 378 drivers/net/ethernet/broadcom/bnx2.c cp->num_irq = 1; cp 385 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 390 drivers/net/ethernet/broadcom/bnx2.c if (cp->drv_state & CNIC_DRV_STATE_REGD) cp 399 drivers/net/ethernet/broadcom/bnx2.c cp->num_irq = 0; cp 400 drivers/net/ethernet/broadcom/bnx2.c cp->drv_state = CNIC_DRV_STATE_REGD; cp 411 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 414 drivers/net/ethernet/broadcom/bnx2.c cp->drv_state = 0; cp 425 drivers/net/ethernet/broadcom/bnx2.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 427 drivers/net/ethernet/broadcom/bnx2.c if (!cp->max_iscsi_conn) cp 430 drivers/net/ethernet/broadcom/bnx2.c cp->drv_owner = THIS_MODULE; cp 431 drivers/net/ethernet/broadcom/bnx2.c cp->chip_id = bp->chip_id; cp 432 drivers/net/ethernet/broadcom/bnx2.c cp->pdev = bp->pdev; cp 433 drivers/net/ethernet/broadcom/bnx2.c cp->io_base = bp->regview; cp 434 drivers/net/ethernet/broadcom/bnx2.c cp->drv_ctl = bnx2_drv_ctl; cp 435 drivers/net/ethernet/broadcom/bnx2.c cp->drv_register_cnic = bnx2_register_cnic; cp 436 drivers/net/ethernet/broadcom/bnx2.c cp->drv_unregister_cnic = bnx2_unregister_cnic; cp 438 drivers/net/ethernet/broadcom/bnx2.c return cp; cp 3735 drivers/net/ethernet/broadcom/bnx2.c check_mips_fw_entry(bp->mips_firmware, &mips_fw->cp) || cp 3944 drivers/net/ethernet/broadcom/bnx2.c rc = load_cpu_fw(bp, &cpu_reg_cp, &mips_fw->cp); cp 7055 drivers/net/ethernet/broadcom/bnx2.h struct bnx2_mips_fw_file_entry cp; cp 4848 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 4852 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c *wwn = HILO_U64(cp->fcoe_wwn_node_name_hi, cp 4853 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c cp->fcoe_wwn_node_name_lo); cp 4856 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c *wwn = HILO_U64(cp->fcoe_wwn_port_name_hi, cp 4857 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c cp->fcoe_wwn_port_name_lo); cp 14801 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 14806 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_client_id, cp 14807 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid, BP_FUNC(bp), cp 15025 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 15028 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_USING_MSIX; cp 15029 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].irq_flags |= CNIC_IRQ_FL_MSIX; cp 15030 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].vector = bp->msix_table[1].vector; cp 15032 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state &= ~CNIC_DRV_STATE_USING_MSIX; cp 15033 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].irq_flags &= ~CNIC_IRQ_FL_MSIX; cp 15036 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk = (void *)bp->cnic_sb.e2_sb; cp 15038 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk = (void *)bp->cnic_sb.e1x_sb; cp 15040 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk_num = bnx2x_cnic_fw_sb_id(bp); cp 15041 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[0].status_blk_num2 = bnx2x_cnic_igu_sb_id(bp); cp 15042 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[1].status_blk = bp->def_status_blk; cp 15043 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[1].status_blk_num = DEF_SB_ID; cp 15044 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->irq_arr[1].status_blk_num2 = DEF_SB_IGU_ID; cp 15046 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->num_irq = 2; cp 15051 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 15053 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_offset = FUNC_ILT_BASE(BP_FUNC(bp)) + cp 15055 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->starting_cid = bnx2x_cid_ilt_lines(bp) * ILT_PAGE_CIDS; cp 15056 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->fcoe_init_cid = BNX2X_FCOE_ETH_CID(bp); cp 15057 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid = BNX2X_ISCSI_ETH_CID(bp); cp 15060 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c BNX2X_1st_NON_L2_ETH_CID(bp), cp->starting_cid, cp->fcoe_init_cid, cp 15061 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid); cp 15064 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_NO_ISCSI_OOO; cp 15071 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 15109 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->num_irq = 0; cp 15110 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_REGD; cp 15111 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iro_arr = bp->iro_arr; cp 15126 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 15129 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state = 0; cp 15143 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c struct cnic_eth_dev *cp = &bp->cnic_eth_dev; cp 15152 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_owner = THIS_MODULE; cp 15153 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->chip_id = CHIP_ID(bp); cp 15154 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->pdev = bp->pdev; cp 15155 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->io_base = bp->regview; cp 15156 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->io_base2 = bp->doorbells; cp 15157 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->max_kwqe_pending = 8; cp 15158 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_blk_size = CDU_ILT_PAGE_SZ; cp 15159 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_offset = FUNC_ILT_BASE(BP_FUNC(bp)) + cp 15161 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_len = CNIC_ILT_LINES; cp 15162 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->starting_cid = bnx2x_cid_ilt_lines(bp) * ILT_PAGE_CIDS; cp 15163 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_submit_kwqes_16 = bnx2x_cnic_sp_queue; cp 15164 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_ctl = bnx2x_drv_ctl; cp 15165 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_get_fc_npiv_tbl = bnx2x_get_fc_npiv; cp 15166 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_register_cnic = bnx2x_register_cnic; cp 15167 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_unregister_cnic = bnx2x_unregister_cnic; cp 15168 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->fcoe_init_cid = BNX2X_FCOE_ETH_CID(bp); cp 15169 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_client_id = cp 15171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->iscsi_l2_cid = BNX2X_ISCSI_ETH_CID(bp); cp 15174 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_NO_ISCSI_OOO; cp 15177 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_NO_ISCSI; cp 15180 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->drv_state |= CNIC_DRV_STATE_NO_FCOE; cp 15184 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_blk_size, cp 15185 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_offset, cp 15186 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->ctx_tbl_len, cp 15187 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c cp->starting_cid); cp 15188 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c return cp; cp 5674 drivers/net/ethernet/broadcom/bnxt/bnxt.c u16 cp, stats; cp 5680 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = le16_to_cpu(resp->alloc_cmpl_rings); cp 5682 drivers/net/ethernet/broadcom/bnxt/bnxt.c hw_resc->resv_irqs = cp; cp 5689 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (cp < (rx + tx)) { cp 5690 drivers/net/ethernet/broadcom/bnxt/bnxt.c bnxt_trim_rings(bp, &rx, &tx, cp, false); cp 5699 drivers/net/ethernet/broadcom/bnxt/bnxt.c hw_resc->resv_cp_rings = cp; cp 5865 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp, int stat, int vnic) cp 5868 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_reserve_pf_rings(bp, tx, rx, grp, cp, stat, cp 5871 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_reserve_vf_rings(bp, tx, rx, grp, cp, stat, cp 5877 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bp->cp_nr_rings; cp 5883 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp += ulp_msix; cp 5884 drivers/net/ethernet/broadcom/bnxt/bnxt.c if ((ulp_base + ulp_msix) > cp) cp 5885 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = ulp_base + ulp_msix; cp 5887 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp; cp 5892 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp; cp 5897 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = bp->tx_nr_rings + bp->rx_nr_rings; cp 5898 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp; cp 5904 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bp->cp_nr_rings; cp 5907 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp; cp 5909 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (bnxt_nq_rings_in_use(bp) > cp + bnxt_get_ulp_msix_num(bp)) cp 5912 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp + ulp_stat; cp 5918 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bnxt_cp_rings_in_use(bp); cp 5935 drivers/net/ethernet/broadcom/bnxt/bnxt.c (hw_resc->resv_rx_rings != rx || hw_resc->resv_cp_rings != cp || cp 5949 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp = bnxt_nq_rings_in_use(bp); cp 5968 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_hwrm_reserve_rings(bp, tx, rx, grp, cp, stat, vnic); cp 5975 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = hw_resc->resv_irqs; cp 5997 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = min_t(int, cp, bp->cp_nr_rings); cp 6000 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = min_t(int, cp, stat); cp 6001 drivers/net/ethernet/broadcom/bnxt/bnxt.c rc = bnxt_trim_rings(bp, &rx_rings, &tx, cp, sh); cp 6004 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = sh ? max_t(int, tx, rx_rings) : tx + rx_rings; cp 6007 drivers/net/ethernet/broadcom/bnxt/bnxt.c bp->cp_nr_rings = cp; cp 6009 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!tx || !rx || !cp || !grp || !vnic || !stat) cp 7961 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int cp = bp->hw_resc.max_cp_rings; cp 7964 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp -= bnxt_get_ulp_msix_num(bp); cp 7966 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp; cp 7986 drivers/net/ethernet/broadcom/bnxt/bnxt.c unsigned int cp; cp 7988 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = bnxt_get_max_func_cp_rings_for_en(bp); cp 7990 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp - bp->rx_nr_rings - bp->tx_nr_rings; cp 7992 drivers/net/ethernet/broadcom/bnxt/bnxt.c return cp - bp->cp_nr_rings; cp 10348 drivers/net/ethernet/broadcom/bnxt/bnxt.c int cp, vnics, rc; cp 10370 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp = sh ? max_t(int, tx_rings_needed, rx) : tx_rings_needed + rx; cp 10371 drivers/net/ethernet/broadcom/bnxt/bnxt.c stats = cp; cp 10373 drivers/net/ethernet/broadcom/bnxt/bnxt.c cp += bnxt_get_ulp_msix_num(bp); cp 10376 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_hwrm_check_rings(bp, tx_rings_needed, rx_rings, rx, cp, cp 11494 drivers/net/ethernet/broadcom/bnxt/bnxt.c int rx, tx, cp; cp 11496 drivers/net/ethernet/broadcom/bnxt/bnxt.c _bnxt_get_max_rings(bp, &rx, &tx, &cp); cp 11499 drivers/net/ethernet/broadcom/bnxt/bnxt.c if (!rx || !tx || !cp) cp 11502 drivers/net/ethernet/broadcom/bnxt/bnxt.c return bnxt_trim_rings(bp, max_rx, max_tx, cp, shared); cp 190 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 191 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 205 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 206 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 219 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 220 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 237 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 238 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 251 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 252 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 265 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 266 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 292 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 293 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 302 drivers/net/ethernet/broadcom/cnic.c static int cnic_get_l5_cid(struct cnic_local *cp, u32 cid, u32 *l5_cid) cp 306 drivers/net/ethernet/broadcom/cnic.c if (!cp->ctx_tbl) cp 309 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->max_cid_space; i++) { cp 310 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_tbl[i].cid == cid) { cp 318 drivers/net/ethernet/broadcom/cnic.c static int cnic_send_nlmsg(struct cnic_local *cp, u32 type, cp 326 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 355 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]); cp 358 drivers/net/ethernet/broadcom/cnic.c cp->ulp_handle[CNIC_ULP_ISCSI], cp 379 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp; cp 388 drivers/net/ethernet/broadcom/cnic.c cp = dev->cnic_priv; cp 393 drivers/net/ethernet/broadcom/cnic.c if (!rcu_access_pointer(cp->ulp_ops[CNIC_ULP_L4])) { cp 397 drivers/net/ethernet/broadcom/cnic.c csk = &cp->csk_tbl[l5_cid]; cp 417 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, cp 491 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 493 drivers/net/ethernet/broadcom/cnic.c clear_bit(ULP_F_INIT, &cp->ulp_flags[ulp_type]); cp 504 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 506 drivers/net/ethernet/broadcom/cnic.c if (!test_and_set_bit(ULP_F_INIT, &cp->ulp_flags[ulp_type])) cp 533 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 535 drivers/net/ethernet/broadcom/cnic.c if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { cp 569 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 583 drivers/net/ethernet/broadcom/cnic.c if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { cp 590 drivers/net/ethernet/broadcom/cnic.c clear_bit(ULP_F_START, &cp->ulp_flags[ulp_type]); cp 591 drivers/net/ethernet/broadcom/cnic.c cp->ulp_handle[ulp_type] = ulp_ctx; cp 593 drivers/net/ethernet/broadcom/cnic.c rcu_assign_pointer(cp->ulp_ops[ulp_type], ulp_ops); cp 597 drivers/net/ethernet/broadcom/cnic.c if (!test_and_set_bit(ULP_F_START, &cp->ulp_flags[ulp_type])) cp 598 drivers/net/ethernet/broadcom/cnic.c ulp_ops->cnic_start(cp->ulp_handle[ulp_type]); cp 611 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 620 drivers/net/ethernet/broadcom/cnic.c cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); cp 623 drivers/net/ethernet/broadcom/cnic.c if (rcu_access_pointer(cp->ulp_ops[ulp_type])) { cp 624 drivers/net/ethernet/broadcom/cnic.c RCU_INIT_POINTER(cp->ulp_ops[ulp_type], NULL); cp 639 drivers/net/ethernet/broadcom/cnic.c while (test_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[ulp_type]) && cp 644 drivers/net/ethernet/broadcom/cnic.c if (test_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[ulp_type])) cp 647 drivers/net/ethernet/broadcom/cnic.c if (test_bit(ULP_F_INIT, &cp->ulp_flags[ulp_type])) cp 788 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 816 drivers/net/ethernet/broadcom/cnic.c cp->setup_pgtbl(dev, dma); cp 827 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 830 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->ctx_blks; i++) { cp 831 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr[i].ctx) { cp 832 drivers/net/ethernet/broadcom/cnic.c dma_free_coherent(&dev->pcidev->dev, cp->ctx_blk_size, cp 833 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[i].ctx, cp 834 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[i].mapping); cp 835 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[i].ctx = NULL; cp 879 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 880 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 884 drivers/net/ethernet/broadcom/cnic.c cp->udev = NULL; cp 890 drivers/net/ethernet/broadcom/cnic.c kfree(cp->ctx_arr); cp 891 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr = NULL; cp 892 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blks = 0; cp 894 drivers/net/ethernet/broadcom/cnic.c cnic_free_dma(dev, &cp->gbl_buf_info); cp 895 drivers/net/ethernet/broadcom/cnic.c cnic_free_dma(dev, &cp->kwq_info); cp 896 drivers/net/ethernet/broadcom/cnic.c cnic_free_dma(dev, &cp->kwq_16_data_info); cp 897 drivers/net/ethernet/broadcom/cnic.c cnic_free_dma(dev, &cp->kcq2.dma); cp 898 drivers/net/ethernet/broadcom/cnic.c cnic_free_dma(dev, &cp->kcq1.dma); cp 899 drivers/net/ethernet/broadcom/cnic.c kfree(cp->iscsi_tbl); cp 900 drivers/net/ethernet/broadcom/cnic.c cp->iscsi_tbl = NULL; cp 901 drivers/net/ethernet/broadcom/cnic.c kfree(cp->ctx_tbl); cp 902 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl = NULL; cp 904 drivers/net/ethernet/broadcom/cnic.c cnic_free_id_tbl(&cp->fcoe_cid_tbl); cp 905 drivers/net/ethernet/broadcom/cnic.c cnic_free_id_tbl(&cp->cid_tbl); cp 910 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 912 drivers/net/ethernet/broadcom/cnic.c if (BNX2_CHIP(cp) == BNX2_CHIP_5709) { cp 915 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blk_size = CNIC_PAGE_SIZE; cp 916 drivers/net/ethernet/broadcom/cnic.c cp->cids_per_blk = CNIC_PAGE_SIZE / 128; cp 917 drivers/net/ethernet/broadcom/cnic.c arr_size = BNX2_MAX_CID / cp->cids_per_blk * cp 919 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr = kzalloc(arr_size, GFP_KERNEL); cp 920 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr == NULL) cp 935 drivers/net/ethernet/broadcom/cnic.c for (j = lo; j < hi; j += cp->cids_per_blk, k++) cp 936 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[k].cid = j; cp 939 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blks = k; cp 940 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_blks >= (BNX2_MAX_CID / cp->cids_per_blk)) { cp 941 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blks = 0; cp 945 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->ctx_blks; i++) { cp 946 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[i].ctx = cp 949 drivers/net/ethernet/broadcom/cnic.c &cp->ctx_arr[i].mapping, cp 951 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr[i].ctx == NULL) cp 1023 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = udev->dev->cnic_priv; cp 1035 drivers/net/ethernet/broadcom/cnic.c udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size; cp 1051 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1061 drivers/net/ethernet/broadcom/cnic.c cp->udev = udev; cp 1082 drivers/net/ethernet/broadcom/cnic.c cp->udev = udev; cp 1093 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1094 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 1110 drivers/net/ethernet/broadcom/cnic.c uinfo->mem[1].addr = (unsigned long) cp->status_blk.gen & cp 1112 drivers/net/ethernet/broadcom/cnic.c if (cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) cp 1121 drivers/net/ethernet/broadcom/cnic.c uinfo->mem[1].addr = (unsigned long) cp->bnx2x_def_status_blk & cp 1123 drivers/net/ethernet/broadcom/cnic.c uinfo->mem[1].size = sizeof(*cp->bnx2x_def_status_blk); cp 1159 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1162 drivers/net/ethernet/broadcom/cnic.c ret = cnic_alloc_dma(dev, &cp->kwq_info, KWQ_PAGE_CNT, 1); cp 1165 drivers/net/ethernet/broadcom/cnic.c cp->kwq = (struct kwqe **) cp->kwq_info.pg_arr; cp 1167 drivers/net/ethernet/broadcom/cnic.c ret = cnic_alloc_kcq(dev, &cp->kcq1, true); cp 1192 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1194 drivers/net/ethernet/broadcom/cnic.c int ctx_blk_size = cp->ethdev->ctx_blk_size; cp 1197 drivers/net/ethernet/broadcom/cnic.c total_mem = BNX2X_CONTEXT_MEM_SIZE * cp->max_cid_space; cp 1202 drivers/net/ethernet/broadcom/cnic.c if (blks > cp->ethdev->ctx_tbl_len) cp 1205 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr = kcalloc(blks, sizeof(struct cnic_ctx), GFP_KERNEL); cp 1206 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr == NULL) cp 1209 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blks = blks; cp 1210 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blk_size = ctx_blk_size; cp 1212 drivers/net/ethernet/broadcom/cnic.c cp->ctx_align = 0; cp 1214 drivers/net/ethernet/broadcom/cnic.c cp->ctx_align = ctx_blk_size; cp 1216 drivers/net/ethernet/broadcom/cnic.c cp->cids_per_blk = ctx_blk_size / BNX2X_CONTEXT_MEM_SIZE; cp 1219 drivers/net/ethernet/broadcom/cnic.c cp->ctx_arr[i].ctx = cp 1220 drivers/net/ethernet/broadcom/cnic.c dma_alloc_coherent(&dev->pcidev->dev, cp->ctx_blk_size, cp 1221 drivers/net/ethernet/broadcom/cnic.c &cp->ctx_arr[i].mapping, cp 1223 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr[i].ctx == NULL) cp 1226 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_align && cp->ctx_blk_size == ctx_blk_size) { cp 1227 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr[i].mapping & (cp->ctx_align - 1)) { cp 1229 drivers/net/ethernet/broadcom/cnic.c cp->ctx_blk_size += cp->ctx_align; cp 1240 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1242 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 1245 drivers/net/ethernet/broadcom/cnic.c struct cnic_dma *kwq_16_dma = &cp->kwq_16_data_info; cp 1247 drivers/net/ethernet/broadcom/cnic.c cp->max_cid_space = MAX_ISCSI_TBL_SZ; cp 1248 drivers/net/ethernet/broadcom/cnic.c cp->iscsi_start_cid = start_cid; cp 1249 drivers/net/ethernet/broadcom/cnic.c cp->fcoe_start_cid = start_cid + MAX_ISCSI_TBL_SZ; cp 1252 drivers/net/ethernet/broadcom/cnic.c cp->max_cid_space += dev->max_fcoe_conn; cp 1253 drivers/net/ethernet/broadcom/cnic.c cp->fcoe_init_cid = ethdev->fcoe_init_cid; cp 1254 drivers/net/ethernet/broadcom/cnic.c if (!cp->fcoe_init_cid) cp 1255 drivers/net/ethernet/broadcom/cnic.c cp->fcoe_init_cid = 0x10; cp 1258 drivers/net/ethernet/broadcom/cnic.c cp->iscsi_tbl = kcalloc(MAX_ISCSI_TBL_SZ, sizeof(struct cnic_iscsi), cp 1260 drivers/net/ethernet/broadcom/cnic.c if (!cp->iscsi_tbl) cp 1263 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl = kcalloc(cp->max_cid_space, sizeof(struct cnic_context), cp 1265 drivers/net/ethernet/broadcom/cnic.c if (!cp->ctx_tbl) cp 1269 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl[i].proto.iscsi = &cp->iscsi_tbl[i]; cp 1270 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl[i].ulp_proto_id = CNIC_ULP_ISCSI; cp 1273 drivers/net/ethernet/broadcom/cnic.c for (i = MAX_ISCSI_TBL_SZ; i < cp->max_cid_space; i++) cp 1274 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl[i].ulp_proto_id = CNIC_ULP_FCOE; cp 1276 drivers/net/ethernet/broadcom/cnic.c pages = CNIC_PAGE_ALIGN(cp->max_cid_space * CNIC_KWQ16_DATA_SIZE) / cp 1284 drivers/net/ethernet/broadcom/cnic.c for (i = 0, j = 0; i < cp->max_cid_space; i++) { cp 1287 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl[i].kwqe_data = kwq_16_dma->pg_arr[j] + off; cp 1288 drivers/net/ethernet/broadcom/cnic.c cp->ctx_tbl[i].kwqe_data_mapping = kwq_16_dma->pg_map_arr[j] + cp 1295 drivers/net/ethernet/broadcom/cnic.c ret = cnic_alloc_kcq(dev, &cp->kcq1, false); cp 1300 drivers/net/ethernet/broadcom/cnic.c ret = cnic_alloc_kcq(dev, &cp->kcq2, true); cp 1306 drivers/net/ethernet/broadcom/cnic.c ret = cnic_alloc_dma(dev, &cp->gbl_buf_info, pages, 0); cp 1314 drivers/net/ethernet/broadcom/cnic.c if (cp->ethdev->drv_state & CNIC_DRV_STATE_NO_ISCSI) cp 1317 drivers/net/ethernet/broadcom/cnic.c cp->bnx2x_def_status_blk = cp->ethdev->irq_arr[1].status_blk; cp 1319 drivers/net/ethernet/broadcom/cnic.c cp->l2_rx_ring_size = 15; cp 1336 drivers/net/ethernet/broadcom/cnic.c static inline u32 cnic_kwq_avail(struct cnic_local *cp) cp 1338 drivers/net/ethernet/broadcom/cnic.c return cp->max_kwq_idx - cp 1339 drivers/net/ethernet/broadcom/cnic.c ((cp->kwq_prod_idx - cp->kwq_con_idx) & cp->max_kwq_idx); cp 1345 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1352 drivers/net/ethernet/broadcom/cnic.c spin_lock_bh(&cp->cnic_ulp_lock); cp 1353 drivers/net/ethernet/broadcom/cnic.c if (num_wqes > cnic_kwq_avail(cp) && cp 1354 drivers/net/ethernet/broadcom/cnic.c !test_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags)) { cp 1355 drivers/net/ethernet/broadcom/cnic.c spin_unlock_bh(&cp->cnic_ulp_lock); cp 1359 drivers/net/ethernet/broadcom/cnic.c clear_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags); cp 1361 drivers/net/ethernet/broadcom/cnic.c prod = cp->kwq_prod_idx; cp 1364 drivers/net/ethernet/broadcom/cnic.c prod_qe = &cp->kwq[KWQ_PG(sw_prod)][KWQ_IDX(sw_prod)]; cp 1369 drivers/net/ethernet/broadcom/cnic.c cp->kwq_prod_idx = prod; cp 1371 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kwq_io_addr, cp->kwq_prod_idx); cp 1373 drivers/net/ethernet/broadcom/cnic.c spin_unlock_bh(&cp->cnic_ulp_lock); cp 1377 drivers/net/ethernet/broadcom/cnic.c static void *cnic_get_kwqe_16_data(struct cnic_local *cp, u32 l5_cid, cp 1380 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 1392 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1414 drivers/net/ethernet/broadcom/cnic.c spin_lock_bh(&cp->cnic_ulp_lock); cp 1415 drivers/net/ethernet/broadcom/cnic.c ret = cp->ethdev->drv_submit_kwqes_16(dev->netdev, kwq, 1); cp 1416 drivers/net/ethernet/broadcom/cnic.c spin_unlock_bh(&cp->cnic_ulp_lock); cp 1427 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1431 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); cp 1433 drivers/net/ethernet/broadcom/cnic.c ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], cp 1462 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1468 drivers/net/ethernet/broadcom/cnic.c cp->num_iscsi_tasks = req1->num_tasks_per_conn; cp 1469 drivers/net/ethernet/broadcom/cnic.c cp->num_ccells = req1->num_ccells_per_conn; cp 1470 drivers/net/ethernet/broadcom/cnic.c cp->task_array_size = BNX2X_ISCSI_TASK_CONTEXT_SIZE * cp 1471 drivers/net/ethernet/broadcom/cnic.c cp->num_iscsi_tasks; cp 1472 drivers/net/ethernet/broadcom/cnic.c cp->r2tq_size = cp->num_iscsi_tasks * BNX2X_ISCSI_MAX_PENDING_R2TS * cp 1474 drivers/net/ethernet/broadcom/cnic.c cp->hq_size = cp->num_ccells * BNX2X_ISCSI_HQ_BD_SIZE; cp 1475 drivers/net/ethernet/broadcom/cnic.c pages = CNIC_PAGE_ALIGN(cp->hq_size) / CNIC_PAGE_SIZE; cp 1477 drivers/net/ethernet/broadcom/cnic.c cp->num_cqs = req1->num_cqs; cp 1509 drivers/net/ethernet/broadcom/cnic.c cp->num_iscsi_tasks * BNX2X_ISCSI_MAX_PENDING_R2TS); cp 1524 drivers/net/ethernet/broadcom/cnic.c cp->num_iscsi_tasks * BNX2X_ISCSI_MAX_PENDING_R2TS); cp 1590 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1591 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 1599 drivers/net/ethernet/broadcom/cnic.c cnic_free_id(&cp->cid_tbl, ctx->cid); cp 1601 drivers/net/ethernet/broadcom/cnic.c cnic_free_id(&cp->fcoe_cid_tbl, ctx->cid); cp 1611 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1612 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 1616 drivers/net/ethernet/broadcom/cnic.c cid = cnic_alloc_new_id(&cp->fcoe_cid_tbl); cp 1625 drivers/net/ethernet/broadcom/cnic.c cid = cnic_alloc_new_id(&cp->cid_tbl); cp 1632 drivers/net/ethernet/broadcom/cnic.c pages = CNIC_PAGE_ALIGN(cp->task_array_size) / CNIC_PAGE_SIZE; cp 1638 drivers/net/ethernet/broadcom/cnic.c pages = CNIC_PAGE_ALIGN(cp->r2tq_size) / CNIC_PAGE_SIZE; cp 1643 drivers/net/ethernet/broadcom/cnic.c pages = CNIC_PAGE_ALIGN(cp->hq_size) / CNIC_PAGE_SIZE; cp 1658 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1659 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 1660 drivers/net/ethernet/broadcom/cnic.c int blk = (cid - ethdev->starting_cid) / cp->cids_per_blk; cp 1661 drivers/net/ethernet/broadcom/cnic.c int off = (cid - ethdev->starting_cid) % cp->cids_per_blk; cp 1666 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_align) { cp 1667 drivers/net/ethernet/broadcom/cnic.c unsigned long mask = cp->ctx_align - 1; cp 1669 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_arr[blk].mapping & mask) cp 1670 drivers/net/ethernet/broadcom/cnic.c align_off = cp->ctx_align - cp 1671 drivers/net/ethernet/broadcom/cnic.c (cp->ctx_arr[blk].mapping & mask); cp 1673 drivers/net/ethernet/broadcom/cnic.c ctx_map = cp->ctx_arr[blk].mapping + align_off + cp 1675 drivers/net/ethernet/broadcom/cnic.c ctx = cp->ctx_arr[blk].ctx + align_off + cp 1688 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1695 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[req1->iscsi_conn_id]; cp 1807 drivers/net/ethernet/broadcom/cnic.c for (i = 1, j = 1; i < cp->num_cqs; i++, j++) { cp 1830 drivers/net/ethernet/broadcom/cnic.c ictx->ustorm_st_context.num_cqs = cp->num_cqs; cp 1854 drivers/net/ethernet/broadcom/cnic.c ictx->cstorm_st_context.cq_proc_en_bit_map = (1 << cp->num_cqs) - 1; cp 1855 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->num_cqs; i++) { cp 1877 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1907 drivers/net/ethernet/broadcom/cnic.c ctx = &cp->ctx_tbl[l5_cid]; cp 1914 drivers/net/ethernet/broadcom/cnic.c if (atomic_inc_return(&cp->iscsi_conn) > dev->max_iscsi_conn) { cp 1915 drivers/net/ethernet/broadcom/cnic.c atomic_dec(&cp->iscsi_conn); cp 1920 drivers/net/ethernet/broadcom/cnic.c atomic_dec(&cp->iscsi_conn); cp 1927 drivers/net/ethernet/broadcom/cnic.c atomic_dec(&cp->iscsi_conn); cp 1932 drivers/net/ethernet/broadcom/cnic.c kcqe.iscsi_conn_context_id = BNX2X_HW_CID(bp, cp->ctx_tbl[l5_cid].cid); cp 1943 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1951 drivers/net/ethernet/broadcom/cnic.c if (cnic_get_l5_cid(cp, cid, &l5_cid) != 0) cp 1954 drivers/net/ethernet/broadcom/cnic.c data = cnic_get_kwqe_16_data(cp, l5_cid, &l5_data); cp 1967 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1969 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 1993 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 1997 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 2012 drivers/net/ethernet/broadcom/cnic.c queue_delayed_work(cnic_wq, &cp->delete_task, delta); cp 2022 drivers/net/ethernet/broadcom/cnic.c atomic_dec(&cp->iscsi_conn); cp 2122 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2131 drivers/net/ethernet/broadcom/cnic.c struct cnic_sock *csk = &cp->csk_tbl[l5_cid]; cp 2132 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 2154 drivers/net/ethernet/broadcom/cnic.c conn_buf = cnic_get_kwqe_16_data(cp, l5_cid, &l5_data); cp 2260 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2266 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); cp 2268 drivers/net/ethernet/broadcom/cnic.c fcoe_stat = cnic_get_kwqe_16_data(cp, BNX2X_FCOE_L5_CID_BASE, &l5_data); cp 2284 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2313 drivers/net/ethernet/broadcom/cnic.c fcoe_init = cnic_get_kwqe_16_data(cp, BNX2X_FCOE_L5_CID_BASE, &l5_data); cp 2321 drivers/net/ethernet/broadcom/cnic.c fcoe_init->eq_pbl_base.lo = cp->kcq2.dma.pgtbl_map & 0xffffffff; cp 2322 drivers/net/ethernet/broadcom/cnic.c fcoe_init->eq_pbl_base.hi = (u64) cp->kcq2.dma.pgtbl_map >> 32; cp 2323 drivers/net/ethernet/broadcom/cnic.c fcoe_init->eq_pbl_size = cp->kcq2.dma.num_pages; cp 2325 drivers/net/ethernet/broadcom/cnic.c fcoe_init->sb_num = cp->status_blk_num; cp 2328 drivers/net/ethernet/broadcom/cnic.c cp->kcq2.sw_prod_idx = 0; cp 2330 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); cp 2342 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2373 drivers/net/ethernet/broadcom/cnic.c ctx = &cp->ctx_tbl[l5_cid]; cp 2400 drivers/net/ethernet/broadcom/cnic.c fcoe_offload = cnic_get_kwqe_16_data(cp, l5_cid, &l5_data); cp 2439 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2449 drivers/net/ethernet/broadcom/cnic.c fcoe_enable = cnic_get_kwqe_16_data(cp, l5_cid, &l5_data); cp 2467 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2481 drivers/net/ethernet/broadcom/cnic.c fcoe_disable = cnic_get_kwqe_16_data(cp, l5_cid, &l5_data); cp 2498 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2511 drivers/net/ethernet/broadcom/cnic.c ctx = &cp->ctx_tbl[l5_cid]; cp 2528 drivers/net/ethernet/broadcom/cnic.c queue_delayed_work(cnic_wq, &cp->delete_task, msecs_to_jiffies(2000)); cp 2541 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2544 drivers/net/ethernet/broadcom/cnic.c for (i = start_cid; i < cp->max_cid_space; i++) { cp 2545 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[i]; cp 2566 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2573 drivers/net/ethernet/broadcom/cnic.c cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid); cp 2583 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2626 drivers/net/ethernet/broadcom/cnic.c cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &kcqe.kcqe_info0); cp 2645 drivers/net/ethernet/broadcom/cnic.c cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &l4kcqe->conn_id); cp 2829 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2837 drivers/net/ethernet/broadcom/cnic.c u32 kcqe_op_flag = cp->completed_kcq[i]->kcqe_op_flag; cp 2844 drivers/net/ethernet/broadcom/cnic.c u32 next_op = cp->completed_kcq[i + j]->kcqe_op_flag; cp 2871 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); cp 2873 drivers/net/ethernet/broadcom/cnic.c ulp_ops->indicate_kcqes(cp->ulp_handle[ulp_type], cp 2874 drivers/net/ethernet/broadcom/cnic.c cp->completed_kcq + i, j); cp 2888 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2900 drivers/net/ethernet/broadcom/cnic.c cp->completed_kcq[kcqe_cnt++] = kcqe; cp 2913 drivers/net/ethernet/broadcom/cnic.c static int cnic_l2_completion(struct cnic_local *cp) cp 2916 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 2922 drivers/net/ethernet/broadcom/cnic.c if (!test_bit(CNIC_F_BNX2X_CLASS, &cp->dev->flags)) cp 2925 drivers/net/ethernet/broadcom/cnic.c hw_cons = *cp->rx_cons_ptr; cp 2929 drivers/net/ethernet/broadcom/cnic.c sw_cons = cp->rx_cons; cp 2947 drivers/net/ethernet/broadcom/cnic.c static void cnic_chk_pkt_rings(struct cnic_local *cp) cp 2952 drivers/net/ethernet/broadcom/cnic.c if (!test_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags)) cp 2955 drivers/net/ethernet/broadcom/cnic.c rx_cons = *cp->rx_cons_ptr; cp 2956 drivers/net/ethernet/broadcom/cnic.c tx_cons = *cp->tx_cons_ptr; cp 2957 drivers/net/ethernet/broadcom/cnic.c if (cp->tx_cons != tx_cons || cp->rx_cons != rx_cons) { cp 2958 drivers/net/ethernet/broadcom/cnic.c if (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags)) cp 2959 drivers/net/ethernet/broadcom/cnic.c comp = cnic_l2_completion(cp); cp 2961 drivers/net/ethernet/broadcom/cnic.c cp->tx_cons = tx_cons; cp 2962 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons = rx_cons; cp 2964 drivers/net/ethernet/broadcom/cnic.c if (cp->udev) cp 2965 drivers/net/ethernet/broadcom/cnic.c uio_event_notify(&cp->udev->cnic_uinfo); cp 2968 drivers/net/ethernet/broadcom/cnic.c clear_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags); cp 2973 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 2974 drivers/net/ethernet/broadcom/cnic.c u32 status_idx = (u16) *cp->kcq1.status_idx_ptr; cp 2979 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx = *cp->kwq_con_idx_ptr; cp 2981 drivers/net/ethernet/broadcom/cnic.c while ((kcqe_cnt = cnic_get_kcqes(dev, &cp->kcq1))) { cp 2987 drivers/net/ethernet/broadcom/cnic.c status_idx = (u16) *cp->kcq1.status_idx_ptr; cp 2990 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx = *cp->kwq_con_idx_ptr; cp 2993 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kcq1.io_addr, cp->kcq1.sw_prod_idx); cp 2995 drivers/net/ethernet/broadcom/cnic.c cnic_chk_pkt_rings(cp); cp 3016 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3018 drivers/net/ethernet/broadcom/cnic.c cp->last_status_idx = cnic_service_bnx2_queues(dev); cp 3020 drivers/net/ethernet/broadcom/cnic.c CNIC_WR(dev, BNX2_PCICFG_INT_ACK_CMD, cp->int_num | cp 3021 drivers/net/ethernet/broadcom/cnic.c BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | cp->last_status_idx); cp 3026 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3029 drivers/net/ethernet/broadcom/cnic.c u16 prod = cp->kcq1.sw_prod_idx & MAX_KCQ_IDX; cp 3031 drivers/net/ethernet/broadcom/cnic.c prefetch(cp->status_blk.gen); cp 3032 drivers/net/ethernet/broadcom/cnic.c prefetch(&cp->kcq1.kcq[KCQ_PG(prod)][KCQ_IDX(prod)]); cp 3034 drivers/net/ethernet/broadcom/cnic.c tasklet_schedule(&cp->cnic_irq_task); cp 3041 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3043 drivers/net/ethernet/broadcom/cnic.c if (cp->ack_int) cp 3044 drivers/net/ethernet/broadcom/cnic.c cp->ack_int(dev); cp 3087 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3089 drivers/net/ethernet/broadcom/cnic.c cnic_ack_bnx2x_int(dev, cp->bnx2x_igu_sb_id, CSTORM_ID, 0, cp 3095 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3097 drivers/net/ethernet/broadcom/cnic.c cnic_ack_igu_sb(dev, cp->bnx2x_igu_sb_id, IGU_SEG_ACCESS_DEF, 0, cp 3103 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3105 drivers/net/ethernet/broadcom/cnic.c cnic_ack_bnx2x_int(dev, cp->bnx2x_igu_sb_id, CSTORM_ID, idx, cp 3111 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3113 drivers/net/ethernet/broadcom/cnic.c cnic_ack_igu_sb(dev, cp->bnx2x_igu_sb_id, IGU_SEG_ACCESS_DEF, idx, cp 3141 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3149 drivers/net/ethernet/broadcom/cnic.c status_idx = cnic_service_bnx2x_kcq(dev, &cp->kcq1); cp 3151 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kcq1.io_addr, cp 3152 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.sw_prod_idx + MAX_KCQ_IDX); cp 3155 drivers/net/ethernet/broadcom/cnic.c cp->arm_int(dev, status_idx); cp 3159 drivers/net/ethernet/broadcom/cnic.c new_status_idx = cnic_service_bnx2x_kcq(dev, &cp->kcq2); cp 3164 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kcq2.io_addr, cp->kcq2.sw_prod_idx + cp 3167 drivers/net/ethernet/broadcom/cnic.c cnic_ack_igu_sb(dev, cp->bnx2x_igu_sb_id, IGU_SEG_ACCESS_DEF, cp 3177 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3179 drivers/net/ethernet/broadcom/cnic.c if (!(cp->ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)) cp 3182 drivers/net/ethernet/broadcom/cnic.c cnic_chk_pkt_rings(cp); cp 3187 drivers/net/ethernet/broadcom/cnic.c static void cnic_ulp_stop_one(struct cnic_local *cp, int if_type) cp 3192 drivers/net/ethernet/broadcom/cnic.c cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); cp 3195 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], cp 3201 drivers/net/ethernet/broadcom/cnic.c set_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 3204 drivers/net/ethernet/broadcom/cnic.c if (test_and_clear_bit(ULP_F_START, &cp->ulp_flags[if_type])) cp 3205 drivers/net/ethernet/broadcom/cnic.c ulp_ops->cnic_stop(cp->ulp_handle[if_type]); cp 3207 drivers/net/ethernet/broadcom/cnic.c clear_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 3212 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3216 drivers/net/ethernet/broadcom/cnic.c cnic_ulp_stop_one(cp, if_type); cp 3221 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3228 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], cp 3234 drivers/net/ethernet/broadcom/cnic.c set_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 3237 drivers/net/ethernet/broadcom/cnic.c if (!test_and_set_bit(ULP_F_START, &cp->ulp_flags[if_type])) cp 3238 drivers/net/ethernet/broadcom/cnic.c ulp_ops->cnic_start(cp->ulp_handle[if_type]); cp 3240 drivers/net/ethernet/broadcom/cnic.c clear_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 3246 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3251 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference_protected(cp->ulp_ops[ulp_type], cp 3254 drivers/net/ethernet/broadcom/cnic.c rc = ulp_ops->cnic_get_stats(cp->ulp_handle[ulp_type]); cp 3284 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3285 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_STOP_ISCSI, &cp->cnic_local_flags); cp 3286 drivers/net/ethernet/broadcom/cnic.c queue_delayed_work(cnic_wq, &cp->delete_task, 0); cp 3293 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3298 drivers/net/ethernet/broadcom/cnic.c if (cnic_get_l5_cid(cp, cid, &l5_cid) == 0) { cp 3299 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 3331 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3345 drivers/net/ethernet/broadcom/cnic.c if (!test_and_set_bit(ULP_F_INIT, &cp->ulp_flags[i])) cp 3355 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3369 drivers/net/ethernet/broadcom/cnic.c if (test_and_clear_bit(ULP_F_INIT, &cp->ulp_flags[i])) cp 3585 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3591 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_tbl) { cp 3592 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 3598 drivers/net/ethernet/broadcom/cnic.c csk1 = &cp->csk_tbl[l5_cid]; cp 3630 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3632 drivers/net/ethernet/broadcom/cnic.c cnic_free_id(&cp->csk_port_tbl, be16_to_cpu(csk->src_port)); cp 3752 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3754 drivers/net/ethernet/broadcom/cnic.c return cnic_send_nlmsg(cp, ISCSI_KEVENT_PATH_REQ, csk); cp 3760 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3808 drivers/net/ethernet/broadcom/cnic.c if (cnic_alloc_id(&cp->csk_port_tbl, port_id)) cp 3814 drivers/net/ethernet/broadcom/cnic.c port_id = cnic_alloc_new_id(&cp->csk_port_tbl); cp 3837 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = csk->dev->cnic_priv; cp 3840 drivers/net/ethernet/broadcom/cnic.c if (cp->ethdev->drv_state & CNIC_DRV_STATE_NO_ISCSI) cp 3866 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = csk->dev->cnic_priv; cp 3879 drivers/net/ethernet/broadcom/cnic.c cp->close_conn(csk, opcode); cp 3909 drivers/net/ethernet/broadcom/cnic.c static void cnic_cm_upcall(struct cnic_local *cp, struct cnic_sock *csk, cp 3916 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference(cp->ulp_ops[ulp_type]); cp 3945 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3948 drivers/net/ethernet/broadcom/cnic.c struct cnic_sock *csk = &cp->csk_tbl[l5_cid]; cp 3961 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, cp 3976 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 3979 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; cp 3988 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4010 drivers/net/ethernet/broadcom/cnic.c csk = &cp->csk_tbl[l5_cid]; cp 4022 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, cp 4035 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, opcode); cp 4057 drivers/net/ethernet/broadcom/cnic.c cp->close_conn(csk, opcode); cp 4065 drivers/net/ethernet/broadcom/cnic.c cp->close_conn(csk, L4_KCQE_OPCODE_VALUE_RESET_COMP); cp 4067 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, opcode); cp 4088 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4090 drivers/net/ethernet/broadcom/cnic.c kvfree(cp->csk_tbl); cp 4091 drivers/net/ethernet/broadcom/cnic.c cp->csk_tbl = NULL; cp 4092 drivers/net/ethernet/broadcom/cnic.c cnic_free_id_tbl(&cp->csk_port_tbl); cp 4097 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4101 drivers/net/ethernet/broadcom/cnic.c cp->csk_tbl = kvcalloc(MAX_CM_SK_TBL_SZ, sizeof(struct cnic_sock), cp 4103 drivers/net/ethernet/broadcom/cnic.c if (!cp->csk_tbl) cp 4107 drivers/net/ethernet/broadcom/cnic.c atomic_set(&cp->csk_tbl[i].ref_count, 0); cp 4111 drivers/net/ethernet/broadcom/cnic.c if (cnic_init_id_tbl(&cp->csk_port_tbl, CNIC_LOCAL_PORT_RANGE, cp 4148 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4151 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, opcode); cp 4158 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, opcode); cp 4177 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4178 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[csk->l5_cid]; cp 4211 drivers/net/ethernet/broadcom/cnic.c cnic_cm_upcall(cp, csk, csk->state); cp 4217 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4219 drivers/net/ethernet/broadcom/cnic.c if (!cp->ctx_tbl) cp 4227 drivers/net/ethernet/broadcom/cnic.c cancel_delayed_work(&cp->delete_task); cp 4230 drivers/net/ethernet/broadcom/cnic.c if (atomic_read(&cp->iscsi_conn) != 0) cp 4232 drivers/net/ethernet/broadcom/cnic.c atomic_read(&cp->iscsi_conn)); cp 4269 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp; cp 4274 drivers/net/ethernet/broadcom/cnic.c cp = container_of(work, struct cnic_local, delete_task.work); cp 4275 drivers/net/ethernet/broadcom/cnic.c dev = cp->dev; cp 4277 drivers/net/ethernet/broadcom/cnic.c if (test_and_clear_bit(CNIC_LCL_FL_STOP_ISCSI, &cp->cnic_local_flags)) { cp 4280 drivers/net/ethernet/broadcom/cnic.c cnic_ulp_stop_one(cp, CNIC_ULP_ISCSI); cp 4284 drivers/net/ethernet/broadcom/cnic.c cp->ethdev->drv_ctl(dev->netdev, &info); cp 4287 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->max_cid_space; i++) { cp 4288 drivers/net/ethernet/broadcom/cnic.c struct cnic_context *ctx = &cp->ctx_tbl[i]; cp 4308 drivers/net/ethernet/broadcom/cnic.c atomic_dec(&cp->iscsi_conn); cp 4315 drivers/net/ethernet/broadcom/cnic.c queue_delayed_work(cnic_wq, &cp->delete_task, cp 4322 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4329 drivers/net/ethernet/broadcom/cnic.c err = cp->start_cm(dev); cp 4334 drivers/net/ethernet/broadcom/cnic.c INIT_DELAYED_WORK(&cp->delete_task, cnic_delete_task); cp 4343 drivers/net/ethernet/broadcom/cnic.c cp->ulp_handle[CNIC_ULP_L4] = dev; cp 4344 drivers/net/ethernet/broadcom/cnic.c rcu_assign_pointer(cp->ulp_ops[CNIC_ULP_L4], &cm_ulp_ops); cp 4354 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4357 drivers/net/ethernet/broadcom/cnic.c if (!cp->csk_tbl) cp 4361 drivers/net/ethernet/broadcom/cnic.c struct cnic_sock *csk = &cp->csk_tbl[i]; cp 4384 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4388 drivers/net/ethernet/broadcom/cnic.c if (BNX2_CHIP(cp) != BNX2_CHIP_5709) cp 4391 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->ctx_blks; i++) { cp 4393 drivers/net/ethernet/broadcom/cnic.c u32 idx = cp->ctx_arr[i].cid / cp->cids_per_blk; cp 4396 drivers/net/ethernet/broadcom/cnic.c memset(cp->ctx_arr[i].ctx, 0, CNIC_PAGE_SIZE); cp 4399 drivers/net/ethernet/broadcom/cnic.c (cp->ctx_arr[i].mapping & 0xffffffff) | valid_bit); cp 4401 drivers/net/ethernet/broadcom/cnic.c (u64) cp->ctx_arr[i].mapping >> 32); cp 4421 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4422 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4425 drivers/net/ethernet/broadcom/cnic.c cp->disable_int_sync(dev); cp 4426 drivers/net/ethernet/broadcom/cnic.c tasklet_kill(&cp->cnic_irq_task); cp 4433 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4434 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4439 drivers/net/ethernet/broadcom/cnic.c tasklet_disable(&cp->cnic_irq_task); cp 4446 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4447 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4451 drivers/net/ethernet/broadcom/cnic.c int sblk_num = cp->status_blk_num; cp 4461 drivers/net/ethernet/broadcom/cnic.c cp->last_status_idx = cp->status_blk.bnx2->status_idx; cp 4462 drivers/net/ethernet/broadcom/cnic.c tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2_msix, cp 4468 drivers/net/ethernet/broadcom/cnic.c while (cp->status_blk.bnx2->status_completion_producer_index && cp 4476 drivers/net/ethernet/broadcom/cnic.c if (cp->status_blk.bnx2->status_completion_producer_index) { cp 4482 drivers/net/ethernet/broadcom/cnic.c struct status_block *sblk = cp->status_blk.gen; cp 4506 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4507 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4512 drivers/net/ethernet/broadcom/cnic.c CNIC_WR(dev, BNX2_PCICFG_INT_ACK_CMD, cp->int_num | cp 4513 drivers/net/ethernet/broadcom/cnic.c BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID | cp->last_status_idx); cp 4518 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4519 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4524 drivers/net/ethernet/broadcom/cnic.c CNIC_WR(dev, BNX2_PCICFG_INT_ACK_CMD, cp->int_num | cp 4532 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4533 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4534 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 4540 drivers/net/ethernet/broadcom/cnic.c struct status_block *s_blk = cp->status_blk.gen; cp 4542 drivers/net/ethernet/broadcom/cnic.c sb_id = cp->status_blk_num; cp 4544 drivers/net/ethernet/broadcom/cnic.c cp->tx_cons_ptr = &s_blk->status_tx_quick_consumer_index2; cp 4546 drivers/net/ethernet/broadcom/cnic.c struct status_block_msix *sblk = cp->status_blk.bnx2; cp 4551 drivers/net/ethernet/broadcom/cnic.c cp->tx_cons_ptr = &sblk->status_tx_quick_consumer_index; cp 4553 drivers/net/ethernet/broadcom/cnic.c cp->tx_cons = *cp->tx_cons_ptr; cp 4556 drivers/net/ethernet/broadcom/cnic.c if (BNX2_CHIP(cp) == BNX2_CHIP_5709) { cp 4599 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4600 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4601 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 4605 drivers/net/ethernet/broadcom/cnic.c struct status_block *s_blk = cp->status_blk.gen; cp 4608 drivers/net/ethernet/broadcom/cnic.c sb_id = cp->status_blk_num; cp 4610 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons_ptr = &s_blk->status_rx_quick_consumer_index2; cp 4614 drivers/net/ethernet/broadcom/cnic.c struct status_block_msix *sblk = cp->status_blk.bnx2; cp 4616 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons_ptr = &sblk->status_rx_quick_consumer_index; cp 4621 drivers/net/ethernet/broadcom/cnic.c while (!(*cp->rx_cons_ptr != 0) && i < 10) { cp 4627 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons = *cp->rx_cons_ptr; cp 4643 drivers/net/ethernet/broadcom/cnic.c int n = (i % cp->l2_rx_ring_size) + 1; cp 4645 drivers/net/ethernet/broadcom/cnic.c buf_map = udev->l2_buf_map + (n * cp->l2_single_buf_size); cp 4646 drivers/net/ethernet/broadcom/cnic.c rxbd->rx_bd_len = cp->l2_single_buf_size; cp 4677 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4680 drivers/net/ethernet/broadcom/cnic.c val = cp->func << 2; cp 4682 drivers/net/ethernet/broadcom/cnic.c cp->shmem_base = cnic_reg_rd_ind(dev, BNX2_SHM_HDR_ADDR_0 + val); cp 4684 drivers/net/ethernet/broadcom/cnic.c val = cnic_reg_rd_ind(dev, cp->shmem_base + cp 4691 drivers/net/ethernet/broadcom/cnic.c val = cnic_reg_rd_ind(dev, cp->shmem_base + cp 4701 drivers/net/ethernet/broadcom/cnic.c if (BNX2_CHIP(cp) != BNX2_CHIP_5709) cp 4711 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4712 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4713 drivers/net/ethernet/broadcom/cnic.c struct status_block *sblk = cp->status_blk.gen; cp 4740 drivers/net/ethernet/broadcom/cnic.c cp->kwq_io_addr = MB_GET_CID_ADDR(KWQ_CID) + L5_KRNLQ_HOST_QIDX; cp 4742 drivers/net/ethernet/broadcom/cnic.c cp->max_kwq_idx = MAX_KWQ_IDX; cp 4743 drivers/net/ethernet/broadcom/cnic.c cp->kwq_prod_idx = 0; cp 4744 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx = 0; cp 4745 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_KWQ_INIT, &cp->cnic_local_flags); cp 4747 drivers/net/ethernet/broadcom/cnic.c if (BNX2_CHIP(cp) == BNX2_CHIP_5706 || BNX2_CHIP(cp) == BNX2_CHIP_5708) cp 4748 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx_ptr = &sblk->status_rx_quick_consumer_index15; cp 4750 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx_ptr = &sblk->status_cmd_consumer_index; cp 4763 drivers/net/ethernet/broadcom/cnic.c val = (u32) ((u64) cp->kwq_info.pgtbl_map >> 32); cp 4766 drivers/net/ethernet/broadcom/cnic.c val = (u32) cp->kwq_info.pgtbl_map; cp 4770 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.io_addr = MB_GET_CID_ADDR(KCQ_CID) + L5_KRNLQ_HOST_QIDX; cp 4772 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.sw_prod_idx = 0; cp 4773 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.hw_prod_idx_ptr = cp 4776 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.status_idx_ptr = &sblk->status_idx; cp 4789 drivers/net/ethernet/broadcom/cnic.c val = (u32) ((u64) cp->kcq1.dma.pgtbl_map >> 32); cp 4792 drivers/net/ethernet/broadcom/cnic.c val = (u32) cp->kcq1.dma.pgtbl_map; cp 4795 drivers/net/ethernet/broadcom/cnic.c cp->int_num = 0; cp 4797 drivers/net/ethernet/broadcom/cnic.c struct status_block_msix *msblk = cp->status_blk.bnx2; cp 4798 drivers/net/ethernet/broadcom/cnic.c u32 sb_id = cp->status_blk_num; cp 4801 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.hw_prod_idx_ptr = cp 4803 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.status_idx_ptr = &msblk->status_idx; cp 4804 drivers/net/ethernet/broadcom/cnic.c cp->kwq_con_idx_ptr = &msblk->status_cmd_consumer_index; cp 4805 drivers/net/ethernet/broadcom/cnic.c cp->int_num = sb_id << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT; cp 4847 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4848 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4852 drivers/net/ethernet/broadcom/cnic.c for (i = 0; i < cp->ctx_blks; i++) { cp 4853 drivers/net/ethernet/broadcom/cnic.c struct cnic_ctx *ctx = &cp->ctx_arr[i]; cp 4856 drivers/net/ethernet/broadcom/cnic.c if (cp->ctx_align) { cp 4857 drivers/net/ethernet/broadcom/cnic.c unsigned long mask = cp->ctx_align - 1; cp 4868 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4869 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 4872 drivers/net/ethernet/broadcom/cnic.c tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2x_bh, cp 4901 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4903 drivers/net/ethernet/broadcom/cnic.c u8 sb_id = cp->status_blk_num; cp 4920 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4922 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 4925 drivers/net/ethernet/broadcom/cnic.c struct host_sp_status_block *sb = cp->bnx2x_def_status_blk; cp 4927 drivers/net/ethernet/broadcom/cnic.c u32 cli = cp->ethdev->iscsi_l2_client_id; cp 4979 drivers/net/ethernet/broadcom/cnic.c cp->tx_cons_ptr = cp 4986 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 4988 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 4993 drivers/net/ethernet/broadcom/cnic.c struct host_sp_status_block *sb = cp->bnx2x_def_status_blk; cp 4995 drivers/net/ethernet/broadcom/cnic.c u32 cli = cp->ethdev->iscsi_l2_client_id; cp 5004 drivers/net/ethernet/broadcom/cnic.c data->general.mtu = cpu_to_le16(cp->l2_single_buf_size - 14); cp 5009 drivers/net/ethernet/broadcom/cnic.c int n = (i % cp->l2_rx_ring_size) + 1; cp 5011 drivers/net/ethernet/broadcom/cnic.c buf_map = udev->l2_buf_map + (n * cp->l2_single_buf_size); cp 5040 drivers/net/ethernet/broadcom/cnic.c data->rx.max_bytes_on_bd = cpu_to_le16(cp->l2_single_buf_size); cp 5046 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons_ptr = cp 5048 drivers/net/ethernet/broadcom/cnic.c cp->rx_cons = *cp->rx_cons_ptr; cp 5053 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5057 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.io_addr = BAR_CSTRORM_INTMEM + cp 5059 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.sw_prod_idx = 0; cp 5062 drivers/net/ethernet/broadcom/cnic.c struct host_hc_status_block_e2 *sb = cp->status_blk.gen; cp 5064 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.hw_prod_idx_ptr = cp 5066 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.status_idx_ptr = cp 5069 drivers/net/ethernet/broadcom/cnic.c struct host_hc_status_block_e1x *sb = cp->status_blk.gen; cp 5071 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.hw_prod_idx_ptr = cp 5073 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.status_idx_ptr = cp 5078 drivers/net/ethernet/broadcom/cnic.c struct host_hc_status_block_e2 *sb = cp->status_blk.gen; cp 5080 drivers/net/ethernet/broadcom/cnic.c cp->kcq2.io_addr = BAR_USTRORM_INTMEM + cp 5082 drivers/net/ethernet/broadcom/cnic.c cp->kcq2.sw_prod_idx = 0; cp 5083 drivers/net/ethernet/broadcom/cnic.c cp->kcq2.hw_prod_idx_ptr = cp 5085 drivers/net/ethernet/broadcom/cnic.c cp->kcq2.status_idx_ptr = cp 5092 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5094 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 5099 drivers/net/ethernet/broadcom/cnic.c cp->func = bp->pf_num; cp 5103 drivers/net/ethernet/broadcom/cnic.c ret = cnic_init_id_tbl(&cp->cid_tbl, MAX_ISCSI_TBL_SZ, cp 5104 drivers/net/ethernet/broadcom/cnic.c cp->iscsi_start_cid, 0); cp 5110 drivers/net/ethernet/broadcom/cnic.c ret = cnic_init_id_tbl(&cp->fcoe_cid_tbl, dev->max_fcoe_conn, cp 5111 drivers/net/ethernet/broadcom/cnic.c cp->fcoe_start_cid, 0); cp 5117 drivers/net/ethernet/broadcom/cnic.c cp->bnx2x_igu_sb_id = ethdev->irq_arr[0].status_blk_num2; cp 5122 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kcq1.io_addr, MAX_KCQ_IDX); cp 5127 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.dma.pg_map_arr[1] & 0xffffffff); cp 5130 drivers/net/ethernet/broadcom/cnic.c (u64) cp->kcq1.dma.pg_map_arr[1] >> 32); cp 5133 drivers/net/ethernet/broadcom/cnic.c cp->kcq1.dma.pg_map_arr[0] & 0xffffffff); cp 5136 drivers/net/ethernet/broadcom/cnic.c (u64) cp->kcq1.dma.pg_map_arr[0] >> 32); cp 5140 drivers/net/ethernet/broadcom/cnic.c CSTORM_ISCSI_EQ_SB_NUM_OFFSET(pfid, 0), cp->status_blk_num); cp 5147 drivers/net/ethernet/broadcom/cnic.c cp->gbl_buf_info.pg_map_arr[0] & 0xffffffff); cp 5150 drivers/net/ethernet/broadcom/cnic.c (u64) cp->gbl_buf_info.pg_map_arr[0] >> 32); cp 5167 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5169 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 5171 drivers/net/ethernet/broadcom/cnic.c if (test_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags)) cp 5177 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); cp 5179 drivers/net/ethernet/broadcom/cnic.c u32 cli = cp->ethdev->iscsi_l2_client_id; cp 5180 drivers/net/ethernet/broadcom/cnic.c u32 cid = cp->ethdev->iscsi_l2_cid; cp 5201 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags); cp 5214 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); cp 5220 drivers/net/ethernet/broadcom/cnic.c while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) && cp 5224 drivers/net/ethernet/broadcom/cnic.c if (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags)) cp 5237 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5238 drivers/net/ethernet/broadcom/cnic.c struct cnic_uio_dev *udev = cp->udev; cp 5241 drivers/net/ethernet/broadcom/cnic.c if (!test_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags)) cp 5247 drivers/net/ethernet/broadcom/cnic.c u32 cli = cp->ethdev->iscsi_l2_client_id; cp 5248 drivers/net/ethernet/broadcom/cnic.c u32 cid = cp->ethdev->iscsi_l2_cid; cp 5254 drivers/net/ethernet/broadcom/cnic.c set_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags); cp 5261 drivers/net/ethernet/broadcom/cnic.c while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) && cp 5265 drivers/net/ethernet/broadcom/cnic.c if (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags)) cp 5275 drivers/net/ethernet/broadcom/cnic.c clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); cp 5282 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5283 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 5292 drivers/net/ethernet/broadcom/cnic.c err = ethdev->drv_register_cnic(dev->netdev, cp->cnic_ops, dev); cp 5308 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5309 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 5319 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5320 drivers/net/ethernet/broadcom/cnic.c struct cnic_eth_dev *ethdev = cp->ethdev; cp 5328 drivers/net/ethernet/broadcom/cnic.c cp->func = PCI_FUNC(dev->pcidev->devfn); cp 5329 drivers/net/ethernet/broadcom/cnic.c cp->status_blk.gen = ethdev->irq_arr[0].status_blk; cp 5330 drivers/net/ethernet/broadcom/cnic.c cp->status_blk_num = ethdev->irq_arr[0].status_blk_num; cp 5332 drivers/net/ethernet/broadcom/cnic.c err = cp->alloc_resc(dev); cp 5338 drivers/net/ethernet/broadcom/cnic.c err = cp->start_hw(dev); cp 5348 drivers/net/ethernet/broadcom/cnic.c cp->enable_int(dev); cp 5354 drivers/net/ethernet/broadcom/cnic.c cp->stop_hw(dev); cp 5356 drivers/net/ethernet/broadcom/cnic.c cp->free_resc(dev); cp 5380 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5383 drivers/net/ethernet/broadcom/cnic.c u32 sb_id = cp->status_blk_num; cp 5403 drivers/net/ethernet/broadcom/cnic.c *cp->kcq1.hw_prod_idx_ptr = 0; cp 5406 drivers/net/ethernet/broadcom/cnic.c CNIC_WR16(dev, cp->kcq1.io_addr, 0); cp 5413 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5419 drivers/net/ethernet/broadcom/cnic.c while (cp->udev && cp->udev->uio_dev != -1 && i < 15) { cp 5424 drivers/net/ethernet/broadcom/cnic.c cp->stop_cm(dev); cp 5425 drivers/net/ethernet/broadcom/cnic.c cp->ethdev->drv_state &= ~CNIC_DRV_STATE_HANDLES_IRQ; cp 5427 drivers/net/ethernet/broadcom/cnic.c RCU_INIT_POINTER(cp->ulp_ops[CNIC_ULP_L4], NULL); cp 5430 drivers/net/ethernet/broadcom/cnic.c cp->stop_hw(dev); cp 5454 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5464 drivers/net/ethernet/broadcom/cnic.c ret = cp->ethdev->drv_get_fc_npiv_tbl(dev->netdev, npiv_tbl); cp 5472 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp; cp 5489 drivers/net/ethernet/broadcom/cnic.c cp = cdev->cnic_priv; cp 5490 drivers/net/ethernet/broadcom/cnic.c cp->dev = cdev; cp 5491 drivers/net/ethernet/broadcom/cnic.c cp->l2_single_buf_size = 0x400; cp 5492 drivers/net/ethernet/broadcom/cnic.c cp->l2_rx_ring_size = 3; cp 5494 drivers/net/ethernet/broadcom/cnic.c spin_lock_init(&cp->cnic_ulp_lock); cp 5505 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp; cp 5536 drivers/net/ethernet/broadcom/cnic.c cp = cdev->cnic_priv; cp 5537 drivers/net/ethernet/broadcom/cnic.c cp->ethdev = ethdev; cp 5539 drivers/net/ethernet/broadcom/cnic.c cp->chip_id = ethdev->chip_id; cp 5543 drivers/net/ethernet/broadcom/cnic.c cp->cnic_ops = &cnic_bnx2_ops; cp 5544 drivers/net/ethernet/broadcom/cnic.c cp->start_hw = cnic_start_bnx2_hw; cp 5545 drivers/net/ethernet/broadcom/cnic.c cp->stop_hw = cnic_stop_bnx2_hw; cp 5546 drivers/net/ethernet/broadcom/cnic.c cp->setup_pgtbl = cnic_setup_page_tbl; cp 5547 drivers/net/ethernet/broadcom/cnic.c cp->alloc_resc = cnic_alloc_bnx2_resc; cp 5548 drivers/net/ethernet/broadcom/cnic.c cp->free_resc = cnic_free_resc; cp 5549 drivers/net/ethernet/broadcom/cnic.c cp->start_cm = cnic_cm_init_bnx2_hw; cp 5550 drivers/net/ethernet/broadcom/cnic.c cp->stop_cm = cnic_cm_stop_bnx2_hw; cp 5551 drivers/net/ethernet/broadcom/cnic.c cp->enable_int = cnic_enable_bnx2_int; cp 5552 drivers/net/ethernet/broadcom/cnic.c cp->disable_int_sync = cnic_disable_bnx2_int_sync; cp 5553 drivers/net/ethernet/broadcom/cnic.c cp->close_conn = cnic_close_bnx2_conn; cp 5565 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp; cp 5589 drivers/net/ethernet/broadcom/cnic.c cp = cdev->cnic_priv; cp 5590 drivers/net/ethernet/broadcom/cnic.c cp->ethdev = ethdev; cp 5592 drivers/net/ethernet/broadcom/cnic.c cp->chip_id = ethdev->chip_id; cp 5608 drivers/net/ethernet/broadcom/cnic.c cp->cnic_ops = &cnic_bnx2x_ops; cp 5609 drivers/net/ethernet/broadcom/cnic.c cp->start_hw = cnic_start_bnx2x_hw; cp 5610 drivers/net/ethernet/broadcom/cnic.c cp->stop_hw = cnic_stop_bnx2x_hw; cp 5611 drivers/net/ethernet/broadcom/cnic.c cp->setup_pgtbl = cnic_setup_page_tbl_le; cp 5612 drivers/net/ethernet/broadcom/cnic.c cp->alloc_resc = cnic_alloc_bnx2x_resc; cp 5613 drivers/net/ethernet/broadcom/cnic.c cp->free_resc = cnic_free_resc; cp 5614 drivers/net/ethernet/broadcom/cnic.c cp->start_cm = cnic_cm_init_bnx2x_hw; cp 5615 drivers/net/ethernet/broadcom/cnic.c cp->stop_cm = cnic_cm_stop_bnx2x_hw; cp 5616 drivers/net/ethernet/broadcom/cnic.c cp->enable_int = cnic_enable_bnx2x_int; cp 5617 drivers/net/ethernet/broadcom/cnic.c cp->disable_int_sync = cnic_disable_bnx2x_int_sync; cp 5619 drivers/net/ethernet/broadcom/cnic.c cp->ack_int = cnic_ack_bnx2x_e2_msix; cp 5620 drivers/net/ethernet/broadcom/cnic.c cp->arm_int = cnic_arm_bnx2x_e2_msix; cp 5622 drivers/net/ethernet/broadcom/cnic.c cp->ack_int = cnic_ack_bnx2x_msix; cp 5623 drivers/net/ethernet/broadcom/cnic.c cp->arm_int = cnic_arm_bnx2x_msix; cp 5625 drivers/net/ethernet/broadcom/cnic.c cp->close_conn = cnic_close_bnx2x_conn; cp 5651 drivers/net/ethernet/broadcom/cnic.c static void cnic_rcv_netevent(struct cnic_local *cp, unsigned long event, cp 5661 drivers/net/ethernet/broadcom/cnic.c ulp_ops = rcu_dereference_protected(cp->ulp_ops[if_type], cp 5668 drivers/net/ethernet/broadcom/cnic.c ctx = cp->ulp_handle[if_type]; cp 5670 drivers/net/ethernet/broadcom/cnic.c set_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 5675 drivers/net/ethernet/broadcom/cnic.c clear_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[if_type]); cp 5698 drivers/net/ethernet/broadcom/cnic.c struct cnic_local *cp = dev->cnic_priv; cp 5714 drivers/net/ethernet/broadcom/cnic.c cnic_rcv_netevent(cp, event, 0); cp 102 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_KWQ_DATA_PG(cp, x) ((x) / (cp)->kwq_16_data_pp) cp 103 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_KWQ_DATA_IDX(cp, x) ((x) % (cp)->kwq_16_data_pp) cp 104 drivers/net/ethernet/broadcom/cnic.h #define BNX2X_KWQ_DATA(cp, x) \ cp 105 drivers/net/ethernet/broadcom/cnic.h &(cp)->kwq_16_data[BNX2X_KWQ_DATA_PG(cp, x)][BNX2X_KWQ_DATA_IDX(cp, x)] cp 403 drivers/net/ethernet/broadcom/cnic.h #define CNIC_FUNC(cp) ((cp)->func) cp 421 drivers/net/ethernet/broadcom/cnic.h #define CNIC_SUPPORTS_FCOE(cp) \ cp 1496 drivers/net/ethernet/i825xx/82596.c unsigned char *cp; cp 1504 drivers/net/ethernet/i825xx/82596.c cp = cmd->mc_addrs; cp 1508 drivers/net/ethernet/i825xx/82596.c memcpy(cp, ha->addr, ETH_ALEN); cp 1511 drivers/net/ethernet/i825xx/82596.c dev->name, cp)); cp 1512 drivers/net/ethernet/i825xx/82596.c cp += ETH_ALEN; cp 1389 drivers/net/ethernet/i825xx/lib82596.c unsigned char *cp; cp 1395 drivers/net/ethernet/i825xx/lib82596.c cp = cmd->mc_addrs; cp 1399 drivers/net/ethernet/i825xx/lib82596.c memcpy(cp, ha->addr, ETH_ALEN); cp 1404 drivers/net/ethernet/i825xx/lib82596.c dev->name, cp)); cp 1405 drivers/net/ethernet/i825xx/lib82596.c cp += ETH_ALEN; cp 1966 drivers/net/ethernet/mellanox/mlx5/core/en_main.c struct mlx5e_channel **cp) cp 2015 drivers/net/ethernet/mellanox/mlx5/core/en_main.c *cp = c; cp 165 drivers/net/ethernet/netronome/nfp/nfp_main.c const char *cp; cp 169 drivers/net/ethernet/netronome/nfp/nfp_main.c cp = nfp_hwinfo_lookup(pf->hwinfo, "board.state"); cp 170 drivers/net/ethernet/netronome/nfp/nfp_main.c if (!cp) cp 173 drivers/net/ethernet/netronome/nfp/nfp_main.c err = kstrtol(cp, 0, &state); cp 346 drivers/net/ethernet/qualcomm/qca_spi.c u8 *cp; cp 406 drivers/net/ethernet/qualcomm/qca_spi.c cp = qca->rx_buffer; cp 414 drivers/net/ethernet/qualcomm/qca_spi.c *cp); cp 415 drivers/net/ethernet/qualcomm/qca_spi.c cp++; cp 355 drivers/net/ethernet/realtek/8139cp.c #define cpr8(reg) readb(cp->regs + (reg)) cp 356 drivers/net/ethernet/realtek/8139cp.c #define cpr16(reg) readw(cp->regs + (reg)) cp 357 drivers/net/ethernet/realtek/8139cp.c #define cpr32(reg) readl(cp->regs + (reg)) cp 358 drivers/net/ethernet/realtek/8139cp.c #define cpw8(reg,val) writeb((val), cp->regs + (reg)) cp 359 drivers/net/ethernet/realtek/8139cp.c #define cpw16(reg,val) writew((val), cp->regs + (reg)) cp 360 drivers/net/ethernet/realtek/8139cp.c #define cpw32(reg,val) writel((val), cp->regs + (reg)) cp 362 drivers/net/ethernet/realtek/8139cp.c writeb((val), cp->regs + (reg)); \ cp 363 drivers/net/ethernet/realtek/8139cp.c readb(cp->regs + (reg)); \ cp 366 drivers/net/ethernet/realtek/8139cp.c writew((val), cp->regs + (reg)); \ cp 367 drivers/net/ethernet/realtek/8139cp.c readw(cp->regs + (reg)); \ cp 370 drivers/net/ethernet/realtek/8139cp.c writel((val), cp->regs + (reg)); \ cp 371 drivers/net/ethernet/realtek/8139cp.c readl(cp->regs + (reg)); \ cp 376 drivers/net/ethernet/realtek/8139cp.c static void cp_tx (struct cp_private *cp); cp 377 drivers/net/ethernet/realtek/8139cp.c static void cp_clean_rings (struct cp_private *cp); cp 407 drivers/net/ethernet/realtek/8139cp.c static inline void cp_set_rxbufsize (struct cp_private *cp) cp 409 drivers/net/ethernet/realtek/8139cp.c unsigned int mtu = cp->dev->mtu; cp 413 drivers/net/ethernet/realtek/8139cp.c cp->rx_buf_sz = mtu + ETH_HLEN + 8; cp 415 drivers/net/ethernet/realtek/8139cp.c cp->rx_buf_sz = PKT_BUF_SZ; cp 418 drivers/net/ethernet/realtek/8139cp.c static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb, cp 423 drivers/net/ethernet/realtek/8139cp.c skb->protocol = eth_type_trans (skb, cp->dev); cp 425 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_packets++; cp 426 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_bytes += skb->len; cp 431 drivers/net/ethernet/realtek/8139cp.c napi_gro_receive(&cp->napi, skb); cp 434 drivers/net/ethernet/realtek/8139cp.c static void cp_rx_err_acct (struct cp_private *cp, unsigned rx_tail, cp 437 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, rx_err, cp->dev, "rx err, slot %d status 0x%x len %d\n", cp 439 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_errors++; cp 441 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_frame_errors++; cp 443 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_crc_errors++; cp 445 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_length_errors++; cp 447 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_length_errors++; cp 449 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_fifo_errors++; cp 465 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = container_of(napi, struct cp_private, napi); cp 466 drivers/net/ethernet/realtek/8139cp.c struct net_device *dev = cp->dev; cp 467 drivers/net/ethernet/realtek/8139cp.c unsigned int rx_tail = cp->rx_tail; cp 477 drivers/net/ethernet/realtek/8139cp.c const unsigned buflen = cp->rx_buf_sz; cp 479 drivers/net/ethernet/realtek/8139cp.c skb = cp->rx_skb[rx_tail]; cp 482 drivers/net/ethernet/realtek/8139cp.c desc = &cp->rx_ring[rx_tail]; cp 496 drivers/net/ethernet/realtek/8139cp.c cp_rx_err_acct(cp, rx_tail, status, len); cp 498 drivers/net/ethernet/realtek/8139cp.c cp->cp_stats.rx_frags++; cp 503 drivers/net/ethernet/realtek/8139cp.c cp_rx_err_acct(cp, rx_tail, status, len); cp 507 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, rx_status, dev, "rx slot %d status 0x%x len %d\n", cp 516 drivers/net/ethernet/realtek/8139cp.c new_mapping = dma_map_single(&cp->pdev->dev, new_skb->data, buflen, cp 518 drivers/net/ethernet/realtek/8139cp.c if (dma_mapping_error(&cp->pdev->dev, new_mapping)) { cp 524 drivers/net/ethernet/realtek/8139cp.c dma_unmap_single(&cp->pdev->dev, mapping, cp 535 drivers/net/ethernet/realtek/8139cp.c cp->rx_skb[rx_tail] = new_skb; cp 537 drivers/net/ethernet/realtek/8139cp.c cp_rx_skb(cp, skb, desc); cp 542 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[rx_tail].opts2 = 0; cp 543 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[rx_tail].addr = cpu_to_le64(mapping); cp 546 drivers/net/ethernet/realtek/8139cp.c cp->rx_buf_sz); cp 548 drivers/net/ethernet/realtek/8139cp.c desc->opts1 = cpu_to_le32(DescOwn | cp->rx_buf_sz); cp 552 drivers/net/ethernet/realtek/8139cp.c cp->rx_tail = rx_tail; cp 560 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 562 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 571 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp; cp 578 drivers/net/ethernet/realtek/8139cp.c cp = netdev_priv(dev); cp 580 drivers/net/ethernet/realtek/8139cp.c spin_lock(&cp->lock); cp 592 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, intr, dev, "intr, status %04x cmd %02x cpcmd %04x\n", cp 604 drivers/net/ethernet/realtek/8139cp.c if (napi_schedule_prep(&cp->napi)) { cp 606 drivers/net/ethernet/realtek/8139cp.c __napi_schedule(&cp->napi); cp 610 drivers/net/ethernet/realtek/8139cp.c cp_tx(cp); cp 612 drivers/net/ethernet/realtek/8139cp.c mii_check_media(&cp->mii_if, netif_msg_link(cp), false); cp 618 drivers/net/ethernet/realtek/8139cp.c pci_read_config_word(cp->pdev, PCI_STATUS, &pci_status); cp 619 drivers/net/ethernet/realtek/8139cp.c pci_write_config_word(cp->pdev, PCI_STATUS, pci_status); cp 627 drivers/net/ethernet/realtek/8139cp.c spin_unlock(&cp->lock); cp 639 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 640 drivers/net/ethernet/realtek/8139cp.c const int irq = cp->pdev->irq; cp 648 drivers/net/ethernet/realtek/8139cp.c static void cp_tx (struct cp_private *cp) cp 650 drivers/net/ethernet/realtek/8139cp.c unsigned tx_head = cp->tx_head; cp 651 drivers/net/ethernet/realtek/8139cp.c unsigned tx_tail = cp->tx_tail; cp 655 drivers/net/ethernet/realtek/8139cp.c struct cp_desc *txd = cp->tx_ring + tx_tail; cp 664 drivers/net/ethernet/realtek/8139cp.c skb = cp->tx_skb[tx_tail]; cp 667 drivers/net/ethernet/realtek/8139cp.c dma_unmap_single(&cp->pdev->dev, le64_to_cpu(txd->addr), cp 668 drivers/net/ethernet/realtek/8139cp.c cp->tx_opts[tx_tail] & 0xffff, cp 673 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_err, cp->dev, cp 675 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_errors++; cp 677 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_window_errors++; cp 679 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_aborted_errors++; cp 681 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_carrier_errors++; cp 683 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_fifo_errors++; cp 685 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.collisions += cp 687 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_packets++; cp 688 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_bytes += skb->len; cp 689 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_done, cp->dev, cp 697 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[tx_tail] = NULL; cp 702 drivers/net/ethernet/realtek/8139cp.c cp->tx_tail = tx_tail; cp 704 drivers/net/ethernet/realtek/8139cp.c netdev_completed_queue(cp->dev, pkts_compl, bytes_compl); cp 705 drivers/net/ethernet/realtek/8139cp.c if (TX_BUFFS_AVAIL(cp) > (MAX_SKB_FRAGS + 1)) cp 706 drivers/net/ethernet/realtek/8139cp.c netif_wake_queue(cp->dev); cp 715 drivers/net/ethernet/realtek/8139cp.c static void unwind_tx_frag_mapping(struct cp_private *cp, struct sk_buff *skb, cp 723 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[index] = NULL; cp 724 drivers/net/ethernet/realtek/8139cp.c txd = &cp->tx_ring[index]; cp 726 drivers/net/ethernet/realtek/8139cp.c dma_unmap_single(&cp->pdev->dev, le64_to_cpu(txd->addr), cp 734 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 741 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, intr_flags); cp 744 drivers/net/ethernet/realtek/8139cp.c if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) { cp 746 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, intr_flags); cp 751 drivers/net/ethernet/realtek/8139cp.c entry = cp->tx_head; cp 779 drivers/net/ethernet/realtek/8139cp.c struct cp_desc *txd = &cp->tx_ring[entry]; cp 784 drivers/net/ethernet/realtek/8139cp.c mapping = dma_map_single(&cp->pdev->dev, skb->data, len, PCI_DMA_TODEVICE); cp 785 drivers/net/ethernet/realtek/8139cp.c if (dma_mapping_error(&cp->pdev->dev, mapping)) cp 797 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[entry] = skb; cp 798 drivers/net/ethernet/realtek/8139cp.c cp->tx_opts[entry] = opts1; cp 799 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_queued, cp->dev, "tx queued, slot %d, skblen %d\n", cp 812 drivers/net/ethernet/realtek/8139cp.c first_mapping = dma_map_single(&cp->pdev->dev, skb->data, cp 814 drivers/net/ethernet/realtek/8139cp.c if (dma_mapping_error(&cp->pdev->dev, first_mapping)) cp 817 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[entry] = skb; cp 827 drivers/net/ethernet/realtek/8139cp.c mapping = dma_map_single(&cp->pdev->dev, cp 830 drivers/net/ethernet/realtek/8139cp.c if (dma_mapping_error(&cp->pdev->dev, mapping)) { cp 831 drivers/net/ethernet/realtek/8139cp.c unwind_tx_frag_mapping(cp, skb, first_entry, entry); cp 842 drivers/net/ethernet/realtek/8139cp.c txd = &cp->tx_ring[entry]; cp 850 drivers/net/ethernet/realtek/8139cp.c cp->tx_opts[entry] = ctrl; cp 851 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[entry] = skb; cp 854 drivers/net/ethernet/realtek/8139cp.c txd = &cp->tx_ring[first_entry]; cp 863 drivers/net/ethernet/realtek/8139cp.c cp->tx_opts[first_entry] = ctrl; cp 864 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_queued, cp->dev, "tx queued, slots %d-%d, skblen %d\n", cp 867 drivers/net/ethernet/realtek/8139cp.c cp->tx_head = NEXT_TX(entry); cp 870 drivers/net/ethernet/realtek/8139cp.c if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1)) cp 874 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, intr_flags); cp 881 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_dropped++; cp 890 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 919 drivers/net/ethernet/realtek/8139cp.c cp->rx_config = cp_rx_config | rx_mode; cp 920 drivers/net/ethernet/realtek/8139cp.c cpw32_f(RxConfig, cp->rx_config); cp 929 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 931 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave (&cp->lock, flags); cp 933 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore (&cp->lock, flags); cp 936 drivers/net/ethernet/realtek/8139cp.c static void __cp_get_stats(struct cp_private *cp) cp 939 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.rx_missed_errors += (cpr32 (RxMissed) & 0xffffff); cp 945 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 949 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 951 drivers/net/ethernet/realtek/8139cp.c __cp_get_stats(cp); cp 952 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 957 drivers/net/ethernet/realtek/8139cp.c static void cp_stop_hw (struct cp_private *cp) cp 965 drivers/net/ethernet/realtek/8139cp.c cp->rx_tail = 0; cp 966 drivers/net/ethernet/realtek/8139cp.c cp->tx_head = cp->tx_tail = 0; cp 968 drivers/net/ethernet/realtek/8139cp.c netdev_reset_queue(cp->dev); cp 971 drivers/net/ethernet/realtek/8139cp.c static void cp_reset_hw (struct cp_private *cp) cp 984 drivers/net/ethernet/realtek/8139cp.c netdev_err(cp->dev, "hardware reset timeout\n"); cp 987 drivers/net/ethernet/realtek/8139cp.c static inline void cp_start_hw (struct cp_private *cp) cp 991 drivers/net/ethernet/realtek/8139cp.c cpw16(CpCmd, cp->cpcmd); cp 1004 drivers/net/ethernet/realtek/8139cp.c ring_dma = cp->ring_dma; cp 1020 drivers/net/ethernet/realtek/8139cp.c netdev_reset_queue(cp->dev); cp 1023 drivers/net/ethernet/realtek/8139cp.c static void cp_enable_irq(struct cp_private *cp) cp 1028 drivers/net/ethernet/realtek/8139cp.c static void cp_init_hw (struct cp_private *cp) cp 1030 drivers/net/ethernet/realtek/8139cp.c struct net_device *dev = cp->dev; cp 1032 drivers/net/ethernet/realtek/8139cp.c cp_reset_hw(cp); cp 1040 drivers/net/ethernet/realtek/8139cp.c cp_start_hw(cp); cp 1049 drivers/net/ethernet/realtek/8139cp.c cp->wol_enabled = 0; cp 1058 drivers/net/ethernet/realtek/8139cp.c static int cp_refill_rx(struct cp_private *cp) cp 1060 drivers/net/ethernet/realtek/8139cp.c struct net_device *dev = cp->dev; cp 1067 drivers/net/ethernet/realtek/8139cp.c skb = netdev_alloc_skb_ip_align(dev, cp->rx_buf_sz); cp 1071 drivers/net/ethernet/realtek/8139cp.c mapping = dma_map_single(&cp->pdev->dev, skb->data, cp 1072 drivers/net/ethernet/realtek/8139cp.c cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp 1073 drivers/net/ethernet/realtek/8139cp.c if (dma_mapping_error(&cp->pdev->dev, mapping)) { cp 1077 drivers/net/ethernet/realtek/8139cp.c cp->rx_skb[i] = skb; cp 1079 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[i].opts2 = 0; cp 1080 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[i].addr = cpu_to_le64(mapping); cp 1082 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[i].opts1 = cp 1083 drivers/net/ethernet/realtek/8139cp.c cpu_to_le32(DescOwn | RingEnd | cp->rx_buf_sz); cp 1085 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring[i].opts1 = cp 1086 drivers/net/ethernet/realtek/8139cp.c cpu_to_le32(DescOwn | cp->rx_buf_sz); cp 1092 drivers/net/ethernet/realtek/8139cp.c cp_clean_rings(cp); cp 1096 drivers/net/ethernet/realtek/8139cp.c static void cp_init_rings_index (struct cp_private *cp) cp 1098 drivers/net/ethernet/realtek/8139cp.c cp->rx_tail = 0; cp 1099 drivers/net/ethernet/realtek/8139cp.c cp->tx_head = cp->tx_tail = 0; cp 1102 drivers/net/ethernet/realtek/8139cp.c static int cp_init_rings (struct cp_private *cp) cp 1104 drivers/net/ethernet/realtek/8139cp.c memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); cp 1105 drivers/net/ethernet/realtek/8139cp.c cp->tx_ring[CP_TX_RING_SIZE - 1].opts1 = cpu_to_le32(RingEnd); cp 1106 drivers/net/ethernet/realtek/8139cp.c memset(cp->tx_opts, 0, sizeof(cp->tx_opts)); cp 1108 drivers/net/ethernet/realtek/8139cp.c cp_init_rings_index(cp); cp 1110 drivers/net/ethernet/realtek/8139cp.c return cp_refill_rx (cp); cp 1113 drivers/net/ethernet/realtek/8139cp.c static int cp_alloc_rings (struct cp_private *cp) cp 1115 drivers/net/ethernet/realtek/8139cp.c struct device *d = &cp->pdev->dev; cp 1119 drivers/net/ethernet/realtek/8139cp.c mem = dma_alloc_coherent(d, CP_RING_BYTES, &cp->ring_dma, GFP_KERNEL); cp 1123 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring = mem; cp 1124 drivers/net/ethernet/realtek/8139cp.c cp->tx_ring = &cp->rx_ring[CP_RX_RING_SIZE]; cp 1126 drivers/net/ethernet/realtek/8139cp.c rc = cp_init_rings(cp); cp 1128 drivers/net/ethernet/realtek/8139cp.c dma_free_coherent(d, CP_RING_BYTES, cp->rx_ring, cp->ring_dma); cp 1133 drivers/net/ethernet/realtek/8139cp.c static void cp_clean_rings (struct cp_private *cp) cp 1139 drivers/net/ethernet/realtek/8139cp.c if (cp->rx_skb[i]) { cp 1140 drivers/net/ethernet/realtek/8139cp.c desc = cp->rx_ring + i; cp 1141 drivers/net/ethernet/realtek/8139cp.c dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr), cp 1142 drivers/net/ethernet/realtek/8139cp.c cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp 1143 drivers/net/ethernet/realtek/8139cp.c dev_kfree_skb_any(cp->rx_skb[i]); cp 1148 drivers/net/ethernet/realtek/8139cp.c if (cp->tx_skb[i]) { cp 1149 drivers/net/ethernet/realtek/8139cp.c struct sk_buff *skb = cp->tx_skb[i]; cp 1151 drivers/net/ethernet/realtek/8139cp.c desc = cp->tx_ring + i; cp 1152 drivers/net/ethernet/realtek/8139cp.c dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr), cp 1157 drivers/net/ethernet/realtek/8139cp.c cp->dev->stats.tx_dropped++; cp 1160 drivers/net/ethernet/realtek/8139cp.c netdev_reset_queue(cp->dev); cp 1162 drivers/net/ethernet/realtek/8139cp.c memset(cp->rx_ring, 0, sizeof(struct cp_desc) * CP_RX_RING_SIZE); cp 1163 drivers/net/ethernet/realtek/8139cp.c memset(cp->tx_ring, 0, sizeof(struct cp_desc) * CP_TX_RING_SIZE); cp 1164 drivers/net/ethernet/realtek/8139cp.c memset(cp->tx_opts, 0, sizeof(cp->tx_opts)); cp 1166 drivers/net/ethernet/realtek/8139cp.c memset(cp->rx_skb, 0, sizeof(struct sk_buff *) * CP_RX_RING_SIZE); cp 1167 drivers/net/ethernet/realtek/8139cp.c memset(cp->tx_skb, 0, sizeof(struct sk_buff *) * CP_TX_RING_SIZE); cp 1170 drivers/net/ethernet/realtek/8139cp.c static void cp_free_rings (struct cp_private *cp) cp 1172 drivers/net/ethernet/realtek/8139cp.c cp_clean_rings(cp); cp 1173 drivers/net/ethernet/realtek/8139cp.c dma_free_coherent(&cp->pdev->dev, CP_RING_BYTES, cp->rx_ring, cp 1174 drivers/net/ethernet/realtek/8139cp.c cp->ring_dma); cp 1175 drivers/net/ethernet/realtek/8139cp.c cp->rx_ring = NULL; cp 1176 drivers/net/ethernet/realtek/8139cp.c cp->tx_ring = NULL; cp 1181 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1182 drivers/net/ethernet/realtek/8139cp.c const int irq = cp->pdev->irq; cp 1185 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, ifup, dev, "enabling interface\n"); cp 1187 drivers/net/ethernet/realtek/8139cp.c rc = cp_alloc_rings(cp); cp 1191 drivers/net/ethernet/realtek/8139cp.c napi_enable(&cp->napi); cp 1193 drivers/net/ethernet/realtek/8139cp.c cp_init_hw(cp); cp 1199 drivers/net/ethernet/realtek/8139cp.c cp_enable_irq(cp); cp 1202 drivers/net/ethernet/realtek/8139cp.c mii_check_media(&cp->mii_if, netif_msg_link(cp), true); cp 1208 drivers/net/ethernet/realtek/8139cp.c napi_disable(&cp->napi); cp 1209 drivers/net/ethernet/realtek/8139cp.c cp_stop_hw(cp); cp 1210 drivers/net/ethernet/realtek/8139cp.c cp_free_rings(cp); cp 1216 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1219 drivers/net/ethernet/realtek/8139cp.c napi_disable(&cp->napi); cp 1221 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, ifdown, dev, "disabling interface\n"); cp 1223 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1228 drivers/net/ethernet/realtek/8139cp.c cp_stop_hw(cp); cp 1230 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1232 drivers/net/ethernet/realtek/8139cp.c free_irq(cp->pdev->irq, dev); cp 1234 drivers/net/ethernet/realtek/8139cp.c cp_free_rings(cp); cp 1240 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1248 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1250 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_err, cp->dev, "TX ring head %d tail %d desc %x\n", cp 1251 drivers/net/ethernet/realtek/8139cp.c cp->tx_head, cp->tx_tail, cpr16(TxDmaOkLowDesc)); cp 1253 drivers/net/ethernet/realtek/8139cp.c netif_dbg(cp, tx_err, cp->dev, cp 1255 drivers/net/ethernet/realtek/8139cp.c i, &cp->tx_ring[i], le32_to_cpu(cp->tx_ring[i].opts1), cp 1256 drivers/net/ethernet/realtek/8139cp.c cp->tx_opts[i], le32_to_cpu(cp->tx_ring[i].opts2), cp 1257 drivers/net/ethernet/realtek/8139cp.c le64_to_cpu(cp->tx_ring[i].addr), cp 1258 drivers/net/ethernet/realtek/8139cp.c cp->tx_skb[i]); cp 1261 drivers/net/ethernet/realtek/8139cp.c cp_stop_hw(cp); cp 1262 drivers/net/ethernet/realtek/8139cp.c cp_clean_rings(cp); cp 1263 drivers/net/ethernet/realtek/8139cp.c rc = cp_init_rings(cp); cp 1264 drivers/net/ethernet/realtek/8139cp.c cp_start_hw(cp); cp 1269 drivers/net/ethernet/realtek/8139cp.c napi_schedule_irqoff(&cp->napi); cp 1271 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1276 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1281 drivers/net/ethernet/realtek/8139cp.c cp_set_rxbufsize(cp); /* set new rx buf size */ cp 1288 drivers/net/ethernet/realtek/8139cp.c cp_set_rxbufsize(cp); cp 1305 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1308 drivers/net/ethernet/realtek/8139cp.c readw(cp->regs + mii_2_8139_map[location]) : 0; cp 1315 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1326 drivers/net/ethernet/realtek/8139cp.c static int netdev_set_wol (struct cp_private *cp, cp 1353 drivers/net/ethernet/realtek/8139cp.c cp->wol_enabled = (wol->wolopts) ? 1 : 0; cp 1359 drivers/net/ethernet/realtek/8139cp.c static void netdev_get_wol (struct cp_private *cp, cp 1368 drivers/net/ethernet/realtek/8139cp.c if (!cp->wol_enabled) return; cp 1383 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1387 drivers/net/ethernet/realtek/8139cp.c strlcpy(info->bus_info, pci_name(cp->pdev), sizeof(info->bus_info)); cp 1417 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1420 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1421 drivers/net/ethernet/realtek/8139cp.c mii_ethtool_get_link_ksettings(&cp->mii_if, cmd); cp 1422 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1430 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1434 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1435 drivers/net/ethernet/realtek/8139cp.c rc = mii_ethtool_set_link_ksettings(&cp->mii_if, cmd); cp 1436 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1443 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1444 drivers/net/ethernet/realtek/8139cp.c return mii_nway_restart(&cp->mii_if); cp 1449 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1450 drivers/net/ethernet/realtek/8139cp.c return cp->msg_enable; cp 1455 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1456 drivers/net/ethernet/realtek/8139cp.c cp->msg_enable = value; cp 1461 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1467 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1470 drivers/net/ethernet/realtek/8139cp.c cp->cpcmd |= RxChkSum; cp 1472 drivers/net/ethernet/realtek/8139cp.c cp->cpcmd &= ~RxChkSum; cp 1475 drivers/net/ethernet/realtek/8139cp.c cp->cpcmd |= RxVlanOn; cp 1477 drivers/net/ethernet/realtek/8139cp.c cp->cpcmd &= ~RxVlanOn; cp 1479 drivers/net/ethernet/realtek/8139cp.c cpw16_f(CpCmd, cp->cpcmd); cp 1480 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1488 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1496 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1497 drivers/net/ethernet/realtek/8139cp.c memcpy_fromio(p, cp->regs, CP_REGS_SIZE); cp 1498 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1503 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1506 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave (&cp->lock, flags); cp 1507 drivers/net/ethernet/realtek/8139cp.c netdev_get_wol (cp, wol); cp 1508 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore (&cp->lock, flags); cp 1513 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1517 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave (&cp->lock, flags); cp 1518 drivers/net/ethernet/realtek/8139cp.c rc = netdev_set_wol (cp, wol); cp 1519 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore (&cp->lock, flags); cp 1539 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1544 drivers/net/ethernet/realtek/8139cp.c nic_stats = dma_alloc_coherent(&cp->pdev->dev, sizeof(*nic_stats), cp 1577 drivers/net/ethernet/realtek/8139cp.c tmp_stats[i++] = cp->cp_stats.rx_frags; cp 1580 drivers/net/ethernet/realtek/8139cp.c dma_free_coherent(&cp->pdev->dev, sizeof(*nic_stats), nic_stats, dma); cp 1606 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1613 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave(&cp->lock, flags); cp 1614 drivers/net/ethernet/realtek/8139cp.c rc = generic_mii_ioctl(&cp->mii_if, if_mii(rq), cmd, NULL); cp 1615 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore(&cp->lock, flags); cp 1621 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1629 drivers/net/ethernet/realtek/8139cp.c spin_lock_irq(&cp->lock); cp 1636 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irq(&cp->lock); cp 1760 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1763 drivers/net/ethernet/realtek/8139cp.c spin_lock_irq(&cp->lock); cp 1764 drivers/net/ethernet/realtek/8139cp.c size = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 256 : 128; cp 1765 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irq(&cp->lock); cp 1773 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1782 drivers/net/ethernet/realtek/8139cp.c spin_lock_irq(&cp->lock); cp 1784 drivers/net/ethernet/realtek/8139cp.c addr_len = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 8 : 6; cp 1787 drivers/net/ethernet/realtek/8139cp.c val = read_eeprom(cp->regs, offset, addr_len); cp 1793 drivers/net/ethernet/realtek/8139cp.c val = read_eeprom(cp->regs, offset, addr_len); cp 1800 drivers/net/ethernet/realtek/8139cp.c val = read_eeprom(cp->regs, offset, addr_len); cp 1804 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irq(&cp->lock); cp 1811 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 1821 drivers/net/ethernet/realtek/8139cp.c spin_lock_irq(&cp->lock); cp 1823 drivers/net/ethernet/realtek/8139cp.c addr_len = read_eeprom(cp->regs, 0, 8) == 0x8129 ? 8 : 6; cp 1826 drivers/net/ethernet/realtek/8139cp.c val = read_eeprom(cp->regs, offset, addr_len) & 0xff; cp 1828 drivers/net/ethernet/realtek/8139cp.c write_eeprom(cp->regs, offset, val, addr_len); cp 1835 drivers/net/ethernet/realtek/8139cp.c write_eeprom(cp->regs, offset, val, addr_len); cp 1840 drivers/net/ethernet/realtek/8139cp.c val = read_eeprom(cp->regs, offset, addr_len) & 0xff00; cp 1842 drivers/net/ethernet/realtek/8139cp.c write_eeprom(cp->regs, offset, val, addr_len); cp 1845 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irq(&cp->lock); cp 1850 drivers/net/ethernet/realtek/8139cp.c static void cp_set_d3_state (struct cp_private *cp) cp 1852 drivers/net/ethernet/realtek/8139cp.c pci_enable_wake(cp->pdev, PCI_D0, 1); /* Enable PME# generation */ cp 1853 drivers/net/ethernet/realtek/8139cp.c pci_set_power_state (cp->pdev, PCI_D3hot); cp 1887 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp; cp 1908 drivers/net/ethernet/realtek/8139cp.c cp = netdev_priv(dev); cp 1909 drivers/net/ethernet/realtek/8139cp.c cp->pdev = pdev; cp 1910 drivers/net/ethernet/realtek/8139cp.c cp->dev = dev; cp 1911 drivers/net/ethernet/realtek/8139cp.c cp->msg_enable = (debug < 0 ? CP_DEF_MSG_ENABLE : debug); cp 1912 drivers/net/ethernet/realtek/8139cp.c spin_lock_init (&cp->lock); cp 1913 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.dev = dev; cp 1914 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.mdio_read = mdio_read; cp 1915 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.mdio_write = mdio_write; cp 1916 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.phy_id = CP_INTERNAL_PHY; cp 1917 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.phy_id_mask = 0x1f; cp 1918 drivers/net/ethernet/realtek/8139cp.c cp->mii_if.reg_num_mask = 0x1f; cp 1919 drivers/net/ethernet/realtek/8139cp.c cp_set_rxbufsize(cp); cp 1968 drivers/net/ethernet/realtek/8139cp.c cp->cpcmd = (pci_using_dac ? PCIDAC : 0) | cp 1982 drivers/net/ethernet/realtek/8139cp.c cp->regs = regs; cp 1984 drivers/net/ethernet/realtek/8139cp.c cp_stop_hw(cp); cp 1993 drivers/net/ethernet/realtek/8139cp.c netif_napi_add(dev, &cp->napi, cp_rx_poll, 16); cp 2024 drivers/net/ethernet/realtek/8139cp.c if (cp->wol_enabled) cp 2025 drivers/net/ethernet/realtek/8139cp.c cp_set_d3_state (cp); cp 2045 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 2048 drivers/net/ethernet/realtek/8139cp.c iounmap(cp->regs); cp 2049 drivers/net/ethernet/realtek/8139cp.c if (cp->wol_enabled) cp 2061 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 2070 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave (&cp->lock, flags); cp 2076 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore (&cp->lock, flags); cp 2079 drivers/net/ethernet/realtek/8139cp.c pci_enable_wake(pdev, pci_choose_state(pdev, state), cp->wol_enabled); cp 2088 drivers/net/ethernet/realtek/8139cp.c struct cp_private *cp = netdev_priv(dev); cp 2101 drivers/net/ethernet/realtek/8139cp.c cp_init_rings_index (cp); cp 2102 drivers/net/ethernet/realtek/8139cp.c cp_init_hw (cp); cp 2103 drivers/net/ethernet/realtek/8139cp.c cp_enable_irq(cp); cp 2106 drivers/net/ethernet/realtek/8139cp.c spin_lock_irqsave (&cp->lock, flags); cp 2108 drivers/net/ethernet/realtek/8139cp.c mii_check_media(&cp->mii_if, netif_msg_link(cp), false); cp 2110 drivers/net/ethernet/realtek/8139cp.c spin_unlock_irqrestore (&cp->lock, flags); cp 476 drivers/net/ethernet/sgi/ioc3-eth.c unsigned char *cp; cp 524 drivers/net/ethernet/sgi/ioc3-eth.c cp = (char *)eh + len; /* points at trailing CRC */ cp 526 drivers/net/ethernet/sgi/ioc3-eth.c csum += 0xffff ^ (u16)((cp[1] << 8) | cp[0]); cp 527 drivers/net/ethernet/sgi/ioc3-eth.c csum += 0xffff ^ (u16)((cp[3] << 8) | cp[2]); cp 529 drivers/net/ethernet/sgi/ioc3-eth.c csum += 0xffff ^ (u16)((cp[0] << 8) | cp[1]); cp 530 drivers/net/ethernet/sgi/ioc3-eth.c csum += 0xffff ^ (u16)((cp[2] << 8) | cp[3]); cp 161 drivers/net/ethernet/sun/cassini.c #define CAS_MAX_MTU min(((cp->page_size << 1) - 0x50), 9000) cp 230 drivers/net/ethernet/sun/cassini.c static void cas_set_link_modes(struct cas *cp); cp 232 drivers/net/ethernet/sun/cassini.c static inline void cas_lock_tx(struct cas *cp) cp 237 drivers/net/ethernet/sun/cassini.c spin_lock_nested(&cp->tx_lock[i], i); cp 240 drivers/net/ethernet/sun/cassini.c static inline void cas_lock_all(struct cas *cp) cp 242 drivers/net/ethernet/sun/cassini.c spin_lock_irq(&cp->lock); cp 243 drivers/net/ethernet/sun/cassini.c cas_lock_tx(cp); cp 254 drivers/net/ethernet/sun/cassini.c #define cas_lock_all_save(cp, flags) \ cp 256 drivers/net/ethernet/sun/cassini.c struct cas *xxxcp = (cp); \ cp 261 drivers/net/ethernet/sun/cassini.c static inline void cas_unlock_tx(struct cas *cp) cp 266 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->tx_lock[i - 1]); cp 269 drivers/net/ethernet/sun/cassini.c static inline void cas_unlock_all(struct cas *cp) cp 271 drivers/net/ethernet/sun/cassini.c cas_unlock_tx(cp); cp 272 drivers/net/ethernet/sun/cassini.c spin_unlock_irq(&cp->lock); cp 275 drivers/net/ethernet/sun/cassini.c #define cas_unlock_all_restore(cp, flags) \ cp 277 drivers/net/ethernet/sun/cassini.c struct cas *xxxcp = (cp); \ cp 282 drivers/net/ethernet/sun/cassini.c static void cas_disable_irq(struct cas *cp, const int ring) cp 286 drivers/net/ethernet/sun/cassini.c writel(0xFFFFFFFF, cp->regs + REG_INTR_MASK); cp 291 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 304 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PLUS_INTRN_MASK(ring)); cp 308 drivers/net/ethernet/sun/cassini.c writel(INTRN_MASK_CLEAR_ALL, cp->regs + cp 315 drivers/net/ethernet/sun/cassini.c static inline void cas_mask_intr(struct cas *cp) cp 320 drivers/net/ethernet/sun/cassini.c cas_disable_irq(cp, i); cp 323 drivers/net/ethernet/sun/cassini.c static void cas_enable_irq(struct cas *cp, const int ring) cp 326 drivers/net/ethernet/sun/cassini.c writel(INTR_TX_DONE, cp->regs + REG_INTR_MASK); cp 330 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 342 drivers/net/ethernet/sun/cassini.c writel(INTRN_MASK_RX_EN, cp->regs + cp 352 drivers/net/ethernet/sun/cassini.c static inline void cas_unmask_intr(struct cas *cp) cp 357 drivers/net/ethernet/sun/cassini.c cas_enable_irq(cp, i); cp 360 drivers/net/ethernet/sun/cassini.c static inline void cas_entropy_gather(struct cas *cp) cp 363 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_ENTROPY_DEV) == 0) cp 366 drivers/net/ethernet/sun/cassini.c batch_entropy_store(readl(cp->regs + REG_ENTROPY_IV), cp 367 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_ENTROPY_IV), cp 372 drivers/net/ethernet/sun/cassini.c static inline void cas_entropy_reset(struct cas *cp) cp 375 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_ENTROPY_DEV) == 0) cp 379 drivers/net/ethernet/sun/cassini.c cp->regs + REG_BIM_LOCAL_DEV_EN); cp 380 drivers/net/ethernet/sun/cassini.c writeb(ENTROPY_RESET_STC_MODE, cp->regs + REG_ENTROPY_RESET); cp 381 drivers/net/ethernet/sun/cassini.c writeb(0x55, cp->regs + REG_ENTROPY_RAND_REG); cp 384 drivers/net/ethernet/sun/cassini.c if (readb(cp->regs + REG_ENTROPY_RAND_REG) == 0) cp 385 drivers/net/ethernet/sun/cassini.c cp->cas_flags &= ~CAS_FLAG_ENTROPY_DEV; cp 392 drivers/net/ethernet/sun/cassini.c static u16 cas_phy_read(struct cas *cp, int reg) cp 398 drivers/net/ethernet/sun/cassini.c cmd |= CAS_BASE(MIF_FRAME_PHY_ADDR, cp->phy_addr); cp 401 drivers/net/ethernet/sun/cassini.c writel(cmd, cp->regs + REG_MIF_FRAME); cp 406 drivers/net/ethernet/sun/cassini.c cmd = readl(cp->regs + REG_MIF_FRAME); cp 413 drivers/net/ethernet/sun/cassini.c static int cas_phy_write(struct cas *cp, int reg, u16 val) cp 419 drivers/net/ethernet/sun/cassini.c cmd |= CAS_BASE(MIF_FRAME_PHY_ADDR, cp->phy_addr); cp 423 drivers/net/ethernet/sun/cassini.c writel(cmd, cp->regs + REG_MIF_FRAME); cp 428 drivers/net/ethernet/sun/cassini.c cmd = readl(cp->regs + REG_MIF_FRAME); cp 435 drivers/net/ethernet/sun/cassini.c static void cas_phy_powerup(struct cas *cp) cp 437 drivers/net/ethernet/sun/cassini.c u16 ctl = cas_phy_read(cp, MII_BMCR); cp 442 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, ctl); cp 445 drivers/net/ethernet/sun/cassini.c static void cas_phy_powerdown(struct cas *cp) cp 447 drivers/net/ethernet/sun/cassini.c u16 ctl = cas_phy_read(cp, MII_BMCR); cp 452 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, ctl); cp 456 drivers/net/ethernet/sun/cassini.c static int cas_page_free(struct cas *cp, cas_page_t *page) cp 458 drivers/net/ethernet/sun/cassini.c pci_unmap_page(cp->pdev, page->dma_addr, cp->page_size, cp 460 drivers/net/ethernet/sun/cassini.c __free_pages(page->buffer, cp->page_order); cp 476 drivers/net/ethernet/sun/cassini.c static cas_page_t *cas_page_alloc(struct cas *cp, const gfp_t flags) cp 486 drivers/net/ethernet/sun/cassini.c page->buffer = alloc_pages(flags, cp->page_order); cp 489 drivers/net/ethernet/sun/cassini.c page->dma_addr = pci_map_page(cp->pdev, page->buffer, 0, cp 490 drivers/net/ethernet/sun/cassini.c cp->page_size, PCI_DMA_FROMDEVICE); cp 499 drivers/net/ethernet/sun/cassini.c static void cas_spare_init(struct cas *cp) cp 501 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 502 drivers/net/ethernet/sun/cassini.c INIT_LIST_HEAD(&cp->rx_inuse_list); cp 503 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 505 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 506 drivers/net/ethernet/sun/cassini.c INIT_LIST_HEAD(&cp->rx_spare_list); cp 507 drivers/net/ethernet/sun/cassini.c cp->rx_spares_needed = RX_SPARE_COUNT; cp 508 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 512 drivers/net/ethernet/sun/cassini.c static void cas_spare_free(struct cas *cp) cp 518 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 519 drivers/net/ethernet/sun/cassini.c list_splice_init(&cp->rx_spare_list, &list); cp 520 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 522 drivers/net/ethernet/sun/cassini.c cas_page_free(cp, list_entry(elem, cas_page_t, list)); cp 531 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 532 drivers/net/ethernet/sun/cassini.c list_splice_init(&cp->rx_inuse_list, &list); cp 533 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 535 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 536 drivers/net/ethernet/sun/cassini.c list_splice_init(&cp->rx_inuse_list, &list); cp 537 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 540 drivers/net/ethernet/sun/cassini.c cas_page_free(cp, list_entry(elem, cas_page_t, list)); cp 545 drivers/net/ethernet/sun/cassini.c static void cas_spare_recover(struct cas *cp, const gfp_t flags) cp 556 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 557 drivers/net/ethernet/sun/cassini.c list_splice_init(&cp->rx_inuse_list, &list); cp 558 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 579 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 580 drivers/net/ethernet/sun/cassini.c if (cp->rx_spares_needed > 0) { cp 581 drivers/net/ethernet/sun/cassini.c list_add(elem, &cp->rx_spare_list); cp 582 drivers/net/ethernet/sun/cassini.c cp->rx_spares_needed--; cp 583 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 585 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 586 drivers/net/ethernet/sun/cassini.c cas_page_free(cp, page); cp 592 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 593 drivers/net/ethernet/sun/cassini.c list_splice(&list, &cp->rx_inuse_list); cp 594 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 597 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 598 drivers/net/ethernet/sun/cassini.c needed = cp->rx_spares_needed; cp 599 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 607 drivers/net/ethernet/sun/cassini.c cas_page_t *spare = cas_page_alloc(cp, flags); cp 614 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 615 drivers/net/ethernet/sun/cassini.c list_splice(&list, &cp->rx_spare_list); cp 616 drivers/net/ethernet/sun/cassini.c cp->rx_spares_needed -= i; cp 617 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 621 drivers/net/ethernet/sun/cassini.c static cas_page_t *cas_page_dequeue(struct cas *cp) cp 626 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 627 drivers/net/ethernet/sun/cassini.c if (list_empty(&cp->rx_spare_list)) { cp 629 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 630 drivers/net/ethernet/sun/cassini.c cas_spare_recover(cp, GFP_ATOMIC); cp 631 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_spare_lock); cp 632 drivers/net/ethernet/sun/cassini.c if (list_empty(&cp->rx_spare_list)) { cp 633 drivers/net/ethernet/sun/cassini.c netif_err(cp, rx_err, cp->dev, cp 635 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 640 drivers/net/ethernet/sun/cassini.c entry = cp->rx_spare_list.next; cp 642 drivers/net/ethernet/sun/cassini.c recover = ++cp->rx_spares_needed; cp 643 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_spare_lock); cp 648 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 649 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_spare); cp 650 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 652 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, CAS_RESET_SPARE); cp 653 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 660 drivers/net/ethernet/sun/cassini.c static void cas_mif_poll(struct cas *cp, const int enable) cp 664 drivers/net/ethernet/sun/cassini.c cfg = readl(cp->regs + REG_MIF_CFG); cp 667 drivers/net/ethernet/sun/cassini.c if (cp->phy_type & CAS_PHY_MII_MDIO1) cp 674 drivers/net/ethernet/sun/cassini.c cfg |= CAS_BASE(MIF_CFG_POLL_PHY, cp->phy_addr); cp 677 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MIF_MASK); cp 678 drivers/net/ethernet/sun/cassini.c writel(cfg, cp->regs + REG_MIF_CFG); cp 682 drivers/net/ethernet/sun/cassini.c static void cas_begin_auto_negotiation(struct cas *cp, cp 689 drivers/net/ethernet/sun/cassini.c int oldstate = cp->lstate; cp 695 drivers/net/ethernet/sun/cassini.c lcntl = cp->link_cntl; cp 697 drivers/net/ethernet/sun/cassini.c cp->link_cntl = BMCR_ANENABLE; cp 700 drivers/net/ethernet/sun/cassini.c cp->link_cntl = 0; cp 702 drivers/net/ethernet/sun/cassini.c cp->link_cntl |= BMCR_SPEED100; cp 704 drivers/net/ethernet/sun/cassini.c cp->link_cntl |= CAS_BMCR_SPEED1000; cp 706 drivers/net/ethernet/sun/cassini.c cp->link_cntl |= BMCR_FULLDPLX; cp 709 drivers/net/ethernet/sun/cassini.c changed = (lcntl != cp->link_cntl); cp 712 drivers/net/ethernet/sun/cassini.c if (cp->lstate == link_up) { cp 713 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "PCS link down\n"); cp 716 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "link configuration changed\n"); cp 719 drivers/net/ethernet/sun/cassini.c cp->lstate = link_down; cp 720 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_DOWN; cp 721 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) cp 730 drivers/net/ethernet/sun/cassini.c netif_carrier_off(cp->dev); cp 737 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 738 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_all); cp 739 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 740 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 0; cp 741 drivers/net/ethernet/sun/cassini.c mod_timer(&cp->link_timer, jiffies + CAS_LINK_TIMEOUT); cp 745 drivers/net/ethernet/sun/cassini.c if (cp->phy_type & CAS_PHY_SERDES) { cp 746 drivers/net/ethernet/sun/cassini.c u32 val = readl(cp->regs + REG_PCS_MII_CTRL); cp 748 drivers/net/ethernet/sun/cassini.c if (cp->link_cntl & BMCR_ANENABLE) { cp 750 drivers/net/ethernet/sun/cassini.c cp->lstate = link_aneg; cp 752 drivers/net/ethernet/sun/cassini.c if (cp->link_cntl & BMCR_FULLDPLX) cp 755 drivers/net/ethernet/sun/cassini.c cp->lstate = link_force_ok; cp 757 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_CONFIG; cp 758 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_PCS_MII_CTRL); cp 761 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 762 drivers/net/ethernet/sun/cassini.c ctl = cas_phy_read(cp, MII_BMCR); cp 765 drivers/net/ethernet/sun/cassini.c ctl |= cp->link_cntl; cp 768 drivers/net/ethernet/sun/cassini.c cp->lstate = link_aneg; cp 770 drivers/net/ethernet/sun/cassini.c cp->lstate = link_force_ok; cp 772 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_CONFIG; cp 773 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, ctl); cp 774 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 777 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 0; cp 778 drivers/net/ethernet/sun/cassini.c mod_timer(&cp->link_timer, jiffies + CAS_LINK_TIMEOUT); cp 782 drivers/net/ethernet/sun/cassini.c static int cas_reset_mii_phy(struct cas *cp) cp 787 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, BMCR_RESET); cp 790 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_BMCR); cp 798 drivers/net/ethernet/sun/cassini.c static void cas_saturn_firmware_init(struct cas *cp) cp 804 drivers/net/ethernet/sun/cassini.c if (PHY_NS_DP83065 != cp->phy_id) cp 807 drivers/net/ethernet/sun/cassini.c err = request_firmware(&fw, fw_name, &cp->pdev->dev); cp 818 drivers/net/ethernet/sun/cassini.c cp->fw_load_addr= fw->data[1] << 8 | fw->data[0]; cp 819 drivers/net/ethernet/sun/cassini.c cp->fw_size = fw->size - 2; cp 820 drivers/net/ethernet/sun/cassini.c cp->fw_data = vmalloc(cp->fw_size); cp 821 drivers/net/ethernet/sun/cassini.c if (!cp->fw_data) cp 823 drivers/net/ethernet/sun/cassini.c memcpy(cp->fw_data, &fw->data[2], cp->fw_size); cp 828 drivers/net/ethernet/sun/cassini.c static void cas_saturn_firmware_load(struct cas *cp) cp 832 drivers/net/ethernet/sun/cassini.c if (!cp->fw_data) cp 835 drivers/net/ethernet/sun/cassini.c cas_phy_powerdown(cp); cp 838 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_MEM, 0x0); cp 841 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, 0x8ff9); cp 842 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, 0xbd); cp 843 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, 0x8ffa); cp 844 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, 0x82); cp 845 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, 0x8ffb); cp 846 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, 0x0); cp 847 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, 0x8ffc); cp 848 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, 0x39); cp 851 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_MEM, 0x1); cp 852 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, cp->fw_load_addr); cp 853 drivers/net/ethernet/sun/cassini.c for (i = 0; i < cp->fw_size; i++) cp 854 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, cp->fw_data[i]); cp 857 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGE, 0x8ff8); cp 858 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, DP83065_MII_REGD, 0x1); cp 863 drivers/net/ethernet/sun/cassini.c static void cas_phy_init(struct cas *cp) cp 868 drivers/net/ethernet/sun/cassini.c if (CAS_PHY_MII(cp->phy_type)) { cp 870 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PCS_DATAPATH_MODE); cp 872 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 873 drivers/net/ethernet/sun/cassini.c cas_reset_mii_phy(cp); /* take out of isolate mode */ cp 875 drivers/net/ethernet/sun/cassini.c if (PHY_LUCENT_B0 == cp->phy_id) { cp 877 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, LUCENT_MII_REG, 0x8000); cp 878 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, 0x00f1); cp 879 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, LUCENT_MII_REG, 0x0); cp 881 drivers/net/ethernet/sun/cassini.c } else if (PHY_BROADCOM_B0 == (cp->phy_id & 0xFFFFFFFC)) { cp 883 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG8, 0x0C20); cp 884 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG7, 0x0012); cp 885 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG5, 0x1804); cp 886 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG7, 0x0013); cp 887 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG5, 0x1204); cp 888 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG7, 0x8006); cp 889 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG5, 0x0132); cp 890 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG7, 0x8006); cp 891 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG5, 0x0232); cp 892 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG7, 0x201F); cp 893 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG5, 0x0A20); cp 895 drivers/net/ethernet/sun/cassini.c } else if (PHY_BROADCOM_5411 == cp->phy_id) { cp 896 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, BROADCOM_MII_REG4); cp 897 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, BROADCOM_MII_REG4); cp 900 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, BROADCOM_MII_REG4, cp 904 drivers/net/ethernet/sun/cassini.c } else if (cp->cas_flags & CAS_FLAG_SATURN) { cp 905 drivers/net/ethernet/sun/cassini.c writel((cp->phy_type & CAS_PHY_MII_MDIO0) ? cp 907 drivers/net/ethernet/sun/cassini.c cp->regs + REG_SATURN_PCFG); cp 913 drivers/net/ethernet/sun/cassini.c if (PHY_NS_DP83065 == cp->phy_id) { cp 914 drivers/net/ethernet/sun/cassini.c cas_saturn_firmware_load(cp); cp 916 drivers/net/ethernet/sun/cassini.c cas_phy_powerup(cp); cp 920 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_BMCR); cp 922 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, val); cp 925 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_ADVERTISE, cp 926 drivers/net/ethernet/sun/cassini.c cas_phy_read(cp, MII_ADVERTISE) | cp 932 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_1000MB_CAP) { cp 936 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, CAS_MII_1000_CTRL); cp 939 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, CAS_MII_1000_CTRL, val); cp 948 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PCS_DATAPATH_MODE); cp 951 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_SATURN) cp 952 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_SATURN_PCFG); cp 955 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_PCS_MII_CTRL); cp 957 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_PCS_MII_CTRL); cp 962 drivers/net/ethernet/sun/cassini.c if ((readl(cp->regs + REG_PCS_MII_CTRL) & cp 967 drivers/net/ethernet/sun/cassini.c netdev_warn(cp->dev, "PCS reset bit would not clear [%08x]\n", cp 968 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_PCS_STATE_MACHINE)); cp 973 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_PCS_CFG); cp 976 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_PCS_MII_ADVERT); cp 980 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_PCS_MII_ADVERT); cp 983 drivers/net/ethernet/sun/cassini.c writel(PCS_CFG_EN, cp->regs + REG_PCS_CFG); cp 987 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PCS_SERDES_CTRL); cp 992 drivers/net/ethernet/sun/cassini.c static int cas_pcs_link_check(struct cas *cp) cp 1001 drivers/net/ethernet/sun/cassini.c stat = readl(cp->regs + REG_PCS_MII_STATUS); cp 1003 drivers/net/ethernet/sun/cassini.c stat = readl(cp->regs + REG_PCS_MII_STATUS); cp 1011 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, "PCS RemoteFault\n"); cp 1016 drivers/net/ethernet/sun/cassini.c state_machine = readl(cp->regs + REG_PCS_STATE_MACHINE); cp 1024 drivers/net/ethernet/sun/cassini.c if (cp->lstate != link_up) { cp 1025 drivers/net/ethernet/sun/cassini.c if (cp->opened) { cp 1026 drivers/net/ethernet/sun/cassini.c cp->lstate = link_up; cp 1027 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_UP; cp 1029 drivers/net/ethernet/sun/cassini.c cas_set_link_modes(cp); cp 1030 drivers/net/ethernet/sun/cassini.c netif_carrier_on(cp->dev); cp 1033 drivers/net/ethernet/sun/cassini.c } else if (cp->lstate == link_up) { cp 1034 drivers/net/ethernet/sun/cassini.c cp->lstate = link_down; cp 1036 drivers/net/ethernet/sun/cassini.c cp->link_transition != LINK_TRANSITION_REQUESTED_RESET && cp 1037 drivers/net/ethernet/sun/cassini.c !cp->link_transition_jiffies_valid) { cp 1051 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_REQUESTED_RESET; cp 1052 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies = jiffies; cp 1053 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies_valid = 1; cp 1055 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_ON_FAILURE; cp 1057 drivers/net/ethernet/sun/cassini.c netif_carrier_off(cp->dev); cp 1058 drivers/net/ethernet/sun/cassini.c if (cp->opened) cp 1059 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, "PCS link down\n"); cp 1069 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_REG_PLUS) == 0) { cp 1071 drivers/net/ethernet/sun/cassini.c stat = readl(cp->regs + REG_PCS_SERDES_STATE); cp 1075 drivers/net/ethernet/sun/cassini.c } else if (cp->lstate == link_down) { cp 1077 drivers/net/ethernet/sun/cassini.c cp->link_transition != LINK_TRANSITION_REQUESTED_RESET && cp 1078 drivers/net/ethernet/sun/cassini.c !cp->link_transition_jiffies_valid) { cp 1085 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_REQUESTED_RESET; cp 1086 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies = jiffies; cp 1087 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies_valid = 1; cp 1089 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_STILL_FAILED; cp 1097 drivers/net/ethernet/sun/cassini.c struct cas *cp, u32 status) cp 1099 drivers/net/ethernet/sun/cassini.c u32 stat = readl(cp->regs + REG_PCS_INTR_STATUS); cp 1103 drivers/net/ethernet/sun/cassini.c return cas_pcs_link_check(cp); cp 1107 drivers/net/ethernet/sun/cassini.c struct cas *cp, u32 status) cp 1109 drivers/net/ethernet/sun/cassini.c u32 txmac_stat = readl(cp->regs + REG_MAC_TX_STATUS); cp 1114 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, cp->dev, cp 1124 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 1127 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].tx_fifo_errors++; cp 1132 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].tx_errors++; cp 1139 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].collisions += 0x10000; cp 1142 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].tx_aborted_errors += 0x10000; cp 1143 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].collisions += 0x10000; cp 1147 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].tx_aborted_errors += 0x10000; cp 1148 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].collisions += 0x10000; cp 1150 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 1158 drivers/net/ethernet/sun/cassini.c static void cas_load_firmware(struct cas *cp, cas_hp_inst_t *firmware) cp 1166 drivers/net/ethernet/sun/cassini.c writel(i, cp->regs + REG_HP_INSTR_RAM_ADDR); cp 1170 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_HP_INSTR_RAM_DATA_HI); cp 1179 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_HP_INSTR_RAM_DATA_MID); cp 1185 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_HP_INSTR_RAM_DATA_LOW); cp 1191 drivers/net/ethernet/sun/cassini.c static void cas_init_rx_dma(struct cas *cp) cp 1193 drivers/net/ethernet/sun/cassini.c u64 desc_dma = cp->block_dvma; cp 1202 drivers/net/ethernet/sun/cassini.c (cp->cas_flags & CAS_FLAG_REG_PLUS)) /* do desc 2 */ cp 1204 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_CFG); cp 1206 drivers/net/ethernet/sun/cassini.c val = (unsigned long) cp->init_rxds[0] - cp 1207 drivers/net/ethernet/sun/cassini.c (unsigned long) cp->init_block; cp 1208 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) >> 32, cp->regs + REG_RX_DB_HI); cp 1209 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) & 0xffffffff, cp->regs + REG_RX_DB_LOW); cp 1210 drivers/net/ethernet/sun/cassini.c writel(RX_DESC_RINGN_SIZE(0) - 4, cp->regs + REG_RX_KICK); cp 1212 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 1216 drivers/net/ethernet/sun/cassini.c val = (unsigned long) cp->init_rxds[1] - cp 1217 drivers/net/ethernet/sun/cassini.c (unsigned long) cp->init_block; cp 1218 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) >> 32, cp->regs + REG_PLUS_RX_DB1_HI); cp 1219 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) & 0xffffffff, cp->regs + cp 1221 drivers/net/ethernet/sun/cassini.c writel(RX_DESC_RINGN_SIZE(1) - 4, cp->regs + cp 1226 drivers/net/ethernet/sun/cassini.c val = (unsigned long) cp->init_rxcs[0] - cp 1227 drivers/net/ethernet/sun/cassini.c (unsigned long) cp->init_block; cp 1228 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) >> 32, cp->regs + REG_RX_CB_HI); cp 1229 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) & 0xffffffff, cp->regs + REG_RX_CB_LOW); cp 1231 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 1234 drivers/net/ethernet/sun/cassini.c val = (unsigned long) cp->init_rxcs[i] - cp 1235 drivers/net/ethernet/sun/cassini.c (unsigned long) cp->init_block; cp 1236 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) >> 32, cp->regs + cp 1238 drivers/net/ethernet/sun/cassini.c writel((desc_dma + val) & 0xffffffff, cp->regs + cp 1247 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_INTR_STATUS_ALIAS); cp 1248 drivers/net/ethernet/sun/cassini.c writel(INTR_RX_DONE | INTR_RX_BUF_UNAVAIL, cp->regs + REG_ALIAS_CLEAR); cp 1249 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 1251 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_PLUS_INTRN_STATUS_ALIAS(i)); cp 1256 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PLUS_ALIASN_CLEAR(1)); cp 1260 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PLUS_ALIASN_CLEAR(i)); cp 1265 drivers/net/ethernet/sun/cassini.c cp->rx_pause_off / RX_PAUSE_THRESH_QUANTUM); cp 1267 drivers/net/ethernet/sun/cassini.c cp->rx_pause_on / RX_PAUSE_THRESH_QUANTUM); cp 1268 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_PAUSE_THRESH); cp 1272 drivers/net/ethernet/sun/cassini.c writel(i, cp->regs + REG_RX_TABLE_ADDR); cp 1273 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_TABLE_DATA_LOW); cp 1274 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_TABLE_DATA_MID); cp 1275 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_TABLE_DATA_HI); cp 1279 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_CTRL_FIFO_ADDR); cp 1280 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_IPP_FIFO_ADDR); cp 1286 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_BLANK); cp 1288 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_BLANK); cp 1298 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_AE_THRESH); cp 1299 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 1301 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_PLUS_RX_AE1_THRESH); cp 1307 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_RX_RED); cp 1311 drivers/net/ethernet/sun/cassini.c if (cp->page_size == 0x1000) cp 1313 drivers/net/ethernet/sun/cassini.c else if (cp->page_size == 0x2000) cp 1315 drivers/net/ethernet/sun/cassini.c else if (cp->page_size == 0x4000) cp 1319 drivers/net/ethernet/sun/cassini.c size = cp->dev->mtu + 64; cp 1320 drivers/net/ethernet/sun/cassini.c if (size > cp->page_size) cp 1321 drivers/net/ethernet/sun/cassini.c size = cp->page_size; cp 1332 drivers/net/ethernet/sun/cassini.c cp->mtu_stride = 1 << (i + 10); cp 1335 drivers/net/ethernet/sun/cassini.c val |= CAS_BASE(RX_PAGE_SIZE_MTU_COUNT, cp->page_size >> (i + 10)); cp 1337 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_PAGE_SIZE); cp 1346 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_HP_CFG); cp 1359 drivers/net/ethernet/sun/cassini.c static inline cas_page_t *cas_page_spare(struct cas *cp, const int index) cp 1361 drivers/net/ethernet/sun/cassini.c cas_page_t *page = cp->rx_pages[1][index]; cp 1367 drivers/net/ethernet/sun/cassini.c new = cas_page_dequeue(cp); cp 1369 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 1370 drivers/net/ethernet/sun/cassini.c list_add(&page->list, &cp->rx_inuse_list); cp 1371 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 1377 drivers/net/ethernet/sun/cassini.c static cas_page_t *cas_page_swap(struct cas *cp, const int ring, cp 1380 drivers/net/ethernet/sun/cassini.c cas_page_t **page0 = cp->rx_pages[0]; cp 1381 drivers/net/ethernet/sun/cassini.c cas_page_t **page1 = cp->rx_pages[1]; cp 1385 drivers/net/ethernet/sun/cassini.c cas_page_t *new = cas_page_spare(cp, index); cp 1395 drivers/net/ethernet/sun/cassini.c static void cas_clean_rxds(struct cas *cp) cp 1398 drivers/net/ethernet/sun/cassini.c struct cas_rx_desc *rxd = cp->init_rxds[0]; cp 1404 drivers/net/ethernet/sun/cassini.c while ((skb = __skb_dequeue(&cp->rx_flows[i]))) { cp 1412 drivers/net/ethernet/sun/cassini.c cas_page_t *page = cas_page_swap(cp, 0, i); cp 1418 drivers/net/ethernet/sun/cassini.c cp->rx_old[0] = RX_DESC_RINGN_SIZE(0) - 4; cp 1419 drivers/net/ethernet/sun/cassini.c cp->rx_last[0] = 0; cp 1420 drivers/net/ethernet/sun/cassini.c cp->cas_flags &= ~CAS_FLAG_RXD_POST(0); cp 1423 drivers/net/ethernet/sun/cassini.c static void cas_clean_rxcs(struct cas *cp) cp 1428 drivers/net/ethernet/sun/cassini.c memset(cp->rx_cur, 0, sizeof(*cp->rx_cur)*N_RX_COMP_RINGS); cp 1429 drivers/net/ethernet/sun/cassini.c memset(cp->rx_new, 0, sizeof(*cp->rx_new)*N_RX_COMP_RINGS); cp 1431 drivers/net/ethernet/sun/cassini.c struct cas_rx_comp *rxc = cp->init_rxcs[i]; cp 1445 drivers/net/ethernet/sun/cassini.c static int cas_rxmac_reset(struct cas *cp) cp 1447 drivers/net/ethernet/sun/cassini.c struct net_device *dev = cp->dev; cp 1452 drivers/net/ethernet/sun/cassini.c writel(cp->mac_rx_cfg & ~MAC_RX_CFG_EN, cp->regs + REG_MAC_RX_CFG); cp 1454 drivers/net/ethernet/sun/cassini.c if (!(readl(cp->regs + REG_MAC_RX_CFG) & MAC_RX_CFG_EN)) cp 1464 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_RX_CFG); cp 1466 drivers/net/ethernet/sun/cassini.c if (!(readl(cp->regs + REG_RX_CFG) & RX_CFG_DMA_EN)) cp 1478 drivers/net/ethernet/sun/cassini.c writel(SW_RESET_RX, cp->regs + REG_SW_RESET); cp 1480 drivers/net/ethernet/sun/cassini.c if (!(readl(cp->regs + REG_SW_RESET) & SW_RESET_RX)) cp 1490 drivers/net/ethernet/sun/cassini.c cas_clean_rxds(cp); cp 1491 drivers/net/ethernet/sun/cassini.c cas_clean_rxcs(cp); cp 1494 drivers/net/ethernet/sun/cassini.c cas_init_rx_dma(cp); cp 1497 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_RX_CFG); cp 1498 drivers/net/ethernet/sun/cassini.c writel(val | RX_CFG_DMA_EN, cp->regs + REG_RX_CFG); cp 1499 drivers/net/ethernet/sun/cassini.c writel(MAC_RX_FRAME_RECV, cp->regs + REG_MAC_RX_MASK); cp 1500 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_RX_CFG); cp 1501 drivers/net/ethernet/sun/cassini.c writel(val | MAC_RX_CFG_EN, cp->regs + REG_MAC_RX_CFG); cp 1506 drivers/net/ethernet/sun/cassini.c static int cas_rxmac_interrupt(struct net_device *dev, struct cas *cp, cp 1509 drivers/net/ethernet/sun/cassini.c u32 stat = readl(cp->regs + REG_MAC_RX_STATUS); cp 1514 drivers/net/ethernet/sun/cassini.c netif_dbg(cp, intr, cp->dev, "rxmac interrupt, stat: 0x%x\n", stat); cp 1517 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 1519 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_frame_errors += 0x10000; cp 1522 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_crc_errors += 0x10000; cp 1525 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_length_errors += 0x10000; cp 1528 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_over_errors++; cp 1529 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_fifo_errors++; cp 1535 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 1539 drivers/net/ethernet/sun/cassini.c static int cas_mac_interrupt(struct net_device *dev, struct cas *cp, cp 1542 drivers/net/ethernet/sun/cassini.c u32 stat = readl(cp->regs + REG_MAC_CTRL_STATUS); cp 1547 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, cp->dev, cp 1555 drivers/net/ethernet/sun/cassini.c cp->pause_entered++; cp 1558 drivers/net/ethernet/sun/cassini.c cp->pause_last_time_recvd = (stat >> 16); cp 1565 drivers/net/ethernet/sun/cassini.c static inline int cas_mdio_link_not_up(struct cas *cp) cp 1569 drivers/net/ethernet/sun/cassini.c switch (cp->lstate) { cp 1571 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, "Autoneg failed again, keeping forced mode\n"); cp 1572 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, cp->link_fcntl); cp 1573 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 5; cp 1574 drivers/net/ethernet/sun/cassini.c cp->lstate = link_force_ok; cp 1575 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_CONFIG; cp 1579 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_BMCR); cp 1586 drivers/net/ethernet/sun/cassini.c val |= (cp->cas_flags & CAS_FLAG_1000MB_CAP) ? cp 1588 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, val); cp 1589 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 5; cp 1590 drivers/net/ethernet/sun/cassini.c cp->lstate = link_force_try; cp 1591 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_CONFIG; cp 1596 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_BMCR); cp 1597 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 5; cp 1601 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, val); cp 1611 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, val); cp 1622 drivers/net/ethernet/sun/cassini.c static int cas_mii_link_check(struct cas *cp, const u16 bmsr) cp 1632 drivers/net/ethernet/sun/cassini.c if ((cp->lstate == link_force_try) && cp 1633 drivers/net/ethernet/sun/cassini.c (cp->link_cntl & BMCR_ANENABLE)) { cp 1634 drivers/net/ethernet/sun/cassini.c cp->lstate = link_force_ret; cp 1635 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_CONFIG; cp 1636 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 1637 drivers/net/ethernet/sun/cassini.c cp->link_fcntl = cas_phy_read(cp, MII_BMCR); cp 1638 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 5; cp 1639 drivers/net/ethernet/sun/cassini.c if (cp->opened) cp 1640 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, cp 1642 drivers/net/ethernet/sun/cassini.c cas_phy_write(cp, MII_BMCR, cp 1643 drivers/net/ethernet/sun/cassini.c cp->link_fcntl | BMCR_ANENABLE | cp 1645 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 1647 drivers/net/ethernet/sun/cassini.c } else if (cp->lstate != link_up) { cp 1648 drivers/net/ethernet/sun/cassini.c cp->lstate = link_up; cp 1649 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_UP; cp 1651 drivers/net/ethernet/sun/cassini.c if (cp->opened) { cp 1652 drivers/net/ethernet/sun/cassini.c cas_set_link_modes(cp); cp 1653 drivers/net/ethernet/sun/cassini.c netif_carrier_on(cp->dev); cp 1663 drivers/net/ethernet/sun/cassini.c if (cp->lstate == link_up) { cp 1664 drivers/net/ethernet/sun/cassini.c cp->lstate = link_down; cp 1665 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_DOWN; cp 1667 drivers/net/ethernet/sun/cassini.c netif_carrier_off(cp->dev); cp 1668 drivers/net/ethernet/sun/cassini.c if (cp->opened) cp 1669 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, "Link down\n"); cp 1672 drivers/net/ethernet/sun/cassini.c } else if (++cp->timer_ticks > 10) cp 1673 drivers/net/ethernet/sun/cassini.c cas_mdio_link_not_up(cp); cp 1678 drivers/net/ethernet/sun/cassini.c static int cas_mif_interrupt(struct net_device *dev, struct cas *cp, cp 1681 drivers/net/ethernet/sun/cassini.c u32 stat = readl(cp->regs + REG_MIF_STATUS); cp 1689 drivers/net/ethernet/sun/cassini.c return cas_mii_link_check(cp, bmsr); cp 1692 drivers/net/ethernet/sun/cassini.c static int cas_pci_interrupt(struct net_device *dev, struct cas *cp, cp 1695 drivers/net/ethernet/sun/cassini.c u32 stat = readl(cp->regs + REG_PCI_ERR_STATUS); cp 1701 drivers/net/ethernet/sun/cassini.c stat, readl(cp->regs + REG_BIM_DIAG)); cp 1705 drivers/net/ethernet/sun/cassini.c ((cp->cas_flags & CAS_FLAG_REG_PLUS) == 0)) cp 1724 drivers/net/ethernet/sun/cassini.c pci_read_config_word(cp->pdev, PCI_STATUS, &cfg); cp 1746 drivers/net/ethernet/sun/cassini.c pci_write_config_word(cp->pdev, PCI_STATUS, cfg); cp 1758 drivers/net/ethernet/sun/cassini.c static int cas_abnormal_irq(struct net_device *dev, struct cas *cp, cp 1763 drivers/net/ethernet/sun/cassini.c netif_printk(cp, rx_err, KERN_DEBUG, cp->dev, cp 1765 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 1766 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_errors++; cp 1767 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 1773 drivers/net/ethernet/sun/cassini.c netif_printk(cp, rx_err, KERN_DEBUG, cp->dev, cp 1775 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 1776 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_errors++; cp 1777 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 1782 drivers/net/ethernet/sun/cassini.c if (cas_pcs_interrupt(dev, cp, status)) cp 1787 drivers/net/ethernet/sun/cassini.c if (cas_txmac_interrupt(dev, cp, status)) cp 1792 drivers/net/ethernet/sun/cassini.c if (cas_rxmac_interrupt(dev, cp, status)) cp 1797 drivers/net/ethernet/sun/cassini.c if (cas_mac_interrupt(dev, cp, status)) cp 1802 drivers/net/ethernet/sun/cassini.c if (cas_mif_interrupt(dev, cp, status)) cp 1807 drivers/net/ethernet/sun/cassini.c if (cas_pci_interrupt(dev, cp, status)) cp 1814 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 1815 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_all); cp 1817 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 1819 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, CAS_RESET_ALL); cp 1821 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 1831 drivers/net/ethernet/sun/cassini.c static inline int cas_calc_tabort(struct cas *cp, const unsigned long addr, cp 1836 drivers/net/ethernet/sun/cassini.c if (CAS_TABORT(cp) == 1) cp 1843 drivers/net/ethernet/sun/cassini.c static inline void cas_tx_ringN(struct cas *cp, int ring, int limit) cp 1847 drivers/net/ethernet/sun/cassini.c struct net_device *dev = cp->dev; cp 1850 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->tx_lock[ring]); cp 1851 drivers/net/ethernet/sun/cassini.c txds = cp->init_txds[ring]; cp 1852 drivers/net/ethernet/sun/cassini.c skbs = cp->tx_skbs[ring]; cp 1853 drivers/net/ethernet/sun/cassini.c entry = cp->tx_old[ring]; cp 1870 drivers/net/ethernet/sun/cassini.c + cp->tx_tiny_use[ring][entry].nbufs + 1; cp 1874 drivers/net/ethernet/sun/cassini.c netif_printk(cp, tx_done, KERN_DEBUG, cp->dev, cp 1878 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_use[ring][entry].nbufs = 0; cp 1886 drivers/net/ethernet/sun/cassini.c pci_unmap_page(cp->pdev, daddr, dlen, cp 1891 drivers/net/ethernet/sun/cassini.c if (cp->tx_tiny_use[ring][entry].used) { cp 1892 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_use[ring][entry].used = 0; cp 1897 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[ring]); cp 1898 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].tx_packets++; cp 1899 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].tx_bytes += skb->len; cp 1900 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[ring]); cp 1903 drivers/net/ethernet/sun/cassini.c cp->tx_old[ring] = entry; cp 1910 drivers/net/ethernet/sun/cassini.c (TX_BUFFS_AVAIL(cp, ring) > CAS_TABORT(cp)*(MAX_SKB_FRAGS + 1))) cp 1912 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->tx_lock[ring]); cp 1915 drivers/net/ethernet/sun/cassini.c static void cas_tx(struct net_device *dev, struct cas *cp, cp 1920 drivers/net/ethernet/sun/cassini.c u64 compwb = le64_to_cpu(cp->init_block->tx_compwb); cp 1922 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, cp->dev, cp 1933 drivers/net/ethernet/sun/cassini.c limit = readl(cp->regs + REG_TX_COMPN(ring)); cp 1935 drivers/net/ethernet/sun/cassini.c if (cp->tx_old[ring] != limit) cp 1936 drivers/net/ethernet/sun/cassini.c cas_tx_ringN(cp, ring, limit); cp 1941 drivers/net/ethernet/sun/cassini.c static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc, cp 1962 drivers/net/ethernet/sun/cassini.c skb = netdev_alloc_skb(cp->dev, alloclen + swivel + cp->crc_size); cp 1973 drivers/net/ethernet/sun/cassini.c page = cp->rx_pages[CAS_VAL(RX_INDEX_RING, i)][CAS_VAL(RX_INDEX_NUM, i)]; cp 1979 drivers/net/ethernet/sun/cassini.c i += cp->crc_size; cp 1980 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_cpu(cp->pdev, page->dma_addr + off, i, cp 1984 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_device(cp->pdev, page->dma_addr + off, i, cp 1998 drivers/net/ethernet/sun/cassini.c page = cp->rx_pages[CAS_VAL(RX_INDEX_RING, i)][CAS_VAL(RX_INDEX_NUM, i)]; cp 2001 drivers/net/ethernet/sun/cassini.c hlen = min(cp->page_size - off, dlen); cp 2003 drivers/net/ethernet/sun/cassini.c netif_printk(cp, rx_err, KERN_DEBUG, cp->dev, cp 2010 drivers/net/ethernet/sun/cassini.c i += cp->crc_size; cp 2011 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_cpu(cp->pdev, page->dma_addr + off, i, cp 2019 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_device(cp->pdev, page->dma_addr + off, i, cp 2024 drivers/net/ethernet/sun/cassini.c RX_USED_ADD(page, cp->mtu_stride); cp 2046 drivers/net/ethernet/sun/cassini.c page = cp->rx_pages[CAS_VAL(RX_INDEX_RING, i)][CAS_VAL(RX_INDEX_NUM, i)]; cp 2047 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_cpu(cp->pdev, page->dma_addr, cp 2048 drivers/net/ethernet/sun/cassini.c hlen + cp->crc_size, cp 2050 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_device(cp->pdev, page->dma_addr, cp 2051 drivers/net/ethernet/sun/cassini.c hlen + cp->crc_size, cp 2063 drivers/net/ethernet/sun/cassini.c RX_USED_ADD(page, hlen + cp->crc_size); cp 2066 drivers/net/ethernet/sun/cassini.c if (cp->crc_size) { cp 2077 drivers/net/ethernet/sun/cassini.c page = cp->rx_pages[CAS_VAL(RX_INDEX_RING, i)][CAS_VAL(RX_INDEX_NUM, i)]; cp 2079 drivers/net/ethernet/sun/cassini.c hlen = min(cp->page_size - off, dlen); cp 2081 drivers/net/ethernet/sun/cassini.c netif_printk(cp, rx_err, KERN_DEBUG, cp->dev, cp 2088 drivers/net/ethernet/sun/cassini.c i += cp->crc_size; cp 2089 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_cpu(cp->pdev, page->dma_addr + off, i, cp 2093 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_device(cp->pdev, page->dma_addr + off, i, cp 2097 drivers/net/ethernet/sun/cassini.c RX_USED_ADD(page, cp->mtu_stride); cp 2105 drivers/net/ethernet/sun/cassini.c page = cp->rx_pages[CAS_VAL(RX_INDEX_RING, i)][CAS_VAL(RX_INDEX_NUM, i)]; cp 2106 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_cpu(cp->pdev, page->dma_addr, cp 2107 drivers/net/ethernet/sun/cassini.c dlen + cp->crc_size, cp 2110 drivers/net/ethernet/sun/cassini.c memcpy(p, addr, dlen + cp->crc_size); cp 2111 drivers/net/ethernet/sun/cassini.c pci_dma_sync_single_for_device(cp->pdev, page->dma_addr, cp 2112 drivers/net/ethernet/sun/cassini.c dlen + cp->crc_size, cp 2115 drivers/net/ethernet/sun/cassini.c RX_USED_ADD(page, dlen + cp->crc_size); cp 2118 drivers/net/ethernet/sun/cassini.c if (cp->crc_size) { cp 2126 drivers/net/ethernet/sun/cassini.c if (cp->crc_size) { cp 2128 drivers/net/ethernet/sun/cassini.c csum = csum_fold(csum_partial(crcaddr, cp->crc_size, cp 2133 drivers/net/ethernet/sun/cassini.c skb->protocol = eth_type_trans(skb, cp->dev); cp 2157 drivers/net/ethernet/sun/cassini.c static inline void cas_rx_flow_pkt(struct cas *cp, const u64 *words, cp 2161 drivers/net/ethernet/sun/cassini.c struct sk_buff_head *flow = &cp->rx_flows[flowid]; cp 2178 drivers/net/ethernet/sun/cassini.c static void cas_post_page(struct cas *cp, const int ring, const int index) cp 2183 drivers/net/ethernet/sun/cassini.c entry = cp->rx_old[ring]; cp 2185 drivers/net/ethernet/sun/cassini.c new = cas_page_swap(cp, ring, index); cp 2186 drivers/net/ethernet/sun/cassini.c cp->init_rxds[ring][entry].buffer = cpu_to_le64(new->dma_addr); cp 2187 drivers/net/ethernet/sun/cassini.c cp->init_rxds[ring][entry].index = cp 2192 drivers/net/ethernet/sun/cassini.c cp->rx_old[ring] = entry; cp 2198 drivers/net/ethernet/sun/cassini.c writel(entry, cp->regs + REG_RX_KICK); cp 2200 drivers/net/ethernet/sun/cassini.c (cp->cas_flags & CAS_FLAG_REG_PLUS)) cp 2201 drivers/net/ethernet/sun/cassini.c writel(entry, cp->regs + REG_PLUS_RX_KICK1); cp 2206 drivers/net/ethernet/sun/cassini.c static int cas_post_rxds_ringN(struct cas *cp, int ring, int num) cp 2210 drivers/net/ethernet/sun/cassini.c cas_page_t **page = cp->rx_pages[ring]; cp 2212 drivers/net/ethernet/sun/cassini.c entry = cp->rx_old[ring]; cp 2214 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, cp->dev, cp 2224 drivers/net/ethernet/sun/cassini.c cas_page_t *new = cas_page_dequeue(cp); cp 2229 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_RXD_POST(ring); cp 2230 drivers/net/ethernet/sun/cassini.c if (!timer_pending(&cp->link_timer)) cp 2231 drivers/net/ethernet/sun/cassini.c mod_timer(&cp->link_timer, jiffies + cp 2233 drivers/net/ethernet/sun/cassini.c cp->rx_old[ring] = entry; cp 2234 drivers/net/ethernet/sun/cassini.c cp->rx_last[ring] = num ? num - released : 0; cp 2237 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->rx_inuse_lock); cp 2238 drivers/net/ethernet/sun/cassini.c list_add(&page[entry]->list, &cp->rx_inuse_list); cp 2239 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->rx_inuse_lock); cp 2240 drivers/net/ethernet/sun/cassini.c cp->init_rxds[ring][entry].buffer = cp 2253 drivers/net/ethernet/sun/cassini.c cp->rx_old[ring] = entry; cp 2259 drivers/net/ethernet/sun/cassini.c writel(cluster, cp->regs + REG_RX_KICK); cp 2261 drivers/net/ethernet/sun/cassini.c (cp->cas_flags & CAS_FLAG_REG_PLUS)) cp 2262 drivers/net/ethernet/sun/cassini.c writel(cluster, cp->regs + REG_PLUS_RX_KICK1); cp 2279 drivers/net/ethernet/sun/cassini.c static int cas_rx_ringN(struct cas *cp, int ring, int budget) cp 2281 drivers/net/ethernet/sun/cassini.c struct cas_rx_comp *rxcs = cp->init_rxcs[ring]; cp 2285 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, cp->dev, cp 2288 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_RX_COMP_HEAD), cp->rx_new[ring]); cp 2290 drivers/net/ethernet/sun/cassini.c entry = cp->rx_new[ring]; cp 2316 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[ring]); cp 2317 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].rx_errors++; cp 2319 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].rx_length_errors++; cp 2321 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].rx_crc_errors++; cp 2322 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[ring]); cp 2326 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[ring]); cp 2327 drivers/net/ethernet/sun/cassini.c ++cp->net_stats[ring].rx_dropped; cp 2328 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[ring]); cp 2332 drivers/net/ethernet/sun/cassini.c len = cas_rx_process_pkt(cp, rxc, entry, words, &skb); cp 2345 drivers/net/ethernet/sun/cassini.c cas_rx_flow_pkt(cp, words, skb); cp 2348 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[ring]); cp 2349 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].rx_packets++; cp 2350 drivers/net/ethernet/sun/cassini.c cp->net_stats[ring].rx_bytes += len; cp 2351 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[ring]); cp 2361 drivers/net/ethernet/sun/cassini.c cas_post_page(cp, dring, i); cp 2368 drivers/net/ethernet/sun/cassini.c cas_post_page(cp, dring, i); cp 2375 drivers/net/ethernet/sun/cassini.c cas_post_page(cp, dring, i); cp 2386 drivers/net/ethernet/sun/cassini.c cp->rx_new[ring] = entry; cp 2389 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "Memory squeeze, deferring packet\n"); cp 2396 drivers/net/ethernet/sun/cassini.c struct cas *cp, int ring) cp 2398 drivers/net/ethernet/sun/cassini.c struct cas_rx_comp *rxc = cp->init_rxcs[ring]; cp 2401 drivers/net/ethernet/sun/cassini.c last = cp->rx_cur[ring]; cp 2402 drivers/net/ethernet/sun/cassini.c entry = cp->rx_new[ring]; cp 2403 drivers/net/ethernet/sun/cassini.c netif_printk(cp, intr, KERN_DEBUG, dev, cp 2405 drivers/net/ethernet/sun/cassini.c ring, readl(cp->regs + REG_RX_COMP_HEAD), entry); cp 2412 drivers/net/ethernet/sun/cassini.c cp->rx_cur[ring] = last; cp 2415 drivers/net/ethernet/sun/cassini.c writel(last, cp->regs + REG_RX_COMP_TAIL); cp 2416 drivers/net/ethernet/sun/cassini.c else if (cp->cas_flags & CAS_FLAG_REG_PLUS) cp 2417 drivers/net/ethernet/sun/cassini.c writel(last, cp->regs + REG_PLUS_RX_COMPN_TAIL(ring)); cp 2427 drivers/net/ethernet/sun/cassini.c struct cas *cp, const u32 status, cp 2431 drivers/net/ethernet/sun/cassini.c cas_post_rxcs_ringN(dev, cp, ring); cp 2437 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2439 drivers/net/ethernet/sun/cassini.c int ring = (irq == cp->pci_irq_INTC) ? 2 : 3; cp 2440 drivers/net/ethernet/sun/cassini.c u32 status = readl(cp->regs + REG_PLUS_INTRN_STATUS(ring)); cp 2446 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 2449 drivers/net/ethernet/sun/cassini.c cas_mask_intr(cp); cp 2450 drivers/net/ethernet/sun/cassini.c napi_schedule(&cp->napi); cp 2452 drivers/net/ethernet/sun/cassini.c cas_rx_ringN(cp, ring, 0); cp 2458 drivers/net/ethernet/sun/cassini.c cas_handle_irqN(dev, cp, status, ring); cp 2459 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 2466 drivers/net/ethernet/sun/cassini.c static inline void cas_handle_irq1(struct cas *cp, const u32 status) cp 2471 drivers/net/ethernet/sun/cassini.c cas_post_rxds_ringN(cp, 1, 0); cp 2472 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[1]); cp 2473 drivers/net/ethernet/sun/cassini.c cp->net_stats[1].rx_dropped++; cp 2474 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[1]); cp 2478 drivers/net/ethernet/sun/cassini.c cas_post_rxds_ringN(cp, 1, RX_DESC_RINGN_SIZE(1) - cp 2482 drivers/net/ethernet/sun/cassini.c cas_post_rxcs_ringN(cp, 1); cp 2489 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2491 drivers/net/ethernet/sun/cassini.c u32 status = readl(cp->regs + REG_PLUS_INTRN_STATUS(1)); cp 2497 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 2500 drivers/net/ethernet/sun/cassini.c cas_mask_intr(cp); cp 2501 drivers/net/ethernet/sun/cassini.c napi_schedule(&cp->napi); cp 2503 drivers/net/ethernet/sun/cassini.c cas_rx_ringN(cp, 1, 0); cp 2508 drivers/net/ethernet/sun/cassini.c cas_handle_irq1(cp, status); cp 2509 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 2515 drivers/net/ethernet/sun/cassini.c struct cas *cp, const u32 status) cp 2519 drivers/net/ethernet/sun/cassini.c cas_abnormal_irq(dev, cp, status); cp 2525 drivers/net/ethernet/sun/cassini.c cas_post_rxds_ringN(cp, 0, 0); cp 2526 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 2527 drivers/net/ethernet/sun/cassini.c cp->net_stats[0].rx_dropped++; cp 2528 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 2530 drivers/net/ethernet/sun/cassini.c cas_post_rxds_ringN(cp, 0, RX_DESC_RINGN_SIZE(0) - cp 2535 drivers/net/ethernet/sun/cassini.c cas_post_rxcs_ringN(dev, cp, 0); cp 2541 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2543 drivers/net/ethernet/sun/cassini.c u32 status = readl(cp->regs + REG_INTR_STATUS); cp 2548 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 2550 drivers/net/ethernet/sun/cassini.c cas_tx(dev, cp, status); cp 2556 drivers/net/ethernet/sun/cassini.c cas_mask_intr(cp); cp 2557 drivers/net/ethernet/sun/cassini.c napi_schedule(&cp->napi); cp 2559 drivers/net/ethernet/sun/cassini.c cas_rx_ringN(cp, 0, 0); cp 2565 drivers/net/ethernet/sun/cassini.c cas_handle_irq(dev, cp, status); cp 2566 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 2574 drivers/net/ethernet/sun/cassini.c struct cas *cp = container_of(napi, struct cas, napi); cp 2575 drivers/net/ethernet/sun/cassini.c struct net_device *dev = cp->dev; cp 2577 drivers/net/ethernet/sun/cassini.c u32 status = readl(cp->regs + REG_INTR_STATUS); cp 2580 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 2581 drivers/net/ethernet/sun/cassini.c cas_tx(dev, cp, status); cp 2582 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 2596 drivers/net/ethernet/sun/cassini.c credits += cas_rx_ringN(cp, j, budget / N_RX_COMP_RINGS); cp 2606 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 2608 drivers/net/ethernet/sun/cassini.c cas_handle_irq(dev, cp, status); cp 2612 drivers/net/ethernet/sun/cassini.c status = readl(cp->regs + REG_PLUS_INTRN_STATUS(1)); cp 2614 drivers/net/ethernet/sun/cassini.c cas_handle_irq1(dev, cp, status); cp 2620 drivers/net/ethernet/sun/cassini.c status = readl(cp->regs + REG_PLUS_INTRN_STATUS(2)); cp 2622 drivers/net/ethernet/sun/cassini.c cas_handle_irqN(dev, cp, status, 2); cp 2628 drivers/net/ethernet/sun/cassini.c status = readl(cp->regs + REG_PLUS_INTRN_STATUS(3)); cp 2630 drivers/net/ethernet/sun/cassini.c cas_handle_irqN(dev, cp, status, 3); cp 2633 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 2636 drivers/net/ethernet/sun/cassini.c cas_unmask_intr(cp); cp 2645 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2647 drivers/net/ethernet/sun/cassini.c cas_disable_irq(cp, 0); cp 2648 drivers/net/ethernet/sun/cassini.c cas_interrupt(cp->pdev->irq, dev); cp 2649 drivers/net/ethernet/sun/cassini.c cas_enable_irq(cp, 0); cp 2671 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2674 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) { cp 2680 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MIF_STATE_MACHINE)); cp 2683 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_STATE_MACHINE)); cp 2686 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_CFG), cp 2687 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_TX_STATUS), cp 2688 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_TX_CFG), cp 2689 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_FIFO_PKT_CNT), cp 2690 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_FIFO_WRITE_PTR), cp 2691 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_FIFO_READ_PTR), cp 2692 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_SM_1), cp 2693 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_TX_SM_2)); cp 2696 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_RX_CFG), cp 2697 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_RX_STATUS), cp 2698 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_RX_CFG)); cp 2701 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_HP_STATE_MACHINE), cp 2702 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_HP_STATUS0), cp 2703 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_HP_STATUS1), cp 2704 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_HP_STATUS2)); cp 2707 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 2708 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_all); cp 2709 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 2711 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, CAS_RESET_ALL); cp 2712 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 2725 drivers/net/ethernet/sun/cassini.c static void cas_write_txd(struct cas *cp, int ring, int entry, cp 2728 drivers/net/ethernet/sun/cassini.c struct cas_tx_desc *txd = cp->init_txds[ring] + entry; cp 2739 drivers/net/ethernet/sun/cassini.c static inline void *tx_tiny_buf(struct cas *cp, const int ring, cp 2742 drivers/net/ethernet/sun/cassini.c return cp->tx_tiny_bufs[ring] + TX_TINY_BUF_LEN*entry; cp 2745 drivers/net/ethernet/sun/cassini.c static inline dma_addr_t tx_tiny_map(struct cas *cp, const int ring, cp 2748 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_use[ring][tentry].nbufs++; cp 2749 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_use[ring][entry].used = 1; cp 2750 drivers/net/ethernet/sun/cassini.c return cp->tx_tiny_dvma[ring] + TX_TINY_BUF_LEN*entry; cp 2753 drivers/net/ethernet/sun/cassini.c static inline int cas_xmit_tx_ringN(struct cas *cp, int ring, cp 2756 drivers/net/ethernet/sun/cassini.c struct net_device *dev = cp->dev; cp 2763 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->tx_lock[ring], flags); cp 2766 drivers/net/ethernet/sun/cassini.c if (TX_BUFFS_AVAIL(cp, ring) <= cp 2767 drivers/net/ethernet/sun/cassini.c CAS_TABORT(cp)*(skb_shinfo(skb)->nr_frags + 1)) { cp 2769 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->tx_lock[ring], flags); cp 2784 drivers/net/ethernet/sun/cassini.c entry = cp->tx_new[ring]; cp 2785 drivers/net/ethernet/sun/cassini.c cp->tx_skbs[ring][entry] = skb; cp 2789 drivers/net/ethernet/sun/cassini.c mapping = pci_map_page(cp->pdev, virt_to_page(skb->data), cp 2794 drivers/net/ethernet/sun/cassini.c tabort = cas_calc_tabort(cp, (unsigned long) skb->data, len); cp 2797 drivers/net/ethernet/sun/cassini.c cas_write_txd(cp, ring, entry, mapping, len - tabort, cp 2802 drivers/net/ethernet/sun/cassini.c tx_tiny_buf(cp, ring, entry), tabort); cp 2803 drivers/net/ethernet/sun/cassini.c mapping = tx_tiny_map(cp, ring, entry, tentry); cp 2804 drivers/net/ethernet/sun/cassini.c cas_write_txd(cp, ring, entry, mapping, tabort, ctrl, cp 2807 drivers/net/ethernet/sun/cassini.c cas_write_txd(cp, ring, entry, mapping, len, ctrl | cp 2816 drivers/net/ethernet/sun/cassini.c mapping = skb_frag_dma_map(&cp->pdev->dev, fragp, 0, len, cp 2819 drivers/net/ethernet/sun/cassini.c tabort = cas_calc_tabort(cp, skb_frag_off(fragp), len); cp 2824 drivers/net/ethernet/sun/cassini.c cas_write_txd(cp, ring, entry, mapping, len - tabort, cp 2829 drivers/net/ethernet/sun/cassini.c memcpy(tx_tiny_buf(cp, ring, entry), cp 2833 drivers/net/ethernet/sun/cassini.c mapping = tx_tiny_map(cp, ring, entry, tentry); cp 2837 drivers/net/ethernet/sun/cassini.c cas_write_txd(cp, ring, entry, mapping, len, ctrl, cp 2842 drivers/net/ethernet/sun/cassini.c cp->tx_new[ring] = entry; cp 2843 drivers/net/ethernet/sun/cassini.c if (TX_BUFFS_AVAIL(cp, ring) <= CAS_TABORT(cp)*(MAX_SKB_FRAGS + 1)) cp 2846 drivers/net/ethernet/sun/cassini.c netif_printk(cp, tx_queued, KERN_DEBUG, dev, cp 2848 drivers/net/ethernet/sun/cassini.c ring, entry, skb->len, TX_BUFFS_AVAIL(cp, ring)); cp 2849 drivers/net/ethernet/sun/cassini.c writel(entry, cp->regs + REG_TX_KICKN(ring)); cp 2850 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->tx_lock[ring], flags); cp 2856 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 2863 drivers/net/ethernet/sun/cassini.c if (skb_padto(skb, cp->min_frame_size)) cp 2869 drivers/net/ethernet/sun/cassini.c if (cas_xmit_tx_ringN(cp, ring++ & N_TX_RINGS_MASK, skb)) cp 2874 drivers/net/ethernet/sun/cassini.c static void cas_init_tx_dma(struct cas *cp) cp 2876 drivers/net/ethernet/sun/cassini.c u64 desc_dma = cp->block_dvma; cp 2884 drivers/net/ethernet/sun/cassini.c writel((desc_dma + off) >> 32, cp->regs + REG_TX_COMPWB_DB_HI); cp 2885 drivers/net/ethernet/sun/cassini.c writel((desc_dma + off) & 0xffffffff, cp->regs + REG_TX_COMPWB_DB_LOW); cp 2898 drivers/net/ethernet/sun/cassini.c off = (unsigned long) cp->init_txds[i] - cp 2899 drivers/net/ethernet/sun/cassini.c (unsigned long) cp->init_block; cp 2902 drivers/net/ethernet/sun/cassini.c writel((desc_dma + off) >> 32, cp->regs + REG_TX_DBN_HI(i)); cp 2903 drivers/net/ethernet/sun/cassini.c writel((desc_dma + off) & 0xffffffff, cp->regs + cp 2909 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_TX_CFG); cp 2915 drivers/net/ethernet/sun/cassini.c writel(0x800, cp->regs + REG_TX_MAXBURST_0); cp 2916 drivers/net/ethernet/sun/cassini.c writel(0x1600, cp->regs + REG_TX_MAXBURST_1); cp 2917 drivers/net/ethernet/sun/cassini.c writel(0x2400, cp->regs + REG_TX_MAXBURST_2); cp 2918 drivers/net/ethernet/sun/cassini.c writel(0x4800, cp->regs + REG_TX_MAXBURST_3); cp 2920 drivers/net/ethernet/sun/cassini.c writel(0x800, cp->regs + REG_TX_MAXBURST_0); cp 2921 drivers/net/ethernet/sun/cassini.c writel(0x800, cp->regs + REG_TX_MAXBURST_1); cp 2922 drivers/net/ethernet/sun/cassini.c writel(0x800, cp->regs + REG_TX_MAXBURST_2); cp 2923 drivers/net/ethernet/sun/cassini.c writel(0x800, cp->regs + REG_TX_MAXBURST_3); cp 2928 drivers/net/ethernet/sun/cassini.c static inline void cas_init_dma(struct cas *cp) cp 2930 drivers/net/ethernet/sun/cassini.c cas_init_tx_dma(cp); cp 2931 drivers/net/ethernet/sun/cassini.c cas_init_rx_dma(cp); cp 2934 drivers/net/ethernet/sun/cassini.c static void cas_process_mc_list(struct cas *cp) cp 2942 drivers/net/ethernet/sun/cassini.c netdev_for_each_mc_addr(ha, cp->dev) { cp 2948 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_ADDRN(i*3 + 0)); cp 2950 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_ADDRN(i*3 + 1)); cp 2952 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_ADDRN(i*3 + 2)); cp 2965 drivers/net/ethernet/sun/cassini.c writel(hash_table[i], cp->regs + REG_MAC_HASH_TABLEN(i)); cp 2969 drivers/net/ethernet/sun/cassini.c static u32 cas_setup_multicast(struct cas *cp) cp 2974 drivers/net/ethernet/sun/cassini.c if (cp->dev->flags & IFF_PROMISC) { cp 2977 drivers/net/ethernet/sun/cassini.c } else if (cp->dev->flags & IFF_ALLMULTI) { cp 2979 drivers/net/ethernet/sun/cassini.c writel(0xFFFF, cp->regs + REG_MAC_HASH_TABLEN(i)); cp 2983 drivers/net/ethernet/sun/cassini.c cas_process_mc_list(cp); cp 2991 drivers/net/ethernet/sun/cassini.c static void cas_clear_mac_err(struct cas *cp) cp 2993 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_COLL_NORMAL); cp 2994 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_COLL_FIRST); cp 2995 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_COLL_EXCESS); cp 2996 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_COLL_LATE); cp 2997 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_TIMER_DEFER); cp 2998 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ATTEMPTS_PEAK); cp 2999 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_RECV_FRAME); cp 3000 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_LEN_ERR); cp 3001 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ALIGN_ERR); cp 3002 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_FCS_ERR); cp 3003 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_RX_CODE_ERR); cp 3007 drivers/net/ethernet/sun/cassini.c static void cas_mac_reset(struct cas *cp) cp 3012 drivers/net/ethernet/sun/cassini.c writel(0x1, cp->regs + REG_MAC_TX_RESET); cp 3013 drivers/net/ethernet/sun/cassini.c writel(0x1, cp->regs + REG_MAC_RX_RESET); cp 3018 drivers/net/ethernet/sun/cassini.c if (readl(cp->regs + REG_MAC_TX_RESET) == 0) cp 3026 drivers/net/ethernet/sun/cassini.c if (readl(cp->regs + REG_MAC_RX_RESET) == 0) cp 3031 drivers/net/ethernet/sun/cassini.c if (readl(cp->regs + REG_MAC_TX_RESET) | cp 3032 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_RX_RESET)) cp 3033 drivers/net/ethernet/sun/cassini.c netdev_err(cp->dev, "mac tx[%d]/rx[%d] reset failed [%08x]\n", cp 3034 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_TX_RESET), cp 3035 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_RX_RESET), cp 3036 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_STATE_MACHINE)); cp 3041 drivers/net/ethernet/sun/cassini.c static void cas_init_mac(struct cas *cp) cp 3043 drivers/net/ethernet/sun/cassini.c unsigned char *e = &cp->dev->dev_addr[0]; cp 3045 drivers/net/ethernet/sun/cassini.c cas_mac_reset(cp); cp 3048 drivers/net/ethernet/sun/cassini.c writel(CAWR_RR_DIS, cp->regs + REG_CAWR); cp 3054 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_TARGET_ABORT) == 0) cp 3055 drivers/net/ethernet/sun/cassini.c writel(INF_BURST_EN, cp->regs + REG_INF_BURST); cp 3058 drivers/net/ethernet/sun/cassini.c writel(0x1BF0, cp->regs + REG_MAC_SEND_PAUSE); cp 3060 drivers/net/ethernet/sun/cassini.c writel(0x00, cp->regs + REG_MAC_IPG0); cp 3061 drivers/net/ethernet/sun/cassini.c writel(0x08, cp->regs + REG_MAC_IPG1); cp 3062 drivers/net/ethernet/sun/cassini.c writel(0x04, cp->regs + REG_MAC_IPG2); cp 3065 drivers/net/ethernet/sun/cassini.c writel(0x40, cp->regs + REG_MAC_SLOT_TIME); cp 3068 drivers/net/ethernet/sun/cassini.c writel(ETH_ZLEN + 4, cp->regs + REG_MAC_FRAMESIZE_MIN); cp 3077 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_FRAMESIZE_MAX); cp 3083 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_SATURN) && cp->crc_size) cp 3084 drivers/net/ethernet/sun/cassini.c writel(0x41, cp->regs + REG_MAC_PA_SIZE); cp 3086 drivers/net/ethernet/sun/cassini.c writel(0x07, cp->regs + REG_MAC_PA_SIZE); cp 3087 drivers/net/ethernet/sun/cassini.c writel(0x04, cp->regs + REG_MAC_JAM_SIZE); cp 3088 drivers/net/ethernet/sun/cassini.c writel(0x10, cp->regs + REG_MAC_ATTEMPT_LIMIT); cp 3089 drivers/net/ethernet/sun/cassini.c writel(0x8808, cp->regs + REG_MAC_CTRL_TYPE); cp 3091 drivers/net/ethernet/sun/cassini.c writel((e[5] | (e[4] << 8)) & 0x3ff, cp->regs + REG_MAC_RANDOM_SEED); cp 3093 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ADDR_FILTER0); cp 3094 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ADDR_FILTER1); cp 3095 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ADDR_FILTER2); cp 3096 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ADDR_FILTER2_1_MASK); cp 3097 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_MAC_ADDR_FILTER0_MASK); cp 3101 drivers/net/ethernet/sun/cassini.c writel(0x0, cp->regs + REG_MAC_ADDRN(i)); cp 3103 drivers/net/ethernet/sun/cassini.c writel((e[4] << 8) | e[5], cp->regs + REG_MAC_ADDRN(0)); cp 3104 drivers/net/ethernet/sun/cassini.c writel((e[2] << 8) | e[3], cp->regs + REG_MAC_ADDRN(1)); cp 3105 drivers/net/ethernet/sun/cassini.c writel((e[0] << 8) | e[1], cp->regs + REG_MAC_ADDRN(2)); cp 3107 drivers/net/ethernet/sun/cassini.c writel(0x0001, cp->regs + REG_MAC_ADDRN(42)); cp 3108 drivers/net/ethernet/sun/cassini.c writel(0xc200, cp->regs + REG_MAC_ADDRN(43)); cp 3109 drivers/net/ethernet/sun/cassini.c writel(0x0180, cp->regs + REG_MAC_ADDRN(44)); cp 3111 drivers/net/ethernet/sun/cassini.c cp->mac_rx_cfg = cas_setup_multicast(cp); cp 3113 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[N_TX_RINGS]); cp 3114 drivers/net/ethernet/sun/cassini.c cas_clear_mac_err(cp); cp 3115 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[N_TX_RINGS]); cp 3121 drivers/net/ethernet/sun/cassini.c writel(MAC_TX_FRAME_XMIT, cp->regs + REG_MAC_TX_MASK); cp 3122 drivers/net/ethernet/sun/cassini.c writel(MAC_RX_FRAME_RECV, cp->regs + REG_MAC_RX_MASK); cp 3127 drivers/net/ethernet/sun/cassini.c writel(0xffffffff, cp->regs + REG_MAC_CTRL_MASK); cp 3131 drivers/net/ethernet/sun/cassini.c static void cas_init_pause_thresholds(struct cas *cp) cp 3136 drivers/net/ethernet/sun/cassini.c if (cp->rx_fifo_size <= (2 * 1024)) { cp 3137 drivers/net/ethernet/sun/cassini.c cp->rx_pause_off = cp->rx_pause_on = cp->rx_fifo_size; cp 3139 drivers/net/ethernet/sun/cassini.c int max_frame = (cp->dev->mtu + ETH_HLEN + 4 + 4 + 64) & ~63; cp 3140 drivers/net/ethernet/sun/cassini.c if (max_frame * 3 > cp->rx_fifo_size) { cp 3141 drivers/net/ethernet/sun/cassini.c cp->rx_pause_off = 7104; cp 3142 drivers/net/ethernet/sun/cassini.c cp->rx_pause_on = 960; cp 3144 drivers/net/ethernet/sun/cassini.c int off = (cp->rx_fifo_size - (max_frame * 2)); cp 3146 drivers/net/ethernet/sun/cassini.c cp->rx_pause_off = off; cp 3147 drivers/net/ethernet/sun/cassini.c cp->rx_pause_on = on; cp 3176 drivers/net/ethernet/sun/cassini.c static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr, cp 3179 drivers/net/ethernet/sun/cassini.c void __iomem *p = cp->regs + REG_EXPANSION_ROM_RUN_START; cp 3195 drivers/net/ethernet/sun/cassini.c cp->regs + REG_BIM_LOCAL_DEV_EN); cp 3300 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_ENTROPY_DEV; cp 3341 drivers/net/ethernet/sun/cassini.c addr = of_get_property(cp->of_node, "local-mac-address", NULL); cp 3356 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_BIM_LOCAL_DEV_EN); cp 3361 drivers/net/ethernet/sun/cassini.c static void cas_check_pci_invariants(struct cas *cp) cp 3363 drivers/net/ethernet/sun/cassini.c struct pci_dev *pdev = cp->pdev; cp 3365 drivers/net/ethernet/sun/cassini.c cp->cas_flags = 0; cp 3369 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_REG_PLUS; cp 3371 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_TARGET_ABORT; cp 3377 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_NO_HW_CSUM; cp 3380 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_REG_PLUS; cp 3387 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_SATURN; cp 3392 drivers/net/ethernet/sun/cassini.c static int cas_check_invariants(struct cas *cp) cp 3394 drivers/net/ethernet/sun/cassini.c struct pci_dev *pdev = cp->pdev; cp 3399 drivers/net/ethernet/sun/cassini.c cp->page_order = 0; cp 3408 drivers/net/ethernet/sun/cassini.c cp->page_order = CAS_JUMBO_PAGE_SHIFT - PAGE_SHIFT; cp 3414 drivers/net/ethernet/sun/cassini.c cp->page_size = (PAGE_SIZE << cp->page_order); cp 3417 drivers/net/ethernet/sun/cassini.c cp->tx_fifo_size = readl(cp->regs + REG_TX_FIFO_SIZE) * 64; cp 3418 drivers/net/ethernet/sun/cassini.c cp->rx_fifo_size = RX_FIFO_SIZE; cp 3423 drivers/net/ethernet/sun/cassini.c cp->phy_type = cas_get_vpd_info(cp, cp->dev->dev_addr, cp 3425 drivers/net/ethernet/sun/cassini.c if (cp->phy_type & CAS_PHY_SERDES) { cp 3426 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_1000MB_CAP; cp 3431 drivers/net/ethernet/sun/cassini.c cfg = readl(cp->regs + REG_MIF_CFG); cp 3433 drivers/net/ethernet/sun/cassini.c cp->phy_type = CAS_PHY_MII_MDIO1; cp 3435 drivers/net/ethernet/sun/cassini.c cp->phy_type = CAS_PHY_MII_MDIO0; cp 3438 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 3439 drivers/net/ethernet/sun/cassini.c writel(PCS_DATAPATH_MODE_MII, cp->regs + REG_PCS_DATAPATH_MODE); cp 3446 drivers/net/ethernet/sun/cassini.c cp->phy_addr = i; cp 3447 drivers/net/ethernet/sun/cassini.c phy_id = cas_phy_read(cp, MII_PHYSID1) << 16; cp 3448 drivers/net/ethernet/sun/cassini.c phy_id |= cas_phy_read(cp, MII_PHYSID2); cp 3450 drivers/net/ethernet/sun/cassini.c cp->phy_id = phy_id; cp 3456 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MIF_STATE_MACHINE)); cp 3461 drivers/net/ethernet/sun/cassini.c cfg = cas_phy_read(cp, MII_BMSR); cp 3463 drivers/net/ethernet/sun/cassini.c cas_phy_read(cp, CAS_MII_1000_EXTEND)) cp 3464 drivers/net/ethernet/sun/cassini.c cp->cas_flags |= CAS_FLAG_1000MB_CAP; cp 3469 drivers/net/ethernet/sun/cassini.c static inline void cas_start_dma(struct cas *cp) cp 3476 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_TX_CFG) | TX_CFG_DMA_EN; cp 3477 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_TX_CFG); cp 3478 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_RX_CFG) | RX_CFG_DMA_EN; cp 3479 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_CFG); cp 3482 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_TX_CFG) | MAC_TX_CFG_EN; cp 3483 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_MAC_TX_CFG); cp 3484 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_RX_CFG) | MAC_RX_CFG_EN; cp 3485 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_MAC_RX_CFG); cp 3489 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_TX_CFG); cp 3497 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_RX_CFG); cp 3500 drivers/net/ethernet/sun/cassini.c netdev_err(cp->dev, cp 3502 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MIF_STATE_MACHINE), cp 3503 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_STATE_MACHINE)); cp 3509 drivers/net/ethernet/sun/cassini.c netdev_err(cp->dev, "enabling mac failed [%s:%08x:%08x]\n", cp 3511 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MIF_STATE_MACHINE), cp 3512 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_STATE_MACHINE)); cp 3515 drivers/net/ethernet/sun/cassini.c cas_unmask_intr(cp); /* enable interrupts */ cp 3516 drivers/net/ethernet/sun/cassini.c writel(RX_DESC_RINGN_SIZE(0) - 4, cp->regs + REG_RX_KICK); cp 3517 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_RX_COMP_TAIL); cp 3519 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_REG_PLUS) { cp 3522 drivers/net/ethernet/sun/cassini.c cp->regs + REG_PLUS_RX_KICK1); cp 3525 drivers/net/ethernet/sun/cassini.c writel(0, cp->regs + REG_PLUS_RX_COMPN_TAIL(i)); cp 3530 drivers/net/ethernet/sun/cassini.c static void cas_read_pcs_link_mode(struct cas *cp, int *fd, int *spd, cp 3533 drivers/net/ethernet/sun/cassini.c u32 val = readl(cp->regs + REG_PCS_MII_LPA); cp 3542 drivers/net/ethernet/sun/cassini.c static void cas_read_mii_link_mode(struct cas *cp, int *fd, int *spd, cp 3552 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_LPA); cp 3564 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_1000MB_CAP) { cp 3565 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, CAS_MII_1000_STATUS); cp 3578 drivers/net/ethernet/sun/cassini.c static void cas_set_link_modes(struct cas *cp) cp 3587 drivers/net/ethernet/sun/cassini.c if (CAS_PHY_MII(cp->phy_type)) { cp 3588 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 3589 drivers/net/ethernet/sun/cassini.c val = cas_phy_read(cp, MII_BMCR); cp 3591 drivers/net/ethernet/sun/cassini.c cas_read_mii_link_mode(cp, &full_duplex, &speed, cp 3600 drivers/net/ethernet/sun/cassini.c speed = (cp->cas_flags & CAS_FLAG_1000MB_CAP) ? cp 3603 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 3606 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_PCS_MII_CTRL); cp 3607 drivers/net/ethernet/sun/cassini.c cas_read_pcs_link_mode(cp, &full_duplex, &speed, &pause); cp 3614 drivers/net/ethernet/sun/cassini.c netif_info(cp, link, cp->dev, "Link up at %d Mbps, %s-duplex\n", cp 3618 drivers/net/ethernet/sun/cassini.c if (CAS_PHY_MII(cp->phy_type)) { cp 3627 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_MAC_XIF_CFG); cp 3649 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_TX_CFG); cp 3651 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_RX_CFG); cp 3654 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_RX_CFG); cp 3656 drivers/net/ethernet/sun/cassini.c writel(0x200, cp->regs + REG_MAC_SLOT_TIME); cp 3658 drivers/net/ethernet/sun/cassini.c cp->crc_size = 4; cp 3660 drivers/net/ethernet/sun/cassini.c cp->min_frame_size = CAS_1000MB_MIN_FRAME; cp 3663 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_MAC_TX_CFG); cp 3668 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_RX_CFG); cp 3671 drivers/net/ethernet/sun/cassini.c cp->crc_size = 0; cp 3672 drivers/net/ethernet/sun/cassini.c cp->min_frame_size = CAS_MIN_MTU; cp 3675 drivers/net/ethernet/sun/cassini.c cp->crc_size = 4; cp 3676 drivers/net/ethernet/sun/cassini.c cp->min_frame_size = CAS_MIN_FRAME; cp 3679 drivers/net/ethernet/sun/cassini.c cp->regs + REG_MAC_RX_CFG); cp 3680 drivers/net/ethernet/sun/cassini.c writel(0x40, cp->regs + REG_MAC_SLOT_TIME); cp 3683 drivers/net/ethernet/sun/cassini.c if (netif_msg_link(cp)) { cp 3685 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "Pause is enabled (rxfifo: %d off: %d on: %d)\n", cp 3686 drivers/net/ethernet/sun/cassini.c cp->rx_fifo_size, cp 3687 drivers/net/ethernet/sun/cassini.c cp->rx_pause_off, cp 3688 drivers/net/ethernet/sun/cassini.c cp->rx_pause_on); cp 3690 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "TX pause enabled\n"); cp 3692 drivers/net/ethernet/sun/cassini.c netdev_info(cp->dev, "Pause is disabled\n"); cp 3696 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_MAC_CTRL_CFG); cp 3704 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_MAC_CTRL_CFG); cp 3705 drivers/net/ethernet/sun/cassini.c cas_start_dma(cp); cp 3709 drivers/net/ethernet/sun/cassini.c static void cas_init_hw(struct cas *cp, int restart_link) cp 3712 drivers/net/ethernet/sun/cassini.c cas_phy_init(cp); cp 3714 drivers/net/ethernet/sun/cassini.c cas_init_pause_thresholds(cp); cp 3715 drivers/net/ethernet/sun/cassini.c cas_init_mac(cp); cp 3716 drivers/net/ethernet/sun/cassini.c cas_init_dma(cp); cp 3720 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 0; cp 3721 drivers/net/ethernet/sun/cassini.c cas_begin_auto_negotiation(cp, NULL); cp 3722 drivers/net/ethernet/sun/cassini.c } else if (cp->lstate == link_up) { cp 3723 drivers/net/ethernet/sun/cassini.c cas_set_link_modes(cp); cp 3724 drivers/net/ethernet/sun/cassini.c netif_carrier_on(cp->dev); cp 3732 drivers/net/ethernet/sun/cassini.c static void cas_hard_reset(struct cas *cp) cp 3734 drivers/net/ethernet/sun/cassini.c writel(BIM_LOCAL_DEV_SOFT_0, cp->regs + REG_BIM_LOCAL_DEV_EN); cp 3736 drivers/net/ethernet/sun/cassini.c pci_restore_state(cp->pdev); cp 3740 drivers/net/ethernet/sun/cassini.c static void cas_global_reset(struct cas *cp, int blkflag) cp 3745 drivers/net/ethernet/sun/cassini.c if (blkflag && !CAS_PHY_MII(cp->phy_type)) { cp 3753 drivers/net/ethernet/sun/cassini.c cp->regs + REG_SW_RESET); cp 3755 drivers/net/ethernet/sun/cassini.c writel(SW_RESET_TX | SW_RESET_RX, cp->regs + REG_SW_RESET); cp 3763 drivers/net/ethernet/sun/cassini.c u32 val = readl(cp->regs + REG_SW_RESET); cp 3768 drivers/net/ethernet/sun/cassini.c netdev_err(cp->dev, "sw reset failed\n"); cp 3773 drivers/net/ethernet/sun/cassini.c BIM_CFG_RTA_INTR_ENABLE, cp->regs + REG_BIM_CFG); cp 3781 drivers/net/ethernet/sun/cassini.c PCI_ERR_BIM_DMA_READ), cp->regs + cp 3787 drivers/net/ethernet/sun/cassini.c writel(PCS_DATAPATH_MODE_MII, cp->regs + REG_PCS_DATAPATH_MODE); cp 3790 drivers/net/ethernet/sun/cassini.c static void cas_reset(struct cas *cp, int blkflag) cp 3794 drivers/net/ethernet/sun/cassini.c cas_mask_intr(cp); cp 3795 drivers/net/ethernet/sun/cassini.c cas_global_reset(cp, blkflag); cp 3796 drivers/net/ethernet/sun/cassini.c cas_mac_reset(cp); cp 3797 drivers/net/ethernet/sun/cassini.c cas_entropy_reset(cp); cp 3800 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_TX_CFG); cp 3802 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_TX_CFG); cp 3804 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_RX_CFG); cp 3806 drivers/net/ethernet/sun/cassini.c writel(val, cp->regs + REG_RX_CFG); cp 3809 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_TARGET_ABORT) || cp 3811 drivers/net/ethernet/sun/cassini.c cas_load_firmware(cp, CAS_HP_FIRMWARE); cp 3813 drivers/net/ethernet/sun/cassini.c cas_load_firmware(cp, CAS_HP_ALT_FIRMWARE); cp 3817 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[N_TX_RINGS]); cp 3818 drivers/net/ethernet/sun/cassini.c cas_clear_mac_err(cp); cp 3819 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[N_TX_RINGS]); cp 3823 drivers/net/ethernet/sun/cassini.c static void cas_shutdown(struct cas *cp) cp 3828 drivers/net/ethernet/sun/cassini.c cp->hw_running = 0; cp 3830 drivers/net/ethernet/sun/cassini.c del_timer_sync(&cp->link_timer); cp 3834 drivers/net/ethernet/sun/cassini.c while (atomic_read(&cp->reset_task_pending_mtu) || cp 3835 drivers/net/ethernet/sun/cassini.c atomic_read(&cp->reset_task_pending_spare) || cp 3836 drivers/net/ethernet/sun/cassini.c atomic_read(&cp->reset_task_pending_all)) cp 3840 drivers/net/ethernet/sun/cassini.c while (atomic_read(&cp->reset_task_pending)) cp 3844 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 3845 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 3846 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_SATURN) cp 3847 drivers/net/ethernet/sun/cassini.c cas_phy_powerdown(cp); cp 3848 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 3853 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 3861 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 3862 drivers/net/ethernet/sun/cassini.c if ((cp->phy_type & CAS_PHY_SERDES)) { cp 3863 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_all); cp 3865 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_mtu); cp 3867 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 3869 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, (cp->phy_type & CAS_PHY_SERDES) ? cp 3872 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 3875 drivers/net/ethernet/sun/cassini.c flush_work(&cp->reset_task); cp 3879 drivers/net/ethernet/sun/cassini.c static void cas_clean_txd(struct cas *cp, int ring) cp 3881 drivers/net/ethernet/sun/cassini.c struct cas_tx_desc *txd = cp->init_txds[ring]; cp 3882 drivers/net/ethernet/sun/cassini.c struct sk_buff *skb, **skbs = cp->tx_skbs[ring]; cp 3905 drivers/net/ethernet/sun/cassini.c pci_unmap_page(cp->pdev, daddr, dlen, cp 3915 drivers/net/ethernet/sun/cassini.c if (cp->tx_tiny_use[ring][ent].used) cp 3923 drivers/net/ethernet/sun/cassini.c memset(cp->tx_tiny_use[ring], 0, size*sizeof(*cp->tx_tiny_use[ring])); cp 3927 drivers/net/ethernet/sun/cassini.c static inline void cas_free_rx_desc(struct cas *cp, int ring) cp 3929 drivers/net/ethernet/sun/cassini.c cas_page_t **page = cp->rx_pages[ring]; cp 3935 drivers/net/ethernet/sun/cassini.c cas_page_free(cp, page[i]); cp 3941 drivers/net/ethernet/sun/cassini.c static void cas_free_rxds(struct cas *cp) cp 3946 drivers/net/ethernet/sun/cassini.c cas_free_rx_desc(cp, i); cp 3950 drivers/net/ethernet/sun/cassini.c static void cas_clean_rings(struct cas *cp) cp 3955 drivers/net/ethernet/sun/cassini.c memset(cp->tx_old, 0, sizeof(*cp->tx_old)*N_TX_RINGS); cp 3956 drivers/net/ethernet/sun/cassini.c memset(cp->tx_new, 0, sizeof(*cp->tx_new)*N_TX_RINGS); cp 3958 drivers/net/ethernet/sun/cassini.c cas_clean_txd(cp, i); cp 3961 drivers/net/ethernet/sun/cassini.c memset(cp->init_block, 0, sizeof(struct cas_init_block)); cp 3962 drivers/net/ethernet/sun/cassini.c cas_clean_rxds(cp); cp 3963 drivers/net/ethernet/sun/cassini.c cas_clean_rxcs(cp); cp 3967 drivers/net/ethernet/sun/cassini.c static inline int cas_alloc_rx_desc(struct cas *cp, int ring) cp 3969 drivers/net/ethernet/sun/cassini.c cas_page_t **page = cp->rx_pages[ring]; cp 3974 drivers/net/ethernet/sun/cassini.c if ((page[i] = cas_page_alloc(cp, GFP_KERNEL)) == NULL) cp 3980 drivers/net/ethernet/sun/cassini.c static int cas_alloc_rxds(struct cas *cp) cp 3985 drivers/net/ethernet/sun/cassini.c if (cas_alloc_rx_desc(cp, i) < 0) { cp 3986 drivers/net/ethernet/sun/cassini.c cas_free_rxds(cp); cp 3995 drivers/net/ethernet/sun/cassini.c struct cas *cp = container_of(work, struct cas, reset_task); cp 3997 drivers/net/ethernet/sun/cassini.c int pending = atomic_read(&cp->reset_task_pending); cp 3999 drivers/net/ethernet/sun/cassini.c int pending_all = atomic_read(&cp->reset_task_pending_all); cp 4000 drivers/net/ethernet/sun/cassini.c int pending_spare = atomic_read(&cp->reset_task_pending_spare); cp 4001 drivers/net/ethernet/sun/cassini.c int pending_mtu = atomic_read(&cp->reset_task_pending_mtu); cp 4007 drivers/net/ethernet/sun/cassini.c atomic_dec(&cp->reset_task_pending); cp 4015 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) { cp 4019 drivers/net/ethernet/sun/cassini.c netif_device_detach(cp->dev); cp 4020 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 4022 drivers/net/ethernet/sun/cassini.c if (cp->opened) { cp 4027 drivers/net/ethernet/sun/cassini.c cas_spare_recover(cp, GFP_ATOMIC); cp 4045 drivers/net/ethernet/sun/cassini.c cas_reset(cp, !(pending_all > 0)); cp 4046 drivers/net/ethernet/sun/cassini.c if (cp->opened) cp 4047 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 4048 drivers/net/ethernet/sun/cassini.c cas_init_hw(cp, (pending_all > 0)); cp 4050 drivers/net/ethernet/sun/cassini.c cas_reset(cp, !(pending == CAS_RESET_ALL)); cp 4051 drivers/net/ethernet/sun/cassini.c if (cp->opened) cp 4052 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 4053 drivers/net/ethernet/sun/cassini.c cas_init_hw(cp, pending == CAS_RESET_ALL); cp 4057 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 4058 drivers/net/ethernet/sun/cassini.c netif_device_attach(cp->dev); cp 4061 drivers/net/ethernet/sun/cassini.c atomic_sub(pending_all, &cp->reset_task_pending_all); cp 4062 drivers/net/ethernet/sun/cassini.c atomic_sub(pending_spare, &cp->reset_task_pending_spare); cp 4063 drivers/net/ethernet/sun/cassini.c atomic_sub(pending_mtu, &cp->reset_task_pending_mtu); cp 4064 drivers/net/ethernet/sun/cassini.c atomic_dec(&cp->reset_task_pending); cp 4066 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, 0); cp 4072 drivers/net/ethernet/sun/cassini.c struct cas *cp = from_timer(cp, t, link_timer); cp 4077 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies_valid && cp 4078 drivers/net/ethernet/sun/cassini.c ((jiffies - cp->link_transition_jiffies) > cp 4084 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies_valid = 0; cp 4087 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) cp 4090 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4091 drivers/net/ethernet/sun/cassini.c cas_lock_tx(cp); cp 4092 drivers/net/ethernet/sun/cassini.c cas_entropy_gather(cp); cp 4098 drivers/net/ethernet/sun/cassini.c if (atomic_read(&cp->reset_task_pending_all) || cp 4099 drivers/net/ethernet/sun/cassini.c atomic_read(&cp->reset_task_pending_spare) || cp 4100 drivers/net/ethernet/sun/cassini.c atomic_read(&cp->reset_task_pending_mtu)) cp 4103 drivers/net/ethernet/sun/cassini.c if (atomic_read(&cp->reset_task_pending)) cp 4108 drivers/net/ethernet/sun/cassini.c if ((mask = (cp->cas_flags & CAS_FLAG_RXD_POST_MASK))) { cp 4117 drivers/net/ethernet/sun/cassini.c if (cas_post_rxds_ringN(cp, i, cp->rx_last[i]) < 0) { cp 4121 drivers/net/ethernet/sun/cassini.c cp->cas_flags &= ~rmask; cp 4125 drivers/net/ethernet/sun/cassini.c if (CAS_PHY_MII(cp->phy_type)) { cp 4127 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 4128 drivers/net/ethernet/sun/cassini.c bmsr = cas_phy_read(cp, MII_BMSR); cp 4134 drivers/net/ethernet/sun/cassini.c bmsr = cas_phy_read(cp, MII_BMSR); cp 4135 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 4136 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MIF_STATUS); /* avoid dups */ cp 4137 drivers/net/ethernet/sun/cassini.c reset = cas_mii_link_check(cp, bmsr); cp 4139 drivers/net/ethernet/sun/cassini.c reset = cas_pcs_link_check(cp); cp 4146 drivers/net/ethernet/sun/cassini.c if ((readl(cp->regs + REG_MAC_TX_STATUS) & MAC_TX_FRAME_XMIT) == 0) { cp 4147 drivers/net/ethernet/sun/cassini.c u32 val = readl(cp->regs + REG_MAC_STATE_MACHINE); cp 4153 drivers/net/ethernet/sun/cassini.c netif_printk(cp, tx_err, KERN_DEBUG, cp->dev, cp 4159 drivers/net/ethernet/sun/cassini.c val = readl(cp->regs + REG_TX_FIFO_PKT_CNT); cp 4160 drivers/net/ethernet/sun/cassini.c wptr = readl(cp->regs + REG_TX_FIFO_WRITE_PTR); cp 4161 drivers/net/ethernet/sun/cassini.c rptr = readl(cp->regs + REG_TX_FIFO_READ_PTR); cp 4163 drivers/net/ethernet/sun/cassini.c netif_printk(cp, tx_err, KERN_DEBUG, cp->dev, cp 4170 drivers/net/ethernet/sun/cassini.c cas_hard_reset(cp); cp 4176 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending); cp 4177 drivers/net/ethernet/sun/cassini.c atomic_inc(&cp->reset_task_pending_all); cp 4178 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 4180 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, CAS_RESET_ALL); cp 4182 drivers/net/ethernet/sun/cassini.c schedule_work(&cp->reset_task); cp 4187 drivers/net/ethernet/sun/cassini.c mod_timer(&cp->link_timer, jiffies + CAS_LINK_TIMEOUT); cp 4188 drivers/net/ethernet/sun/cassini.c cas_unlock_tx(cp); cp 4189 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4195 drivers/net/ethernet/sun/cassini.c static void cas_tx_tiny_free(struct cas *cp) cp 4197 drivers/net/ethernet/sun/cassini.c struct pci_dev *pdev = cp->pdev; cp 4201 drivers/net/ethernet/sun/cassini.c if (!cp->tx_tiny_bufs[i]) cp 4205 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_bufs[i], cp 4206 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_dvma[i]); cp 4207 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_bufs[i] = NULL; cp 4211 drivers/net/ethernet/sun/cassini.c static int cas_tx_tiny_alloc(struct cas *cp) cp 4213 drivers/net/ethernet/sun/cassini.c struct pci_dev *pdev = cp->pdev; cp 4217 drivers/net/ethernet/sun/cassini.c cp->tx_tiny_bufs[i] = cp 4219 drivers/net/ethernet/sun/cassini.c &cp->tx_tiny_dvma[i]); cp 4220 drivers/net/ethernet/sun/cassini.c if (!cp->tx_tiny_bufs[i]) { cp 4221 drivers/net/ethernet/sun/cassini.c cas_tx_tiny_free(cp); cp 4231 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4235 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 4237 drivers/net/ethernet/sun/cassini.c hw_was_up = cp->hw_running; cp 4242 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) { cp 4244 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 4250 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 4251 drivers/net/ethernet/sun/cassini.c cp->hw_running = 1; cp 4252 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 4256 drivers/net/ethernet/sun/cassini.c if (cas_tx_tiny_alloc(cp) < 0) cp 4260 drivers/net/ethernet/sun/cassini.c if (cas_alloc_rxds(cp) < 0) cp 4264 drivers/net/ethernet/sun/cassini.c cas_spare_init(cp); cp 4265 drivers/net/ethernet/sun/cassini.c cas_spare_recover(cp, GFP_KERNEL); cp 4272 drivers/net/ethernet/sun/cassini.c if (request_irq(cp->pdev->irq, cas_interrupt, cp 4274 drivers/net/ethernet/sun/cassini.c netdev_err(cp->dev, "failed to request irq !\n"); cp 4280 drivers/net/ethernet/sun/cassini.c napi_enable(&cp->napi); cp 4283 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 4284 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 4285 drivers/net/ethernet/sun/cassini.c cas_init_hw(cp, !hw_was_up); cp 4286 drivers/net/ethernet/sun/cassini.c cp->opened = 1; cp 4287 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 4290 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 4294 drivers/net/ethernet/sun/cassini.c cas_spare_free(cp); cp 4295 drivers/net/ethernet/sun/cassini.c cas_free_rxds(cp); cp 4297 drivers/net/ethernet/sun/cassini.c cas_tx_tiny_free(cp); cp 4299 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 4306 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4309 drivers/net/ethernet/sun/cassini.c napi_disable(&cp->napi); cp 4312 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 4317 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 4318 drivers/net/ethernet/sun/cassini.c cp->opened = 0; cp 4319 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 4320 drivers/net/ethernet/sun/cassini.c cas_phy_init(cp); cp 4321 drivers/net/ethernet/sun/cassini.c cas_begin_auto_negotiation(cp, NULL); cp 4322 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 4323 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 4325 drivers/net/ethernet/sun/cassini.c free_irq(cp->pdev->irq, (void *) dev); cp 4326 drivers/net/ethernet/sun/cassini.c cas_spare_free(cp); cp 4327 drivers/net/ethernet/sun/cassini.c cas_free_rxds(cp); cp 4328 drivers/net/ethernet/sun/cassini.c cas_tx_tiny_free(cp); cp 4329 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 4380 drivers/net/ethernet/sun/cassini.c static void cas_read_regs(struct cas *cp, u8 *ptr, int len) cp 4386 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4391 drivers/net/ethernet/sun/cassini.c hval = cas_phy_read(cp, cp 4395 drivers/net/ethernet/sun/cassini.c val= readl(cp->regs+ethtool_register_table[i].offsets); cp 4399 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4404 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4405 drivers/net/ethernet/sun/cassini.c struct net_device_stats *stats = cp->net_stats; cp 4411 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) cp 4422 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->stat_lock[N_TX_RINGS], flags); cp 4424 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_FCS_ERR) & 0xffff; cp 4426 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_ALIGN_ERR) &0xffff; cp 4428 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_LEN_ERR) & 0xffff; cp 4430 drivers/net/ethernet/sun/cassini.c tmp = (readl(cp->regs + REG_MAC_COLL_EXCESS) & 0xffff) + cp 4431 drivers/net/ethernet/sun/cassini.c (readl(cp->regs + REG_MAC_COLL_LATE) & 0xffff); cp 4434 drivers/net/ethernet/sun/cassini.c tmp + (readl(cp->regs + REG_MAC_COLL_NORMAL) & 0xffff); cp 4437 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_COLL_EXCESS); cp 4438 drivers/net/ethernet/sun/cassini.c stats[N_TX_RINGS].collisions += readl(cp->regs + REG_MAC_COLL_EXCESS) + cp 4439 drivers/net/ethernet/sun/cassini.c readl(cp->regs + REG_MAC_COLL_LATE); cp 4441 drivers/net/ethernet/sun/cassini.c cas_clear_mac_err(cp); cp 4444 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[0]); cp 4451 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[0]); cp 4454 drivers/net/ethernet/sun/cassini.c spin_lock(&cp->stat_lock[i]); cp 4467 drivers/net/ethernet/sun/cassini.c spin_unlock(&cp->stat_lock[i]); cp 4469 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->stat_lock[N_TX_RINGS], flags); cp 4476 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4481 drivers/net/ethernet/sun/cassini.c if (!cp->hw_running) cp 4484 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4485 drivers/net/ethernet/sun/cassini.c rxcfg = readl(cp->regs + REG_MAC_RX_CFG); cp 4488 drivers/net/ethernet/sun/cassini.c writel(rxcfg & ~MAC_RX_CFG_EN, cp->regs + REG_MAC_RX_CFG); cp 4489 drivers/net/ethernet/sun/cassini.c while (readl(cp->regs + REG_MAC_RX_CFG) & MAC_RX_CFG_EN) { cp 4498 drivers/net/ethernet/sun/cassini.c writel(rxcfg & ~MAC_RX_CFG_EN, cp->regs + REG_MAC_RX_CFG); cp 4499 drivers/net/ethernet/sun/cassini.c while (readl(cp->regs + REG_MAC_RX_CFG) & MAC_RX_CFG_HASH_FILTER_EN) { cp 4506 drivers/net/ethernet/sun/cassini.c cp->mac_rx_cfg = rxcfg_new = cas_setup_multicast(cp); cp 4508 drivers/net/ethernet/sun/cassini.c writel(rxcfg, cp->regs + REG_MAC_RX_CFG); cp 4509 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4514 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4517 drivers/net/ethernet/sun/cassini.c strlcpy(info->bus_info, pci_name(cp->pdev), sizeof(info->bus_info)); cp 4523 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4532 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_1000MB_CAP) { cp 4538 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4540 drivers/net/ethernet/sun/cassini.c linkstate = cp->lstate; cp 4541 drivers/net/ethernet/sun/cassini.c if (CAS_PHY_MII(cp->phy_type)) { cp 4543 drivers/net/ethernet/sun/cassini.c cmd->base.phy_address = cp->phy_addr; cp 4557 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) { cp 4558 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 4559 drivers/net/ethernet/sun/cassini.c bmcr = cas_phy_read(cp, MII_BMCR); cp 4560 drivers/net/ethernet/sun/cassini.c cas_read_mii_link_mode(cp, &full_duplex, cp 4562 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 4571 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) { cp 4573 drivers/net/ethernet/sun/cassini.c bmcr = readl(cp->regs + REG_PCS_MII_CTRL); cp 4574 drivers/net/ethernet/sun/cassini.c cas_read_pcs_link_mode(cp, &full_duplex, cp 4578 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4608 drivers/net/ethernet/sun/cassini.c if (cp->link_cntl & BMCR_ANENABLE) { cp 4613 drivers/net/ethernet/sun/cassini.c if (cp->link_cntl & BMCR_SPEED100) { cp 4615 drivers/net/ethernet/sun/cassini.c } else if (cp->link_cntl & CAS_BMCR_SPEED1000) { cp 4618 drivers/net/ethernet/sun/cassini.c cmd->base.duplex = (cp->link_cntl & BMCR_FULLDPLX) ? cp 4634 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4652 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4653 drivers/net/ethernet/sun/cassini.c cas_begin_auto_negotiation(cp, cmd); cp 4654 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4660 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4663 drivers/net/ethernet/sun/cassini.c if ((cp->link_cntl & BMCR_ANENABLE) == 0) cp 4667 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4668 drivers/net/ethernet/sun/cassini.c cas_begin_auto_negotiation(cp, NULL); cp 4669 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4676 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4677 drivers/net/ethernet/sun/cassini.c return cp->lstate == link_up; cp 4682 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4683 drivers/net/ethernet/sun/cassini.c return cp->msg_enable; cp 4688 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4689 drivers/net/ethernet/sun/cassini.c cp->msg_enable = value; cp 4694 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4695 drivers/net/ethernet/sun/cassini.c return cp->casreg_len < CAS_MAX_REGS ? cp->casreg_len: CAS_MAX_REGS; cp 4701 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4704 drivers/net/ethernet/sun/cassini.c cas_read_regs(cp, p, regs->len / sizeof(u32)); cp 4726 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4727 drivers/net/ethernet/sun/cassini.c struct net_device_stats *stats = cas_get_stats(cp->dev); cp 4765 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 4773 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 4776 drivers/net/ethernet/sun/cassini.c data->phy_id = cp->phy_addr; cp 4780 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4781 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 4782 drivers/net/ethernet/sun/cassini.c data->val_out = cas_phy_read(cp, data->reg_num & 0x1f); cp 4783 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 4784 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4789 drivers/net/ethernet/sun/cassini.c spin_lock_irqsave(&cp->lock, flags); cp 4790 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 0); cp 4791 drivers/net/ethernet/sun/cassini.c rc = cas_phy_write(cp, data->reg_num & 0x1f, data->val_in); cp 4792 drivers/net/ethernet/sun/cassini.c cas_mif_poll(cp, 1); cp 4793 drivers/net/ethernet/sun/cassini.c spin_unlock_irqrestore(&cp->lock, flags); cp 4799 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 4908 drivers/net/ethernet/sun/cassini.c struct cas *cp; cp 4929 drivers/net/ethernet/sun/cassini.c dev = alloc_etherdev(sizeof(*cp)); cp 5003 drivers/net/ethernet/sun/cassini.c cp = netdev_priv(dev); cp 5004 drivers/net/ethernet/sun/cassini.c cp->pdev = pdev; cp 5007 drivers/net/ethernet/sun/cassini.c cp->orig_cacheline_size = cas_cacheline_size ? orig_cacheline_size: 0; cp 5009 drivers/net/ethernet/sun/cassini.c cp->dev = dev; cp 5010 drivers/net/ethernet/sun/cassini.c cp->msg_enable = (cassini_debug < 0) ? CAS_DEF_MSG_ENABLE : cp 5014 drivers/net/ethernet/sun/cassini.c cp->of_node = pci_device_to_OF_node(pdev); cp 5017 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_UNKNOWN; cp 5018 drivers/net/ethernet/sun/cassini.c cp->link_transition_jiffies_valid = 0; cp 5020 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->lock); cp 5021 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->rx_inuse_lock); cp 5022 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->rx_spare_lock); cp 5024 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->stat_lock[i]); cp 5025 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->tx_lock[i]); cp 5027 drivers/net/ethernet/sun/cassini.c spin_lock_init(&cp->stat_lock[N_TX_RINGS]); cp 5028 drivers/net/ethernet/sun/cassini.c mutex_init(&cp->pm_mutex); cp 5030 drivers/net/ethernet/sun/cassini.c timer_setup(&cp->link_timer, cas_link_timer, 0); cp 5036 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending, 0); cp 5037 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending_all, 0); cp 5038 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending_spare, 0); cp 5039 drivers/net/ethernet/sun/cassini.c atomic_set(&cp->reset_task_pending_mtu, 0); cp 5041 drivers/net/ethernet/sun/cassini.c INIT_WORK(&cp->reset_task, cas_reset_task); cp 5045 drivers/net/ethernet/sun/cassini.c cp->link_cntl = link_modes[link_mode]; cp 5047 drivers/net/ethernet/sun/cassini.c cp->link_cntl = BMCR_ANENABLE; cp 5048 drivers/net/ethernet/sun/cassini.c cp->lstate = link_down; cp 5049 drivers/net/ethernet/sun/cassini.c cp->link_transition = LINK_TRANSITION_LINK_DOWN; cp 5050 drivers/net/ethernet/sun/cassini.c netif_carrier_off(cp->dev); cp 5051 drivers/net/ethernet/sun/cassini.c cp->timer_ticks = 0; cp 5054 drivers/net/ethernet/sun/cassini.c cp->regs = pci_iomap(pdev, 0, casreg_len); cp 5055 drivers/net/ethernet/sun/cassini.c if (!cp->regs) { cp 5059 drivers/net/ethernet/sun/cassini.c cp->casreg_len = casreg_len; cp 5062 drivers/net/ethernet/sun/cassini.c cas_check_pci_invariants(cp); cp 5063 drivers/net/ethernet/sun/cassini.c cas_hard_reset(cp); cp 5064 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 5065 drivers/net/ethernet/sun/cassini.c if (cas_check_invariants(cp)) cp 5067 drivers/net/ethernet/sun/cassini.c if (cp->cas_flags & CAS_FLAG_SATURN) cp 5068 drivers/net/ethernet/sun/cassini.c cas_saturn_firmware_init(cp); cp 5070 drivers/net/ethernet/sun/cassini.c cp->init_block = (struct cas_init_block *) cp 5072 drivers/net/ethernet/sun/cassini.c &cp->block_dvma); cp 5073 drivers/net/ethernet/sun/cassini.c if (!cp->init_block) { cp 5079 drivers/net/ethernet/sun/cassini.c cp->init_txds[i] = cp->init_block->txds[i]; cp 5082 drivers/net/ethernet/sun/cassini.c cp->init_rxds[i] = cp->init_block->rxds[i]; cp 5085 drivers/net/ethernet/sun/cassini.c cp->init_rxcs[i] = cp->init_block->rxcs[i]; cp 5088 drivers/net/ethernet/sun/cassini.c skb_queue_head_init(&cp->rx_flows[i]); cp 5095 drivers/net/ethernet/sun/cassini.c netif_napi_add(dev, &cp->napi, cas_poll, 64); cp 5101 drivers/net/ethernet/sun/cassini.c if ((cp->cas_flags & CAS_FLAG_NO_HW_CSUM) == 0) cp 5116 drivers/net/ethernet/sun/cassini.c i = readl(cp->regs + REG_BIM_CFG); cp 5118 drivers/net/ethernet/sun/cassini.c (cp->cas_flags & CAS_FLAG_REG_PLUS) ? "+" : "", cp 5121 drivers/net/ethernet/sun/cassini.c (cp->phy_type == CAS_PHY_SERDES) ? "Fi" : "Cu", pdev->irq, cp 5125 drivers/net/ethernet/sun/cassini.c cp->hw_running = 1; cp 5126 drivers/net/ethernet/sun/cassini.c cas_entropy_reset(cp); cp 5127 drivers/net/ethernet/sun/cassini.c cas_phy_init(cp); cp 5128 drivers/net/ethernet/sun/cassini.c cas_begin_auto_negotiation(cp, NULL); cp 5133 drivers/net/ethernet/sun/cassini.c cp->init_block, cp->block_dvma); cp 5136 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 5137 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) cp 5138 drivers/net/ethernet/sun/cassini.c cas_shutdown(cp); cp 5139 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 5141 drivers/net/ethernet/sun/cassini.c pci_iounmap(pdev, cp->regs); cp 5163 drivers/net/ethernet/sun/cassini.c struct cas *cp; cp 5167 drivers/net/ethernet/sun/cassini.c cp = netdev_priv(dev); cp 5170 drivers/net/ethernet/sun/cassini.c vfree(cp->fw_data); cp 5172 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 5173 drivers/net/ethernet/sun/cassini.c cancel_work_sync(&cp->reset_task); cp 5174 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) cp 5175 drivers/net/ethernet/sun/cassini.c cas_shutdown(cp); cp 5176 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 5179 drivers/net/ethernet/sun/cassini.c if (cp->orig_cacheline_size) { cp 5184 drivers/net/ethernet/sun/cassini.c cp->orig_cacheline_size); cp 5188 drivers/net/ethernet/sun/cassini.c cp->init_block, cp->block_dvma); cp 5189 drivers/net/ethernet/sun/cassini.c pci_iounmap(pdev, cp->regs); cp 5199 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 5202 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 5205 drivers/net/ethernet/sun/cassini.c if (cp->opened) { cp 5208 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 5215 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 5216 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 5217 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 5220 drivers/net/ethernet/sun/cassini.c if (cp->hw_running) cp 5221 drivers/net/ethernet/sun/cassini.c cas_shutdown(cp); cp 5222 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 5230 drivers/net/ethernet/sun/cassini.c struct cas *cp = netdev_priv(dev); cp 5234 drivers/net/ethernet/sun/cassini.c mutex_lock(&cp->pm_mutex); cp 5235 drivers/net/ethernet/sun/cassini.c cas_hard_reset(cp); cp 5236 drivers/net/ethernet/sun/cassini.c if (cp->opened) { cp 5238 drivers/net/ethernet/sun/cassini.c cas_lock_all_save(cp, flags); cp 5239 drivers/net/ethernet/sun/cassini.c cas_reset(cp, 0); cp 5240 drivers/net/ethernet/sun/cassini.c cp->hw_running = 1; cp 5241 drivers/net/ethernet/sun/cassini.c cas_clean_rings(cp); cp 5242 drivers/net/ethernet/sun/cassini.c cas_init_hw(cp, 1); cp 5243 drivers/net/ethernet/sun/cassini.c cas_unlock_all_restore(cp, flags); cp 5247 drivers/net/ethernet/sun/cassini.c mutex_unlock(&cp->pm_mutex); cp 2874 drivers/net/ethernet/sun/cassini.h #define TX_BUFFS_AVAIL(cp, i) ((cp)->tx_old[(i)] <= (cp)->tx_new[(i)] ? \ cp 2875 drivers/net/ethernet/sun/cassini.h (cp)->tx_old[(i)] + (TX_DESC_RINGN_SIZE(i) - 1) - (cp)->tx_new[(i)] : \ cp 2876 drivers/net/ethernet/sun/cassini.h (cp)->tx_old[(i)] - (cp)->tx_new[(i)] - 1) cp 4995 drivers/net/ethernet/sun/niu.c struct niu_classifier *cp = &np->clas; cp 4999 drivers/net/ethernet/sun/niu.c index = cp->tcam_top; cp 5017 drivers/net/ethernet/sun/niu.c cp->tcam_valid_entries++; cp 5025 drivers/net/ethernet/sun/niu.c struct niu_classifier *cp = &np->clas; cp 5028 drivers/net/ethernet/sun/niu.c nw64(H1POLY, cp->h1_init); cp 5029 drivers/net/ethernet/sun/niu.c nw64(H2POLY, cp->h2_init); cp 5036 drivers/net/ethernet/sun/niu.c struct niu_vlan_rdc *vp = &cp->vlan_mappings[i]; cp 5042 drivers/net/ethernet/sun/niu.c for (i = 0; i < cp->num_alt_mac_mappings; i++) { cp 5043 drivers/net/ethernet/sun/niu.c struct niu_altmac_rdc *ap = &cp->alt_mac_mappings[i]; cp 8937 drivers/net/ethernet/sun/niu.c struct niu_classifier *cp = &np->clas; cp 8939 drivers/net/ethernet/sun/niu.c cp->tcam_top = (u16) np->port; cp 8940 drivers/net/ethernet/sun/niu.c cp->tcam_sz = np->parent->tcam_num_entries / np->parent->num_ports; cp 8941 drivers/net/ethernet/sun/niu.c cp->h1_init = 0xffffffff; cp 8942 drivers/net/ethernet/sun/niu.c cp->h2_init = 0xffff; cp 110 drivers/net/ethernet/ti/davinci_cpdma.c void __iomem *hdp, *cp, *rxfree; cp 908 drivers/net/ethernet/ti/davinci_cpdma.c chan->cp = ctlr->params.rxcp + offset; cp 916 drivers/net/ethernet/ti/davinci_cpdma.c chan->cp = ctlr->params.txcp + offset; cp 1254 drivers/net/ethernet/ti/davinci_cpdma.c chan_write(chan, cp, desc_dma); cp 1335 drivers/net/ethernet/ti/davinci_cpdma.c u32 cp = chan_read(chan, cp); cp 1336 drivers/net/ethernet/ti/davinci_cpdma.c if ((cp & CPDMA_TEARDOWN_VALUE) == CPDMA_TEARDOWN_VALUE) cp 1342 drivers/net/ethernet/ti/davinci_cpdma.c chan_write(chan, cp, CPDMA_TEARDOWN_VALUE); cp 893 drivers/net/fddi/skfp/h/skfbi.h #define INC_PTR(sp,cp,ep) if (++cp == ep) cp = sp cp 1574 drivers/net/fddi/skfp/skfddi.c unsigned char *virt, *cp; cp 1619 drivers/net/fddi/skfp/skfddi.c cp = virt + FDDI_MAC_HDR_LEN; // Point behind MAC header. cp 1621 drivers/net/fddi/skfp/skfddi.c ri = ntohs(*((__be16 *) cp)); cp 1631 drivers/net/fddi/skfp/skfddi.c virt = cp + RifLength; cp 1633 drivers/net/fddi/skfp/skfddi.c *--virt = *--cp; cp 436 drivers/net/hamradio/6pack.c const unsigned char *cp, char *fp, int count) cp 458 drivers/net/hamradio/6pack.c sixpack_decode(sp, cp, count1); cp 530 drivers/net/hamradio/baycom_epp.c unsigned char *cp; cp 543 drivers/net/hamradio/baycom_epp.c cp = skb_put(skb, pktlen); cp 544 drivers/net/hamradio/baycom_epp.c *cp++ = 0; /* KISS kludge */ cp 545 drivers/net/hamradio/baycom_epp.c memcpy(cp, bc->hdlcrx.buf, pktlen - 1); cp 557 drivers/net/hamradio/baycom_epp.c unsigned char *cp; cp 572 drivers/net/hamradio/baycom_epp.c cp = tmp; cp 573 drivers/net/hamradio/baycom_epp.c for (; cnt2 > 0; cnt2--, cp++) { cp 575 drivers/net/hamradio/baycom_epp.c bitstream |= (*cp) << 8; cp 577 drivers/net/hamradio/baycom_epp.c bitbuf |= (*cp) << 8; cp 975 drivers/net/hamradio/baycom_epp.c const char *cp; cp 989 drivers/net/hamradio/baycom_epp.c if ((cp = strstr(modestr,"fclk="))) { cp 990 drivers/net/hamradio/baycom_epp.c bc->cfg.fclk = simple_strtoul(cp+5, NULL, 0); cp 996 drivers/net/hamradio/baycom_epp.c if ((cp = strstr(modestr,"bps="))) { cp 997 drivers/net/hamradio/baycom_epp.c bc->cfg.bps = simple_strtoul(cp+4, NULL, 0); cp 1023 drivers/net/hamradio/baycom_epp.c hi.data.cp.tx_delay = bc->ch_params.tx_delay; cp 1024 drivers/net/hamradio/baycom_epp.c hi.data.cp.tx_tail = bc->ch_params.tx_tail; cp 1025 drivers/net/hamradio/baycom_epp.c hi.data.cp.slottime = bc->ch_params.slottime; cp 1026 drivers/net/hamradio/baycom_epp.c hi.data.cp.ppersist = bc->ch_params.ppersist; cp 1027 drivers/net/hamradio/baycom_epp.c hi.data.cp.fulldup = bc->ch_params.fulldup; cp 1033 drivers/net/hamradio/baycom_epp.c bc->ch_params.tx_delay = hi.data.cp.tx_delay; cp 1034 drivers/net/hamradio/baycom_epp.c bc->ch_params.tx_tail = hi.data.cp.tx_tail; cp 1035 drivers/net/hamradio/baycom_epp.c bc->ch_params.slottime = hi.data.cp.slottime; cp 1036 drivers/net/hamradio/baycom_epp.c bc->ch_params.ppersist = hi.data.cp.ppersist; cp 1037 drivers/net/hamradio/baycom_epp.c bc->ch_params.fulldup = hi.data.cp.fulldup; cp 135 drivers/net/hamradio/hdlcdrv.c unsigned char *cp; cp 147 drivers/net/hamradio/hdlcdrv.c cp = skb_put(skb, pkt_len); cp 148 drivers/net/hamradio/hdlcdrv.c *cp++ = 0; /* KISS kludge */ cp 149 drivers/net/hamradio/hdlcdrv.c memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); cp 506 drivers/net/hamradio/hdlcdrv.c bi.data.cp.tx_delay = s->ch_params.tx_delay; cp 507 drivers/net/hamradio/hdlcdrv.c bi.data.cp.tx_tail = s->ch_params.tx_tail; cp 508 drivers/net/hamradio/hdlcdrv.c bi.data.cp.slottime = s->ch_params.slottime; cp 509 drivers/net/hamradio/hdlcdrv.c bi.data.cp.ppersist = s->ch_params.ppersist; cp 510 drivers/net/hamradio/hdlcdrv.c bi.data.cp.fulldup = s->ch_params.fulldup; cp 516 drivers/net/hamradio/hdlcdrv.c s->ch_params.tx_delay = bi.data.cp.tx_delay; cp 517 drivers/net/hamradio/hdlcdrv.c s->ch_params.tx_tail = bi.data.cp.tx_tail; cp 518 drivers/net/hamradio/hdlcdrv.c s->ch_params.slottime = bi.data.cp.slottime; cp 519 drivers/net/hamradio/hdlcdrv.c s->ch_params.ppersist = bi.data.cp.ppersist; cp 520 drivers/net/hamradio/hdlcdrv.c s->ch_params.fulldup = bi.data.cp.fulldup; cp 115 drivers/net/hamradio/mkiss.c static unsigned short calc_crc_flex(unsigned char *cp, int size) cp 120 drivers/net/hamradio/mkiss.c crc = (crc << 8) ^ crc_flex_table[((crc >> 8) ^ *cp++) & 0xff]; cp 125 drivers/net/hamradio/mkiss.c static int check_crc_flex(unsigned char *cp, int size) cp 133 drivers/net/hamradio/mkiss.c crc = (crc << 8) ^ crc_flex_table[((crc >> 8) ^ *cp++) & 0xff]; cp 141 drivers/net/hamradio/mkiss.c static int check_crc_16(unsigned char *cp, int size) cp 148 drivers/net/hamradio/mkiss.c crc = crc16(0, cp, size); cp 874 drivers/net/hamradio/mkiss.c static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 894 drivers/net/hamradio/mkiss.c cp++; cp 898 drivers/net/hamradio/mkiss.c kiss_unesc(ax, *cp++); cp 541 drivers/net/hamradio/yam.c unsigned char *cp; cp 542 drivers/net/hamradio/yam.c cp = skb_put(skb, pkt_len); cp 543 drivers/net/hamradio/yam.c *cp++ = 0; /* KISS kludge */ cp 544 drivers/net/hamradio/yam.c memcpy(cp, yp->rx_buf, pkt_len - 1); cp 192 drivers/net/ppp/bsd_comp.c extern int ppp_register_compressor (struct compressor *cp); cp 193 drivers/net/ppp/bsd_comp.c extern void ppp_unregister_compressor (struct compressor *cp); cp 566 drivers/net/ppp/ppp_deflate.c extern int ppp_register_compressor (struct compressor *cp); cp 567 drivers/net/ppp/ppp_deflate.c extern void ppp_unregister_compressor (struct compressor *cp); cp 1507 drivers/net/ppp/ppp_generic.c unsigned char *cp; cp 1550 drivers/net/ppp/ppp_generic.c cp = skb->data + 2; cp 1551 drivers/net/ppp/ppp_generic.c len = slhc_compress(ppp->vj, cp, skb->len - 2, cp 1552 drivers/net/ppp/ppp_generic.c new_skb->data + 2, &cp, cp 1554 drivers/net/ppp/ppp_generic.c if (cp == skb->data + 2) { cp 1558 drivers/net/ppp/ppp_generic.c if (cp[0] & SL_TYPE_COMPRESSED_TCP) { cp 1560 drivers/net/ppp/ppp_generic.c cp[0] &= ~SL_TYPE_COMPRESSED_TCP; cp 1563 drivers/net/ppp/ppp_generic.c cp[0] = skb->data[2]; cp 1567 drivers/net/ppp/ppp_generic.c cp = skb_put(skb, len + 2); cp 1568 drivers/net/ppp/ppp_generic.c cp[0] = 0; cp 1569 drivers/net/ppp/ppp_generic.c cp[1] = proto; cp 2740 drivers/net/ppp/ppp_generic.c struct compressor *cp, *ocomp; cp 2757 drivers/net/ppp/ppp_generic.c cp = try_then_request_module( cp 2760 drivers/net/ppp/ppp_generic.c if (!cp) cp 2765 drivers/net/ppp/ppp_generic.c state = cp->comp_alloc(ccp_option, data.length); cp 2771 drivers/net/ppp/ppp_generic.c ppp->xcomp = cp; cp 2780 drivers/net/ppp/ppp_generic.c module_put(cp->owner); cp 2783 drivers/net/ppp/ppp_generic.c state = cp->decomp_alloc(ccp_option, data.length); cp 2789 drivers/net/ppp/ppp_generic.c ppp->rcomp = cp; cp 2798 drivers/net/ppp/ppp_generic.c module_put(cp->owner); cp 2945 drivers/net/ppp/ppp_generic.c ppp_register_compressor(struct compressor *cp) cp 2951 drivers/net/ppp/ppp_generic.c if (find_comp_entry(cp->compress_proto)) cp 2958 drivers/net/ppp/ppp_generic.c ce->comp = cp; cp 2967 drivers/net/ppp/ppp_generic.c ppp_unregister_compressor(struct compressor *cp) cp 2972 drivers/net/ppp/ppp_generic.c ce = find_comp_entry(cp->compress_proto); cp 2973 drivers/net/ppp/ppp_generic.c if (ce && ce->comp == cp) { cp 2985 drivers/net/ppp/ppp_generic.c struct compressor *cp = NULL; cp 2990 drivers/net/ppp/ppp_generic.c cp = ce->comp; cp 2991 drivers/net/ppp/ppp_generic.c if (!try_module_get(cp->owner)) cp 2992 drivers/net/ppp/ppp_generic.c cp = NULL; cp 2995 drivers/net/ppp/ppp_generic.c return cp; cp 82 drivers/net/slip/slhc.c static unsigned char *encode(unsigned char *cp, unsigned short n); cp 84 drivers/net/slip/slhc.c static unsigned char * put16(unsigned char *cp, unsigned short x); cp 171 drivers/net/slip/slhc.c put16(unsigned char *cp, unsigned short x) cp 173 drivers/net/slip/slhc.c *cp++ = x >> 8; cp 174 drivers/net/slip/slhc.c *cp++ = x; cp 176 drivers/net/slip/slhc.c return cp; cp 182 drivers/net/slip/slhc.c encode(unsigned char *cp, unsigned short n) cp 185 drivers/net/slip/slhc.c *cp++ = 0; cp 186 drivers/net/slip/slhc.c cp = put16(cp,n); cp 188 drivers/net/slip/slhc.c *cp++ = n; cp 190 drivers/net/slip/slhc.c return cp; cp 237 drivers/net/slip/slhc.c unsigned char *cp = new_seq; cp 371 drivers/net/slip/slhc.c cp = encode(cp,deltaS); cp 381 drivers/net/slip/slhc.c cp = encode(cp,deltaS); cp 387 drivers/net/slip/slhc.c cp = encode(cp,deltaA); cp 393 drivers/net/slip/slhc.c cp = encode(cp,deltaS); cp 420 drivers/net/slip/slhc.c cp = new_seq; cp 427 drivers/net/slip/slhc.c cp = new_seq; cp 433 drivers/net/slip/slhc.c cp = encode(cp,deltaS); cp 450 drivers/net/slip/slhc.c deltaS = cp - new_seq; cp 452 drivers/net/slip/slhc.c cp = ocp; cp 454 drivers/net/slip/slhc.c *cp++ = changes | NEW_C; cp 455 drivers/net/slip/slhc.c *cp++ = cs->cs_this; cp 458 drivers/net/slip/slhc.c cp = ocp; cp 460 drivers/net/slip/slhc.c *cp++ = changes; cp 462 drivers/net/slip/slhc.c *(__sum16 *)cp = csum; cp 463 drivers/net/slip/slhc.c cp += 2; cp 465 drivers/net/slip/slhc.c memcpy(cp,new_seq,deltaS); /* Write list of deltas */ cp 466 drivers/net/slip/slhc.c memcpy(cp+deltaS,icp+hlen,isize-hlen); cp 469 drivers/net/slip/slhc.c return isize - hlen + deltaS + (cp - ocp); cp 501 drivers/net/slip/slhc.c unsigned char *cp = icp; cp 509 drivers/net/slip/slhc.c changes = *cp++; cp 514 drivers/net/slip/slhc.c x = *cp++; /* Read conn index */ cp 537 drivers/net/slip/slhc.c thp->check = *(__sum16 *)cp; cp 538 drivers/net/slip/slhc.c cp += 2; cp 567 drivers/net/slip/slhc.c if((x = decode(&cp)) == -1) { cp 574 drivers/net/slip/slhc.c if((x = decode(&cp)) == -1) { cp 580 drivers/net/slip/slhc.c if((x = decode(&cp)) == -1) { cp 586 drivers/net/slip/slhc.c if((x = decode(&cp)) == -1) { cp 594 drivers/net/slip/slhc.c if((x = decode(&cp)) == -1) { cp 607 drivers/net/slip/slhc.c len = isize - (cp - icp); cp 614 drivers/net/slip/slhc.c memmove(icp + hdrlen, cp, len - hdrlen); cp 616 drivers/net/slip/slhc.c cp = icp; cp 617 drivers/net/slip/slhc.c memcpy(cp, ip, 20); cp 618 drivers/net/slip/slhc.c cp += 20; cp 621 drivers/net/slip/slhc.c memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); cp 622 drivers/net/slip/slhc.c cp += (ip->ihl - 5) * 4; cp 628 drivers/net/slip/slhc.c memcpy(cp, thp, 20); cp 629 drivers/net/slip/slhc.c cp += 20; cp 632 drivers/net/slip/slhc.c memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4); cp 633 drivers/net/slip/slhc.c cp += ((thp->doff) - 5) * 4; cp 690 drivers/net/slip/slip.c static void slip_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 703 drivers/net/slip/slip.c cp++; cp 708 drivers/net/slip/slip.c slip_unesc6(sl, *cp++); cp 711 drivers/net/slip/slip.c slip_unesc(sl, *cp++); cp 170 drivers/net/wan/hd64570.c writew(chain_off, &desc->cp); cp 152 drivers/net/wan/hd64570.h u16 cp; /* Chain Pointer */ cp 144 drivers/net/wan/hd64572.c writel(chain_off, &desc->cp); cp 179 drivers/net/wan/hd64572.h u32 cp; /* pointer to next block descriptor */ cp 208 drivers/net/wan/hdlc_ppp.c struct cp_header *cp; cp 228 drivers/net/wan/hdlc_ppp.c cp = skb_put(skb, sizeof(struct cp_header)); cp 229 drivers/net/wan/hdlc_ppp.c cp->code = code; cp 230 drivers/net/wan/hdlc_ppp.c cp->id = id; cp 231 drivers/net/wan/hdlc_ppp.c cp->len = htons(sizeof(struct cp_header) + magic_len + len); cp 435 drivers/net/wan/hdlc_ppp.c struct cp_header *cp; cp 448 drivers/net/wan/hdlc_ppp.c cp = skb_pull(skb, sizeof(struct hdlc_header)); cp 462 drivers/net/wan/hdlc_ppp.c len = ntohs(cp->len); cp 471 drivers/net/wan/hdlc_ppp.c if (cp->code < CP_CODES) cp 472 drivers/net/wan/hdlc_ppp.c sprintf(debug_buffer, "[%s id 0x%X]", code_names[cp->code], cp 473 drivers/net/wan/hdlc_ppp.c cp->id); cp 475 drivers/net/wan/hdlc_ppp.c sprintf(debug_buffer, "[code %u id 0x%X]", cp->code, cp->id); cp 487 drivers/net/wan/hdlc_ppp.c switch (cp->code) { cp 499 drivers/net/wan/hdlc_ppp.c cp->id, len - 4, skb->data + 4); cp 503 drivers/net/wan/hdlc_ppp.c if (cp->id == ppp->echo_id) cp 512 drivers/net/wan/hdlc_ppp.c switch (cp->code) { cp 514 drivers/net/wan/hdlc_ppp.c ppp_cp_parse_cr(dev, pid, cp->id, len, skb->data); cp 518 drivers/net/wan/hdlc_ppp.c if (cp->id == proto->cr_id) cp 524 drivers/net/wan/hdlc_ppp.c if (cp->id == proto->cr_id) cp 529 drivers/net/wan/hdlc_ppp.c ppp_cp_event(dev, pid, RTR, 0, cp->id, 0, NULL); cp 544 drivers/net/wan/hdlc_ppp.c ppp_cp_event(dev, pid, RUC, 0, 0, len, cp); cp 522 drivers/net/wan/x25_asy.c const unsigned char *cp, char *fp, int count) cp 535 drivers/net/wan/x25_asy.c cp++; cp 538 drivers/net/wan/x25_asy.c x25_asy_unesc(sl, *cp++); cp 46 drivers/net/wireless/ath/wil6210/ethtool.c struct ethtool_coalesce *cp) cp 69 drivers/net/wireless/ath/wil6210/ethtool.c cp->tx_coalesce_usecs = tx_itr_val; cp 70 drivers/net/wireless/ath/wil6210/ethtool.c cp->rx_coalesce_usecs = rx_itr_val; cp 75 drivers/net/wireless/ath/wil6210/ethtool.c struct ethtool_coalesce *cp) cp 82 drivers/net/wireless/ath/wil6210/ethtool.c cp->rx_coalesce_usecs, cp->tx_coalesce_usecs); cp 93 drivers/net/wireless/ath/wil6210/ethtool.c if (cp->rx_coalesce_usecs > WIL6210_ITR_TRSH_MAX || cp 94 drivers/net/wireless/ath/wil6210/ethtool.c cp->tx_coalesce_usecs > WIL6210_ITR_TRSH_MAX) cp 97 drivers/net/wireless/ath/wil6210/ethtool.c wil->tx_max_burst_duration = cp->tx_coalesce_usecs; cp 98 drivers/net/wireless/ath/wil6210/ethtool.c wil->rx_max_burst_duration = cp->rx_coalesce_usecs; cp 113 drivers/net/wireless/ath/wil6210/ethtool.c cp, sizeof(*cp), false); cp 238 drivers/net/wireless/mac80211_hwsim.c struct hwsim_chanctx_priv *cp = (void *)c->drv_priv; cp 239 drivers/net/wireless/mac80211_hwsim.c WARN_ON(cp->magic != HWSIM_CHANCTX_MAGIC); cp 244 drivers/net/wireless/mac80211_hwsim.c struct hwsim_chanctx_priv *cp = (void *)c->drv_priv; cp 245 drivers/net/wireless/mac80211_hwsim.c cp->magic = HWSIM_CHANCTX_MAGIC; cp 250 drivers/net/wireless/mac80211_hwsim.c struct hwsim_chanctx_priv *cp = (void *)c->drv_priv; cp 251 drivers/net/wireless/mac80211_hwsim.c cp->magic = 0; cp 69 drivers/of/address.c u64 cp, s, da; cp 71 drivers/of/address.c cp = of_read_number(range, na); cp 76 drivers/of/address.c (unsigned long long)cp, (unsigned long long)s, cp 79 drivers/of/address.c if (da < cp || da >= (cp + s)) cp 81 drivers/of/address.c return da - cp; cp 148 drivers/of/address.c u64 cp, s, da; cp 159 drivers/of/address.c cp = of_read_number(range + 1, na - 1); cp 164 drivers/of/address.c (unsigned long long)cp, (unsigned long long)s, cp 167 drivers/of/address.c if (da < cp || da >= (cp + s)) cp 169 drivers/of/address.c return da - cp; cp 389 drivers/of/address.c u64 cp, s, da; cp 396 drivers/of/address.c cp = of_read_number(range + 1, na - 1); cp 401 drivers/of/address.c (unsigned long long)cp, (unsigned long long)s, cp 404 drivers/of/address.c if (da < cp || da >= (cp + s)) cp 406 drivers/of/address.c return da - cp; cp 514 drivers/of/base.c const char *cp; cp 520 drivers/of/base.c for (cp = of_prop_next_string(prop, NULL); cp; cp 521 drivers/of/base.c cp = of_prop_next_string(prop, cp), index++) { cp 522 drivers/of/base.c if (of_compat_cmp(cp, compat, strlen(compat)) == 0) { cp 729 drivers/of/fdt.c const char *cp; cp 733 drivers/of/fdt.c cp = fdt_getprop(blob, node, "compatible", &cplen); cp 734 drivers/of/fdt.c if (cp == NULL) cp 738 drivers/of/fdt.c if (of_compat_cmp(cp, compat, strlen(compat)) == 0) cp 740 drivers/of/fdt.c l = strlen(cp) + 1; cp 741 drivers/of/fdt.c cp += l; cp 73 drivers/of/fdt_address.c u64 cp, s, da; cp 75 drivers/of/fdt_address.c cp = of_read_number(range, na); cp 80 drivers/of/fdt_address.c cp, s, da); cp 82 drivers/of/fdt_address.c if (da < cp || da >= (cp + s)) cp 84 drivers/of/fdt_address.c return da - cp; cp 33 drivers/of/of_mdio.c const char *cp; cp 36 drivers/of/of_mdio.c of_property_for_each_string(device, "compatible", prop, cp) { cp 37 drivers/of/of_mdio.c if (sscanf(cp, "ethernet-phy-id%4x.%4x", &upper, &lower) == 2) { cp 558 drivers/pci/pci-sysfs.c char *driver_override, *old, *cp; cp 568 drivers/pci/pci-sysfs.c cp = strchr(driver_override, '\n'); cp 569 drivers/pci/pci-sysfs.c if (cp) cp 570 drivers/pci/pci-sysfs.c *cp = '\0'; cp 439 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-all-cp-req, 0x04), cp 440 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-cp-blk-req, 0x05), cp 441 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-cp-ptl-req, 0x06), cp 442 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-cp-rd-req, 0x07), cp 443 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-cp-wr-req, 0x08), cp 459 drivers/perf/xgene_pmu.c XGENE_PMU_EVENT_ATTR(pa-total-cp-snoops, 0x20), cp 244 drivers/platform/x86/alienware-wmi.c struct color_platform cp; cp 258 drivers/platform/x86/alienware-wmi.c repackager.cp.red, repackager.cp.green, repackager.cp.blue); cp 259 drivers/platform/x86/alienware-wmi.c zone->colors = repackager.cp; cp 77 drivers/s390/char/con3270.c static void con3270_set_timer(struct con3270 *cp, int expires) cp 80 drivers/s390/char/con3270.c del_timer(&cp->timer); cp 82 drivers/s390/char/con3270.c mod_timer(&cp->timer, jiffies + expires); cp 91 drivers/s390/char/con3270.c con3270_update_status(struct con3270 *cp) cp 95 drivers/s390/char/con3270.c str = (cp->nr_up != 0) ? "History" : "Running"; cp 96 drivers/s390/char/con3270.c memcpy(cp->status->string + 24, str, 7); cp 97 drivers/s390/char/con3270.c codepage_convert(cp->view.ascebc, cp->status->string + 24, 7); cp 98 drivers/s390/char/con3270.c cp->update_flags |= CON_UPDATE_STATUS; cp 102 drivers/s390/char/con3270.c con3270_create_status(struct con3270 *cp) cp 109 drivers/s390/char/con3270.c cp->status = alloc_string(&cp->freemem, sizeof(blueprint)); cp 111 drivers/s390/char/con3270.c memcpy(cp->status->string, blueprint, sizeof(blueprint)); cp 113 drivers/s390/char/con3270.c raw3270_buffer_address(cp->view.dev, cp->status->string + 1, cp 114 drivers/s390/char/con3270.c cp->view.cols * (cp->view.rows - 1)); cp 115 drivers/s390/char/con3270.c raw3270_buffer_address(cp->view.dev, cp->status->string + 21, cp 116 drivers/s390/char/con3270.c cp->view.cols * cp->view.rows - 8); cp 118 drivers/s390/char/con3270.c codepage_convert(cp->view.ascebc, cp->status->string + 8, 12); cp 119 drivers/s390/char/con3270.c codepage_convert(cp->view.ascebc, cp->status->string + 24, 7); cp 126 drivers/s390/char/con3270.c con3270_update_string(struct con3270 *cp, struct string *s, int nr) cp 135 drivers/s390/char/con3270.c raw3270_buffer_address(cp->view.dev, s->string + s->len - 3, cp 136 drivers/s390/char/con3270.c cp->view.cols * (nr + 1)); cp 143 drivers/s390/char/con3270.c con3270_rebuild_update(struct con3270 *cp) cp 152 drivers/s390/char/con3270.c list_for_each_entry_safe(s, n, &cp->update, update) cp 154 drivers/s390/char/con3270.c nr = cp->view.rows - 2 + cp->nr_up; cp 155 drivers/s390/char/con3270.c list_for_each_entry_reverse(s, &cp->lines, list) { cp 156 drivers/s390/char/con3270.c if (nr < cp->view.rows - 1) cp 157 drivers/s390/char/con3270.c list_add(&s->update, &cp->update); cp 161 drivers/s390/char/con3270.c cp->line_nr = 0; cp 162 drivers/s390/char/con3270.c cp->update_flags |= CON_UPDATE_LIST; cp 169 drivers/s390/char/con3270.c con3270_alloc_string(struct con3270 *cp, size_t size) cp 173 drivers/s390/char/con3270.c s = alloc_string(&cp->freemem, size); cp 176 drivers/s390/char/con3270.c list_for_each_entry_safe(s, n, &cp->lines, list) { cp 180 drivers/s390/char/con3270.c cp->nr_lines--; cp 181 drivers/s390/char/con3270.c if (free_string(&cp->freemem, s) >= size) cp 184 drivers/s390/char/con3270.c s = alloc_string(&cp->freemem, size); cp 186 drivers/s390/char/con3270.c if (cp->nr_up != 0 && cp->nr_up + cp->view.rows > cp->nr_lines) { cp 187 drivers/s390/char/con3270.c cp->nr_up = cp->nr_lines - cp->view.rows + 1; cp 188 drivers/s390/char/con3270.c con3270_rebuild_update(cp); cp 189 drivers/s390/char/con3270.c con3270_update_status(cp); cp 210 drivers/s390/char/con3270.c struct con3270 *cp = from_timer(cp, t, timer); cp 218 drivers/s390/char/con3270.c if (!auto_update && !raw3270_view_active(&cp->view)) cp 220 drivers/s390/char/con3270.c if (cp->view.dev) cp 221 drivers/s390/char/con3270.c raw3270_activate_view(&cp->view); cp 223 drivers/s390/char/con3270.c wrq = xchg(&cp->write, 0); cp 225 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 229 drivers/s390/char/con3270.c spin_lock_irqsave(&cp->view.lock, flags); cp 231 drivers/s390/char/con3270.c if (cp->update_flags & CON_UPDATE_ALL) { cp 232 drivers/s390/char/con3270.c con3270_rebuild_update(cp); cp 233 drivers/s390/char/con3270.c con3270_update_status(cp); cp 234 drivers/s390/char/con3270.c cp->update_flags = CON_UPDATE_ERASE | CON_UPDATE_LIST | cp 237 drivers/s390/char/con3270.c if (cp->update_flags & CON_UPDATE_ERASE) { cp 250 drivers/s390/char/con3270.c if (cp->update_flags & CON_UPDATE_STATUS) cp 251 drivers/s390/char/con3270.c if (raw3270_request_add_data(wrq, cp->status->string, cp 252 drivers/s390/char/con3270.c cp->status->len) == 0) cp 255 drivers/s390/char/con3270.c if (cp->update_flags & CON_UPDATE_LIST) { cp 260 drivers/s390/char/con3270.c raw3270_buffer_address(cp->view.dev, prolog + 1, cp 261 drivers/s390/char/con3270.c cp->view.cols * cp->line_nr); cp 264 drivers/s390/char/con3270.c list_for_each_entry_safe(s, n, &cp->update, update) { cp 265 drivers/s390/char/con3270.c if (s != cp->cline) cp 266 drivers/s390/char/con3270.c con3270_update_string(cp, s, cp->line_nr); cp 271 drivers/s390/char/con3270.c if (s != cp->cline) cp 272 drivers/s390/char/con3270.c cp->line_nr++; cp 274 drivers/s390/char/con3270.c if (list_empty(&cp->update)) cp 278 drivers/s390/char/con3270.c rc = raw3270_start(&cp->view, wrq); cp 280 drivers/s390/char/con3270.c cp->update_flags &= ~updated; cp 281 drivers/s390/char/con3270.c if (cp->update_flags) cp 282 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 285 drivers/s390/char/con3270.c xchg(&cp->write, wrq); cp 287 drivers/s390/char/con3270.c spin_unlock_irqrestore(&cp->view.lock, flags); cp 297 drivers/s390/char/con3270.c struct con3270 *cp; cp 301 drivers/s390/char/con3270.c cp = (struct con3270 *) rrq->view; cp 302 drivers/s390/char/con3270.c spin_lock_irqsave(&cp->view.lock, flags); cp 303 drivers/s390/char/con3270.c nr_up = cp->nr_up; cp 306 drivers/s390/char/con3270.c switch (cp->input->string[0]) { cp 314 drivers/s390/char/con3270.c cp->update_flags = CON_UPDATE_ALL; cp 315 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 318 drivers/s390/char/con3270.c nr_up += cp->view.rows - 2; cp 319 drivers/s390/char/con3270.c if (nr_up + cp->view.rows - 1 > cp->nr_lines) { cp 320 drivers/s390/char/con3270.c nr_up = cp->nr_lines - cp->view.rows + 1; cp 326 drivers/s390/char/con3270.c nr_up -= cp->view.rows - 2; cp 331 drivers/s390/char/con3270.c if (nr_up != cp->nr_up) { cp 332 drivers/s390/char/con3270.c cp->nr_up = nr_up; cp 333 drivers/s390/char/con3270.c con3270_rebuild_update(cp); cp 334 drivers/s390/char/con3270.c con3270_update_status(cp); cp 335 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 337 drivers/s390/char/con3270.c spin_unlock_irqrestore(&cp->view.lock, flags); cp 340 drivers/s390/char/con3270.c raw3270_request_reset(cp->kreset); cp 341 drivers/s390/char/con3270.c raw3270_request_set_cmd(cp->kreset, TC_WRITE); cp 342 drivers/s390/char/con3270.c raw3270_request_add_data(cp->kreset, &kreset_data, 1); cp 343 drivers/s390/char/con3270.c raw3270_start(&cp->view, cp->kreset); cp 346 drivers/s390/char/con3270.c raw3270_deactivate_view(&cp->view); cp 349 drivers/s390/char/con3270.c xchg(&cp->read, rrq); cp 350 drivers/s390/char/con3270.c raw3270_put_view(&cp->view); cp 368 drivers/s390/char/con3270.c con3270_issue_read(struct con3270 *cp) cp 373 drivers/s390/char/con3270.c rrq = xchg(&cp->read, 0); cp 378 drivers/s390/char/con3270.c rrq->callback_data = cp; cp 380 drivers/s390/char/con3270.c raw3270_request_set_data(rrq, cp->input->string, cp->input->len); cp 382 drivers/s390/char/con3270.c rc = raw3270_start_irq(&cp->view, rrq); cp 393 drivers/s390/char/con3270.c struct con3270 *cp; cp 395 drivers/s390/char/con3270.c cp = (struct con3270 *) view; cp 396 drivers/s390/char/con3270.c cp->update_flags = CON_UPDATE_ALL; cp 397 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 404 drivers/s390/char/con3270.c struct con3270 *cp; cp 406 drivers/s390/char/con3270.c cp = (struct con3270 *) view; cp 407 drivers/s390/char/con3270.c del_timer(&cp->timer); cp 411 drivers/s390/char/con3270.c con3270_irq(struct con3270 *cp, struct raw3270_request *rq, struct irb *irb) cp 415 drivers/s390/char/con3270.c con3270_issue_read(cp); cp 425 drivers/s390/char/con3270.c cp->update_flags = CON_UPDATE_ALL; cp 426 drivers/s390/char/con3270.c con3270_set_timer(cp, 1); cp 438 drivers/s390/char/con3270.c con3270_cline_add(struct con3270 *cp) cp 440 drivers/s390/char/con3270.c if (!list_empty(&cp->cline->list)) cp 443 drivers/s390/char/con3270.c list_add_tail(&cp->cline->list, &cp->lines); cp 444 drivers/s390/char/con3270.c cp->nr_lines++; cp 445 drivers/s390/char/con3270.c con3270_rebuild_update(cp); cp 449 drivers/s390/char/con3270.c con3270_cline_insert(struct con3270 *cp, unsigned char c) cp 451 drivers/s390/char/con3270.c cp->cline->string[cp->cline->len++] = cp 452 drivers/s390/char/con3270.c cp->view.ascebc[(c < ' ') ? ' ' : c]; cp 453 drivers/s390/char/con3270.c if (list_empty(&cp->cline->update)) { cp 454 drivers/s390/char/con3270.c list_add_tail(&cp->cline->update, &cp->update); cp 455 drivers/s390/char/con3270.c cp->update_flags |= CON_UPDATE_LIST; cp 460 drivers/s390/char/con3270.c con3270_cline_end(struct con3270 *cp) cp 466 drivers/s390/char/con3270.c size = (cp->cline->len < cp->view.cols - 5) ? cp 467 drivers/s390/char/con3270.c cp->cline->len + 4 : cp->view.cols; cp 468 drivers/s390/char/con3270.c s = con3270_alloc_string(cp, size); cp 469 drivers/s390/char/con3270.c memcpy(s->string, cp->cline->string, cp->cline->len); cp 470 drivers/s390/char/con3270.c if (cp->cline->len < cp->view.cols - 5) { cp 474 drivers/s390/char/con3270.c while (--size >= cp->cline->len) cp 475 drivers/s390/char/con3270.c s->string[size] = cp->view.ascebc[' ']; cp 478 drivers/s390/char/con3270.c list_add(&s->list, &cp->cline->list); cp 479 drivers/s390/char/con3270.c list_del_init(&cp->cline->list); cp 480 drivers/s390/char/con3270.c if (!list_empty(&cp->cline->update)) { cp 481 drivers/s390/char/con3270.c list_add(&s->update, &cp->cline->update); cp 482 drivers/s390/char/con3270.c list_del_init(&cp->cline->update); cp 484 drivers/s390/char/con3270.c cp->cline->len = 0; cp 493 drivers/s390/char/con3270.c struct con3270 *cp; cp 497 drivers/s390/char/con3270.c cp = condev; cp 498 drivers/s390/char/con3270.c spin_lock_irqsave(&cp->view.lock, flags); cp 501 drivers/s390/char/con3270.c if (cp->cline->len == 0) cp 502 drivers/s390/char/con3270.c con3270_cline_add(cp); cp 504 drivers/s390/char/con3270.c con3270_cline_insert(cp, c); cp 505 drivers/s390/char/con3270.c if (c == '\n' || cp->cline->len >= cp->view.cols) cp 506 drivers/s390/char/con3270.c con3270_cline_end(cp); cp 509 drivers/s390/char/con3270.c cp->nr_up = 0; cp 510 drivers/s390/char/con3270.c if (cp->view.dev && !timer_pending(&cp->timer)) cp 511 drivers/s390/char/con3270.c con3270_set_timer(cp, HZ/10); cp 512 drivers/s390/char/con3270.c spin_unlock_irqrestore(&cp->view.lock,flags); cp 526 drivers/s390/char/con3270.c con3270_wait_write(struct con3270 *cp) cp 528 drivers/s390/char/con3270.c while (!cp->write) { cp 529 drivers/s390/char/con3270.c raw3270_wait_cons_dev(cp->view.dev); cp 541 drivers/s390/char/con3270.c struct con3270 *cp; cp 544 drivers/s390/char/con3270.c cp = condev; cp 545 drivers/s390/char/con3270.c if (!cp->view.dev) cp 547 drivers/s390/char/con3270.c raw3270_pm_unfreeze(&cp->view); cp 548 drivers/s390/char/con3270.c raw3270_activate_view(&cp->view); cp 549 drivers/s390/char/con3270.c spin_lock_irqsave(&cp->view.lock, flags); cp 550 drivers/s390/char/con3270.c con3270_wait_write(cp); cp 551 drivers/s390/char/con3270.c cp->nr_up = 0; cp 552 drivers/s390/char/con3270.c con3270_rebuild_update(cp); cp 553 drivers/s390/char/con3270.c con3270_update_status(cp); cp 554 drivers/s390/char/con3270.c while (cp->update_flags != 0) { cp 555 drivers/s390/char/con3270.c spin_unlock_irqrestore(&cp->view.lock, flags); cp 556 drivers/s390/char/con3270.c con3270_update(&cp->timer); cp 557 drivers/s390/char/con3270.c spin_lock_irqsave(&cp->view.lock, flags); cp 558 drivers/s390/char/con3270.c con3270_wait_write(cp); cp 560 drivers/s390/char/con3270.c spin_unlock_irqrestore(&cp->view.lock, flags); cp 122 drivers/s390/char/fs3270.c char *cp; cp 140 drivers/s390/char/fs3270.c cp = fp->rdbuf->data[0]; cp 141 drivers/s390/char/fs3270.c cp[0] = TW_KR; cp 142 drivers/s390/char/fs3270.c cp[1] = TO_SBA; cp 143 drivers/s390/char/fs3270.c cp[2] = cp[6]; cp 144 drivers/s390/char/fs3270.c cp[3] = cp[7]; cp 145 drivers/s390/char/fs3270.c cp[4] = TO_IC; cp 146 drivers/s390/char/fs3270.c cp[5] = TO_SBA; cp 147 drivers/s390/char/fs3270.c cp[6] = 0x40; cp 148 drivers/s390/char/fs3270.c cp[7] = 0x40; cp 63 drivers/s390/char/keyboard.h kbd_puts_queue(struct tty_port *port, char *cp) cp 65 drivers/s390/char/keyboard.h while (*cp) cp 66 drivers/s390/char/keyboard.h tty_insert_flip_char(port, *cp++, 0); cp 122 drivers/s390/char/raw3270.c raw3270_buffer_address(struct raw3270 *rp, char *cp, unsigned short addr) cp 125 drivers/s390/char/raw3270.c cp[0] = (addr >> 8) & 0x3f; cp 126 drivers/s390/char/raw3270.c cp[1] = addr & 0xff; cp 128 drivers/s390/char/raw3270.c cp[0] = raw3270_ebcgraf[(addr >> 6) & 0x3f]; cp 129 drivers/s390/char/raw3270.c cp[1] = raw3270_ebcgraf[addr & 0x3f]; cp 231 drivers/s390/char/tty3270.c unsigned char *cp; cp 235 drivers/s390/char/tty3270.c cp = line->string + line->len - 4; cp 236 drivers/s390/char/tty3270.c if (*cp == TO_RA) cp 237 drivers/s390/char/tty3270.c raw3270_buffer_address(tp->view.dev, cp + 1, cp 1117 drivers/s390/char/tty3270.c char *cp; cp 1163 drivers/s390/char/tty3270.c cp = s->string; cp 1164 drivers/s390/char/tty3270.c *cp++ = TO_SBA; cp 1165 drivers/s390/char/tty3270.c *cp++ = 0; cp 1166 drivers/s390/char/tty3270.c *cp++ = 0; cp 1172 drivers/s390/char/tty3270.c *cp++ = TO_SA; cp 1173 drivers/s390/char/tty3270.c *cp++ = TAT_EXTHI; cp 1174 drivers/s390/char/tty3270.c *cp++ = cell->highlight; cp 1178 drivers/s390/char/tty3270.c *cp++ = TO_SA; cp 1179 drivers/s390/char/tty3270.c *cp++ = TAT_COLOR; cp 1180 drivers/s390/char/tty3270.c *cp++ = cell->f_color; cp 1183 drivers/s390/char/tty3270.c *cp++ = cell->character; cp 1186 drivers/s390/char/tty3270.c *cp++ = TO_SA; cp 1187 drivers/s390/char/tty3270.c *cp++ = TAT_EXTHI; cp 1188 drivers/s390/char/tty3270.c *cp++ = TAX_RESET; cp 1191 drivers/s390/char/tty3270.c *cp++ = TO_SA; cp 1192 drivers/s390/char/tty3270.c *cp++ = TAT_COLOR; cp 1193 drivers/s390/char/tty3270.c *cp++ = TAC_RESET; cp 1196 drivers/s390/char/tty3270.c *cp++ = TO_RA; cp 1197 drivers/s390/char/tty3270.c *cp++ = 0; cp 1198 drivers/s390/char/tty3270.c *cp++ = 0; cp 1199 drivers/s390/char/tty3270.c *cp++ = 0; cp 77 drivers/s390/cio/blacklist.c static int pure_hex(char **cp, unsigned int *val, int min_digit, cp 86 drivers/s390/cio/blacklist.c int value = hex_to_bin(**cp); cp 91 drivers/s390/cio/blacklist.c (*cp)++; cp 79 drivers/s390/cio/ccwreq.c struct ccw1 *cp = req->cp; cp 90 drivers/s390/cio/ccwreq.c rc = cio_start(sch, cp, (u8) req->mask); cp 249 drivers/s390/cio/chp.c struct channel_path *cp = to_channelpath(dev); cp 259 drivers/s390/cio/chp.c mutex_lock(&cp->lock); cp 260 drivers/s390/cio/chp.c error = s390_vary_chpid(cp->chpid, 1); cp 261 drivers/s390/cio/chp.c mutex_unlock(&cp->lock); cp 263 drivers/s390/cio/chp.c mutex_lock(&cp->lock); cp 264 drivers/s390/cio/chp.c error = s390_vary_chpid(cp->chpid, 0); cp 265 drivers/s390/cio/chp.c mutex_unlock(&cp->lock); cp 277 drivers/s390/cio/chp.c struct channel_path *cp; cp 280 drivers/s390/cio/chp.c cp = to_channelpath(dev); cp 281 drivers/s390/cio/chp.c status = chp_info_get_status(cp->chpid); cp 294 drivers/s390/cio/chp.c struct channel_path *cp; cp 302 drivers/s390/cio/chp.c cp = to_channelpath(dev); cp 303 drivers/s390/cio/chp.c chp_cfg_schedule(cp->chpid, val); cp 430 drivers/s390/cio/chp.c struct channel_path *cp; cp 432 drivers/s390/cio/chp.c cp = to_channelpath(dev); cp 433 drivers/s390/cio/chp.c kfree(cp); cp 337 drivers/s390/cio/css.c char *driver_override, *old, *cp; cp 347 drivers/s390/cio/css.c cp = strchr(driver_override, '\n'); cp 348 drivers/s390/cio/css.c if (cp) cp 349 drivers/s390/cio/css.c *cp = '\0'; cp 205 drivers/s390/cio/device_id.c struct ccw1 *cp = cdev->private->dma_area->iccws; cp 212 drivers/s390/cio/device_id.c cp->cmd_code = CCW_CMD_SENSE_ID; cp 213 drivers/s390/cio/device_id.c cp->cda = (u32) (addr_t) &cdev->private->dma_area->senseid; cp 214 drivers/s390/cio/device_id.c cp->count = sizeof(struct senseid); cp 215 drivers/s390/cio/device_id.c cp->flags = CCW_FLAG_SLI; cp 218 drivers/s390/cio/device_id.c req->cp = cp; cp 60 drivers/s390/cio/device_pgid.c struct ccw1 *cp = cdev->private->dma_area->iccws; cp 62 drivers/s390/cio/device_pgid.c cp->cmd_code = CCW_CMD_NOOP; cp 63 drivers/s390/cio/device_pgid.c cp->cda = 0; cp 64 drivers/s390/cio/device_pgid.c cp->count = 0; cp 65 drivers/s390/cio/device_pgid.c cp->flags = CCW_FLAG_SLI; cp 66 drivers/s390/cio/device_pgid.c req->cp = cp; cp 137 drivers/s390/cio/device_pgid.c struct ccw1 *cp = cdev->private->dma_area->iccws; cp 142 drivers/s390/cio/device_pgid.c cp->cmd_code = CCW_CMD_SET_PGID; cp 143 drivers/s390/cio/device_pgid.c cp->cda = (u32) (addr_t) pgid; cp 144 drivers/s390/cio/device_pgid.c cp->count = sizeof(*pgid); cp 145 drivers/s390/cio/device_pgid.c cp->flags = CCW_FLAG_SLI; cp 146 drivers/s390/cio/device_pgid.c req->cp = cp; cp 439 drivers/s390/cio/device_pgid.c struct ccw1 *cp = cdev->private->dma_area->iccws; cp 443 drivers/s390/cio/device_pgid.c cp->cmd_code = CCW_CMD_SENSE_PGID; cp 444 drivers/s390/cio/device_pgid.c cp->cda = (u32) (addr_t) &cdev->private->dma_area->pgid[i]; cp 445 drivers/s390/cio/device_pgid.c cp->count = sizeof(struct pgid); cp 446 drivers/s390/cio/device_pgid.c cp->flags = CCW_FLAG_SLI; cp 447 drivers/s390/cio/device_pgid.c req->cp = cp; cp 631 drivers/s390/cio/device_pgid.c struct ccw1 *cp = cdev->private->dma_area->iccws; cp 633 drivers/s390/cio/device_pgid.c cp[0].cmd_code = CCW_CMD_STLCK; cp 634 drivers/s390/cio/device_pgid.c cp[0].cda = (u32) (addr_t) buf1; cp 635 drivers/s390/cio/device_pgid.c cp[0].count = 32; cp 636 drivers/s390/cio/device_pgid.c cp[0].flags = CCW_FLAG_CC; cp 637 drivers/s390/cio/device_pgid.c cp[1].cmd_code = CCW_CMD_RELEASE; cp 638 drivers/s390/cio/device_pgid.c cp[1].cda = (u32) (addr_t) buf2; cp 639 drivers/s390/cio/device_pgid.c cp[1].count = 32; cp 640 drivers/s390/cio/device_pgid.c cp[1].flags = 0; cp 641 drivers/s390/cio/device_pgid.c req->cp = cp; cp 78 drivers/s390/cio/io_sch.h struct ccw1 *cp; cp 313 drivers/s390/cio/vfio_ccw_cp.c static struct ccwchain *ccwchain_alloc(struct channel_program *cp, int len) cp 335 drivers/s390/cio/vfio_ccw_cp.c list_add_tail(&chain->next, &cp->ccwchain_list); cp 370 drivers/s390/cio/vfio_ccw_cp.c static int ccwchain_calc_length(u64 iova, struct channel_program *cp) cp 372 drivers/s390/cio/vfio_ccw_cp.c struct ccw1 *ccw = cp->guest_cp; cp 383 drivers/s390/cio/vfio_ccw_cp.c if ((!cp->orb.cmd.c64 || cp->orb.cmd.i2k) && ccw_is_idal(ccw)) cp 406 drivers/s390/cio/vfio_ccw_cp.c static int tic_target_chain_exists(struct ccw1 *tic, struct channel_program *cp) cp 411 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry(chain, &cp->ccwchain_list, next) { cp 421 drivers/s390/cio/vfio_ccw_cp.c struct channel_program *cp); cp 423 drivers/s390/cio/vfio_ccw_cp.c static int ccwchain_handle_ccw(u32 cda, struct channel_program *cp) cp 429 drivers/s390/cio/vfio_ccw_cp.c len = copy_from_iova(cp->mdev, cp->guest_cp, cda, cp 435 drivers/s390/cio/vfio_ccw_cp.c if (!cp->orb.cmd.fmt) cp 436 drivers/s390/cio/vfio_ccw_cp.c convert_ccw0_to_ccw1(cp->guest_cp, CCWCHAIN_LEN_MAX); cp 439 drivers/s390/cio/vfio_ccw_cp.c len = ccwchain_calc_length(cda, cp); cp 444 drivers/s390/cio/vfio_ccw_cp.c chain = ccwchain_alloc(cp, len); cp 450 drivers/s390/cio/vfio_ccw_cp.c memcpy(chain->ch_ccw, cp->guest_cp, len * sizeof(struct ccw1)); cp 453 drivers/s390/cio/vfio_ccw_cp.c ret = ccwchain_loop_tic(chain, cp); cp 462 drivers/s390/cio/vfio_ccw_cp.c static int ccwchain_loop_tic(struct ccwchain *chain, struct channel_program *cp) cp 474 drivers/s390/cio/vfio_ccw_cp.c if (tic_target_chain_exists(tic, cp)) cp 478 drivers/s390/cio/vfio_ccw_cp.c ret = ccwchain_handle_ccw(tic->cda, cp); cp 488 drivers/s390/cio/vfio_ccw_cp.c struct channel_program *cp) cp 494 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry(iter, &cp->ccwchain_list, next) { cp 508 drivers/s390/cio/vfio_ccw_cp.c struct channel_program *cp) cp 528 drivers/s390/cio/vfio_ccw_cp.c ret = copy_from_iova(cp->mdev, &iova, ccw->cda, sizeof(iova)); cp 557 drivers/s390/cio/vfio_ccw_cp.c ret = copy_from_iova(cp->mdev, idaws, ccw->cda, idal_len); cp 576 drivers/s390/cio/vfio_ccw_cp.c ret = pfn_array_pin(pa, cp->mdev); cp 592 drivers/s390/cio/vfio_ccw_cp.c pfn_array_unpin_free(pa, cp->mdev); cp 608 drivers/s390/cio/vfio_ccw_cp.c struct channel_program *cp) cp 613 drivers/s390/cio/vfio_ccw_cp.c return ccwchain_fetch_tic(chain, idx, cp); cp 615 drivers/s390/cio/vfio_ccw_cp.c return ccwchain_fetch_direct(chain, idx, cp); cp 635 drivers/s390/cio/vfio_ccw_cp.c int cp_init(struct channel_program *cp, struct device *mdev, union orb *orb) cp 646 drivers/s390/cio/vfio_ccw_cp.c INIT_LIST_HEAD(&cp->ccwchain_list); cp 647 drivers/s390/cio/vfio_ccw_cp.c memcpy(&cp->orb, orb, sizeof(*orb)); cp 648 drivers/s390/cio/vfio_ccw_cp.c cp->mdev = mdev; cp 651 drivers/s390/cio/vfio_ccw_cp.c ret = ccwchain_handle_ccw(orb->cmd.cpa, cp); cp 654 drivers/s390/cio/vfio_ccw_cp.c cp->initialized = true; cp 659 drivers/s390/cio/vfio_ccw_cp.c cp->orb.cmd.c64 = 1; cp 674 drivers/s390/cio/vfio_ccw_cp.c void cp_free(struct channel_program *cp) cp 679 drivers/s390/cio/vfio_ccw_cp.c if (!cp->initialized) cp 682 drivers/s390/cio/vfio_ccw_cp.c cp->initialized = false; cp 683 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry_safe(chain, temp, &cp->ccwchain_list, next) { cp 685 drivers/s390/cio/vfio_ccw_cp.c pfn_array_unpin_free(chain->ch_pa + i, cp->mdev); cp 729 drivers/s390/cio/vfio_ccw_cp.c int cp_prefetch(struct channel_program *cp) cp 735 drivers/s390/cio/vfio_ccw_cp.c if (!cp->initialized) cp 738 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry(chain, &cp->ccwchain_list, next) { cp 741 drivers/s390/cio/vfio_ccw_cp.c ret = ccwchain_fetch_one(chain, idx, cp); cp 751 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry_continue(chain, &cp->ccwchain_list, next) { cp 767 drivers/s390/cio/vfio_ccw_cp.c union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm) cp 774 drivers/s390/cio/vfio_ccw_cp.c if (!cp->initialized) cp 777 drivers/s390/cio/vfio_ccw_cp.c orb = &cp->orb; cp 786 drivers/s390/cio/vfio_ccw_cp.c chain = list_first_entry(&cp->ccwchain_list, struct ccwchain, next); cp 807 drivers/s390/cio/vfio_ccw_cp.c void cp_update_scsw(struct channel_program *cp, union scsw *scsw) cp 813 drivers/s390/cio/vfio_ccw_cp.c if (!cp->initialized) cp 822 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry(chain, &cp->ccwchain_list, next) { cp 851 drivers/s390/cio/vfio_ccw_cp.c bool cp_iova_pinned(struct channel_program *cp, u64 iova) cp 856 drivers/s390/cio/vfio_ccw_cp.c if (!cp->initialized) cp 859 drivers/s390/cio/vfio_ccw_cp.c list_for_each_entry(chain, &cp->ccwchain_list, next) { cp 44 drivers/s390/cio/vfio_ccw_cp.h extern int cp_init(struct channel_program *cp, struct device *mdev, cp 46 drivers/s390/cio/vfio_ccw_cp.h extern void cp_free(struct channel_program *cp); cp 47 drivers/s390/cio/vfio_ccw_cp.h extern int cp_prefetch(struct channel_program *cp); cp 48 drivers/s390/cio/vfio_ccw_cp.h extern union orb *cp_get_orb(struct channel_program *cp, u32 intparm, u8 lpm); cp 49 drivers/s390/cio/vfio_ccw_cp.h extern void cp_update_scsw(struct channel_program *cp, union scsw *scsw); cp 50 drivers/s390/cio/vfio_ccw_cp.h extern bool cp_iova_pinned(struct channel_program *cp, u64 iova); cp 93 drivers/s390/cio/vfio_ccw_drv.c cp_update_scsw(&private->cp, &irb->scsw); cp 95 drivers/s390/cio/vfio_ccw_drv.c cp_free(&private->cp); cp 135 drivers/s390/cio/vfio_ccw_drv.c private->cp.guest_cp = kcalloc(CCWCHAIN_LEN_MAX, sizeof(struct ccw1), cp 137 drivers/s390/cio/vfio_ccw_drv.c if (!private->cp.guest_cp) cp 188 drivers/s390/cio/vfio_ccw_drv.c kfree(private->cp.guest_cp); cp 205 drivers/s390/cio/vfio_ccw_drv.c kfree(private->cp.guest_cp); cp 34 drivers/s390/cio/vfio_ccw_fsm.c orb = cp_get_orb(&private->cp, (u32)(addr_t)sch, sch->lpm); cp 268 drivers/s390/cio/vfio_ccw_fsm.c io_region->ret_code = cp_init(&private->cp, mdev_dev(mdev), cp 280 drivers/s390/cio/vfio_ccw_fsm.c io_region->ret_code = cp_prefetch(&private->cp); cp 288 drivers/s390/cio/vfio_ccw_fsm.c cp_free(&private->cp); cp 301 drivers/s390/cio/vfio_ccw_fsm.c cp_free(&private->cp); cp 61 drivers/s390/cio/vfio_ccw_ops.c if (!cp_iova_pinned(&private->cp, unmap->iova)) cp 67 drivers/s390/cio/vfio_ccw_ops.c cp_free(&private->cp); cp 152 drivers/s390/cio/vfio_ccw_ops.c cp_free(&private->cp); cp 193 drivers/s390/cio/vfio_ccw_ops.c cp_free(&private->cp); cp 91 drivers/s390/cio/vfio_ccw_private.h struct channel_program cp; cp 1484 drivers/s390/net/netiucv.c struct iucv_connection *cp; cp 1498 drivers/s390/net/netiucv.c list_for_each_entry(cp, &iucv_connection_list, list) { cp 1499 drivers/s390/net/netiucv.c if (!strncmp(username, cp->userid, 9) && cp 1500 drivers/s390/net/netiucv.c !strncmp(userdata, cp->userdata, 17) && cp->netdev != ndev) { cp 1503 drivers/s390/net/netiucv.c "already exists\n", netiucv_printuser(cp)); cp 2015 drivers/s390/net/netiucv.c struct iucv_connection *cp; cp 2023 drivers/s390/net/netiucv.c list_for_each_entry(cp, &iucv_connection_list, list) { cp 2024 drivers/s390/net/netiucv.c if (!strncmp(username, cp->userid, 9) && cp 2025 drivers/s390/net/netiucv.c !strncmp(userdata, cp->userdata, 17)) { cp 2028 drivers/s390/net/netiucv.c "already exists\n", netiucv_printuser(cp)); cp 2074 drivers/s390/net/netiucv.c struct iucv_connection *cp; cp 2096 drivers/s390/net/netiucv.c list_for_each_entry(cp, &iucv_connection_list, list) { cp 2097 drivers/s390/net/netiucv.c ndev = cp->netdev; cp 2142 drivers/s390/net/netiucv.c struct iucv_connection *cp; cp 2149 drivers/s390/net/netiucv.c cp = list_entry(iucv_connection_list.next, cp 2151 drivers/s390/net/netiucv.c ndev = cp->netdev; cp 1415 drivers/s390/virtio/virtio_ccw.c static int __init pure_hex(char **cp, unsigned int *val, int min_digit, cp 1424 drivers/s390/virtio/virtio_ccw.c int value = hex_to_bin(**cp); cp 1429 drivers/s390/virtio/virtio_ccw.c (*cp)++; cp 903 drivers/scsi/aacraid/aachba.c char *cp; cp 910 drivers/scsi/aacraid/aachba.c cp = cname; cp 911 drivers/scsi/aacraid/aachba.c if ((cp[0] == 'A') && (cp[1] == 'O') && (cp[2] == 'C')) cp 915 drivers/scsi/aacraid/aachba.c while (*cp && *cp != ' ' && --c) cp 916 drivers/scsi/aacraid/aachba.c ++cp; cp 917 drivers/scsi/aacraid/aachba.c c = *cp; cp 918 drivers/scsi/aacraid/aachba.c *cp = '\0'; cp 920 drivers/scsi/aacraid/aachba.c *cp = c; cp 921 drivers/scsi/aacraid/aachba.c while (*cp && *cp != ' ') cp 922 drivers/scsi/aacraid/aachba.c ++cp; cp 924 drivers/scsi/aacraid/aachba.c while (*cp == ' ') cp 925 drivers/scsi/aacraid/aachba.c ++cp; cp 927 drivers/scsi/aacraid/aachba.c if (strlen(cp) > sizeof(str->pid)) cp 928 drivers/scsi/aacraid/aachba.c cp[sizeof(str->pid)] = '\0'; cp 929 drivers/scsi/aacraid/aachba.c inqstrcpy (cp, str->pid); cp 3054 drivers/scsi/aacraid/aachba.c char cp[13]; cp 3059 drivers/scsi/aacraid/aachba.c cp[0] = (capacity >> 56) & 0xff; cp 3060 drivers/scsi/aacraid/aachba.c cp[1] = (capacity >> 48) & 0xff; cp 3061 drivers/scsi/aacraid/aachba.c cp[2] = (capacity >> 40) & 0xff; cp 3062 drivers/scsi/aacraid/aachba.c cp[3] = (capacity >> 32) & 0xff; cp 3063 drivers/scsi/aacraid/aachba.c cp[4] = (capacity >> 24) & 0xff; cp 3064 drivers/scsi/aacraid/aachba.c cp[5] = (capacity >> 16) & 0xff; cp 3065 drivers/scsi/aacraid/aachba.c cp[6] = (capacity >> 8) & 0xff; cp 3066 drivers/scsi/aacraid/aachba.c cp[7] = (capacity >> 0) & 0xff; cp 3067 drivers/scsi/aacraid/aachba.c cp[8] = (fsa_dev_ptr[cid].block_size >> 24) & 0xff; cp 3068 drivers/scsi/aacraid/aachba.c cp[9] = (fsa_dev_ptr[cid].block_size >> 16) & 0xff; cp 3069 drivers/scsi/aacraid/aachba.c cp[10] = (fsa_dev_ptr[cid].block_size >> 8) & 0xff; cp 3070 drivers/scsi/aacraid/aachba.c cp[11] = (fsa_dev_ptr[cid].block_size) & 0xff; cp 3071 drivers/scsi/aacraid/aachba.c cp[12] = 0; cp 3077 drivers/scsi/aacraid/aachba.c alloc_len = min_t(size_t, alloc_len, sizeof(cp)); cp 3078 drivers/scsi/aacraid/aachba.c scsi_sg_copy_from_buffer(scsicmd, cp, alloc_len); cp 3094 drivers/scsi/aacraid/aachba.c char cp[8]; cp 3102 drivers/scsi/aacraid/aachba.c cp[0] = (capacity >> 24) & 0xff; cp 3103 drivers/scsi/aacraid/aachba.c cp[1] = (capacity >> 16) & 0xff; cp 3104 drivers/scsi/aacraid/aachba.c cp[2] = (capacity >> 8) & 0xff; cp 3105 drivers/scsi/aacraid/aachba.c cp[3] = (capacity >> 0) & 0xff; cp 3106 drivers/scsi/aacraid/aachba.c cp[4] = (fsa_dev_ptr[cid].block_size >> 24) & 0xff; cp 3107 drivers/scsi/aacraid/aachba.c cp[5] = (fsa_dev_ptr[cid].block_size >> 16) & 0xff; cp 3108 drivers/scsi/aacraid/aachba.c cp[6] = (fsa_dev_ptr[cid].block_size >> 8) & 0xff; cp 3109 drivers/scsi/aacraid/aachba.c cp[7] = (fsa_dev_ptr[cid].block_size) & 0xff; cp 3110 drivers/scsi/aacraid/aachba.c scsi_sg_copy_from_buffer(scsicmd, cp, sizeof(cp)); cp 1003 drivers/scsi/aacraid/commsup.c char *cp = dev->printfbuf; cp 1015 drivers/scsi/aacraid/commsup.c if (cp[length] != 0) cp 1016 drivers/scsi/aacraid/commsup.c cp[length] = 0; cp 1018 drivers/scsi/aacraid/commsup.c printk(KERN_WARNING "%s:%s", dev->name, cp); cp 1020 drivers/scsi/aacraid/commsup.c printk(KERN_INFO "%s:%s", dev->name, cp); cp 1022 drivers/scsi/aacraid/commsup.c memset(cp, 0, 256); cp 1222 drivers/scsi/aacraid/linit.c char *cp = dev->supplement_adapter_info.adapter_type_text; cp 1223 drivers/scsi/aacraid/linit.c while (*cp && *cp != ' ') cp 1224 drivers/scsi/aacraid/linit.c ++cp; cp 1225 drivers/scsi/aacraid/linit.c while (*cp == ' ') cp 1226 drivers/scsi/aacraid/linit.c ++cp; cp 1227 drivers/scsi/aacraid/linit.c len = snprintf(buf, PAGE_SIZE, "%s\n", cp); cp 1243 drivers/scsi/aacraid/linit.c char *cp = sup_adap_info->adapter_type_text; cp 1244 drivers/scsi/aacraid/linit.c while (*cp && *cp != ' ') cp 1245 drivers/scsi/aacraid/linit.c ++cp; cp 1247 drivers/scsi/aacraid/linit.c (int)(cp - (char *)sup_adap_info->adapter_type_text), cp 2796 drivers/scsi/advansys.c static int asc_get_eeprom_string(ushort *serialnum, uchar *cp) cp 2809 drivers/scsi/advansys.c if ((*cp = 'A' + ((w & 0xE000) >> 13)) == 'H') { cp 2811 drivers/scsi/advansys.c *cp += 0x8; cp 2813 drivers/scsi/advansys.c cp++; cp 2816 drivers/scsi/advansys.c *cp++ = 'A' + ((w & 0x1C00) >> 10); cp 2820 drivers/scsi/advansys.c *cp++ = '0' + (num / 100); cp 2822 drivers/scsi/advansys.c *cp++ = '0' + (num / 10); cp 2825 drivers/scsi/advansys.c *cp++ = 'A' + (num % 10); cp 2839 drivers/scsi/advansys.c *cp++ = '8' + ((w & 0x1C0) >> 6); cp 2841 drivers/scsi/advansys.c *cp++ = '0' + ((w & 0x1C0) >> 6); cp 2846 drivers/scsi/advansys.c *cp++ = '0' + num / 10; cp 2848 drivers/scsi/advansys.c *cp++ = '0' + num; cp 2856 drivers/scsi/advansys.c *cp++ = 'A' + (w / 1000); cp 2860 drivers/scsi/advansys.c *cp++ = '0' + num / 100; cp 2862 drivers/scsi/advansys.c *cp++ = '0' + num / 10; cp 2864 drivers/scsi/advansys.c *cp++ = '0' + num; cp 2866 drivers/scsi/advansys.c *cp = '\0'; /* Null Terminate the string. */ cp 277 drivers/scsi/aic94xx/aic94xx_scb.c struct asd_ascb *cp = asd_ascb_alloc_list(ascb->ha, &num, cp 279 drivers/scsi/aic94xx/aic94xx_scb.c if (!cp) { cp 285 drivers/scsi/aic94xx/aic94xx_scb.c asd_build_control_phy(cp, phy_id, ENABLE_PHY); cp 286 drivers/scsi/aic94xx/aic94xx_scb.c if (asd_post_ascb_list(ascb->ha, cp, 1) != 0) cp 287 drivers/scsi/aic94xx/aic94xx_scb.c asd_ascb_free(cp); cp 265 drivers/scsi/bnx2fc/bnx2fc_fcoe.c struct fcoe_crc_eof *cp; cp 349 drivers/scsi/bnx2fc/bnx2fc_fcoe.c cp = kmap_atomic(skb_frag_page(frag)) + skb_frag_off(frag); cp 351 drivers/scsi/bnx2fc/bnx2fc_fcoe.c cp = skb_put(skb, tlen); cp 354 drivers/scsi/bnx2fc/bnx2fc_fcoe.c memset(cp, 0, sizeof(*cp)); cp 355 drivers/scsi/bnx2fc/bnx2fc_fcoe.c cp->fcoe_eof = eof; cp 356 drivers/scsi/bnx2fc/bnx2fc_fcoe.c cp->fcoe_crc32 = cpu_to_le32(~crc); cp 358 drivers/scsi/bnx2fc/bnx2fc_fcoe.c kunmap_atomic(cp); cp 359 drivers/scsi/bnx2fc/bnx2fc_fcoe.c cp = NULL; cp 102 drivers/scsi/csiostor/csio_lnode.c #define csio_ct_rsp(cp) (((struct fc_ct_hdr *)cp)->ct_cmd) cp 103 drivers/scsi/csiostor/csio_lnode.c #define csio_ct_reason(cp) (((struct fc_ct_hdr *)cp)->ct_reason) cp 104 drivers/scsi/csiostor/csio_lnode.c #define csio_ct_expl(cp) (((struct fc_ct_hdr *)cp)->ct_explan) cp 105 drivers/scsi/csiostor/csio_lnode.c #define csio_ct_get_pld(cp) ((void *)(((uint8_t *)cp) + FC_CT_HDR_LEN)) cp 1476 drivers/scsi/fcoe/fcoe.c struct fcoe_crc_eof *cp; cp 1531 drivers/scsi/fcoe/fcoe.c cp = kmap_atomic(skb_frag_page(frag)) + skb_frag_off(frag); cp 1533 drivers/scsi/fcoe/fcoe.c cp = skb_put(skb, tlen); cp 1536 drivers/scsi/fcoe/fcoe.c memset(cp, 0, sizeof(*cp)); cp 1537 drivers/scsi/fcoe/fcoe.c cp->fcoe_eof = eof; cp 1538 drivers/scsi/fcoe/fcoe.c cp->fcoe_crc32 = cpu_to_le32(~crc); cp 1541 drivers/scsi/fcoe/fcoe.c kunmap_atomic(cp); cp 1542 drivers/scsi/fcoe/fcoe.c cp = NULL; cp 72 drivers/scsi/fcoe/fcoe_ctlr.c const char *cp = "unknown"; cp 75 drivers/scsi/fcoe/fcoe_ctlr.c cp = fcoe_ctlr_states[state]; cp 76 drivers/scsi/fcoe/fcoe_ctlr.c if (!cp) cp 77 drivers/scsi/fcoe/fcoe_ctlr.c cp = "unknown"; cp 78 drivers/scsi/fcoe/fcoe_ctlr.c return cp; cp 707 drivers/scsi/fcoe/fcoe_transport.c char *cp; cp 712 drivers/scsi/fcoe/fcoe_transport.c cp = ifname + strlen(ifname); cp 713 drivers/scsi/fcoe/fcoe_transport.c while (--cp >= ifname && *cp == '\n') cp 714 drivers/scsi/fcoe/fcoe_transport.c *cp = '\0'; cp 1052 drivers/scsi/hpsa.c struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[c->cmdindex]; cp 1058 drivers/scsi/hpsa.c cp->ReplyQueue = reply_queue; cp 1073 drivers/scsi/hpsa.c struct hpsa_tmf_struct *cp = (struct hpsa_tmf_struct *) cp 1079 drivers/scsi/hpsa.c cp->reply_queue = reply_queue; cp 1092 drivers/scsi/hpsa.c struct io_accel2_cmd *cp = &h->ioaccel2_cmd_pool[c->cmdindex]; cp 1098 drivers/scsi/hpsa.c cp->reply_queue = reply_queue; cp 1105 drivers/scsi/hpsa.c c->busaddr |= (h->ioaccel2_blockFetchTable[cp->sg_count]); cp 2248 drivers/scsi/hpsa.c struct io_accel2_cmd *cp, struct CommandList *c) cp 2255 drivers/scsi/hpsa.c chain_size = le32_to_cpu(cp->sg[0].length); cp 2260 drivers/scsi/hpsa.c cp->sg->address = 0; cp 2263 drivers/scsi/hpsa.c cp->sg->address = cpu_to_le64(temp64); cp 2268 drivers/scsi/hpsa.c struct io_accel2_cmd *cp) cp 2274 drivers/scsi/hpsa.c chain_sg = cp->sg; cp 2276 drivers/scsi/hpsa.c chain_size = le32_to_cpu(cp->sg[0].length); cp 2522 drivers/scsi/hpsa.c struct CommandList *cp) cp 2524 drivers/scsi/hpsa.c u8 tmf_status = cp->err_info->ScsiStatus; cp 2548 drivers/scsi/hpsa.c static void complete_scsi_command(struct CommandList *cp) cp 2561 drivers/scsi/hpsa.c ei = cp->err_info; cp 2562 drivers/scsi/hpsa.c cmd = cp->scsi_cmd; cp 2563 drivers/scsi/hpsa.c h = cp->h; cp 2567 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2573 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2575 drivers/scsi/hpsa.c c2 = &h->ioaccel2_cmd_pool[cp->cmdindex]; cp 2578 drivers/scsi/hpsa.c if ((cp->cmd_type == CMD_SCSI) && cp 2579 drivers/scsi/hpsa.c (le16_to_cpu(cp->Header.SGTotal) > h->max_cmd_sg_entries)) cp 2580 drivers/scsi/hpsa.c hpsa_unmap_sg_chain_block(h, cp); cp 2582 drivers/scsi/hpsa.c if ((cp->cmd_type == CMD_IOACCEL2) && cp 2591 drivers/scsi/hpsa.c hpsa_cmd_resolve_and_free(h, cp); cp 2595 drivers/scsi/hpsa.c if (cp->cmd_type == CMD_IOACCEL2 || cp->cmd_type == CMD_IOACCEL1) { cp 2599 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2601 drivers/scsi/hpsa.c if (likely(cp->phys_disk != NULL)) cp 2602 drivers/scsi/hpsa.c atomic_dec(&cp->phys_disk->ioaccel_cmds_out); cp 2613 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2616 drivers/scsi/hpsa.c if (cp->cmd_type == CMD_IOACCEL2) cp 2617 drivers/scsi/hpsa.c return process_ioaccel2_completion(h, cp, cmd, dev); cp 2621 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2626 drivers/scsi/hpsa.c if (cp->cmd_type == CMD_IOACCEL1) { cp 2627 drivers/scsi/hpsa.c struct io_accel1_cmd *c = &h->ioaccel_cmd_pool[cp->cmdindex]; cp 2628 drivers/scsi/hpsa.c cp->Header.SGList = scsi_sg_count(cmd); cp 2629 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(cp->Header.SGList); cp 2630 drivers/scsi/hpsa.c cp->Request.CDBLen = le16_to_cpu(c->io_flags) & cp 2632 drivers/scsi/hpsa.c cp->Header.tag = c->tag; cp 2633 drivers/scsi/hpsa.c memcpy(cp->Header.LUN.LunAddrBytes, c->CISS_LUN, 8); cp 2634 drivers/scsi/hpsa.c memcpy(cp->Request.CDB, c->CDB, cp->Request.CDBLen); cp 2643 drivers/scsi/hpsa.c return hpsa_retry_cmd(h, cp); cp 2688 drivers/scsi/hpsa.c cp, ei->ScsiStatus, cp 2693 drivers/scsi/hpsa.c "Returning no connection.\n", cp), cp 2715 drivers/scsi/hpsa.c "CDB %16phN data overrun\n", cp->Request.CDB); cp 2732 drivers/scsi/hpsa.c cp->Request.CDB); cp 2737 drivers/scsi/hpsa.c cp->Request.CDB); cp 2742 drivers/scsi/hpsa.c cp->Request.CDB); cp 2750 drivers/scsi/hpsa.c cp->Request.CDB); cp 2755 drivers/scsi/hpsa.c cp->Request.CDB); cp 2760 drivers/scsi/hpsa.c cp->Request.CDB); cp 2767 drivers/scsi/hpsa.c if (hpsa_evaluate_tmf_status(h, cp)) /* TMF failed? */ cp 2776 drivers/scsi/hpsa.c "cp %p had HP SSD Smart Path error\n", cp); cp 2781 drivers/scsi/hpsa.c cp, ei->CommandStatus); cp 2784 drivers/scsi/hpsa.c return hpsa_cmd_free_and_done(h, cp, cmd); cp 2799 drivers/scsi/hpsa.c struct CommandList *cp, cp 2807 drivers/scsi/hpsa.c cp->Header.SGList = 0; cp 2808 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(0); cp 2815 drivers/scsi/hpsa.c cp->Header.SGList = 0; cp 2816 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(0); cp 2819 drivers/scsi/hpsa.c cp->SG[0].Addr = cpu_to_le64(addr64); cp 2820 drivers/scsi/hpsa.c cp->SG[0].Len = cpu_to_le32(buflen); cp 2821 drivers/scsi/hpsa.c cp->SG[0].Ext = cpu_to_le32(HPSA_SG_LAST); /* we are not chaining */ cp 2822 drivers/scsi/hpsa.c cp->Header.SGList = 1; /* no. SGs contig in this cmd */ cp 2823 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(1); /* total sgs in cmd list */ cp 2911 drivers/scsi/hpsa.c struct CommandList *cp) cp 2913 drivers/scsi/hpsa.c const struct ErrorInfo *ei = cp->err_info; cp 2914 drivers/scsi/hpsa.c struct device *d = &cp->h->pdev->dev; cp 2926 drivers/scsi/hpsa.c hpsa_print_cmd(h, "SCSI status", cp); cp 2941 drivers/scsi/hpsa.c hpsa_print_cmd(h, "overrun condition", cp); cp 2947 drivers/scsi/hpsa.c hpsa_print_cmd(h, "invalid command", cp); cp 2952 drivers/scsi/hpsa.c hpsa_print_cmd(h, "protocol error", cp); cp 2955 drivers/scsi/hpsa.c hpsa_print_cmd(h, "hardware error", cp); cp 2958 drivers/scsi/hpsa.c hpsa_print_cmd(h, "connection lost", cp); cp 2961 drivers/scsi/hpsa.c hpsa_print_cmd(h, "aborted", cp); cp 2964 drivers/scsi/hpsa.c hpsa_print_cmd(h, "abort failed", cp); cp 2967 drivers/scsi/hpsa.c hpsa_print_cmd(h, "unsolicited abort", cp); cp 2970 drivers/scsi/hpsa.c hpsa_print_cmd(h, "timed out", cp); cp 2973 drivers/scsi/hpsa.c hpsa_print_cmd(h, "unabortable", cp); cp 2976 drivers/scsi/hpsa.c hpsa_print_cmd(h, "controller lockup detected", cp); cp 2979 drivers/scsi/hpsa.c hpsa_print_cmd(h, "unknown status", cp); cp 4545 drivers/scsi/hpsa.c struct CommandList *cp, cp 4568 drivers/scsi/hpsa.c curr_sg = cp->SG; cp 4584 drivers/scsi/hpsa.c curr_sg = h->cmd_sg_list[cp->cmdindex]; cp 4599 drivers/scsi/hpsa.c cp->Header.SGList = h->max_cmd_sg_entries; cp 4600 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(use_sg + 1); cp 4601 drivers/scsi/hpsa.c if (hpsa_map_sg_chain_block(h, cp)) { cp 4610 drivers/scsi/hpsa.c cp->Header.SGList = (u8) use_sg; /* no. SGs contig in this cmd */ cp 4611 drivers/scsi/hpsa.c cp->Header.SGTotal = cpu_to_le16(use_sg); /* total sgs in cmd list */ cp 4706 drivers/scsi/hpsa.c struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[c->cmdindex]; cp 4738 drivers/scsi/hpsa.c (c->cmdindex * sizeof(*cp)); cp 4748 drivers/scsi/hpsa.c curr_sg = cp->SG; cp 4782 drivers/scsi/hpsa.c cp->dev_handle = cpu_to_le16(ioaccel_handle & 0xFFFF); cp 4783 drivers/scsi/hpsa.c cp->transfer_len = cpu_to_le32(total_len); cp 4784 drivers/scsi/hpsa.c cp->io_flags = cpu_to_le16(IOACCEL1_IOFLAGS_IO_REQ | cp 4786 drivers/scsi/hpsa.c cp->control = cpu_to_le32(control); cp 4787 drivers/scsi/hpsa.c memcpy(cp->CDB, cdb, cdb_len); cp 4788 drivers/scsi/hpsa.c memcpy(cp->CISS_LUN, scsi3addr, 8); cp 4820 drivers/scsi/hpsa.c struct CommandList *c, struct io_accel2_cmd *cp) cp 4831 drivers/scsi/hpsa.c cp->dekindex = map->dekindex; cp 4834 drivers/scsi/hpsa.c cp->direction |= IOACCEL2_DIRECTION_ENCRYPT_MASK; cp 4871 drivers/scsi/hpsa.c cp->tweak_lower = cpu_to_le32(first_block); cp 4872 drivers/scsi/hpsa.c cp->tweak_upper = cpu_to_le32(first_block >> 32); cp 4880 drivers/scsi/hpsa.c struct io_accel2_cmd *cp = &h->ioaccel2_cmd_pool[c->cmdindex]; cp 4910 drivers/scsi/hpsa.c (c->cmdindex * sizeof(*cp)); cp 4913 drivers/scsi/hpsa.c memset(cp, 0, sizeof(*cp)); cp 4914 drivers/scsi/hpsa.c cp->IU_type = IOACCEL2_IU_TYPE; cp 4923 drivers/scsi/hpsa.c curr_sg = cp->sg; cp 4956 drivers/scsi/hpsa.c cp->direction &= ~IOACCEL2_DIRECTION_MASK; cp 4957 drivers/scsi/hpsa.c cp->direction |= IOACCEL2_DIR_DATA_OUT; cp 4960 drivers/scsi/hpsa.c cp->direction &= ~IOACCEL2_DIRECTION_MASK; cp 4961 drivers/scsi/hpsa.c cp->direction |= IOACCEL2_DIR_DATA_IN; cp 4964 drivers/scsi/hpsa.c cp->direction &= ~IOACCEL2_DIRECTION_MASK; cp 4965 drivers/scsi/hpsa.c cp->direction |= IOACCEL2_DIR_NO_DATA; cp 4974 drivers/scsi/hpsa.c cp->direction &= ~IOACCEL2_DIRECTION_MASK; cp 4975 drivers/scsi/hpsa.c cp->direction |= IOACCEL2_DIR_NO_DATA; cp 4979 drivers/scsi/hpsa.c set_encrypt_ioaccel2(h, c, cp); cp 4981 drivers/scsi/hpsa.c cp->scsi_nexus = cpu_to_le32(ioaccel_handle); cp 4982 drivers/scsi/hpsa.c cp->Tag = cpu_to_le32(c->cmdindex << DIRECT_LOOKUP_SHIFT); cp 4983 drivers/scsi/hpsa.c memcpy(cp->cdb, cdb, sizeof(cp->cdb)); cp 4985 drivers/scsi/hpsa.c cp->data_len = cpu_to_le32(total_len); cp 4986 drivers/scsi/hpsa.c cp->err_ptr = cpu_to_le64(c->busaddr + cp 4988 drivers/scsi/hpsa.c cp->err_len = cpu_to_le32(sizeof(cp->error_data)); cp 4992 drivers/scsi/hpsa.c cp->sg_count = 1; cp 4993 drivers/scsi/hpsa.c cp->sg[0].length = cpu_to_le32(use_sg * sizeof(cp->sg[0])); cp 4994 drivers/scsi/hpsa.c if (hpsa_map_ioaccel2_sg_chain_block(h, cp, c)) { cp 5000 drivers/scsi/hpsa.c cp->sg_count = (u8) use_sg; cp 6204 drivers/scsi/hpsa.c u32 cp; cp 6215 drivers/scsi/hpsa.c err |= get_user(cp, &arg32->buf); cp 6216 drivers/scsi/hpsa.c arg64.buf = compat_ptr(cp); cp 6241 drivers/scsi/hpsa.c u32 cp; cp 6253 drivers/scsi/hpsa.c err |= get_user(cp, &arg32->buf); cp 6254 drivers/scsi/hpsa.c arg64.buf = compat_ptr(cp); cp 9245 drivers/scsi/hpsa.c struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[i]; cp 9247 drivers/scsi/hpsa.c cp->function = IOACCEL1_FUNCTION_SCSIIO; cp 9248 drivers/scsi/hpsa.c cp->err_info = (u32) (h->errinfo_pool_dhandle + cp 9250 drivers/scsi/hpsa.c cp->err_info_len = sizeof(struct ErrorInfo); cp 9251 drivers/scsi/hpsa.c cp->sgl_offset = IOACCEL1_SGLOFFSET; cp 9252 drivers/scsi/hpsa.c cp->host_context_flags = cp 9254 drivers/scsi/hpsa.c cp->timeout_sec = 0; cp 9255 drivers/scsi/hpsa.c cp->ReplyQueue = 0; cp 9256 drivers/scsi/hpsa.c cp->tag = cp 9258 drivers/scsi/hpsa.c cp->host_addr = cp 500 drivers/scsi/libfc/fc_disc.c struct fc_ct_hdr *cp; cp 521 drivers/scsi/libfc/fc_disc.c cp = fc_frame_payload_get(fp, sizeof(*cp)); cp 522 drivers/scsi/libfc/fc_disc.c if (!cp) { cp 526 drivers/scsi/libfc/fc_disc.c } else if (ntohs(cp->ct_cmd) == FC_FS_ACC) { cp 529 drivers/scsi/libfc/fc_disc.c len -= sizeof(*cp); cp 530 drivers/scsi/libfc/fc_disc.c error = fc_disc_gpn_ft_parse(disc, cp + 1, len); cp 531 drivers/scsi/libfc/fc_disc.c } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { cp 533 drivers/scsi/libfc/fc_disc.c "(check zoning)\n", cp->ct_reason, cp 534 drivers/scsi/libfc/fc_disc.c cp->ct_explan); cp 536 drivers/scsi/libfc/fc_disc.c if (cp->ct_reason == FC_FS_RJT_UNABL && cp 537 drivers/scsi/libfc/fc_disc.c cp->ct_explan == FC_FS_EXP_FTNR) cp 541 drivers/scsi/libfc/fc_disc.c "%x\n", ntohs(cp->ct_cmd)); cp 575 drivers/scsi/libfc/fc_disc.c struct fc_ct_hdr *cp; cp 587 drivers/scsi/libfc/fc_disc.c cp = fc_frame_payload_get(fp, sizeof(*cp)); cp 588 drivers/scsi/libfc/fc_disc.c if (!cp) cp 590 drivers/scsi/libfc/fc_disc.c if (ntohs(cp->ct_cmd) == FC_FS_ACC) { cp 592 drivers/scsi/libfc/fc_disc.c sizeof(*cp) + sizeof(*pn)) cp 594 drivers/scsi/libfc/fc_disc.c pn = (struct fc_ns_gid_pn *)(cp + 1); cp 617 drivers/scsi/libfc/fc_disc.c } else if (ntohs(cp->ct_cmd) == FC_FS_RJT) { cp 619 drivers/scsi/libfc/fc_disc.c cp->ct_reason, cp->ct_explan); cp 623 drivers/scsi/libfc/fc_disc.c ntohs(cp->ct_cmd)); cp 214 drivers/scsi/libfc/fc_lport.c const char *cp; cp 216 drivers/scsi/libfc/fc_lport.c cp = fc_lport_state_names[lport->state]; cp 217 drivers/scsi/libfc/fc_lport.c if (!cp) cp 218 drivers/scsi/libfc/fc_lport.c cp = "unknown"; cp 219 drivers/scsi/libfc/fc_lport.c return cp; cp 351 drivers/scsi/libfc/fc_lport.c struct fc_els_cssp *cp; cp 362 drivers/scsi/libfc/fc_lport.c cp = &flogi->fl_cssp[3 - 1]; /* class 3 parameters */ cp 363 drivers/scsi/libfc/fc_lport.c cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); cp 370 drivers/scsi/libfc/fc_lport.c cp->cp_rdfs = htons((u16) lport->mfs); cp 371 drivers/scsi/libfc/fc_lport.c cp->cp_con_seq = htons(255); cp 372 drivers/scsi/libfc/fc_lport.c cp->cp_open_seq = 1; cp 188 drivers/scsi/libfc/fc_rport.c const char *cp; cp 190 drivers/scsi/libfc/fc_rport.c cp = fc_rport_state_names[rdata->rp_state]; cp 191 drivers/scsi/libfc/fc_rport.c if (!cp) cp 192 drivers/scsi/libfc/fc_rport.c cp = "Unknown"; cp 193 drivers/scsi/libfc/fc_rport.c return cp; cp 968 drivers/scsi/lpfc/lpfc_nvme.c struct nvme_fc_cmd_iu *cp; cp 1037 drivers/scsi/lpfc/lpfc_nvme.c cp = (struct nvme_fc_cmd_iu *)nCmd->cmdaddr; cp 1038 drivers/scsi/lpfc/lpfc_nvme.c cid = cp->sqe.common.command_id; cp 857 drivers/scsi/ncr53c8xx.c #define CCB_DONE_VALID(cp) (((u_long) cp) != CCB_DONE_EMPTY) cp 861 drivers/scsi/ncr53c8xx.c #define CCB_DONE_VALID(cp) \ cp 862 drivers/scsi/ncr53c8xx.c ((((u_long) cp) & 0xffffffff00000000ul) && \ cp 863 drivers/scsi/ncr53c8xx.c (((u_long) cp) & 0xfffffffful) != CCB_DONE_EMPTY) cp 1380 drivers/scsi/ncr53c8xx.c struct ccb * cp; cp 1576 drivers/scsi/ncr53c8xx.c #define CCB_PHYS(cp,lbl) (cp->p_ccb + offsetof(struct ccb, lbl)) cp 1908 drivers/scsi/ncr53c8xx.c static void ncr_complete (struct ncb *np, struct ccb *cp); cp 1910 drivers/scsi/ncr53c8xx.c static void ncr_free_ccb (struct ncb *np, struct ccb *cp); cp 1911 drivers/scsi/ncr53c8xx.c static void ncr_init_ccb (struct ncb *np, struct ccb *cp); cp 1926 drivers/scsi/ncr53c8xx.c static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr); cp 1931 drivers/scsi/ncr53c8xx.c static int ncr_scatter (struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd); cp 1933 drivers/scsi/ncr53c8xx.c static void ncr_setsync (struct ncb *np, struct ccb *cp, u_char scntl3, u_char sxfer); cp 1935 drivers/scsi/ncr53c8xx.c static void ncr_setwide (struct ncb *np, struct ccb *cp, u_char wide, u_char ack); cp 1941 drivers/scsi/ncr53c8xx.c static void ncr_put_start_queue(struct ncb *np, struct ccb *cp); cp 3451 drivers/scsi/ncr53c8xx.c *p++ =NADDR (header.cp); cp 3667 drivers/scsi/ncr53c8xx.c static void ncr_print_msg(struct ccb *cp, char *label, u_char *msg) cp 3669 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "%s: ", label); cp 4051 drivers/scsi/ncr53c8xx.c static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr) cp 4053 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; cp 4086 drivers/scsi/ncr53c8xx.c cp->nego_status = nego; cp 4089 drivers/scsi/ncr53c8xx.c tp->nego_cp = cp; cp 4091 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, nego == NS_WIDE ? cp 4115 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 4170 drivers/scsi/ncr53c8xx.c if (np->settle_time || !(cp=ncr_get_ccb (np, cmd))) { cp 4174 drivers/scsi/ncr53c8xx.c cp->cmd = cmd; cp 4185 drivers/scsi/ncr53c8xx.c if (cp ->tag != NO_TAG || cp 4186 drivers/scsi/ncr53c8xx.c (cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC))) cp 4189 drivers/scsi/ncr53c8xx.c msgptr = cp->scsi_smsg; cp 4193 drivers/scsi/ncr53c8xx.c if (cp->tag != NO_TAG) { cp 4232 drivers/scsi/ncr53c8xx.c msgptr[msglen++] = (cp->tag << 1) + 1; cp 4244 drivers/scsi/ncr53c8xx.c segments = ncr_scatter(np, cp, cp->cmd); cp 4246 drivers/scsi/ncr53c8xx.c ncr_free_ccb(np, cp); cp 4251 drivers/scsi/ncr53c8xx.c cp->data_len = 0; cp 4264 drivers/scsi/ncr53c8xx.c cp->nego_status = 0; cp 4267 drivers/scsi/ncr53c8xx.c msglen += ncr_prepare_nego (np, cp, msgptr + msglen); cp 4276 drivers/scsi/ncr53c8xx.c if (!cp->data_len) cp 4297 drivers/scsi/ncr53c8xx.c cp->phys.header.wgoalp = cpu_to_scr(goalp); cp 4298 drivers/scsi/ncr53c8xx.c cp->phys.header.wlastp = cpu_to_scr(lastp); cp 4319 drivers/scsi/ncr53c8xx.c cp->phys.header.lastp = cpu_to_scr(lastp); cp 4320 drivers/scsi/ncr53c8xx.c cp->phys.header.goalp = cpu_to_scr(goalp); cp 4323 drivers/scsi/ncr53c8xx.c cp->phys.header.savep = cp 4326 drivers/scsi/ncr53c8xx.c cp->phys.header.savep= cpu_to_scr(lastp); cp 4332 drivers/scsi/ncr53c8xx.c cp->startp = cp->phys.header.savep; cp 4348 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, select)); cp 4349 drivers/scsi/ncr53c8xx.c cp->restart.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, resel_dsa)); cp 4353 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_id = sdev_id(sdev); cp 4354 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_scntl3 = tp->wval; cp 4355 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_sxfer = tp->sval; cp 4359 drivers/scsi/ncr53c8xx.c cp->phys.smsg.addr = cpu_to_scr(CCB_PHYS (cp, scsi_smsg)); cp 4360 drivers/scsi/ncr53c8xx.c cp->phys.smsg.size = cpu_to_scr(msglen); cp 4365 drivers/scsi/ncr53c8xx.c memcpy(cp->cdb_buf, cmd->cmnd, min_t(int, cmd->cmd_len, sizeof(cp->cdb_buf))); cp 4366 drivers/scsi/ncr53c8xx.c cp->phys.cmd.addr = cpu_to_scr(CCB_PHYS (cp, cdb_buf[0])); cp 4367 drivers/scsi/ncr53c8xx.c cp->phys.cmd.size = cpu_to_scr(cmd->cmd_len); cp 4372 drivers/scsi/ncr53c8xx.c cp->actualquirks = 0; cp 4373 drivers/scsi/ncr53c8xx.c cp->host_status = cp->nego_status ? HS_NEGOTIATE : HS_BUSY; cp 4374 drivers/scsi/ncr53c8xx.c cp->scsi_status = S_ILLEGAL; cp 4375 drivers/scsi/ncr53c8xx.c cp->parity_status = 0; cp 4377 drivers/scsi/ncr53c8xx.c cp->xerr_status = XE_OK; cp 4379 drivers/scsi/ncr53c8xx.c cp->sync_status = tp->sval; cp 4380 drivers/scsi/ncr53c8xx.c cp->wide_status = tp->wval; cp 4391 drivers/scsi/ncr53c8xx.c cp->magic = CCB_MAGIC; cp 4397 drivers/scsi/ncr53c8xx.c cp->auto_sense = 0; cp 4401 drivers/scsi/ncr53c8xx.c ncr_put_start_queue(np, cp); cp 4422 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 4432 drivers/scsi/ncr53c8xx.c cp = list_entry(qp, struct ccb, link_ccbq); cp 4434 drivers/scsi/ncr53c8xx.c lp->jump_ccb[cp->tag == NO_TAG ? 0 : cp->tag] = cp 4435 drivers/scsi/ncr53c8xx.c cpu_to_scr(CCB_PHYS (cp, restart)); cp 4436 drivers/scsi/ncr53c8xx.c ncr_put_start_queue(np, cp); cp 4440 drivers/scsi/ncr53c8xx.c static void ncr_put_start_queue(struct ncb *np, struct ccb *cp) cp 4453 drivers/scsi/ncr53c8xx.c np->scripth->tryloop [np->squeueput] = cpu_to_scr(CCB_PHYS (cp, start)); cp 4457 drivers/scsi/ncr53c8xx.c cp->queued = 1; cp 4556 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 4575 drivers/scsi/ncr53c8xx.c for (found=0, cp=np->ccb; cp; cp=cp->link_ccb) { cp 4579 drivers/scsi/ncr53c8xx.c if (cp->host_status == HS_IDLE) continue; cp 4580 drivers/scsi/ncr53c8xx.c if (cp->cmd == cmd) { cp 4625 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 4641 drivers/scsi/ncr53c8xx.c for (found=0, cp=np->ccb; cp; cp=cp->link_ccb) { cp 4645 drivers/scsi/ncr53c8xx.c if (cp->host_status == HS_IDLE) continue; cp 4646 drivers/scsi/ncr53c8xx.c if (cp->cmd == cmd) { cp 4665 drivers/scsi/ncr53c8xx.c switch(cp->host_status) { cp 4668 drivers/scsi/ncr53c8xx.c printk ("%s: abort ccb=%p (cancel)\n", ncr_name (np), cp); cp 4669 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cp 4674 drivers/scsi/ncr53c8xx.c cp->restart.schedule.l_paddr = cp 4697 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 4757 drivers/scsi/ncr53c8xx.c while ((cp=np->ccb->link_ccb) != NULL) { cp 4758 drivers/scsi/ncr53c8xx.c np->ccb->link_ccb = cp->link_ccb; cp 4759 drivers/scsi/ncr53c8xx.c if (cp->host_status) { cp 4761 drivers/scsi/ncr53c8xx.c ncr_name(np), cp->host_status); cp 4764 drivers/scsi/ncr53c8xx.c printk("%s: freeing ccb (%lx)\n", ncr_name(np), (u_long) cp); cp 4766 drivers/scsi/ncr53c8xx.c m_free_dma(cp, sizeof(*cp), "CCB"); cp 4807 drivers/scsi/ncr53c8xx.c void ncr_complete (struct ncb *np, struct ccb *cp) cp 4817 drivers/scsi/ncr53c8xx.c if (!cp || cp->magic != CCB_MAGIC || !cp->cmd) cp 4825 drivers/scsi/ncr53c8xx.c printk ("CCB=%lx STAT=%x/%x\n", (unsigned long)cp, cp 4826 drivers/scsi/ncr53c8xx.c cp->host_status,cp->scsi_status); cp 4832 drivers/scsi/ncr53c8xx.c cmd = cp->cmd; cp 4833 drivers/scsi/ncr53c8xx.c cp->cmd = NULL; cp 4843 drivers/scsi/ncr53c8xx.c if (cp == tp->nego_cp) cp 4849 drivers/scsi/ncr53c8xx.c if (cp->auto_sense) { cp 4850 drivers/scsi/ncr53c8xx.c cp->scsi_status = cp->auto_sense; cp 4859 drivers/scsi/ncr53c8xx.c if (cp == lp->held_ccb) { cp 4869 drivers/scsi/ncr53c8xx.c if (cp->parity_status > 1) { cp 4870 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cmd, "%d parity error(s).\n",cp->parity_status); cp 4877 drivers/scsi/ncr53c8xx.c if (cp->xerr_status != XE_OK) { cp 4878 drivers/scsi/ncr53c8xx.c switch (cp->xerr_status) { cp 4887 drivers/scsi/ncr53c8xx.c cp->xerr_status); cp 4890 drivers/scsi/ncr53c8xx.c if (cp->host_status==HS_COMPLETE) cp 4891 drivers/scsi/ncr53c8xx.c cp->host_status = HS_FAIL; cp 4898 drivers/scsi/ncr53c8xx.c if (cp->host_status!=HS_COMPLETE || cp->scsi_status!=S_GOOD) { cp 4901 drivers/scsi/ncr53c8xx.c cp->host_status, cp->scsi_status); cp 4908 drivers/scsi/ncr53c8xx.c if ( (cp->host_status == HS_COMPLETE) cp 4909 drivers/scsi/ncr53c8xx.c && (cp->scsi_status == S_GOOD || cp 4910 drivers/scsi/ncr53c8xx.c cp->scsi_status == S_COND_MET)) { cp 4916 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_OK, cp->scsi_status); cp 4931 drivers/scsi/ncr53c8xx.c tp->bytes += cp->data_len; cp 4946 drivers/scsi/ncr53c8xx.c } else if ((cp->host_status == HS_COMPLETE) cp 4947 drivers/scsi/ncr53c8xx.c && (cp->scsi_status == S_CHECK_COND)) { cp 4956 drivers/scsi/ncr53c8xx.c memcpy(cmd->sense_buffer, cp->sense_buf, cp 4958 drivers/scsi/ncr53c8xx.c sizeof(cp->sense_buf))); cp 4967 drivers/scsi/ncr53c8xx.c } else if ((cp->host_status == HS_COMPLETE) cp 4968 drivers/scsi/ncr53c8xx.c && (cp->scsi_status == S_CONFLICT)) { cp 4974 drivers/scsi/ncr53c8xx.c } else if ((cp->host_status == HS_COMPLETE) cp 4975 drivers/scsi/ncr53c8xx.c && (cp->scsi_status == S_BUSY || cp 4976 drivers/scsi/ncr53c8xx.c cp->scsi_status == S_QUEUE_FULL)) { cp 4981 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_OK, cp->scsi_status); cp 4983 drivers/scsi/ncr53c8xx.c } else if ((cp->host_status == HS_SEL_TIMEOUT) cp 4984 drivers/scsi/ncr53c8xx.c || (cp->host_status == HS_TIMEOUT)) { cp 4989 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_TIME_OUT, cp->scsi_status); cp 4991 drivers/scsi/ncr53c8xx.c } else if (cp->host_status == HS_RESET) { cp 4996 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_RESET, cp->scsi_status); cp 4998 drivers/scsi/ncr53c8xx.c } else if (cp->host_status == HS_ABORTED) { cp 5003 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_ABORT, cp->scsi_status); cp 5011 drivers/scsi/ncr53c8xx.c cp->host_status, cp->scsi_status, cp); cp 5013 drivers/scsi/ncr53c8xx.c cmd->result = ScsiResult(DID_ERROR, cp->scsi_status); cp 5027 drivers/scsi/ncr53c8xx.c if (cp->host_status==HS_COMPLETE) { cp 5028 drivers/scsi/ncr53c8xx.c switch (cp->scsi_status) { cp 5039 drivers/scsi/ncr53c8xx.c printk (" STAT: %x\n", cp->scsi_status); cp 5042 drivers/scsi/ncr53c8xx.c } else printk (" HOSTERROR: %x", cp->host_status); cp 5049 drivers/scsi/ncr53c8xx.c ncr_free_ccb (np, cp); cp 5083 drivers/scsi/ncr53c8xx.c static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp) cp 5085 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; cp 5086 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[cp->lun]; cp 5088 drivers/scsi/ncr53c8xx.c if (lp && cp != np->ccb) { cp 5089 drivers/scsi/ncr53c8xx.c cp->host_status &= ~HS_SKIPMASK; cp 5090 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cp 5092 drivers/scsi/ncr53c8xx.c list_move_tail(&cp->link_ccbq, &lp->skip_ccbq); cp 5093 drivers/scsi/ncr53c8xx.c if (cp->queued) { cp 5097 drivers/scsi/ncr53c8xx.c if (cp->queued) { cp 5099 drivers/scsi/ncr53c8xx.c cp->queued = 0; cp 5109 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 5119 drivers/scsi/ncr53c8xx.c cp = np->ccb_done[j]; cp 5120 drivers/scsi/ncr53c8xx.c if (!CCB_DONE_VALID(cp)) cp 5130 drivers/scsi/ncr53c8xx.c if (cp->host_status & HS_DONEMASK) cp 5131 drivers/scsi/ncr53c8xx.c ncr_complete (np, cp); cp 5132 drivers/scsi/ncr53c8xx.c else if (cp->host_status & HS_SKIPMASK) cp 5133 drivers/scsi/ncr53c8xx.c ncr_ccb_skipped (np, cp); cp 5139 drivers/scsi/ncr53c8xx.c cp = np->ccb; cp 5140 drivers/scsi/ncr53c8xx.c while (cp) { cp 5141 drivers/scsi/ncr53c8xx.c if (cp->host_status & HS_DONEMASK) cp 5142 drivers/scsi/ncr53c8xx.c ncr_complete (np, cp); cp 5143 drivers/scsi/ncr53c8xx.c else if (cp->host_status & HS_SKIPMASK) cp 5144 drivers/scsi/ncr53c8xx.c ncr_ccb_skipped (np, cp); cp 5145 drivers/scsi/ncr53c8xx.c cp = cp->link_ccb; cp 5155 drivers/scsi/ncr53c8xx.c struct ccb *cp = np->ccb; cp 5157 drivers/scsi/ncr53c8xx.c while (cp) { cp 5158 drivers/scsi/ncr53c8xx.c if (cp->host_status != HS_IDLE) { cp 5159 drivers/scsi/ncr53c8xx.c cp->host_status = code; cp 5160 drivers/scsi/ncr53c8xx.c ncr_complete (np, cp); cp 5162 drivers/scsi/ncr53c8xx.c cp = cp->link_ccb; cp 5488 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 5502 drivers/scsi/ncr53c8xx.c for (cp = np->ccb; cp; cp = cp->link_ccb) { cp 5503 drivers/scsi/ncr53c8xx.c if (!cp->cmd) continue; cp 5504 drivers/scsi/ncr53c8xx.c if (scmd_id(cp->cmd) != target) continue; cp 5506 drivers/scsi/ncr53c8xx.c cp->sync_status = tp->sval; cp 5507 drivers/scsi/ncr53c8xx.c cp->wide_status = tp->wval; cp 5509 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_scntl3 = tp->wval; cp 5510 drivers/scsi/ncr53c8xx.c cp->phys.select.sel_sxfer = tp->sval; cp 5521 drivers/scsi/ncr53c8xx.c static void ncr_setsync (struct ncb *np, struct ccb *cp, u_char scntl3, u_char sxfer) cp 5523 drivers/scsi/ncr53c8xx.c struct scsi_cmnd *cmd = cp->cmd; cp 5578 drivers/scsi/ncr53c8xx.c static void ncr_setwide (struct ncb *np, struct ccb *cp, u_char wide, u_char ack) cp 5580 drivers/scsi/ncr53c8xx.c struct scsi_cmnd *cmd = cp->cmd; cp 6080 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 6088 drivers/scsi/ncr53c8xx.c cp = np->ccb; cp 6089 drivers/scsi/ncr53c8xx.c while (cp && (CCB_PHYS (cp, phys) != dsa)) cp 6090 drivers/scsi/ncr53c8xx.c cp = cp->link_ccb; cp 6092 drivers/scsi/ncr53c8xx.c if (cp) { cp 6093 drivers/scsi/ncr53c8xx.c cp-> host_status = HS_SEL_TIMEOUT; cp 6094 drivers/scsi/ncr53c8xx.c ncr_complete (np, cp); cp 6247 drivers/scsi/ncr53c8xx.c struct ccb *cp; cp 6310 drivers/scsi/ncr53c8xx.c cp = np->header.cp; cp 6311 drivers/scsi/ncr53c8xx.c if (CCB_PHYS(cp, phys) != dsa) cp 6312 drivers/scsi/ncr53c8xx.c cp = NULL; cp 6314 drivers/scsi/ncr53c8xx.c cp = np->ccb; cp 6315 drivers/scsi/ncr53c8xx.c while (cp && (CCB_PHYS (cp, phys) != dsa)) cp 6316 drivers/scsi/ncr53c8xx.c cp = cp->link_ccb; cp 6335 drivers/scsi/ncr53c8xx.c else if (cp) { cp 6336 drivers/scsi/ncr53c8xx.c if (dsp == CCB_PHYS (cp, patch[2])) { cp 6337 drivers/scsi/ncr53c8xx.c vdsp = &cp->patch[0]; cp 6340 drivers/scsi/ncr53c8xx.c else if (dsp == CCB_PHYS (cp, patch[6])) { cp 6341 drivers/scsi/ncr53c8xx.c vdsp = &cp->patch[4]; cp 6352 drivers/scsi/ncr53c8xx.c cp, np->header.cp, cp 6363 drivers/scsi/ncr53c8xx.c if (!cp) { cp 6366 drivers/scsi/ncr53c8xx.c ncr_name (np), (u_long) np->header.cp); cp 6377 drivers/scsi/ncr53c8xx.c tblp = (u32 *) ((char*) &cp->phys + oadr); cp 6398 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "internal error: cmd=%02x != %02x=(vdsp[0] " cp 6410 drivers/scsi/ncr53c8xx.c if (cp != np->header.cp) { cp 6413 drivers/scsi/ncr53c8xx.c ncr_name (np), (u_long) cp, (u_long) np->header.cp); cp 6421 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "phase change %x-%x %d@%08x resid=%d.\n", cp 6432 drivers/scsi/ncr53c8xx.c newcmd = cp->patch; cp 6433 drivers/scsi/ncr53c8xx.c newtmp = CCB_PHYS (cp, patch); cp 6434 drivers/scsi/ncr53c8xx.c if (newtmp == scr_to_cpu(cp->phys.header.savep)) { cp 6435 drivers/scsi/ncr53c8xx.c newcmd = &cp->patch[4]; cp 6436 drivers/scsi/ncr53c8xx.c newtmp = CCB_PHYS (cp, patch[4]); cp 6449 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "newcmd[%d] %x %x %x %x.\n", cp 6450 drivers/scsi/ncr53c8xx.c (int) (newcmd - cp->patch), cp 6507 drivers/scsi/ncr53c8xx.c cp->host_status = HS_BUSY; cp 6532 drivers/scsi/ncr53c8xx.c static void ncr_sir_to_redo(struct ncb *np, int num, struct ccb *cp) cp 6534 drivers/scsi/ncr53c8xx.c struct scsi_cmnd *cmd = cp->cmd; cp 6556 drivers/scsi/ncr53c8xx.c if (cp2 == cp) cp 6561 drivers/scsi/ncr53c8xx.c lp->held_ccb = cp; /* Requeue when this one completes */ cp 6589 drivers/scsi/ncr53c8xx.c cp->phys.header.savep = cp->startp; cp 6590 drivers/scsi/ncr53c8xx.c cp->host_status = HS_BUSY; cp 6591 drivers/scsi/ncr53c8xx.c cp->scsi_status = S_ILLEGAL; cp 6593 drivers/scsi/ncr53c8xx.c ncr_put_start_queue(np, cp); cp 6603 drivers/scsi/ncr53c8xx.c if (cp->auto_sense) cp 6613 drivers/scsi/ncr53c8xx.c cp->scsi_smsg2[0] = IDENTIFY(0, cmd->device->lun); cp 6614 drivers/scsi/ncr53c8xx.c cp->phys.smsg.addr = cpu_to_scr(CCB_PHYS (cp, scsi_smsg2)); cp 6615 drivers/scsi/ncr53c8xx.c cp->phys.smsg.size = cpu_to_scr(1); cp 6620 drivers/scsi/ncr53c8xx.c cp->phys.cmd.addr = cpu_to_scr(CCB_PHYS (cp, sensecmd)); cp 6621 drivers/scsi/ncr53c8xx.c cp->phys.cmd.size = cpu_to_scr(6); cp 6626 drivers/scsi/ncr53c8xx.c cp->sensecmd[0] = 0x03; cp 6627 drivers/scsi/ncr53c8xx.c cp->sensecmd[1] = (cmd->device->lun & 0x7) << 5; cp 6628 drivers/scsi/ncr53c8xx.c cp->sensecmd[4] = sizeof(cp->sense_buf); cp 6633 drivers/scsi/ncr53c8xx.c memset(cp->sense_buf, 0, sizeof(cp->sense_buf)); cp 6634 drivers/scsi/ncr53c8xx.c cp->phys.sense.addr = cpu_to_scr(CCB_PHYS(cp,sense_buf[0])); cp 6635 drivers/scsi/ncr53c8xx.c cp->phys.sense.size = cpu_to_scr(sizeof(cp->sense_buf)); cp 6642 drivers/scsi/ncr53c8xx.c cp->phys.header.savep = startp; cp 6643 drivers/scsi/ncr53c8xx.c cp->phys.header.goalp = startp + 24; cp 6644 drivers/scsi/ncr53c8xx.c cp->phys.header.lastp = startp; cp 6645 drivers/scsi/ncr53c8xx.c cp->phys.header.wgoalp = startp + 24; cp 6646 drivers/scsi/ncr53c8xx.c cp->phys.header.wlastp = startp; cp 6648 drivers/scsi/ncr53c8xx.c cp->host_status = HS_BUSY; cp 6649 drivers/scsi/ncr53c8xx.c cp->scsi_status = S_ILLEGAL; cp 6650 drivers/scsi/ncr53c8xx.c cp->auto_sense = s_status; cp 6652 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cp 6659 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cp 6662 drivers/scsi/ncr53c8xx.c ncr_put_start_queue(np, cp); cp 6688 drivers/scsi/ncr53c8xx.c struct ccb *cp=NULL; cp 6735 drivers/scsi/ncr53c8xx.c cp = np->header.cp; cp 6736 drivers/scsi/ncr53c8xx.c if (!cp || CCB_PHYS (cp, phys) != dsa) cp 6738 drivers/scsi/ncr53c8xx.c ncr_sir_to_redo(np, num, cp); cp 6744 drivers/scsi/ncr53c8xx.c cp = np->ccb; cp 6745 drivers/scsi/ncr53c8xx.c while (cp && (CCB_PHYS (cp, phys) != dsa)) cp 6746 drivers/scsi/ncr53c8xx.c cp = cp->link_ccb; cp 6748 drivers/scsi/ncr53c8xx.c BUG_ON(!cp); cp 6749 drivers/scsi/ncr53c8xx.c BUG_ON(cp != np->header.cp); cp 6751 drivers/scsi/ncr53c8xx.c if (!cp || cp != np->header.cp) cp 6840 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "negotiation failed sir=%x " cp 6841 drivers/scsi/ncr53c8xx.c "status=%x.\n", num, cp->nego_status); cp 6848 drivers/scsi/ncr53c8xx.c switch (cp->nego_status) { cp 6853 drivers/scsi/ncr53c8xx.c ncr_setsync (np, cp, 0, 0xe0); cp 6858 drivers/scsi/ncr53c8xx.c ncr_setwide (np, cp, 0, 0); cp 6864 drivers/scsi/ncr53c8xx.c cp->nego_status = 0; cp 6869 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, "sync msgin", np->msgin); cp 6916 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "sync: per=%d scntl3=0x%x ofs=%d " cp 6922 drivers/scsi/ncr53c8xx.c switch (cp->nego_status) { cp 6930 drivers/scsi/ncr53c8xx.c ncr_setsync(np, cp, 0, 0xe0); cp 6936 drivers/scsi/ncr53c8xx.c ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); cp 6943 drivers/scsi/ncr53c8xx.c ncr_setwide(np, cp, 0, 0); cp 6955 drivers/scsi/ncr53c8xx.c ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); cp 6958 drivers/scsi/ncr53c8xx.c cp->nego_status = NS_SYNC; cp 6961 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, "sync msgout", np->msgout); cp 6977 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, "wide msgin", np->msgin); cp 7003 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "wide: wide=%d chg=%d.\n", wide, cp 7009 drivers/scsi/ncr53c8xx.c switch (cp->nego_status) { cp 7018 drivers/scsi/ncr53c8xx.c ncr_setwide(np, cp, 0, 1); cp 7023 drivers/scsi/ncr53c8xx.c ncr_setwide(np, cp, wide, 1); cp 7031 drivers/scsi/ncr53c8xx.c ncr_setsync(np, cp, 0, 0xe0); cp 7042 drivers/scsi/ncr53c8xx.c ncr_setwide(np, cp, wide, 1); cp 7047 drivers/scsi/ncr53c8xx.c cp->nego_status = NS_WIDE; cp 7050 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, "wide msgout", np->msgin); cp 7069 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "MESSAGE_REJECT received (%x:%x).\n", cp 7081 drivers/scsi/ncr53c8xx.c ncr_print_msg(cp, "MESSAGE_REJECT sent for", np->msgin); cp 7100 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "IGNORE_WIDE_RESIDUE received, but not yet " cp 7113 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "DISCONNECT received, but datapointer " cp 7142 drivers/scsi/ncr53c8xx.c struct ccb *cp = NULL; cp 7166 drivers/scsi/ncr53c8xx.c cp = list_entry(qp, struct ccb, link_ccbq); cp 7167 drivers/scsi/ncr53c8xx.c if (cp->magic) { cp 7169 drivers/scsi/ncr53c8xx.c "(@%p)\n", cp); cp 7170 drivers/scsi/ncr53c8xx.c cp = NULL; cp 7181 drivers/scsi/ncr53c8xx.c if (cp) { cp 7192 drivers/scsi/ncr53c8xx.c if (!cp) cp 7193 drivers/scsi/ncr53c8xx.c cp = np->ccb; cp 7199 drivers/scsi/ncr53c8xx.c while (cp->magic) { cp 7201 drivers/scsi/ncr53c8xx.c if (tsleep ((caddr_t)cp, PRIBIO|PCATCH, "ncr", 0)) cp 7206 drivers/scsi/ncr53c8xx.c if (cp->magic) cp 7209 drivers/scsi/ncr53c8xx.c cp->magic = 1; cp 7226 drivers/scsi/ncr53c8xx.c cp->tag = tag; cp 7227 drivers/scsi/ncr53c8xx.c cp->target = tn; cp 7228 drivers/scsi/ncr53c8xx.c cp->lun = ln; cp 7231 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cmd, "ccb @%p using tag %d.\n", cp, tag); cp 7234 drivers/scsi/ncr53c8xx.c return cp; cp 7246 drivers/scsi/ncr53c8xx.c static void ncr_free_ccb (struct ncb *np, struct ccb *cp) cp 7248 drivers/scsi/ncr53c8xx.c struct tcb *tp = &np->target[cp->target]; cp 7249 drivers/scsi/ncr53c8xx.c struct lcb *lp = tp->lp[cp->lun]; cp 7252 drivers/scsi/ncr53c8xx.c PRINT_ADDR(cp->cmd, "ccb @%p freeing tag %d.\n", cp, cp->tag); cp 7261 drivers/scsi/ncr53c8xx.c if (cp->tag != NO_TAG) { cp 7262 drivers/scsi/ncr53c8xx.c lp->cb_tags[lp->if_tag++] = cp->tag; cp 7265 drivers/scsi/ncr53c8xx.c lp->tags_umap &= ~(((tagmap_t) 1) << cp->tag); cp 7267 drivers/scsi/ncr53c8xx.c lp->jump_ccb[cp->tag] = cp 7280 drivers/scsi/ncr53c8xx.c if (cp != np->ccb) cp 7281 drivers/scsi/ncr53c8xx.c list_move(&cp->link_ccbq, &lp->free_ccbq); cp 7283 drivers/scsi/ncr53c8xx.c if (cp->queued) { cp 7287 drivers/scsi/ncr53c8xx.c cp -> host_status = HS_IDLE; cp 7288 drivers/scsi/ncr53c8xx.c cp -> magic = 0; cp 7289 drivers/scsi/ncr53c8xx.c if (cp->queued) { cp 7291 drivers/scsi/ncr53c8xx.c cp->queued = 0; cp 7295 drivers/scsi/ncr53c8xx.c if (cp == np->ccb) cp 7296 drivers/scsi/ncr53c8xx.c wakeup ((caddr_t) cp); cp 7308 drivers/scsi/ncr53c8xx.c static void ncr_init_ccb(struct ncb *np, struct ccb *cp) cp 7315 drivers/scsi/ncr53c8xx.c cp->p_ccb = vtobus(cp); cp 7316 drivers/scsi/ncr53c8xx.c cp->phys.header.cp = cp; cp 7321 drivers/scsi/ncr53c8xx.c INIT_LIST_HEAD(&cp->link_ccbq); cp 7329 drivers/scsi/ncr53c8xx.c cp->start.setup_dsa[0] = cpu_to_scr(copy_4); cp 7330 drivers/scsi/ncr53c8xx.c cp->start.setup_dsa[1] = cpu_to_scr(CCB_PHYS(cp, start.p_phys)); cp 7331 drivers/scsi/ncr53c8xx.c cp->start.setup_dsa[2] = cpu_to_scr(ncr_reg_bus_addr(nc_dsa)); cp 7332 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_cmd = cpu_to_scr(SCR_JUMP); cp 7333 drivers/scsi/ncr53c8xx.c cp->start.p_phys = cpu_to_scr(CCB_PHYS(cp, phys)); cp 7335 drivers/scsi/ncr53c8xx.c memcpy(&cp->restart, &cp->start, sizeof(cp->restart)); cp 7337 drivers/scsi/ncr53c8xx.c cp->start.schedule.l_paddr = cpu_to_scr(NCB_SCRIPT_PHYS (np, idle)); cp 7338 drivers/scsi/ncr53c8xx.c cp->restart.schedule.l_paddr = cpu_to_scr(NCB_SCRIPTH_PHYS (np, abort)); cp 7351 drivers/scsi/ncr53c8xx.c struct ccb *cp = NULL; cp 7356 drivers/scsi/ncr53c8xx.c cp = m_calloc_dma(sizeof(struct ccb), "CCB"); cp 7357 drivers/scsi/ncr53c8xx.c if (!cp) cp 7365 drivers/scsi/ncr53c8xx.c memset(cp, 0, sizeof (*cp)); cp 7366 drivers/scsi/ncr53c8xx.c ncr_init_ccb(np, cp); cp 7372 drivers/scsi/ncr53c8xx.c cp->link_ccb = np->ccb->link_ccb; cp 7373 drivers/scsi/ncr53c8xx.c np->ccb->link_ccb = cp; cp 7375 drivers/scsi/ncr53c8xx.c list_add(&cp->link_ccbq, &lp->free_ccbq); cp 7639 drivers/scsi/ncr53c8xx.c static int ncr_scatter(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd) cp 7644 drivers/scsi/ncr53c8xx.c cp->data_len = 0; cp 7656 drivers/scsi/ncr53c8xx.c data = &cp->phys.data[MAX_SCATTER - use_sg]; cp 7663 drivers/scsi/ncr53c8xx.c cp->data_len += len; cp 994 drivers/scsi/qedf/qedf_main.c struct fcoe_crc_eof *cp; cp 1104 drivers/scsi/qedf/qedf_main.c cp = kmap_atomic(skb_frag_page(frag)) + skb_frag_off(frag); cp 1106 drivers/scsi/qedf/qedf_main.c cp = skb_put(skb, tlen); cp 1109 drivers/scsi/qedf/qedf_main.c memset(cp, 0, sizeof(*cp)); cp 1110 drivers/scsi/qedf/qedf_main.c cp->fcoe_eof = eof; cp 1111 drivers/scsi/qedf/qedf_main.c cp->fcoe_crc32 = cpu_to_le32(~crc); cp 1113 drivers/scsi/qedf/qedf_main.c kunmap_atomic(cp); cp 1114 drivers/scsi/qedf/qedf_main.c cp = NULL; cp 1293 drivers/scsi/qla1280.c qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) cp 1364 drivers/scsi/qla1280.c if ((scsi_bufflen(cp) - residual_length) < cp 1365 drivers/scsi/qla1280.c cp->underflow) { cp 1371 drivers/scsi/qla1280.c scsi_set_resid(cp, residual_length); cp 3998 drivers/scsi/qla1280.c struct scsi_cmnd *cp; cp 4007 drivers/scsi/qla1280.c if ((cp = sp->cmd) == NULL) cp 4009 drivers/scsi/qla1280.c qla1280_print_scsi_cmd(1, cp); cp 4049 drivers/scsi/qla1280.c char *cp, *ptr; cp 4053 drivers/scsi/qla1280.c cp = s; cp 4055 drivers/scsi/qla1280.c while (cp && (ptr = strchr(cp, ':'))) { cp 4066 drivers/scsi/qla1280.c switch ((toke = qla1280_get_token(cp))) { cp 4094 drivers/scsi/qla1280.c cp); cp 4097 drivers/scsi/qla1280.c cp = strchr(ptr, ';'); cp 4098 drivers/scsi/qla1280.c if (cp) cp 4099 drivers/scsi/qla1280.c cp++; cp 2085 drivers/scsi/qla2xxx/qla_isr.c struct scsi_cmnd *cp = GET_CMD_SP(sp); cp 2092 drivers/scsi/qla2xxx/qla_isr.c SET_CMD_SENSE_PTR(sp, cp->sense_buffer); cp 2098 drivers/scsi/qla2xxx/qla_isr.c memcpy(cp->sense_buffer, sense_data, sense_len); cp 2100 drivers/scsi/qla2xxx/qla_isr.c SET_CMD_SENSE_PTR(sp, cp->sense_buffer + sense_len); cp 2106 drivers/scsi/qla2xxx/qla_isr.c cp->result = res; cp 2112 drivers/scsi/qla2xxx/qla_isr.c sp->vha->host_no, cp->device->id, cp->device->lun, cp 2113 drivers/scsi/qla2xxx/qla_isr.c cp); cp 2115 drivers/scsi/qla2xxx/qla_isr.c cp->sense_buffer, sense_len); cp 2412 drivers/scsi/qla2xxx/qla_isr.c struct scsi_cmnd *cp; cp 2516 drivers/scsi/qla2xxx/qla_isr.c cp = GET_CMD_SP(sp); cp 2517 drivers/scsi/qla2xxx/qla_isr.c if (cp == NULL) { cp 2606 drivers/scsi/qla2xxx/qla_isr.c scsi_set_resid(cp, resid); cp 2609 drivers/scsi/qla2xxx/qla_isr.c ((unsigned)(scsi_bufflen(cp) - resid) < cp 2610 drivers/scsi/qla2xxx/qla_isr.c cp->underflow)) { cp 2613 drivers/scsi/qla2xxx/qla_isr.c resid, scsi_bufflen(cp)); cp 2630 drivers/scsi/qla2xxx/qla_isr.c memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); cp 2641 drivers/scsi/qla2xxx/qla_isr.c scsi_set_resid(cp, resid); cp 2646 drivers/scsi/qla2xxx/qla_isr.c resid, scsi_bufflen(cp)); cp 2653 drivers/scsi/qla2xxx/qla_isr.c ((unsigned)(scsi_bufflen(cp) - resid) < cp 2654 drivers/scsi/qla2xxx/qla_isr.c cp->underflow)) { cp 2657 drivers/scsi/qla2xxx/qla_isr.c resid, scsi_bufflen(cp)); cp 2671 drivers/scsi/qla2xxx/qla_isr.c resid, scsi_bufflen(cp)); cp 2699 drivers/scsi/qla2xxx/qla_isr.c memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); cp 2751 drivers/scsi/qla2xxx/qla_isr.c res = cp->result; cp 2761 drivers/scsi/qla2xxx/qla_isr.c scmd_printk(KERN_WARNING, cp, cp 2763 drivers/scsi/qla2xxx/qla_isr.c cp->device->vendor); cp 2770 drivers/scsi/qla2xxx/qla_isr.c cp->device->id, cp->device->lun, fcport->d_id.b24, cp 2771 drivers/scsi/qla2xxx/qla_isr.c ox_id, cp->cmnd, scsi_bufflen(cp), rsp_info_len, cp 2772 drivers/scsi/qla2xxx/qla_isr.c resid_len, fw_resid_len, sp, cp); cp 2789 drivers/scsi/qla2xxx/qla_isr.c cp->device->id, cp->device->lun, fcport->d_id.b.domain, cp 2791 drivers/scsi/qla2xxx/qla_isr.c cp->cmnd, scsi_bufflen(cp), rsp_info_len, cp 2792 drivers/scsi/qla2xxx/qla_isr.c resid_len, fw_resid_len, sp, cp); cp 2812 drivers/scsi/qla2xxx/qla_isr.c struct scsi_cmnd *cp; cp 2822 drivers/scsi/qla2xxx/qla_isr.c cp = GET_CMD_SP(sp); cp 2823 drivers/scsi/qla2xxx/qla_isr.c if (cp == NULL) { cp 2852 drivers/scsi/qla2xxx/qla_isr.c sp->done(sp, cp->result); cp 2134 drivers/scsi/qla2xxx/qla_mr.c struct scsi_cmnd *cp = GET_CMD_SP(sp); cp 2143 drivers/scsi/qla2xxx/qla_mr.c SET_CMD_SENSE_PTR(sp, cp->sense_buffer); cp 2149 drivers/scsi/qla2xxx/qla_mr.c memcpy(cp->sense_buffer, sense_data, sense_len); cp 2153 drivers/scsi/qla2xxx/qla_mr.c SET_CMD_SENSE_PTR(sp, cp->sense_buffer + sense_len); cp 2162 drivers/scsi/qla2xxx/qla_mr.c cp->result = res; cp 2168 drivers/scsi/qla2xxx/qla_mr.c sp->vha->host_no, cp->device->id, cp->device->lun, cp 2169 drivers/scsi/qla2xxx/qla_mr.c cp); cp 2171 drivers/scsi/qla2xxx/qla_mr.c cp->sense_buffer, sense_len); cp 2281 drivers/scsi/qla2xxx/qla_mr.c struct scsi_cmnd *cp; cp 2336 drivers/scsi/qla2xxx/qla_mr.c cp = GET_CMD_SP(sp); cp 2337 drivers/scsi/qla2xxx/qla_mr.c if (cp == NULL) { cp 2379 drivers/scsi/qla2xxx/qla_mr.c scsi_set_resid(cp, resid); cp 2382 drivers/scsi/qla2xxx/qla_mr.c ((unsigned)(scsi_bufflen(cp) - resid) < cp 2383 drivers/scsi/qla2xxx/qla_mr.c cp->underflow)) { cp 2387 drivers/scsi/qla2xxx/qla_mr.c resid, scsi_bufflen(cp)); cp 2405 drivers/scsi/qla2xxx/qla_mr.c memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); cp 2419 drivers/scsi/qla2xxx/qla_mr.c scsi_set_resid(cp, resid); cp 2426 drivers/scsi/qla2xxx/qla_mr.c resid, scsi_bufflen(cp)); cp 2434 drivers/scsi/qla2xxx/qla_mr.c ((unsigned)(scsi_bufflen(cp) - resid) < cp 2435 drivers/scsi/qla2xxx/qla_mr.c cp->underflow)) { cp 2440 drivers/scsi/qla2xxx/qla_mr.c resid, scsi_bufflen(cp), cp->underflow); cp 2456 drivers/scsi/qla2xxx/qla_mr.c scsi_bufflen(cp)); cp 2486 drivers/scsi/qla2xxx/qla_mr.c memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); cp 2535 drivers/scsi/qla2xxx/qla_mr.c cp->device->id, cp->device->lun, fcport->tgt_id, cp 2536 drivers/scsi/qla2xxx/qla_mr.c lscsi_status, cp->cmnd, scsi_bufflen(cp), cp 2560 drivers/scsi/qla2xxx/qla_mr.c struct scsi_cmnd *cp; cp 2575 drivers/scsi/qla2xxx/qla_mr.c cp = GET_CMD_SP(sp); cp 2576 drivers/scsi/qla2xxx/qla_mr.c if (cp == NULL) { cp 2620 drivers/scsi/qla2xxx/qla_mr.c sp->done(sp, cp->result); cp 46 drivers/scsi/qla2xxx/tcm_qla2xxx.c const char *cp; cp 54 drivers/scsi/qla2xxx/tcm_qla2xxx.c for (cp = name; cp < &name[TCM_QLA2XXX_NAMELEN - 1]; cp++) { cp 55 drivers/scsi/qla2xxx/tcm_qla2xxx.c c = *cp; cp 56 drivers/scsi/qla2xxx/tcm_qla2xxx.c if (c == '\n' && cp[1] == '\0') cp 69 drivers/scsi/qla2xxx/tcm_qla2xxx.c return cp - name; cp 83 drivers/scsi/qla2xxx/tcm_qla2xxx.c err, cp - name, pos, byte); cp 927 drivers/scsi/scsi_debug.c const char *cp = NULL; cp 934 drivers/scsi/scsi_debug.c cp = "power on reset"; cp 940 drivers/scsi/scsi_debug.c cp = "bus reset"; cp 946 drivers/scsi/scsi_debug.c cp = "mode parameters changed"; cp 952 drivers/scsi/scsi_debug.c cp = "capacity data changed"; cp 959 drivers/scsi/scsi_debug.c cp = "microcode has been changed"; cp 966 drivers/scsi/scsi_debug.c cp = "microcode has been changed without reset"; cp 983 drivers/scsi/scsi_debug.c cp = "reported luns data has changed"; cp 988 drivers/scsi/scsi_debug.c cp = "unknown"; cp 995 drivers/scsi/scsi_debug.c my_name, cp); cp 715 drivers/scsi/scsi_transport_fc.c char *cp; \ cp 720 drivers/scsi/scsi_transport_fc.c val = simple_strtoul(buf, &cp, 0); \ cp 721 drivers/scsi/scsi_transport_fc.c if (*cp && (*cp != '\n')) \ cp 839 drivers/scsi/scsi_transport_fc.c char *cp; cp 841 drivers/scsi/scsi_transport_fc.c *val = simple_strtoul(buf, &cp, 0); cp 842 drivers/scsi/scsi_transport_fc.c if (*cp && (*cp != '\n')) cp 965 drivers/scsi/scsi_transport_fc.c char *cp; cp 975 drivers/scsi/scsi_transport_fc.c val = simple_strtoul(buf, &cp, 0); cp 976 drivers/scsi/scsi_transport_fc.c if ((*cp && (*cp != '\n')) || (val < 0)) cp 1083 drivers/scsi/scsi_transport_fc.c char *cp; \ cp 1086 drivers/scsi/scsi_transport_fc.c val = simple_strtoul(buf, &cp, 0); \ cp 1087 drivers/scsi/scsi_transport_fc.c if (*cp && (*cp != '\n')) \ cp 1148 drivers/scsi/scsi_transport_fc.c char *cp; \ cp 1151 drivers/scsi/scsi_transport_fc.c val = simple_strtoul(buf, &cp, 0); \ cp 1152 drivers/scsi/scsi_transport_fc.c if (*cp && (*cp != '\n')) \ cp 1349 drivers/scsi/scsi_transport_fc.c char *cp; \ cp 1351 drivers/scsi/scsi_transport_fc.c val = simple_strtoul(buf, &cp, 0); \ cp 1352 drivers/scsi/scsi_transport_fc.c if (*cp && (*cp != '\n')) \ cp 4064 drivers/scsi/scsi_transport_iscsi.c char *cp; \ cp 4074 drivers/scsi/scsi_transport_iscsi.c val = simple_strtoul(buf, &cp, 0); \ cp 4075 drivers/scsi/scsi_transport_iscsi.c if (*cp != '\0' && *cp != '\n') \ cp 2523 drivers/scsi/sg.c const char * cp; cp 2545 drivers/scsi/sg.c cp = " mmap>> "; cp 2547 drivers/scsi/sg.c cp = " rb>> "; cp 2550 drivers/scsi/sg.c cp = " dio>> "; cp 2552 drivers/scsi/sg.c cp = " "; cp 2554 drivers/scsi/sg.c seq_puts(s, cp); cp 174 drivers/scsi/sym53c8xx_2/sym_glue.c void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid) cp 176 drivers/scsi/sym53c8xx_2/sym_glue.c struct scsi_cmnd *cmd = cp->cmd; cp 181 drivers/scsi/sym53c8xx_2/sym_glue.c scsi_status = cp->ssss_status; cp 183 drivers/scsi/sym53c8xx_2/sym_glue.c if (cp->host_flags & HF_SENSE) { cp 184 drivers/scsi/sym53c8xx_2/sym_glue.c scsi_status = cp->sv_scsi_status; cp 185 drivers/scsi/sym53c8xx_2/sym_glue.c resid = cp->sv_resid; cp 186 drivers/scsi/sym53c8xx_2/sym_glue.c if (sym_verbose && cp->sv_xerr_status) cp 187 drivers/scsi/sym53c8xx_2/sym_glue.c sym_print_xerr(cmd, cp->sv_xerr_status); cp 188 drivers/scsi/sym53c8xx_2/sym_glue.c if (cp->host_status == HS_COMPLETE && cp 189 drivers/scsi/sym53c8xx_2/sym_glue.c cp->ssss_status == S_GOOD && cp 190 drivers/scsi/sym53c8xx_2/sym_glue.c cp->xerr_status == 0) { cp 192 drivers/scsi/sym53c8xx_2/sym_glue.c cp->sv_xerr_status); cp 198 drivers/scsi/sym53c8xx_2/sym_glue.c memcpy(cmd->sense_buffer, cp->sns_bbuf, cp 211 drivers/scsi/sym53c8xx_2/sym_glue.c cp->target,cp->lun, -1); cp 224 drivers/scsi/sym53c8xx_2/sym_glue.c } else if (cp->host_status == HS_COMPLETE) /* Bad SCSI status */ cp 226 drivers/scsi/sym53c8xx_2/sym_glue.c else if (cp->host_status == HS_SEL_TIMEOUT) /* Selection timeout */ cp 228 drivers/scsi/sym53c8xx_2/sym_glue.c else if (cp->host_status == HS_UNEXPECTED) /* Unexpected BUS FREE*/ cp 233 drivers/scsi/sym53c8xx_2/sym_glue.c cp->host_status, cp->ssss_status, cp 234 drivers/scsi/sym53c8xx_2/sym_glue.c cp->xerr_status); cp 239 drivers/scsi/sym53c8xx_2/sym_glue.c cam_status = sym_xerr_cam_status(DID_ERROR, cp->xerr_status); cp 245 drivers/scsi/sym53c8xx_2/sym_glue.c static int sym_scatter(struct sym_hcb *np, struct sym_ccb *cp, struct scsi_cmnd *cmd) cp 250 drivers/scsi/sym53c8xx_2/sym_glue.c cp->data_len = 0; cp 255 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_tcb *tp = &np->target[cp->target]; cp 263 drivers/scsi/sym53c8xx_2/sym_glue.c data = &cp->phys.data[SYM_CONF_MAX_SG - use_sg]; cp 271 drivers/scsi/sym53c8xx_2/sym_glue.c cp->odd_byte_adjustment++; cp 275 drivers/scsi/sym53c8xx_2/sym_glue.c cp->data_len += len; cp 292 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_ccb *cp; cp 309 drivers/scsi/sym53c8xx_2/sym_glue.c cp = sym_get_ccb(np, cmd, order); cp 310 drivers/scsi/sym53c8xx_2/sym_glue.c if (!cp) cp 312 drivers/scsi/sym53c8xx_2/sym_glue.c sym_queue_scsiio(np, cmd, cp); cp 319 drivers/scsi/sym53c8xx_2/sym_glue.c static inline int sym_setup_cdb(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp) cp 321 drivers/scsi/sym53c8xx_2/sym_glue.c memcpy(cp->cdb_buf, cmd->cmnd, cmd->cmd_len); cp 323 drivers/scsi/sym53c8xx_2/sym_glue.c cp->phys.cmd.addr = CCB_BA(cp, cdb_buf[0]); cp 324 drivers/scsi/sym53c8xx_2/sym_glue.c cp->phys.cmd.size = cpu_to_scr(cmd->cmd_len); cp 332 drivers/scsi/sym53c8xx_2/sym_glue.c int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp) cp 340 drivers/scsi/sym53c8xx_2/sym_glue.c if (sym_setup_cdb(np, cmd, cp)) cp 348 drivers/scsi/sym53c8xx_2/sym_glue.c cp->segments = sym_scatter(np, cp, cmd); cp 349 drivers/scsi/sym53c8xx_2/sym_glue.c if (cp->segments < 0) { cp 357 drivers/scsi/sym53c8xx_2/sym_glue.c if (!cp->segments) cp 360 drivers/scsi/sym53c8xx_2/sym_glue.c cp->data_len = 0; cp 361 drivers/scsi/sym53c8xx_2/sym_glue.c cp->segments = 0; cp 374 drivers/scsi/sym53c8xx_2/sym_glue.c lastp = goalp - 8 - (cp->segments * (2*4)); cp 377 drivers/scsi/sym53c8xx_2/sym_glue.c cp->host_flags |= HF_DATA_IN; cp 379 drivers/scsi/sym53c8xx_2/sym_glue.c lastp = goalp - 8 - (cp->segments * (2*4)); cp 390 drivers/scsi/sym53c8xx_2/sym_glue.c cp->phys.head.lastp = cpu_to_scr(lastp); cp 391 drivers/scsi/sym53c8xx_2/sym_glue.c cp->phys.head.savep = cpu_to_scr(lastp); cp 392 drivers/scsi/sym53c8xx_2/sym_glue.c cp->startp = cp->phys.head.savep; cp 393 drivers/scsi/sym53c8xx_2/sym_glue.c cp->goalp = cpu_to_scr(goalp); cp 402 drivers/scsi/sym53c8xx_2/sym_glue.c switch (cp->cdb_buf[0]) { cp 414 drivers/scsi/sym53c8xx_2/sym_glue.c sym_put_start_queue(np, cp); cp 418 drivers/scsi/sym53c8xx_2/sym_glue.c sym_free_ccb(np, cp); cp 625 drivers/scsi/sym53c8xx_2/sym_glue.c struct sym_ccb *cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 626 drivers/scsi/sym53c8xx_2/sym_glue.c if (cp->cmd == cmd) { cp 243 drivers/scsi/sym53c8xx_2/sym_glue.h static inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid) cp 246 drivers/scsi/sym53c8xx_2/sym_glue.h cmd->result = (DID_OK << 16) | (cp->ssss_status & 0x7f); cp 248 drivers/scsi/sym53c8xx_2/sym_glue.h void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid); cp 253 drivers/scsi/sym53c8xx_2/sym_glue.h int sym_setup_data_and_start (struct sym_hcb *np, struct scsi_cmnd *csio, struct sym_ccb *cp); cp 46 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_complete_error (struct sym_hcb *np, struct sym_ccb *cp); cp 47 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp); cp 48 drivers/scsi/sym53c8xx_2/sym_hipd.c static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp); cp 60 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg) cp 62 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, "%s: ", label); cp 1406 drivers/scsi/sym53c8xx_2/sym_hipd.c static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgptr) cp 1408 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; cp 1449 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = nego; cp 1452 drivers/scsi/sym53c8xx_2/sym_hipd.c tp->nego_cp = cp; /* Keep track a nego will be performed */ cp 1454 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_nego_msg(np, cp->target, cp 1467 drivers/scsi/sym53c8xx_2/sym_hipd.c void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp) cp 1486 drivers/scsi/sym53c8xx_2/sym_hipd.c np->last_cp = cp; cp 1495 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_xflags |= HX_DMAP_DIRTY; cp 1507 drivers/scsi/sym53c8xx_2/sym_hipd.c np->squeue [np->squeueput] = cpu_to_scr(cp->ccb_ba); cp 1512 drivers/scsi/sym53c8xx_2/sym_hipd.c scmd_printk(KERN_DEBUG, cp->cmd, "queuepos=%d\n", cp 1530 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 1546 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link2_ccbq); cp 1547 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG) { cp 1553 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->itlq_tbl[cp->tag] = cpu_to_scr(cp->ccb_ba); cp 1562 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->head.itl_task_sa = cpu_to_scr(cp->ccb_ba); cp 1567 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->started = 1; cp 1569 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_put_start_queue(np, cp); cp 1583 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 1599 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_ccb_from_dsa(np, dsa); cp 1600 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 1602 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_complete_ok (np, cp); cp 1631 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 1635 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 1636 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->busy_ccbq); cp 1638 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status == HS_WAIT) cp 1640 drivers/scsi/sym53c8xx_2/sym_hipd.c cmd = cp->cmd; cp 1645 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; cp 1646 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, cp->lun); cp 1648 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link2_ccbq); cp 1649 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link2_ccbq, cp 1651 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->started) { cp 1652 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG) cp 1658 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->started = 0; cp 1662 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_free_ccb(np, cp); cp 2023 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 2024 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 2025 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->target != target) cp 2027 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl3 = tp->head.wval; cp 2028 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_sxfer = tp->head.sval; cp 2030 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl4 = tp->head.uval; cp 2177 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp = sym_ccb_from_dsa(np, dsa); cp 2200 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 2201 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = hsts; cp 2306 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp = sym_ccb_from_dsa(np, dsa); cp 2324 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp) cp 2338 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status |= XE_PARITY_ERR; cp 2361 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_script_dp (np, cp, dsp); cp 2401 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 2414 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_ccb_from_dsa(np, dsa); cp 2457 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp && (cp->phys.select.sel_scntl3 & EWS)) { cp 2500 drivers/scsi/sym53c8xx_2/sym_hipd.c cp, (unsigned)dsp, (unsigned)nxtdsp, vdsp, cmd); cp 2509 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp) { cp 2521 drivers/scsi/sym53c8xx_2/sym_hipd.c tblp = (u32 *) ((char*) &cp->phys + oadr); cp 2543 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, cp 2554 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, cp 2574 drivers/scsi/sym53c8xx_2/sym_hipd.c nxtdsp = scr_to_cpu(cp->phys.pm0.ret); cp 2576 drivers/scsi/sym53c8xx_2/sym_hipd.c nxtdsp = scr_to_cpu(cp->phys.pm1.ret); cp 2583 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm0; cp 2587 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm1; cp 2609 drivers/scsi/sym53c8xx_2/sym_hipd.c if ((cmd & 7) == 1 && cp && (cp->phys.select.sel_scntl3 & EWS) && cp 2619 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.wresid.addr = cpu_to_scr(tmp); cp 2622 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.wresid.size = cpu_to_scr((tmp&0xff000000) | 1); cp 2640 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, "PM %x %x %x / %x %x %x.\n", cp 2650 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_script_dp (np, cp, newcmd); cp 2702 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG && olen - rest <= 3) { cp 2703 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = HS_BUSY; cp 2704 drivers/scsi/sym53c8xx_2/sym_hipd.c np->msgout[0] = IDENTIFY(0, cp->lun); cp 2715 drivers/scsi/sym53c8xx_2/sym_hipd.c struct scsi_device *dev = cp->cmd->device; cp 2968 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 2981 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_ccb_from_dsa(np, scr_to_cpu(np->squeue[i])); cp 2982 drivers/scsi/sym53c8xx_2/sym_hipd.c assert(cp); cp 2985 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_flags &= ~HF_HINT_IARB; cp 2987 drivers/scsi/sym53c8xx_2/sym_hipd.c if ((target == -1 || cp->target == target) && cp 2988 drivers/scsi/sym53c8xx_2/sym_hipd.c (lun == -1 || cp->lun == lun) && cp 2989 drivers/scsi/sym53c8xx_2/sym_hipd.c (task == -1 || cp->tag == task)) { cp 2991 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_status(cp->cmd, DID_SOFT_ERROR); cp 2993 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_status(cp->cmd, DID_REQUEUE); cp 2995 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link_ccbq); cp 2996 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->comp_ccbq); cp 3030 drivers/scsi/sym53c8xx_2/sym_hipd.c static void sym_sir_bad_scsi_status(struct sym_hcb *np, int num, struct sym_ccb *cp) cp 3033 drivers/scsi/sym53c8xx_2/sym_hipd.c u_char s_status = cp->ssss_status; cp 3034 drivers/scsi/sym53c8xx_2/sym_hipd.c u_char h_flags = cp->host_flags; cp 3059 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, "%s\n", cp 3064 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_complete_error (np, cp); cp 3072 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_complete_error (np, cp); cp 3080 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_dequeue_from_squeue(np, i, cp->target, cp->lun, -1); cp 3087 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sv_scsi_status = cp->ssss_status; cp 3088 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sv_xerr_status = cp->xerr_status; cp 3089 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sv_resid = sym_compute_residual(np, cp); cp 3096 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->scsi_smsg2[0] = IDENTIFY(0, cp->lun); cp 3109 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = 0; cp 3110 drivers/scsi/sym53c8xx_2/sym_hipd.c msglen += sym_prepare_nego(np, cp, &cp->scsi_smsg2[msglen]); cp 3114 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.smsg.addr = CCB_BA(cp, scsi_smsg2); cp 3115 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.smsg.size = cpu_to_scr(msglen); cp 3120 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.cmd.addr = CCB_BA(cp, sensecmd); cp 3121 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.cmd.size = cpu_to_scr(6); cp 3126 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sensecmd[0] = REQUEST_SENSE; cp 3127 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sensecmd[1] = 0; cp 3128 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->cmd->device->scsi_level <= SCSI_2 && cp->lun <= 7) cp 3129 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sensecmd[1] = cp->lun << 5; cp 3130 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sensecmd[4] = SYM_SNS_BBUF_LEN; cp 3131 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->data_len = SYM_SNS_BBUF_LEN; cp 3136 drivers/scsi/sym53c8xx_2/sym_hipd.c memset(cp->sns_bbuf, 0, SYM_SNS_BBUF_LEN); cp 3137 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.sense.addr = CCB_BA(cp, sns_bbuf); cp 3138 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.sense.size = cpu_to_scr(SYM_SNS_BBUF_LEN); cp 3145 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.savep = cpu_to_scr(startp); cp 3146 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.lastp = cpu_to_scr(startp); cp 3147 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->startp = cpu_to_scr(startp); cp 3148 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->goalp = cpu_to_scr(startp + 16); cp 3150 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_xflags = 0; cp 3151 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = cp->nego_status ? HS_NEGOTIATE : HS_BUSY; cp 3152 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ssss_status = S_ILLEGAL; cp 3153 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_flags = (HF_SENSE|HF_DATA_IN); cp 3154 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status = 0; cp 3155 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->extra_bytes = 0; cp 3157 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.go.start = cpu_to_scr(SCRIPTA_BA(np, select)); cp 3162 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_put_start_queue(np, cp); cp 3190 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 3206 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 3207 drivers/scsi/sym53c8xx_2/sym_hipd.c cmd = cp->cmd; cp 3208 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status != HS_DISCONNECT || cp 3209 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->target != target || cp 3210 drivers/scsi/sym53c8xx_2/sym_hipd.c (lun != -1 && cp->lun != lun) || cp 3212 drivers/scsi/sym53c8xx_2/sym_hipd.c (cp->tag != NO_TAG && cp->scsi_smsg[2] != task))) { cp 3213 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->busy_ccbq); cp 3216 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->comp_ccbq); cp 3223 drivers/scsi/sym53c8xx_2/sym_hipd.c printf("XXXX TASK @%p CLEARED\n", cp); cp 3272 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 3313 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp,struct sym_ccb,link_ccbq); cp 3314 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status != HS_DISCONNECT) cp 3316 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->to_abort) { cp 3317 drivers/scsi/sym53c8xx_2/sym_hipd.c target = cp->target; cp 3343 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = NULL; cp 3345 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 3346 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status != HS_BUSY && cp 3347 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status != HS_NEGOTIATE) cp 3349 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp->to_abort) cp 3357 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp == np->last_cp) { cp 3358 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->to_abort = 0; cp 3381 drivers/scsi/sym53c8xx_2/sym_hipd.c i = sym_dequeue_from_squeue(np, i, cp->target, cp->lun, -1); cp 3387 drivers/scsi/sym53c8xx_2/sym_hipd.c assert(i && sym_get_cam_status(cp->cmd) == DID_SOFT_ERROR); cp 3389 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link_ccbq); cp 3390 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->comp_ccbq); cp 3395 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->to_abort == 2) cp 3396 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_status(cp->cmd, DID_TIME_OUT); cp 3398 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_status(cp->cmd, DID_ABORT); cp 3459 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = NULL; cp 3461 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 3462 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status != HS_DISCONNECT) cp 3464 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->target != target) cp 3466 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp->to_abort) cp 3489 drivers/scsi/sym53c8xx_2/sym_hipd.c np->abrt_msg[0] = IDENTIFY(0, cp->lun); cp 3497 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag == NO_TAG) { cp 3501 drivers/scsi/sym53c8xx_2/sym_hipd.c np->abrt_msg[1] = cp->scsi_smsg[1]; cp 3502 drivers/scsi/sym53c8xx_2/sym_hipd.c np->abrt_msg[2] = cp->scsi_smsg[2]; cp 3511 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->to_abort == 2) cp 3512 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_status(cp->cmd, DID_TIME_OUT); cp 3513 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->to_abort = 0; /* We donnot expect to fail here */ cp 3627 drivers/scsi/sym53c8xx_2/sym_hipd.c static int sym_evaluate_dp(struct sym_hcb *np, struct sym_ccb *cp, u32 scr, int *ofs) cp 3641 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm0; cp 3643 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm1; cp 3655 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_flags & HF_SENSE) { cp 3666 drivers/scsi/sym53c8xx_2/sym_hipd.c tmp = scr_to_cpu(cp->goalp); cp 3670 drivers/scsi/sym53c8xx_2/sym_hipd.c dp_sgmin = SYM_CONF_MAX_SG - cp->segments; cp 3688 drivers/scsi/sym53c8xx_2/sym_hipd.c tmp = scr_to_cpu(cp->phys.data[dp_sg].size); cp 3699 drivers/scsi/sym53c8xx_2/sym_hipd.c tmp = scr_to_cpu(cp->phys.data[dp_sg].size); cp 3720 drivers/scsi/sym53c8xx_2/sym_hipd.c if (dp_sg > cp->ext_sg || cp 3721 drivers/scsi/sym53c8xx_2/sym_hipd.c (dp_sg == cp->ext_sg && dp_ofs > cp->ext_ofs)) { cp 3722 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ext_sg = dp_sg; cp 3723 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ext_ofs = dp_ofs; cp 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) cp 3748 drivers/scsi/sym53c8xx_2/sym_hipd.c u32 dp_scr = sym_get_script_dp (np, cp); cp 3758 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_flags & HF_SENSE) cp 3765 drivers/scsi/sym53c8xx_2/sym_hipd.c dp_sg = sym_evaluate_dp(np, cp, dp_scr, &dp_ofs); cp 3773 drivers/scsi/sym53c8xx_2/sym_hipd.c dp_ret = cpu_to_scr(cp->goalp); cp 3794 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm0; cp 3798 drivers/scsi/sym53c8xx_2/sym_hipd.c pm = &cp->phys.pm1; cp 3814 drivers/scsi/sym53c8xx_2/sym_hipd.c tmp = scr_to_cpu(cp->phys.data[dp_sg-1].addr); cp 3815 drivers/scsi/sym53c8xx_2/sym_hipd.c tmp += scr_to_cpu(cp->phys.data[dp_sg-1].size) + dp_ofs; cp 3820 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_script_dp (np, cp, dp_scr); cp 3844 drivers/scsi/sym53c8xx_2/sym_hipd.c int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp) cp 3856 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->xerr_status & (XE_EXTRA_DATA|XE_SODL_UNRUN|XE_SWIDE_OVRUN)) { cp 3857 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->xerr_status & XE_EXTRA_DATA) cp 3858 drivers/scsi/sym53c8xx_2/sym_hipd.c resid -= cp->extra_bytes; cp 3859 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->xerr_status & XE_SODL_UNRUN) cp 3861 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->xerr_status & XE_SWIDE_OVRUN) cp 3869 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->phys.head.lastp == cp->goalp) cp 3876 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->startp == cp->phys.head.lastp || cp 3877 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_evaluate_dp(np, cp, scr_to_cpu(cp->phys.head.lastp), cp 3879 drivers/scsi/sym53c8xx_2/sym_hipd.c return cp->data_len - cp->odd_byte_adjustment; cp 3885 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_flags & HF_SENSE) { cp 3893 drivers/scsi/sym53c8xx_2/sym_hipd.c resid = -cp->ext_ofs; cp 3894 drivers/scsi/sym53c8xx_2/sym_hipd.c for (dp_sg = cp->ext_sg; dp_sg < SYM_CONF_MAX_SG; ++dp_sg) { cp 3895 drivers/scsi/sym53c8xx_2/sym_hipd.c u_int tmp = scr_to_cpu(cp->phys.data[dp_sg].size); cp 3899 drivers/scsi/sym53c8xx_2/sym_hipd.c resid -= cp->odd_byte_adjustment; cp 3945 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_sync_nego_check(struct sym_hcb *np, int req, struct sym_ccb *cp) cp 3947 drivers/scsi/sym53c8xx_2/sym_hipd.c int target = cp->target; cp 3982 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, cp 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) cp 4033 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->nego_status && cp->nego_status != NS_SYNC) cp 4041 drivers/scsi/sym53c8xx_2/sym_hipd.c result = sym_sync_nego_check(np, req, cp); cp 4045 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = NS_SYNC; cp 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) cp 4170 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->nego_status && cp->nego_status != NS_PPR) cp 4178 drivers/scsi/sym53c8xx_2/sym_hipd.c result = sym_ppr_nego_check(np, req, cp->target); cp 4182 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = NS_PPR; cp 4197 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_wide_nego_check(struct sym_hcb *np, int req, struct sym_ccb *cp) cp 4199 drivers/scsi/sym53c8xx_2/sym_hipd.c int target = cp->target; cp 4221 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, "wdtr: wide=%d chg=%d.\n", cp 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) cp 4270 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->nego_status && cp->nego_status != NS_WIDE) cp 4278 drivers/scsi/sym53c8xx_2/sym_hipd.c result = sym_wide_nego_check(np, req, cp); cp 4282 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = NS_WIDE; cp 4295 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_nego_msg(np, cp->target, cp 4299 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = NS_SYNC; cp 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) cp 4326 drivers/scsi/sym53c8xx_2/sym_hipd.c switch (cp->nego_status) { cp 4329 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_setpprot (np, cp->target, 0, 0, 0, 0, 0, 0); cp 4340 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_setsync (np, cp->target, 0, 0, 0, 0); cp 4343 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_setwide (np, cp->target, 0); cp 4348 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = 0; cp 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) cp 4357 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_default(np, tp, cp); cp 4361 drivers/scsi/sym53c8xx_2/sym_hipd.c #define sym_printk(lvl, tp, cp, fmt, v...) do { \ cp 4362 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) \ cp 4363 drivers/scsi/sym53c8xx_2/sym_hipd.c scmd_printk(lvl, cp->cmd, fmt, ##v); \ cp 4375 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp = sym_ccb_from_dsa(np, dsa); cp 4397 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_complete_error(np, cp); cp 4413 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, cp 4421 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, cp 4429 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, cp 4458 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_printk(KERN_WARNING, tp, cp, cp 4470 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 4471 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status &= ~XE_PARITY_ERR; cp 4472 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp->xerr_status) cp 4483 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp) cp 4485 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_sir_bad_scsi_status(np, num, cp); cp 4492 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_msg(cp, "M_REJECT to send for ", np->msgin); cp 4502 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 4504 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status |= XE_SWIDE_OVRUN; cp 4513 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 4515 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status |= XE_SODL_UNRUN; cp 4525 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 4527 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status |= XE_EXTRA_DATA; cp 4528 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->extra_bytes += INL(np, nc_scratcha); cp 4535 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) { cp 4537 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status |= XE_BAD_PHASE; cp 4544 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp) cp 4556 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_msg(cp, "extended msg ", cp 4560 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_modify_dp(np, tp, cp, tmp); cp 4563 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_sync_nego(np, tp, cp); cp 4566 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_ppr_nego(np, tp, cp); cp 4569 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_wide_nego(np, tp, cp); cp 4584 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_msg(cp, "1 or 2 byte ", np->msgin); cp 4585 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_flags & HF_SENSE) cp 4588 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_modify_dp(np, tp, cp, -1); cp 4592 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_rejected(np, tp, cp); cp 4594 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, cp 4609 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_msg(cp, "WEIRD message received", np->msgin); cp 4625 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_nego_default(np, tp, cp); cp 4653 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp = NULL; cp 4663 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 4697 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->itlq_tbl[tag] = cpu_to_scr(cp->ccb_ba); cp 4702 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->tags_si = lp->tags_si; cp 4703 drivers/scsi/sym53c8xx_2/sym_hipd.c ++lp->tags_sum[cp->tags_si]; cp 4731 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->head.itl_task_sa = cpu_to_scr(cp->ccb_ba); cp 4743 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link_ccbq, &np->busy_ccbq); cp 4746 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link2_ccbq); cp 4747 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link2_ccbq, &lp->waiting_ccbq); cp 4751 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->to_abort = 0; cp 4752 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->odd_byte_adjustment = 0; cp 4753 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->tag = tag; cp 4754 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->order = tag_order; cp 4755 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->target = tn; cp 4756 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->lun = ln; cp 4759 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cmd, "ccb @%p using tag %d.\n", cp, tag); cp 4763 drivers/scsi/sym53c8xx_2/sym_hipd.c return cp; cp 4765 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_head(&cp->link_ccbq, &np->free_ccbq); cp 4772 drivers/scsi/sym53c8xx_2/sym_hipd.c void sym_free_ccb (struct sym_hcb *np, struct sym_ccb *cp) cp 4774 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_tcb *tp = &np->target[cp->target]; cp 4775 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_lcb *lp = sym_lp(tp, cp->lun); cp 4778 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_addr(cp->cmd, "ccb @%p freeing tag %d.\n", cp 4779 drivers/scsi/sym53c8xx_2/sym_hipd.c cp, cp->tag); cp 4789 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG) { cp 4791 drivers/scsi/sym53c8xx_2/sym_hipd.c --lp->tags_sum[cp->tags_si]; cp 4796 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->cb_tags[lp->if_tag] = cp->tag; cp 4803 drivers/scsi/sym53c8xx_2/sym_hipd.c lp->itlq_tbl[cp->tag] = cpu_to_scr(np->bad_itlq_ba); cp 4826 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp == tp->nego_cp) cp 4834 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp == np->last_cp) cp 4841 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->cmd = NULL; cp 4842 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = HS_IDLE; cp 4843 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link_ccbq); cp 4844 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_head(&cp->link_ccbq, &np->free_ccbq); cp 4848 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link2_ccbq); cp 4849 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_tail(&cp->link2_ccbq, &np->dummy_ccbq); cp 4850 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->started) { cp 4851 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG) cp 4857 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->started = 0; cp 4866 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp = NULL; cp 4879 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_calloc_dma(sizeof(struct sym_ccb), "CCB"); cp 4880 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp) cp 4891 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ccb_ba = vtobus(cp); cp 4896 drivers/scsi/sym53c8xx_2/sym_hipd.c hcode = CCB_HASH_CODE(cp->ccb_ba); cp 4897 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->link_ccbh = np->ccbh[hcode]; cp 4898 drivers/scsi/sym53c8xx_2/sym_hipd.c np->ccbh[hcode] = cp; cp 4903 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.go.start = cpu_to_scr(SCRIPTA_BA(np, idle)); cp 4904 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.go.restart = cpu_to_scr(SCRIPTB_BA(np, bad_i_t_l)); cp 4909 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.smsg_ext.addr = cpu_to_scr(HCB_BA(np, msgin[2])); cp 4914 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_head(&cp->link_ccbq, &np->free_ccbq); cp 4920 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_head(&cp->link2_ccbq, &np->dummy_ccbq); cp 4922 drivers/scsi/sym53c8xx_2/sym_hipd.c return cp; cp 4924 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp) cp 4925 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_mfree_dma(cp, sizeof(*cp), "CCB"); cp 4935 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 4938 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = np->ccbh[hcode]; cp 4939 drivers/scsi/sym53c8xx_2/sym_hipd.c while (cp) { cp 4940 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->ccb_ba == dsa) cp 4942 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = cp->link_ccbh; cp 4945 drivers/scsi/sym53c8xx_2/sym_hipd.c return cp; cp 5131 drivers/scsi/sym53c8xx_2/sym_hipd.c int sym_queue_scsiio(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp) cp 5143 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->cmd = cmd; cp 5148 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; cp 5155 drivers/scsi/sym53c8xx_2/sym_hipd.c can_disconnect = (cp->tag != NO_TAG) || cp 5158 drivers/scsi/sym53c8xx_2/sym_hipd.c msgptr = cp->scsi_smsg; cp 5165 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->tag != NO_TAG) { cp 5166 drivers/scsi/sym53c8xx_2/sym_hipd.c u_char order = cp->order; cp 5205 drivers/scsi/sym53c8xx_2/sym_hipd.c msgptr[msglen++] = cp->tag; cp 5207 drivers/scsi/sym53c8xx_2/sym_hipd.c msgptr[msglen++] = (cp->tag << 1) + 1; cp 5218 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->nego_status = 0; cp 5222 drivers/scsi/sym53c8xx_2/sym_hipd.c msglen += sym_prepare_nego(np, cp, msgptr + msglen); cp 5228 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.go.start = cpu_to_scr(SCRIPTA_BA(np, select)); cp 5229 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.head.go.restart = cpu_to_scr(SCRIPTA_BA(np, resel_dsa)); cp 5234 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_id = cp->target; cp 5235 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl3 = tp->head.wval; cp 5236 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_sxfer = tp->head.sval; cp 5237 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.select.sel_scntl4 = tp->head.uval; cp 5242 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.smsg.addr = CCB_BA(cp, scsi_smsg); cp 5243 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->phys.smsg.size = cpu_to_scr(msglen); cp 5248 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_xflags = 0; cp 5249 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = cp->nego_status ? HS_NEGOTIATE : HS_BUSY; cp 5250 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ssss_status = S_ILLEGAL; cp 5251 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->xerr_status = 0; cp 5252 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_flags = 0; cp 5253 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->extra_bytes = 0; cp 5259 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ext_sg = -1; cp 5260 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ext_ofs = 0; cp 5266 drivers/scsi/sym53c8xx_2/sym_hipd.c return sym_setup_data_and_start(np, cmd, cp); cp 5291 drivers/scsi/sym53c8xx_2/sym_hipd.c static int sym_abort_ccb(struct sym_hcb *np, struct sym_ccb *cp, int timed_out) cp 5296 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp || !cp->host_status || cp->host_status == HS_WAIT) cp 5303 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->to_abort) { cp 5311 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->to_abort = timed_out ? 2 : 1; cp 5323 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 5329 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = NULL; cp 5333 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = cp2; cp 5338 drivers/scsi/sym53c8xx_2/sym_hipd.c return sym_abort_ccb(np, cp, timed_out); cp 5351 drivers/scsi/sym53c8xx_2/sym_hipd.c void sym_complete_error(struct sym_hcb *np, struct sym_ccb *cp) cp 5363 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp || !cp->cmd) cp 5366 drivers/scsi/sym53c8xx_2/sym_hipd.c cmd = cp->cmd; cp 5369 drivers/scsi/sym53c8xx_2/sym_hipd.c dev_info(&sdev->sdev_gendev, "CCB=%p STAT=%x/%x/%x\n", cp, cp 5370 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status, cp->ssss_status, cp->host_flags); cp 5376 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; cp 5382 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->xerr_status) { cp 5384 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_print_xerr(cmd, cp->xerr_status); cp 5385 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status == HS_COMPLETE) cp 5386 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = HS_COMP_ERR; cp 5392 drivers/scsi/sym53c8xx_2/sym_hipd.c resid = sym_compute_residual(np, cp); cp 5396 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->sv_resid = 0; cp 5408 drivers/scsi/sym53c8xx_2/sym_hipd.c i = sym_dequeue_from_squeue(np, i, cp->target, sdev->lun, -1); cp 5416 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->host_status == HS_COMPLETE && cp 5417 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ssss_status == S_QUEUE_FULL) { cp 5434 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->host_status = HS_BUSY; cp 5435 drivers/scsi/sym53c8xx_2/sym_hipd.c cp->ssss_status = S_ILLEGAL; cp 5448 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_result_error(np, cp, resid); cp 5456 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_remque(&cp->link_ccbq); cp 5457 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_insque_head(&cp->link_ccbq, &np->comp_ccbq); cp 5482 drivers/scsi/sym53c8xx_2/sym_hipd.c void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp) cp 5492 drivers/scsi/sym53c8xx_2/sym_hipd.c if (!cp || !cp->cmd) cp 5494 drivers/scsi/sym53c8xx_2/sym_hipd.c assert (cp->host_status == HS_COMPLETE); cp 5499 drivers/scsi/sym53c8xx_2/sym_hipd.c cmd = cp->cmd; cp 5504 drivers/scsi/sym53c8xx_2/sym_hipd.c tp = &np->target[cp->target]; cp 5505 drivers/scsi/sym53c8xx_2/sym_hipd.c lp = sym_lp(tp, cp->lun); cp 5512 drivers/scsi/sym53c8xx_2/sym_hipd.c if (cp->phys.head.lastp != cp->goalp) cp 5513 drivers/scsi/sym53c8xx_2/sym_hipd.c resid = sym_compute_residual(np, cp); cp 5530 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_set_cam_result_ok(cp, cmd, resid); cp 5553 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_free_ccb (np, cp); cp 5796 drivers/scsi/sym53c8xx_2/sym_hipd.c struct sym_ccb *cp; cp 5813 drivers/scsi/sym53c8xx_2/sym_hipd.c cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); cp 5814 drivers/scsi/sym53c8xx_2/sym_hipd.c sym_mfree_dma(cp, sizeof(*cp), "CCB"); cp 664 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_set_script_dp(np, cp, dp) \ cp 667 drivers/scsi/sym53c8xx_2/sym_hipd.h cp->phys.head.lastp = cpu_to_scr(dp); \ cp 671 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_get_script_dp(np, cp) \ cp 673 drivers/scsi/sym53c8xx_2/sym_hipd.h cp->phys.head.lastp : np->ccb_head.lastp) cp 675 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_set_script_dp(np, cp, dp) \ cp 677 drivers/scsi/sym53c8xx_2/sym_hipd.h cp->phys.head.lastp = cpu_to_scr(dp); \ cp 680 drivers/scsi/sym53c8xx_2/sym_hipd.h #define sym_get_script_dp(np, cp) (cp->phys.head.lastp) cp 790 drivers/scsi/sym53c8xx_2/sym_hipd.h #define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl)) cp 1048 drivers/scsi/sym53c8xx_2/sym_hipd.h void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp); cp 1054 drivers/scsi/sym53c8xx_2/sym_hipd.h void sym_free_ccb(struct sym_hcb *np, struct sym_ccb *cp); cp 1057 drivers/scsi/sym53c8xx_2/sym_hipd.h int sym_queue_scsiio(struct sym_hcb *np, struct scsi_cmnd *csio, struct sym_ccb *cp); cp 1809 drivers/scsi/wd33c93.c char *cp; cp 1822 drivers/scsi/wd33c93.c cp = setup_args[x] + strlen(key); cp 1824 drivers/scsi/wd33c93.c if (*cp != ':') cp 1826 drivers/scsi/wd33c93.c cp++; cp 1827 drivers/scsi/wd33c93.c if ((*cp >= '0') && (*cp <= '9')) { cp 1828 drivers/scsi/wd33c93.c *val = simple_strtoul(cp, NULL, 0); cp 115 drivers/soc/fsl/qe/qe.c out_be32(&qe_immr->cp.cecr, (u32) (cmd | QE_CR_FLG)); cp 132 drivers/soc/fsl/qe/qe.c out_be32(&qe_immr->cp.cecdr, cmd_input); cp 133 drivers/soc/fsl/qe/qe.c out_be32(&qe_immr->cp.cecr, cp 139 drivers/soc/fsl/qe/qe.c ret = spin_event_timeout((in_be32(&qe_immr->cp.cecr) & QE_CR_FLG) == 0, cp 512 drivers/soc/fsl/qe/qe.c setbits16(&qe_immr->cp.cercr, QE_CP_CERCR_CIR); cp 125 drivers/soc/xilinx/xlnx_vcu.c u32 cp; cp 429 drivers/soc/xilinx/xlnx_vcu.c (found->cp << VCU_PLL_CFG_CP_SHIFT) | cp 460 drivers/staging/isdn/gigaset/asyncdata.c unsigned char *cp; cp 466 drivers/staging/isdn/gigaset/asyncdata.c cp = skb->data; cp 469 drivers/staging/isdn/gigaset/asyncdata.c if (muststuff(*cp)) cp 471 drivers/staging/isdn/gigaset/asyncdata.c fcs = crc_ccitt_byte(fcs, *cp++); cp 537 drivers/staging/isdn/gigaset/asyncdata.c unsigned char *cp; cp 556 drivers/staging/isdn/gigaset/asyncdata.c cp = skb->data; cp 559 drivers/staging/isdn/gigaset/asyncdata.c c = bitrev8(*cp++); cp 339 drivers/staging/isdn/hysdn/hysdn_boot.c EvalSysrTokData(hysdn_card *card, unsigned char *cp, int len) cp 351 drivers/staging/isdn/hysdn/hysdn_boot.c for (p = cp, crc = 0; p < (cp + len - 2); p++) cp 357 drivers/staging/isdn/hysdn/hysdn_boot.c if (crc != *(cp + len - 1)) { cp 364 drivers/staging/isdn/hysdn/hysdn_boot.c if (*cp == SYSR_TOK_END) cp 367 drivers/staging/isdn/hysdn/hysdn_boot.c if (len < (*(cp + 1) + 2)) { cp 368 drivers/staging/isdn/hysdn/hysdn_boot.c hysdn_addlog(card, "token 0x%x invalid length %d", *cp, *(cp + 1)); cp 371 drivers/staging/isdn/hysdn/hysdn_boot.c switch (*cp) { cp 373 drivers/staging/isdn/hysdn/hysdn_boot.c if (*(cp + 1) != 1) cp 375 drivers/staging/isdn/hysdn/hysdn_boot.c card->bchans = *(cp + 2); cp 379 drivers/staging/isdn/hysdn/hysdn_boot.c if (*(cp + 1) != 1) cp 381 drivers/staging/isdn/hysdn/hysdn_boot.c card->faxchans = *(cp + 2); cp 385 drivers/staging/isdn/hysdn/hysdn_boot.c if (*(cp + 1) != 6) cp 387 drivers/staging/isdn/hysdn/hysdn_boot.c memcpy(card->mac_addr, cp + 2, 6); cp 391 drivers/staging/isdn/hysdn/hysdn_boot.c hysdn_addlog(card, "unknown token 0x%02x length %d", *cp, *(cp + 1)); cp 394 drivers/staging/isdn/hysdn/hysdn_boot.c len -= (*(cp + 1) + 2); /* adjust len */ cp 395 drivers/staging/isdn/hysdn/hysdn_boot.c cp += (*(cp + 1) + 2); /* and pointer */ cp 55 drivers/staging/isdn/hysdn/hysdn_procconf.c unsigned char *cp = cnf->conf_line; cp 59 drivers/staging/isdn/hysdn/hysdn_procconf.c hysdn_addlog(cnf->card, "conf line: %s", cp); cp 61 drivers/staging/isdn/hysdn/hysdn_procconf.c if (*cp == '-') { /* option */ cp 62 drivers/staging/isdn/hysdn/hysdn_procconf.c cp++; /* point to option char */ cp 64 drivers/staging/isdn/hysdn/hysdn_procconf.c if (*cp++ != 'c') cp 67 drivers/staging/isdn/hysdn/hysdn_procconf.c while ((*cp <= '9') && (*cp >= '0')) cp 68 drivers/staging/isdn/hysdn/hysdn_procconf.c i = i * 10 + *cp++ - '0'; /* get decimal number */ cp 77 drivers/staging/isdn/hysdn/hysdn_procconf.c if (*cp == '*') { /* line to send */ cp 79 drivers/staging/isdn/hysdn/hysdn_procconf.c hysdn_addlog(cnf->card, "conf chan=%d %s", cnf->channel, cp); cp 98 drivers/staging/isdn/hysdn/hysdn_procconf.c unsigned char ch, *cp; cp 164 drivers/staging/isdn/hysdn/hysdn_procconf.c cp = cnf->conf_line + cnf->buf_size; cp 167 drivers/staging/isdn/hysdn/hysdn_procconf.c if ((*cp < ' ') && (*cp != 9)) cp 169 drivers/staging/isdn/hysdn/hysdn_procconf.c cp++; cp 175 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp++ = 0; /* string termination */ cp 177 drivers/staging/isdn/hysdn/hysdn_procconf.c while ((i) && (*cp < ' ') && (*cp != 9)) { cp 180 drivers/staging/isdn/hysdn/hysdn_procconf.c cp++; /* next char */ cp 214 drivers/staging/isdn/hysdn/hysdn_procconf.c char *cp; cp 219 drivers/staging/isdn/hysdn/hysdn_procconf.c if (!(cp = file->private_data)) cp 222 drivers/staging/isdn/hysdn/hysdn_procconf.c return simple_read_from_buffer(buf, count, off, cp, strlen(cp)); cp 233 drivers/staging/isdn/hysdn/hysdn_procconf.c char *cp, *tmp; cp 266 drivers/staging/isdn/hysdn/hysdn_procconf.c cp = tmp; /* start of string */ cp 267 drivers/staging/isdn/hysdn/hysdn_procconf.c while (*cp) cp 268 drivers/staging/isdn/hysdn/hysdn_procconf.c cp++; cp 269 drivers/staging/isdn/hysdn/hysdn_procconf.c while (((cp - tmp) % (INFO_OUT_LEN + 1)) != INFO_OUT_LEN) cp 270 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp++ = ' '; cp 271 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp++ = '\n'; cp 274 drivers/staging/isdn/hysdn/hysdn_procconf.c sprintf(cp, "%d %3d %4d %4d %3d 0x%04x 0x%08lx %7d %9d %3d %s", cp 286 drivers/staging/isdn/hysdn/hysdn_procconf.c while (*cp) cp 287 drivers/staging/isdn/hysdn/hysdn_procconf.c cp++; cp 288 drivers/staging/isdn/hysdn/hysdn_procconf.c while (((cp - tmp) % (INFO_OUT_LEN + 1)) != INFO_OUT_LEN) cp 289 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp++ = ' '; cp 290 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp++ = '\n'; cp 291 drivers/staging/isdn/hysdn/hysdn_procconf.c *cp = 0; /* end of string */ cp 27 drivers/staging/isdn/hysdn/hysdn_proclog.c static void put_log_buffer(hysdn_card *card, char *cp); cp 71 drivers/staging/isdn/hysdn/hysdn_proclog.c char *cp; cp 77 drivers/staging/isdn/hysdn/hysdn_proclog.c cp = pd->logtmp; cp 78 drivers/staging/isdn/hysdn/hysdn_proclog.c cp += sprintf(cp, "HYSDN: card %d ", card->myid); cp 81 drivers/staging/isdn/hysdn/hysdn_proclog.c cp += vsprintf(cp, fmt, args); cp 83 drivers/staging/isdn/hysdn/hysdn_proclog.c *cp++ = '\n'; cp 84 drivers/staging/isdn/hysdn/hysdn_proclog.c *cp = 0; cp 100 drivers/staging/isdn/hysdn/hysdn_proclog.c put_log_buffer(hysdn_card *card, char *cp) cp 108 drivers/staging/isdn/hysdn/hysdn_proclog.c if (!cp) cp 110 drivers/staging/isdn/hysdn/hysdn_proclog.c if (!*cp) cp 115 drivers/staging/isdn/hysdn/hysdn_proclog.c if (!(ib = kmalloc(sizeof(struct log_data) + strlen(cp), GFP_ATOMIC))) cp 117 drivers/staging/isdn/hysdn/hysdn_proclog.c strcpy(ib->log_start, cp); /* set output string */ cp 34 drivers/staging/speakup/kobjects.c char *cp; cp 49 drivers/staging/speakup/kobjects.c cp = "B_CTL"; cp 51 drivers/staging/speakup/kobjects.c cp = "WDLM"; cp 53 drivers/staging/speakup/kobjects.c cp = "A_PUNC"; cp 55 drivers/staging/speakup/kobjects.c cp = "PUNC"; cp 57 drivers/staging/speakup/kobjects.c cp = "NUM"; cp 59 drivers/staging/speakup/kobjects.c cp = "A_CAP"; cp 61 drivers/staging/speakup/kobjects.c cp = "ALPHA"; cp 63 drivers/staging/speakup/kobjects.c cp = "B_CAPSYM"; cp 65 drivers/staging/speakup/kobjects.c cp = "B_SYM"; cp 67 drivers/staging/speakup/kobjects.c cp = "0"; cp 69 drivers/staging/speakup/kobjects.c scnprintf(buf_pointer, bufsize, "%d\t%s\n", i, cp); cp 113 drivers/staging/speakup/kobjects.c char *cp = (char *)buf; cp 114 drivers/staging/speakup/kobjects.c char *end = cp + count; /* the null at the end of the buffer */ cp 133 drivers/staging/speakup/kobjects.c while (cp < end) { cp 134 drivers/staging/speakup/kobjects.c while ((cp < end) && (*cp == ' ' || *cp == '\t')) cp 135 drivers/staging/speakup/kobjects.c cp++; cp 137 drivers/staging/speakup/kobjects.c if (cp == end) cp 139 drivers/staging/speakup/kobjects.c if ((*cp == '\n') || strchr("dDrR", *cp)) { cp 145 drivers/staging/speakup/kobjects.c linefeed = strchr(cp, '\n'); cp 151 drivers/staging/speakup/kobjects.c if (!isdigit(*cp)) { cp 153 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 161 drivers/staging/speakup/kobjects.c index = simple_strtoul(cp, &temp, 10); cp 164 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 174 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 202 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 210 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 232 drivers/staging/speakup/kobjects.c char *cp = buf; cp 245 drivers/staging/speakup/kobjects.c cp += sprintf(cp, "%d, %d, %d,\n", KEY_MAP_VER, num_keys, nstates); cp 253 drivers/staging/speakup/kobjects.c cp += sprintf(cp, "%d,", (int)ch); cp 254 drivers/staging/speakup/kobjects.c *cp++ = (i < nstates) ? SPACE : '\n'; cp 257 drivers/staging/speakup/kobjects.c cp += sprintf(cp, "0, %d\n", KEY_MAP_VER); cp 259 drivers/staging/speakup/kobjects.c return (int)(cp - buf); cp 271 drivers/staging/speakup/kobjects.c char *cp; cp 290 drivers/staging/speakup/kobjects.c cp = in_buff; cp 293 drivers/staging/speakup/kobjects.c cp = spk_s2uchar(cp, cp1); cp 308 drivers/staging/speakup/kobjects.c cp = spk_s2uchar(cp, cp1); cp 310 drivers/staging/speakup/kobjects.c if (!(*cp)) cp 446 drivers/staging/speakup/kobjects.c char *cp; cp 448 drivers/staging/speakup/kobjects.c cp = buf; cp 449 drivers/staging/speakup/kobjects.c cp += sprintf(cp, "Speakup version %s\n", SPEAKUP_VERSION); cp 451 drivers/staging/speakup/kobjects.c cp += sprintf(cp, "%s synthesizer driver version %s\n", cp 453 drivers/staging/speakup/kobjects.c return cp - buf; cp 463 drivers/staging/speakup/kobjects.c char *cp = buf; cp 490 drivers/staging/speakup/kobjects.c *cp++ = (char)i; cp 493 drivers/staging/speakup/kobjects.c return cp - buf; cp 553 drivers/staging/speakup/kobjects.c char *cp; cp 575 drivers/staging/speakup/kobjects.c for (cp = (char *)param->p_val; (ch = *cp); cp++) { cp 628 drivers/staging/speakup/kobjects.c char *cp; cp 639 drivers/staging/speakup/kobjects.c cp = (char *)buf; cp 640 drivers/staging/speakup/kobjects.c string_unescape_any_inplace(cp); cp 646 drivers/staging/speakup/kobjects.c if (*cp == 'd' || *cp == 'r' || *cp == '\0') cp 648 drivers/staging/speakup/kobjects.c else if (*cp == '+' || *cp == '-') cp 652 drivers/staging/speakup/kobjects.c if (kstrtol(cp, 10, &value) == 0) cp 678 drivers/staging/speakup/kobjects.c len = strlen(cp); cp 679 drivers/staging/speakup/kobjects.c if ((len >= 1) && (cp[len - 1] == '\n')) cp 681 drivers/staging/speakup/kobjects.c if ((len >= 2) && (cp[0] == '"') && (cp[len - 1] == '"')) { cp 682 drivers/staging/speakup/kobjects.c ++cp; cp 685 drivers/staging/speakup/kobjects.c cp[len] = '\0'; cp 686 drivers/staging/speakup/kobjects.c ret = spk_set_string_var(cp, param, len); cp 754 drivers/staging/speakup/kobjects.c char *cp = (char *)buf; cp 755 drivers/staging/speakup/kobjects.c char *end = cp + count; cp 770 drivers/staging/speakup/kobjects.c while (cp < end) { cp 771 drivers/staging/speakup/kobjects.c while ((cp < end) && (*cp == ' ' || *cp == '\t')) cp 772 drivers/staging/speakup/kobjects.c cp++; cp 774 drivers/staging/speakup/kobjects.c if (cp == end) cp 776 drivers/staging/speakup/kobjects.c if (strchr("dDrR", *cp)) { cp 782 drivers/staging/speakup/kobjects.c linefeed = strchr(cp, '\n'); cp 788 drivers/staging/speakup/kobjects.c if (!isdigit(*cp)) { cp 790 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 798 drivers/staging/speakup/kobjects.c index = simple_strtoul(cp, &temp, 10); cp 815 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 829 drivers/staging/speakup/kobjects.c cp = linefeed + 1; cp 427 drivers/staging/speakup/main.c char *cp; cp 441 drivers/staging/speakup/main.c cp = spk_characters[ch]; cp 442 drivers/staging/speakup/main.c if (!cp) { cp 449 drivers/staging/speakup/main.c spk_str_caps_start, cp, spk_str_caps_stop); cp 451 drivers/staging/speakup/main.c if (*cp == '^') { cp 452 drivers/staging/speakup/main.c cp++; cp 453 drivers/staging/speakup/main.c synth_printf(" %s%s ", spk_msg_get(MSG_CTRL), cp); cp 455 drivers/staging/speakup/main.c synth_printf(" %s ", cp); cp 705 drivers/staging/speakup/main.c u16 *cp = buf; cp 714 drivers/staging/speakup/main.c while ((ch = *cp)) { cp 715 drivers/staging/speakup/main.c if (cp != buf) cp 746 drivers/staging/speakup/main.c cp++; cp 773 drivers/staging/speakup/main.c u16 *cp; cp 782 drivers/staging/speakup/main.c cp = buf; cp 783 drivers/staging/speakup/main.c while (*cp == SPACE) cp 784 drivers/staging/speakup/main.c cp++; cp 785 drivers/staging/speakup/main.c synth_printf("%zd, ", (cp - buf) + 1); cp 1224 drivers/staging/speakup/main.c const u_char *cp = key_info; cp 1228 drivers/staging/speakup/main.c version = *cp++; cp 1234 drivers/staging/speakup/main.c num_keys = *cp; cp 1235 drivers/staging/speakup/main.c states = (int)cp[1]; cp 1248 drivers/staging/speakup/main.c memcpy(cp1, cp, key_data_len + 3); cp 1840 drivers/staging/speakup/main.c char *cp = num_buf; cp 1857 drivers/staging/speakup/main.c *cp = SPACE; cp 1859 drivers/staging/speakup/main.c *cp++ = *pn; cp 1862 drivers/staging/speakup/main.c snprintf(cp, sizeof(num_buf) - (cp - num_buf), " %d ", cp 1944 drivers/staging/speakup/main.c char *cp; cp 1986 drivers/staging/speakup/main.c goto_pos = simple_strtoul(goto_buf, &cp, 10); cp 1988 drivers/staging/speakup/main.c if (*cp == 'x') { cp 152 drivers/staging/speakup/speakup_soft.c char *cp; cp 156 drivers/staging/speakup/speakup_soft.c cp = buf; cp 161 drivers/staging/speakup/speakup_soft.c cp = cp + sprintf(cp, var->u.n.synth_fmt, cp 165 drivers/staging/speakup/speakup_soft.c cp = cp + sprintf(cp, "\n"); cp 201 drivers/staging/speakup/speakup_soft.c char __user *cp; cp 236 drivers/staging/speakup/speakup_soft.c cp = buf; cp 260 drivers/staging/speakup/speakup_soft.c if (copy_to_user(cp, &c, 1)) cp 264 drivers/staging/speakup/speakup_soft.c cp++; cp 271 drivers/staging/speakup/speakup_soft.c if (copy_to_user(cp, s, sizeof(s))) cp 275 drivers/staging/speakup/speakup_soft.c cp += sizeof(s); cp 283 drivers/staging/speakup/speakup_soft.c if (copy_to_user(cp, s, sizeof(s))) cp 287 drivers/staging/speakup/speakup_soft.c cp += sizeof(s); cp 74 drivers/staging/speakup/spk_ttyio.c const unsigned char *cp, char *fp, int count) cp 82 drivers/staging/speakup/spk_ttyio.c spk_ttyio_synth->read_buff_add(cp[i]); cp 96 drivers/staging/speakup/spk_ttyio.c ldisc_data->buf = cp[0]; cp 183 drivers/staging/speakup/varhandlers.c char *cp; cp 235 drivers/staging/speakup/varhandlers.c cp = spk_pitch_buff; cp 237 drivers/staging/speakup/varhandlers.c cp = buf; cp 239 drivers/staging/speakup/varhandlers.c sprintf(cp, var_data->u.n.synth_fmt, (int)val); cp 241 drivers/staging/speakup/varhandlers.c sprintf(cp, var_data->u.n.synth_fmt, cp 243 drivers/staging/speakup/varhandlers.c synth_printf("%s", cp); cp 279 drivers/staging/speakup/varhandlers.c u_char *cp; cp 283 drivers/staging/speakup/varhandlers.c for (cp = (u_char *)spk_punc_info[3].value; *cp; cp++) cp 284 drivers/staging/speakup/varhandlers.c spk_chartab[*cp] &= ~mask; cp 286 drivers/staging/speakup/varhandlers.c cp = (u_char *)input; cp 287 drivers/staging/speakup/varhandlers.c if (!cp) { cp 288 drivers/staging/speakup/varhandlers.c cp = spk_punc_info[which].value; cp 290 drivers/staging/speakup/varhandlers.c for (; *cp; cp++) { cp 291 drivers/staging/speakup/varhandlers.c if (*cp < SPACE) cp 294 drivers/staging/speakup/varhandlers.c if (!(spk_chartab[*cp] & PUNC)) cp 296 drivers/staging/speakup/varhandlers.c } else if (spk_chartab[*cp] & B_NUM) { cp 300 drivers/staging/speakup/varhandlers.c if (*cp) cp 302 drivers/staging/speakup/varhandlers.c cp = (u_char *)input; cp 305 drivers/staging/speakup/varhandlers.c for (; *cp; cp++) cp 306 drivers/staging/speakup/varhandlers.c if (*cp > SPACE) cp 307 drivers/staging/speakup/varhandlers.c spk_chartab[*cp] |= mask; cp 309 drivers/staging/speakup/varhandlers.c for (; *cp; cp++) cp 310 drivers/staging/speakup/varhandlers.c if (*cp > SPACE) cp 311 drivers/staging/speakup/varhandlers.c spk_chartab[*cp] &= ~mask; cp 1914 drivers/target/sbp/sbp_target.c const char *cp; cp 1919 drivers/target/sbp/sbp_target.c for (cp = name; cp < &name[SBP_NAMELEN - 1]; cp++) { cp 1920 drivers/target/sbp/sbp_target.c c = *cp; cp 1921 drivers/target/sbp/sbp_target.c if (c == '\n' && cp[1] == '\0') cp 1927 drivers/target/sbp/sbp_target.c return cp - name; cp 1942 drivers/target/sbp/sbp_target.c err, cp - name, pos); cp 51 drivers/target/tcm_fc/tfc_conf.c const char *cp; cp 59 drivers/target/tcm_fc/tfc_conf.c for (cp = name; cp < &name[FT_NAMELEN - 1]; cp++) { cp 60 drivers/target/tcm_fc/tfc_conf.c c = *cp; cp 61 drivers/target/tcm_fc/tfc_conf.c if (c == '\n' && cp[1] == '\0') cp 74 drivers/target/tcm_fc/tfc_conf.c return cp - name; cp 85 drivers/target/tcm_fc/tfc_conf.c err, cp - name, pos, byte); cp 872 drivers/thermal/tegra/soctherm.c u32 st, ex = 0, cp = 0, gp = 0, pl = 0, me = 0; cp 877 drivers/thermal/tegra/soctherm.c cp |= st & TH_INTR_CD0_MASK; cp 878 drivers/thermal/tegra/soctherm.c cp |= st & TH_INTR_CU0_MASK; cp 889 drivers/thermal/tegra/soctherm.c ex |= cp | gp | pl | me; cp 894 drivers/thermal/tegra/soctherm.c if (cp) { cp 2404 drivers/tty/n_gsm.c static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 2415 drivers/tty/n_gsm.c cp, count); cp 2417 drivers/tty/n_gsm.c for (i = count, dp = cp, f = fp; i; i--, dp++) { cp 187 drivers/tty/n_hdlc.c static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *cp, cp 35 drivers/tty/n_null.c const unsigned char *cp, char *fp, cp 144 drivers/tty/n_r3964.c static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 1266 drivers/tty/n_r3964.c static void r3964_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 1274 drivers/tty/n_r3964.c for (i = count, p = cp, f = fp; i; i--, p++) { cp 162 drivers/tty/n_tracerouter.c const unsigned char *cp, cp 166 drivers/tty/n_tracerouter.c n_tracesink_datadrain((u8 *) cp, count); cp 548 drivers/tty/n_tty.c const unsigned char *cp; cp 560 drivers/tty/n_tty.c for (i = 0, cp = buf; i < nr; i++, cp++) { cp 561 drivers/tty/n_tty.c unsigned char c = *cp; cp 1511 drivers/tty/n_tty.c n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp, cp 1519 drivers/tty/n_tty.c memcpy(read_buf_addr(ldata, head), cp, n); cp 1521 drivers/tty/n_tty.c cp += n; cp 1526 drivers/tty/n_tty.c memcpy(read_buf_addr(ldata, head), cp, n); cp 1531 drivers/tty/n_tty.c n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp, cp 1541 drivers/tty/n_tty.c put_tty_queue(*cp++, ldata); cp 1543 drivers/tty/n_tty.c n_tty_receive_char_flagged(tty, *cp++, flag); cp 1548 drivers/tty/n_tty.c n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp, cp 1557 drivers/tty/n_tty.c n_tty_receive_char_closing(tty, *cp++); cp 1562 drivers/tty/n_tty.c n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp, cp 1572 drivers/tty/n_tty.c unsigned char c = *cp++; cp 1587 drivers/tty/n_tty.c n_tty_receive_char_lnext(tty, *cp++, flag); cp 1591 drivers/tty/n_tty.c n_tty_receive_char_flagged(tty, *cp++, flag); cp 1596 drivers/tty/n_tty.c n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp, cp 1606 drivers/tty/n_tty.c unsigned char c = *cp++; cp 1613 drivers/tty/n_tty.c n_tty_receive_char_lnext(tty, *cp++, flag); cp 1617 drivers/tty/n_tty.c n_tty_receive_char_flagged(tty, *cp++, flag); cp 1621 drivers/tty/n_tty.c static void __receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 1628 drivers/tty/n_tty.c n_tty_receive_buf_real_raw(tty, cp, fp, count); cp 1630 drivers/tty/n_tty.c n_tty_receive_buf_raw(tty, cp, fp, count); cp 1632 drivers/tty/n_tty.c n_tty_receive_buf_closing(tty, cp, fp, count); cp 1639 drivers/tty/n_tty.c n_tty_receive_char_lnext(tty, *cp++, flag); cp 1644 drivers/tty/n_tty.c n_tty_receive_buf_fast(tty, cp, fp, count); cp 1646 drivers/tty/n_tty.c n_tty_receive_buf_standard(tty, cp, fp, count); cp 1699 drivers/tty/n_tty.c n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp, cp 1742 drivers/tty/n_tty.c __receive_buf(tty, cp, fp, n); cp 1744 drivers/tty/n_tty.c cp += n; cp 1768 drivers/tty/n_tty.c static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, cp 1771 drivers/tty/n_tty.c n_tty_receive_buf_common(tty, cp, fp, count, 0); cp 1774 drivers/tty/n_tty.c static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp, cp 1777 drivers/tty/n_tty.c return n_tty_receive_buf_common(tty, cp, fp, count, 1); cp 301 drivers/tty/rocket.c static void rp_do_receive(struct r_port *info, CHANNEL_t *cp, cp 308 drivers/tty/rocket.c ToRecv = sGetRxCnt(cp); cp 326 drivers/tty/rocket.c sEnRxStatusMode(cp); cp 343 drivers/tty/rocket.c CharNStat = sInW(sGetTxRxDataIO(cp)); cp 373 drivers/tty/rocket.c if (sGetRxCnt(cp) == 0) { cp 377 drivers/tty/rocket.c sDisRxStatusMode(cp); cp 396 drivers/tty/rocket.c sInStrW(sGetTxRxDataIO(cp), (unsigned short *) cbuf, wRecv); cp 398 drivers/tty/rocket.c cbuf[ToRecv - 1] = sInB(sGetTxRxDataIO(cp)); cp 413 drivers/tty/rocket.c CHANNEL_t *cp = &info->channel; cp 431 drivers/tty/rocket.c info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); cp 441 drivers/tty/rocket.c sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) (info->xmit_buf + info->xmit_tail), c / 2); cp 443 drivers/tty/rocket.c sOutB(sGetTxRxDataIO(cp), info->xmit_buf[info->xmit_tail + c - 1]); cp 479 drivers/tty/rocket.c CHANNEL_t *cp; cp 491 drivers/tty/rocket.c cp = &info->channel; cp 493 drivers/tty/rocket.c IntMask = sGetChanIntID(cp) & info->intmask; cp 497 drivers/tty/rocket.c ChanStatus = sGetChanStatus(cp); cp 499 drivers/tty/rocket.c rp_do_receive(info, cp, ChanStatus); cp 702 drivers/tty/rocket.c CHANNEL_t *cp; cp 705 drivers/tty/rocket.c cp = &info->channel; cp 710 drivers/tty/rocket.c sSetData8(cp); cp 713 drivers/tty/rocket.c sSetData7(cp); cp 717 drivers/tty/rocket.c sSetStop2(cp); cp 720 drivers/tty/rocket.c sSetStop1(cp); cp 724 drivers/tty/rocket.c sEnParity(cp); cp 727 drivers/tty/rocket.c sSetOddParity(cp); cp 729 drivers/tty/rocket.c sSetEvenParity(cp); cp 732 drivers/tty/rocket.c sDisParity(cp); cp 751 drivers/tty/rocket.c sSetBaud(cp, divisor); cp 758 drivers/tty/rocket.c sEnCTSFlowCtl(cp); cp 761 drivers/tty/rocket.c sDisCTSFlowCtl(cp); cp 767 drivers/tty/rocket.c if (sGetChanStatus(cp) & CD_ACT) cp 780 drivers/tty/rocket.c sEnTxSoftFlowCtl(cp); cp 782 drivers/tty/rocket.c sEnIXANY(cp); cp 784 drivers/tty/rocket.c sDisIXANY(cp); cp 786 drivers/tty/rocket.c sSetTxXONChar(cp, START_CHAR(tty)); cp 787 drivers/tty/rocket.c sSetTxXOFFChar(cp, STOP_CHAR(tty)); cp 789 drivers/tty/rocket.c sDisTxSoftFlowCtl(cp); cp 790 drivers/tty/rocket.c sDisIXANY(cp); cp 791 drivers/tty/rocket.c sClrTxXOFF(cp); cp 824 drivers/tty/rocket.c sEnRTSToggle(cp); cp 826 drivers/tty/rocket.c sDisRTSToggle(cp); cp 830 drivers/tty/rocket.c if (cp->CtlP->boardType == ROCKET_TYPE_PC104) { cp 833 drivers/tty/rocket.c sSetInterfaceMode(cp, InterfaceModeRS485); cp 836 drivers/tty/rocket.c sSetInterfaceMode(cp, InterfaceModeRS422); cp 841 drivers/tty/rocket.c sSetInterfaceMode(cp, InterfaceModeRS232T); cp 843 drivers/tty/rocket.c sSetInterfaceMode(cp, InterfaceModeRS232); cp 876 drivers/tty/rocket.c CHANNEL_t *cp; cp 915 drivers/tty/rocket.c cp = &info->channel; cp 916 drivers/tty/rocket.c sSetRxTrigger(cp, TRIG_1); cp 917 drivers/tty/rocket.c if (sGetChanStatus(cp) & CD_ACT) cp 921 drivers/tty/rocket.c sDisRxStatusMode(cp); cp 922 drivers/tty/rocket.c sFlushRxFIFO(cp); cp 923 drivers/tty/rocket.c sFlushTxFIFO(cp); cp 925 drivers/tty/rocket.c sEnInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); cp 926 drivers/tty/rocket.c sSetRxTrigger(cp, TRIG_1); cp 928 drivers/tty/rocket.c sGetChanStatus(cp); cp 929 drivers/tty/rocket.c sDisRxStatusMode(cp); cp 930 drivers/tty/rocket.c sClrTxXOFF(cp); cp 932 drivers/tty/rocket.c sDisCTSFlowCtl(cp); cp 933 drivers/tty/rocket.c sDisTxSoftFlowCtl(cp); cp 935 drivers/tty/rocket.c sEnRxFIFO(cp); cp 936 drivers/tty/rocket.c sEnTransmit(cp); cp 942 drivers/tty/rocket.c sSetDTR(cp); cp 943 drivers/tty/rocket.c sSetRTS(cp); cp 967 drivers/tty/rocket.c CHANNEL_t *cp; cp 980 drivers/tty/rocket.c cp = &info->channel; cp 986 drivers/tty/rocket.c timeout = (sGetTxCnt(cp) + 1) * HZ / info->cps; cp 992 drivers/tty/rocket.c sDisTransmit(cp); cp 993 drivers/tty/rocket.c sDisInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); cp 994 drivers/tty/rocket.c sDisCTSFlowCtl(cp); cp 995 drivers/tty/rocket.c sDisTxSoftFlowCtl(cp); cp 996 drivers/tty/rocket.c sClrTxXOFF(cp); cp 997 drivers/tty/rocket.c sFlushRxFIFO(cp); cp 998 drivers/tty/rocket.c sFlushTxFIFO(cp); cp 999 drivers/tty/rocket.c sClrRTS(cp); cp 1001 drivers/tty/rocket.c sClrDTR(cp); cp 1045 drivers/tty/rocket.c CHANNEL_t *cp; cp 1064 drivers/tty/rocket.c cp = &info->channel; cp 1068 drivers/tty/rocket.c sClrDTR(cp); cp 1069 drivers/tty/rocket.c sClrRTS(cp); cp 1074 drivers/tty/rocket.c sSetRTS(cp); cp 1075 drivers/tty/rocket.c sSetDTR(cp); cp 1323 drivers/tty/rocket.c CHANNEL_t *cp; cp 1328 drivers/tty/rocket.c cp = &info->channel; cp 1329 drivers/tty/rocket.c if (sGetTxCnt(cp)) cp 1330 drivers/tty/rocket.c sWriteTxPrioByte(cp, ch); cp 1332 drivers/tty/rocket.c sWriteTxByte(sGetTxRxDataIO(cp), ch); cp 1415 drivers/tty/rocket.c CHANNEL_t *cp; cp 1423 drivers/tty/rocket.c cp = &info->channel; cp 1432 drivers/tty/rocket.c txcnt = sGetTxCnt(cp); cp 1434 drivers/tty/rocket.c if (sGetChanStatusLo(cp) & TXSHRMT) cp 1468 drivers/tty/rocket.c CHANNEL_t *cp; cp 1487 drivers/tty/rocket.c cp = &info->channel; cp 1488 drivers/tty/rocket.c sDisRxFIFO(cp); cp 1489 drivers/tty/rocket.c sDisTransmit(cp); cp 1490 drivers/tty/rocket.c sDisInterrupts(cp, (TXINT_EN | MCINT_EN | RXINT_EN | SRCINT_EN | CHANINT_EN)); cp 1491 drivers/tty/rocket.c sDisCTSFlowCtl(cp); cp 1492 drivers/tty/rocket.c sDisTxSoftFlowCtl(cp); cp 1493 drivers/tty/rocket.c sClrTxXOFF(cp); cp 1509 drivers/tty/rocket.c CHANNEL_t *cp; cp 1526 drivers/tty/rocket.c cp = &info->channel; cp 1529 drivers/tty/rocket.c info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); cp 1537 drivers/tty/rocket.c sOutB(sGetTxRxDataIO(cp), ch); cp 1556 drivers/tty/rocket.c CHANNEL_t *cp; cp 1570 drivers/tty/rocket.c cp = &info->channel; cp 1573 drivers/tty/rocket.c info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp); cp 1584 drivers/tty/rocket.c sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) b, c / 2); cp 1588 drivers/tty/rocket.c sOutB(sGetTxRxDataIO(cp), b[c - 1]); cp 1688 drivers/tty/rocket.c CHANNEL_t *cp; cp 1703 drivers/tty/rocket.c cp = &info->channel; cp 1704 drivers/tty/rocket.c sFlushTxFIFO(cp); cp 25 drivers/tty/serdev/serdev-ttyport.c static int ttyport_receive_buf(struct tty_port *port, const unsigned char *cp, cp 35 drivers/tty/serdev/serdev-ttyport.c ret = serdev_controller_receive_buf(ctrl, cp, count); cp 234 drivers/tty/serial/cpm_uart/cpm_uart_core.c u8 *cp; cp 273 drivers/tty/serial/cpm_uart/cpm_uart_core.c cp = cpm2cpu_addr(in_be32(&bdp->cbd_bufaddr), pinfo); cp 277 drivers/tty/serial/cpm_uart/cpm_uart_core.c ch = *cp++; cp 1053 drivers/tty/serial/cpm_uart/cpm_uart_core.c u_char c, *cp; cp 1066 drivers/tty/serial/cpm_uart/cpm_uart_core.c cp = cpm2cpu_addr(bdp->cbd_bufaddr, pinfo); cp 1071 drivers/tty/serial/cpm_uart/cpm_uart_core.c *obuf++ = *cp++; cp 1073 drivers/tty/serial/cpm_uart/cpm_uart_core.c c = *cp; cp 460 drivers/tty/serial/ucc_uart.c unsigned char ch, *cp; cp 490 drivers/tty/serial/ucc_uart.c cp = qe2cpu_addr(bdp->buf, qe_port); cp 494 drivers/tty/serial/ucc_uart.c ch = *cp++; cp 316 drivers/tty/vt/keyboard.c static void puts_queue(struct vc_data *vc, char *cp) cp 318 drivers/tty/vt/keyboard.c while (*cp) { cp 319 drivers/tty/vt/keyboard.c tty_insert_flip_char(&vc->port, *cp, 0); cp 320 drivers/tty/vt/keyboard.c cp++; cp 1815 drivers/usb/core/message.c struct usb_host_config *cp = NULL; cp 1826 drivers/usb/core/message.c cp = &dev->config[i]; cp 1831 drivers/usb/core/message.c if ((!cp && configuration != 0)) cp 1839 drivers/usb/core/message.c if (cp && configuration == 0) cp 1845 drivers/usb/core/message.c if (cp) { cp 1846 drivers/usb/core/message.c nintf = cp->desc.bNumInterfaces; cp 1866 drivers/usb/core/message.c i = dev->bus_mA - usb_get_max_power(dev, cp); cp 1904 drivers/usb/core/message.c ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL); cp 1923 drivers/usb/core/message.c cp->interface[i] = intf = new_interfaces[i]; cp 1924 drivers/usb/core/message.c intfc = cp->intf_cache[i]; cp 1941 drivers/usb/core/message.c intf->intf_assoc = find_iad(dev, cp, ifnum); cp 1974 drivers/usb/core/message.c if (ret < 0 && cp) { cp 1981 drivers/usb/core/message.c usb_disable_interface(dev, cp->interface[i], true); cp 1982 drivers/usb/core/message.c put_device(&cp->interface[i]->dev); cp 1983 drivers/usb/core/message.c cp->interface[i] = NULL; cp 1985 drivers/usb/core/message.c cp = NULL; cp 1988 drivers/usb/core/message.c dev->actconfig = cp; cp 1991 drivers/usb/core/message.c if (!cp) { cp 2000 drivers/usb/core/message.c if (cp->string == NULL && cp 2002 drivers/usb/core/message.c cp->string = usb_cache_string(dev, cp->desc.iConfiguration); cp 2016 drivers/usb/core/message.c struct usb_interface *intf = cp->interface[i]; cp 473 drivers/usb/core/sysfs.c char *cp; cp 478 drivers/usb/core/sysfs.c cp = memchr(buf, '\n', count); cp 479 drivers/usb/core/sysfs.c if (cp) cp 480 drivers/usb/core/sysfs.c len = cp - buf; cp 83 drivers/usb/gadget/config.c struct usb_config_descriptor *cp = buf; cp 89 drivers/usb/gadget/config.c *cp = *config; cp 101 drivers/usb/gadget/config.c cp->bLength = USB_DT_CONFIG_SIZE; cp 102 drivers/usb/gadget/config.c cp->bDescriptorType = USB_DT_CONFIG; cp 103 drivers/usb/gadget/config.c cp->wTotalLength = cpu_to_le16(len); cp 104 drivers/usb/gadget/config.c cp->bmAttributes |= USB_CONFIG_ATT_ONE; cp 789 drivers/usb/gadget/udc/fsl_qe_udc.c u8 *cp; cp 797 drivers/usb/gadget/udc/fsl_qe_udc.c cp = (u8 *)&udc->local_setup_buff; cp 798 drivers/usb/gadget/udc/fsl_qe_udc.c memcpy(cp, pframe->data, fsize); cp 886 drivers/usb/gadget/udc/fsl_qe_udc.c u8 *cp; cp 905 drivers/usb/gadget/udc/fsl_qe_udc.c cp = (u8 *)(req->req.buf) + req->req.actual; cp 906 drivers/usb/gadget/udc/fsl_qe_udc.c if (cp) { cp 907 drivers/usb/gadget/udc/fsl_qe_udc.c memcpy(cp, pframe->data, fsize); cp 1470 drivers/usb/gadget/udc/fsl_qe_udc.c u8 *cp; cp 1512 drivers/usb/gadget/udc/fsl_qe_udc.c cp = (u8 *)(req->req.buf) + req->req.actual; cp 1513 drivers/usb/gadget/udc/fsl_qe_udc.c if (cp) { cp 1514 drivers/usb/gadget/udc/fsl_qe_udc.c memcpy(cp, pframe->data, fsize); cp 58 drivers/video/console/newport_con.c #define RENDER(regs, cp) do { \ cp 59 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0x0]); (regs)->go.zpattern = BMASK((cp)[0x1]); \ cp 60 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0x2]); (regs)->go.zpattern = BMASK((cp)[0x3]); \ cp 61 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0x4]); (regs)->go.zpattern = BMASK((cp)[0x5]); \ cp 62 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0x6]); (regs)->go.zpattern = BMASK((cp)[0x7]); \ cp 63 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0x8]); (regs)->go.zpattern = BMASK((cp)[0x9]); \ cp 64 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0xa]); (regs)->go.zpattern = BMASK((cp)[0xb]); \ cp 65 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0xc]); (regs)->go.zpattern = BMASK((cp)[0xd]); \ cp 66 drivers/video/console/newport_con.c (regs)->go.zpattern = BMASK((cp)[0xe]); (regs)->go.zpattern = BMASK((cp)[0xf]); \ cp 738 drivers/video/fbdev/aty/radeon_monitor.c const char* cp; cp 744 drivers/video/fbdev/aty/radeon_monitor.c cp = of_get_property(root, "model", &len); cp 745 drivers/video/fbdev/aty/radeon_monitor.c if (cp) cp 746 drivers/video/fbdev/aty/radeon_monitor.c rc = memcmp(model, cp, min(len, l)) == 0; cp 2516 drivers/video/fbdev/core/fbcon.c unsigned short *cp = cp 2520 drivers/video/fbdev/core/fbcon.c for (; count > 0; count--, cp++) { cp 2521 drivers/video/fbdev/core/fbcon.c c = scr_readw(cp); cp 2523 drivers/video/fbdev/core/fbcon.c (c & 0xff), cp); cp 2539 drivers/video/fbdev/core/fbcon.c unsigned short *cp = cp 2543 drivers/video/fbdev/core/fbcon.c for (; count > 0; count--, cp++) { cp 2545 drivers/video/fbdev/core/fbcon.c c = scr_readw(cp); cp 2552 drivers/video/fbdev/core/fbcon.c scr_writew(newc, cp); cp 1957 drivers/video/fbdev/sm501fb.c const char *cp; cp 1963 drivers/video/fbdev/sm501fb.c cp = of_get_property(np, "mode", &len); cp 1964 drivers/video/fbdev/sm501fb.c if (cp) cp 1965 drivers/video/fbdev/sm501fb.c strcpy(fb_mode, cp); cp 334 fs/afs/cell.c const char *cp, *vllist; cp 347 fs/afs/cell.c cp = strchr(rootcell, ':'); cp 348 fs/afs/cell.c if (!cp) { cp 353 fs/afs/cell.c vllist = cp + 1; cp 354 fs/afs/cell.c len = cp - rootcell; cp 557 fs/afs/cell.c char keyname[4 + AFS_MAXCELLNAME + 1], *cp, *dp; cp 562 fs/afs/cell.c cp = cell->name; cp 564 fs/afs/cell.c *dp++ = tolower(*cp); cp 565 fs/afs/cell.c } while (*cp++); cp 536 fs/autofs/root.c char *cp; cp 556 fs/autofs/root.c cp = kmalloc(size + 1, GFP_KERNEL); cp 557 fs/autofs/root.c if (!cp) cp 560 fs/autofs/root.c strcpy(cp, symname); cp 564 fs/autofs/root.c kfree(cp); cp 567 fs/autofs/root.c inode->i_private = cp; cp 37 fs/binfmt_script.c char *cp, *buf_end; cp 74 fs/binfmt_script.c cp = strnchr(bprm->buf, sizeof(bprm->buf), '\n'); cp 75 fs/binfmt_script.c if (!cp) { cp 76 fs/binfmt_script.c cp = next_non_spacetab(bprm->buf + 2, buf_end); cp 77 fs/binfmt_script.c if (!cp) cp 83 fs/binfmt_script.c if (!next_terminator(cp, buf_end)) cp 85 fs/binfmt_script.c cp = buf_end; cp 88 fs/binfmt_script.c *cp = '\0'; cp 89 fs/binfmt_script.c while (cp > bprm->buf) { cp 90 fs/binfmt_script.c cp--; cp 91 fs/binfmt_script.c if ((*cp == ' ') || (*cp == '\t')) cp 92 fs/binfmt_script.c *cp = '\0'; cp 96 fs/binfmt_script.c for (cp = bprm->buf+2; (*cp == ' ') || (*cp == '\t'); cp++); cp 97 fs/binfmt_script.c if (*cp == '\0') cp 99 fs/binfmt_script.c i_name = cp; cp 101 fs/binfmt_script.c for ( ; *cp && (*cp != ' ') && (*cp != '\t'); cp++) cp 103 fs/binfmt_script.c while ((*cp == ' ') || (*cp == '\t')) cp 104 fs/binfmt_script.c *cp++ = '\0'; cp 105 fs/binfmt_script.c if (*cp) cp 106 fs/binfmt_script.c i_arg = cp; cp 219 fs/cachefiles/daemon.c char *data, *args, *cp; cp 241 fs/cachefiles/daemon.c cp = memchr(data, '\n', datalen); cp 242 fs/cachefiles/daemon.c if (cp) { cp 243 fs/cachefiles/daemon.c if (cp == data) cp 246 fs/cachefiles/daemon.c *cp = '\0'; cp 174 fs/char_dev.c struct char_device_struct *cd = NULL, **cp; cp 178 fs/char_dev.c for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next) cp 179 fs/char_dev.c if ((*cp)->major == major && cp 180 fs/char_dev.c (*cp)->baseminor == baseminor && cp 181 fs/char_dev.c (*cp)->minorct == minorct) cp 183 fs/char_dev.c if (*cp) { cp 184 fs/char_dev.c cd = *cp; cp 185 fs/char_dev.c *cp = cd->next; cp 120 fs/cifs/cifs_unicode.c cifs_mapchar(char *target, const __u16 *from, const struct nls_table *cp, cp 135 fs/cifs/cifs_unicode.c len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); cp 143 fs/cifs/cifs_unicode.c if (strcmp(cp->charset, "utf8")) cp 461 fs/cifs/cifs_unicode.c const struct nls_table *cp, int map_chars) cp 473 fs/cifs/cifs_unicode.c return cifs_strtoUTF16(target, source, PATH_MAX, cp); cp 505 fs/cifs/cifs_unicode.c charlen = cp->char2uni(source + i, srclen - i, &tmp); cp 516 fs/cifs/cifs_unicode.c if (strcmp(cp->charset, "utf8") || !wchar_to) cp 617 fs/cifs/cifs_unicode.c const struct nls_table *cp, int remap) cp 622 fs/cifs/cifs_unicode.c len = cifs_local_to_utf16_bytes(src, maxlen, cp); cp 629 fs/cifs/cifs_unicode.c cifsConvertToUTF16(dst, src, strlen(src), cp, remap); cp 94 fs/cifs/cifs_unicode.h const struct nls_table *cp, int map_type); cp 102 fs/cifs/cifs_unicode.h const struct nls_table *cp, int mapChars); cp 105 fs/cifs/cifs_unicode.h int *utf16_len, const struct nls_table *cp, cp 126 fs/cifs/netmisc.c cifs_inet_pton(const int address_family, const char *cp, int len, void *dst) cp 132 fs/cifs/netmisc.c ret = in4_pton(cp, len, dst, '\\', NULL); cp 134 fs/cifs/netmisc.c ret = in6_pton(cp, len, dst , '\\', NULL); cp 137 fs/cifs/netmisc.c ret, len, len, cp); cp 524 fs/cifs/smb2pdu.c struct nls_table *cp = load_nls_default(); cp 529 fs/cifs/smb2pdu.c pneg_ctxt->DataLength = cpu_to_le16(2 * cifs_strtoUTF16(pneg_ctxt->NetName, hostname, 100, cp)); cp 1676 fs/cifs/smb2pdu.c struct cifs_tcon *tcon, const struct nls_table *cp) cp 1700 fs/cifs/smb2pdu.c unc_path_len = cifs_strtoUTF16(unc_path, tree, strlen(tree), cp) + 1; cp 2222 fs/cifs/smb2pdu.c struct nls_table *cp; cp 2253 fs/cifs/smb2pdu.c cp = load_nls_default(); cp 2254 fs/cifs/smb2pdu.c cifs_strtoUTF16(*out_path, treename, treename_len, cp); cp 2257 fs/cifs/smb2pdu.c unload_nls(cp); cp 552 fs/coredump.c struct coredump_params *cp = (struct coredump_params *)info->data; cp 557 fs/coredump.c cp->file = files[1]; cp 142 fs/crypto/fname.c char *cp = dst; cp 148 fs/crypto/fname.c *cp++ = lookup_table[ac & 0x3f]; cp 154 fs/crypto/fname.c *cp++ = lookup_table[ac & 0x3f]; cp 155 fs/crypto/fname.c return cp - dst; cp 162 fs/crypto/fname.c u8 *cp = dst; cp 171 fs/crypto/fname.c *cp++ = ac & 0xff; cp 178 fs/crypto/fname.c return cp - dst; cp 402 fs/ext4/file.c char buf[64], *cp; cp 422 fs/ext4/file.c cp = d_path(&path, buf, sizeof(buf)); cp 424 fs/ext4/file.c if (IS_ERR(cp)) cp 435 fs/ext4/file.c strlcpy(sbi->s_es->s_last_mounted, cp, cp 1587 fs/f2fs/f2fs.h static inline unsigned long long cur_cp_version(struct f2fs_checkpoint *cp) cp 1589 fs/f2fs/f2fs.h return le64_to_cpu(cp->checkpoint_ver); cp 1599 fs/f2fs/f2fs.h static inline __u64 cur_cp_crc(struct f2fs_checkpoint *cp) cp 1601 fs/f2fs/f2fs.h size_t crc_offset = le32_to_cpu(cp->checksum_offset); cp 1602 fs/f2fs/f2fs.h return le32_to_cpu(*((__le32 *)((unsigned char *)cp + crc_offset))); cp 1605 fs/f2fs/f2fs.h static inline bool __is_set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) cp 1607 fs/f2fs/f2fs.h unsigned int ckpt_flags = le32_to_cpu(cp->ckpt_flags); cp 1617 fs/f2fs/f2fs.h static inline void __set_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) cp 1621 fs/f2fs/f2fs.h ckpt_flags = le32_to_cpu(cp->ckpt_flags); cp 1623 fs/f2fs/f2fs.h cp->ckpt_flags = cpu_to_le32(ckpt_flags); cp 1635 fs/f2fs/f2fs.h static inline void __clear_ckpt_flags(struct f2fs_checkpoint *cp, unsigned int f) cp 1639 fs/f2fs/f2fs.h ckpt_flags = le32_to_cpu(cp->ckpt_flags); cp 1641 fs/f2fs/f2fs.h cp->ckpt_flags = cpu_to_le32(ckpt_flags); cp 66 fs/hpfs/map.c struct code_page_directory *cp = hpfs_map_sector(s, cps, &bh, 0); cp 67 fs/hpfs/map.c if (!cp) return NULL; cp 68 fs/hpfs/map.c if (le32_to_cpu(cp->magic) != CP_DIR_MAGIC) { cp 70 fs/hpfs/map.c le32_to_cpu(cp->magic)); cp 74 fs/hpfs/map.c if (!le32_to_cpu(cp->n_code_pages)) { cp 79 fs/hpfs/map.c cpds = le32_to_cpu(cp->array[0].code_page_data); cp 80 fs/hpfs/map.c cpi = le16_to_cpu(cp->array[0].index); cp 95 fs/jfs/jfs_dmap.c static int dbMaxBud(u8 * cp); cp 3060 fs/jfs/jfs_dmap.c static int dbMaxBud(u8 * cp) cp 3067 fs/jfs/jfs_dmap.c if (*((uint *) cp) == 0) cp 3073 fs/jfs/jfs_dmap.c if (*((u16 *) cp) == 0 || *((u16 *) cp + 1) == 0) cp 3079 fs/jfs/jfs_dmap.c tmp1 = max(budtab[cp[2]], budtab[cp[3]]); cp 3080 fs/jfs/jfs_dmap.c tmp2 = max(budtab[cp[0]], budtab[cp[1]]); cp 3839 fs/jfs/jfs_dmap.c s8 *cp; cp 3854 fs/jfs/jfs_dmap.c cp = tp->stree + le32_to_cpu(tp->leafidx); cp 3856 fs/jfs/jfs_dmap.c *cp++ = dbMaxBud((u8 *) & dp->wmap[i]); cp 3886 fs/jfs/jfs_dmap.c s8 *tp, *cp, *cp1; cp 3913 fs/jfs/jfs_dmap.c for (i = 0, cp = tp + le32_to_cpu(dtp->leafidx); cp 3915 fs/jfs/jfs_dmap.c i += nextb, cp += nextb) { cp 3917 fs/jfs/jfs_dmap.c if (*cp == l2free && *(cp + bsize) == l2free) { cp 3918 fs/jfs/jfs_dmap.c *cp = l2free + 1; /* left take right */ cp 3919 fs/jfs/jfs_dmap.c *(cp + bsize) = -1; /* right give left */ cp 3943 fs/jfs/jfs_dmap.c for (i = 0, cp = tp + child, cp1 = tp + parent; cp 3944 fs/jfs/jfs_dmap.c i < nparent; i++, cp += 4, cp1++) cp 3945 fs/jfs/jfs_dmap.c *cp1 = TREEMAX(cp); cp 3959 fs/jfs/jfs_dmap.c s8 *cp; cp 3972 fs/jfs/jfs_dmap.c cp = &dcp->stree[CTLLEAFIND + i]; cp 3974 fs/jfs/jfs_dmap.c *cp++ = NOFREE; cp 51 fs/jfs/jfs_dmap.h static inline signed char TREEMAX(signed char *cp) cp 55 fs/jfs/jfs_dmap.h tmp1 = max(*(cp+2), *(cp+3)); cp 56 fs/jfs/jfs_dmap.h tmp2 = max(*(cp), *(cp+1)); cp 2561 fs/jfs/jfs_xtree.c cbuf_t *cp; cp 2678 fs/jfs/jfs_xtree.c if (rc = cmRead(ip, offset, npages, &cp)) cp 2681 fs/jfs/jfs_xtree.c assert(addressPXD(&cp->cm_pxd) == sxaddr); cp 2682 fs/jfs/jfs_xtree.c assert(!cp->cm_modified); cp 2686 fs/jfs/jfs_xtree.c cmSetXD(ip, cp, pno, dxaddr, nblks); cp 2689 fs/jfs/jfs_xtree.c cmPut(cp, true); cp 210 fs/jfs/xattr.c char *cp; cp 244 fs/jfs/xattr.c cp = (char *) ealist; cp 261 fs/jfs/xattr.c memcpy(mp->data, cp, nb); cp 283 fs/jfs/xattr.c cp += PSIZE; cp 358 fs/jfs/xattr.c char *cp = (char *) ealist; cp 399 fs/jfs/xattr.c memcpy(cp, mp->data, nb); cp 402 fs/jfs/xattr.c cp += PSIZE; cp 260 fs/nfs/nfs4idmap.c char *cp; cp 267 fs/nfs/nfs4idmap.c cp = *desc; cp 268 fs/nfs/nfs4idmap.c memcpy(cp, type, typelen); cp 269 fs/nfs/nfs4idmap.c cp += typelen; cp 270 fs/nfs/nfs4idmap.c *cp++ = ':'; cp 272 fs/nfs/nfs4idmap.c memcpy(cp, name, namelen); cp 273 fs/nfs/nfs4idmap.c cp += namelen; cp 274 fs/nfs/nfs4idmap.c *cp = '\0'; cp 266 fs/nfsd/export.c char * cp = (char*)item->ek_fsid; cp 269 fs/nfsd/export.c hash ^= hash_mem(cp, len, EXPKEY_HASHBITS); cp 1216 fs/nfsd/export.c struct cache_head *cp = p; cp 1217 fs/nfsd/export.c struct svc_export *exp = container_of(cp, struct svc_export, h); cp 1230 fs/nfsd/export.c return svc_export_show(m, cd, cp); cp 691 fs/nfsd/nfs4callback.c const struct nfsd4_copy *cp) cp 700 fs/nfsd/nfs4callback.c p = xdr_encode_hyper(p, cp->cp_res.wr_bytes_written); cp 701 fs/nfsd/nfs4callback.c *p++ = cpu_to_be32(cp->cp_res.wr_stable_how); cp 702 fs/nfsd/nfs4callback.c p = xdr_encode_opaque_fixed(p, cp->cp_res.wr_verifier.data, cp 714 fs/nfsd/nfs4callback.c const struct nfsd4_copy *cp, cp 722 fs/nfsd/nfs4callback.c encode_stateid4(xdr, &cp->cp_res.cb_stateid); cp 723 fs/nfsd/nfs4callback.c encode_offload_info4(xdr, nfserr, cp); cp 733 fs/nfsd/nfs4callback.c const struct nfsd4_copy *cp = cp 742 fs/nfsd/nfs4callback.c encode_cb_offload4args(xdr, cp->nfserr, &cp->fh, cp, &hdr); cp 74 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); cp 77 fs/nilfs2/cpfile.c count = le32_to_cpu(cp->cp_checkpoints_count) + n; cp 78 fs/nilfs2/cpfile.c cp->cp_checkpoints_count = cpu_to_le32(count); cp 88 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); cp 91 fs/nilfs2/cpfile.c WARN_ON(le32_to_cpu(cp->cp_checkpoints_count) < n); cp 92 fs/nilfs2/cpfile.c count = le32_to_cpu(cp->cp_checkpoints_count) - n; cp 93 fs/nilfs2/cpfile.c cp->cp_checkpoints_count = cpu_to_le32(count); cp 118 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp = kaddr + bh_offset(bh); cp 123 fs/nilfs2/cpfile.c nilfs_checkpoint_set_invalid(cp); cp 124 fs/nilfs2/cpfile.c cp = (void *)cp + cpsz; cp 222 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 239 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr); cp 240 fs/nilfs2/cpfile.c if (nilfs_checkpoint_invalid(cp)) { cp 248 fs/nilfs2/cpfile.c nilfs_checkpoint_clear_invalid(cp); cp 264 fs/nilfs2/cpfile.c *cpp = cp; cp 317 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 351 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint( cp 354 fs/nilfs2/cpfile.c for (i = 0; i < ncps; i++, cp = (void *)cp + cpsz) { cp 355 fs/nilfs2/cpfile.c if (nilfs_checkpoint_snapshot(cp)) { cp 357 fs/nilfs2/cpfile.c } else if (!nilfs_checkpoint_invalid(cp)) { cp 358 fs/nilfs2/cpfile.c nilfs_checkpoint_set_invalid(cp); cp 411 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp, cp 414 fs/nilfs2/cpfile.c ci->ci_flags = le32_to_cpu(cp->cp_flags); cp 415 fs/nilfs2/cpfile.c ci->ci_cno = le64_to_cpu(cp->cp_cno); cp 416 fs/nilfs2/cpfile.c ci->ci_create = le64_to_cpu(cp->cp_create); cp 417 fs/nilfs2/cpfile.c ci->ci_nblk_inc = le64_to_cpu(cp->cp_nblk_inc); cp 418 fs/nilfs2/cpfile.c ci->ci_inodes_count = le64_to_cpu(cp->cp_inodes_count); cp 419 fs/nilfs2/cpfile.c ci->ci_blocks_count = le64_to_cpu(cp->cp_blocks_count); cp 420 fs/nilfs2/cpfile.c ci->ci_next = le64_to_cpu(cp->cp_snapshot_list.ssl_next); cp 427 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 451 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr); cp 452 fs/nilfs2/cpfile.c for (i = 0; i < ncps && n < nci; i++, cp = (void *)cp + cpsz) { cp 453 fs/nilfs2/cpfile.c if (!nilfs_checkpoint_invalid(cp)) { cp 454 fs/nilfs2/cpfile.c nilfs_cpfile_checkpoint_to_cpinfo(cpfile, cp, cp 481 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 517 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, curr, bh, kaddr); cp 519 fs/nilfs2/cpfile.c if (unlikely(nilfs_checkpoint_invalid(cp) || cp 520 fs/nilfs2/cpfile.c !nilfs_checkpoint_snapshot(cp))) cp 522 fs/nilfs2/cpfile.c nilfs_cpfile_checkpoint_to_cpinfo(cpfile, cp, ci); cp 525 fs/nilfs2/cpfile.c next = le64_to_cpu(cp->cp_snapshot_list.ssl_next); cp 604 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 608 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr); cp 609 fs/nilfs2/cpfile.c list = &cp->cp_snapshot_list; cp 621 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 636 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr); cp 637 fs/nilfs2/cpfile.c if (nilfs_checkpoint_invalid(cp)) { cp 642 fs/nilfs2/cpfile.c if (nilfs_checkpoint_snapshot(cp)) { cp 673 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint( cp 675 fs/nilfs2/cpfile.c list = &cp->cp_snapshot_list; cp 697 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr); cp 698 fs/nilfs2/cpfile.c cp->cp_snapshot_list.ssl_next = cpu_to_le64(curr); cp 699 fs/nilfs2/cpfile.c cp->cp_snapshot_list.ssl_prev = cpu_to_le64(prev); cp 700 fs/nilfs2/cpfile.c nilfs_checkpoint_set_snapshot(cp); cp 740 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 754 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr); cp 755 fs/nilfs2/cpfile.c if (nilfs_checkpoint_invalid(cp)) { cp 760 fs/nilfs2/cpfile.c if (!nilfs_checkpoint_snapshot(cp)) { cp 766 fs/nilfs2/cpfile.c list = &cp->cp_snapshot_list; cp 806 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr); cp 807 fs/nilfs2/cpfile.c cp->cp_snapshot_list.ssl_next = cpu_to_le64(0); cp 808 fs/nilfs2/cpfile.c cp->cp_snapshot_list.ssl_prev = cpu_to_le64(0); cp 809 fs/nilfs2/cpfile.c nilfs_checkpoint_clear_snapshot(cp); cp 859 fs/nilfs2/cpfile.c struct nilfs_checkpoint *cp; cp 875 fs/nilfs2/cpfile.c cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, bh, kaddr); cp 876 fs/nilfs2/cpfile.c if (nilfs_checkpoint_invalid(cp)) cp 879 fs/nilfs2/cpfile.c ret = nilfs_checkpoint_snapshot(cp); cp 160 fs/proc/generic.c const char *cp = name, *next; cp 169 fs/proc/generic.c next = strchr(cp, '/'); cp 173 fs/proc/generic.c len = next - cp; cp 174 fs/proc/generic.c de = pde_subdir_find(de, cp, len); cp 179 fs/proc/generic.c cp += len + 1; cp 181 fs/proc/generic.c *residual = cp; cp 1051 fs/proc/task_mmu.c struct clear_refs_private *cp = walk->private; cp 1059 fs/proc/task_mmu.c if (cp->type == CLEAR_REFS_SOFT_DIRTY) { cp 1085 fs/proc/task_mmu.c if (cp->type == CLEAR_REFS_SOFT_DIRTY) { cp 1110 fs/proc/task_mmu.c struct clear_refs_private *cp = walk->private; cp 1122 fs/proc/task_mmu.c if (cp->type == CLEAR_REFS_ANON && vma->vm_file) cp 1124 fs/proc/task_mmu.c if (cp->type == CLEAR_REFS_MAPPED && !vma->vm_file) cp 1164 fs/proc/task_mmu.c struct clear_refs_private cp = { cp 1228 fs/proc/task_mmu.c &cp); cp 766 fs/ufs/balloc.c unsigned char *cp; cp 777 fs/ufs/balloc.c cp = ubh->bh[begin]->b_data + offset; cp 778 fs/ufs/balloc.c while ((table[*cp++] & mask) == 0 && --rest) cp 592 fs/xfs/libxfs/xfs_inode_fork.c char *cp; cp 613 fs/xfs/libxfs/xfs_inode_fork.c cp = XFS_DFORK_PTR(dip, whichfork); cp 621 fs/xfs/libxfs/xfs_inode_fork.c memcpy(cp, ifp->if_u1.if_data, ifp->if_bytes); cp 631 fs/xfs/libxfs/xfs_inode_fork.c (void)xfs_iextents_copy(ip, (xfs_bmbt_rec_t *)cp, cp 643 fs/xfs/libxfs/xfs_inode_fork.c (xfs_bmdr_block_t *)cp, cp 54 include/linux/can/core.h extern int can_proto_register(const struct can_proto *cp); cp 55 include/linux/can/core.h extern void can_proto_unregister(const struct can_proto *cp); cp 60 include/linux/memstick.h unsigned char cp; cp 21 include/linux/mtd/gen_probe.h struct mtd_info *mtd_do_chip_probe(struct map_info *map, struct chip_probe *cp); cp 57 include/linux/prefetch.h char *cp; cp 60 include/linux/prefetch.h for (cp = addr; cp < end; cp += PREFETCH_STRIDE) cp 61 include/linux/prefetch.h prefetch(cp); cp 345 include/linux/sunrpc/svc.h char *cp = (char *)p; cp 347 include/linux/sunrpc/svc.h return cp >= (char*)vec->iov_base cp 348 include/linux/sunrpc/svc.h && cp <= (char*)vec->iov_base + vec->iov_len; cp 355 include/linux/sunrpc/svc.h char *cp = (char*)p; cp 357 include/linux/sunrpc/svc.h vec->iov_len = cp - (char*)vec->iov_base; cp 203 include/linux/tty_ldisc.h void (*receive_buf)(struct tty_struct *, const unsigned char *cp, cp 207 include/linux/tty_ldisc.h int (*receive_buf2)(struct tty_struct *, const unsigned char *cp, cp 451 include/net/ip_vs.h struct ip_vs_conn *cp, struct ip_vs_iphdr *iph); cp 454 include/net/ip_vs.h struct ip_vs_conn *cp, struct ip_vs_iphdr *iph); cp 458 include/net/ip_vs.h void (*state_transition)(struct ip_vs_conn *cp, int direction, cp 466 include/net/ip_vs.h int (*app_conn_bind)(struct ip_vs_conn *cp); cp 545 include/net/ip_vs.h int (*packet_xmit)(struct sk_buff *skb, struct ip_vs_conn *cp, cp 734 include/net/ip_vs.h int (*show_pe_data)(const struct ip_vs_conn *cp, char *buf); cp 801 include/net/ip_vs.h int (*state_transition)(struct ip_vs_conn *cp, int direction, cp 1216 include/net/ip_vs.h static inline bool __ip_vs_conn_get(struct ip_vs_conn *cp) cp 1218 include/net/ip_vs.h return refcount_inc_not_zero(&cp->refcnt); cp 1222 include/net/ip_vs.h static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) cp 1225 include/net/ip_vs.h refcount_dec(&cp->refcnt); cp 1227 include/net/ip_vs.h void ip_vs_conn_put(struct ip_vs_conn *cp); cp 1228 include/net/ip_vs.h void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport); cp 1234 include/net/ip_vs.h void ip_vs_conn_expire_now(struct ip_vs_conn *cp); cp 1236 include/net/ip_vs.h const char *ip_vs_state_name(const struct ip_vs_conn *cp); cp 1238 include/net/ip_vs.h void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp); cp 1244 include/net/ip_vs.h static inline void ip_vs_control_del(struct ip_vs_conn *cp) cp 1246 include/net/ip_vs.h struct ip_vs_conn *ctl_cp = cp->control; cp 1250 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 1251 include/net/ip_vs.h ntohs(cp->cport), cp 1252 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 1253 include/net/ip_vs.h ntohs(cp->vport)); cp 1260 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 1261 include/net/ip_vs.h ntohs(cp->cport), cp 1262 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &ctl_cp->caddr), cp 1265 include/net/ip_vs.h cp->control = NULL; cp 1269 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 1270 include/net/ip_vs.h ntohs(cp->cport), cp 1271 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 1272 include/net/ip_vs.h ntohs(cp->vport)); cp 1280 include/net/ip_vs.h ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp) cp 1282 include/net/ip_vs.h if (cp->control) { cp 1285 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 1286 include/net/ip_vs.h ntohs(cp->cport), cp 1287 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 1288 include/net/ip_vs.h ntohs(cp->vport)); cp 1290 include/net/ip_vs.h ip_vs_control_del(cp); cp 1295 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 1296 include/net/ip_vs.h ntohs(cp->cport), cp 1297 include/net/ip_vs.h IP_VS_DBG_ADDR(cp->af, &ctl_cp->caddr), cp 1300 include/net/ip_vs.h cp->control = ctl_cp; cp 1306 include/net/ip_vs.h ip_vs_control_assure_ct(struct ip_vs_conn *cp) cp 1308 include/net/ip_vs.h struct ip_vs_conn *ct = cp->control; cp 1336 include/net/ip_vs.h int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); cp 1337 include/net/ip_vs.h void ip_vs_unbind_app(struct ip_vs_conn *cp); cp 1427 include/net/ip_vs.h void ip_vs_try_bind_dest(struct ip_vs_conn *cp); cp 1452 include/net/ip_vs.h void ip_vs_sync_conn(struct netns_ipvs *ipvs, struct ip_vs_conn *cp, int pkts); cp 1461 include/net/ip_vs.h int ip_vs_null_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1463 include/net/ip_vs.h int ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1465 include/net/ip_vs.h int ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1467 include/net/ip_vs.h int ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1469 include/net/ip_vs.h int ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1471 include/net/ip_vs.h int ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1477 include/net/ip_vs.h int ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1479 include/net/ip_vs.h int ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1481 include/net/ip_vs.h int ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1483 include/net/ip_vs.h int ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1485 include/net/ip_vs.h int ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1512 include/net/ip_vs.h #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) cp 1514 include/net/ip_vs.h static inline char ip_vs_fwd_tag(struct ip_vs_conn *cp) cp 1518 include/net/ip_vs.h switch (IP_VS_FWD_METHOD(cp)) { cp 1536 include/net/ip_vs.h struct ip_vs_conn *cp, int dir); cp 1540 include/net/ip_vs.h struct ip_vs_conn *cp, int dir); cp 1597 include/net/ip_vs.h void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1601 include/net/ip_vs.h struct ip_vs_conn *cp, u_int8_t proto, cp 1603 include/net/ip_vs.h void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp); cp 1613 include/net/ip_vs.h struct ip_vs_conn *cp, int outin) cp 1622 include/net/ip_vs.h static inline void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp) cp 1628 include/net/ip_vs.h static inline bool ip_vs_conn_uses_conntrack(struct ip_vs_conn *cp, cp 1635 include/net/ip_vs.h if (!(cp->flags & IP_VS_CONN_F_NFCT)) cp 526 include/scsi/fc_encode.h struct fc_els_cssp *cp; cp 539 include/scsi/fc_encode.h cp = &plogi->fl_cssp[3 - 1]; /* class 3 parameters */ cp 540 include/scsi/fc_encode.h cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); cp 546 include/scsi/fc_encode.h cp->cp_rdfs = htons((u16) lport->mfs); cp 547 include/scsi/fc_encode.h cp->cp_con_seq = htons(255); cp 548 include/scsi/fc_encode.h cp->cp_open_seq = 1; cp 557 include/scsi/fc_encode.h struct fc_els_cssp *cp; cp 570 include/scsi/fc_encode.h cp = &flogi->fl_cssp[3 - 1]; /* class 3 parameters */ cp 571 include/scsi/fc_encode.h cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); cp 582 include/scsi/fc_encode.h struct fc_els_cssp *cp; cp 595 include/scsi/fc_encode.h cp = &fdisc->fl_cssp[3 - 1]; /* class 3 parameters */ cp 596 include/scsi/fc_encode.h cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); cp 208 include/scsi/fc_frame.h u8 *cp; cp 210 include/scsi/fc_frame.h cp = fc_frame_payload_get(fp, sizeof(u8)); cp 211 include/scsi/fc_frame.h if (!cp) cp 213 include/scsi/fc_frame.h return *cp; cp 425 include/soc/fsl/qe/immap_qe.h struct cp_qe cp; /* Communications Processor */ cp 134 include/sound/seq_midi_emul.h #define SNDRV_GM_BANK_SELECT(cp) (((cp)->control[0]<<7)|((cp)->control[32])) cp 135 include/sound/seq_midi_emul.h #define SNDRV_GM_MODULATION_WHEEL(cp) (((cp)->control[1]<<7)|((cp)->control[33])) cp 136 include/sound/seq_midi_emul.h #define SNDRV_GM_BREATH(cp) (((cp)->control[2]<<7)|((cp)->control[34])) cp 137 include/sound/seq_midi_emul.h #define SNDRV_GM_FOOT_PEDAL(cp) (((cp)->control[4]<<7)|((cp)->control[36])) cp 138 include/sound/seq_midi_emul.h #define SNDRV_GM_PORTAMENTO_TIME(cp) (((cp)->control[5]<<7)|((cp)->control[37])) cp 139 include/sound/seq_midi_emul.h #define SNDRV_GM_DATA_ENTRY(cp) (((cp)->control[6]<<7)|((cp)->control[38])) cp 140 include/sound/seq_midi_emul.h #define SNDRV_GM_VOLUME(cp) (((cp)->control[7]<<7)|((cp)->control[39])) cp 141 include/sound/seq_midi_emul.h #define SNDRV_GM_BALANCE(cp) (((cp)->control[8]<<7)|((cp)->control[40])) cp 142 include/sound/seq_midi_emul.h #define SNDRV_GM_PAN(cp) (((cp)->control[10]<<7)|((cp)->control[42])) cp 143 include/sound/seq_midi_emul.h #define SNDRV_GM_EXPRESSION(cp) (((cp)->control[11]<<7)|((cp)->control[43])) cp 55 include/uapi/linux/hdlcdrv.h struct hdlcdrv_channel_params cp; cp 534 include/uapi/linux/nilfs2_ondisk.h nilfs_checkpoint_set_##name(struct nilfs_checkpoint *cp) \ cp 536 include/uapi/linux/nilfs2_ondisk.h cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | \ cp 540 include/uapi/linux/nilfs2_ondisk.h nilfs_checkpoint_clear_##name(struct nilfs_checkpoint *cp) \ cp 542 include/uapi/linux/nilfs2_ondisk.h cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & \ cp 546 include/uapi/linux/nilfs2_ondisk.h nilfs_checkpoint_##name(const struct nilfs_checkpoint *cp) \ cp 548 include/uapi/linux/nilfs2_ondisk.h return !!(__le32_to_cpu(cp->cp_flags) & \ cp 656 kernel/cgroup/cpuset.c struct cpuset *cp; cp 660 kernel/cgroup/cpuset.c cpuset_for_each_descendant_pre(cp, pos_css, root_cs) { cp 662 kernel/cgroup/cpuset.c if (cpumask_empty(cp->cpus_allowed)) { cp 667 kernel/cgroup/cpuset.c if (is_sched_load_balance(cp)) cp 668 kernel/cgroup/cpuset.c update_domain_attr(dattr, cp); cp 736 kernel/cgroup/cpuset.c struct cpuset *cp; /* top-down scan of cpusets */ cp 769 kernel/cgroup/cpuset.c csa = kmalloc_array(nr_cpusets(), sizeof(cp), GFP_KERNEL); cp 777 kernel/cgroup/cpuset.c cpuset_for_each_descendant_pre(cp, pos_css, &top_cpuset) { cp 778 kernel/cgroup/cpuset.c if (cp == &top_cpuset) cp 791 kernel/cgroup/cpuset.c if (!cpumask_empty(cp->cpus_allowed) && cp 792 kernel/cgroup/cpuset.c !(is_sched_load_balance(cp) && cp 793 kernel/cgroup/cpuset.c cpumask_intersects(cp->cpus_allowed, cp 798 kernel/cgroup/cpuset.c cpumask_subset(cp->cpus_allowed, top_cpuset.effective_cpus)) cp 801 kernel/cgroup/cpuset.c if (is_sched_load_balance(cp) && cp 802 kernel/cgroup/cpuset.c !cpumask_empty(cp->effective_cpus)) cp 803 kernel/cgroup/cpuset.c csa[csn++] = cp; cp 806 kernel/cgroup/cpuset.c if (!is_partition_root(cp)) cp 1296 kernel/cgroup/cpuset.c struct cpuset *cp; cp 1301 kernel/cgroup/cpuset.c cpuset_for_each_descendant_pre(cp, pos_css, cs) { cp 1302 kernel/cgroup/cpuset.c struct cpuset *parent = parent_cs(cp); cp 1304 kernel/cgroup/cpuset.c compute_effective_cpumask(tmp->new_cpus, cp, parent); cp 1312 kernel/cgroup/cpuset.c if (!cp->use_parent_ecpus) { cp 1313 kernel/cgroup/cpuset.c cp->use_parent_ecpus = true; cp 1316 kernel/cgroup/cpuset.c } else if (cp->use_parent_ecpus) { cp 1317 kernel/cgroup/cpuset.c cp->use_parent_ecpus = false; cp 1326 kernel/cgroup/cpuset.c if (!cp->partition_root_state && cp 1327 kernel/cgroup/cpuset.c cpumask_equal(tmp->new_cpus, cp->effective_cpus)) { cp 1338 kernel/cgroup/cpuset.c if ((cp != cs) && cp->partition_root_state) { cp 1346 kernel/cgroup/cpuset.c WARN_ON_ONCE(cp->partition_root_state cp 1348 kernel/cgroup/cpuset.c cp->partition_root_state = 0; cp 1357 kernel/cgroup/cpuset.c clear_bit(CS_CPU_EXCLUSIVE, &cp->flags); cp 1361 kernel/cgroup/cpuset.c if (update_parent_subparts_cpumask(cp, partcmd_update, NULL, tmp)) cp 1369 kernel/cgroup/cpuset.c cp->partition_root_state = PRS_ERROR; cp 1370 kernel/cgroup/cpuset.c if (cp->nr_subparts_cpus) { cp 1371 kernel/cgroup/cpuset.c cp->nr_subparts_cpus = 0; cp 1372 kernel/cgroup/cpuset.c cpumask_clear(cp->subparts_cpus); cp 1378 kernel/cgroup/cpuset.c if (!css_tryget_online(&cp->css)) cp 1384 kernel/cgroup/cpuset.c cpumask_copy(cp->effective_cpus, tmp->new_cpus); cp 1385 kernel/cgroup/cpuset.c if (cp->nr_subparts_cpus && cp 1386 kernel/cgroup/cpuset.c (cp->partition_root_state != PRS_ENABLED)) { cp 1387 kernel/cgroup/cpuset.c cp->nr_subparts_cpus = 0; cp 1388 kernel/cgroup/cpuset.c cpumask_clear(cp->subparts_cpus); cp 1389 kernel/cgroup/cpuset.c } else if (cp->nr_subparts_cpus) { cp 1399 kernel/cgroup/cpuset.c cpumask_andnot(cp->effective_cpus, cp->effective_cpus, cp 1400 kernel/cgroup/cpuset.c cp->subparts_cpus); cp 1401 kernel/cgroup/cpuset.c if (cpumask_empty(cp->effective_cpus)) { cp 1402 kernel/cgroup/cpuset.c cpumask_copy(cp->effective_cpus, tmp->new_cpus); cp 1403 kernel/cgroup/cpuset.c cpumask_clear(cp->subparts_cpus); cp 1404 kernel/cgroup/cpuset.c cp->nr_subparts_cpus = 0; cp 1405 kernel/cgroup/cpuset.c } else if (!cpumask_subset(cp->subparts_cpus, cp 1407 kernel/cgroup/cpuset.c cpumask_andnot(cp->subparts_cpus, cp 1408 kernel/cgroup/cpuset.c cp->subparts_cpus, tmp->new_cpus); cp 1409 kernel/cgroup/cpuset.c cp->nr_subparts_cpus cp 1410 kernel/cgroup/cpuset.c = cpumask_weight(cp->subparts_cpus); cp 1416 kernel/cgroup/cpuset.c !cpumask_equal(cp->cpus_allowed, cp->effective_cpus)); cp 1418 kernel/cgroup/cpuset.c update_tasks_cpumask(cp); cp 1426 kernel/cgroup/cpuset.c if (!cpumask_empty(cp->cpus_allowed) && cp 1427 kernel/cgroup/cpuset.c is_sched_load_balance(cp) && cp 1429 kernel/cgroup/cpuset.c is_partition_root(cp))) cp 1433 kernel/cgroup/cpuset.c css_put(&cp->css); cp 1710 kernel/cgroup/cpuset.c struct cpuset *cp; cp 1714 kernel/cgroup/cpuset.c cpuset_for_each_descendant_pre(cp, pos_css, cs) { cp 1715 kernel/cgroup/cpuset.c struct cpuset *parent = parent_cs(cp); cp 1717 kernel/cgroup/cpuset.c nodes_and(*new_mems, cp->mems_allowed, parent->effective_mems); cp 1727 kernel/cgroup/cpuset.c if (nodes_equal(*new_mems, cp->effective_mems)) { cp 1732 kernel/cgroup/cpuset.c if (!css_tryget_online(&cp->css)) cp 1737 kernel/cgroup/cpuset.c cp->effective_mems = *new_mems; cp 1741 kernel/cgroup/cpuset.c !nodes_equal(cp->mems_allowed, cp->effective_mems)); cp 1743 kernel/cgroup/cpuset.c update_tasks_nodemask(cp); cp 1746 kernel/cgroup/cpuset.c css_put(&cp->css); cp 206 kernel/debug/kdb/kdb_io.c char *cp = buffer; cp 227 kernel/debug/kdb/kdb_io.c cp += len; cp 229 kernel/debug/kdb/kdb_io.c cp--; cp 232 kernel/debug/kdb/kdb_io.c lastchar = cp; cp 233 kernel/debug/kdb/kdb_io.c *cp = '\0'; cp 243 kernel/debug/kdb/kdb_io.c if (cp > buffer) { cp 244 kernel/debug/kdb/kdb_io.c if (cp < lastchar) { cp 245 kernel/debug/kdb/kdb_io.c memcpy(tmpbuffer, cp, lastchar - cp); cp 246 kernel/debug/kdb/kdb_io.c memcpy(cp-1, tmpbuffer, lastchar - cp); cp 249 kernel/debug/kdb/kdb_io.c --cp; cp 250 kernel/debug/kdb/kdb_io.c kdb_printf("\b%s \r", cp); cp 251 kernel/debug/kdb/kdb_io.c tmp = *cp; cp 252 kernel/debug/kdb/kdb_io.c *cp = '\0'; cp 255 kernel/debug/kdb/kdb_io.c *cp = tmp; cp 268 kernel/debug/kdb/kdb_io.c if (cp < lastchar) { cp 269 kernel/debug/kdb/kdb_io.c memcpy(tmpbuffer, cp+1, lastchar - cp - 1); cp 270 kernel/debug/kdb/kdb_io.c memcpy(cp, tmpbuffer, lastchar - cp - 1); cp 272 kernel/debug/kdb/kdb_io.c kdb_printf("%s \r", cp); cp 273 kernel/debug/kdb/kdb_io.c tmp = *cp; cp 274 kernel/debug/kdb/kdb_io.c *cp = '\0'; cp 277 kernel/debug/kdb/kdb_io.c *cp = tmp; cp 281 kernel/debug/kdb/kdb_io.c if (cp > buffer) { cp 284 kernel/debug/kdb/kdb_io.c cp = buffer; cp 288 kernel/debug/kdb/kdb_io.c if (cp < lastchar) { cp 289 kernel/debug/kdb/kdb_io.c kdb_printf("%s", cp); cp 290 kernel/debug/kdb/kdb_io.c cp = lastchar; cp 294 kernel/debug/kdb/kdb_io.c if (cp > buffer) { cp 296 kernel/debug/kdb/kdb_io.c --cp; cp 309 kernel/debug/kdb/kdb_io.c if (cp < lastchar) { cp 310 kernel/debug/kdb/kdb_io.c kdb_printf("%c", *cp); cp 311 kernel/debug/kdb/kdb_io.c ++cp; cp 329 kernel/debug/kdb/kdb_io.c if (p_tmp > cp) cp 331 kernel/debug/kdb/kdb_io.c memcpy(tmpbuffer, p_tmp, cp-p_tmp); cp 332 kernel/debug/kdb/kdb_io.c *(tmpbuffer + (cp-p_tmp)) = '\0'; cp 368 kernel/debug/kdb/kdb_io.c strncpy(p_tmp+len_tmp, cp, lastchar-cp+1); cp 370 kernel/debug/kdb/kdb_io.c strncpy(cp, p_tmp+len, len_tmp-len + 1); cp 372 kernel/debug/kdb/kdb_io.c kdb_printf("%s", cp); cp 373 kernel/debug/kdb/kdb_io.c cp += len; cp 380 kernel/debug/kdb/kdb_io.c if (cp < lastchar) { cp 381 kernel/debug/kdb/kdb_io.c memcpy(tmpbuffer, cp, lastchar - cp); cp 382 kernel/debug/kdb/kdb_io.c memcpy(cp+1, tmpbuffer, lastchar - cp); cp 384 kernel/debug/kdb/kdb_io.c *cp = key; cp 385 kernel/debug/kdb/kdb_io.c kdb_printf("%s\r", cp); cp 386 kernel/debug/kdb/kdb_io.c ++cp; cp 387 kernel/debug/kdb/kdb_io.c tmp = *cp; cp 388 kernel/debug/kdb/kdb_io.c *cp = '\0'; cp 391 kernel/debug/kdb/kdb_io.c *cp = tmp; cp 394 kernel/debug/kdb/kdb_io.c *cp++ = key; cp 527 kernel/debug/kdb/kdb_io.c char firstchar, *cp; cp 545 kernel/debug/kdb/kdb_io.c cp = searched; cp 546 kernel/debug/kdb/kdb_io.c while ((cp = strchr(cp, firstchar))) { cp 547 kernel/debug/kdb/kdb_io.c if (!strncmp(cp, searchfor, len2)) cp 549 kernel/debug/kdb/kdb_io.c cp++; cp 564 kernel/debug/kdb/kdb_io.c char *cp, *cp2, *cphold = NULL, replaced_byte = ' '; cp 612 kernel/debug/kdb/kdb_io.c cp = strchr(kdb_buffer, '\n'); cp 613 kernel/debug/kdb/kdb_io.c if (!cp) { cp 657 kernel/debug/kdb/kdb_io.c cp++; /* to byte after the newline */ cp 658 kernel/debug/kdb/kdb_io.c replaced_byte = *cp; /* remember what/where it was */ cp 659 kernel/debug/kdb/kdb_io.c cphold = cp; cp 660 kernel/debug/kdb/kdb_io.c *cp = '\0'; /* end the string for our search */ cp 699 kernel/debug/kdb/kdb_io.c cp = (char *) printk_skip_headers(kdb_buffer); cp 701 kernel/debug/kdb/kdb_io.c gdbstub_msg_write(cp, retlen - (cp - kdb_buffer)); cp 704 kernel/debug/kdb/kdb_io.c len = retlen - (cp - kdb_buffer); cp 705 kernel/debug/kdb/kdb_io.c cp2 = cp; cp 712 kernel/debug/kdb/kdb_io.c c->write(c, cp, retlen - (cp - kdb_buffer)); cp 769 kernel/debug/kdb/kdb_io.c cp = moreprompt; cp 771 kernel/debug/kdb/kdb_io.c dbg_io_ops->write_char(*cp); cp 772 kernel/debug/kdb/kdb_io.c cp++; cp 244 kernel/debug/kdb/kdb_main.c char *cp = strchr(e, '='); cp 245 kernel/debug/kdb/kdb_main.c return cp ? ++cp : ""; cp 407 kernel/debug/kdb/kdb_main.c char *cp; cp 409 kernel/debug/kdb/kdb_main.c debugflags = simple_strtoul(argv[2], &cp, 0); cp 410 kernel/debug/kdb/kdb_main.c if (cp == argv[2] || debugflags & ~KDB_DEBUG_FLAG_MASK) { cp 505 kernel/debug/kdb/kdb_main.c char *cp; cp 536 kernel/debug/kdb/kdb_main.c cp = strpbrk(symname, "+-"); cp 537 kernel/debug/kdb/kdb_main.c if (cp != NULL) { cp 538 kernel/debug/kdb/kdb_main.c symbol = *cp; cp 539 kernel/debug/kdb/kdb_main.c *cp++ = '\0'; cp 608 kernel/debug/kdb/kdb_main.c cp = (char *)argv[*nextarg]; cp 612 kernel/debug/kdb/kdb_main.c diag = kdbgetularg(cp, &off); cp 825 kernel/debug/kdb/kdb_main.c char *cp = (char *)str, *cp2; cp 828 kernel/debug/kdb/kdb_main.c if (*cp != '|') cp 830 kernel/debug/kdb/kdb_main.c cp++; cp 831 kernel/debug/kdb/kdb_main.c while (isspace(*cp)) cp 832 kernel/debug/kdb/kdb_main.c cp++; cp 833 kernel/debug/kdb/kdb_main.c if (!str_has_prefix(cp, "grep ")) { cp 837 kernel/debug/kdb/kdb_main.c cp += 5; cp 838 kernel/debug/kdb/kdb_main.c while (isspace(*cp)) cp 839 kernel/debug/kdb/kdb_main.c cp++; cp 840 kernel/debug/kdb/kdb_main.c cp2 = strchr(cp, '\n'); cp 843 kernel/debug/kdb/kdb_main.c len = strlen(cp); cp 849 kernel/debug/kdb/kdb_main.c if (*cp == '"') { cp 852 kernel/debug/kdb/kdb_main.c cp++; cp 853 kernel/debug/kdb/kdb_main.c cp2 = strchr(cp, '"'); cp 861 kernel/debug/kdb/kdb_main.c if (*cp == '^') { cp 863 kernel/debug/kdb/kdb_main.c cp++; cp 865 kernel/debug/kdb/kdb_main.c len = strlen(cp); cp 867 kernel/debug/kdb/kdb_main.c if (*(cp+len-1) == '$') { cp 869 kernel/debug/kdb/kdb_main.c *(cp+len-1) = '\0'; cp 871 kernel/debug/kdb/kdb_main.c len = strlen(cp); cp 878 kernel/debug/kdb/kdb_main.c strcpy(kdb_grep_string, cp); cp 916 kernel/debug/kdb/kdb_main.c char *cp; cp 924 kernel/debug/kdb/kdb_main.c cp = (char *)cmdstr; cp 934 kernel/debug/kdb/kdb_main.c if (*cp != '\n' && *cp != '\0') { cp 937 kernel/debug/kdb/kdb_main.c while (*cp) { cp 939 kernel/debug/kdb/kdb_main.c while (isspace(*cp)) cp 940 kernel/debug/kdb/kdb_main.c cp++; cp 941 kernel/debug/kdb/kdb_main.c if ((*cp == '\0') || (*cp == '\n') || cp 942 kernel/debug/kdb/kdb_main.c (*cp == '#' && !defcmd_in_progress)) cp 945 kernel/debug/kdb/kdb_main.c if (*cp == '|') { cp 965 kernel/debug/kdb/kdb_main.c while (*cp && *cp != '\n' && cp 966 kernel/debug/kdb/kdb_main.c (escaped || quoted || !isspace(*cp))) { cp 971 kernel/debug/kdb/kdb_main.c *cpp++ = *cp++; cp 974 kernel/debug/kdb/kdb_main.c if (*cp == '\\') { cp 976 kernel/debug/kdb/kdb_main.c ++cp; cp 979 kernel/debug/kdb/kdb_main.c if (*cp == quoted) cp 981 kernel/debug/kdb/kdb_main.c else if (*cp == '\'' || *cp == '"') cp 982 kernel/debug/kdb/kdb_main.c quoted = *cp; cp 983 kernel/debug/kdb/kdb_main.c *cpp = *cp++; cp 994 kernel/debug/kdb/kdb_main.c parse_grep(cp); cp 1533 kernel/debug/kdb/kdb_main.c unsigned char *cp; cp 1535 kernel/debug/kdb/kdb_main.c cp = wc.c + 8 - bytesperword; cp 1537 kernel/debug/kdb/kdb_main.c cp = wc.c; cp 1543 kernel/debug/kdb/kdb_main.c *c++ = printable_char(*cp++); cp 2107 kernel/debug/kdb/kdb_main.c char *cp; cp 2108 kernel/debug/kdb/kdb_main.c lines = simple_strtol(argv[1], &cp, 0); cp 2109 kernel/debug/kdb/kdb_main.c if (*cp) cp 2112 kernel/debug/kdb/kdb_main.c adjust = simple_strtoul(argv[2], &cp, 0); cp 2113 kernel/debug/kdb/kdb_main.c if (*cp || adjust < 0) cp 262 kernel/rcu/tree_stall.h static void print_cpu_stall_fast_no_hz(char *cp, int cpu) cp 266 kernel/rcu/tree_stall.h sprintf(cp, "last_accelerate: %04lx/%04lx, Nonlazy posted: %c%c%c", cp 275 kernel/rcu/tree_stall.h static void print_cpu_stall_fast_no_hz(char *cp, int cpu) cp 277 kernel/rcu/tree_stall.h *cp = '\0'; cp 26 kernel/sched/cpudeadline.c static void cpudl_heapify_down(struct cpudl *cp, int idx) cp 30 kernel/sched/cpudeadline.c int orig_cpu = cp->elements[idx].cpu; cp 31 kernel/sched/cpudeadline.c u64 orig_dl = cp->elements[idx].dl; cp 33 kernel/sched/cpudeadline.c if (left_child(idx) >= cp->size) cp 45 kernel/sched/cpudeadline.c if ((l < cp->size) && dl_time_before(orig_dl, cp 46 kernel/sched/cpudeadline.c cp->elements[l].dl)) { cp 48 kernel/sched/cpudeadline.c largest_dl = cp->elements[l].dl; cp 50 kernel/sched/cpudeadline.c if ((r < cp->size) && dl_time_before(largest_dl, cp 51 kernel/sched/cpudeadline.c cp->elements[r].dl)) cp 58 kernel/sched/cpudeadline.c cp->elements[idx].cpu = cp->elements[largest].cpu; cp 59 kernel/sched/cpudeadline.c cp->elements[idx].dl = cp->elements[largest].dl; cp 60 kernel/sched/cpudeadline.c cp->elements[cp->elements[idx].cpu].idx = idx; cp 64 kernel/sched/cpudeadline.c cp->elements[idx].cpu = orig_cpu; cp 65 kernel/sched/cpudeadline.c cp->elements[idx].dl = orig_dl; cp 66 kernel/sched/cpudeadline.c cp->elements[cp->elements[idx].cpu].idx = idx; cp 69 kernel/sched/cpudeadline.c static void cpudl_heapify_up(struct cpudl *cp, int idx) cp 73 kernel/sched/cpudeadline.c int orig_cpu = cp->elements[idx].cpu; cp 74 kernel/sched/cpudeadline.c u64 orig_dl = cp->elements[idx].dl; cp 81 kernel/sched/cpudeadline.c if (dl_time_before(orig_dl, cp->elements[p].dl)) cp 84 kernel/sched/cpudeadline.c cp->elements[idx].cpu = cp->elements[p].cpu; cp 85 kernel/sched/cpudeadline.c cp->elements[idx].dl = cp->elements[p].dl; cp 86 kernel/sched/cpudeadline.c cp->elements[cp->elements[idx].cpu].idx = idx; cp 90 kernel/sched/cpudeadline.c cp->elements[idx].cpu = orig_cpu; cp 91 kernel/sched/cpudeadline.c cp->elements[idx].dl = orig_dl; cp 92 kernel/sched/cpudeadline.c cp->elements[cp->elements[idx].cpu].idx = idx; cp 95 kernel/sched/cpudeadline.c static void cpudl_heapify(struct cpudl *cp, int idx) cp 97 kernel/sched/cpudeadline.c if (idx > 0 && dl_time_before(cp->elements[parent(idx)].dl, cp 98 kernel/sched/cpudeadline.c cp->elements[idx].dl)) cp 99 kernel/sched/cpudeadline.c cpudl_heapify_up(cp, idx); cp 101 kernel/sched/cpudeadline.c cpudl_heapify_down(cp, idx); cp 104 kernel/sched/cpudeadline.c static inline int cpudl_maximum(struct cpudl *cp) cp 106 kernel/sched/cpudeadline.c return cp->elements[0].cpu; cp 117 kernel/sched/cpudeadline.c int cpudl_find(struct cpudl *cp, struct task_struct *p, cp 123 kernel/sched/cpudeadline.c cpumask_and(later_mask, cp->free_cpus, p->cpus_ptr)) { cp 126 kernel/sched/cpudeadline.c int best_cpu = cpudl_maximum(cp); cp 131 kernel/sched/cpudeadline.c dl_time_before(dl_se->deadline, cp->elements[0].dl)) { cp 150 kernel/sched/cpudeadline.c void cpudl_clear(struct cpudl *cp, int cpu) cp 157 kernel/sched/cpudeadline.c raw_spin_lock_irqsave(&cp->lock, flags); cp 159 kernel/sched/cpudeadline.c old_idx = cp->elements[cpu].idx; cp 167 kernel/sched/cpudeadline.c new_cpu = cp->elements[cp->size - 1].cpu; cp 168 kernel/sched/cpudeadline.c cp->elements[old_idx].dl = cp->elements[cp->size - 1].dl; cp 169 kernel/sched/cpudeadline.c cp->elements[old_idx].cpu = new_cpu; cp 170 kernel/sched/cpudeadline.c cp->size--; cp 171 kernel/sched/cpudeadline.c cp->elements[new_cpu].idx = old_idx; cp 172 kernel/sched/cpudeadline.c cp->elements[cpu].idx = IDX_INVALID; cp 173 kernel/sched/cpudeadline.c cpudl_heapify(cp, old_idx); cp 175 kernel/sched/cpudeadline.c cpumask_set_cpu(cpu, cp->free_cpus); cp 177 kernel/sched/cpudeadline.c raw_spin_unlock_irqrestore(&cp->lock, flags); cp 190 kernel/sched/cpudeadline.c void cpudl_set(struct cpudl *cp, int cpu, u64 dl) cp 197 kernel/sched/cpudeadline.c raw_spin_lock_irqsave(&cp->lock, flags); cp 199 kernel/sched/cpudeadline.c old_idx = cp->elements[cpu].idx; cp 201 kernel/sched/cpudeadline.c int new_idx = cp->size++; cp 203 kernel/sched/cpudeadline.c cp->elements[new_idx].dl = dl; cp 204 kernel/sched/cpudeadline.c cp->elements[new_idx].cpu = cpu; cp 205 kernel/sched/cpudeadline.c cp->elements[cpu].idx = new_idx; cp 206 kernel/sched/cpudeadline.c cpudl_heapify_up(cp, new_idx); cp 207 kernel/sched/cpudeadline.c cpumask_clear_cpu(cpu, cp->free_cpus); cp 209 kernel/sched/cpudeadline.c cp->elements[old_idx].dl = dl; cp 210 kernel/sched/cpudeadline.c cpudl_heapify(cp, old_idx); cp 213 kernel/sched/cpudeadline.c raw_spin_unlock_irqrestore(&cp->lock, flags); cp 221 kernel/sched/cpudeadline.c void cpudl_set_freecpu(struct cpudl *cp, int cpu) cp 223 kernel/sched/cpudeadline.c cpumask_set_cpu(cpu, cp->free_cpus); cp 231 kernel/sched/cpudeadline.c void cpudl_clear_freecpu(struct cpudl *cp, int cpu) cp 233 kernel/sched/cpudeadline.c cpumask_clear_cpu(cpu, cp->free_cpus); cp 240 kernel/sched/cpudeadline.c int cpudl_init(struct cpudl *cp) cp 244 kernel/sched/cpudeadline.c raw_spin_lock_init(&cp->lock); cp 245 kernel/sched/cpudeadline.c cp->size = 0; cp 247 kernel/sched/cpudeadline.c cp->elements = kcalloc(nr_cpu_ids, cp 250 kernel/sched/cpudeadline.c if (!cp->elements) cp 253 kernel/sched/cpudeadline.c if (!zalloc_cpumask_var(&cp->free_cpus, GFP_KERNEL)) { cp 254 kernel/sched/cpudeadline.c kfree(cp->elements); cp 259 kernel/sched/cpudeadline.c cp->elements[i].idx = IDX_INVALID; cp 268 kernel/sched/cpudeadline.c void cpudl_cleanup(struct cpudl *cp) cp 270 kernel/sched/cpudeadline.c free_cpumask_var(cp->free_cpus); cp 271 kernel/sched/cpudeadline.c kfree(cp->elements); cp 19 kernel/sched/cpudeadline.h int cpudl_find(struct cpudl *cp, struct task_struct *p, struct cpumask *later_mask); cp 20 kernel/sched/cpudeadline.h void cpudl_set(struct cpudl *cp, int cpu, u64 dl); cp 21 kernel/sched/cpudeadline.h void cpudl_clear(struct cpudl *cp, int cpu); cp 22 kernel/sched/cpudeadline.h int cpudl_init(struct cpudl *cp); cp 23 kernel/sched/cpudeadline.h void cpudl_set_freecpu(struct cpudl *cp, int cpu); cp 24 kernel/sched/cpudeadline.h void cpudl_clear_freecpu(struct cpudl *cp, int cpu); cp 25 kernel/sched/cpudeadline.h void cpudl_cleanup(struct cpudl *cp); cp 59 kernel/sched/cpupri.c int cpupri_find(struct cpupri *cp, struct task_struct *p, cp 68 kernel/sched/cpupri.c struct cpupri_vec *vec = &cp->pri_to_cpu[idx]; cp 131 kernel/sched/cpupri.c void cpupri_set(struct cpupri *cp, int cpu, int newpri) cp 133 kernel/sched/cpupri.c int *currpri = &cp->cpu_to_pri[cpu]; cp 151 kernel/sched/cpupri.c struct cpupri_vec *vec = &cp->pri_to_cpu[newpri]; cp 164 kernel/sched/cpupri.c struct cpupri_vec *vec = &cp->pri_to_cpu[oldpri]; cp 199 kernel/sched/cpupri.c int cpupri_init(struct cpupri *cp) cp 204 kernel/sched/cpupri.c struct cpupri_vec *vec = &cp->pri_to_cpu[i]; cp 211 kernel/sched/cpupri.c cp->cpu_to_pri = kcalloc(nr_cpu_ids, sizeof(int), GFP_KERNEL); cp 212 kernel/sched/cpupri.c if (!cp->cpu_to_pri) cp 216 kernel/sched/cpupri.c cp->cpu_to_pri[i] = CPUPRI_INVALID; cp 222 kernel/sched/cpupri.c free_cpumask_var(cp->pri_to_cpu[i].mask); cp 230 kernel/sched/cpupri.c void cpupri_cleanup(struct cpupri *cp) cp 234 kernel/sched/cpupri.c kfree(cp->cpu_to_pri); cp 236 kernel/sched/cpupri.c free_cpumask_var(cp->pri_to_cpu[i].mask); cp 21 kernel/sched/cpupri.h int cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask); cp 22 kernel/sched/cpupri.h void cpupri_set(struct cpupri *cp, int cpu, int pri); cp 23 kernel/sched/cpupri.h int cpupri_init(struct cpupri *cp); cp 24 kernel/sched/cpupri.h void cpupri_cleanup(struct cpupri *cp); cp 2162 kernel/sysctl.c static int strtoul_lenient(const char *cp, char **endp, unsigned int base, cp 2168 kernel/sysctl.c cp = _parse_integer_fixup_radix(cp, &base); cp 2169 kernel/sysctl.c rv = _parse_integer(cp, base, &result); cp 2173 kernel/sysctl.c cp += rv; cp 2176 kernel/sysctl.c *endp = (char *)cp; cp 99 kernel/trace/trace_kdb.c char *cp; cp 107 kernel/trace/trace_kdb.c skip_entries = simple_strtol(argv[1], &cp, 0); cp 108 kernel/trace/trace_kdb.c if (*cp) cp 113 kernel/trace/trace_kdb.c cpu_file = simple_strtol(argv[2], &cp, 0); cp 114 kernel/trace/trace_kdb.c if (*cp || cpu_file >= NR_CPUS || cpu_file < 0 || cp 61 lib/vsprintf.c unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) cp 66 lib/vsprintf.c cp = _parse_integer_fixup_radix(cp, &base); cp 67 lib/vsprintf.c rv = _parse_integer(cp, base, &result); cp 69 lib/vsprintf.c cp += (rv & ~KSTRTOX_OVERFLOW); cp 72 lib/vsprintf.c *endp = (char *)cp; cp 86 lib/vsprintf.c unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base) cp 88 lib/vsprintf.c return simple_strtoull(cp, endp, base); cp 100 lib/vsprintf.c long simple_strtol(const char *cp, char **endp, unsigned int base) cp 102 lib/vsprintf.c if (*cp == '-') cp 103 lib/vsprintf.c return -simple_strtoul(cp + 1, endp, base); cp 105 lib/vsprintf.c return simple_strtoul(cp, endp, base); cp 117 lib/vsprintf.c long long simple_strtoll(const char *cp, char **endp, unsigned int base) cp 119 lib/vsprintf.c if (*cp == '-') cp 120 lib/vsprintf.c return -simple_strtoull(cp + 1, endp, base); cp 122 lib/vsprintf.c return simple_strtoull(cp, endp, base); cp 3413 lib/zstd/compress.c ZSTD_compressionParameters cp; cp 3421 lib/zstd/compress.c cp = ZSTD_defaultCParameters[tableID][compressionLevel]; cp 3423 lib/zstd/compress.c if (cp.windowLog > ZSTD_WINDOWLOG_MAX) cp 3424 lib/zstd/compress.c cp.windowLog = ZSTD_WINDOWLOG_MAX; cp 3425 lib/zstd/compress.c if (cp.chainLog > ZSTD_CHAINLOG_MAX) cp 3426 lib/zstd/compress.c cp.chainLog = ZSTD_CHAINLOG_MAX; cp 3427 lib/zstd/compress.c if (cp.hashLog > ZSTD_HASHLOG_MAX) cp 3428 lib/zstd/compress.c cp.hashLog = ZSTD_HASHLOG_MAX; cp 3430 lib/zstd/compress.c cp = ZSTD_adjustCParams(cp, srcSize, dictSize); cp 3431 lib/zstd/compress.c return cp; cp 255 net/bluetooth/amp.c struct hci_cp_read_local_amp_assoc cp; cp 262 net/bluetooth/amp.c cp.phy_handle = phy_handle; cp 263 net/bluetooth/amp.c cp.max_len = cpu_to_le16(hdev->amp_assoc_size); cp 264 net/bluetooth/amp.c cp.len_so_far = cpu_to_le16(loc_assoc->offset); cp 267 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); cp 275 net/bluetooth/amp.c struct hci_cp_read_local_amp_assoc cp; cp 280 net/bluetooth/amp.c memset(&cp, 0, sizeof(cp)); cp 282 net/bluetooth/amp.c cp.max_len = cpu_to_le16(hdev->amp_assoc_size); cp 286 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); cp 295 net/bluetooth/amp.c struct hci_cp_read_local_amp_assoc cp; cp 300 net/bluetooth/amp.c cp.phy_handle = hcon->handle; cp 301 net/bluetooth/amp.c cp.len_so_far = cpu_to_le16(0); cp 302 net/bluetooth/amp.c cp.max_len = cpu_to_le16(hdev->amp_assoc_size); cp 308 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); cp 332 net/bluetooth/amp.c struct hci_cp_write_remote_amp_assoc *cp; cp 352 net/bluetooth/amp.c len = frag_len + sizeof(*cp); cp 354 net/bluetooth/amp.c cp = kzalloc(len, GFP_KERNEL); cp 355 net/bluetooth/amp.c if (!cp) { cp 363 net/bluetooth/amp.c cp->phy_handle = hcon->handle; cp 364 net/bluetooth/amp.c cp->len_so_far = cpu_to_le16(ctrl->assoc_len_so_far); cp 365 net/bluetooth/amp.c cp->rem_len = cpu_to_le16(ctrl->assoc_rem_len); cp 366 net/bluetooth/amp.c memcpy(cp->frag, ctrl->assoc, frag_len); cp 374 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_WRITE_REMOTE_AMP_ASSOC, len, cp); cp 377 net/bluetooth/amp.c kfree(cp); cp 415 net/bluetooth/amp.c struct hci_cp_create_phy_link *cp; cp 419 net/bluetooth/amp.c cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_PHY_LINK); cp 420 net/bluetooth/amp.c if (!cp) cp 428 net/bluetooth/amp.c hcon = hci_conn_hash_lookup_handle(hdev, cp->phy_handle); cp 432 net/bluetooth/amp.c amp_write_remote_assoc(hdev, cp->phy_handle); cp 441 net/bluetooth/amp.c struct hci_cp_create_phy_link cp; cp 444 net/bluetooth/amp.c cp.phy_handle = hcon->handle; cp 449 net/bluetooth/amp.c if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, cp 450 net/bluetooth/amp.c &cp.key_type)) { cp 456 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_CREATE_PHY_LINK, sizeof(cp), &cp); cp 463 net/bluetooth/amp.c struct hci_cp_accept_phy_link *cp; cp 470 net/bluetooth/amp.c cp = hci_sent_cmd_data(hdev, HCI_OP_ACCEPT_PHY_LINK); cp 471 net/bluetooth/amp.c if (!cp) cp 474 net/bluetooth/amp.c amp_write_remote_assoc(hdev, cp->phy_handle); cp 480 net/bluetooth/amp.c struct hci_cp_accept_phy_link cp; cp 483 net/bluetooth/amp.c cp.phy_handle = hcon->handle; cp 488 net/bluetooth/amp.c if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, cp 489 net/bluetooth/amp.c &cp.key_type)) { cp 495 net/bluetooth/amp.c hci_req_add(&req, HCI_OP_ACCEPT_PHY_LINK, sizeof(cp), &cp); cp 530 net/bluetooth/amp.c struct hci_cp_create_accept_logical_link cp; cp 543 net/bluetooth/amp.c cp.phy_handle = hs_hcon->handle; cp 545 net/bluetooth/amp.c cp.tx_flow_spec.id = chan->local_id; cp 546 net/bluetooth/amp.c cp.tx_flow_spec.stype = chan->local_stype; cp 547 net/bluetooth/amp.c cp.tx_flow_spec.msdu = cpu_to_le16(chan->local_msdu); cp 548 net/bluetooth/amp.c cp.tx_flow_spec.sdu_itime = cpu_to_le32(chan->local_sdu_itime); cp 549 net/bluetooth/amp.c cp.tx_flow_spec.acc_lat = cpu_to_le32(chan->local_acc_lat); cp 550 net/bluetooth/amp.c cp.tx_flow_spec.flush_to = cpu_to_le32(chan->local_flush_to); cp 552 net/bluetooth/amp.c cp.rx_flow_spec.id = chan->remote_id; cp 553 net/bluetooth/amp.c cp.rx_flow_spec.stype = chan->remote_stype; cp 554 net/bluetooth/amp.c cp.rx_flow_spec.msdu = cpu_to_le16(chan->remote_msdu); cp 555 net/bluetooth/amp.c cp.rx_flow_spec.sdu_itime = cpu_to_le32(chan->remote_sdu_itime); cp 556 net/bluetooth/amp.c cp.rx_flow_spec.acc_lat = cpu_to_le32(chan->remote_acc_lat); cp 557 net/bluetooth/amp.c cp.rx_flow_spec.flush_to = cpu_to_le32(chan->remote_flush_to); cp 560 net/bluetooth/amp.c hci_send_cmd(hdev, HCI_OP_CREATE_LOGICAL_LINK, sizeof(cp), cp 561 net/bluetooth/amp.c &cp); cp 563 net/bluetooth/amp.c hci_send_cmd(hdev, HCI_OP_ACCEPT_LOGICAL_LINK, sizeof(cp), cp 564 net/bluetooth/amp.c &cp); cp 572 net/bluetooth/amp.c struct hci_cp_disconn_logical_link cp; cp 579 net/bluetooth/amp.c cp.log_handle = cpu_to_le16(hchan->handle); cp 580 net/bluetooth/amp.c hci_send_cmd(hcon->hdev, HCI_OP_DISCONN_LOGICAL_LINK, sizeof(cp), &cp); cp 192 net/bluetooth/hci_conn.c struct hci_cp_create_conn cp; cp 204 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 205 net/bluetooth/hci_conn.c bacpy(&cp.bdaddr, &conn->dst); cp 206 net/bluetooth/hci_conn.c cp.pscan_rep_mode = 0x02; cp 211 net/bluetooth/hci_conn.c cp.pscan_rep_mode = ie->data.pscan_rep_mode; cp 212 net/bluetooth/hci_conn.c cp.pscan_mode = ie->data.pscan_mode; cp 213 net/bluetooth/hci_conn.c cp.clock_offset = ie->data.clock_offset | cp 222 net/bluetooth/hci_conn.c cp.pkt_type = cpu_to_le16(conn->pkt_type); cp 224 net/bluetooth/hci_conn.c cp.role_switch = 0x01; cp 226 net/bluetooth/hci_conn.c cp.role_switch = 0x00; cp 228 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); cp 256 net/bluetooth/hci_conn.c struct hci_cp_add_sco cp; cp 265 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(handle); cp 266 net/bluetooth/hci_conn.c cp.pkt_type = cpu_to_le16(conn->pkt_type); cp 268 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_ADD_SCO, sizeof(cp), &cp); cp 274 net/bluetooth/hci_conn.c struct hci_cp_setup_sync_conn cp; cp 284 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(handle); cp 286 net/bluetooth/hci_conn.c cp.tx_bandwidth = cpu_to_le32(0x00001f40); cp 287 net/bluetooth/hci_conn.c cp.rx_bandwidth = cpu_to_le32(0x00001f40); cp 288 net/bluetooth/hci_conn.c cp.voice_setting = cpu_to_le16(conn->setting); cp 311 net/bluetooth/hci_conn.c cp.retrans_effort = param->retrans_effort; cp 312 net/bluetooth/hci_conn.c cp.pkt_type = __cpu_to_le16(param->pkt_type); cp 313 net/bluetooth/hci_conn.c cp.max_latency = __cpu_to_le16(param->max_latency); cp 315 net/bluetooth/hci_conn.c if (hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp) < 0) cp 326 net/bluetooth/hci_conn.c struct hci_cp_le_conn_update cp; cp 340 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 341 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 342 net/bluetooth/hci_conn.c cp.conn_interval_min = cpu_to_le16(min); cp 343 net/bluetooth/hci_conn.c cp.conn_interval_max = cpu_to_le16(max); cp 344 net/bluetooth/hci_conn.c cp.conn_latency = cpu_to_le16(latency); cp 345 net/bluetooth/hci_conn.c cp.supervision_timeout = cpu_to_le16(to_multiplier); cp 346 net/bluetooth/hci_conn.c cp.min_ce_len = cpu_to_le16(0x0000); cp 347 net/bluetooth/hci_conn.c cp.max_ce_len = cpu_to_le16(0x0000); cp 349 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_LE_CONN_UPDATE, sizeof(cp), &cp); cp 361 net/bluetooth/hci_conn.c struct hci_cp_le_start_enc cp; cp 365 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 367 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 368 net/bluetooth/hci_conn.c cp.rand = rand; cp 369 net/bluetooth/hci_conn.c cp.ediv = ediv; cp 370 net/bluetooth/hci_conn.c memcpy(cp.ltk, ltk, key_size); cp 372 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp); cp 442 net/bluetooth/hci_conn.c struct hci_cp_sniff_subrate cp; cp 443 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 444 net/bluetooth/hci_conn.c cp.max_latency = cpu_to_le16(0); cp 445 net/bluetooth/hci_conn.c cp.min_remote_timeout = cpu_to_le16(0); cp 446 net/bluetooth/hci_conn.c cp.min_local_timeout = cpu_to_le16(0); cp 447 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); cp 451 net/bluetooth/hci_conn.c struct hci_cp_sniff_mode cp; cp 452 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 453 net/bluetooth/hci_conn.c cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); cp 454 net/bluetooth/hci_conn.c cp.min_interval = cpu_to_le16(hdev->sniff_min_interval); cp 455 net/bluetooth/hci_conn.c cp.attempt = cpu_to_le16(4); cp 456 net/bluetooth/hci_conn.c cp.timeout = cpu_to_le16(1); cp 457 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_SNIFF_MODE, sizeof(cp), &cp); cp 801 net/bluetooth/hci_conn.c struct hci_cp_le_ext_create_conn *cp; cp 803 net/bluetooth/hci_conn.c u8 data[sizeof(*cp) + sizeof(*p) * 3]; cp 806 net/bluetooth/hci_conn.c cp = (void *) data; cp 807 net/bluetooth/hci_conn.c p = (void *) cp->data; cp 809 net/bluetooth/hci_conn.c memset(cp, 0, sizeof(*cp)); cp 811 net/bluetooth/hci_conn.c bacpy(&cp->peer_addr, &conn->dst); cp 812 net/bluetooth/hci_conn.c cp->peer_addr_type = conn->dst_type; cp 813 net/bluetooth/hci_conn.c cp->own_addr_type = own_addr_type; cp 815 net/bluetooth/hci_conn.c plen = sizeof(*cp); cp 818 net/bluetooth/hci_conn.c cp->phys |= LE_SCAN_PHY_1M; cp 826 net/bluetooth/hci_conn.c cp->phys |= LE_SCAN_PHY_2M; cp 834 net/bluetooth/hci_conn.c cp->phys |= LE_SCAN_PHY_CODED; cp 843 net/bluetooth/hci_conn.c struct hci_cp_le_create_conn cp; cp 845 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 850 net/bluetooth/hci_conn.c cp.scan_interval = cpu_to_le16(hdev->le_scan_interval); cp 851 net/bluetooth/hci_conn.c cp.scan_window = cp.scan_interval; cp 853 net/bluetooth/hci_conn.c bacpy(&cp.peer_addr, &conn->dst); cp 854 net/bluetooth/hci_conn.c cp.peer_addr_type = conn->dst_type; cp 855 net/bluetooth/hci_conn.c cp.own_address_type = own_addr_type; cp 856 net/bluetooth/hci_conn.c cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); cp 857 net/bluetooth/hci_conn.c cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); cp 858 net/bluetooth/hci_conn.c cp.conn_latency = cpu_to_le16(conn->le_conn_latency); cp 859 net/bluetooth/hci_conn.c cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); cp 860 net/bluetooth/hci_conn.c cp.min_ce_len = cpu_to_le16(0x0000); cp 861 net/bluetooth/hci_conn.c cp.max_ce_len = cpu_to_le16(0x0000); cp 863 net/bluetooth/hci_conn.c hci_req_add(req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); cp 878 net/bluetooth/hci_conn.c struct hci_cp_le_set_ext_adv_params cp; cp 888 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 890 net/bluetooth/hci_conn.c cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); cp 891 net/bluetooth/hci_conn.c cp.own_addr_type = own_addr_type; cp 892 net/bluetooth/hci_conn.c cp.channel_map = hdev->le_adv_channel_map; cp 893 net/bluetooth/hci_conn.c cp.tx_power = HCI_TX_POWER_INVALID; cp 894 net/bluetooth/hci_conn.c cp.primary_phy = HCI_ADV_PHY_1M; cp 895 net/bluetooth/hci_conn.c cp.secondary_phy = HCI_ADV_PHY_1M; cp 896 net/bluetooth/hci_conn.c cp.handle = 0; /* Use instance 0 for directed adv */ cp 897 net/bluetooth/hci_conn.c cp.own_addr_type = own_addr_type; cp 898 net/bluetooth/hci_conn.c cp.peer_addr_type = conn->dst_type; cp 899 net/bluetooth/hci_conn.c bacpy(&cp.peer_addr, &conn->dst); cp 901 net/bluetooth/hci_conn.c hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(cp), &cp); cp 906 net/bluetooth/hci_conn.c struct hci_cp_le_set_adv_set_rand_addr cp; cp 908 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 910 net/bluetooth/hci_conn.c cp.handle = 0; cp 911 net/bluetooth/hci_conn.c bacpy(&cp.bdaddr, &random_addr); cp 915 net/bluetooth/hci_conn.c sizeof(cp), &cp); cp 920 net/bluetooth/hci_conn.c struct hci_cp_le_set_adv_param cp; cp 936 net/bluetooth/hci_conn.c memset(&cp, 0, sizeof(cp)); cp 942 net/bluetooth/hci_conn.c cp.min_interval = cpu_to_le16(0x0020); cp 943 net/bluetooth/hci_conn.c cp.max_interval = cpu_to_le16(0x0020); cp 945 net/bluetooth/hci_conn.c cp.type = LE_ADV_DIRECT_IND; cp 946 net/bluetooth/hci_conn.c cp.own_address_type = own_addr_type; cp 947 net/bluetooth/hci_conn.c cp.direct_addr_type = conn->dst_type; cp 948 net/bluetooth/hci_conn.c bacpy(&cp.direct_addr, &conn->dst); cp 949 net/bluetooth/hci_conn.c cp.channel_map = hdev->le_adv_channel_map; cp 951 net/bluetooth/hci_conn.c hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); cp 1314 net/bluetooth/hci_conn.c struct hci_cp_auth_requested cp; cp 1316 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 1318 net/bluetooth/hci_conn.c sizeof(cp), &cp); cp 1338 net/bluetooth/hci_conn.c struct hci_cp_set_conn_encrypt cp; cp 1339 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 1340 net/bluetooth/hci_conn.c cp.encrypt = 0x01; cp 1341 net/bluetooth/hci_conn.c hci_send_cmd(conn->hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), cp 1342 net/bluetooth/hci_conn.c &cp); cp 1452 net/bluetooth/hci_conn.c struct hci_cp_switch_role cp; cp 1453 net/bluetooth/hci_conn.c bacpy(&cp.bdaddr, &conn->dst); cp 1454 net/bluetooth/hci_conn.c cp.role = role; cp 1455 net/bluetooth/hci_conn.c hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp); cp 1476 net/bluetooth/hci_conn.c struct hci_cp_exit_sniff_mode cp; cp 1477 net/bluetooth/hci_conn.c cp.handle = cpu_to_le16(conn->handle); cp 1478 net/bluetooth/hci_conn.c hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); cp 457 net/bluetooth/hci_core.c struct hci_cp_write_eir cp; cp 460 net/bluetooth/hci_core.c memset(&cp, 0, sizeof(cp)); cp 462 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_WRITE_EIR, sizeof(cp), &cp); cp 483 net/bluetooth/hci_core.c struct hci_cp_read_local_ext_features cp; cp 485 net/bluetooth/hci_core.c cp.page = 0x01; cp 487 net/bluetooth/hci_core.c sizeof(cp), &cp); cp 502 net/bluetooth/hci_core.c struct hci_cp_write_def_link_policy cp; cp 514 net/bluetooth/hci_core.c cp.policy = cpu_to_le16(link_policy); cp 515 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_WRITE_DEF_LINK_POLICY, sizeof(cp), &cp); cp 521 net/bluetooth/hci_core.c struct hci_cp_write_le_host_supported cp; cp 527 net/bluetooth/hci_core.c memset(&cp, 0, sizeof(cp)); cp 530 net/bluetooth/hci_core.c cp.le = 0x01; cp 531 net/bluetooth/hci_core.c cp.simul = 0x00; cp 534 net/bluetooth/hci_core.c if (cp.le != lmp_host_le_capable(hdev)) cp 535 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_WRITE_LE_HOST_SUPPORTED, sizeof(cp), cp 536 net/bluetooth/hci_core.c &cp); cp 593 net/bluetooth/hci_core.c struct hci_cp_read_stored_link_key cp; cp 595 net/bluetooth/hci_core.c bacpy(&cp.bdaddr, BDADDR_ANY); cp 596 net/bluetooth/hci_core.c cp.read_all = 0x01; cp 597 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_READ_STORED_LINK_KEY, sizeof(cp), &cp); cp 779 net/bluetooth/hci_core.c struct hci_cp_read_local_ext_features cp; cp 781 net/bluetooth/hci_core.c cp.page = p; cp 783 net/bluetooth/hci_core.c sizeof(cp), &cp); cp 808 net/bluetooth/hci_core.c struct hci_cp_delete_stored_link_key cp; cp 810 net/bluetooth/hci_core.c bacpy(&cp.bdaddr, BDADDR_ANY); cp 811 net/bluetooth/hci_core.c cp.delete_all = 0x01; cp 813 net/bluetooth/hci_core.c sizeof(cp), &cp); cp 843 net/bluetooth/hci_core.c struct hci_cp_le_write_def_data_len cp; cp 845 net/bluetooth/hci_core.c cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); cp 846 net/bluetooth/hci_core.c cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); cp 847 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_LE_WRITE_DEF_DATA_LEN, sizeof(cp), &cp); cp 852 net/bluetooth/hci_core.c struct hci_cp_le_set_default_phy cp; cp 854 net/bluetooth/hci_core.c cp.all_phys = 0x00; cp 855 net/bluetooth/hci_core.c cp.tx_phys = hdev->le_tx_def_phys; cp 856 net/bluetooth/hci_core.c cp.rx_phys = hdev->le_rx_def_phys; cp 858 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_LE_SET_DEFAULT_PHY, sizeof(cp), &cp); cp 1248 net/bluetooth/hci_core.c struct hci_cp_inquiry cp; cp 1256 net/bluetooth/hci_core.c memcpy(&cp.lap, &ir->lap, 3); cp 1257 net/bluetooth/hci_core.c cp.length = ir->length; cp 1258 net/bluetooth/hci_core.c cp.num_rsp = ir->num_rsp; cp 1259 net/bluetooth/hci_core.c hci_req_add(req, HCI_OP_INQUIRY, sizeof(cp), &cp); cp 837 net/bluetooth/hci_event.c struct hci_cp_read_clock *cp; cp 850 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_READ_CLOCK); cp 851 net/bluetooth/hci_event.c if (!cp) cp 854 net/bluetooth/hci_event.c if (cp->which == 0x00) { cp 907 net/bluetooth/hci_event.c struct hci_cp_pin_code_reply *cp; cp 920 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_PIN_CODE_REPLY); cp 921 net/bluetooth/hci_event.c if (!cp) cp 924 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); cp 926 net/bluetooth/hci_event.c conn->pin_length = cp->pin_len; cp 1093 net/bluetooth/hci_event.c struct hci_cp_le_set_default_phy *cp; cp 1100 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_DEFAULT_PHY); cp 1101 net/bluetooth/hci_event.c if (!cp) cp 1106 net/bluetooth/hci_event.c hdev->le_tx_def_phys = cp->tx_phys; cp 1107 net/bluetooth/hci_event.c hdev->le_rx_def_phys = cp->rx_phys; cp 1116 net/bluetooth/hci_event.c struct hci_cp_le_set_adv_set_rand_addr *cp; cp 1122 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_ADV_SET_RAND_ADDR); cp 1123 net/bluetooth/hci_event.c if (!cp) cp 1130 net/bluetooth/hci_event.c bacpy(&hdev->random_addr, &cp->bdaddr); cp 1135 net/bluetooth/hci_event.c bacpy(&adv_instance->random_addr, &cp->bdaddr); cp 1179 net/bluetooth/hci_event.c struct hci_cp_le_set_ext_adv_enable *cp; cp 1187 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_EXT_ADV_ENABLE); cp 1188 net/bluetooth/hci_event.c if (!cp) cp 1193 net/bluetooth/hci_event.c if (cp->enable) { cp 1212 net/bluetooth/hci_event.c struct hci_cp_le_set_scan_param *cp; cp 1220 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_SCAN_PARAM); cp 1221 net/bluetooth/hci_event.c if (!cp) cp 1226 net/bluetooth/hci_event.c hdev->le_scan_type = cp->type; cp 1234 net/bluetooth/hci_event.c struct hci_cp_le_set_ext_scan_params *cp; cp 1243 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_EXT_SCAN_PARAMS); cp 1244 net/bluetooth/hci_event.c if (!cp) cp 1247 net/bluetooth/hci_event.c phy_param = (void *)cp->data; cp 1345 net/bluetooth/hci_event.c struct hci_cp_le_set_scan_enable *cp; cp 1353 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_SCAN_ENABLE); cp 1354 net/bluetooth/hci_event.c if (!cp) cp 1357 net/bluetooth/hci_event.c le_set_scan_enable_complete(hdev, cp->enable); cp 1363 net/bluetooth/hci_event.c struct hci_cp_le_set_ext_scan_enable *cp; cp 1371 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_EXT_SCAN_ENABLE); cp 1372 net/bluetooth/hci_event.c if (!cp) cp 1375 net/bluetooth/hci_event.c le_set_scan_enable_complete(hdev, cp->enable); cp 1643 net/bluetooth/hci_event.c struct hci_cp_le_set_adv_param *cp; cp 1651 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_ADV_PARAM); cp 1652 net/bluetooth/hci_event.c if (!cp) cp 1656 net/bluetooth/hci_event.c hdev->adv_addr_type = cp->own_address_type; cp 1663 net/bluetooth/hci_event.c struct hci_cp_le_set_ext_adv_params *cp; cp 1671 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_EXT_ADV_PARAMS); cp 1672 net/bluetooth/hci_event.c if (!cp) cp 1676 net/bluetooth/hci_event.c hdev->adv_addr_type = cp->own_addr_type; cp 1773 net/bluetooth/hci_event.c struct hci_cp_create_conn *cp; cp 1778 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_CONN); cp 1779 net/bluetooth/hci_event.c if (!cp) cp 1784 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); cp 1786 net/bluetooth/hci_event.c BT_DBG("%s bdaddr %pMR hcon %p", hdev->name, &cp->bdaddr, conn); cp 1799 net/bluetooth/hci_event.c conn = hci_conn_add(hdev, ACL_LINK, &cp->bdaddr, cp 1811 net/bluetooth/hci_event.c struct hci_cp_add_sco *cp; cp 1820 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_ADD_SCO); cp 1821 net/bluetooth/hci_event.c if (!cp) cp 1824 net/bluetooth/hci_event.c handle = __le16_to_cpu(cp->handle); cp 1846 net/bluetooth/hci_event.c struct hci_cp_auth_requested *cp; cp 1854 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_AUTH_REQUESTED); cp 1855 net/bluetooth/hci_event.c if (!cp) cp 1860 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 1873 net/bluetooth/hci_event.c struct hci_cp_set_conn_encrypt *cp; cp 1881 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_SET_CONN_ENCRYPT); cp 1882 net/bluetooth/hci_event.c if (!cp) cp 1887 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 1923 net/bluetooth/hci_event.c struct hci_cp_remote_name_req cp; cp 1925 net/bluetooth/hci_event.c memset(&cp, 0, sizeof(cp)); cp 1927 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &e->data.bdaddr); cp 1928 net/bluetooth/hci_event.c cp.pscan_rep_mode = e->data.pscan_rep_mode; cp 1929 net/bluetooth/hci_event.c cp.pscan_mode = e->data.pscan_mode; cp 1930 net/bluetooth/hci_event.c cp.clock_offset = e->data.clock_offset; cp 1932 net/bluetooth/hci_event.c return hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); cp 2006 net/bluetooth/hci_event.c struct hci_cp_remote_name_req *cp; cp 2016 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_REMOTE_NAME_REQ); cp 2017 net/bluetooth/hci_event.c if (!cp) cp 2022 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); cp 2025 net/bluetooth/hci_event.c hci_check_pending_name(hdev, conn, &cp->bdaddr, NULL, 0); cp 2049 net/bluetooth/hci_event.c struct hci_cp_read_remote_features *cp; cp 2057 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_READ_REMOTE_FEATURES); cp 2058 net/bluetooth/hci_event.c if (!cp) cp 2063 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2076 net/bluetooth/hci_event.c struct hci_cp_read_remote_ext_features *cp; cp 2084 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_READ_REMOTE_EXT_FEATURES); cp 2085 net/bluetooth/hci_event.c if (!cp) cp 2090 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2103 net/bluetooth/hci_event.c struct hci_cp_setup_sync_conn *cp; cp 2112 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_SETUP_SYNC_CONN); cp 2113 net/bluetooth/hci_event.c if (!cp) cp 2116 net/bluetooth/hci_event.c handle = __le16_to_cpu(cp->handle); cp 2138 net/bluetooth/hci_event.c struct hci_cp_sniff_mode *cp; cp 2146 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_SNIFF_MODE); cp 2147 net/bluetooth/hci_event.c if (!cp) cp 2152 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2165 net/bluetooth/hci_event.c struct hci_cp_exit_sniff_mode *cp; cp 2173 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_EXIT_SNIFF_MODE); cp 2174 net/bluetooth/hci_event.c if (!cp) cp 2179 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2192 net/bluetooth/hci_event.c struct hci_cp_disconnect *cp; cp 2198 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_DISCONNECT); cp 2199 net/bluetooth/hci_event.c if (!cp) cp 2204 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2249 net/bluetooth/hci_event.c struct hci_cp_le_create_conn *cp; cp 2260 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_CREATE_CONN); cp 2261 net/bluetooth/hci_event.c if (!cp) cp 2266 net/bluetooth/hci_event.c cs_le_create_conn(hdev, &cp->peer_addr, cp->peer_addr_type, cp 2267 net/bluetooth/hci_event.c cp->own_address_type, cp->filter_policy); cp 2274 net/bluetooth/hci_event.c struct hci_cp_le_ext_create_conn *cp; cp 2285 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_EXT_CREATE_CONN); cp 2286 net/bluetooth/hci_event.c if (!cp) cp 2291 net/bluetooth/hci_event.c cs_le_create_conn(hdev, &cp->peer_addr, cp->peer_addr_type, cp 2292 net/bluetooth/hci_event.c cp->own_addr_type, cp->filter_policy); cp 2299 net/bluetooth/hci_event.c struct hci_cp_le_read_remote_features *cp; cp 2307 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_READ_REMOTE_FEATURES); cp 2308 net/bluetooth/hci_event.c if (!cp) cp 2313 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2326 net/bluetooth/hci_event.c struct hci_cp_le_start_enc *cp; cp 2336 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_LE_START_ENC); cp 2337 net/bluetooth/hci_event.c if (!cp) cp 2340 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); cp 2356 net/bluetooth/hci_event.c struct hci_cp_switch_role *cp; cp 2364 net/bluetooth/hci_event.c cp = hci_sent_cmd_data(hdev, HCI_OP_SWITCH_ROLE); cp 2365 net/bluetooth/hci_event.c if (!cp) cp 2370 net/bluetooth/hci_event.c conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); cp 2521 net/bluetooth/hci_event.c struct hci_cp_read_remote_features cp; cp 2522 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 2524 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 2531 net/bluetooth/hci_event.c struct hci_cp_change_conn_ptype cp; cp 2532 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 2533 net/bluetooth/hci_event.c cp.pkt_type = cpu_to_le16(conn->pkt_type); cp 2534 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_CHANGE_CONN_PTYPE, sizeof(cp), cp 2535 net/bluetooth/hci_event.c &cp); cp 2561 net/bluetooth/hci_event.c struct hci_cp_reject_conn_req cp; cp 2563 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, bdaddr); cp 2564 net/bluetooth/hci_event.c cp.reason = HCI_ERROR_REJ_BAD_ADDR; cp 2565 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_REJECT_CONN_REQ, sizeof(cp), &cp); cp 2631 net/bluetooth/hci_event.c struct hci_cp_accept_conn_req cp; cp 2634 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 2637 net/bluetooth/hci_event.c cp.role = 0x00; /* Become master */ cp 2639 net/bluetooth/hci_event.c cp.role = 0x01; /* Remain slave */ cp 2641 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp); cp 2643 net/bluetooth/hci_event.c struct hci_cp_accept_sync_conn_req cp; cp 2646 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 2647 net/bluetooth/hci_event.c cp.pkt_type = cpu_to_le16(conn->pkt_type); cp 2649 net/bluetooth/hci_event.c cp.tx_bandwidth = cpu_to_le32(0x00001f40); cp 2650 net/bluetooth/hci_event.c cp.rx_bandwidth = cpu_to_le32(0x00001f40); cp 2651 net/bluetooth/hci_event.c cp.max_latency = cpu_to_le16(0xffff); cp 2652 net/bluetooth/hci_event.c cp.content_format = cpu_to_le16(hdev->voice_setting); cp 2653 net/bluetooth/hci_event.c cp.retrans_effort = 0xff; cp 2655 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_ACCEPT_SYNC_CONN_REQ, sizeof(cp), cp 2656 net/bluetooth/hci_event.c &cp); cp 2798 net/bluetooth/hci_event.c struct hci_cp_set_conn_encrypt cp; cp 2799 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 2800 net/bluetooth/hci_event.c cp.encrypt = 0x01; cp 2801 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), cp 2802 net/bluetooth/hci_event.c &cp); cp 2818 net/bluetooth/hci_event.c struct hci_cp_set_conn_encrypt cp; cp 2819 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 2820 net/bluetooth/hci_event.c cp.encrypt = 0x01; cp 2821 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), cp 2822 net/bluetooth/hci_event.c &cp); cp 2863 net/bluetooth/hci_event.c struct hci_cp_auth_requested cp; cp 2867 net/bluetooth/hci_event.c cp.handle = __cpu_to_le16(conn->handle); cp 2868 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, sizeof(cp), &cp); cp 2997 net/bluetooth/hci_event.c struct hci_cp_read_enc_key_size cp; cp 3011 net/bluetooth/hci_event.c cp.handle = cpu_to_le16(conn->handle); cp 3012 net/bluetooth/hci_event.c hci_req_add(&req, HCI_OP_READ_ENC_KEY_SIZE, sizeof(cp), &cp); cp 3034 net/bluetooth/hci_event.c struct hci_cp_write_auth_payload_to cp; cp 3036 net/bluetooth/hci_event.c cp.handle = cpu_to_le16(conn->handle); cp 3037 net/bluetooth/hci_event.c cp.timeout = cpu_to_le16(hdev->auth_payload_timeout); cp 3039 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 3101 net/bluetooth/hci_event.c struct hci_cp_read_remote_ext_features cp; cp 3102 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 3103 net/bluetooth/hci_event.c cp.page = 0x01; cp 3105 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 3110 net/bluetooth/hci_event.c struct hci_cp_remote_name_req cp; cp 3111 net/bluetooth/hci_event.c memset(&cp, 0, sizeof(cp)); cp 3112 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &conn->dst); cp 3113 net/bluetooth/hci_event.c cp.pscan_rep_mode = 0x02; cp 3114 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); cp 3873 net/bluetooth/hci_event.c struct hci_cp_link_key_reply cp; cp 3916 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 3917 net/bluetooth/hci_event.c memcpy(cp.link_key, key->val, HCI_LINK_KEY_SIZE); cp 3919 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_LINK_KEY_REPLY, sizeof(cp), &cp); cp 4157 net/bluetooth/hci_event.c struct hci_cp_remote_name_req cp; cp 4158 net/bluetooth/hci_event.c memset(&cp, 0, sizeof(cp)); cp 4159 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &conn->dst); cp 4160 net/bluetooth/hci_event.c cp.pscan_rep_mode = 0x02; cp 4161 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); cp 4443 net/bluetooth/hci_event.c struct hci_cp_io_capability_reply cp; cp 4445 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 4448 net/bluetooth/hci_event.c cp.capability = (conn->io_capability == 0x04) ? cp 4469 net/bluetooth/hci_event.c cp.authentication = conn->auth_type; cp 4470 net/bluetooth/hci_event.c cp.oob_data = bredr_oob_data_present(conn); cp 4473 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 4475 net/bluetooth/hci_event.c struct hci_cp_io_capability_neg_reply cp; cp 4477 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 4478 net/bluetooth/hci_event.c cp.reason = HCI_ERROR_PAIRING_NOT_ALLOWED; cp 4481 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 4721 net/bluetooth/hci_event.c struct hci_cp_remote_oob_data_neg_reply cp; cp 4723 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 4725 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 4730 net/bluetooth/hci_event.c struct hci_cp_remote_oob_ext_data_reply cp; cp 4732 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 4734 net/bluetooth/hci_event.c memset(cp.hash192, 0, sizeof(cp.hash192)); cp 4735 net/bluetooth/hci_event.c memset(cp.rand192, 0, sizeof(cp.rand192)); cp 4737 net/bluetooth/hci_event.c memcpy(cp.hash192, data->hash192, sizeof(cp.hash192)); cp 4738 net/bluetooth/hci_event.c memcpy(cp.rand192, data->rand192, sizeof(cp.rand192)); cp 4740 net/bluetooth/hci_event.c memcpy(cp.hash256, data->hash256, sizeof(cp.hash256)); cp 4741 net/bluetooth/hci_event.c memcpy(cp.rand256, data->rand256, sizeof(cp.rand256)); cp 4744 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 4746 net/bluetooth/hci_event.c struct hci_cp_remote_oob_data_reply cp; cp 4748 net/bluetooth/hci_event.c bacpy(&cp.bdaddr, &ev->bdaddr); cp 4749 net/bluetooth/hci_event.c memcpy(cp.hash, data->hash192, sizeof(cp.hash)); cp 4750 net/bluetooth/hci_event.c memcpy(cp.rand, data->rand192, sizeof(cp.rand)); cp 4753 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 5035 net/bluetooth/hci_event.c struct hci_cp_le_read_remote_features cp; cp 5037 net/bluetooth/hci_event.c cp.handle = __cpu_to_le16(conn->handle); cp 5040 net/bluetooth/hci_event.c sizeof(cp), &cp); cp 5571 net/bluetooth/hci_event.c struct hci_cp_le_ltk_reply cp; cp 5598 net/bluetooth/hci_event.c memcpy(cp.ltk, ltk->val, ltk->enc_size); cp 5599 net/bluetooth/hci_event.c memset(cp.ltk + ltk->enc_size, 0, sizeof(cp.ltk) - ltk->enc_size); cp 5600 net/bluetooth/hci_event.c cp.handle = cpu_to_le16(conn->handle); cp 5606 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp); cp 5635 net/bluetooth/hci_event.c struct hci_cp_le_conn_param_req_neg_reply cp; cp 5637 net/bluetooth/hci_event.c cp.handle = cpu_to_le16(handle); cp 5638 net/bluetooth/hci_event.c cp.reason = reason; cp 5640 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_LE_CONN_PARAM_REQ_NEG_REPLY, sizeof(cp), cp 5641 net/bluetooth/hci_event.c &cp); cp 5648 net/bluetooth/hci_event.c struct hci_cp_le_conn_param_req_reply cp; cp 5691 net/bluetooth/hci_event.c cp.handle = ev->handle; cp 5692 net/bluetooth/hci_event.c cp.interval_min = ev->interval_min; cp 5693 net/bluetooth/hci_event.c cp.interval_max = ev->interval_max; cp 5694 net/bluetooth/hci_event.c cp.latency = ev->latency; cp 5695 net/bluetooth/hci_event.c cp.timeout = ev->timeout; cp 5696 net/bluetooth/hci_event.c cp.min_ce_len = 0; cp 5697 net/bluetooth/hci_event.c cp.max_ce_len = 0; cp 5699 net/bluetooth/hci_event.c hci_send_cmd(hdev, HCI_OP_LE_CONN_PARAM_REQ_REPLY, sizeof(cp), &cp); cp 459 net/bluetooth/hci_request.c struct hci_cp_write_local_name cp; cp 461 net/bluetooth/hci_request.c memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); cp 463 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_WRITE_LOCAL_NAME, sizeof(cp), &cp); cp 627 net/bluetooth/hci_request.c struct hci_cp_write_eir cp; cp 641 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 643 net/bluetooth/hci_request.c create_eir(hdev, cp.data); cp 645 net/bluetooth/hci_request.c if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) cp 648 net/bluetooth/hci_request.c memcpy(hdev->eir, cp.data, sizeof(cp.data)); cp 650 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_WRITE_EIR, sizeof(cp), &cp); cp 658 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_scan_enable cp; cp 660 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 661 net/bluetooth/hci_request.c cp.enable = LE_SCAN_DISABLE; cp 662 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_EXT_SCAN_ENABLE, sizeof(cp), cp 663 net/bluetooth/hci_request.c &cp); cp 665 net/bluetooth/hci_request.c struct hci_cp_le_set_scan_enable cp; cp 667 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 668 net/bluetooth/hci_request.c cp.enable = LE_SCAN_DISABLE; cp 669 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp); cp 676 net/bluetooth/hci_request.c struct hci_cp_le_add_to_white_list cp; cp 678 net/bluetooth/hci_request.c cp.bdaddr_type = params->addr_type; cp 679 net/bluetooth/hci_request.c bacpy(&cp.bdaddr, ¶ms->addr); cp 681 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_ADD_TO_WHITE_LIST, sizeof(cp), &cp); cp 705 net/bluetooth/hci_request.c struct hci_cp_le_del_from_white_list cp; cp 707 net/bluetooth/hci_request.c cp.bdaddr_type = b->bdaddr_type; cp 708 net/bluetooth/hci_request.c bacpy(&cp.bdaddr, &b->bdaddr); cp 711 net/bluetooth/hci_request.c sizeof(cp), &cp); cp 943 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_adv_enable cp; cp 945 net/bluetooth/hci_request.c cp.enable = 0x00; cp 947 net/bluetooth/hci_request.c cp.num_of_sets = 0x00; cp 949 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_ENABLE, sizeof(cp), &cp); cp 1054 net/bluetooth/hci_request.c struct hci_cp_le_set_adv_param cp; cp 1090 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1093 net/bluetooth/hci_request.c cp.type = LE_ADV_IND; cp 1099 net/bluetooth/hci_request.c cp.type = LE_ADV_SCAN_IND; cp 1101 net/bluetooth/hci_request.c cp.type = LE_ADV_NONCONN_IND; cp 1113 net/bluetooth/hci_request.c cp.min_interval = cpu_to_le16(adv_min_interval); cp 1114 net/bluetooth/hci_request.c cp.max_interval = cpu_to_le16(adv_max_interval); cp 1115 net/bluetooth/hci_request.c cp.own_address_type = own_addr_type; cp 1116 net/bluetooth/hci_request.c cp.channel_map = hdev->le_adv_channel_map; cp 1118 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); cp 1213 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_scan_rsp_data cp; cp 1215 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1219 net/bluetooth/hci_request.c cp.data); cp 1221 net/bluetooth/hci_request.c len = create_default_scan_rsp_data(hdev, cp.data); cp 1224 net/bluetooth/hci_request.c !memcmp(cp.data, hdev->scan_rsp_data, len)) cp 1227 net/bluetooth/hci_request.c memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); cp 1230 net/bluetooth/hci_request.c cp.handle = 0; cp 1231 net/bluetooth/hci_request.c cp.length = len; cp 1232 net/bluetooth/hci_request.c cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; cp 1233 net/bluetooth/hci_request.c cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; cp 1235 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_EXT_SCAN_RSP_DATA, sizeof(cp), cp 1236 net/bluetooth/hci_request.c &cp); cp 1238 net/bluetooth/hci_request.c struct hci_cp_le_set_scan_rsp_data cp; cp 1240 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1244 net/bluetooth/hci_request.c cp.data); cp 1246 net/bluetooth/hci_request.c len = create_default_scan_rsp_data(hdev, cp.data); cp 1249 net/bluetooth/hci_request.c !memcmp(cp.data, hdev->scan_rsp_data, len)) cp 1252 net/bluetooth/hci_request.c memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); cp 1255 net/bluetooth/hci_request.c cp.length = len; cp 1257 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_SCAN_RSP_DATA, sizeof(cp), &cp); cp 1359 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_adv_data cp; cp 1361 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1363 net/bluetooth/hci_request.c len = create_instance_adv_data(hdev, instance, cp.data); cp 1367 net/bluetooth/hci_request.c memcmp(cp.data, hdev->adv_data, len) == 0) cp 1370 net/bluetooth/hci_request.c memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); cp 1373 net/bluetooth/hci_request.c cp.length = len; cp 1374 net/bluetooth/hci_request.c cp.handle = 0; cp 1375 net/bluetooth/hci_request.c cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; cp 1376 net/bluetooth/hci_request.c cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; cp 1378 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_DATA, sizeof(cp), &cp); cp 1380 net/bluetooth/hci_request.c struct hci_cp_le_set_adv_data cp; cp 1382 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1384 net/bluetooth/hci_request.c len = create_instance_adv_data(hdev, instance, cp.data); cp 1388 net/bluetooth/hci_request.c memcmp(cp.data, hdev->adv_data, len) == 0) cp 1391 net/bluetooth/hci_request.c memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); cp 1394 net/bluetooth/hci_request.c cp.length = len; cp 1396 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_ADV_DATA, sizeof(cp), &cp); cp 1560 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_adv_params cp; cp 1601 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1603 net/bluetooth/hci_request.c memcpy(cp.min_interval, adv_interval, sizeof(cp.min_interval)); cp 1604 net/bluetooth/hci_request.c memcpy(cp.max_interval, adv_interval, sizeof(cp.max_interval)); cp 1610 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); cp 1612 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); cp 1615 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); cp 1617 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); cp 1620 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); cp 1622 net/bluetooth/hci_request.c cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); cp 1625 net/bluetooth/hci_request.c cp.own_addr_type = own_addr_type; cp 1626 net/bluetooth/hci_request.c cp.channel_map = hdev->le_adv_channel_map; cp 1627 net/bluetooth/hci_request.c cp.tx_power = 127; cp 1628 net/bluetooth/hci_request.c cp.handle = instance; cp 1631 net/bluetooth/hci_request.c cp.primary_phy = HCI_ADV_PHY_1M; cp 1632 net/bluetooth/hci_request.c cp.secondary_phy = HCI_ADV_PHY_2M; cp 1634 net/bluetooth/hci_request.c cp.primary_phy = HCI_ADV_PHY_CODED; cp 1635 net/bluetooth/hci_request.c cp.secondary_phy = HCI_ADV_PHY_CODED; cp 1638 net/bluetooth/hci_request.c cp.primary_phy = HCI_ADV_PHY_1M; cp 1639 net/bluetooth/hci_request.c cp.secondary_phy = HCI_ADV_PHY_1M; cp 1642 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(cp), &cp); cp 1646 net/bluetooth/hci_request.c struct hci_cp_le_set_adv_set_rand_addr cp; cp 1657 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 1659 net/bluetooth/hci_request.c cp.handle = 0; cp 1660 net/bluetooth/hci_request.c bacpy(&cp.bdaddr, &random_addr); cp 1664 net/bluetooth/hci_request.c sizeof(cp), &cp); cp 1673 net/bluetooth/hci_request.c struct hci_cp_le_set_ext_adv_enable *cp; cp 1675 net/bluetooth/hci_request.c u8 data[sizeof(*cp) + sizeof(*adv_set) * 1]; cp 1686 net/bluetooth/hci_request.c cp = (void *) data; cp 1687 net/bluetooth/hci_request.c adv_set = (void *) cp->data; cp 1689 net/bluetooth/hci_request.c memset(cp, 0, sizeof(*cp)); cp 1691 net/bluetooth/hci_request.c cp->enable = 0x01; cp 1692 net/bluetooth/hci_request.c cp->num_of_sets = 0x01; cp 1709 net/bluetooth/hci_request.c sizeof(*cp) + sizeof(*adv_set) * cp->num_of_sets, cp 2133 net/bluetooth/hci_request.c struct hci_cp_write_current_iac_lap cp; cp 2140 net/bluetooth/hci_request.c cp.num_iac = min_t(u8, hdev->num_iac, 2); cp 2141 net/bluetooth/hci_request.c cp.iac_lap[0] = 0x00; /* LIAC */ cp 2142 net/bluetooth/hci_request.c cp.iac_lap[1] = 0x8b; cp 2143 net/bluetooth/hci_request.c cp.iac_lap[2] = 0x9e; cp 2144 net/bluetooth/hci_request.c cp.iac_lap[3] = 0x33; /* GIAC */ cp 2145 net/bluetooth/hci_request.c cp.iac_lap[4] = 0x8b; cp 2146 net/bluetooth/hci_request.c cp.iac_lap[5] = 0x9e; cp 2149 net/bluetooth/hci_request.c cp.num_iac = 1; cp 2150 net/bluetooth/hci_request.c cp.iac_lap[0] = 0x33; /* GIAC */ cp 2151 net/bluetooth/hci_request.c cp.iac_lap[1] = 0x8b; cp 2152 net/bluetooth/hci_request.c cp.iac_lap[2] = 0x9e; cp 2156 net/bluetooth/hci_request.c (cp.num_iac * 3) + 1, &cp); cp 2210 net/bluetooth/hci_request.c struct hci_cp_disconn_phy_link cp; cp 2212 net/bluetooth/hci_request.c cp.phy_handle = HCI_PHY_HANDLE(conn->handle); cp 2213 net/bluetooth/hci_request.c cp.reason = reason; cp 2214 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_DISCONN_PHY_LINK, sizeof(cp), cp 2215 net/bluetooth/hci_request.c &cp); cp 2336 net/bluetooth/hci_request.c struct hci_cp_inquiry cp; cp 2344 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 2347 net/bluetooth/hci_request.c memcpy(&cp.lap, liac, sizeof(cp.lap)); cp 2349 net/bluetooth/hci_request.c memcpy(&cp.lap, giac, sizeof(cp.lap)); cp 2351 net/bluetooth/hci_request.c cp.length = length; cp 2353 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_INQUIRY, sizeof(cp), &cp); cp 2437 net/bluetooth/hci_request.c struct hci_cp_le_set_scan_enable cp; cp 2439 net/bluetooth/hci_request.c memset(&cp, 0, sizeof(cp)); cp 2440 net/bluetooth/hci_request.c cp.enable = LE_SCAN_ENABLE; cp 2441 net/bluetooth/hci_request.c cp.filter_dup = LE_SCAN_FILTER_DUP_ENABLE; cp 2442 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp); cp 2631 net/bluetooth/hci_request.c struct hci_cp_remote_name_req_cancel cp; cp 2665 net/bluetooth/hci_request.c bacpy(&cp.bdaddr, &e->data.bdaddr); cp 2666 net/bluetooth/hci_request.c hci_req_add(req, HCI_OP_REMOTE_NAME_REQ_CANCEL, sizeof(cp), cp 2667 net/bluetooth/hci_request.c &cp); cp 2757 net/bluetooth/hci_request.c struct hci_cp_write_le_host_supported cp; cp 2759 net/bluetooth/hci_request.c cp.le = 0x01; cp 2760 net/bluetooth/hci_request.c cp.simul = 0x00; cp 2765 net/bluetooth/hci_request.c if (cp.le != lmp_host_le_capable(hdev) || cp 2766 net/bluetooth/hci_request.c cp.simul != lmp_host_le_br_capable(hdev)) cp 2768 net/bluetooth/hci_request.c sizeof(cp), &cp); cp 1472 net/bluetooth/hci_sock.c u8 *cp; cp 1576 net/bluetooth/hci_sock.c cp = buf + sizeof(*hdr); cp 1578 net/bluetooth/hci_sock.c err = handler->func(sk, hdev, cp, len); cp 872 net/bluetooth/mgmt.c struct mgmt_mode *cp = cmd->param; cp 873 net/bluetooth/mgmt.c if (cp->val == 0x01) cp 875 net/bluetooth/mgmt.c else if (cp->val == 0x02) cp 896 net/bluetooth/mgmt.c struct mgmt_mode *cp = cmd->param; cp 898 net/bluetooth/mgmt.c return cp->val; cp 1158 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1164 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1176 net/bluetooth/mgmt.c if (!!cp->val == hdev_is_powered(hdev)) { cp 1187 net/bluetooth/mgmt.c if (cp->val) { cp 1337 net/bluetooth/mgmt.c struct mgmt_cp_set_discoverable *cp = data; cp 1349 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01 && cp->val != 0x02) cp 1353 net/bluetooth/mgmt.c timeout = __le16_to_cpu(cp->timeout); cp 1358 net/bluetooth/mgmt.c if ((cp->val == 0x00 && timeout > 0) || cp 1359 net/bluetooth/mgmt.c (cp->val == 0x02 && timeout == 0)) cp 1391 net/bluetooth/mgmt.c if (!!cp->val != hci_dev_test_flag(hdev, HCI_DISCOVERABLE)) { cp 1410 net/bluetooth/mgmt.c if (!!cp->val == hci_dev_test_flag(hdev, HCI_DISCOVERABLE) && cp 1411 net/bluetooth/mgmt.c (cp->val == 0x02) == hci_dev_test_flag(hdev, cp 1416 net/bluetooth/mgmt.c if (cp->val && hdev->discov_timeout > 0) { cp 1439 net/bluetooth/mgmt.c if (cp->val) cp 1445 net/bluetooth/mgmt.c if (cp->val == 0x02) cp 1518 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1529 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1536 net/bluetooth/mgmt.c err = set_connectable_update_settings(hdev, sk, cp->val); cp 1553 net/bluetooth/mgmt.c if (cp->val) { cp 1575 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1581 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1587 net/bluetooth/mgmt.c if (cp->val) cp 1618 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1630 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1639 net/bluetooth/mgmt.c if (!!cp->val != hci_dev_test_flag(hdev, HCI_LINK_SECURITY)) { cp 1660 net/bluetooth/mgmt.c val = !!cp->val; cp 1686 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1701 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1710 net/bluetooth/mgmt.c if (cp->val) { cp 1739 net/bluetooth/mgmt.c if (!!cp->val == hci_dev_test_flag(hdev, HCI_SSP_ENABLED)) { cp 1750 net/bluetooth/mgmt.c if (!cp->val && hci_dev_test_flag(hdev, HCI_USE_DEBUG_KEYS)) cp 1752 net/bluetooth/mgmt.c sizeof(cp->val), &cp->val); cp 1754 net/bluetooth/mgmt.c err = hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &cp->val); cp 1767 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1786 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1798 net/bluetooth/mgmt.c if (cp->val) { cp 1871 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 1884 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 1898 net/bluetooth/mgmt.c if (cp->val == 0x01) cp 1907 net/bluetooth/mgmt.c val = !!cp->val; cp 2046 net/bluetooth/mgmt.c struct mgmt_cp_add_uuid *cp = data; cp 2068 net/bluetooth/mgmt.c memcpy(uuid->uuid, cp->uuid, 16); cp 2069 net/bluetooth/mgmt.c uuid->svc_hint = cp->svc_hint; cp 2070 net/bluetooth/mgmt.c uuid->size = get_uuid_size(cp->uuid); cp 2126 net/bluetooth/mgmt.c struct mgmt_cp_remove_uuid *cp = data; cp 2143 net/bluetooth/mgmt.c if (memcmp(cp->uuid, bt_uuid_any, 16) == 0) { cp 2159 net/bluetooth/mgmt.c if (memcmp(match->uuid, cp->uuid, 16) != 0) cp 2212 net/bluetooth/mgmt.c struct mgmt_cp_set_dev_class *cp = data; cp 2231 net/bluetooth/mgmt.c if ((cp->minor & 0x03) != 0 || (cp->major & 0xe0) != 0) { cp 2237 net/bluetooth/mgmt.c hdev->major_class = cp->major; cp 2238 net/bluetooth/mgmt.c hdev->minor_class = cp->minor; cp 2283 net/bluetooth/mgmt.c struct mgmt_cp_load_link_keys *cp = data; cp 2284 net/bluetooth/mgmt.c const u16 max_key_count = ((U16_MAX - sizeof(*cp)) / cp 2296 net/bluetooth/mgmt.c key_count = __le16_to_cpu(cp->key_count); cp 2304 net/bluetooth/mgmt.c expected_len = struct_size(cp, keys, key_count); cp 2312 net/bluetooth/mgmt.c if (cp->debug_keys != 0x00 && cp->debug_keys != 0x01) cp 2316 net/bluetooth/mgmt.c BT_DBG("%s debug_keys %u key_count %u", hdev->name, cp->debug_keys, cp 2320 net/bluetooth/mgmt.c struct mgmt_link_key_info *key = &cp->keys[i]; cp 2332 net/bluetooth/mgmt.c if (cp->debug_keys) cp 2342 net/bluetooth/mgmt.c struct mgmt_link_key_info *key = &cp->keys[i]; cp 2376 net/bluetooth/mgmt.c struct mgmt_cp_unpair_device *cp = data; cp 2385 net/bluetooth/mgmt.c bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); cp 2386 net/bluetooth/mgmt.c rp.addr.type = cp->addr.type; cp 2388 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 2393 net/bluetooth/mgmt.c if (cp->disconnect != 0x00 && cp->disconnect != 0x01) cp 2407 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) { cp 2415 net/bluetooth/mgmt.c if (cp->disconnect) cp 2417 net/bluetooth/mgmt.c &cp->addr.bdaddr); cp 2421 net/bluetooth/mgmt.c err = hci_remove_link_key(hdev, &cp->addr.bdaddr); cp 2434 net/bluetooth/mgmt.c addr_type = le_addr_type(cp->addr.type); cp 2437 net/bluetooth/mgmt.c err = smp_cancel_and_remove_pairing(hdev, &cp->addr.bdaddr, addr_type); cp 2445 net/bluetooth/mgmt.c conn = hci_conn_hash_lookup_le(hdev, &cp->addr.bdaddr, addr_type); cp 2447 net/bluetooth/mgmt.c hci_conn_params_del(hdev, &cp->addr.bdaddr, addr_type); cp 2458 net/bluetooth/mgmt.c params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr, addr_type); cp 2469 net/bluetooth/mgmt.c if (!cp->disconnect) cp 2479 net/bluetooth/mgmt.c device_unpaired(hdev, &cp->addr.bdaddr, cp->addr.type, sk); cp 2483 net/bluetooth/mgmt.c cmd = mgmt_pending_add(sk, MGMT_OP_UNPAIR_DEVICE, hdev, cp, cp 2484 net/bluetooth/mgmt.c sizeof(*cp)); cp 2504 net/bluetooth/mgmt.c struct mgmt_cp_disconnect *cp = data; cp 2513 net/bluetooth/mgmt.c bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); cp 2514 net/bluetooth/mgmt.c rp.addr.type = cp->addr.type; cp 2516 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 2536 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) cp 2538 net/bluetooth/mgmt.c &cp->addr.bdaddr); cp 2540 net/bluetooth/mgmt.c conn = hci_conn_hash_lookup_le(hdev, &cp->addr.bdaddr, cp 2541 net/bluetooth/mgmt.c le_addr_type(cp->addr.type)); cp 2641 net/bluetooth/mgmt.c struct mgmt_cp_pin_code_neg_reply *cp) cp 2646 net/bluetooth/mgmt.c cmd = mgmt_pending_add(sk, MGMT_OP_PIN_CODE_NEG_REPLY, hdev, cp, cp 2647 net/bluetooth/mgmt.c sizeof(*cp)); cp 2654 net/bluetooth/mgmt.c sizeof(cp->addr.bdaddr), &cp->addr.bdaddr); cp 2665 net/bluetooth/mgmt.c struct mgmt_cp_pin_code_reply *cp = data; cp 2680 net/bluetooth/mgmt.c conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->addr.bdaddr); cp 2687 net/bluetooth/mgmt.c if (conn->pending_sec_level == BT_SECURITY_HIGH && cp->pin_len != 16) { cp 2690 net/bluetooth/mgmt.c memcpy(&ncp.addr, &cp->addr, sizeof(ncp.addr)); cp 2710 net/bluetooth/mgmt.c bacpy(&reply.bdaddr, &cp->addr.bdaddr); cp 2711 net/bluetooth/mgmt.c reply.pin_len = cp->pin_len; cp 2712 net/bluetooth/mgmt.c memcpy(reply.pin_code, cp->pin_code, sizeof(reply.pin_code)); cp 2726 net/bluetooth/mgmt.c struct mgmt_cp_set_io_capability *cp = data; cp 2730 net/bluetooth/mgmt.c if (cp->io_capability > SMP_IO_KEYBOARD_DISPLAY) cp 2736 net/bluetooth/mgmt.c hdev->io_capability = cp->io_capability; cp 2844 net/bluetooth/mgmt.c struct mgmt_cp_pair_device *cp = data; cp 2854 net/bluetooth/mgmt.c bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); cp 2855 net/bluetooth/mgmt.c rp.addr.type = cp->addr.type; cp 2857 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 2862 net/bluetooth/mgmt.c if (cp->io_cap > SMP_IO_KEYBOARD_DISPLAY) cp 2876 net/bluetooth/mgmt.c if (hci_bdaddr_is_paired(hdev, &cp->addr.bdaddr, cp->addr.type)) { cp 2886 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) { cp 2887 net/bluetooth/mgmt.c conn = hci_connect_acl(hdev, &cp->addr.bdaddr, sec_level, cp 2890 net/bluetooth/mgmt.c u8 addr_type = le_addr_type(cp->addr.type); cp 2902 net/bluetooth/mgmt.c p = hci_conn_params_add(hdev, &cp->addr.bdaddr, addr_type); cp 2907 net/bluetooth/mgmt.c conn = hci_connect_le_scan(hdev, &cp->addr.bdaddr, cp 2946 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) { cp 2956 net/bluetooth/mgmt.c conn->io_capability = cp->io_cap; cp 3069 net/bluetooth/mgmt.c struct hci_cp_user_passkey_reply cp; cp 3071 net/bluetooth/mgmt.c bacpy(&cp.bdaddr, &addr->bdaddr); cp 3072 net/bluetooth/mgmt.c cp.passkey = passkey; cp 3073 net/bluetooth/mgmt.c err = hci_send_cmd(hdev, hci_op, sizeof(cp), &cp); cp 3089 net/bluetooth/mgmt.c struct mgmt_cp_pin_code_neg_reply *cp = data; cp 3093 net/bluetooth/mgmt.c return user_pairing_resp(sk, hdev, &cp->addr, cp 3101 net/bluetooth/mgmt.c struct mgmt_cp_user_confirm_reply *cp = data; cp 3105 net/bluetooth/mgmt.c if (len != sizeof(*cp)) cp 3109 net/bluetooth/mgmt.c return user_pairing_resp(sk, hdev, &cp->addr, cp 3117 net/bluetooth/mgmt.c struct mgmt_cp_user_confirm_neg_reply *cp = data; cp 3121 net/bluetooth/mgmt.c return user_pairing_resp(sk, hdev, &cp->addr, cp 3129 net/bluetooth/mgmt.c struct mgmt_cp_user_passkey_reply *cp = data; cp 3133 net/bluetooth/mgmt.c return user_pairing_resp(sk, hdev, &cp->addr, cp 3135 net/bluetooth/mgmt.c HCI_OP_USER_PASSKEY_REPLY, cp->passkey); cp 3141 net/bluetooth/mgmt.c struct mgmt_cp_user_passkey_neg_reply *cp = data; cp 3145 net/bluetooth/mgmt.c return user_pairing_resp(sk, hdev, &cp->addr, cp 3181 net/bluetooth/mgmt.c struct mgmt_cp_set_local_name *cp; cp 3192 net/bluetooth/mgmt.c cp = cmd->param; cp 3199 net/bluetooth/mgmt.c cp, sizeof(*cp)); cp 3214 net/bluetooth/mgmt.c struct mgmt_cp_set_local_name *cp = data; cp 3226 net/bluetooth/mgmt.c if (!memcmp(hdev->dev_name, cp->name, sizeof(hdev->dev_name)) && cp 3227 net/bluetooth/mgmt.c !memcmp(hdev->short_name, cp->short_name, cp 3234 net/bluetooth/mgmt.c memcpy(hdev->short_name, cp->short_name, sizeof(hdev->short_name)); cp 3237 net/bluetooth/mgmt.c memcpy(hdev->dev_name, cp->name, sizeof(hdev->dev_name)); cp 3257 net/bluetooth/mgmt.c memcpy(hdev->dev_name, cp->name, sizeof(hdev->dev_name)); cp 3284 net/bluetooth/mgmt.c struct mgmt_cp_set_appearance *cp = data; cp 3294 net/bluetooth/mgmt.c apperance = le16_to_cpu(cp->appearance); cp 3382 net/bluetooth/mgmt.c struct mgmt_cp_set_phy_confguration *cp = data; cp 3395 net/bluetooth/mgmt.c selected_phys = __le32_to_cpu(cp->selected_phys); cp 3661 net/bluetooth/mgmt.c struct mgmt_cp_add_remote_oob_data *cp = data; cp 3664 net/bluetooth/mgmt.c if (cp->addr.type != BDADDR_BREDR) { cp 3668 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 3672 net/bluetooth/mgmt.c err = hci_add_remote_oob_data(hdev, &cp->addr.bdaddr, cp 3673 net/bluetooth/mgmt.c cp->addr.type, cp->hash, cp 3674 net/bluetooth/mgmt.c cp->rand, NULL, NULL); cp 3682 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 3684 net/bluetooth/mgmt.c struct mgmt_cp_add_remote_oob_ext_data *cp = data; cp 3688 net/bluetooth/mgmt.c if (bdaddr_type_is_le(cp->addr.type)) { cp 3692 net/bluetooth/mgmt.c if (memcmp(cp->rand192, ZERO_KEY, 16) || cp 3693 net/bluetooth/mgmt.c memcmp(cp->hash192, ZERO_KEY, 16)) { cp 3707 net/bluetooth/mgmt.c if (!memcmp(cp->rand192, ZERO_KEY, 16) || cp 3708 net/bluetooth/mgmt.c !memcmp(cp->hash192, ZERO_KEY, 16)) { cp 3712 net/bluetooth/mgmt.c rand192 = cp->rand192; cp 3713 net/bluetooth/mgmt.c hash192 = cp->hash192; cp 3720 net/bluetooth/mgmt.c if (!memcmp(cp->rand256, ZERO_KEY, 16) || cp 3721 net/bluetooth/mgmt.c !memcmp(cp->hash256, ZERO_KEY, 16)) { cp 3725 net/bluetooth/mgmt.c rand256 = cp->rand256; cp 3726 net/bluetooth/mgmt.c hash256 = cp->hash256; cp 3729 net/bluetooth/mgmt.c err = hci_add_remote_oob_data(hdev, &cp->addr.bdaddr, cp 3730 net/bluetooth/mgmt.c cp->addr.type, hash192, rand192, cp 3739 net/bluetooth/mgmt.c status, &cp->addr, sizeof(cp->addr)); cp 3755 net/bluetooth/mgmt.c struct mgmt_cp_remove_remote_oob_data *cp = data; cp 3761 net/bluetooth/mgmt.c if (cp->addr.type != BDADDR_BREDR) cp 3765 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 3769 net/bluetooth/mgmt.c if (!bacmp(&cp->addr.bdaddr, BDADDR_ANY)) { cp 3775 net/bluetooth/mgmt.c err = hci_remove_remote_oob_data(hdev, &cp->addr.bdaddr, cp->addr.type); cp 3783 net/bluetooth/mgmt.c status, &cp->addr, sizeof(cp->addr)); cp 3842 net/bluetooth/mgmt.c struct mgmt_cp_start_discovery *cp = data; cp 3854 net/bluetooth/mgmt.c &cp->type, sizeof(cp->type)); cp 3861 net/bluetooth/mgmt.c &cp->type, sizeof(cp->type)); cp 3865 net/bluetooth/mgmt.c if (!discovery_type_is_valid(hdev, cp->type, &status)) { cp 3867 net/bluetooth/mgmt.c &cp->type, sizeof(cp->type)); cp 3876 net/bluetooth/mgmt.c hdev->discovery.type = cp->type; cp 3925 net/bluetooth/mgmt.c struct mgmt_cp_start_service_discovery *cp = data; cp 3927 net/bluetooth/mgmt.c const u16 max_uuid_count = ((U16_MAX - sizeof(*cp)) / 16); cp 3940 net/bluetooth/mgmt.c &cp->type, sizeof(cp->type)); cp 3948 net/bluetooth/mgmt.c MGMT_STATUS_BUSY, &cp->type, cp 3949 net/bluetooth/mgmt.c sizeof(cp->type)); cp 3953 net/bluetooth/mgmt.c uuid_count = __le16_to_cpu(cp->uuid_count); cp 3959 net/bluetooth/mgmt.c MGMT_STATUS_INVALID_PARAMS, &cp->type, cp 3960 net/bluetooth/mgmt.c sizeof(cp->type)); cp 3964 net/bluetooth/mgmt.c expected_len = sizeof(*cp) + uuid_count * 16; cp 3970 net/bluetooth/mgmt.c MGMT_STATUS_INVALID_PARAMS, &cp->type, cp 3971 net/bluetooth/mgmt.c sizeof(cp->type)); cp 3975 net/bluetooth/mgmt.c if (!discovery_type_is_valid(hdev, cp->type, &status)) { cp 3978 net/bluetooth/mgmt.c status, &cp->type, sizeof(cp->type)); cp 3997 net/bluetooth/mgmt.c hdev->discovery.type = cp->type; cp 3998 net/bluetooth/mgmt.c hdev->discovery.rssi = cp->rssi; cp 4002 net/bluetooth/mgmt.c hdev->discovery.uuids = kmemdup(cp->uuids, uuid_count * 16, cp 4008 net/bluetooth/mgmt.c &cp->type, sizeof(cp->type)); cp 4085 net/bluetooth/mgmt.c struct mgmt_cp_confirm_name *cp = data; cp 4095 net/bluetooth/mgmt.c MGMT_STATUS_FAILED, &cp->addr, cp 4096 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 4100 net/bluetooth/mgmt.c e = hci_inquiry_cache_lookup_unknown(hdev, &cp->addr.bdaddr); cp 4103 net/bluetooth/mgmt.c MGMT_STATUS_INVALID_PARAMS, &cp->addr, cp 4104 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 4108 net/bluetooth/mgmt.c if (cp->name_known) { cp 4117 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 4127 net/bluetooth/mgmt.c struct mgmt_cp_block_device *cp = data; cp 4133 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 4136 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 4140 net/bluetooth/mgmt.c err = hci_bdaddr_list_add(&hdev->blacklist, &cp->addr.bdaddr, cp 4141 net/bluetooth/mgmt.c cp->addr.type); cp 4147 net/bluetooth/mgmt.c mgmt_event(MGMT_EV_DEVICE_BLOCKED, hdev, &cp->addr, sizeof(cp->addr), cp 4153 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 4163 net/bluetooth/mgmt.c struct mgmt_cp_unblock_device *cp = data; cp 4169 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 4172 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 4176 net/bluetooth/mgmt.c err = hci_bdaddr_list_del(&hdev->blacklist, &cp->addr.bdaddr, cp 4177 net/bluetooth/mgmt.c cp->addr.type); cp 4183 net/bluetooth/mgmt.c mgmt_event(MGMT_EV_DEVICE_UNBLOCKED, hdev, &cp->addr, sizeof(cp->addr), cp 4189 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 4199 net/bluetooth/mgmt.c struct mgmt_cp_set_device_id *cp = data; cp 4206 net/bluetooth/mgmt.c source = __le16_to_cpu(cp->source); cp 4215 net/bluetooth/mgmt.c hdev->devid_vendor = __le16_to_cpu(cp->vendor); cp 4216 net/bluetooth/mgmt.c hdev->devid_product = __le16_to_cpu(cp->product); cp 4217 net/bluetooth/mgmt.c hdev->devid_version = __le16_to_cpu(cp->version); cp 4303 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 4316 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01 && cp->val != 0x02) cp 4322 net/bluetooth/mgmt.c val = !!cp->val; cp 4331 net/bluetooth/mgmt.c (cp->val == 0x02) == hci_dev_test_flag(hdev, HCI_ADVERTISING_CONNECTABLE)) || cp 4337 net/bluetooth/mgmt.c if (cp->val) { cp 4340 net/bluetooth/mgmt.c if (cp->val == 0x02) cp 4374 net/bluetooth/mgmt.c if (cp->val == 0x02) cp 4411 net/bluetooth/mgmt.c struct mgmt_cp_set_static_address *cp = data; cp 4424 net/bluetooth/mgmt.c if (bacmp(&cp->bdaddr, BDADDR_ANY)) { cp 4425 net/bluetooth/mgmt.c if (!bacmp(&cp->bdaddr, BDADDR_NONE)) cp 4431 net/bluetooth/mgmt.c if ((cp->bdaddr.b[5] & 0xc0) != 0xc0) cp 4439 net/bluetooth/mgmt.c bacpy(&hdev->static_addr, &cp->bdaddr); cp 4455 net/bluetooth/mgmt.c struct mgmt_cp_set_scan_params *cp = data; cp 4465 net/bluetooth/mgmt.c interval = __le16_to_cpu(cp->interval); cp 4471 net/bluetooth/mgmt.c window = __le16_to_cpu(cp->window); cp 4526 net/bluetooth/mgmt.c struct mgmt_mode *cp = cmd->param; cp 4528 net/bluetooth/mgmt.c if (cp->val) cp 4546 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 4558 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 4570 net/bluetooth/mgmt.c if (!!cp->val == hci_dev_test_flag(hdev, HCI_FAST_CONNECTABLE)) { cp 4593 net/bluetooth/mgmt.c __hci_req_write_fast_connectable(&req, cp->val); cp 4642 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 4657 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01) cp 4663 net/bluetooth/mgmt.c if (cp->val == hci_dev_test_flag(hdev, HCI_BREDR_ENABLED)) { cp 4669 net/bluetooth/mgmt.c if (!cp->val) { cp 4688 net/bluetooth/mgmt.c if (!cp->val) { cp 4755 net/bluetooth/mgmt.c struct mgmt_mode *cp; cp 4771 net/bluetooth/mgmt.c cp = cmd->param; cp 4773 net/bluetooth/mgmt.c switch (cp->val) { cp 4800 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 4819 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01 && cp->val != 0x02) cp 4829 net/bluetooth/mgmt.c if (cp->val) { cp 4832 net/bluetooth/mgmt.c if (cp->val == 0x02) cp 4858 net/bluetooth/mgmt.c val = !!cp->val; cp 4861 net/bluetooth/mgmt.c (cp->val == 0x02) == hci_dev_test_flag(hdev, HCI_SC_ONLY)) { cp 4888 net/bluetooth/mgmt.c struct mgmt_mode *cp = data; cp 4894 net/bluetooth/mgmt.c if (cp->val != 0x00 && cp->val != 0x01 && cp->val != 0x02) cp 4900 net/bluetooth/mgmt.c if (cp->val) cp 4906 net/bluetooth/mgmt.c if (cp->val == 0x02) cp 4915 net/bluetooth/mgmt.c u8 mode = (cp->val == 0x02) ? 0x01 : 0x00; cp 4935 net/bluetooth/mgmt.c struct mgmt_cp_set_privacy *cp = cp_data; cp 4945 net/bluetooth/mgmt.c if (cp->privacy != 0x00 && cp->privacy != 0x01 && cp->privacy != 0x02) cp 4960 net/bluetooth/mgmt.c if (cp->privacy) { cp 4962 net/bluetooth/mgmt.c memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); cp 4965 net/bluetooth/mgmt.c if (cp->privacy == 0x02) cp 5008 net/bluetooth/mgmt.c struct mgmt_cp_load_irks *cp = cp_data; cp 5009 net/bluetooth/mgmt.c const u16 max_irk_count = ((U16_MAX - sizeof(*cp)) / cp 5020 net/bluetooth/mgmt.c irk_count = __le16_to_cpu(cp->irk_count); cp 5028 net/bluetooth/mgmt.c expected_len = struct_size(cp, irks, irk_count); cp 5039 net/bluetooth/mgmt.c struct mgmt_irk_info *key = &cp->irks[i]; cp 5052 net/bluetooth/mgmt.c struct mgmt_irk_info *irk = &cp->irks[i]; cp 5090 net/bluetooth/mgmt.c struct mgmt_cp_load_long_term_keys *cp = cp_data; cp 5091 net/bluetooth/mgmt.c const u16 max_key_count = ((U16_MAX - sizeof(*cp)) / cp 5102 net/bluetooth/mgmt.c key_count = __le16_to_cpu(cp->key_count); cp 5110 net/bluetooth/mgmt.c expected_len = struct_size(cp, keys, key_count); cp 5121 net/bluetooth/mgmt.c struct mgmt_ltk_info *key = &cp->keys[i]; cp 5134 net/bluetooth/mgmt.c struct mgmt_ltk_info *key = &cp->keys[i]; cp 5205 net/bluetooth/mgmt.c struct hci_cp_read_rssi *cp; cp 5224 net/bluetooth/mgmt.c cp = hci_sent_cmd_data(hdev, HCI_OP_READ_RSSI); cp 5225 net/bluetooth/mgmt.c if (!cp) { cp 5226 net/bluetooth/mgmt.c cp = hci_sent_cmd_data(hdev, HCI_OP_READ_TX_POWER); cp 5232 net/bluetooth/mgmt.c if (!cp) { cp 5237 net/bluetooth/mgmt.c handle = __le16_to_cpu(cp->handle); cp 5259 net/bluetooth/mgmt.c struct mgmt_cp_get_conn_info *cp = data; cp 5268 net/bluetooth/mgmt.c bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); cp 5269 net/bluetooth/mgmt.c rp.addr.type = cp->addr.type; cp 5271 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) cp 5285 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) cp 5287 net/bluetooth/mgmt.c &cp->addr.bdaddr); cp 5289 net/bluetooth/mgmt.c conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->addr.bdaddr); cp 5330 net/bluetooth/mgmt.c if (!bdaddr_type_is_le(cp->addr.type) || cp 5448 net/bluetooth/mgmt.c struct mgmt_cp_get_clock_info *cp = data; cp 5459 net/bluetooth/mgmt.c bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr); cp 5460 net/bluetooth/mgmt.c rp.addr.type = cp->addr.type; cp 5462 net/bluetooth/mgmt.c if (cp->addr.type != BDADDR_BREDR) cp 5476 net/bluetooth/mgmt.c if (bacmp(&cp->addr.bdaddr, BDADDR_ANY)) { cp 5478 net/bluetooth/mgmt.c &cp->addr.bdaddr); cp 5598 net/bluetooth/mgmt.c struct mgmt_cp_add_device *cp = data; cp 5604 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type) || cp 5605 net/bluetooth/mgmt.c !bacmp(&cp->addr.bdaddr, BDADDR_ANY)) cp 5608 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5610 net/bluetooth/mgmt.c if (cp->action != 0x00 && cp->action != 0x01 && cp->action != 0x02) cp 5613 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5617 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) { cp 5619 net/bluetooth/mgmt.c if (cp->action != 0x01) { cp 5623 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5627 net/bluetooth/mgmt.c err = hci_bdaddr_list_add(&hdev->whitelist, &cp->addr.bdaddr, cp 5628 net/bluetooth/mgmt.c cp->addr.type); cp 5637 net/bluetooth/mgmt.c addr_type = le_addr_type(cp->addr.type); cp 5639 net/bluetooth/mgmt.c if (cp->action == 0x02) cp 5641 net/bluetooth/mgmt.c else if (cp->action == 0x01) cp 5651 net/bluetooth/mgmt.c if (!hci_is_identity_address(&cp->addr.bdaddr, addr_type)) { cp 5654 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5661 net/bluetooth/mgmt.c if (hci_conn_params_set(hdev, &cp->addr.bdaddr, addr_type, cp 5664 net/bluetooth/mgmt.c MGMT_STATUS_FAILED, &cp->addr, cp 5665 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 5672 net/bluetooth/mgmt.c device_added(sk, hdev, &cp->addr.bdaddr, cp->addr.type, cp->action); cp 5675 net/bluetooth/mgmt.c MGMT_STATUS_SUCCESS, &cp->addr, cp 5676 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 5697 net/bluetooth/mgmt.c struct mgmt_cp_remove_device *cp = data; cp 5704 net/bluetooth/mgmt.c if (bacmp(&cp->addr.bdaddr, BDADDR_ANY)) { cp 5708 net/bluetooth/mgmt.c if (!bdaddr_type_is_valid(cp->addr.type)) { cp 5712 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5716 net/bluetooth/mgmt.c if (cp->addr.type == BDADDR_BREDR) { cp 5718 net/bluetooth/mgmt.c &cp->addr.bdaddr, cp 5719 net/bluetooth/mgmt.c cp->addr.type); cp 5724 net/bluetooth/mgmt.c &cp->addr, cp 5725 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 5731 net/bluetooth/mgmt.c device_removed(sk, hdev, &cp->addr.bdaddr, cp 5732 net/bluetooth/mgmt.c cp->addr.type); cp 5736 net/bluetooth/mgmt.c addr_type = le_addr_type(cp->addr.type); cp 5743 net/bluetooth/mgmt.c if (!hci_is_identity_address(&cp->addr.bdaddr, addr_type)) { cp 5747 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5751 net/bluetooth/mgmt.c params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr, cp 5757 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5766 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5775 net/bluetooth/mgmt.c device_removed(sk, hdev, &cp->addr.bdaddr, cp->addr.type); cp 5780 net/bluetooth/mgmt.c if (cp->addr.type) { cp 5784 net/bluetooth/mgmt.c &cp->addr, sizeof(cp->addr)); cp 5816 net/bluetooth/mgmt.c MGMT_STATUS_SUCCESS, &cp->addr, cp 5817 net/bluetooth/mgmt.c sizeof(cp->addr)); cp 5826 net/bluetooth/mgmt.c struct mgmt_cp_load_conn_param *cp = data; cp 5827 net/bluetooth/mgmt.c const u16 max_param_count = ((U16_MAX - sizeof(*cp)) / cp 5836 net/bluetooth/mgmt.c param_count = __le16_to_cpu(cp->param_count); cp 5844 net/bluetooth/mgmt.c expected_len = struct_size(cp, params, param_count); cp 5859 net/bluetooth/mgmt.c struct mgmt_conn_param *param = &cp->params[i]; cp 5911 net/bluetooth/mgmt.c struct mgmt_cp_set_external_config *cp = data; cp 5921 net/bluetooth/mgmt.c if (cp->config != 0x00 && cp->config != 0x01) cp 5931 net/bluetooth/mgmt.c if (cp->config) cp 5967 net/bluetooth/mgmt.c struct mgmt_cp_set_public_address *cp = data; cp 5977 net/bluetooth/mgmt.c if (!bacmp(&cp->bdaddr, BDADDR_ANY)) cp 5987 net/bluetooth/mgmt.c changed = !!bacmp(&hdev->public_addr, &cp->bdaddr); cp 5988 net/bluetooth/mgmt.c bacpy(&hdev->public_addr, &cp->bdaddr); cp 6128 net/bluetooth/mgmt.c struct mgmt_cp_read_local_oob_ext_data *cp) cp 6135 net/bluetooth/mgmt.c cp, sizeof(*cp)); cp 6158 net/bluetooth/mgmt.c struct mgmt_cp_read_local_oob_ext_data *cp = data; cp 6168 net/bluetooth/mgmt.c switch (cp->type) { cp 6204 net/bluetooth/mgmt.c switch (cp->type) { cp 6207 net/bluetooth/mgmt.c err = read_local_ssp_oob_req(hdev, sk, cp); cp 6293 net/bluetooth/mgmt.c rp->type = cp->type; cp 6490 net/bluetooth/mgmt.c struct mgmt_cp_add_advertising *cp; cp 6522 net/bluetooth/mgmt.c cp = cmd->param; cp 6523 net/bluetooth/mgmt.c rp.instance = cp->instance; cp 6541 net/bluetooth/mgmt.c struct mgmt_cp_add_advertising *cp = data; cp 6561 net/bluetooth/mgmt.c if (cp->instance < 1 || cp->instance > HCI_MAX_ADV_INSTANCES) cp 6565 net/bluetooth/mgmt.c if (data_len != sizeof(*cp) + cp->adv_data_len + cp->scan_rsp_len) cp 6569 net/bluetooth/mgmt.c flags = __le32_to_cpu(cp->flags); cp 6570 net/bluetooth/mgmt.c timeout = __le16_to_cpu(cp->timeout); cp 6571 net/bluetooth/mgmt.c duration = __le16_to_cpu(cp->duration); cp 6599 net/bluetooth/mgmt.c if (!tlv_data_is_valid(hdev, flags, cp->data, cp->adv_data_len, true) || cp 6600 net/bluetooth/mgmt.c !tlv_data_is_valid(hdev, flags, cp->data + cp->adv_data_len, cp 6601 net/bluetooth/mgmt.c cp->scan_rsp_len, false)) { cp 6607 net/bluetooth/mgmt.c err = hci_add_adv_instance(hdev, cp->instance, flags, cp 6608 net/bluetooth/mgmt.c cp->adv_data_len, cp->data, cp 6609 net/bluetooth/mgmt.c cp->scan_rsp_len, cp 6610 net/bluetooth/mgmt.c cp->data + cp->adv_data_len, cp 6622 net/bluetooth/mgmt.c mgmt_advertising_added(sk, hdev, cp->instance); cp 6624 net/bluetooth/mgmt.c if (hdev->cur_adv_instance == cp->instance) { cp 6632 net/bluetooth/mgmt.c next_instance = hci_get_next_instance(hdev, cp->instance); cp 6639 net/bluetooth/mgmt.c schedule_instance = cp->instance; cp 6649 net/bluetooth/mgmt.c rp.instance = cp->instance; cp 6685 net/bluetooth/mgmt.c struct mgmt_cp_remove_advertising *cp; cp 6700 net/bluetooth/mgmt.c cp = cmd->param; cp 6701 net/bluetooth/mgmt.c rp.instance = cp->instance; cp 6714 net/bluetooth/mgmt.c struct mgmt_cp_remove_advertising *cp = data; cp 6724 net/bluetooth/mgmt.c if (cp->instance && !hci_find_adv_instance(hdev, cp->instance)) { cp 6747 net/bluetooth/mgmt.c hci_req_clear_adv_instance(hdev, sk, &req, cp->instance, true); cp 6760 net/bluetooth/mgmt.c rp.instance = cp->instance; cp 6787 net/bluetooth/mgmt.c struct mgmt_cp_get_adv_size_info *cp = data; cp 6798 net/bluetooth/mgmt.c if (cp->instance < 1 || cp->instance > HCI_MAX_ADV_INSTANCES) cp 6802 net/bluetooth/mgmt.c flags = __le32_to_cpu(cp->flags); cp 6812 net/bluetooth/mgmt.c rp.instance = cp->instance; cp 6813 net/bluetooth/mgmt.c rp.flags = cp->flags; cp 7285 net/bluetooth/mgmt.c struct mgmt_cp_unpair_device *cp = cmd->param; cp 7287 net/bluetooth/mgmt.c device_unpaired(hdev, &cp->addr.bdaddr, cp->addr.type, cmd->sk); cp 7296 net/bluetooth/mgmt.c struct mgmt_mode *cp; cp 7302 net/bluetooth/mgmt.c cp = cmd->param; cp 7303 net/bluetooth/mgmt.c if (!cp->val) cp 7349 net/bluetooth/mgmt.c struct mgmt_cp_disconnect *cp; cp 7359 net/bluetooth/mgmt.c cp = cmd->param; cp 7361 net/bluetooth/mgmt.c if (bacmp(bdaddr, &cp->addr.bdaddr)) cp 7364 net/bluetooth/mgmt.c if (cp->addr.type != bdaddr_type) cp 7572 net/bluetooth/mgmt.c struct hci_cp_write_eir cp; cp 7579 net/bluetooth/mgmt.c memset(&cp, 0, sizeof(cp)); cp 7581 net/bluetooth/mgmt.c hci_req_add(req, HCI_OP_WRITE_EIR, sizeof(cp), &cp); cp 736 net/bluetooth/sco.c struct hci_cp_accept_conn_req cp; cp 738 net/bluetooth/sco.c bacpy(&cp.bdaddr, &conn->dst); cp 739 net/bluetooth/sco.c cp.role = 0x00; /* Ignored */ cp 741 net/bluetooth/sco.c hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp); cp 743 net/bluetooth/sco.c struct hci_cp_accept_sync_conn_req cp; cp 745 net/bluetooth/sco.c bacpy(&cp.bdaddr, &conn->dst); cp 746 net/bluetooth/sco.c cp.pkt_type = cpu_to_le16(conn->pkt_type); cp 748 net/bluetooth/sco.c cp.tx_bandwidth = cpu_to_le32(0x00001f40); cp 749 net/bluetooth/sco.c cp.rx_bandwidth = cpu_to_le32(0x00001f40); cp 750 net/bluetooth/sco.c cp.content_format = cpu_to_le16(setting); cp 755 net/bluetooth/sco.c cp.max_latency = cpu_to_le16(0x0008); cp 757 net/bluetooth/sco.c cp.max_latency = cpu_to_le16(0x000D); cp 758 net/bluetooth/sco.c cp.retrans_effort = 0x02; cp 761 net/bluetooth/sco.c cp.max_latency = cpu_to_le16(0xffff); cp 762 net/bluetooth/sco.c cp.retrans_effort = 0xff; cp 767 net/bluetooth/sco.c sizeof(cp), &cp); cp 949 net/bluetooth/smp.c struct smp_cmd_pairing_confirm cp; cp 957 net/bluetooth/smp.c cp.confirm_val); cp 963 net/bluetooth/smp.c smp_send_cmd(smp->conn, SMP_CMD_PAIRING_CONFIRM, sizeof(cp), &cp); cp 2257 net/bluetooth/smp.c struct smp_cmd_pairing cp; cp 2306 net/bluetooth/smp.c memset(&cp, 0, sizeof(cp)); cp 2307 net/bluetooth/smp.c build_pairing_cmd(conn, &cp, NULL, auth); cp 2310 net/bluetooth/smp.c memcpy(&smp->preq[1], &cp, sizeof(cp)); cp 2312 net/bluetooth/smp.c smp_send_cmd(conn, SMP_CMD_PAIRING_REQ, sizeof(cp), &cp); cp 2381 net/bluetooth/smp.c struct smp_cmd_pairing cp; cp 2383 net/bluetooth/smp.c build_pairing_cmd(conn, &cp, NULL, authreq); cp 2385 net/bluetooth/smp.c memcpy(&smp->preq[1], &cp, sizeof(cp)); cp 2387 net/bluetooth/smp.c smp_send_cmd(conn, SMP_CMD_PAIRING_REQ, sizeof(cp), &cp); cp 2390 net/bluetooth/smp.c struct smp_cmd_security_req cp; cp 2391 net/bluetooth/smp.c cp.auth_req = authreq; cp 2392 net/bluetooth/smp.c smp_send_cmd(conn, SMP_CMD_SECURITY_REQ, sizeof(cp), &cp); cp 380 net/caif/cfctrl.c u8 *cp; cp 434 net/caif/cfctrl.c cp = (u8 *) linkparam.u.rfm.volume; cp 438 net/caif/cfctrl.c *cp++ = tmp; cp 439 net/caif/cfctrl.c *cp = '\0'; cp 459 net/caif/cfctrl.c cp = (u8 *) linkparam.u.utility.name; cp 466 net/caif/cfctrl.c *cp++ = tmp; cp 472 net/caif/cfctrl.c cp = linkparam.u.utility.params; cp 475 net/caif/cfctrl.c *cp++ = tmp; cp 98 net/can/af_can.c const struct can_proto *cp; cp 101 net/can/af_can.c cp = rcu_dereference(proto_tab[protocol]); cp 102 net/can/af_can.c if (cp && !try_module_get(cp->prot->owner)) cp 103 net/can/af_can.c cp = NULL; cp 106 net/can/af_can.c return cp; cp 109 net/can/af_can.c static inline void can_put_proto(const struct can_proto *cp) cp 111 net/can/af_can.c module_put(cp->prot->owner); cp 118 net/can/af_can.c const struct can_proto *cp; cp 126 net/can/af_can.c cp = can_get_proto(protocol); cp 129 net/can/af_can.c if (!cp) { cp 142 net/can/af_can.c cp = can_get_proto(protocol); cp 148 net/can/af_can.c if (!cp) cp 151 net/can/af_can.c if (cp->type != sock->type) { cp 156 net/can/af_can.c sock->ops = cp->ops; cp 158 net/can/af_can.c sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot, kern); cp 177 net/can/af_can.c can_put_proto(cp); cp 719 net/can/af_can.c int can_proto_register(const struct can_proto *cp) cp 721 net/can/af_can.c int proto = cp->protocol; cp 729 net/can/af_can.c err = proto_register(cp->prot, 0); cp 739 net/can/af_can.c RCU_INIT_POINTER(proto_tab[proto], cp); cp 745 net/can/af_can.c proto_unregister(cp->prot); cp 755 net/can/af_can.c void can_proto_unregister(const struct can_proto *cp) cp 757 net/can/af_can.c int proto = cp->protocol; cp 760 net/can/af_can.c BUG_ON(rcu_access_pointer(proto_tab[proto]) != cp); cp 766 net/can/af_can.c proto_unregister(cp->prot); cp 96 net/can/bcm.c static inline u64 get_u64(const struct canfd_frame *cp, int offset) cp 98 net/can/bcm.c return *(u64 *)(cp->data + offset); cp 83 net/dns_resolver/dns_query.c char *desc, *cp; cp 110 net/dns_resolver/dns_query.c cp = desc; cp 112 net/dns_resolver/dns_query.c memcpy(cp, type, typelen); cp 113 net/dns_resolver/dns_query.c cp += typelen; cp 114 net/dns_resolver/dns_query.c *cp++ = ':'; cp 116 net/dns_resolver/dns_query.c memcpy(cp, name, namelen); cp 117 net/dns_resolver/dns_query.c cp += namelen; cp 118 net/dns_resolver/dns_query.c *cp = '\0'; cp 1380 net/ipv4/ipconfig.c char *cp, *cq; cp 1382 net/ipv4/ipconfig.c cp = cq = name; cp 1384 net/ipv4/ipconfig.c while (*cp >= '0' && *cp <= '9') cp 1385 net/ipv4/ipconfig.c cp++; cp 1386 net/ipv4/ipconfig.c if (cp == cq || cp - cq > 3) cp 1388 net/ipv4/ipconfig.c if (*cp == '.' || octets == 3) cp 1391 net/ipv4/ipconfig.c cp++; cp 1392 net/ipv4/ipconfig.c cq = cp; cp 1394 net/ipv4/ipconfig.c if (octets == 4 && (*cp == ':' || *cp == '\0')) { cp 1395 net/ipv4/ipconfig.c if (*cp == ':') cp 1396 net/ipv4/ipconfig.c *cp++ = '\0'; cp 1398 net/ipv4/ipconfig.c memmove(name, cp, strlen(cp) + 1); cp 1670 net/ipv4/ipconfig.c char *cp, *ip, *dp; cp 1698 net/ipv4/ipconfig.c if ((cp = strchr(ip, ':'))) cp 1699 net/ipv4/ipconfig.c *cp++ = '\0'; cp 1761 net/ipv4/ipconfig.c ip = cp; cp 259 net/netfilter/ipvs/ip_vs_app.c int ip_vs_bind_app(struct ip_vs_conn *cp, cp 262 net/netfilter/ipvs/ip_vs_app.c return pp->app_conn_bind(cp); cp 269 net/netfilter/ipvs/ip_vs_app.c void ip_vs_unbind_app(struct ip_vs_conn *cp) cp 271 net/netfilter/ipvs/ip_vs_app.c struct ip_vs_app *inc = cp->app; cp 277 net/netfilter/ipvs/ip_vs_app.c inc->unbind_conn(inc, cp); cp 279 net/netfilter/ipvs/ip_vs_app.c inc->done_conn(inc, cp); cp 281 net/netfilter/ipvs/ip_vs_app.c cp->app = NULL; cp 346 net/netfilter/ipvs/ip_vs_app.c static inline void vs_seq_update(struct ip_vs_conn *cp, struct ip_vs_seq *vseq, cp 350 net/netfilter/ipvs/ip_vs_app.c spin_lock_bh(&cp->lock); cp 351 net/netfilter/ipvs/ip_vs_app.c if (!(cp->flags & flag) || after(seq, vseq->init_seq)) { cp 355 net/netfilter/ipvs/ip_vs_app.c cp->flags |= flag; cp 357 net/netfilter/ipvs/ip_vs_app.c spin_unlock_bh(&cp->lock); cp 360 net/netfilter/ipvs/ip_vs_app.c static inline int app_tcp_pkt_out(struct ip_vs_conn *cp, struct sk_buff *skb, cp 382 net/netfilter/ipvs/ip_vs_app.c if (cp->flags & IP_VS_CONN_F_OUT_SEQ) cp 383 net/netfilter/ipvs/ip_vs_app.c vs_fix_seq(&cp->out_seq, th); cp 384 net/netfilter/ipvs/ip_vs_app.c if (cp->flags & IP_VS_CONN_F_IN_SEQ) cp 385 net/netfilter/ipvs/ip_vs_app.c vs_fix_ack_seq(&cp->in_seq, th); cp 393 net/netfilter/ipvs/ip_vs_app.c if (!app->pkt_out(app, cp, skb, &diff, ipvsh)) cp 400 net/netfilter/ipvs/ip_vs_app.c vs_seq_update(cp, &cp->out_seq, cp 411 net/netfilter/ipvs/ip_vs_app.c int ip_vs_app_pkt_out(struct ip_vs_conn *cp, struct sk_buff *skb, cp 420 net/netfilter/ipvs/ip_vs_app.c if ((app = cp->app) == NULL) cp 424 net/netfilter/ipvs/ip_vs_app.c if (cp->protocol == IPPROTO_TCP) cp 425 net/netfilter/ipvs/ip_vs_app.c return app_tcp_pkt_out(cp, skb, app, ipvsh); cp 433 net/netfilter/ipvs/ip_vs_app.c return app->pkt_out(app, cp, skb, NULL, ipvsh); cp 437 net/netfilter/ipvs/ip_vs_app.c static inline int app_tcp_pkt_in(struct ip_vs_conn *cp, struct sk_buff *skb, cp 459 net/netfilter/ipvs/ip_vs_app.c if (cp->flags & IP_VS_CONN_F_IN_SEQ) cp 460 net/netfilter/ipvs/ip_vs_app.c vs_fix_seq(&cp->in_seq, th); cp 461 net/netfilter/ipvs/ip_vs_app.c if (cp->flags & IP_VS_CONN_F_OUT_SEQ) cp 462 net/netfilter/ipvs/ip_vs_app.c vs_fix_ack_seq(&cp->out_seq, th); cp 470 net/netfilter/ipvs/ip_vs_app.c if (!app->pkt_in(app, cp, skb, &diff, ipvsh)) cp 477 net/netfilter/ipvs/ip_vs_app.c vs_seq_update(cp, &cp->in_seq, cp 488 net/netfilter/ipvs/ip_vs_app.c int ip_vs_app_pkt_in(struct ip_vs_conn *cp, struct sk_buff *skb, cp 497 net/netfilter/ipvs/ip_vs_app.c if ((app = cp->app) == NULL) cp 501 net/netfilter/ipvs/ip_vs_app.c if (cp->protocol == IPPROTO_TCP) cp 502 net/netfilter/ipvs/ip_vs_app.c return app_tcp_pkt_in(cp, skb, app, ipvsh); cp 510 net/netfilter/ipvs/ip_vs_app.c return app->pkt_in(app, cp, skb, NULL, ipvsh); cp 143 net/netfilter/ipvs/ip_vs_conn.c static unsigned int ip_vs_conn_hashkey_conn(const struct ip_vs_conn *cp) cp 147 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, cp 148 net/netfilter/ipvs/ip_vs_conn.c &cp->caddr, cp->cport, NULL, 0, &p); cp 150 net/netfilter/ipvs/ip_vs_conn.c if (cp->pe) { cp 151 net/netfilter/ipvs/ip_vs_conn.c p.pe = cp->pe; cp 152 net/netfilter/ipvs/ip_vs_conn.c p.pe_data = cp->pe_data; cp 153 net/netfilter/ipvs/ip_vs_conn.c p.pe_data_len = cp->pe_data_len; cp 163 net/netfilter/ipvs/ip_vs_conn.c static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) cp 168 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 172 net/netfilter/ipvs/ip_vs_conn.c hash = ip_vs_conn_hashkey_conn(cp); cp 175 net/netfilter/ipvs/ip_vs_conn.c spin_lock(&cp->lock); cp 177 net/netfilter/ipvs/ip_vs_conn.c if (!(cp->flags & IP_VS_CONN_F_HASHED)) { cp 178 net/netfilter/ipvs/ip_vs_conn.c cp->flags |= IP_VS_CONN_F_HASHED; cp 179 net/netfilter/ipvs/ip_vs_conn.c refcount_inc(&cp->refcnt); cp 180 net/netfilter/ipvs/ip_vs_conn.c hlist_add_head_rcu(&cp->c_list, &ip_vs_conn_tab[hash]); cp 188 net/netfilter/ipvs/ip_vs_conn.c spin_unlock(&cp->lock); cp 199 net/netfilter/ipvs/ip_vs_conn.c static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) cp 205 net/netfilter/ipvs/ip_vs_conn.c hash = ip_vs_conn_hashkey_conn(cp); cp 208 net/netfilter/ipvs/ip_vs_conn.c spin_lock(&cp->lock); cp 210 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_HASHED) { cp 211 net/netfilter/ipvs/ip_vs_conn.c hlist_del_rcu(&cp->c_list); cp 212 net/netfilter/ipvs/ip_vs_conn.c cp->flags &= ~IP_VS_CONN_F_HASHED; cp 213 net/netfilter/ipvs/ip_vs_conn.c refcount_dec(&cp->refcnt); cp 218 net/netfilter/ipvs/ip_vs_conn.c spin_unlock(&cp->lock); cp 227 net/netfilter/ipvs/ip_vs_conn.c static inline bool ip_vs_conn_unlink(struct ip_vs_conn *cp) cp 232 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 233 net/netfilter/ipvs/ip_vs_conn.c return refcount_dec_if_one(&cp->refcnt); cp 235 net/netfilter/ipvs/ip_vs_conn.c hash = ip_vs_conn_hashkey_conn(cp); cp 238 net/netfilter/ipvs/ip_vs_conn.c spin_lock(&cp->lock); cp 240 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_HASHED) { cp 242 net/netfilter/ipvs/ip_vs_conn.c if (refcount_dec_if_one(&cp->refcnt)) { cp 243 net/netfilter/ipvs/ip_vs_conn.c hlist_del_rcu(&cp->c_list); cp 244 net/netfilter/ipvs/ip_vs_conn.c cp->flags &= ~IP_VS_CONN_F_HASHED; cp 249 net/netfilter/ipvs/ip_vs_conn.c spin_unlock(&cp->lock); cp 266 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 272 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[hash], c_list) { cp 273 net/netfilter/ipvs/ip_vs_conn.c if (p->cport == cp->cport && p->vport == cp->vport && cp 274 net/netfilter/ipvs/ip_vs_conn.c cp->af == p->af && cp 275 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_equal(p->af, p->caddr, &cp->caddr) && cp 276 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_equal(p->af, p->vaddr, &cp->vaddr) && cp 277 net/netfilter/ipvs/ip_vs_conn.c ((!p->cport) ^ (!(cp->flags & IP_VS_CONN_F_NO_CPORT))) && cp 278 net/netfilter/ipvs/ip_vs_conn.c p->protocol == cp->protocol && cp 279 net/netfilter/ipvs/ip_vs_conn.c cp->ipvs == p->ipvs) { cp 280 net/netfilter/ipvs/ip_vs_conn.c if (!__ip_vs_conn_get(cp)) cp 284 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 295 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 297 net/netfilter/ipvs/ip_vs_conn.c cp = __ip_vs_conn_in_get(p); cp 298 net/netfilter/ipvs/ip_vs_conn.c if (!cp && atomic_read(&ip_vs_conn_no_cport_cnt)) { cp 301 net/netfilter/ipvs/ip_vs_conn.c cp = __ip_vs_conn_in_get(&cport_zero_p); cp 308 net/netfilter/ipvs/ip_vs_conn.c cp ? "hit" : "not hit"); cp 310 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 352 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 358 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[hash], c_list) { cp 360 net/netfilter/ipvs/ip_vs_conn.c if (cp->ipvs != p->ipvs) cp 362 net/netfilter/ipvs/ip_vs_conn.c if (p->pe == cp->pe && p->pe->ct_match(p, cp)) { cp 363 net/netfilter/ipvs/ip_vs_conn.c if (__ip_vs_conn_get(cp)) cp 369 net/netfilter/ipvs/ip_vs_conn.c if (cp->af == p->af && cp 370 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_equal(p->af, p->caddr, &cp->caddr) && cp 374 net/netfilter/ipvs/ip_vs_conn.c p->af, p->vaddr, &cp->vaddr) && cp 375 net/netfilter/ipvs/ip_vs_conn.c p->vport == cp->vport && p->cport == cp->cport && cp 376 net/netfilter/ipvs/ip_vs_conn.c cp->flags & IP_VS_CONN_F_TEMPLATE && cp 377 net/netfilter/ipvs/ip_vs_conn.c p->protocol == cp->protocol && cp 378 net/netfilter/ipvs/ip_vs_conn.c cp->ipvs == p->ipvs) { cp 379 net/netfilter/ipvs/ip_vs_conn.c if (__ip_vs_conn_get(cp)) cp 383 net/netfilter/ipvs/ip_vs_conn.c cp = NULL; cp 392 net/netfilter/ipvs/ip_vs_conn.c cp ? "hit" : "not hit"); cp 394 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 404 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp, *ret=NULL; cp 413 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[hash], c_list) { cp 414 net/netfilter/ipvs/ip_vs_conn.c if (p->vport == cp->cport && p->cport == cp->dport && cp 415 net/netfilter/ipvs/ip_vs_conn.c cp->af == p->af && cp 416 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_equal(p->af, p->vaddr, &cp->caddr) && cp 417 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_equal(p->af, p->caddr, &cp->daddr) && cp 418 net/netfilter/ipvs/ip_vs_conn.c p->protocol == cp->protocol && cp 419 net/netfilter/ipvs/ip_vs_conn.c cp->ipvs == p->ipvs) { cp 420 net/netfilter/ipvs/ip_vs_conn.c if (!__ip_vs_conn_get(cp)) cp 423 net/netfilter/ipvs/ip_vs_conn.c ret = cp; cp 456 net/netfilter/ipvs/ip_vs_conn.c static void __ip_vs_conn_put_timer(struct ip_vs_conn *cp) cp 458 net/netfilter/ipvs/ip_vs_conn.c unsigned long t = (cp->flags & IP_VS_CONN_F_ONE_PACKET) ? cp 459 net/netfilter/ipvs/ip_vs_conn.c 0 : cp->timeout; cp 460 net/netfilter/ipvs/ip_vs_conn.c mod_timer(&cp->timer, jiffies+t); cp 462 net/netfilter/ipvs/ip_vs_conn.c __ip_vs_conn_put(cp); cp 465 net/netfilter/ipvs/ip_vs_conn.c void ip_vs_conn_put(struct ip_vs_conn *cp) cp 467 net/netfilter/ipvs/ip_vs_conn.c if ((cp->flags & IP_VS_CONN_F_ONE_PACKET) && cp 468 net/netfilter/ipvs/ip_vs_conn.c (refcount_read(&cp->refcnt) == 1) && cp 469 net/netfilter/ipvs/ip_vs_conn.c !timer_pending(&cp->timer)) cp 471 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_expire(&cp->timer); cp 473 net/netfilter/ipvs/ip_vs_conn.c __ip_vs_conn_put_timer(cp); cp 479 net/netfilter/ipvs/ip_vs_conn.c void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport) cp 481 net/netfilter/ipvs/ip_vs_conn.c if (ip_vs_conn_unhash(cp)) { cp 482 net/netfilter/ipvs/ip_vs_conn.c spin_lock_bh(&cp->lock); cp 483 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_NO_CPORT) { cp 485 net/netfilter/ipvs/ip_vs_conn.c cp->flags &= ~IP_VS_CONN_F_NO_CPORT; cp 486 net/netfilter/ipvs/ip_vs_conn.c cp->cport = cport; cp 488 net/netfilter/ipvs/ip_vs_conn.c spin_unlock_bh(&cp->lock); cp 491 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_hash(cp); cp 500 net/netfilter/ipvs/ip_vs_conn.c static inline void ip_vs_bind_xmit(struct ip_vs_conn *cp) cp 502 net/netfilter/ipvs/ip_vs_conn.c switch (IP_VS_FWD_METHOD(cp)) { cp 504 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_nat_xmit; cp 509 net/netfilter/ipvs/ip_vs_conn.c if (cp->daf == AF_INET6) cp 510 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_tunnel_xmit_v6; cp 513 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_tunnel_xmit; cp 517 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_dr_xmit; cp 521 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_null_xmit; cp 525 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_bypass_xmit; cp 531 net/netfilter/ipvs/ip_vs_conn.c static inline void ip_vs_bind_xmit_v6(struct ip_vs_conn *cp) cp 533 net/netfilter/ipvs/ip_vs_conn.c switch (IP_VS_FWD_METHOD(cp)) { cp 535 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_nat_xmit_v6; cp 539 net/netfilter/ipvs/ip_vs_conn.c if (cp->daf == AF_INET6) cp 540 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_tunnel_xmit_v6; cp 542 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_tunnel_xmit; cp 546 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_dr_xmit_v6; cp 550 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_null_xmit; cp 554 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = ip_vs_bypass_xmit_v6; cp 572 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest) cp 585 net/netfilter/ipvs/ip_vs_conn.c if (cp->protocol != IPPROTO_UDP) cp 587 net/netfilter/ipvs/ip_vs_conn.c flags = cp->flags; cp 599 net/netfilter/ipvs/ip_vs_conn.c cp->flags = flags; cp 600 net/netfilter/ipvs/ip_vs_conn.c cp->dest = dest; cp 605 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 606 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), cp 607 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), cp 608 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), cp 609 net/netfilter/ipvs/ip_vs_conn.c ip_vs_fwd_tag(cp), cp->state, cp 610 net/netfilter/ipvs/ip_vs_conn.c cp->flags, refcount_read(&cp->refcnt), cp 639 net/netfilter/ipvs/ip_vs_conn.c void ip_vs_try_bind_dest(struct ip_vs_conn *cp) cp 650 net/netfilter/ipvs/ip_vs_conn.c dest = ip_vs_find_dest(cp->ipvs, cp->af, cp->af, &cp->daddr, cp 651 net/netfilter/ipvs/ip_vs_conn.c cp->dport, &cp->vaddr, cp->vport, cp 652 net/netfilter/ipvs/ip_vs_conn.c cp->protocol, cp->fwmark, cp->flags); cp 656 net/netfilter/ipvs/ip_vs_conn.c spin_lock_bh(&cp->lock); cp 657 net/netfilter/ipvs/ip_vs_conn.c if (cp->dest) { cp 658 net/netfilter/ipvs/ip_vs_conn.c spin_unlock_bh(&cp->lock); cp 665 net/netfilter/ipvs/ip_vs_conn.c if (cp->app) cp 666 net/netfilter/ipvs/ip_vs_conn.c ip_vs_unbind_app(cp); cp 668 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_dest(cp, dest); cp 669 net/netfilter/ipvs/ip_vs_conn.c spin_unlock_bh(&cp->lock); cp 672 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = NULL; cp 674 net/netfilter/ipvs/ip_vs_conn.c if (cp->af == AF_INET6) cp 675 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_xmit_v6(cp); cp 678 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_xmit(cp); cp 680 net/netfilter/ipvs/ip_vs_conn.c pd = ip_vs_proto_data_get(cp->ipvs, cp->protocol); cp 682 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_app(cp, pd->pp); cp 692 net/netfilter/ipvs/ip_vs_conn.c static inline void ip_vs_unbind_dest(struct ip_vs_conn *cp) cp 694 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_dest *dest = cp->dest; cp 702 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 703 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), cp 704 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), cp 705 net/netfilter/ipvs/ip_vs_conn.c IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), cp 706 net/netfilter/ipvs/ip_vs_conn.c ip_vs_fwd_tag(cp), cp->state, cp 707 net/netfilter/ipvs/ip_vs_conn.c cp->flags, refcount_read(&cp->refcnt), cp 711 net/netfilter/ipvs/ip_vs_conn.c if (!(cp->flags & IP_VS_CONN_F_TEMPLATE)) { cp 714 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_INACTIVE) { cp 802 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp = container_of(head, struct ip_vs_conn, cp 805 net/netfilter/ipvs/ip_vs_conn.c ip_vs_pe_put(cp->pe); cp 806 net/netfilter/ipvs/ip_vs_conn.c kfree(cp->pe_data); cp 807 net/netfilter/ipvs/ip_vs_conn.c kmem_cache_free(ip_vs_conn_cachep, cp); cp 812 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp = from_timer(cp, t, timer); cp 813 net/netfilter/ipvs/ip_vs_conn.c struct netns_ipvs *ipvs = cp->ipvs; cp 818 net/netfilter/ipvs/ip_vs_conn.c if (atomic_read(&cp->n_control)) cp 822 net/netfilter/ipvs/ip_vs_conn.c if (likely(ip_vs_conn_unlink(cp))) { cp 823 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *ct = cp->control; cp 826 net/netfilter/ipvs/ip_vs_conn.c del_timer(&cp->timer); cp 830 net/netfilter/ipvs/ip_vs_conn.c ip_vs_control_del(cp); cp 832 net/netfilter/ipvs/ip_vs_conn.c if (!cp->timeout && !atomic_read(&ct->n_control) && cp 841 net/netfilter/ipvs/ip_vs_conn.c if ((cp->flags & IP_VS_CONN_F_NFCT) && cp 842 net/netfilter/ipvs/ip_vs_conn.c !(cp->flags & IP_VS_CONN_F_ONE_PACKET)) { cp 849 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_drop_conntrack(cp); cp 852 net/netfilter/ipvs/ip_vs_conn.c if (unlikely(cp->app != NULL)) cp 853 net/netfilter/ipvs/ip_vs_conn.c ip_vs_unbind_app(cp); cp 854 net/netfilter/ipvs/ip_vs_conn.c ip_vs_unbind_dest(cp); cp 855 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_NO_CPORT) cp 857 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 858 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_rcu_free(&cp->rcu_head); cp 860 net/netfilter/ipvs/ip_vs_conn.c call_rcu(&cp->rcu_head, ip_vs_conn_rcu_free); cp 867 net/netfilter/ipvs/ip_vs_conn.c refcount_read(&cp->refcnt), cp 868 net/netfilter/ipvs/ip_vs_conn.c atomic_read(&cp->n_control)); cp 870 net/netfilter/ipvs/ip_vs_conn.c refcount_inc(&cp->refcnt); cp 871 net/netfilter/ipvs/ip_vs_conn.c cp->timeout = 60*HZ; cp 874 net/netfilter/ipvs/ip_vs_conn.c ip_vs_sync_conn(ipvs, cp, sysctl_sync_threshold(ipvs)); cp 876 net/netfilter/ipvs/ip_vs_conn.c __ip_vs_conn_put_timer(cp); cp 886 net/netfilter/ipvs/ip_vs_conn.c void ip_vs_conn_expire_now(struct ip_vs_conn *cp) cp 891 net/netfilter/ipvs/ip_vs_conn.c if (timer_pending(&cp->timer) && cp 892 net/netfilter/ipvs/ip_vs_conn.c time_after(cp->timer.expires, jiffies)) cp 893 net/netfilter/ipvs/ip_vs_conn.c mod_timer_pending(&cp->timer, jiffies); cp 905 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 910 net/netfilter/ipvs/ip_vs_conn.c cp = kmem_cache_alloc(ip_vs_conn_cachep, GFP_ATOMIC); cp 911 net/netfilter/ipvs/ip_vs_conn.c if (cp == NULL) { cp 916 net/netfilter/ipvs/ip_vs_conn.c INIT_HLIST_NODE(&cp->c_list); cp 917 net/netfilter/ipvs/ip_vs_conn.c timer_setup(&cp->timer, ip_vs_conn_expire, 0); cp 918 net/netfilter/ipvs/ip_vs_conn.c cp->ipvs = ipvs; cp 919 net/netfilter/ipvs/ip_vs_conn.c cp->af = p->af; cp 920 net/netfilter/ipvs/ip_vs_conn.c cp->daf = dest_af; cp 921 net/netfilter/ipvs/ip_vs_conn.c cp->protocol = p->protocol; cp 922 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_set(p->af, &cp->caddr, p->caddr); cp 923 net/netfilter/ipvs/ip_vs_conn.c cp->cport = p->cport; cp 926 net/netfilter/ipvs/ip_vs_conn.c &cp->vaddr, p->vaddr); cp 927 net/netfilter/ipvs/ip_vs_conn.c cp->vport = p->vport; cp 928 net/netfilter/ipvs/ip_vs_conn.c ip_vs_addr_set(cp->daf, &cp->daddr, daddr); cp 929 net/netfilter/ipvs/ip_vs_conn.c cp->dport = dport; cp 930 net/netfilter/ipvs/ip_vs_conn.c cp->flags = flags; cp 931 net/netfilter/ipvs/ip_vs_conn.c cp->fwmark = fwmark; cp 934 net/netfilter/ipvs/ip_vs_conn.c cp->pe = p->pe; cp 935 net/netfilter/ipvs/ip_vs_conn.c cp->pe_data = p->pe_data; cp 936 net/netfilter/ipvs/ip_vs_conn.c cp->pe_data_len = p->pe_data_len; cp 938 net/netfilter/ipvs/ip_vs_conn.c cp->pe = NULL; cp 939 net/netfilter/ipvs/ip_vs_conn.c cp->pe_data = NULL; cp 940 net/netfilter/ipvs/ip_vs_conn.c cp->pe_data_len = 0; cp 942 net/netfilter/ipvs/ip_vs_conn.c spin_lock_init(&cp->lock); cp 949 net/netfilter/ipvs/ip_vs_conn.c refcount_set(&cp->refcnt, 1); cp 951 net/netfilter/ipvs/ip_vs_conn.c cp->control = NULL; cp 952 net/netfilter/ipvs/ip_vs_conn.c atomic_set(&cp->n_control, 0); cp 953 net/netfilter/ipvs/ip_vs_conn.c atomic_set(&cp->in_pkts, 0); cp 955 net/netfilter/ipvs/ip_vs_conn.c cp->packet_xmit = NULL; cp 956 net/netfilter/ipvs/ip_vs_conn.c cp->app = NULL; cp 957 net/netfilter/ipvs/ip_vs_conn.c cp->app_data = NULL; cp 959 net/netfilter/ipvs/ip_vs_conn.c cp->in_seq.delta = 0; cp 960 net/netfilter/ipvs/ip_vs_conn.c cp->out_seq.delta = 0; cp 967 net/netfilter/ipvs/ip_vs_conn.c cp->dest = NULL; cp 968 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_dest(cp, dest); cp 971 net/netfilter/ipvs/ip_vs_conn.c cp->state = 0; cp 972 net/netfilter/ipvs/ip_vs_conn.c cp->old_state = 0; cp 973 net/netfilter/ipvs/ip_vs_conn.c cp->timeout = 3*HZ; cp 974 net/netfilter/ipvs/ip_vs_conn.c cp->sync_endtime = jiffies & ~3UL; cp 979 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_xmit_v6(cp); cp 982 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_xmit(cp); cp 985 net/netfilter/ipvs/ip_vs_conn.c ip_vs_bind_app(cp, pd->pp); cp 995 net/netfilter/ipvs/ip_vs_conn.c cp->flags |= IP_VS_CONN_F_NFCT; cp 998 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_hash(cp); cp 1000 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 1015 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 1019 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) { cp 1025 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 1046 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp = v; cp 1057 net/netfilter/ipvs/ip_vs_conn.c e = rcu_dereference(hlist_next_rcu(&cp->c_list)); cp 1063 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) { cp 1065 net/netfilter/ipvs/ip_vs_conn.c return cp; cp 1086 net/netfilter/ipvs/ip_vs_conn.c const struct ip_vs_conn *cp = v; cp 1092 net/netfilter/ipvs/ip_vs_conn.c if (!net_eq(cp->ipvs->net, net)) cp 1094 net/netfilter/ipvs/ip_vs_conn.c if (cp->pe_data) { cp 1096 net/netfilter/ipvs/ip_vs_conn.c len = strlen(cp->pe->name); cp 1097 net/netfilter/ipvs/ip_vs_conn.c memcpy(pe_data + 1, cp->pe->name, len); cp 1100 net/netfilter/ipvs/ip_vs_conn.c len += cp->pe->show_pe_data(cp, pe_data + len); cp 1105 net/netfilter/ipvs/ip_vs_conn.c if (cp->daf == AF_INET6) cp 1106 net/netfilter/ipvs/ip_vs_conn.c snprintf(dbuf, sizeof(dbuf), "%pI6", &cp->daddr.in6); cp 1110 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->daddr.ip)); cp 1113 net/netfilter/ipvs/ip_vs_conn.c if (cp->af == AF_INET6) cp 1116 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 1117 net/netfilter/ipvs/ip_vs_conn.c &cp->caddr.in6, ntohs(cp->cport), cp 1118 net/netfilter/ipvs/ip_vs_conn.c &cp->vaddr.in6, ntohs(cp->vport), cp 1119 net/netfilter/ipvs/ip_vs_conn.c dbuf, ntohs(cp->dport), cp 1120 net/netfilter/ipvs/ip_vs_conn.c ip_vs_state_name(cp), cp 1121 net/netfilter/ipvs/ip_vs_conn.c jiffies_delta_to_msecs(cp->timer.expires - cp 1129 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 1130 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->caddr.ip), ntohs(cp->cport), cp 1131 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->vaddr.ip), ntohs(cp->vport), cp 1132 net/netfilter/ipvs/ip_vs_conn.c dbuf, ntohs(cp->dport), cp 1133 net/netfilter/ipvs/ip_vs_conn.c ip_vs_state_name(cp), cp 1134 net/netfilter/ipvs/ip_vs_conn.c jiffies_delta_to_msecs(cp->timer.expires - cp 1164 net/netfilter/ipvs/ip_vs_conn.c const struct ip_vs_conn *cp = v; cp 1167 net/netfilter/ipvs/ip_vs_conn.c if (!net_eq(cp->ipvs->net, net)) cp 1171 net/netfilter/ipvs/ip_vs_conn.c if (cp->daf == AF_INET6) cp 1172 net/netfilter/ipvs/ip_vs_conn.c snprintf(dbuf, sizeof(dbuf), "%pI6", &cp->daddr.in6); cp 1176 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->daddr.ip)); cp 1179 net/netfilter/ipvs/ip_vs_conn.c if (cp->af == AF_INET6) cp 1182 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 1183 net/netfilter/ipvs/ip_vs_conn.c &cp->caddr.in6, ntohs(cp->cport), cp 1184 net/netfilter/ipvs/ip_vs_conn.c &cp->vaddr.in6, ntohs(cp->vport), cp 1185 net/netfilter/ipvs/ip_vs_conn.c dbuf, ntohs(cp->dport), cp 1186 net/netfilter/ipvs/ip_vs_conn.c ip_vs_state_name(cp), cp 1187 net/netfilter/ipvs/ip_vs_conn.c ip_vs_origin_name(cp->flags), cp 1188 net/netfilter/ipvs/ip_vs_conn.c jiffies_delta_to_msecs(cp->timer.expires - cp 1195 net/netfilter/ipvs/ip_vs_conn.c ip_vs_proto_name(cp->protocol), cp 1196 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->caddr.ip), ntohs(cp->cport), cp 1197 net/netfilter/ipvs/ip_vs_conn.c ntohl(cp->vaddr.ip), ntohs(cp->vport), cp 1198 net/netfilter/ipvs/ip_vs_conn.c dbuf, ntohs(cp->dport), cp 1199 net/netfilter/ipvs/ip_vs_conn.c ip_vs_state_name(cp), cp 1200 net/netfilter/ipvs/ip_vs_conn.c ip_vs_origin_name(cp->flags), cp 1201 net/netfilter/ipvs/ip_vs_conn.c jiffies_delta_to_msecs(cp->timer.expires - cp 1222 net/netfilter/ipvs/ip_vs_conn.c static inline int todrop_entry(struct ip_vs_conn *cp) cp 1235 net/netfilter/ipvs/ip_vs_conn.c if (time_before(cp->timeout + jiffies, cp->timer.expires + 60*HZ)) cp 1240 net/netfilter/ipvs/ip_vs_conn.c i = atomic_read(&cp->in_pkts); cp 1250 net/netfilter/ipvs/ip_vs_conn.c static inline bool ip_vs_conn_ops_mode(struct ip_vs_conn *cp) cp 1254 net/netfilter/ipvs/ip_vs_conn.c if (!cp->dest) cp 1256 net/netfilter/ipvs/ip_vs_conn.c svc = rcu_dereference(cp->dest->svc); cp 1264 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp; cp 1273 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[hash], c_list) { cp 1274 net/netfilter/ipvs/ip_vs_conn.c if (cp->ipvs != ipvs) cp 1276 net/netfilter/ipvs/ip_vs_conn.c if (atomic_read(&cp->n_control)) cp 1278 net/netfilter/ipvs/ip_vs_conn.c if (cp->flags & IP_VS_CONN_F_TEMPLATE) { cp 1280 net/netfilter/ipvs/ip_vs_conn.c if (ip_vs_conn_ops_mode(cp)) cp 1282 net/netfilter/ipvs/ip_vs_conn.c if (!(cp->state & IP_VS_CTPL_S_ASSURED)) cp 1286 net/netfilter/ipvs/ip_vs_conn.c if (cp->protocol == IPPROTO_TCP) { cp 1287 net/netfilter/ipvs/ip_vs_conn.c switch(cp->state) { cp 1293 net/netfilter/ipvs/ip_vs_conn.c if (todrop_entry(cp)) cp 1300 net/netfilter/ipvs/ip_vs_conn.c } else if (cp->protocol == IPPROTO_SCTP) { cp 1301 net/netfilter/ipvs/ip_vs_conn.c switch (cp->state) { cp 1306 net/netfilter/ipvs/ip_vs_conn.c if (todrop_entry(cp)) cp 1314 net/netfilter/ipvs/ip_vs_conn.c if (!todrop_entry(cp)) cp 1320 net/netfilter/ipvs/ip_vs_conn.c cp->timeout = 0; cp 1321 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_expire_now(cp); cp 1335 net/netfilter/ipvs/ip_vs_conn.c struct ip_vs_conn *cp, *cp_c; cp 1341 net/netfilter/ipvs/ip_vs_conn.c hlist_for_each_entry_rcu(cp, &ip_vs_conn_tab[idx], c_list) { cp 1342 net/netfilter/ipvs/ip_vs_conn.c if (cp->ipvs != ipvs) cp 1348 net/netfilter/ipvs/ip_vs_conn.c cp_c = cp->control; cp 1350 net/netfilter/ipvs/ip_vs_conn.c if (cp_c && __ip_vs_conn_get(cp)) { cp 1353 net/netfilter/ipvs/ip_vs_conn.c __ip_vs_conn_put(cp); cp 1356 net/netfilter/ipvs/ip_vs_conn.c ip_vs_conn_expire_now(cp); cp 74 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); cp 80 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); cp 134 net/netfilter/ipvs/ip_vs_core.c ip_vs_in_stats(struct ip_vs_conn *cp, struct sk_buff *skb) cp 136 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_dest *dest = cp->dest; cp 137 net/netfilter/ipvs/ip_vs_core.c struct netns_ipvs *ipvs = cp->ipvs; cp 170 net/netfilter/ipvs/ip_vs_core.c ip_vs_out_stats(struct ip_vs_conn *cp, struct sk_buff *skb) cp 172 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_dest *dest = cp->dest; cp 173 net/netfilter/ipvs/ip_vs_core.c struct netns_ipvs *ipvs = cp->ipvs; cp 206 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_stats(struct ip_vs_conn *cp, struct ip_vs_service *svc) cp 213 net/netfilter/ipvs/ip_vs_core.c s = this_cpu_ptr(cp->dest->stats.cpustats); cp 233 net/netfilter/ipvs/ip_vs_core.c ip_vs_set_state(struct ip_vs_conn *cp, int direction, cp 238 net/netfilter/ipvs/ip_vs_core.c pd->pp->state_transition(cp, direction, skb, pd); cp 269 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp = NULL; cp 412 net/netfilter/ipvs/ip_vs_core.c cp = ip_vs_conn_new(¶m, dest->af, &dest->addr, dport, flags, dest, cp 414 net/netfilter/ipvs/ip_vs_core.c if (cp == NULL) { cp 423 net/netfilter/ipvs/ip_vs_core.c ip_vs_control_add(cp, ct); cp 426 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_stats(cp, svc); cp 427 net/netfilter/ipvs/ip_vs_core.c return cp; cp 458 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp = NULL; cp 502 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_in_get, cp 507 net/netfilter/ipvs/ip_vs_core.c if (cp) { cp 511 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 561 net/netfilter/ipvs/ip_vs_core.c cp = ip_vs_conn_new(&p, dest->af, &dest->addr, cp 564 net/netfilter/ipvs/ip_vs_core.c if (!cp) { cp 572 net/netfilter/ipvs/ip_vs_core.c ip_vs_fwd_tag(cp), cp 573 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), cp 574 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), cp 575 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->daf, &cp->daddr), ntohs(cp->dport), cp 576 net/netfilter/ipvs/ip_vs_core.c cp->flags, refcount_read(&cp->refcnt)); cp 578 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_stats(cp, svc); cp 579 net/netfilter/ipvs/ip_vs_core.c return cp; cp 616 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 629 net/netfilter/ipvs/ip_vs_core.c cp = ip_vs_conn_new(&p, svc->af, &daddr, 0, cp 632 net/netfilter/ipvs/ip_vs_core.c if (!cp) cp 637 net/netfilter/ipvs/ip_vs_core.c ip_vs_in_stats(cp, skb); cp 640 net/netfilter/ipvs/ip_vs_core.c ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); cp 643 net/netfilter/ipvs/ip_vs_core.c ret = cp->packet_xmit(skb, cp, pd->pp, iph); cp 646 net/netfilter/ipvs/ip_vs_core.c if ((cp->flags & IP_VS_CONN_F_ONE_PACKET) && cp->control) cp 647 net/netfilter/ipvs/ip_vs_core.c atomic_inc(&cp->control->in_pkts); cp 649 net/netfilter/ipvs/ip_vs_core.c atomic_inc(&cp->in_pkts); cp 650 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 767 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp, int inout) cp 776 net/netfilter/ipvs/ip_vs_core.c iph->saddr = cp->vaddr.ip; cp 778 net/netfilter/ipvs/ip_vs_core.c ciph->daddr = cp->vaddr.ip; cp 781 net/netfilter/ipvs/ip_vs_core.c iph->daddr = cp->daddr.ip; cp 783 net/netfilter/ipvs/ip_vs_core.c ciph->saddr = cp->daddr.ip; cp 793 net/netfilter/ipvs/ip_vs_core.c ports[1] = cp->vport; cp 795 net/netfilter/ipvs/ip_vs_core.c ports[0] = cp->dport; cp 813 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp, int inout) cp 831 net/netfilter/ipvs/ip_vs_core.c iph->saddr = cp->vaddr.in6; cp 832 net/netfilter/ipvs/ip_vs_core.c ciph->daddr = cp->vaddr.in6; cp 834 net/netfilter/ipvs/ip_vs_core.c iph->daddr = cp->daddr.in6; cp 835 net/netfilter/ipvs/ip_vs_core.c ciph->saddr = cp->daddr.in6; cp 845 net/netfilter/ipvs/ip_vs_core.c ntohs(inout ? cp->vport : cp->dport)); cp 847 net/netfilter/ipvs/ip_vs_core.c ports[1] = cp->vport; cp 849 net/netfilter/ipvs/ip_vs_core.c ports[0] = cp->dport; cp 876 net/netfilter/ipvs/ip_vs_core.c __u8 protocol, struct ip_vs_conn *cp, cp 883 net/netfilter/ipvs/ip_vs_core.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 902 net/netfilter/ipvs/ip_vs_core.c ip_vs_nat_icmp_v6(skb, pp, cp, 1); cp 905 net/netfilter/ipvs/ip_vs_core.c ip_vs_nat_icmp(skb, pp, cp, 1); cp 907 net/netfilter/ipvs/ip_vs_core.c if (ip_vs_route_me_harder(cp->ipvs, af, skb, hooknum)) cp 911 net/netfilter/ipvs/ip_vs_core.c ip_vs_out_stats(cp, skb); cp 914 net/netfilter/ipvs/ip_vs_core.c if (!(cp->flags & IP_VS_CONN_F_NFCT)) cp 917 net/netfilter/ipvs/ip_vs_core.c ip_vs_update_conntrack(skb, cp, 0); cp 923 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 940 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 998 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_out_get, ip_vs_conn_out_get_proto, cp 1000 net/netfilter/ipvs/ip_vs_core.c if (!cp) cp 1004 net/netfilter/ipvs/ip_vs_core.c return handle_response_icmp(AF_INET, skb, &snet, cih->protocol, cp, cp 1015 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 1055 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_out_get, ip_vs_conn_out_get_proto, cp 1057 net/netfilter/ipvs/ip_vs_core.c if (!cp) cp 1062 net/netfilter/ipvs/ip_vs_core.c return handle_response_icmp(AF_INET6, skb, &snet, ciph.protocol, cp, cp 1119 net/netfilter/ipvs/ip_vs_core.c static inline bool is_new_conn_expected(const struct ip_vs_conn *cp, cp 1123 net/netfilter/ipvs/ip_vs_core.c if (cp->control) cp 1126 net/netfilter/ipvs/ip_vs_core.c switch (cp->protocol) { cp 1128 net/netfilter/ipvs/ip_vs_core.c return (cp->state == IP_VS_TCP_S_TIME_WAIT) || cp 1129 net/netfilter/ipvs/ip_vs_core.c (cp->state == IP_VS_TCP_S_CLOSE) || cp 1131 net/netfilter/ipvs/ip_vs_core.c (cp->state == IP_VS_TCP_S_FIN_WAIT) && cp 1132 net/netfilter/ipvs/ip_vs_core.c (cp->flags & IP_VS_CONN_F_NOOUTPUT)); cp 1134 net/netfilter/ipvs/ip_vs_core.c return cp->state == IP_VS_SCTP_S_CLOSED; cp 1156 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *ct = NULL, *cp = NULL; cp 1210 net/netfilter/ipvs/ip_vs_core.c cp = ip_vs_conn_new(¶m, dest->af, daddr, dport, flags, dest, 0); cp 1211 net/netfilter/ipvs/ip_vs_core.c if (!cp) { cp 1217 net/netfilter/ipvs/ip_vs_core.c ip_vs_control_add(cp, ct); cp 1220 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_stats(cp, svc); cp 1225 net/netfilter/ipvs/ip_vs_core.c ip_vs_fwd_tag(cp), cp 1226 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), ntohs(cp->cport), cp 1227 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), ntohs(cp->vport), cp 1228 net/netfilter/ipvs/ip_vs_core.c IP_VS_DBG_ADDR(cp->af, &cp->daddr), ntohs(cp->dport), cp 1229 net/netfilter/ipvs/ip_vs_core.c cp->flags, refcount_read(&cp->refcnt)); cp 1231 net/netfilter/ipvs/ip_vs_core.c return cp; cp 1247 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp = NULL; cp 1268 net/netfilter/ipvs/ip_vs_core.c cp = pe->conn_out(svc, dest, skb, iph, cp 1273 net/netfilter/ipvs/ip_vs_core.c return cp; cp 1280 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph, cp 1292 net/netfilter/ipvs/ip_vs_core.c !SNAT_CALL(pp->snat_handler, skb, pp, cp, iph)) cp 1297 net/netfilter/ipvs/ip_vs_core.c ipv6_hdr(skb)->saddr = cp->vaddr.in6; cp 1301 net/netfilter/ipvs/ip_vs_core.c ip_hdr(skb)->saddr = cp->vaddr.ip; cp 1320 net/netfilter/ipvs/ip_vs_core.c if (ip_vs_route_me_harder(cp->ipvs, af, skb, hooknum)) cp 1325 net/netfilter/ipvs/ip_vs_core.c ip_vs_out_stats(cp, skb); cp 1326 net/netfilter/ipvs/ip_vs_core.c ip_vs_set_state(cp, IP_VS_DIR_OUTPUT, skb, pd); cp 1328 net/netfilter/ipvs/ip_vs_core.c if (!(cp->flags & IP_VS_CONN_F_NFCT)) cp 1331 net/netfilter/ipvs/ip_vs_core.c ip_vs_update_conntrack(skb, cp, 0); cp 1332 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 1338 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 1353 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 1418 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_out_get, ip_vs_conn_out_get_proto, cp 1421 net/netfilter/ipvs/ip_vs_core.c if (likely(cp)) { cp 1422 net/netfilter/ipvs/ip_vs_core.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 1424 net/netfilter/ipvs/ip_vs_core.c return handle_response(af, skb, pd, cp, &iph, hooknum); cp 1435 net/netfilter/ipvs/ip_vs_core.c cp = __ip_vs_rs_conn_out(hooknum, ipvs, af, skb, &iph); cp 1436 net/netfilter/ipvs/ip_vs_core.c if (likely(cp)) cp 1437 net/netfilter/ipvs/ip_vs_core.c return handle_response(af, skb, pd, cp, &iph, cp 1490 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 1660 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 1776 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_in_get, ip_vs_conn_in_get_proto, cp 1779 net/netfilter/ipvs/ip_vs_core.c if (!cp) { cp 1785 net/netfilter/ipvs/ip_vs_core.c if (!ip_vs_try_to_schedule(ipvs, AF_INET, skb, pd, &v, &cp, &ciph)) cp 1808 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_dest *dest = cp->dest; cp 1846 net/netfilter/ipvs/ip_vs_core.c ip_vs_out_stats(cp, skb); cp 1855 net/netfilter/ipvs/ip_vs_core.c ip_vs_in_stats(cp, skb); cp 1859 net/netfilter/ipvs/ip_vs_core.c verdict = ip_vs_icmp_xmit(skb, cp, pp, offset, hooknum, &ciph); cp 1863 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 1865 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 1877 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 1929 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_in_get, ip_vs_conn_in_get_proto, cp 1932 net/netfilter/ipvs/ip_vs_core.c if (!cp) { cp 1938 net/netfilter/ipvs/ip_vs_core.c if (!ip_vs_try_to_schedule(ipvs, AF_INET6, skb, pd, &v, &cp, &ciph)) cp 1946 net/netfilter/ipvs/ip_vs_core.c (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ)) { cp 1952 net/netfilter/ipvs/ip_vs_core.c ip_vs_in_stats(cp, skb); cp 1960 net/netfilter/ipvs/ip_vs_core.c verdict = ip_vs_icmp_xmit_v6(skb, cp, pp, offset, hooknum, &ciph); cp 1964 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 1966 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 1983 net/netfilter/ipvs/ip_vs_core.c struct ip_vs_conn *cp; cp 2059 net/netfilter/ipvs/ip_vs_core.c cp = INDIRECT_CALL_1(pp->conn_in_get, ip_vs_conn_in_get_proto, cp 2063 net/netfilter/ipvs/ip_vs_core.c if (conn_reuse_mode && !iph.fragoffs && is_new_conn(skb, &iph) && cp) { cp 2066 net/netfilter/ipvs/ip_vs_core.c if (unlikely(sysctl_expire_nodest_conn(ipvs)) && cp->dest && cp 2067 net/netfilter/ipvs/ip_vs_core.c unlikely(!atomic_read(&cp->dest->weight))) { cp 2069 net/netfilter/ipvs/ip_vs_core.c uses_ct = ip_vs_conn_uses_conntrack(cp, skb); cp 2070 net/netfilter/ipvs/ip_vs_core.c } else if (is_new_conn_expected(cp, conn_reuse_mode)) { cp 2071 net/netfilter/ipvs/ip_vs_core.c uses_ct = ip_vs_conn_uses_conntrack(cp, skb); cp 2072 net/netfilter/ipvs/ip_vs_core.c if (!atomic_read(&cp->n_control)) { cp 2084 net/netfilter/ipvs/ip_vs_core.c if (!atomic_read(&cp->n_control)) cp 2085 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_expire_now(cp); cp 2086 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 2089 net/netfilter/ipvs/ip_vs_core.c cp = NULL; cp 2093 net/netfilter/ipvs/ip_vs_core.c if (unlikely(!cp)) { cp 2096 net/netfilter/ipvs/ip_vs_core.c if (!ip_vs_try_to_schedule(ipvs, af, skb, pd, &v, &cp, &iph)) cp 2103 net/netfilter/ipvs/ip_vs_core.c if (cp->dest && !(cp->dest->flags & IP_VS_DEST_F_AVAILABLE)) { cp 2106 net/netfilter/ipvs/ip_vs_core.c __u32 flags = cp->flags; cp 2109 net/netfilter/ipvs/ip_vs_core.c if (timer_pending(&cp->timer)) cp 2110 net/netfilter/ipvs/ip_vs_core.c __ip_vs_conn_put(cp); cp 2112 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 2117 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_expire_now(cp); cp 2123 net/netfilter/ipvs/ip_vs_core.c ip_vs_in_stats(cp, skb); cp 2124 net/netfilter/ipvs/ip_vs_core.c ip_vs_set_state(cp, IP_VS_DIR_INPUT, skb, pd); cp 2125 net/netfilter/ipvs/ip_vs_core.c if (cp->packet_xmit) cp 2126 net/netfilter/ipvs/ip_vs_core.c ret = cp->packet_xmit(skb, cp, pp, &iph); cp 2142 net/netfilter/ipvs/ip_vs_core.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 2145 net/netfilter/ipvs/ip_vs_core.c pkts = atomic_add_return(1, &cp->in_pkts); cp 2148 net/netfilter/ipvs/ip_vs_core.c ip_vs_sync_conn(ipvs, cp, pkts); cp 2149 net/netfilter/ipvs/ip_vs_core.c else if ((cp->flags & IP_VS_CONN_F_ONE_PACKET) && cp->control) cp 2151 net/netfilter/ipvs/ip_vs_core.c atomic_inc(&cp->control->in_pkts); cp 2153 net/netfilter/ipvs/ip_vs_core.c ip_vs_conn_put(cp); cp 77 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_ftp_init_conn(struct ip_vs_app *app, struct ip_vs_conn *cp) cp 80 net/netfilter/ipvs/ip_vs_ftp.c cp->flags |= IP_VS_CONN_F_NFCT; cp 86 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_ftp_done_conn(struct ip_vs_app *app, struct ip_vs_conn *cp) cp 248 net/netfilter/ipvs/ip_vs_ftp.c static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, cp 266 net/netfilter/ipvs/ip_vs_ftp.c if (cp->state != IP_VS_TCP_S_ESTABLISHED) cp 273 net/netfilter/ipvs/ip_vs_ftp.c if (cp->app_data == (void *) IP_VS_FTP_PASV) { cp 284 net/netfilter/ipvs/ip_vs_ftp.c &from, &port, cp->af, cp 289 net/netfilter/ipvs/ip_vs_ftp.c &from.ip, ntohs(port), &cp->caddr.ip, 0); cp 290 net/netfilter/ipvs/ip_vs_ftp.c } else if (cp->app_data == (void *) IP_VS_FTP_EPSV) { cp 300 net/netfilter/ipvs/ip_vs_ftp.c from = cp->daddr; cp 305 net/netfilter/ipvs/ip_vs_ftp.c &from, &port, cp->af, cp 310 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_DBG_ADDR(cp->af, &from), ntohs(port), cp 311 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), 0); cp 320 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_conn_fill_param(cp->ipvs, cp->af, cp 322 net/netfilter/ipvs/ip_vs_ftp.c &cp->caddr, 0, &p); cp 328 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_conn_fill_param(cp->ipvs, cp 329 net/netfilter/ipvs/ip_vs_ftp.c cp->af, ipvsh->protocol, &cp->caddr, cp 330 net/netfilter/ipvs/ip_vs_ftp.c 0, &cp->vaddr, port, &p); cp 331 net/netfilter/ipvs/ip_vs_ftp.c n_cp = ip_vs_conn_new(&p, cp->af, &from, port, cp 334 net/netfilter/ipvs/ip_vs_ftp.c cp->dest, skb->mark); cp 339 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_control_add(n_cp, cp); cp 343 net/netfilter/ipvs/ip_vs_ftp.c if (cp->app_data == (void *) IP_VS_FTP_PASV) { cp 353 net/netfilter/ipvs/ip_vs_ftp.c } else if (cp->app_data == (void *) IP_VS_FTP_EPSV) { cp 393 net/netfilter/ipvs/ip_vs_ftp.c cp->app_data = (void *) IP_VS_FTP_ACTIVE; cp 418 net/netfilter/ipvs/ip_vs_ftp.c static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, cp 432 net/netfilter/ipvs/ip_vs_ftp.c if (cp->state != IP_VS_TCP_S_ESTABLISHED) cp 445 net/netfilter/ipvs/ip_vs_ftp.c if (cp->af == AF_INET && cp 451 net/netfilter/ipvs/ip_vs_ftp.c cp->app_data = (void *) IP_VS_FTP_PASV; cp 465 net/netfilter/ipvs/ip_vs_ftp.c if (cp->af == AF_INET6 && proto == '2') { cp 468 net/netfilter/ipvs/ip_vs_ftp.c if (cp->af == AF_INET && proto == '1') { cp 477 net/netfilter/ipvs/ip_vs_ftp.c cp->app_data = (void *) IP_VS_FTP_EPSV; cp 491 net/netfilter/ipvs/ip_vs_ftp.c if (cp->af == AF_INET && cp 496 net/netfilter/ipvs/ip_vs_ftp.c &to, &port, cp->af, cp 504 net/netfilter/ipvs/ip_vs_ftp.c &to.ip, ntohs(port), &cp->vaddr.ip, cp 505 net/netfilter/ipvs/ip_vs_ftp.c ntohs(cp->vport)-1); cp 510 net/netfilter/ipvs/ip_vs_ftp.c &to, &port, cp->af, cp 514 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_DBG_ADDR(cp->af, &to), ntohs(port)); cp 519 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_DBG_ADDR(cp->af, &to), ntohs(port), cp 520 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 521 net/netfilter/ipvs/ip_vs_ftp.c ntohs(cp->vport)-1); cp 527 net/netfilter/ipvs/ip_vs_ftp.c cp->app_data = (void *) IP_VS_FTP_ACTIVE; cp 531 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_conn_fill_param(cp->ipvs, cp->af, cp 532 net/netfilter/ipvs/ip_vs_ftp.c ipvsh->protocol, &to, port, &cp->vaddr, cp 533 net/netfilter/ipvs/ip_vs_ftp.c htons(ntohs(cp->vport)-1), &p); cp 536 net/netfilter/ipvs/ip_vs_ftp.c n_cp = ip_vs_conn_new(&p, cp->af, &cp->daddr, cp 537 net/netfilter/ipvs/ip_vs_ftp.c htons(ntohs(cp->dport)-1), cp 538 net/netfilter/ipvs/ip_vs_ftp.c IP_VS_CONN_F_NFCT, cp->dest, cp 544 net/netfilter/ipvs/ip_vs_ftp.c ip_vs_control_add(n_cp, cp); cp 71 net/netfilter/ipvs/ip_vs_nfct.c ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, int outin) cp 82 net/netfilter/ipvs/ip_vs_nfct.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 86 net/netfilter/ipvs/ip_vs_nfct.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 94 net/netfilter/ipvs/ip_vs_nfct.c if (cp->app && nf_ct_protonum(ct) == IPPROTO_TCP && cp 109 net/netfilter/ipvs/ip_vs_nfct.c new_tuple.src.u3 = cp->daddr; cp 112 net/netfilter/ipvs/ip_vs_nfct.c new_tuple.src.u.tcp.port = cp->dport; cp 114 net/netfilter/ipvs/ip_vs_nfct.c new_tuple.dst.u3 = cp->vaddr; cp 117 net/netfilter/ipvs/ip_vs_nfct.c new_tuple.dst.u.tcp.port = cp->vport; cp 129 net/netfilter/ipvs/ip_vs_nfct.c __func__, ct, ARG_CONN(cp)); cp 144 net/netfilter/ipvs/ip_vs_nfct.c struct ip_vs_conn *cp; cp 161 net/netfilter/ipvs/ip_vs_nfct.c cp = ip_vs_conn_out_get(&p); cp 162 net/netfilter/ipvs/ip_vs_nfct.c if (cp) { cp 166 net/netfilter/ipvs/ip_vs_nfct.c __func__, ct, ct->status, ARG_CONN(cp)); cp 171 net/netfilter/ipvs/ip_vs_nfct.c new_reply.dst.u3 = cp->vaddr; cp 172 net/netfilter/ipvs/ip_vs_nfct.c new_reply.dst.u.tcp.port = cp->vport; cp 177 net/netfilter/ipvs/ip_vs_nfct.c cp = ip_vs_conn_in_get(&p); cp 178 net/netfilter/ipvs/ip_vs_nfct.c if (cp) { cp 182 net/netfilter/ipvs/ip_vs_nfct.c __func__, ct, ct->status, ARG_CONN(cp)); cp 187 net/netfilter/ipvs/ip_vs_nfct.c new_reply.src.u3 = cp->daddr; cp 188 net/netfilter/ipvs/ip_vs_nfct.c new_reply.src.u.tcp.port = cp->dport; cp 199 net/netfilter/ipvs/ip_vs_nfct.c if (IP_VS_FWD_METHOD(cp) == IP_VS_CONN_F_MASQ) cp 201 net/netfilter/ipvs/ip_vs_nfct.c ip_vs_conn_put(cp); cp 212 net/netfilter/ipvs/ip_vs_nfct.c struct ip_vs_conn *cp, u_int8_t proto, cp 225 net/netfilter/ipvs/ip_vs_nfct.c from_rs ? &cp->daddr : &cp->caddr, cp 226 net/netfilter/ipvs/ip_vs_nfct.c from_rs ? &cp->caddr : &cp->vaddr, cp 228 net/netfilter/ipvs/ip_vs_nfct.c from_rs ? &cp->cport : &cp->vport); cp 242 net/netfilter/ipvs/ip_vs_nfct.c void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp) cp 248 net/netfilter/ipvs/ip_vs_nfct.c if (!cp->cport) cp 252 net/netfilter/ipvs/ip_vs_nfct.c .dst = { .protonum = cp->protocol, .dir = IP_CT_DIR_ORIGINAL } }; cp 253 net/netfilter/ipvs/ip_vs_nfct.c tuple.src.u3 = cp->caddr; cp 254 net/netfilter/ipvs/ip_vs_nfct.c tuple.src.u.all = cp->cport; cp 255 net/netfilter/ipvs/ip_vs_nfct.c tuple.src.l3num = cp->af; cp 256 net/netfilter/ipvs/ip_vs_nfct.c tuple.dst.u3 = cp->vaddr; cp 257 net/netfilter/ipvs/ip_vs_nfct.c tuple.dst.u.all = cp->vport; cp 260 net/netfilter/ipvs/ip_vs_nfct.c __func__, ARG_CONN(cp)); cp 262 net/netfilter/ipvs/ip_vs_nfct.c h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple); cp 141 net/netfilter/ipvs/ip_vs_pe_sip.c static int ip_vs_sip_show_pe_data(const struct ip_vs_conn *cp, char *buf) cp 143 net/netfilter/ipvs/ip_vs_pe_sip.c memcpy(buf, cp->pe_data, cp->pe_data_len); cp 144 net/netfilter/ipvs/ip_vs_pe_sip.c return cp->pe_data_len; cp 196 net/netfilter/ipvs/ip_vs_proto.c const char *ip_vs_state_name(const struct ip_vs_conn *cp) cp 198 net/netfilter/ipvs/ip_vs_proto.c unsigned int state = cp->state; cp 201 net/netfilter/ipvs/ip_vs_proto.c if (cp->flags & IP_VS_CONN_F_TEMPLATE) { cp 207 net/netfilter/ipvs/ip_vs_proto.c pp = ip_vs_proto_get(cp->protocol); cp 209 net/netfilter/ipvs/ip_vs_proto.c return (cp->protocol == IPPROTO_IP) ? "NONE" : "ERR!"; cp 58 net/netfilter/ipvs/ip_vs_proto_ah_esp.c struct ip_vs_conn *cp; cp 62 net/netfilter/ipvs/ip_vs_proto_ah_esp.c cp = ip_vs_conn_in_get(&p); cp 63 net/netfilter/ipvs/ip_vs_proto_ah_esp.c if (!cp) { cp 76 net/netfilter/ipvs/ip_vs_proto_ah_esp.c return cp; cp 84 net/netfilter/ipvs/ip_vs_proto_ah_esp.c struct ip_vs_conn *cp; cp 88 net/netfilter/ipvs/ip_vs_proto_ah_esp.c cp = ip_vs_conn_out_get(&p); cp 89 net/netfilter/ipvs/ip_vs_proto_ah_esp.c if (!cp) { cp 98 net/netfilter/ipvs/ip_vs_proto_ah_esp.c return cp; cp 92 net/netfilter/ipvs/ip_vs_proto_sctp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 99 net/netfilter/ipvs/ip_vs_proto_sctp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 107 net/netfilter/ipvs/ip_vs_proto_sctp.c if (unlikely(cp->app != NULL)) { cp 111 net/netfilter/ipvs/ip_vs_proto_sctp.c if (!sctp_csum_check(cp->af, skb, pp)) cp 115 net/netfilter/ipvs/ip_vs_proto_sctp.c ret = ip_vs_app_pkt_out(cp, skb, iph); cp 126 net/netfilter/ipvs/ip_vs_proto_sctp.c if (sctph->source != cp->vport || payload_csum || cp 128 net/netfilter/ipvs/ip_vs_proto_sctp.c sctph->source = cp->vport; cp 139 net/netfilter/ipvs/ip_vs_proto_sctp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 146 net/netfilter/ipvs/ip_vs_proto_sctp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 154 net/netfilter/ipvs/ip_vs_proto_sctp.c if (unlikely(cp->app != NULL)) { cp 158 net/netfilter/ipvs/ip_vs_proto_sctp.c if (!sctp_csum_check(cp->af, skb, pp)) cp 162 net/netfilter/ipvs/ip_vs_proto_sctp.c ret = ip_vs_app_pkt_in(cp, skb, iph); cp 173 net/netfilter/ipvs/ip_vs_proto_sctp.c if (sctph->dest != cp->dport || payload_csum || cp 176 net/netfilter/ipvs/ip_vs_proto_sctp.c sctph->dest = cp->dport; cp 378 net/netfilter/ipvs/ip_vs_proto_sctp.c set_sctp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, cp 387 net/netfilter/ipvs/ip_vs_proto_sctp.c ihl = cp->af == AF_INET ? ip_hdrlen(skb) : sizeof(struct ipv6hdr); cp 427 net/netfilter/ipvs/ip_vs_proto_sctp.c if (cp->flags & IP_VS_CONN_F_NOOUTPUT) { cp 429 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->flags &= ~IP_VS_CONN_F_NOOUTPUT; cp 434 net/netfilter/ipvs/ip_vs_proto_sctp.c next_state = sctp_states[direction][event][cp->state]; cp 436 net/netfilter/ipvs/ip_vs_proto_sctp.c if (next_state != cp->state) { cp 437 net/netfilter/ipvs/ip_vs_proto_sctp.c struct ip_vs_dest *dest = cp->dest; cp 444 net/netfilter/ipvs/ip_vs_proto_sctp.c IP_VS_DBG_ADDR(cp->daf, &cp->daddr), cp 445 net/netfilter/ipvs/ip_vs_proto_sctp.c ntohs(cp->dport), cp 446 net/netfilter/ipvs/ip_vs_proto_sctp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 447 net/netfilter/ipvs/ip_vs_proto_sctp.c ntohs(cp->cport), cp 448 net/netfilter/ipvs/ip_vs_proto_sctp.c sctp_state_name(cp->state), cp 450 net/netfilter/ipvs/ip_vs_proto_sctp.c refcount_read(&cp->refcnt)); cp 452 net/netfilter/ipvs/ip_vs_proto_sctp.c if (!(cp->flags & IP_VS_CONN_F_INACTIVE) && cp 456 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->flags |= IP_VS_CONN_F_INACTIVE; cp 457 net/netfilter/ipvs/ip_vs_proto_sctp.c } else if ((cp->flags & IP_VS_CONN_F_INACTIVE) && cp 461 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->flags &= ~IP_VS_CONN_F_INACTIVE; cp 465 net/netfilter/ipvs/ip_vs_proto_sctp.c ip_vs_control_assure_ct(cp); cp 468 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->timeout = pd->timeout_table[cp->state = next_state]; cp 470 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->timeout = sctp_timeouts[cp->state = next_state]; cp 474 net/netfilter/ipvs/ip_vs_proto_sctp.c sctp_state_transition(struct ip_vs_conn *cp, int direction, cp 477 net/netfilter/ipvs/ip_vs_proto_sctp.c spin_lock_bh(&cp->lock); cp 478 net/netfilter/ipvs/ip_vs_proto_sctp.c set_sctp_state(pd, cp, direction, skb); cp 479 net/netfilter/ipvs/ip_vs_proto_sctp.c spin_unlock_bh(&cp->lock); cp 519 net/netfilter/ipvs/ip_vs_proto_sctp.c static int sctp_app_conn_bind(struct ip_vs_conn *cp) cp 521 net/netfilter/ipvs/ip_vs_proto_sctp.c struct netns_ipvs *ipvs = cp->ipvs; cp 527 net/netfilter/ipvs/ip_vs_proto_sctp.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 530 net/netfilter/ipvs/ip_vs_proto_sctp.c hash = sctp_app_hashkey(cp->vport); cp 533 net/netfilter/ipvs/ip_vs_proto_sctp.c if (inc->port == cp->vport) { cp 540 net/netfilter/ipvs/ip_vs_proto_sctp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 541 net/netfilter/ipvs/ip_vs_proto_sctp.c ntohs(cp->cport), cp 542 net/netfilter/ipvs/ip_vs_proto_sctp.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 543 net/netfilter/ipvs/ip_vs_proto_sctp.c ntohs(cp->vport), cp 545 net/netfilter/ipvs/ip_vs_proto_sctp.c cp->app = inc; cp 547 net/netfilter/ipvs/ip_vs_proto_sctp.c result = inc->init_conn(inc, cp); cp 148 net/netfilter/ipvs/ip_vs_proto_tcp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 156 net/netfilter/ipvs/ip_vs_proto_tcp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 165 net/netfilter/ipvs/ip_vs_proto_tcp.c if (unlikely(cp->app != NULL)) { cp 169 net/netfilter/ipvs/ip_vs_proto_tcp.c if (!tcp_csum_check(cp->af, skb, pp)) cp 173 net/netfilter/ipvs/ip_vs_proto_tcp.c if (!(ret = ip_vs_app_pkt_out(cp, skb, iph))) cp 183 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->source = cp->vport; cp 187 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, cp 192 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_fast_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, cp 193 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->dport, cp->vport); cp 195 net/netfilter/ipvs/ip_vs_proto_tcp.c skb->ip_summed = cp->app ? cp 202 net/netfilter/ipvs/ip_vs_proto_tcp.c if (cp->af == AF_INET6) cp 203 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->check = csum_ipv6_magic(&cp->vaddr.in6, cp 204 net/netfilter/ipvs/ip_vs_proto_tcp.c &cp->caddr.in6, cp 206 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->protocol, skb->csum); cp 209 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->check = csum_tcpudp_magic(cp->vaddr.ip, cp 210 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->caddr.ip, cp 212 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->protocol, cp 226 net/netfilter/ipvs/ip_vs_proto_tcp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 234 net/netfilter/ipvs/ip_vs_proto_tcp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 243 net/netfilter/ipvs/ip_vs_proto_tcp.c if (unlikely(cp->app != NULL)) { cp 247 net/netfilter/ipvs/ip_vs_proto_tcp.c if (!tcp_csum_check(cp->af, skb, pp)) cp 254 net/netfilter/ipvs/ip_vs_proto_tcp.c if (!(ret = ip_vs_app_pkt_in(cp, skb, iph))) cp 264 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->dest = cp->dport; cp 270 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_partial_csum_update(cp->af, tcph, &cp->vaddr, &cp->daddr, cp 275 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_fast_csum_update(cp->af, tcph, &cp->vaddr, &cp->daddr, cp 276 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->vport, cp->dport); cp 278 net/netfilter/ipvs/ip_vs_proto_tcp.c skb->ip_summed = cp->app ? cp 285 net/netfilter/ipvs/ip_vs_proto_tcp.c if (cp->af == AF_INET6) cp 286 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->check = csum_ipv6_magic(&cp->caddr.in6, cp 287 net/netfilter/ipvs/ip_vs_proto_tcp.c &cp->daddr.in6, cp 289 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->protocol, skb->csum); cp 292 net/netfilter/ipvs/ip_vs_proto_tcp.c tcph->check = csum_tcpudp_magic(cp->caddr.ip, cp 293 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->daddr.ip, cp 295 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->protocol, cp 512 net/netfilter/ipvs/ip_vs_proto_tcp.c set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp, cp 523 net/netfilter/ipvs/ip_vs_proto_tcp.c if (cp->flags & IP_VS_CONN_F_NOOUTPUT) { cp 525 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->flags &= ~IP_VS_CONN_F_NOOUTPUT; cp 536 net/netfilter/ipvs/ip_vs_proto_tcp.c pd->tcp_state_table[state_off+state_idx].next_state[cp->state]; cp 539 net/netfilter/ipvs/ip_vs_proto_tcp.c if (new_state != cp->state) { cp 540 net/netfilter/ipvs/ip_vs_proto_tcp.c struct ip_vs_dest *dest = cp->dest; cp 551 net/netfilter/ipvs/ip_vs_proto_tcp.c IP_VS_DBG_ADDR(cp->daf, &cp->daddr), cp 552 net/netfilter/ipvs/ip_vs_proto_tcp.c ntohs(cp->dport), cp 553 net/netfilter/ipvs/ip_vs_proto_tcp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 554 net/netfilter/ipvs/ip_vs_proto_tcp.c ntohs(cp->cport), cp 555 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_state_name(cp->state), cp 557 net/netfilter/ipvs/ip_vs_proto_tcp.c refcount_read(&cp->refcnt)); cp 560 net/netfilter/ipvs/ip_vs_proto_tcp.c if (!(cp->flags & IP_VS_CONN_F_INACTIVE) && cp 564 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->flags |= IP_VS_CONN_F_INACTIVE; cp 565 net/netfilter/ipvs/ip_vs_proto_tcp.c } else if ((cp->flags & IP_VS_CONN_F_INACTIVE) && cp 569 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->flags &= ~IP_VS_CONN_F_INACTIVE; cp 573 net/netfilter/ipvs/ip_vs_proto_tcp.c ip_vs_control_assure_ct(cp); cp 577 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->timeout = pd->timeout_table[cp->state = new_state]; cp 579 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->timeout = tcp_timeouts[cp->state = new_state]; cp 586 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_state_transition(struct ip_vs_conn *cp, int direction, cp 593 net/netfilter/ipvs/ip_vs_proto_tcp.c int ihl = cp->af == AF_INET ? ip_hdrlen(skb) : sizeof(struct ipv6hdr); cp 602 net/netfilter/ipvs/ip_vs_proto_tcp.c spin_lock_bh(&cp->lock); cp 603 net/netfilter/ipvs/ip_vs_proto_tcp.c set_tcp_state(pd, cp, direction, th); cp 604 net/netfilter/ipvs/ip_vs_proto_tcp.c spin_unlock_bh(&cp->lock); cp 649 net/netfilter/ipvs/ip_vs_proto_tcp.c tcp_app_conn_bind(struct ip_vs_conn *cp) cp 651 net/netfilter/ipvs/ip_vs_proto_tcp.c struct netns_ipvs *ipvs = cp->ipvs; cp 657 net/netfilter/ipvs/ip_vs_proto_tcp.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 661 net/netfilter/ipvs/ip_vs_proto_tcp.c hash = tcp_app_hashkey(cp->vport); cp 664 net/netfilter/ipvs/ip_vs_proto_tcp.c if (inc->port == cp->vport) { cp 671 net/netfilter/ipvs/ip_vs_proto_tcp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 672 net/netfilter/ipvs/ip_vs_proto_tcp.c ntohs(cp->cport), cp 673 net/netfilter/ipvs/ip_vs_proto_tcp.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 674 net/netfilter/ipvs/ip_vs_proto_tcp.c ntohs(cp->vport), cp 677 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->app = inc; cp 679 net/netfilter/ipvs/ip_vs_proto_tcp.c result = inc->init_conn(inc, cp); cp 691 net/netfilter/ipvs/ip_vs_proto_tcp.c void ip_vs_tcp_conn_listen(struct ip_vs_conn *cp) cp 693 net/netfilter/ipvs/ip_vs_proto_tcp.c struct ip_vs_proto_data *pd = ip_vs_proto_data_get(cp->ipvs, IPPROTO_TCP); cp 695 net/netfilter/ipvs/ip_vs_proto_tcp.c spin_lock_bh(&cp->lock); cp 696 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->state = IP_VS_TCP_S_LISTEN; cp 697 net/netfilter/ipvs/ip_vs_proto_tcp.c cp->timeout = (pd ? pd->timeout_table[IP_VS_TCP_S_LISTEN] cp 699 net/netfilter/ipvs/ip_vs_proto_tcp.c spin_unlock_bh(&cp->lock); cp 137 net/netfilter/ipvs/ip_vs_proto_udp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 145 net/netfilter/ipvs/ip_vs_proto_udp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 154 net/netfilter/ipvs/ip_vs_proto_udp.c if (unlikely(cp->app != NULL)) { cp 158 net/netfilter/ipvs/ip_vs_proto_udp.c if (!udp_csum_check(cp->af, skb, pp)) cp 164 net/netfilter/ipvs/ip_vs_proto_udp.c if (!(ret = ip_vs_app_pkt_out(cp, skb, iph))) cp 174 net/netfilter/ipvs/ip_vs_proto_udp.c udph->source = cp->vport; cp 180 net/netfilter/ipvs/ip_vs_proto_udp.c udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, cp 185 net/netfilter/ipvs/ip_vs_proto_udp.c udp_fast_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, cp 186 net/netfilter/ipvs/ip_vs_proto_udp.c cp->dport, cp->vport); cp 188 net/netfilter/ipvs/ip_vs_proto_udp.c skb->ip_summed = cp->app ? cp 195 net/netfilter/ipvs/ip_vs_proto_udp.c if (cp->af == AF_INET6) cp 196 net/netfilter/ipvs/ip_vs_proto_udp.c udph->check = csum_ipv6_magic(&cp->vaddr.in6, cp 197 net/netfilter/ipvs/ip_vs_proto_udp.c &cp->caddr.in6, cp 199 net/netfilter/ipvs/ip_vs_proto_udp.c cp->protocol, skb->csum); cp 202 net/netfilter/ipvs/ip_vs_proto_udp.c udph->check = csum_tcpudp_magic(cp->vaddr.ip, cp 203 net/netfilter/ipvs/ip_vs_proto_udp.c cp->caddr.ip, cp 205 net/netfilter/ipvs/ip_vs_proto_udp.c cp->protocol, cp 220 net/netfilter/ipvs/ip_vs_proto_udp.c struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) cp 228 net/netfilter/ipvs/ip_vs_proto_udp.c if (cp->af == AF_INET6 && iph->fragoffs) cp 237 net/netfilter/ipvs/ip_vs_proto_udp.c if (unlikely(cp->app != NULL)) { cp 241 net/netfilter/ipvs/ip_vs_proto_udp.c if (!udp_csum_check(cp->af, skb, pp)) cp 248 net/netfilter/ipvs/ip_vs_proto_udp.c if (!(ret = ip_vs_app_pkt_in(cp, skb, iph))) cp 258 net/netfilter/ipvs/ip_vs_proto_udp.c udph->dest = cp->dport; cp 264 net/netfilter/ipvs/ip_vs_proto_udp.c udp_partial_csum_update(cp->af, udph, &cp->vaddr, &cp->daddr, cp 269 net/netfilter/ipvs/ip_vs_proto_udp.c udp_fast_csum_update(cp->af, udph, &cp->vaddr, &cp->daddr, cp 270 net/netfilter/ipvs/ip_vs_proto_udp.c cp->vport, cp->dport); cp 272 net/netfilter/ipvs/ip_vs_proto_udp.c skb->ip_summed = cp->app ? cp 279 net/netfilter/ipvs/ip_vs_proto_udp.c if (cp->af == AF_INET6) cp 280 net/netfilter/ipvs/ip_vs_proto_udp.c udph->check = csum_ipv6_magic(&cp->caddr.in6, cp 281 net/netfilter/ipvs/ip_vs_proto_udp.c &cp->daddr.in6, cp 283 net/netfilter/ipvs/ip_vs_proto_udp.c cp->protocol, skb->csum); cp 286 net/netfilter/ipvs/ip_vs_proto_udp.c udph->check = csum_tcpudp_magic(cp->caddr.ip, cp 287 net/netfilter/ipvs/ip_vs_proto_udp.c cp->daddr.ip, cp 289 net/netfilter/ipvs/ip_vs_proto_udp.c cp->protocol, cp 395 net/netfilter/ipvs/ip_vs_proto_udp.c static int udp_app_conn_bind(struct ip_vs_conn *cp) cp 397 net/netfilter/ipvs/ip_vs_proto_udp.c struct netns_ipvs *ipvs = cp->ipvs; cp 403 net/netfilter/ipvs/ip_vs_proto_udp.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) cp 407 net/netfilter/ipvs/ip_vs_proto_udp.c hash = udp_app_hashkey(cp->vport); cp 410 net/netfilter/ipvs/ip_vs_proto_udp.c if (inc->port == cp->vport) { cp 417 net/netfilter/ipvs/ip_vs_proto_udp.c IP_VS_DBG_ADDR(cp->af, &cp->caddr), cp 418 net/netfilter/ipvs/ip_vs_proto_udp.c ntohs(cp->cport), cp 419 net/netfilter/ipvs/ip_vs_proto_udp.c IP_VS_DBG_ADDR(cp->af, &cp->vaddr), cp 420 net/netfilter/ipvs/ip_vs_proto_udp.c ntohs(cp->vport), cp 423 net/netfilter/ipvs/ip_vs_proto_udp.c cp->app = inc; cp 425 net/netfilter/ipvs/ip_vs_proto_udp.c result = inc->init_conn(inc, cp); cp 452 net/netfilter/ipvs/ip_vs_proto_udp.c udp_state_transition(struct ip_vs_conn *cp, int direction, cp 461 net/netfilter/ipvs/ip_vs_proto_udp.c cp->timeout = pd->timeout_table[IP_VS_UDP_S_NORMAL]; cp 463 net/netfilter/ipvs/ip_vs_proto_udp.c ip_vs_control_assure_ct(cp); cp 410 net/netfilter/ipvs/ip_vs_sync.c select_master_thread_id(struct netns_ipvs *ipvs, struct ip_vs_conn *cp) cp 412 net/netfilter/ipvs/ip_vs_sync.c return ((long) cp >> (1 + ilog2(sizeof(*cp)))) & ipvs->threads_mask; cp 445 net/netfilter/ipvs/ip_vs_sync.c static inline bool in_persistence(struct ip_vs_conn *cp) cp 447 net/netfilter/ipvs/ip_vs_sync.c for (cp = cp->control; cp; cp = cp->control) { cp 448 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_TEMPLATE) cp 464 net/netfilter/ipvs/ip_vs_sync.c struct ip_vs_conn *cp, int pkts) cp 466 net/netfilter/ipvs/ip_vs_sync.c unsigned long orig = READ_ONCE(cp->sync_endtime); cp 468 net/netfilter/ipvs/ip_vs_sync.c unsigned long n = (now + cp->timeout) & ~3UL; cp 474 net/netfilter/ipvs/ip_vs_sync.c if (unlikely(cp->flags & IP_VS_CONN_F_TEMPLATE)) cp 476 net/netfilter/ipvs/ip_vs_sync.c else if (unlikely(sysctl_sync_persist_mode(ipvs) && in_persistence(cp))) cp 478 net/netfilter/ipvs/ip_vs_sync.c else if (likely(cp->protocol == IPPROTO_TCP)) { cp 479 net/netfilter/ipvs/ip_vs_sync.c if (!((1 << cp->state) & cp 486 net/netfilter/ipvs/ip_vs_sync.c force = cp->state != cp->old_state; cp 487 net/netfilter/ipvs/ip_vs_sync.c if (force && cp->state != IP_VS_TCP_S_ESTABLISHED) cp 489 net/netfilter/ipvs/ip_vs_sync.c } else if (unlikely(cp->protocol == IPPROTO_SCTP)) { cp 490 net/netfilter/ipvs/ip_vs_sync.c if (!((1 << cp->state) & cp 497 net/netfilter/ipvs/ip_vs_sync.c force = cp->state != cp->old_state; cp 498 net/netfilter/ipvs/ip_vs_sync.c if (force && cp->state != IP_VS_SCTP_S_ESTABLISHED) cp 508 net/netfilter/ipvs/ip_vs_sync.c long min_diff = max(cp->timeout >> 1, 10UL * HZ); cp 518 net/netfilter/ipvs/ip_vs_sync.c if (time_before(now, orig - cp->timeout + cp 526 net/netfilter/ipvs/ip_vs_sync.c if (!(cp->flags & IP_VS_CONN_F_TEMPLATE) && cp 534 net/netfilter/ipvs/ip_vs_sync.c cp->old_state = cp->state; cp 535 net/netfilter/ipvs/ip_vs_sync.c n = cmpxchg(&cp->sync_endtime, orig, n); cp 543 net/netfilter/ipvs/ip_vs_sync.c static void ip_vs_sync_conn_v0(struct netns_ipvs *ipvs, struct ip_vs_conn *cp, cp 553 net/netfilter/ipvs/ip_vs_sync.c if (unlikely(cp->af != AF_INET)) cp 556 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 559 net/netfilter/ipvs/ip_vs_sync.c if (!ip_vs_sync_conn_needed(ipvs, cp, pkts)) cp 568 net/netfilter/ipvs/ip_vs_sync.c id = select_master_thread_id(ipvs, cp); cp 571 net/netfilter/ipvs/ip_vs_sync.c len = (cp->flags & IP_VS_CONN_F_SEQ_MASK) ? FULL_CONN_SIZE : cp 597 net/netfilter/ipvs/ip_vs_sync.c s->protocol = cp->protocol; cp 598 net/netfilter/ipvs/ip_vs_sync.c s->cport = cp->cport; cp 599 net/netfilter/ipvs/ip_vs_sync.c s->vport = cp->vport; cp 600 net/netfilter/ipvs/ip_vs_sync.c s->dport = cp->dport; cp 601 net/netfilter/ipvs/ip_vs_sync.c s->caddr = cp->caddr.ip; cp 602 net/netfilter/ipvs/ip_vs_sync.c s->vaddr = cp->vaddr.ip; cp 603 net/netfilter/ipvs/ip_vs_sync.c s->daddr = cp->daddr.ip; cp 604 net/netfilter/ipvs/ip_vs_sync.c s->flags = htons(cp->flags & ~IP_VS_CONN_F_HASHED); cp 605 net/netfilter/ipvs/ip_vs_sync.c s->state = htons(cp->state); cp 606 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_SEQ_MASK) { cp 609 net/netfilter/ipvs/ip_vs_sync.c memcpy(opt, &cp->in_seq, sizeof(*opt)); cp 618 net/netfilter/ipvs/ip_vs_sync.c cp = cp->control; cp 619 net/netfilter/ipvs/ip_vs_sync.c if (cp) { cp 620 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_TEMPLATE) cp 621 net/netfilter/ipvs/ip_vs_sync.c pkts = atomic_add_return(1, &cp->in_pkts); cp 624 net/netfilter/ipvs/ip_vs_sync.c ip_vs_sync_conn(ipvs, cp, pkts); cp 633 net/netfilter/ipvs/ip_vs_sync.c void ip_vs_sync_conn(struct netns_ipvs *ipvs, struct ip_vs_conn *cp, int pkts) cp 645 net/netfilter/ipvs/ip_vs_sync.c ip_vs_sync_conn_v0(ipvs, cp, pkts); cp 649 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_ONE_PACKET) cp 652 net/netfilter/ipvs/ip_vs_sync.c if (!ip_vs_sync_conn_needed(ipvs, cp, pkts)) cp 657 net/netfilter/ipvs/ip_vs_sync.c if (cp->pe_data_len) { cp 658 net/netfilter/ipvs/ip_vs_sync.c if (!cp->pe_data || !cp->dest) { cp 662 net/netfilter/ipvs/ip_vs_sync.c pe_name_len = strnlen(cp->pe->name, IP_VS_PENAME_MAXLEN); cp 671 net/netfilter/ipvs/ip_vs_sync.c id = select_master_thread_id(ipvs, cp); cp 675 net/netfilter/ipvs/ip_vs_sync.c if (cp->af == AF_INET6) cp 681 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_SEQ_MASK) cp 684 net/netfilter/ipvs/ip_vs_sync.c if (cp->pe_data_len) cp 685 net/netfilter/ipvs/ip_vs_sync.c len += cp->pe_data_len + 2; /* + Param hdr field */ cp 725 net/netfilter/ipvs/ip_vs_sync.c s->v4.type = (cp->af == AF_INET6 ? STYPE_F_INET6 : 0); cp 727 net/netfilter/ipvs/ip_vs_sync.c s->v4.flags = htonl(cp->flags & ~IP_VS_CONN_F_HASHED); cp 728 net/netfilter/ipvs/ip_vs_sync.c s->v4.state = htons(cp->state); cp 729 net/netfilter/ipvs/ip_vs_sync.c s->v4.protocol = cp->protocol; cp 730 net/netfilter/ipvs/ip_vs_sync.c s->v4.cport = cp->cport; cp 731 net/netfilter/ipvs/ip_vs_sync.c s->v4.vport = cp->vport; cp 732 net/netfilter/ipvs/ip_vs_sync.c s->v4.dport = cp->dport; cp 733 net/netfilter/ipvs/ip_vs_sync.c s->v4.fwmark = htonl(cp->fwmark); cp 734 net/netfilter/ipvs/ip_vs_sync.c s->v4.timeout = htonl(cp->timeout / HZ); cp 738 net/netfilter/ipvs/ip_vs_sync.c if (cp->af == AF_INET6) { cp 740 net/netfilter/ipvs/ip_vs_sync.c s->v6.caddr = cp->caddr.in6; cp 741 net/netfilter/ipvs/ip_vs_sync.c s->v6.vaddr = cp->vaddr.in6; cp 742 net/netfilter/ipvs/ip_vs_sync.c s->v6.daddr = cp->daddr.in6; cp 747 net/netfilter/ipvs/ip_vs_sync.c s->v4.caddr = cp->caddr.ip; cp 748 net/netfilter/ipvs/ip_vs_sync.c s->v4.vaddr = cp->vaddr.ip; cp 749 net/netfilter/ipvs/ip_vs_sync.c s->v4.daddr = cp->daddr.ip; cp 751 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_SEQ_MASK) { cp 754 net/netfilter/ipvs/ip_vs_sync.c hton_seq((struct ip_vs_seq *)p, &cp->in_seq); cp 756 net/netfilter/ipvs/ip_vs_sync.c hton_seq((struct ip_vs_seq *)p, &cp->out_seq); cp 760 net/netfilter/ipvs/ip_vs_sync.c if (cp->pe_data_len && cp->pe_data) { cp 762 net/netfilter/ipvs/ip_vs_sync.c *(p++) = cp->pe_data_len; cp 763 net/netfilter/ipvs/ip_vs_sync.c memcpy(p, cp->pe_data, cp->pe_data_len); cp 764 net/netfilter/ipvs/ip_vs_sync.c p += cp->pe_data_len; cp 769 net/netfilter/ipvs/ip_vs_sync.c memcpy(p, cp->pe->name, pe_name_len); cp 778 net/netfilter/ipvs/ip_vs_sync.c cp = cp->control; cp 779 net/netfilter/ipvs/ip_vs_sync.c if (!cp) cp 781 net/netfilter/ipvs/ip_vs_sync.c if (cp->flags & IP_VS_CONN_F_TEMPLATE) cp 782 net/netfilter/ipvs/ip_vs_sync.c pkts = atomic_add_return(1, &cp->in_pkts); cp 853 net/netfilter/ipvs/ip_vs_sync.c struct ip_vs_conn *cp; cp 856 net/netfilter/ipvs/ip_vs_sync.c cp = ip_vs_conn_in_get(param); cp 857 net/netfilter/ipvs/ip_vs_sync.c if (cp && ((cp->dport != dport) || cp 858 net/netfilter/ipvs/ip_vs_sync.c !ip_vs_addr_equal(cp->daf, &cp->daddr, daddr))) { cp 860 net/netfilter/ipvs/ip_vs_sync.c ip_vs_conn_expire_now(cp); cp 861 net/netfilter/ipvs/ip_vs_sync.c __ip_vs_conn_put(cp); cp 862 net/netfilter/ipvs/ip_vs_sync.c cp = NULL; cp 868 net/netfilter/ipvs/ip_vs_sync.c __ip_vs_conn_put(cp); cp 874 net/netfilter/ipvs/ip_vs_sync.c cp = ip_vs_ct_in_get(param); cp 877 net/netfilter/ipvs/ip_vs_sync.c if (cp) { cp 881 net/netfilter/ipvs/ip_vs_sync.c dest = cp->dest; cp 882 net/netfilter/ipvs/ip_vs_sync.c spin_lock_bh(&cp->lock); cp 883 net/netfilter/ipvs/ip_vs_sync.c if ((cp->flags ^ flags) & IP_VS_CONN_F_INACTIVE && cp 894 net/netfilter/ipvs/ip_vs_sync.c flags |= cp->flags & ~IP_VS_CONN_F_BACKUP_UPD_MASK; cp 895 net/netfilter/ipvs/ip_vs_sync.c cp->flags = flags; cp 896 net/netfilter/ipvs/ip_vs_sync.c spin_unlock_bh(&cp->lock); cp 898 net/netfilter/ipvs/ip_vs_sync.c ip_vs_try_bind_dest(cp); cp 915 net/netfilter/ipvs/ip_vs_sync.c cp = ip_vs_conn_new(param, type, daddr, dport, flags, dest, cp 918 net/netfilter/ipvs/ip_vs_sync.c if (!cp) { cp 928 net/netfilter/ipvs/ip_vs_sync.c cp->in_seq = opt->in_seq; cp 929 net/netfilter/ipvs/ip_vs_sync.c cp->out_seq = opt->out_seq; cp 931 net/netfilter/ipvs/ip_vs_sync.c atomic_set(&cp->in_pkts, sysctl_sync_threshold(ipvs)); cp 932 net/netfilter/ipvs/ip_vs_sync.c cp->state = state; cp 933 net/netfilter/ipvs/ip_vs_sync.c cp->old_state = cp->state; cp 946 net/netfilter/ipvs/ip_vs_sync.c cp->timeout = timeout*HZ; cp 952 net/netfilter/ipvs/ip_vs_sync.c cp->timeout = pd->timeout_table[state]; cp 954 net/netfilter/ipvs/ip_vs_sync.c cp->timeout = (3*60*HZ); cp 956 net/netfilter/ipvs/ip_vs_sync.c ip_vs_conn_put(cp); cp 608 net/netfilter/ipvs/ip_vs_xmit.c struct ip_vs_conn *cp) cp 613 net/netfilter/ipvs/ip_vs_xmit.c if (unlikely(cp->flags & IP_VS_CONN_F_NFCT)) cp 639 net/netfilter/ipvs/ip_vs_xmit.c struct ip_vs_conn *cp, int local) cp 644 net/netfilter/ipvs/ip_vs_xmit.c if (likely(!(cp->flags & IP_VS_CONN_F_NFCT))) cp 647 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_update_conntrack(skb, cp, 1); cp 652 net/netfilter/ipvs/ip_vs_xmit.c if (!local || cp->vport != cp->dport || cp 653 net/netfilter/ipvs/ip_vs_xmit.c !ip_vs_addr_equal(cp->af, &cp->vaddr, &cp->daddr)) cp 658 net/netfilter/ipvs/ip_vs_xmit.c NF_HOOK(pf, NF_INET_LOCAL_OUT, cp->ipvs->net, NULL, skb, cp 668 net/netfilter/ipvs/ip_vs_xmit.c struct ip_vs_conn *cp, int local) cp 673 net/netfilter/ipvs/ip_vs_xmit.c if (likely(!(cp->flags & IP_VS_CONN_F_NFCT))) cp 678 net/netfilter/ipvs/ip_vs_xmit.c NF_HOOK(pf, NF_INET_LOCAL_OUT, cp->ipvs->net, NULL, skb, cp 690 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_null_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 694 net/netfilter/ipvs/ip_vs_xmit.c return ip_vs_send_or_cont(NFPROTO_IPV4, skb, cp, 1); cp 704 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 711 net/netfilter/ipvs/ip_vs_xmit.c if (__ip_vs_get_out_rt(cp->ipvs, cp->af, skb, NULL, iph->daddr, cp 720 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_send_or_cont(NFPROTO_IPV4, skb, cp, 0); cp 733 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 740 net/netfilter/ipvs/ip_vs_xmit.c if (__ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, NULL, cp 748 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_send_or_cont(NFPROTO_IPV6, skb, cp, 0); cp 765 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 774 net/netfilter/ipvs/ip_vs_xmit.c if (unlikely(cp->flags & IP_VS_CONN_F_NO_CPORT)) { cp 780 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_conn_fill_cport(cp, *p); cp 785 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt(cp->ipvs, cp->af, skb, cp->dest, cp->daddr.ip, cp 797 net/netfilter/ipvs/ip_vs_xmit.c if (cp->flags & IP_VS_CONN_F_SYNC && local) { cp 811 net/netfilter/ipvs/ip_vs_xmit.c if (local && ipv4_is_loopback(cp->daddr.ip) && was_input) { cp 826 net/netfilter/ipvs/ip_vs_xmit.c if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) cp 828 net/netfilter/ipvs/ip_vs_xmit.c ip_hdr(skb)->daddr = cp->daddr.ip; cp 840 net/netfilter/ipvs/ip_vs_xmit.c rc = ip_vs_nat_send_or_cont(NFPROTO_IPV4, skb, cp, local); cp 853 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 862 net/netfilter/ipvs/ip_vs_xmit.c if (unlikely(cp->flags & IP_VS_CONN_F_NO_CPORT && !ipvsh->fragoffs)) { cp 867 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_conn_fill_cport(cp, *p); cp 871 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, cp 872 net/netfilter/ipvs/ip_vs_xmit.c &cp->daddr.in6, cp 885 net/netfilter/ipvs/ip_vs_xmit.c if (cp->flags & IP_VS_CONN_F_SYNC && local) { cp 900 net/netfilter/ipvs/ip_vs_xmit.c ipv6_addr_type(&cp->daddr.in6) & IPV6_ADDR_LOOPBACK) { cp 915 net/netfilter/ipvs/ip_vs_xmit.c if (pp->dnat_handler && !pp->dnat_handler(skb, pp, cp, ipvsh)) cp 917 net/netfilter/ipvs/ip_vs_xmit.c ipv6_hdr(skb)->daddr = cp->daddr.in6; cp 928 net/netfilter/ipvs/ip_vs_xmit.c rc = ip_vs_nat_send_or_cont(NFPROTO_IPV6, skb, cp, local); cp 1023 net/netfilter/ipvs/ip_vs_xmit.c struct ip_vs_conn *cp, __u8 *next_protocol) cp 1033 net/netfilter/ipvs/ip_vs_xmit.c if ((cp->dest->tun_flags & IP_VS_TUNNEL_ENCAP_FLAG_REMCSUM) && cp 1084 net/netfilter/ipvs/ip_vs_xmit.c dport = cp->dest->tun_port; cp 1097 net/netfilter/ipvs/ip_vs_xmit.c struct ip_vs_conn *cp, __u8 *next_protocol) cp 1104 net/netfilter/ipvs/ip_vs_xmit.c if (cp->dest->tun_flags & IP_VS_TUNNEL_ENCAP_FLAG_CSUM) cp 1133 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1136 net/netfilter/ipvs/ip_vs_xmit.c struct netns_ipvs *ipvs = cp->ipvs; cp 1154 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt(ipvs, cp->af, skb, cp->dest, cp->daddr.ip, cp 1162 net/netfilter/ipvs/ip_vs_xmit.c return ip_vs_send_or_cont(NFPROTO_IPV4, skb, cp, 1); cp 1172 net/netfilter/ipvs/ip_vs_xmit.c tun_type = cp->dest->tun_type; cp 1173 net/netfilter/ipvs/ip_vs_xmit.c tun_flags = cp->dest->tun_flags; cp 1198 net/netfilter/ipvs/ip_vs_xmit.c skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, cp 1204 net/netfilter/ipvs/ip_vs_xmit.c gso_type = __tun_gso_type_mask(AF_INET, cp->af); cp 1232 net/netfilter/ipvs/ip_vs_xmit.c if (ipvs_gue_encap(net, skb, cp, &next_protocol)) cp 1239 net/netfilter/ipvs/ip_vs_xmit.c udp_set_csum(!check, skb, saddr, cp->daddr.ip, skb->len); cp 1241 net/netfilter/ipvs/ip_vs_xmit.c ipvs_gre_encap(net, skb, cp, &next_protocol); cp 1256 net/netfilter/ipvs/ip_vs_xmit.c iph->daddr = cp->daddr.ip; cp 1264 net/netfilter/ipvs/ip_vs_xmit.c ret = ip_vs_tunnel_xmit_prepare(skb, cp); cp 1283 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1286 net/netfilter/ipvs/ip_vs_xmit.c struct netns_ipvs *ipvs = cp->ipvs; cp 1303 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt_v6(ipvs, cp->af, skb, cp->dest, cp 1304 net/netfilter/ipvs/ip_vs_xmit.c &cp->daddr.in6, cp 1312 net/netfilter/ipvs/ip_vs_xmit.c return ip_vs_send_or_cont(NFPROTO_IPV6, skb, cp, 1); cp 1322 net/netfilter/ipvs/ip_vs_xmit.c tun_type = cp->dest->tun_type; cp 1323 net/netfilter/ipvs/ip_vs_xmit.c tun_flags = cp->dest->tun_flags; cp 1346 net/netfilter/ipvs/ip_vs_xmit.c skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, cp 1352 net/netfilter/ipvs/ip_vs_xmit.c gso_type = __tun_gso_type_mask(AF_INET6, cp->af); cp 1380 net/netfilter/ipvs/ip_vs_xmit.c if (ipvs_gue_encap(net, skb, cp, &next_protocol)) cp 1387 net/netfilter/ipvs/ip_vs_xmit.c udp6_set_csum(!check, skb, &saddr, &cp->daddr.in6, skb->len); cp 1389 net/netfilter/ipvs/ip_vs_xmit.c ipvs_gre_encap(net, skb, cp, &next_protocol); cp 1404 net/netfilter/ipvs/ip_vs_xmit.c iph->daddr = cp->daddr.in6; cp 1411 net/netfilter/ipvs/ip_vs_xmit.c ret = ip_vs_tunnel_xmit_prepare(skb, cp); cp 1435 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1442 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt(cp->ipvs, cp->af, skb, cp->dest, cp->daddr.ip, cp 1449 net/netfilter/ipvs/ip_vs_xmit.c return ip_vs_send_or_cont(NFPROTO_IPV4, skb, cp, 1); cp 1456 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_send_or_cont(NFPROTO_IPV4, skb, cp, 0); cp 1469 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1476 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, cp 1477 net/netfilter/ipvs/ip_vs_xmit.c &cp->daddr.in6, cp 1485 net/netfilter/ipvs/ip_vs_xmit.c return ip_vs_send_or_cont(NFPROTO_IPV6, skb, cp, 1); cp 1490 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_send_or_cont(NFPROTO_IPV6, skb, cp, 0); cp 1508 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1522 net/netfilter/ipvs/ip_vs_xmit.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) { cp 1523 net/netfilter/ipvs/ip_vs_xmit.c if (cp->packet_xmit) cp 1524 net/netfilter/ipvs/ip_vs_xmit.c rc = cp->packet_xmit(skb, cp, pp, iph); cp 1528 net/netfilter/ipvs/ip_vs_xmit.c atomic_inc(&cp->in_pkts); cp 1541 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt(cp->ipvs, cp->af, skb, cp->dest, cp->daddr.ip, rt_mode, cp 1552 net/netfilter/ipvs/ip_vs_xmit.c if (cp->flags & IP_VS_CONN_F_SYNC && local) { cp 1559 net/netfilter/ipvs/ip_vs_xmit.c __func__, &cp->daddr.ip); cp 1566 net/netfilter/ipvs/ip_vs_xmit.c if (local && ipv4_is_loopback(cp->daddr.ip) && was_input) { cp 1569 net/netfilter/ipvs/ip_vs_xmit.c __func__, &cp->daddr.ip); cp 1580 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_nat_icmp(skb, pp, cp, 0); cp 1585 net/netfilter/ipvs/ip_vs_xmit.c rc = ip_vs_nat_send_or_cont(NFPROTO_IPV4, skb, cp, local); cp 1598 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, cp 1612 net/netfilter/ipvs/ip_vs_xmit.c if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) { cp 1613 net/netfilter/ipvs/ip_vs_xmit.c if (cp->packet_xmit) cp 1614 net/netfilter/ipvs/ip_vs_xmit.c rc = cp->packet_xmit(skb, cp, pp, ipvsh); cp 1618 net/netfilter/ipvs/ip_vs_xmit.c atomic_inc(&cp->in_pkts); cp 1630 net/netfilter/ipvs/ip_vs_xmit.c local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, cp 1631 net/netfilter/ipvs/ip_vs_xmit.c &cp->daddr.in6, NULL, ipvsh, 0, rt_mode); cp 1640 net/netfilter/ipvs/ip_vs_xmit.c if (cp->flags & IP_VS_CONN_F_SYNC && local) { cp 1647 net/netfilter/ipvs/ip_vs_xmit.c __func__, &cp->daddr.in6); cp 1655 net/netfilter/ipvs/ip_vs_xmit.c ipv6_addr_type(&cp->daddr.in6) & IPV6_ADDR_LOOPBACK) { cp 1658 net/netfilter/ipvs/ip_vs_xmit.c __func__, &cp->daddr.in6); cp 1669 net/netfilter/ipvs/ip_vs_xmit.c ip_vs_nat_icmp_v6(skb, pp, cp, 0); cp 1674 net/netfilter/ipvs/ip_vs_xmit.c rc = ip_vs_nat_send_or_cont(NFPROTO_IPV6, skb, cp, local); cp 143 net/netfilter/nf_conntrack_sip.c static int sip_parse_addr(const struct nf_conn *ct, const char *cp, cp 156 net/netfilter/nf_conntrack_sip.c ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end); cp 161 net/netfilter/nf_conntrack_sip.c if (cp < limit && *cp == '[') cp 162 net/netfilter/nf_conntrack_sip.c cp++; cp 166 net/netfilter/nf_conntrack_sip.c ret = in6_pton(cp, limit - cp, (u8 *)&addr->ip6, -1, &end); cp 646 net/netfilter/nf_conntrack_sip.c static int sdp_parse_addr(const struct nf_conn *ct, const char *cp, cp 656 net/netfilter/nf_conntrack_sip.c ret = in4_pton(cp, limit - cp, (u8 *)&addr->ip, -1, &end); cp 659 net/netfilter/nf_conntrack_sip.c ret = in6_pton(cp, limit - cp, (u8 *)&addr->ip6, -1, &end); cp 57 net/netfilter/xt_ipvs.c struct ip_vs_conn *cp; cp 90 net/netfilter/xt_ipvs.c cp = pp->conn_out_get(ipvs, family, skb, &iph); cp 91 net/netfilter/xt_ipvs.c if (unlikely(cp == NULL)) { cp 102 net/netfilter/xt_ipvs.c if ((cp->vport == data->vport) ^ cp 109 net/netfilter/xt_ipvs.c if ((cp->control != NULL && cp 110 net/netfilter/xt_ipvs.c cp->control->vport == data->vportctl) ^ cp 133 net/netfilter/xt_ipvs.c if (((cp->flags & IP_VS_CONN_F_FWD_MASK) == data->fwd_method) ^ cp 140 net/netfilter/xt_ipvs.c if (ipvs_mt_addrcmp(&cp->vaddr, &data->vaddr, cp 149 net/netfilter/xt_ipvs.c __ip_vs_conn_put(cp); cp 225 net/rds/cong.c struct rds_conn_path *cp = &conn->c_path[0]; cp 229 net/rds/cong.c !rds_destroy_pending(cp->cp_conn)) { cp 245 net/rds/cong.c queue_delayed_work(rds_wq, &cp->cp_send_w, 0); cp 113 net/rds/connection.c static void rds_conn_path_reset(struct rds_conn_path *cp) cp 115 net/rds/connection.c struct rds_connection *conn = cp->cp_conn; cp 121 net/rds/connection.c rds_send_path_reset(cp); cp 122 net/rds/connection.c cp->cp_flags = 0; cp 131 net/rds/connection.c struct rds_conn_path *cp, bool is_outgoing) cp 133 net/rds/connection.c spin_lock_init(&cp->cp_lock); cp 134 net/rds/connection.c cp->cp_next_tx_seq = 1; cp 135 net/rds/connection.c init_waitqueue_head(&cp->cp_waitq); cp 136 net/rds/connection.c INIT_LIST_HEAD(&cp->cp_send_queue); cp 137 net/rds/connection.c INIT_LIST_HEAD(&cp->cp_retrans); cp 139 net/rds/connection.c cp->cp_conn = conn; cp 140 net/rds/connection.c atomic_set(&cp->cp_state, RDS_CONN_DOWN); cp 141 net/rds/connection.c cp->cp_send_gen = 0; cp 142 net/rds/connection.c cp->cp_reconnect_jiffies = 0; cp 143 net/rds/connection.c cp->cp_conn->c_proposed_version = RDS_PROTOCOL_VERSION; cp 144 net/rds/connection.c INIT_DELAYED_WORK(&cp->cp_send_w, rds_send_worker); cp 145 net/rds/connection.c INIT_DELAYED_WORK(&cp->cp_recv_w, rds_recv_worker); cp 146 net/rds/connection.c INIT_DELAYED_WORK(&cp->cp_conn_w, rds_connect_worker); cp 147 net/rds/connection.c INIT_WORK(&cp->cp_down_w, rds_shutdown_worker); cp 148 net/rds/connection.c mutex_init(&cp->cp_cm_lock); cp 149 net/rds/connection.c cp->cp_flags = 0; cp 305 net/rds/connection.c struct rds_conn_path *cp; cp 309 net/rds/connection.c cp = &conn->c_path[i]; cp 314 net/rds/connection.c if (cp->cp_transport_data) cp 315 net/rds/connection.c trans->conn_free(cp->cp_transport_data); cp 355 net/rds/connection.c void rds_conn_shutdown(struct rds_conn_path *cp) cp 357 net/rds/connection.c struct rds_connection *conn = cp->cp_conn; cp 360 net/rds/connection.c if (!rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_DOWN)) { cp 368 net/rds/connection.c mutex_lock(&cp->cp_cm_lock); cp 369 net/rds/connection.c if (!rds_conn_path_transition(cp, RDS_CONN_UP, cp 371 net/rds/connection.c !rds_conn_path_transition(cp, RDS_CONN_ERROR, cp 373 net/rds/connection.c rds_conn_path_error(cp, cp 375 net/rds/connection.c atomic_read(&cp->cp_state)); cp 376 net/rds/connection.c mutex_unlock(&cp->cp_cm_lock); cp 379 net/rds/connection.c mutex_unlock(&cp->cp_cm_lock); cp 381 net/rds/connection.c wait_event(cp->cp_waitq, cp 382 net/rds/connection.c !test_bit(RDS_IN_XMIT, &cp->cp_flags)); cp 383 net/rds/connection.c wait_event(cp->cp_waitq, cp 384 net/rds/connection.c !test_bit(RDS_RECV_REFILL, &cp->cp_flags)); cp 386 net/rds/connection.c conn->c_trans->conn_path_shutdown(cp); cp 387 net/rds/connection.c rds_conn_path_reset(cp); cp 389 net/rds/connection.c if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING, cp 391 net/rds/connection.c !rds_conn_path_transition(cp, RDS_CONN_ERROR, cp 404 net/rds/connection.c rds_conn_path_error(cp, "%s: failed to transition " cp 407 net/rds/connection.c atomic_read(&cp->cp_state)); cp 416 net/rds/connection.c cancel_delayed_work_sync(&cp->cp_conn_w); cp 420 net/rds/connection.c rds_queue_reconnect(cp); cp 429 net/rds/connection.c static void rds_conn_path_destroy(struct rds_conn_path *cp) cp 433 net/rds/connection.c if (!cp->cp_transport_data) cp 437 net/rds/connection.c cancel_delayed_work_sync(&cp->cp_send_w); cp 438 net/rds/connection.c cancel_delayed_work_sync(&cp->cp_recv_w); cp 440 net/rds/connection.c rds_conn_path_drop(cp, true); cp 441 net/rds/connection.c flush_work(&cp->cp_down_w); cp 445 net/rds/connection.c &cp->cp_send_queue, cp 451 net/rds/connection.c if (cp->cp_xmit_rm) cp 452 net/rds/connection.c rds_message_put(cp->cp_xmit_rm); cp 454 net/rds/connection.c WARN_ON(delayed_work_pending(&cp->cp_send_w)); cp 455 net/rds/connection.c WARN_ON(delayed_work_pending(&cp->cp_recv_w)); cp 456 net/rds/connection.c WARN_ON(delayed_work_pending(&cp->cp_conn_w)); cp 457 net/rds/connection.c WARN_ON(work_pending(&cp->cp_down_w)); cp 459 net/rds/connection.c cp->cp_conn->c_trans->conn_free(cp->cp_transport_data); cp 473 net/rds/connection.c struct rds_conn_path *cp; cp 488 net/rds/connection.c cp = &conn->c_path[i]; cp 489 net/rds/connection.c rds_conn_path_destroy(cp); cp 490 net/rds/connection.c BUG_ON(!list_empty(&cp->cp_retrans)); cp 546 net/rds/connection.c struct rds_conn_path *cp; cp 556 net/rds/connection.c cp = &conn->c_path[j]; cp 558 net/rds/connection.c list = &cp->cp_send_queue; cp 560 net/rds/connection.c list = &cp->cp_retrans; cp 562 net/rds/connection.c spin_lock_irqsave(&cp->cp_lock, flags); cp 575 net/rds/connection.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 697 net/rds/connection.c struct rds_conn_path *cp; cp 707 net/rds/connection.c cp = conn->c_path; cp 710 net/rds/connection.c if (!visitor(cp, buffer)) cp 727 net/rds/connection.c static int rds_conn_info_visitor(struct rds_conn_path *cp, void *buffer) cp 730 net/rds/connection.c struct rds_connection *conn = cp->cp_conn; cp 735 net/rds/connection.c cinfo->next_tx_seq = cp->cp_next_tx_seq; cp 736 net/rds/connection.c cinfo->next_rx_seq = cp->cp_next_rx_seq; cp 744 net/rds/connection.c rds_conn_info_set(cinfo->flags, test_bit(RDS_IN_XMIT, &cp->cp_flags), cp 748 net/rds/connection.c atomic_read(&cp->cp_state) == RDS_CONN_CONNECTING, cp 751 net/rds/connection.c atomic_read(&cp->cp_state) == RDS_CONN_UP, cp 757 net/rds/connection.c static int rds6_conn_info_visitor(struct rds_conn_path *cp, void *buffer) cp 760 net/rds/connection.c struct rds_connection *conn = cp->cp_conn; cp 762 net/rds/connection.c cinfo6->next_tx_seq = cp->cp_next_tx_seq; cp 763 net/rds/connection.c cinfo6->next_rx_seq = cp->cp_next_rx_seq; cp 770 net/rds/connection.c rds_conn_info_set(cinfo6->flags, test_bit(RDS_IN_XMIT, &cp->cp_flags), cp 774 net/rds/connection.c atomic_read(&cp->cp_state) == RDS_CONN_CONNECTING, cp 777 net/rds/connection.c atomic_read(&cp->cp_state) == RDS_CONN_UP, cp 869 net/rds/connection.c void rds_conn_path_drop(struct rds_conn_path *cp, bool destroy) cp 871 net/rds/connection.c atomic_set(&cp->cp_state, RDS_CONN_ERROR); cp 874 net/rds/connection.c if (!destroy && rds_destroy_pending(cp->cp_conn)) { cp 878 net/rds/connection.c queue_work(rds_wq, &cp->cp_down_w); cp 894 net/rds/connection.c void rds_conn_path_connect_if_down(struct rds_conn_path *cp) cp 897 net/rds/connection.c if (rds_destroy_pending(cp->cp_conn)) { cp 901 net/rds/connection.c if (rds_conn_path_state(cp) == RDS_CONN_DOWN && cp 902 net/rds/connection.c !test_and_set_bit(RDS_RECONNECT_PENDING, &cp->cp_flags)) cp 903 net/rds/connection.c queue_delayed_work(rds_wq, &cp->cp_conn_w, 0); cp 916 net/rds/connection.c __rds_conn_path_error(struct rds_conn_path *cp, const char *fmt, ...) cp 924 net/rds/connection.c rds_conn_path_drop(cp, false); cp 502 net/rds/ib.c struct rds_conn_path *cp = &conn->c_path[0]; cp 504 net/rds/ib.c return (test_bit(RDS_DESTROY_PENDING, &cp->cp_flags) || cp 372 net/rds/ib.h int rds_ib_conn_path_connect(struct rds_conn_path *cp); cp 373 net/rds/ib.h void rds_ib_conn_path_shutdown(struct rds_conn_path *cp); cp 430 net/rds/ib.h void rds_ib_xmit_path_complete(struct rds_conn_path *cp); cp 906 net/rds/ib_cm.c int rds_ib_conn_path_connect(struct rds_conn_path *cp) cp 908 net/rds/ib_cm.c struct rds_connection *conn = cp->cp_conn; cp 982 net/rds/ib_cm.c void rds_ib_conn_path_shutdown(struct rds_conn_path *cp) cp 984 net/rds/ib_cm.c struct rds_connection *conn = cp->cp_conn; cp 1027 net/rds/ib_recv.c int rds_ib_recv_path(struct rds_conn_path *cp) cp 1029 net/rds/ib_recv.c struct rds_connection *conn = cp->cp_conn; cp 981 net/rds/ib_send.c void rds_ib_xmit_path_complete(struct rds_conn_path *cp) cp 983 net/rds/ib_send.c struct rds_connection *conn = cp->cp_conn; cp 119 net/rds/loop.c static int rds_loop_recv_path(struct rds_conn_path *cp) cp 167 net/rds/loop.c static int rds_loop_conn_path_connect(struct rds_conn_path *cp) cp 169 net/rds/loop.c rds_connect_complete(cp->cp_conn); cp 173 net/rds/loop.c static void rds_loop_conn_path_shutdown(struct rds_conn_path *cp) cp 175 net/rds/rdma.c struct rds_conn_path *cp) cp 275 net/rds/rdma.c cp ? cp->cp_conn : NULL); cp 553 net/rds/rds.h int (*conn_path_connect)(struct rds_conn_path *cp); cp 555 net/rds/rds.h void (*xmit_path_prepare)(struct rds_conn_path *cp); cp 556 net/rds/rds.h void (*xmit_path_complete)(struct rds_conn_path *cp); cp 561 net/rds/rds.h int (*recv_path)(struct rds_conn_path *cp); cp 785 net/rds/rds.h void rds_conn_path_connect_if_down(struct rds_conn_path *cp); cp 794 net/rds/rds.h void __rds_conn_path_error(struct rds_conn_path *cp, const char *, ...); cp 795 net/rds/rds.h #define rds_conn_path_error(cp, fmt...) \ cp 796 net/rds/rds.h __rds_conn_path_error(cp, KERN_WARNING "RDS: " fmt) cp 799 net/rds/rds.h rds_conn_path_transition(struct rds_conn_path *cp, int old, int new) cp 801 net/rds/rds.h return atomic_cmpxchg(&cp->cp_state, old, new) == old; cp 812 net/rds/rds.h rds_conn_path_state(struct rds_conn_path *cp) cp 814 net/rds/rds.h return atomic_read(&cp->cp_state); cp 825 net/rds/rds.h rds_conn_path_up(struct rds_conn_path *cp) cp 827 net/rds/rds.h return atomic_read(&cp->cp_state) == RDS_CONN_UP; cp 838 net/rds/rds.h rds_conn_path_connecting(struct rds_conn_path *cp) cp 840 net/rds/rds.h return atomic_read(&cp->cp_state) == RDS_CONN_CONNECTING; cp 912 net/rds/rds.h int rds_send_xmit(struct rds_conn_path *cp); cp 918 net/rds/rds.h void rds_send_path_drop_acked(struct rds_conn_path *cp, u64 ack, cp 921 net/rds/rds.h int rds_send_pong(struct rds_conn_path *cp, __be16 dport); cp 994 net/rds/rds.h void rds_queue_reconnect(struct rds_conn_path *cp); cp 57 net/rds/recv.c void rds_inc_path_init(struct rds_incoming *inc, struct rds_conn_path *cp, cp 62 net/rds/recv.c inc->i_conn = cp->cp_conn; cp 63 net/rds/recv.c inc->i_conn_path = cp; cp 144 net/rds/recv.c struct rds_conn_path *cp; cp 146 net/rds/recv.c cp = &conn->c_path[i]; cp 147 net/rds/recv.c spin_lock_irqsave(&cp->cp_lock, flags); cp 148 net/rds/recv.c cp->cp_next_tx_seq = 1; cp 149 net/rds/recv.c cp->cp_next_rx_seq = 0; cp 151 net/rds/recv.c &cp->cp_retrans, cp 155 net/rds/recv.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 255 net/rds/recv.c struct rds_conn_path *cp; cp 260 net/rds/recv.c cp = &conn->c_path[i]; cp 261 net/rds/recv.c rds_conn_path_connect_if_down(cp); cp 289 net/rds/recv.c struct rds_conn_path *cp; cp 294 net/rds/recv.c cp = inc->i_conn_path; cp 296 net/rds/recv.c cp = &conn->c_path[0]; cp 300 net/rds/recv.c (unsigned long long)cp->cp_next_rx_seq, cp 329 net/rds/recv.c if (be64_to_cpu(inc->i_hdr.h_sequence) < cp->cp_next_rx_seq && cp 334 net/rds/recv.c cp->cp_next_rx_seq = be64_to_cpu(inc->i_hdr.h_sequence) + 1; cp 343 net/rds/recv.c rds_send_pong(cp, inc->i_hdr.h_sport); cp 347 net/rds/recv.c rds_recv_hs_exthdrs(&inc->i_hdr, cp->cp_conn); cp 348 net/rds/recv.c rds_start_mprds(cp->cp_conn); cp 355 net/rds/recv.c rds_recv_hs_exthdrs(&inc->i_hdr, cp->cp_conn); cp 357 net/rds/recv.c rds_start_mprds(cp->cp_conn); cp 358 net/rds/recv.c wake_up(&cp->cp_conn->c_hs_waitq); cp 65 net/rds/send.c void rds_send_path_reset(struct rds_conn_path *cp) cp 70 net/rds/send.c if (cp->cp_xmit_rm) { cp 71 net/rds/send.c rm = cp->cp_xmit_rm; cp 72 net/rds/send.c cp->cp_xmit_rm = NULL; cp 81 net/rds/send.c cp->cp_xmit_sg = 0; cp 82 net/rds/send.c cp->cp_xmit_hdr_off = 0; cp 83 net/rds/send.c cp->cp_xmit_data_off = 0; cp 84 net/rds/send.c cp->cp_xmit_atomic_sent = 0; cp 85 net/rds/send.c cp->cp_xmit_rdma_sent = 0; cp 86 net/rds/send.c cp->cp_xmit_data_sent = 0; cp 88 net/rds/send.c cp->cp_conn->c_map_queued = 0; cp 90 net/rds/send.c cp->cp_unacked_packets = rds_sysctl_max_unacked_packets; cp 91 net/rds/send.c cp->cp_unacked_bytes = rds_sysctl_max_unacked_bytes; cp 94 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 95 net/rds/send.c list_for_each_entry_safe(rm, tmp, &cp->cp_retrans, m_conn_item) { cp 99 net/rds/send.c list_splice_init(&cp->cp_retrans, &cp->cp_send_queue); cp 100 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 104 net/rds/send.c static int acquire_in_xmit(struct rds_conn_path *cp) cp 106 net/rds/send.c return test_and_set_bit(RDS_IN_XMIT, &cp->cp_flags) == 0; cp 109 net/rds/send.c static void release_in_xmit(struct rds_conn_path *cp) cp 111 net/rds/send.c clear_bit(RDS_IN_XMIT, &cp->cp_flags); cp 119 net/rds/send.c if (waitqueue_active(&cp->cp_waitq)) cp 120 net/rds/send.c wake_up_all(&cp->cp_waitq); cp 137 net/rds/send.c int rds_send_xmit(struct rds_conn_path *cp) cp 139 net/rds/send.c struct rds_connection *conn = cp->cp_conn; cp 160 net/rds/send.c if (!acquire_in_xmit(cp)) { cp 166 net/rds/send.c if (rds_destroy_pending(cp->cp_conn)) { cp 167 net/rds/send.c release_in_xmit(cp); cp 180 net/rds/send.c send_gen = READ_ONCE(cp->cp_send_gen) + 1; cp 181 net/rds/send.c WRITE_ONCE(cp->cp_send_gen, send_gen); cp 187 net/rds/send.c if (!rds_conn_path_up(cp)) { cp 188 net/rds/send.c release_in_xmit(cp); cp 194 net/rds/send.c conn->c_trans->xmit_path_prepare(cp); cp 202 net/rds/send.c rm = cp->cp_xmit_rm; cp 226 net/rds/send.c rm->m_inc.i_conn_path = cp; cp 227 net/rds/send.c rm->m_inc.i_conn = cp->cp_conn; cp 229 net/rds/send.c cp->cp_xmit_rm = rm; cp 252 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 254 net/rds/send.c if (!list_empty(&cp->cp_send_queue)) { cp 255 net/rds/send.c rm = list_entry(cp->cp_send_queue.next, cp 265 net/rds/send.c &cp->cp_retrans); cp 268 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 283 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 286 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 292 net/rds/send.c if (cp->cp_unacked_packets == 0 || cp 293 net/rds/send.c cp->cp_unacked_bytes < len) { cp 296 net/rds/send.c cp->cp_unacked_packets = cp 298 net/rds/send.c cp->cp_unacked_bytes = cp 302 net/rds/send.c cp->cp_unacked_bytes -= len; cp 303 net/rds/send.c cp->cp_unacked_packets--; cp 306 net/rds/send.c cp->cp_xmit_rm = rm; cp 310 net/rds/send.c if (rm->rdma.op_active && !cp->cp_xmit_rdma_sent) { cp 322 net/rds/send.c cp->cp_xmit_rdma_sent = 1; cp 326 net/rds/send.c if (rm->atomic.op_active && !cp->cp_xmit_atomic_sent) { cp 338 net/rds/send.c cp->cp_xmit_atomic_sent = 1; cp 364 net/rds/send.c if (rm->data.op_active && !cp->cp_xmit_data_sent) { cp 368 net/rds/send.c cp->cp_xmit_hdr_off, cp 369 net/rds/send.c cp->cp_xmit_sg, cp 370 net/rds/send.c cp->cp_xmit_data_off); cp 374 net/rds/send.c if (cp->cp_xmit_hdr_off < sizeof(struct rds_header)) { cp 377 net/rds/send.c cp->cp_xmit_hdr_off); cp 378 net/rds/send.c cp->cp_xmit_hdr_off += tmp; cp 382 net/rds/send.c sg = &rm->data.op_sg[cp->cp_xmit_sg]; cp 385 net/rds/send.c cp->cp_xmit_data_off); cp 386 net/rds/send.c cp->cp_xmit_data_off += tmp; cp 388 net/rds/send.c if (cp->cp_xmit_data_off == sg->length) { cp 389 net/rds/send.c cp->cp_xmit_data_off = 0; cp 391 net/rds/send.c cp->cp_xmit_sg++; cp 392 net/rds/send.c BUG_ON(ret != 0 && cp->cp_xmit_sg == cp 397 net/rds/send.c if (cp->cp_xmit_hdr_off == sizeof(struct rds_header) && cp 398 net/rds/send.c (cp->cp_xmit_sg == rm->data.op_nents)) cp 399 net/rds/send.c cp->cp_xmit_data_sent = 1; cp 407 net/rds/send.c if (!rm->data.op_active || cp->cp_xmit_data_sent) { cp 408 net/rds/send.c cp->cp_xmit_rm = NULL; cp 409 net/rds/send.c cp->cp_xmit_sg = 0; cp 410 net/rds/send.c cp->cp_xmit_hdr_off = 0; cp 411 net/rds/send.c cp->cp_xmit_data_off = 0; cp 412 net/rds/send.c cp->cp_xmit_rdma_sent = 0; cp 413 net/rds/send.c cp->cp_xmit_atomic_sent = 0; cp 414 net/rds/send.c cp->cp_xmit_data_sent = 0; cp 422 net/rds/send.c conn->c_trans->xmit_path_complete(cp); cp 423 net/rds/send.c release_in_xmit(cp); cp 452 net/rds/send.c raced = send_gen != READ_ONCE(cp->cp_send_gen); cp 455 net/rds/send.c !list_empty(&cp->cp_send_queue)) && !raced) { cp 459 net/rds/send.c if (rds_destroy_pending(cp->cp_conn)) cp 462 net/rds/send.c queue_delayed_work(rds_wq, &cp->cp_send_w, 1); cp 686 net/rds/send.c void rds_send_path_drop_acked(struct rds_conn_path *cp, u64 ack, cp 693 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 695 net/rds/send.c list_for_each_entry_safe(rm, tmp, &cp->cp_retrans, m_conn_item) { cp 707 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 726 net/rds/send.c struct rds_conn_path *cp; cp 757 net/rds/send.c cp = rm->m_inc.i_conn_path; cp 759 net/rds/send.c cp = &conn->c_path[0]; cp 761 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 768 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 772 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 819 net/rds/send.c struct rds_conn_path *cp, cp 864 net/rds/send.c rm->m_inc.i_conn_path = cp; cp 867 net/rds/send.c spin_lock(&cp->cp_lock); cp 868 net/rds/send.c rm->m_inc.i_hdr.h_sequence = cpu_to_be64(cp->cp_next_tx_seq++); cp 869 net/rds/send.c list_add_tail(&rm->m_conn_item, &cp->cp_send_queue); cp 871 net/rds/send.c spin_unlock(&cp->cp_lock); cp 1426 net/rds/send.c rds_send_probe(struct rds_conn_path *cp, __be16 sport, cp 1439 net/rds/send.c rm->m_daddr = cp->cp_conn->c_faddr; cp 1442 net/rds/send.c rds_conn_path_connect_if_down(cp); cp 1444 net/rds/send.c ret = rds_cong_wait(cp->cp_conn->c_fcong, dport, 1, NULL); cp 1448 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 1449 net/rds/send.c list_add_tail(&rm->m_conn_item, &cp->cp_send_queue); cp 1452 net/rds/send.c rm->m_inc.i_conn = cp->cp_conn; cp 1453 net/rds/send.c rm->m_inc.i_conn_path = cp; cp 1456 net/rds/send.c cp->cp_next_tx_seq); cp 1458 net/rds/send.c cp->cp_next_tx_seq++; cp 1461 net/rds/send.c cp->cp_conn->c_trans->t_mp_capable) { cp 1463 net/rds/send.c u32 my_gen_num = cpu_to_be32(cp->cp_conn->c_my_gen_num); cp 1473 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 1480 net/rds/send.c if (!rds_destroy_pending(cp->cp_conn)) cp 1481 net/rds/send.c queue_delayed_work(rds_wq, &cp->cp_send_w, 1); cp 1494 net/rds/send.c rds_send_pong(struct rds_conn_path *cp, __be16 dport) cp 1496 net/rds/send.c return rds_send_probe(cp, 0, dport, 0); cp 1503 net/rds/send.c struct rds_conn_path *cp = &conn->c_path[cp_index]; cp 1505 net/rds/send.c spin_lock_irqsave(&cp->cp_lock, flags); cp 1507 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 1511 net/rds/send.c spin_unlock_irqrestore(&cp->cp_lock, flags); cp 1512 net/rds/send.c rds_send_probe(cp, cpu_to_be16(RDS_FLAG_PROBE_PORT), 0, 0); cp 149 net/rds/tcp.c struct rds_conn_path *cp) cp 151 net/rds/tcp.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 177 net/rds/tcp.c atomic_set(&cp->cp_state, RDS_CONN_RESETTING); cp 178 net/rds/tcp.c wait_event(cp->cp_waitq, !test_bit(RDS_IN_XMIT, &cp->cp_flags)); cp 181 net/rds/tcp.c cancel_delayed_work_sync(&cp->cp_send_w); cp 182 net/rds/tcp.c cancel_delayed_work_sync(&cp->cp_recv_w); cp 193 net/rds/tcp.c rds_send_path_reset(cp); cp 195 net/rds/tcp.c rds_tcp_set_callbacks(sock, cp); cp 203 net/rds/tcp.c void rds_tcp_set_callbacks(struct socket *sock, struct rds_conn_path *cp) cp 205 net/rds/tcp.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 225 net/rds/tcp.c tc->t_cpath = cp; cp 230 net/rds/tcp.c sock->sk->sk_user_data = cp; cp 54 net/rds/tcp.h void rds_tcp_set_callbacks(struct socket *sock, struct rds_conn_path *cp); cp 55 net/rds/tcp.h void rds_tcp_reset_callbacks(struct socket *sock, struct rds_conn_path *cp); cp 65 net/rds/tcp.h int rds_tcp_conn_path_connect(struct rds_conn_path *cp); cp 82 net/rds/tcp.h int rds_tcp_recv_path(struct rds_conn_path *cp); cp 87 net/rds/tcp.h void rds_tcp_xmit_path_prepare(struct rds_conn_path *cp); cp 88 net/rds/tcp.h void rds_tcp_xmit_path_complete(struct rds_conn_path *cp); cp 43 net/rds/tcp_connect.c struct rds_conn_path *cp; cp 47 net/rds/tcp_connect.c cp = sk->sk_user_data; cp 48 net/rds/tcp_connect.c if (!cp) { cp 52 net/rds/tcp_connect.c tc = cp->cp_transport_data; cp 69 net/rds/tcp_connect.c if (rds_addr_cmp(&cp->cp_conn->c_laddr, cp 70 net/rds/tcp_connect.c &cp->cp_conn->c_faddr) >= 0 && cp 71 net/rds/tcp_connect.c rds_conn_path_transition(cp, RDS_CONN_CONNECTING, cp 73 net/rds/tcp_connect.c rds_conn_path_drop(cp, false); cp 75 net/rds/tcp_connect.c rds_connect_path_complete(cp, RDS_CONN_CONNECTING); cp 80 net/rds/tcp_connect.c rds_conn_path_drop(cp, false); cp 89 net/rds/tcp_connect.c int rds_tcp_conn_path_connect(struct rds_conn_path *cp) cp 98 net/rds/tcp_connect.c struct rds_connection *conn = cp->cp_conn; cp 99 net/rds/tcp_connect.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 104 net/rds/tcp_connect.c if (cp->cp_index > 0 && cp->cp_conn->c_npaths < 2) cp 109 net/rds/tcp_connect.c if (rds_conn_path_up(cp)) { cp 171 net/rds/tcp_connect.c rds_tcp_set_callbacks(sock, cp); cp 181 net/rds/tcp_connect.c rds_tcp_restore_callbacks(sock, cp->cp_transport_data); cp 200 net/rds/tcp_connect.c void rds_tcp_conn_path_shutdown(struct rds_conn_path *cp) cp 202 net/rds/tcp_connect.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 206 net/rds/tcp_connect.c cp->cp_conn, tc, sock); cp 209 net/rds/tcp_connect.c if (rds_destroy_pending(cp->cp_conn)) cp 102 net/rds/tcp_listen.c struct rds_conn_path *cp = &conn->c_path[i]; cp 104 net/rds/tcp_listen.c if (rds_conn_path_transition(cp, RDS_CONN_DOWN, cp 106 net/rds/tcp_listen.c rds_conn_path_transition(cp, RDS_CONN_ERROR, cp 108 net/rds/tcp_listen.c return cp->cp_transport_data; cp 133 net/rds/tcp_listen.c struct rds_conn_path *cp; cp 218 net/rds/tcp_listen.c cp = rs_tcp->t_cpath; cp 219 net/rds/tcp_listen.c conn_state = rds_conn_path_state(cp); cp 225 net/rds/tcp_listen.c rds_tcp_reset_callbacks(new_sock, cp); cp 227 net/rds/tcp_listen.c rds_connect_path_complete(cp, RDS_CONN_RESETTING); cp 229 net/rds/tcp_listen.c rds_tcp_set_callbacks(new_sock, cp); cp 230 net/rds/tcp_listen.c rds_connect_path_complete(cp, RDS_CONN_CONNECTING); cp 235 net/rds/tcp_listen.c rds_send_ping(cp->cp_conn, cp->cp_index); cp 158 net/rds/tcp_recv.c struct rds_conn_path *cp = arg->conn_path; cp 159 net/rds/tcp_recv.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 181 net/rds/tcp_recv.c rds_inc_path_init(&tinc->ti_inc, cp, cp 182 net/rds/tcp_recv.c &cp->cp_conn->c_faddr); cp 237 net/rds/tcp_recv.c struct rds_connection *conn = cp->cp_conn; cp 262 net/rds/tcp_recv.c static int rds_tcp_read_sock(struct rds_conn_path *cp, gfp_t gfp) cp 264 net/rds/tcp_recv.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 270 net/rds/tcp_recv.c arg.conn_path = cp; cp 290 net/rds/tcp_recv.c int rds_tcp_recv_path(struct rds_conn_path *cp) cp 292 net/rds/tcp_recv.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 297 net/rds/tcp_recv.c cp->cp_index, tc, sock); cp 300 net/rds/tcp_recv.c ret = rds_tcp_read_sock(cp, GFP_KERNEL); cp 309 net/rds/tcp_recv.c struct rds_conn_path *cp; cp 315 net/rds/tcp_recv.c cp = sk->sk_user_data; cp 316 net/rds/tcp_recv.c if (!cp) { /* check for teardown race */ cp 321 net/rds/tcp_recv.c tc = cp->cp_transport_data; cp 325 net/rds/tcp_recv.c if (rds_tcp_read_sock(cp, GFP_ATOMIC) == -ENOMEM) { cp 327 net/rds/tcp_recv.c if (!rds_destroy_pending(cp->cp_conn)) cp 328 net/rds/tcp_recv.c queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); cp 46 net/rds/tcp_send.c void rds_tcp_xmit_path_prepare(struct rds_conn_path *cp) cp 48 net/rds/tcp_send.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 53 net/rds/tcp_send.c void rds_tcp_xmit_path_complete(struct rds_conn_path *cp) cp 55 net/rds/tcp_send.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 78 net/rds/tcp_send.c struct rds_conn_path *cp = rm->m_inc.i_conn_path; cp 79 net/rds/tcp_send.c struct rds_tcp_connection *tc = cp->cp_transport_data; cp 155 net/rds/tcp_send.c if (rds_conn_path_up(cp)) { cp 159 net/rds/tcp_send.c &conn->c_faddr, cp->cp_index, ret); cp 160 net/rds/tcp_send.c rds_conn_path_drop(cp, false); cp 186 net/rds/tcp_send.c struct rds_conn_path *cp; cp 190 net/rds/tcp_send.c cp = sk->sk_user_data; cp 191 net/rds/tcp_send.c if (!cp) { cp 196 net/rds/tcp_send.c tc = cp->cp_transport_data; cp 203 net/rds/tcp_send.c rds_send_path_drop_acked(cp, rds_tcp_snd_una(tc), rds_tcp_is_acked); cp 207 net/rds/tcp_send.c !rds_destroy_pending(cp->cp_conn)) cp 208 net/rds/tcp_send.c queue_delayed_work(rds_wq, &cp->cp_send_w, 0); cp 74 net/rds/threads.c void rds_connect_path_complete(struct rds_conn_path *cp, int curr) cp 76 net/rds/threads.c if (!rds_conn_path_transition(cp, curr, RDS_CONN_UP)) { cp 80 net/rds/threads.c atomic_read(&cp->cp_state)); cp 81 net/rds/threads.c rds_conn_path_drop(cp, false); cp 86 net/rds/threads.c cp->cp_conn, &cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr); cp 88 net/rds/threads.c cp->cp_reconnect_jiffies = 0; cp 89 net/rds/threads.c set_bit(0, &cp->cp_conn->c_map_queued); cp 91 net/rds/threads.c if (!rds_destroy_pending(cp->cp_conn)) { cp 92 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_send_w, 0); cp 93 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); cp 96 net/rds/threads.c cp->cp_conn->c_proposed_version = RDS_PROTOCOL_VERSION; cp 124 net/rds/threads.c void rds_queue_reconnect(struct rds_conn_path *cp) cp 127 net/rds/threads.c struct rds_connection *conn = cp->cp_conn; cp 131 net/rds/threads.c cp->cp_reconnect_jiffies); cp 138 net/rds/threads.c set_bit(RDS_RECONNECT_PENDING, &cp->cp_flags); cp 139 net/rds/threads.c if (cp->cp_reconnect_jiffies == 0) { cp 140 net/rds/threads.c cp->cp_reconnect_jiffies = rds_sysctl_reconnect_min_jiffies; cp 142 net/rds/threads.c if (!rds_destroy_pending(cp->cp_conn)) cp 143 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_conn_w, 0); cp 150 net/rds/threads.c rand % cp->cp_reconnect_jiffies, cp->cp_reconnect_jiffies, cp 153 net/rds/threads.c if (!rds_destroy_pending(cp->cp_conn)) cp 154 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_conn_w, cp 155 net/rds/threads.c rand % cp->cp_reconnect_jiffies); cp 158 net/rds/threads.c cp->cp_reconnect_jiffies = min(cp->cp_reconnect_jiffies * 2, cp 164 net/rds/threads.c struct rds_conn_path *cp = container_of(work, cp 167 net/rds/threads.c struct rds_connection *conn = cp->cp_conn; cp 170 net/rds/threads.c if (cp->cp_index > 0 && cp 171 net/rds/threads.c rds_addr_cmp(&cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr) >= 0) cp 173 net/rds/threads.c clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags); cp 174 net/rds/threads.c ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING); cp 176 net/rds/threads.c ret = conn->c_trans->conn_path_connect(cp); cp 181 net/rds/threads.c if (rds_conn_path_transition(cp, cp 184 net/rds/threads.c rds_queue_reconnect(cp); cp 186 net/rds/threads.c rds_conn_path_error(cp, "connect failed\n"); cp 193 net/rds/threads.c struct rds_conn_path *cp = container_of(work, cp 198 net/rds/threads.c if (rds_conn_path_state(cp) == RDS_CONN_UP) { cp 199 net/rds/threads.c clear_bit(RDS_LL_SEND_FULL, &cp->cp_flags); cp 200 net/rds/threads.c ret = rds_send_xmit(cp); cp 202 net/rds/threads.c rdsdebug("conn %p ret %d\n", cp->cp_conn, ret); cp 206 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_send_w, 0); cp 210 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_send_w, 2); cp 219 net/rds/threads.c struct rds_conn_path *cp = container_of(work, cp 224 net/rds/threads.c if (rds_conn_path_state(cp) == RDS_CONN_UP) { cp 225 net/rds/threads.c ret = cp->cp_conn->c_trans->recv_path(cp); cp 226 net/rds/threads.c rdsdebug("conn %p ret %d\n", cp->cp_conn, ret); cp 230 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); cp 234 net/rds/threads.c queue_delayed_work(rds_wq, &cp->cp_recv_w, 2); cp 243 net/rds/threads.c struct rds_conn_path *cp = container_of(work, cp 247 net/rds/threads.c rds_conn_shutdown(cp); cp 291 net/rxrpc/af_rxrpc.c struct rxrpc_conn_parameters cp; cp 315 net/rxrpc/af_rxrpc.c memset(&cp, 0, sizeof(cp)); cp 316 net/rxrpc/af_rxrpc.c cp.local = rx->local; cp 317 net/rxrpc/af_rxrpc.c cp.key = key; cp 318 net/rxrpc/af_rxrpc.c cp.security_level = rx->min_sec_level; cp 319 net/rxrpc/af_rxrpc.c cp.exclusive = false; cp 320 net/rxrpc/af_rxrpc.c cp.upgrade = upgrade; cp 321 net/rxrpc/af_rxrpc.c cp.service_id = srx->srx_service; cp 322 net/rxrpc/af_rxrpc.c call = rxrpc_new_client_call(rx, &cp, srx, &p, gfp, debug_id); cp 329 net/rxrpc/af_rxrpc.c rxrpc_put_peer(cp.peer); cp 217 net/rxrpc/call_object.c struct rxrpc_conn_parameters *cp, cp 289 net/rxrpc/call_object.c ret = rxrpc_connect_call(rx, call, cp, srx, gfp); cp 168 net/rxrpc/conn_client.c rxrpc_alloc_client_connection(struct rxrpc_conn_parameters *cp, gfp_t gfp) cp 171 net/rxrpc/conn_client.c struct rxrpc_net *rxnet = cp->local->rxnet; cp 183 net/rxrpc/conn_client.c if (cp->exclusive) cp 185 net/rxrpc/conn_client.c if (cp->upgrade) cp 188 net/rxrpc/conn_client.c conn->params = *cp; cp 191 net/rxrpc/conn_client.c conn->service_id = cp->service_id; cp 211 net/rxrpc/conn_client.c cp->peer = NULL; cp 277 net/rxrpc/conn_client.c struct rxrpc_conn_parameters *cp, cp 282 net/rxrpc/conn_client.c struct rxrpc_local *local = cp->local; cp 289 net/rxrpc/conn_client.c cp->peer = rxrpc_lookup_peer(rx, cp->local, srx, gfp); cp 290 net/rxrpc/conn_client.c if (!cp->peer) cp 293 net/rxrpc/conn_client.c call->cong_cwnd = cp->peer->cong_cwnd; cp 302 net/rxrpc/conn_client.c if (!cp->exclusive) { cp 309 net/rxrpc/conn_client.c #define cmp(X) ((long)conn->params.X - (long)cp->X) cp 340 net/rxrpc/conn_client.c candidate = rxrpc_alloc_client_connection(cp, gfp); cp 354 net/rxrpc/conn_client.c if (cp->exclusive) { cp 440 net/rxrpc/conn_client.c rxrpc_put_peer(cp->peer); cp 441 net/rxrpc/conn_client.c cp->peer = NULL; cp 696 net/rxrpc/conn_client.c struct rxrpc_conn_parameters *cp, cp 700 net/rxrpc/conn_client.c struct rxrpc_net *rxnet = cp->local->rxnet; cp 708 net/rxrpc/conn_client.c ret = rxrpc_get_client_conn(rx, call, cp, srx, gfp); cp 560 net/rxrpc/key.c const char *cp; cp 591 net/rxrpc/key.c cp = (const char *) xdr; cp 593 net/rxrpc/key.c if (!isprint(cp[loop])) cp 596 net/rxrpc/key.c if (cp[loop]) cp 600 net/rxrpc/sendmsg.c struct rxrpc_conn_parameters cp; cp 617 net/rxrpc/sendmsg.c memset(&cp, 0, sizeof(cp)); cp 618 net/rxrpc/sendmsg.c cp.local = rx->local; cp 619 net/rxrpc/sendmsg.c cp.key = rx->key; cp 620 net/rxrpc/sendmsg.c cp.security_level = rx->min_sec_level; cp 621 net/rxrpc/sendmsg.c cp.exclusive = rx->exclusive | p->exclusive; cp 622 net/rxrpc/sendmsg.c cp.upgrade = p->upgrade; cp 623 net/rxrpc/sendmsg.c cp.service_id = srx->srx_service; cp 624 net/rxrpc/sendmsg.c call = rxrpc_new_client_call(rx, &cp, srx, &p->call, GFP_KERNEL, cp 628 net/rxrpc/sendmsg.c rxrpc_put_peer(cp.peer); cp 31 net/sched/act_ctinfo.c struct tcf_ctinfo_params *cp, cp 36 net/sched/act_ctinfo.c newdscp = (((ct->mark & cp->dscpmask) >> cp->dscpmaskshift) << 2) & cp 72 net/sched/act_ctinfo.c struct tcf_ctinfo_params *cp, cp 76 net/sched/act_ctinfo.c skb->mark = ct->mark & cp->cpmarkmask; cp 87 net/sched/act_ctinfo.c struct tcf_ctinfo_params *cp; cp 92 net/sched/act_ctinfo.c cp = rcu_dereference_bh(ca->params); cp 118 net/sched/act_ctinfo.c proto, cp->net, &tuple)) cp 120 net/sched/act_ctinfo.c zone.id = cp->zone; cp 123 net/sched/act_ctinfo.c thash = nf_conntrack_find_get(cp->net, &zone, &tuple); cp 130 net/sched/act_ctinfo.c if (cp->mode & CTINFO_MODE_DSCP) cp 131 net/sched/act_ctinfo.c if (!cp->dscpstatemask || (ct->mark & cp->dscpstatemask)) cp 132 net/sched/act_ctinfo.c tcf_ctinfo_dscp_set(ct, ca, cp, skb, wlen, proto); cp 134 net/sched/act_ctinfo.c if (cp->mode & CTINFO_MODE_CPMARK) cp 135 net/sched/act_ctinfo.c tcf_ctinfo_cpmark_set(ct, ca, cp, skb); cp 292 net/sched/act_ctinfo.c struct tcf_ctinfo_params *cp; cp 296 net/sched/act_ctinfo.c cp = rcu_dereference_protected(ci->params, cp 307 net/sched/act_ctinfo.c if (nla_put_u16(skb, TCA_CTINFO_ZONE, cp->zone)) cp 310 net/sched/act_ctinfo.c if (cp->mode & CTINFO_MODE_DSCP) { cp 312 net/sched/act_ctinfo.c cp->dscpmask)) cp 315 net/sched/act_ctinfo.c cp->dscpstatemask)) cp 319 net/sched/act_ctinfo.c if (cp->mode & CTINFO_MODE_CPMARK) { cp 321 net/sched/act_ctinfo.c cp->cpmarkmask)) cp 366 net/sched/act_ctinfo.c struct tcf_ctinfo_params *cp; cp 368 net/sched/act_ctinfo.c cp = rcu_dereference_protected(ci->params, 1); cp 369 net/sched/act_ctinfo.c if (cp) cp 370 net/sched/act_ctinfo.c kfree_rcu(cp, rcu); cp 293 net/sched/cls_tcindex.c static void tcindex_free_perfect_hash(struct tcindex_data *cp) cp 297 net/sched/cls_tcindex.c for (i = 0; i < cp->hash; i++) cp 298 net/sched/cls_tcindex.c tcf_exts_destroy(&cp->perfect[i].exts); cp 299 net/sched/cls_tcindex.c kfree(cp->perfect); cp 302 net/sched/cls_tcindex.c static int tcindex_alloc_perfect_hash(struct net *net, struct tcindex_data *cp) cp 306 net/sched/cls_tcindex.c cp->perfect = kcalloc(cp->hash, sizeof(struct tcindex_filter_result), cp 308 net/sched/cls_tcindex.c if (!cp->perfect) cp 311 net/sched/cls_tcindex.c for (i = 0; i < cp->hash; i++) { cp 312 net/sched/cls_tcindex.c err = tcf_exts_init(&cp->perfect[i].exts, net, cp 316 net/sched/cls_tcindex.c cp->perfect[i].p = cp; cp 322 net/sched/cls_tcindex.c tcindex_free_perfect_hash(cp); cp 333 net/sched/cls_tcindex.c struct tcindex_data *cp = NULL, *oldp; cp 351 net/sched/cls_tcindex.c cp = kzalloc(sizeof(*cp), GFP_KERNEL); cp 352 net/sched/cls_tcindex.c if (!cp) cp 355 net/sched/cls_tcindex.c cp->mask = p->mask; cp 356 net/sched/cls_tcindex.c cp->shift = p->shift; cp 357 net/sched/cls_tcindex.c cp->hash = p->hash; cp 358 net/sched/cls_tcindex.c cp->alloc_hash = p->alloc_hash; cp 359 net/sched/cls_tcindex.c cp->fall_through = p->fall_through; cp 360 net/sched/cls_tcindex.c cp->tp = tp; cp 361 net/sched/cls_tcindex.c refcount_set(&cp->refcnt, 1); /* Paired with tcindex_destroy_work() */ cp 364 net/sched/cls_tcindex.c cp->hash = nla_get_u32(tb[TCA_TCINDEX_HASH]); cp 367 net/sched/cls_tcindex.c cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]); cp 370 net/sched/cls_tcindex.c cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]); cp 372 net/sched/cls_tcindex.c if (!cp->hash) { cp 376 net/sched/cls_tcindex.c if ((cp->mask >> cp->shift) < PERFECT_HASH_THRESHOLD) cp 377 net/sched/cls_tcindex.c cp->hash = (cp->mask >> cp->shift) + 1; cp 379 net/sched/cls_tcindex.c cp->hash = DEFAULT_HASH_SIZE; cp 385 net/sched/cls_tcindex.c if (tcindex_alloc_perfect_hash(net, cp) < 0) cp 387 net/sched/cls_tcindex.c cp->alloc_hash = cp->hash; cp 388 net/sched/cls_tcindex.c for (i = 0; i < min(cp->hash, p->hash); i++) cp 389 net/sched/cls_tcindex.c cp->perfect[i].res = p->perfect[i].res; cp 392 net/sched/cls_tcindex.c cp->h = p->h; cp 394 net/sched/cls_tcindex.c err = tcindex_filter_result_init(&new_filter_result, cp, net); cp 405 net/sched/cls_tcindex.c if (cp->perfect) { cp 406 net/sched/cls_tcindex.c if (!valid_perfect_hash(cp) || cp 407 net/sched/cls_tcindex.c cp->hash > cp->alloc_hash) cp 409 net/sched/cls_tcindex.c } else if (cp->h && cp->hash != cp->alloc_hash) { cp 415 net/sched/cls_tcindex.c cp->fall_through = nla_get_u32(tb[TCA_TCINDEX_FALL_THROUGH]); cp 417 net/sched/cls_tcindex.c if (!cp->perfect && !cp->h) cp 418 net/sched/cls_tcindex.c cp->alloc_hash = cp->hash; cp 425 net/sched/cls_tcindex.c if (cp->perfect || valid_perfect_hash(cp)) cp 426 net/sched/cls_tcindex.c if (handle >= cp->alloc_hash) cp 431 net/sched/cls_tcindex.c if (!cp->perfect && !cp->h) { cp 432 net/sched/cls_tcindex.c if (valid_perfect_hash(cp)) { cp 433 net/sched/cls_tcindex.c if (tcindex_alloc_perfect_hash(net, cp) < 0) cp 439 net/sched/cls_tcindex.c hash = kcalloc(cp->hash, cp 446 net/sched/cls_tcindex.c cp->h = hash; cp 451 net/sched/cls_tcindex.c if (cp->perfect) cp 452 net/sched/cls_tcindex.c r = cp->perfect + handle; cp 454 net/sched/cls_tcindex.c r = tcindex_lookup(cp, handle) ? : &new_filter_result; cp 462 net/sched/cls_tcindex.c err = tcindex_filter_result_init(&f->result, cp, net); cp 475 net/sched/cls_tcindex.c err = tcindex_filter_result_init(old_r, cp, net); cp 486 net/sched/cls_tcindex.c rcu_assign_pointer(tp->root, cp); cp 495 net/sched/cls_tcindex.c fp = cp->h + (handle % cp->hash); cp 512 net/sched/cls_tcindex.c tcindex_free_perfect_hash(cp); cp 514 net/sched/cls_tcindex.c kfree(cp->h); cp 517 net/sched/cls_tcindex.c kfree(cp); cp 329 net/sunrpc/auth_gss/gss_krb5_mech.c struct crypto_sync_skcipher *cp; cp 331 net/sunrpc/auth_gss/gss_krb5_mech.c cp = crypto_alloc_sync_skcipher(cname, 0, 0); cp 332 net/sunrpc/auth_gss/gss_krb5_mech.c if (IS_ERR(cp)) { cp 337 net/sunrpc/auth_gss/gss_krb5_mech.c if (crypto_sync_skcipher_setkey(cp, key, ctx->gk5e->keylength)) { cp 340 net/sunrpc/auth_gss/gss_krb5_mech.c crypto_free_sync_skcipher(cp); cp 343 net/sunrpc/auth_gss/gss_krb5_mech.c return cp; cp 1400 net/sunrpc/cache.c struct cache_head *cp = p; cp 1408 net/sunrpc/cache.c convert_to_wallclock(cp->expiry_time), cp 1409 net/sunrpc/cache.c kref_read(&cp->ref), cp->flags); cp 1410 net/sunrpc/cache.c cache_get(cp); cp 1411 net/sunrpc/cache.c if (cache_check(cd, cp, NULL)) cp 1415 net/sunrpc/cache.c if (cache_is_expired(cd, cp)) cp 1417 net/sunrpc/cache.c cache_put(cp, cd); cp 1420 net/sunrpc/cache.c return cd->cache_show(m, cd, cp); cp 642 scripts/unifdef.c const char *cp; cp 659 scripts/unifdef.c cp = skipcomment(tline); cp 661 scripts/unifdef.c if (*cp == '#') { cp 664 scripts/unifdef.c cp = skipcomment(cp + 1); cp 665 scripts/unifdef.c } else if (*cp != '\0') cp 669 scripts/unifdef.c keyword = tline + (cp - tline); cp 670 scripts/unifdef.c cp = skipsym(cp); cp 671 scripts/unifdef.c kwlen = cp - keyword; cp 673 scripts/unifdef.c if (strncmp(cp, "\\\r\n", 3) == 0 || cp 674 scripts/unifdef.c strncmp(cp, "\\\n", 2) == 0) cp 678 scripts/unifdef.c cp = skipcomment(cp); cp 679 scripts/unifdef.c if ((cursym = findsym(cp)) < 0) cp 691 scripts/unifdef.c cp = skipsym(cp); cp 693 scripts/unifdef.c retval = ifeval(&cp); cp 695 scripts/unifdef.c retval = ifeval(&cp) - LT_IF + LT_ELIF; cp 704 scripts/unifdef.c cp = skipcomment(cp); cp 705 scripts/unifdef.c if (*cp != '\0') { cp 722 scripts/unifdef.c size_t len = cp - tline; cp 726 scripts/unifdef.c cp += strlen(newline); cp 734 scripts/unifdef.c while (*cp != '\0') cp 735 scripts/unifdef.c cp = skipcomment(cp + 1); cp 827 scripts/unifdef.c const char *cp; cp 833 scripts/unifdef.c cp = skipcomment(*cpp); cp 834 scripts/unifdef.c if (*cp == '!') { cp 836 scripts/unifdef.c cp++; cp 837 scripts/unifdef.c lt = eval_unary(ops, valp, &cp); cp 844 scripts/unifdef.c } else if (*cp == '(') { cp 845 scripts/unifdef.c cp++; cp 847 scripts/unifdef.c lt = eval_table(eval_ops, valp, &cp); cp 850 scripts/unifdef.c cp = skipcomment(cp); cp 851 scripts/unifdef.c if (*cp++ != ')') cp 853 scripts/unifdef.c } else if (isdigit((unsigned char)*cp)) { cp 855 scripts/unifdef.c *valp = strtol(cp, &ep, 0); cp 856 scripts/unifdef.c if (ep == cp) cp 859 scripts/unifdef.c cp = skipsym(cp); cp 860 scripts/unifdef.c } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) { cp 861 scripts/unifdef.c cp = skipcomment(cp+7); cp 863 scripts/unifdef.c if (*cp == '(') { cp 864 scripts/unifdef.c cp = skipcomment(cp+1); cp 869 scripts/unifdef.c sym = findsym(cp); cp 876 scripts/unifdef.c cp = skipsym(cp); cp 877 scripts/unifdef.c cp = skipcomment(cp); cp 878 scripts/unifdef.c if (defparen && *cp++ != ')') cp 881 scripts/unifdef.c } else if (!endsym(*cp)) { cp 883 scripts/unifdef.c sym = findsym(cp); cp 884 scripts/unifdef.c cp = skipsym(cp); cp 887 scripts/unifdef.c cp = skipargs(cp); cp 896 scripts/unifdef.c cp = skipargs(cp); cp 904 scripts/unifdef.c *cpp = cp; cp 916 scripts/unifdef.c const char *cp; cp 921 scripts/unifdef.c cp = *cpp; cp 922 scripts/unifdef.c lt = ops->inner(ops+1, valp, &cp); cp 926 scripts/unifdef.c cp = skipcomment(cp); cp 928 scripts/unifdef.c if (strncmp(cp, op->str, strlen(op->str)) == 0) cp 932 scripts/unifdef.c cp += strlen(op->str); cp 934 scripts/unifdef.c rt = ops->inner(ops+1, &val, &cp); cp 940 scripts/unifdef.c *cpp = cp; cp 972 scripts/unifdef.c skipcomment(const char *cp) cp 975 scripts/unifdef.c for (; isspace((unsigned char)*cp); cp++) cp 976 scripts/unifdef.c if (*cp == '\n') cp 978 scripts/unifdef.c return (cp); cp 980 scripts/unifdef.c while (*cp != '\0') cp 982 scripts/unifdef.c if (strncmp(cp, "\\\r\n", 3) == 0) cp 983 scripts/unifdef.c cp += 3; cp 984 scripts/unifdef.c else if (strncmp(cp, "\\\n", 2) == 0) cp 985 scripts/unifdef.c cp += 2; cp 988 scripts/unifdef.c if (strncmp(cp, "/\\\r\n", 4) == 0) { cp 990 scripts/unifdef.c cp += 4; cp 991 scripts/unifdef.c } else if (strncmp(cp, "/\\\n", 3) == 0) { cp 993 scripts/unifdef.c cp += 3; cp 994 scripts/unifdef.c } else if (strncmp(cp, "/*", 2) == 0) { cp 996 scripts/unifdef.c cp += 2; cp 997 scripts/unifdef.c } else if (strncmp(cp, "//", 2) == 0) { cp 999 scripts/unifdef.c cp += 2; cp 1000 scripts/unifdef.c } else if (strncmp(cp, "\'", 1) == 0) { cp 1003 scripts/unifdef.c cp += 1; cp 1004 scripts/unifdef.c } else if (strncmp(cp, "\"", 1) == 0) { cp 1007 scripts/unifdef.c cp += 1; cp 1008 scripts/unifdef.c } else if (strncmp(cp, "\n", 1) == 0) { cp 1010 scripts/unifdef.c cp += 1; cp 1011 scripts/unifdef.c } else if (strchr(" \r\t", *cp) != NULL) { cp 1012 scripts/unifdef.c cp += 1; cp 1014 scripts/unifdef.c return (cp); cp 1017 scripts/unifdef.c if (strncmp(cp, "\n", 1) == 0) { cp 1021 scripts/unifdef.c cp += 1; cp 1025 scripts/unifdef.c if ((incomment == CHAR_LITERAL && cp[0] == '\'') || cp 1026 scripts/unifdef.c (incomment == STRING_LITERAL && cp[0] == '\"')) { cp 1028 scripts/unifdef.c cp += 1; cp 1029 scripts/unifdef.c } else if (cp[0] == '\\') { cp 1030 scripts/unifdef.c if (cp[1] == '\0') cp 1031 scripts/unifdef.c cp += 1; cp 1033 scripts/unifdef.c cp += 2; cp 1034 scripts/unifdef.c } else if (strncmp(cp, "\n", 1) == 0) { cp 1040 scripts/unifdef.c cp += 1; cp 1043 scripts/unifdef.c if (strncmp(cp, "*\\\r\n", 4) == 0) { cp 1045 scripts/unifdef.c cp += 4; cp 1046 scripts/unifdef.c } else if (strncmp(cp, "*\\\n", 3) == 0) { cp 1048 scripts/unifdef.c cp += 3; cp 1049 scripts/unifdef.c } else if (strncmp(cp, "*/", 2) == 0) { cp 1051 scripts/unifdef.c cp += 2; cp 1053 scripts/unifdef.c cp += 1; cp 1056 scripts/unifdef.c if (*cp == '*') { cp 1058 scripts/unifdef.c cp += 1; cp 1059 scripts/unifdef.c } else if (*cp == '/') { cp 1061 scripts/unifdef.c cp += 1; cp 1068 scripts/unifdef.c if (*cp == '/') { cp 1070 scripts/unifdef.c cp += 1; cp 1077 scripts/unifdef.c return (cp); cp 1084 scripts/unifdef.c skipargs(const char *cp) cp 1086 scripts/unifdef.c const char *ocp = cp; cp 1088 scripts/unifdef.c cp = skipcomment(cp); cp 1089 scripts/unifdef.c if (*cp != '(') cp 1090 scripts/unifdef.c return (cp); cp 1092 scripts/unifdef.c if (*cp == '(') cp 1094 scripts/unifdef.c if (*cp == ')') cp 1096 scripts/unifdef.c cp = skipcomment(cp+1); cp 1097 scripts/unifdef.c } while (level != 0 && *cp != '\0'); cp 1099 scripts/unifdef.c return (cp); cp 1109 scripts/unifdef.c skipsym(const char *cp) cp 1111 scripts/unifdef.c while (!endsym(*cp)) cp 1112 scripts/unifdef.c ++cp; cp 1113 scripts/unifdef.c return (cp); cp 1123 scripts/unifdef.c const char *cp; cp 1126 scripts/unifdef.c cp = skipsym(str); cp 1127 scripts/unifdef.c if (cp == str) cp 1135 scripts/unifdef.c (int)(cp-str), str, cp 1141 scripts/unifdef.c if (strlcmp(symname[symind], str, cp-str) == 0) { cp 416 security/security.c char *cp; cp 426 security/security.c cp = kasprintf(GFP_KERNEL, "%s,%s", *result, new); cp 427 security/security.c if (cp == NULL) cp 430 security/security.c *result = cp; cp 488 security/smack/smack_access.c unsigned char *cp; cp 498 security/smack/smack_access.c for (cat = 1, cp = catset, byte = 0; byte < len; cp++, byte++) cp 500 security/smack/smack_access.c if ((m & *cp) == 0) cp 3483 security/smack/smack_lsm.c char *cp; cp 3489 security/smack/smack_lsm.c cp = kstrdup(skp->smk_known, GFP_KERNEL); cp 3490 security/smack/smack_lsm.c if (cp == NULL) cp 3493 security/smack/smack_lsm.c slen = strlen(cp); cp 3494 security/smack/smack_lsm.c *value = cp; cp 263 security/smack/smackfs.c const char *cp; cp 265 security/smack/smackfs.c for (cp = string; ; cp++) cp 266 security/smack/smackfs.c switch (*cp) { cp 319 security/smack/smackfs.c const char *cp; cp 331 security/smack/smackfs.c cp = smk_parse_smack(subject, len); cp 332 security/smack/smackfs.c if (IS_ERR(cp)) cp 333 security/smack/smackfs.c return PTR_ERR(cp); cp 334 security/smack/smackfs.c skp = smk_find_entry(cp); cp 335 security/smack/smackfs.c kfree(cp); cp 340 security/smack/smackfs.c cp = smk_parse_smack(object, len); cp 341 security/smack/smackfs.c if (IS_ERR(cp)) cp 342 security/smack/smackfs.c return PTR_ERR(cp); cp 343 security/smack/smackfs.c skp = smk_find_entry(cp); cp 344 security/smack/smackfs.c kfree(cp); cp 2499 security/smack/smackfs.c const char *cp; cp 2519 security/smack/smackfs.c cp = smk_parse_smack(data, count); cp 2520 security/smack/smackfs.c if (IS_ERR(cp)) { cp 2521 security/smack/smackfs.c rc = PTR_ERR(cp); cp 2525 security/smack/smackfs.c skp = smk_find_entry(cp); cp 2540 security/smack/smackfs.c kfree(cp); cp 27 security/tomoyo/audit.c char *cp; cp 39 security/tomoyo/audit.c cp = buffer + len; cp 41 security/tomoyo/audit.c memmove(cp, "} envp[]={ ", 11); cp 42 security/tomoyo/audit.c cp += 11; cp 44 security/tomoyo/audit.c last_start = cp; cp 54 security/tomoyo/audit.c if (cp == last_start) cp 55 security/tomoyo/audit.c *cp++ = '"'; cp 56 security/tomoyo/audit.c if (cp >= buffer + tomoyo_buffer_len - 32) { cp 60 security/tomoyo/audit.c *cp++ = '\\'; cp 61 security/tomoyo/audit.c *cp++ = '\\'; cp 63 security/tomoyo/audit.c *cp++ = c; cp 65 security/tomoyo/audit.c *cp++ = '"'; cp 66 security/tomoyo/audit.c *cp++ = ' '; cp 67 security/tomoyo/audit.c last_start = cp; cp 69 security/tomoyo/audit.c *cp++ = '\\'; cp 70 security/tomoyo/audit.c *cp++ = (c >> 6) + '0'; cp 71 security/tomoyo/audit.c *cp++ = ((c >> 3) & 7) + '0'; cp 72 security/tomoyo/audit.c *cp++ = (c & 7) + '0'; cp 79 security/tomoyo/audit.c cp = last_start; cp 80 security/tomoyo/audit.c memmove(cp, "... ", 4); cp 81 security/tomoyo/audit.c cp += 4; cp 83 security/tomoyo/audit.c memmove(cp, "} envp[]={ ", 11); cp 84 security/tomoyo/audit.c cp += 11; cp 85 security/tomoyo/audit.c last_start = cp; cp 91 security/tomoyo/audit.c cp = last_start; cp 92 security/tomoyo/audit.c memmove(cp, "... ", 4); cp 93 security/tomoyo/audit.c cp += 4; cp 102 security/tomoyo/audit.c *cp++ = '}'; cp 103 security/tomoyo/audit.c *cp = '\0'; cp 555 security/tomoyo/common.c const char *cp = strstr(string, find); cp 557 security/tomoyo/common.c if (cp) { cp 558 security/tomoyo/common.c cp += strlen(find); cp 559 security/tomoyo/common.c if (!strncmp(cp, "=yes", 4)) cp 561 security/tomoyo/common.c else if (!strncmp(cp, "=no", 3)) cp 579 security/tomoyo/common.c const char *cp = strstr(string, find); cp 581 security/tomoyo/common.c if (cp) cp 582 security/tomoyo/common.c sscanf(cp + strlen(find), "=%u", i); cp 678 security/tomoyo/common.c char *cp; cp 684 security/tomoyo/common.c i = simple_strtoul(data, &cp, 10); cp 685 security/tomoyo/common.c if (*cp != '-') cp 687 security/tomoyo/common.c data = cp + 1; cp 691 security/tomoyo/common.c cp = strchr(data, '='); cp 692 security/tomoyo/common.c if (!cp) cp 694 security/tomoyo/common.c *cp++ = '\0'; cp 698 security/tomoyo/common.c = tomoyo_get_name(cp); cp 712 security/tomoyo/common.c tomoyo_set_uint(&profile->pref[i], cp, cp 716 security/tomoyo/common.c return tomoyo_set_mode(data, cp, profile); cp 1213 security/tomoyo/common.c const char *cp = tomoyo_dif[idx]; cp 1215 security/tomoyo/common.c if (strncmp(data, cp, strlen(cp) - 1)) cp 2005 security/tomoyo/common.c char *cp = strchr(header, '\n'); cp 2008 security/tomoyo/common.c if (!cp) cp 2010 security/tomoyo/common.c cp = strchr(cp + 1, '\n'); cp 2011 security/tomoyo/common.c if (!cp) cp 2013 security/tomoyo/common.c *cp++ = '\0'; cp 2014 security/tomoyo/common.c len = strlen(cp) + 1; cp 2016 security/tomoyo/common.c if (*cp == 'f') { cp 2034 security/tomoyo/common.c snprintf(buffer, len - 1, "%s", cp); cp 2628 security/tomoyo/common.c char *cp = strchr(line, ' '); cp 2630 security/tomoyo/common.c if (cp) { cp 2631 security/tomoyo/common.c *cp++ = '\0'; cp 2633 security/tomoyo/common.c memmove(line, cp, strlen(cp) + 1); cp 2677 security/tomoyo/common.c char *cp = kzalloc(len, GFP_NOFS); cp 2679 security/tomoyo/common.c if (!cp) { cp 2683 security/tomoyo/common.c memmove(cp, cp0, head->w.avail); cp 2685 security/tomoyo/common.c head->write_buf = cp; cp 2686 security/tomoyo/common.c cp0 = cp; cp 168 security/tomoyo/condition.c char *cp = strchr(arg_ptr, '='); cp 170 security/tomoyo/condition.c if (cp) { cp 171 security/tomoyo/condition.c *cp = '\0'; cp 172 security/tomoyo/condition.c if (!tomoyo_envp(arg_ptr, cp + 1, cp 261 security/tomoyo/condition.c char *cp = start + strlen(start) - 1; cp 263 security/tomoyo/condition.c if (cp == start || *start++ != '"' || *cp != '"') cp 265 security/tomoyo/condition.c *cp = '\0'; cp 323 security/tomoyo/condition.c char *cp = left + strlen(left) - 1; cp 325 security/tomoyo/condition.c if (*cp-- != ']' || *cp != '"') cp 327 security/tomoyo/condition.c *cp = '\0'; cp 465 security/tomoyo/condition.c char *cp = strchr(pos, ' '); cp 467 security/tomoyo/condition.c if (cp) cp 468 security/tomoyo/condition.c *cp = '\0'; cp 472 security/tomoyo/condition.c if (cp) cp 473 security/tomoyo/condition.c *cp = ' '; cp 515 security/tomoyo/condition.c char *cp; cp 531 security/tomoyo/condition.c cp = strchr(pos, ' '); cp 532 security/tomoyo/condition.c if (cp) { cp 533 security/tomoyo/condition.c *cp = '\0'; /* Will restore later. */ cp 534 security/tomoyo/condition.c pos = cp + 1; cp 204 security/tomoyo/domain.c const char *cp = strrchr(name, ' '); cp 206 security/tomoyo/domain.c if (cp) cp 207 security/tomoyo/domain.c return cp + 1; cp 466 security/tomoyo/domain.c const char *cp = domainname; cp 469 security/tomoyo/domain.c while (*cp && *cp++ != ' ') cp 787 security/tomoyo/domain.c char *cp; cp 791 security/tomoyo/domain.c cp = strrchr(ee->tmp, ' '); cp 792 security/tomoyo/domain.c if (cp) cp 793 security/tomoyo/domain.c *cp = '\0'; cp 27 security/tomoyo/realpath.c char *cp; cp 44 security/tomoyo/realpath.c cp = kzalloc(len + 10, GFP_NOFS); cp 45 security/tomoyo/realpath.c if (!cp) cp 47 security/tomoyo/realpath.c cp0 = cp; cp 53 security/tomoyo/realpath.c *cp++ = '\\'; cp 54 security/tomoyo/realpath.c *cp++ = '\\'; cp 56 security/tomoyo/realpath.c *cp++ = c; cp 58 security/tomoyo/realpath.c *cp++ = '\\'; cp 59 security/tomoyo/realpath.c *cp++ = (c >> 6) + '0'; cp 60 security/tomoyo/realpath.c *cp++ = ((c >> 3) & 7) + '0'; cp 61 security/tomoyo/realpath.c *cp++ = (c & 7) + '0'; cp 116 security/tomoyo/util.c const char *cp = strstr(string, keyword); cp 118 security/tomoyo/util.c if (cp) cp 119 security/tomoyo/util.c return cp == string || *(cp - 1) == '/'; cp 185 security/tomoyo/util.c const char *cp = *str; cp 189 security/tomoyo/util.c if (*cp == '0') { cp 190 security/tomoyo/util.c char c = *(cp + 1); cp 194 security/tomoyo/util.c cp += 2; cp 197 security/tomoyo/util.c cp++; cp 200 security/tomoyo/util.c *result = simple_strtoul(cp, &ep, base); cp 201 security/tomoyo/util.c if (cp == ep) cp 544 security/tomoyo/util.c const unsigned char *cp = strchr(domainname, ' '); cp 546 security/tomoyo/util.c if (!cp) cp 549 security/tomoyo/util.c !tomoyo_correct_word2(domainname, cp - domainname)) cp 551 security/tomoyo/util.c domainname = cp + 1; cp 565 security/tomoyo/util.c const unsigned char *cp; cp 570 security/tomoyo/util.c cp = strchr(buffer, ' '); cp 571 security/tomoyo/util.c if (!cp) cp 574 security/tomoyo/util.c len = cp - buffer; cp 947 security/tomoyo/util.c const char *cp; cp 956 security/tomoyo/util.c cp = tomoyo_realpath_from_path(&exe_file->f_path); cp 958 security/tomoyo/util.c return cp; cp 174 sound/core/seq/seq_ports.c struct snd_seq_client **cp) cp 177 sound/core/seq/seq_ports.c *cp = snd_seq_client_use_ptr(addr->client); cp 178 sound/core/seq/seq_ports.c if (*cp) { cp 179 sound/core/seq/seq_ports.c p = snd_seq_port_use_ptr(*cp, addr->port); cp 181 sound/core/seq/seq_ports.c snd_seq_client_unlock(*cp); cp 182 sound/core/seq/seq_ports.c *cp = NULL; cp 3871 sound/pci/cs46xx/cs46xx_lib.c struct cs_card_type *cp; cp 3935 sound/pci/cs46xx/cs46xx_lib.c for (cp = &cards[0]; cp->name; cp++) { cp 3936 sound/pci/cs46xx/cs46xx_lib.c if (cp->vendor == ss_vendor && cp->id == ss_card) { cp 3938 sound/pci/cs46xx/cs46xx_lib.c cp->name); cp 3940 sound/pci/cs46xx/cs46xx_lib.c chip->amplifier_ctrl = cp->amp; cp 3941 sound/pci/cs46xx/cs46xx_lib.c chip->active_ctrl = cp->active; cp 3942 sound/pci/cs46xx/cs46xx_lib.c chip->mixer_init = cp->mixer_init; cp 3944 sound/pci/cs46xx/cs46xx_lib.c if (cp->init) cp 3945 sound/pci/cs46xx/cs46xx_lib.c cp->init(chip); cp 200 sound/ppc/pmac.c volatile struct dbdma_cmd __iomem *cp; cp 239 sound/ppc/pmac.c for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) { cp 240 sound/ppc/pmac.c cp->phy_addr = cpu_to_le32(offset); cp 241 sound/ppc/pmac.c cp->req_count = cpu_to_le16(rec->period_size); cp 243 sound/ppc/pmac.c cp->xfer_status = cpu_to_le16(0); cp 247 sound/ppc/pmac.c cp->command = cpu_to_le16(DBDMA_NOP + BR_ALWAYS); cp 248 sound/ppc/pmac.c cp->cmd_dep = cpu_to_le32(rec->cmd.addr); cp 264 sound/ppc/pmac.c volatile struct dbdma_cmd __iomem *cp; cp 277 sound/ppc/pmac.c for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) cp 278 sound/ppc/pmac.c out_le16(&cp->command, command); cp 292 sound/ppc/pmac.c for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) cp 293 sound/ppc/pmac.c out_le16(&cp->command, DBDMA_STOP); cp 316 sound/ppc/pmac.c volatile struct dbdma_cmd __iomem *cp = &rec->cmd.cmds[rec->cur_period]; cp 317 sound/ppc/pmac.c stat = le16_to_cpu(cp->xfer_status); cp 319 sound/ppc/pmac.c count = in_le16(&cp->res_count); cp 400 sound/ppc/pmac.c volatile struct dbdma_cmd __iomem *cp) cp 413 sound/ppc/pmac.c memcpy((void *)emergency_dbdma.cmds, (void *)cp, cp 416 sound/ppc/pmac.c cp->xfer_status = cpu_to_le16(0); cp 417 sound/ppc/pmac.c cp->req_count = cpu_to_le16(rec->period_size); cp 418 sound/ppc/pmac.c cp = emergency_dbdma.cmds; cp 423 sound/ppc/pmac.c req = le16_to_cpu(cp->req_count); cp 424 sound/ppc/pmac.c res = le16_to_cpu(cp->res_count); cp 425 sound/ppc/pmac.c phy = le32_to_cpu(cp->phy_addr); cp 427 sound/ppc/pmac.c cp->req_count = cpu_to_le16(res); cp 428 sound/ppc/pmac.c cp->res_count = cpu_to_le16(0); cp 429 sound/ppc/pmac.c cp->xfer_status = cpu_to_le16(0); cp 430 sound/ppc/pmac.c cp->phy_addr = cpu_to_le32(phy); cp 432 sound/ppc/pmac.c cp->cmd_dep = cpu_to_le32(rec->cmd.addr cp 435 sound/ppc/pmac.c cp->command = cpu_to_le16(OUTPUT_MORE | BR_ALWAYS | INTR_ALWAYS); cp 451 sound/ppc/pmac.c volatile struct dbdma_cmd __iomem *cp; cp 460 sound/ppc/pmac.c cp = emergency_dbdma.cmds; cp 462 sound/ppc/pmac.c cp = &rec->cmd.cmds[rec->cur_period]; cp 464 sound/ppc/pmac.c stat = le16_to_cpu(cp->xfer_status); cp 467 sound/ppc/pmac.c snd_pmac_pcm_dead_xfer(rec, cp); cp 478 sound/ppc/pmac.c cp->xfer_status = cpu_to_le16(0); cp 479 sound/ppc/pmac.c cp->req_count = cpu_to_le16(rec->period_size); cp 263 sound/soc/codecs/cx20442.c const unsigned char *cp, char *fp, int count) cp 341 sound/soc/ti/ams-delta.c const unsigned char *cp, char *fp, int count) cp 356 sound/soc/ti/ams-delta.c v253_ops.receive_buf(tty, cp, fp, count); cp 370 sound/soc/ti/ams-delta.c v253_ops.receive_buf(tty, cp, fp, count); cp 372 sound/soc/ti/ams-delta.c for (c = &cp[count - 1]; c >= cp; c--) { cp 257 sound/sparc/cs4231.c static u8 __cs4231_readb(struct snd_cs4231 *cp, void __iomem *reg_addr) cp 259 sound/sparc/cs4231.c if (cp->flags & CS4231_FLAG_EBUS) cp 265 sound/sparc/cs4231.c static void __cs4231_writeb(struct snd_cs4231 *cp, u8 val, cp 268 sound/sparc/cs4231.c if (cp->flags & CS4231_FLAG_EBUS) cp 1784 sound/sparc/cs4231.c struct snd_cs4231 *cp = device->device_data; cp 1786 sound/sparc/cs4231.c return snd_cs4231_sbus_free(cp); cp 1950 sound/sparc/cs4231.c struct snd_cs4231 *cp = device->device_data; cp 1952 sound/sparc/cs4231.c return snd_cs4231_ebus_free(cp); cp 221 sound/usb/endpoint.c unsigned char *cp = urb->transfer_buffer; cp 243 sound/usb/endpoint.c cp[0] = ep->freqn; cp 244 sound/usb/endpoint.c cp[1] = ep->freqn >> 8; cp 245 sound/usb/endpoint.c cp[2] = ep->freqn >> 16; cp 246 sound/usb/endpoint.c cp[3] = ep->freqn >> 24; cp 254 sound/usb/endpoint.c cp[0] = ep->freqn >> 2; cp 255 sound/usb/endpoint.c cp[1] = ep->freqn >> 10; cp 256 sound/usb/endpoint.c cp[2] = ep->freqn >> 18; cp 1391 sound/usb/pcm.c unsigned char *cp; cp 1400 sound/usb/pcm.c cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset + subs->pkt_offset_adj; cp 1443 sound/usb/pcm.c memcpy(runtime->dma_area + oldptr, cp, bytes1); cp 1444 sound/usb/pcm.c memcpy(runtime->dma_area, cp + bytes1, bytes - bytes1); cp 1446 sound/usb/pcm.c memcpy(runtime->dma_area + oldptr, cp, bytes); cp 61 sound/usb/usx2y/usbusx2yaudio.c unsigned char *cp; cp 66 sound/usb/usx2y/usbusx2yaudio.c cp = (unsigned char*)urb->transfer_buffer + urb->iso_frame_desc[i].offset; cp 83 sound/usb/usx2y/usbusx2yaudio.c memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, blen); cp 84 sound/usb/usx2y/usbusx2yaudio.c memcpy(runtime->dma_area, cp + blen, len * usX2Y->stride - blen); cp 86 sound/usb/usx2y/usbusx2yaudio.c memcpy(runtime->dma_area + hwptr_done * usX2Y->stride, cp, cp 174 tools/bpf/bpftool/main.c char *cp = line; cp 177 tools/bpf/bpftool/main.c while (*cp) { cp 179 tools/bpf/bpftool/main.c cp += strspn(cp, ws); cp 181 tools/bpf/bpftool/main.c if (*cp == '\0') cp 190 tools/bpf/bpftool/main.c if (*cp == '\'' || *cp == '"') { cp 191 tools/bpf/bpftool/main.c char quote = *cp++; cp 193 tools/bpf/bpftool/main.c n_argv[n_argc++] = cp; cp 195 tools/bpf/bpftool/main.c cp = strchr(cp, quote); cp 196 tools/bpf/bpftool/main.c if (!cp) { cp 202 tools/bpf/bpftool/main.c n_argv[n_argc++] = cp; cp 205 tools/bpf/bpftool/main.c cp += strcspn(cp, ws); cp 206 tools/bpf/bpftool/main.c if (*cp == '\0') cp 211 tools/bpf/bpftool/main.c *cp++ = 0; cp 241 tools/bpf/bpftool/main.c char *cp; cp 269 tools/bpf/bpftool/main.c cp = strchr(buf, '#'); cp 270 tools/bpf/bpftool/main.c if (cp) cp 271 tools/bpf/bpftool/main.c *cp = '\0'; cp 281 tools/bpf/bpftool/main.c while ((cp = strstr(buf, "\\\n")) != NULL) { cp 290 tools/bpf/bpftool/main.c cp = strchr(contline, '#'); cp 291 tools/bpf/bpftool/main.c if (cp) cp 292 tools/bpf/bpftool/main.c *cp = '\0'; cp 11 tools/lib/argv_split.c static const char *skip_arg(const char *cp) cp 13 tools/lib/argv_split.c while (*cp && !isspace(*cp)) cp 14 tools/lib/argv_split.c cp++; cp 16 tools/lib/argv_split.c return cp; cp 577 tools/lib/bpf/libbpf.c char errmsg[STRERR_BUFSIZE], *cp; cp 580 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg)); cp 581 tools/lib/bpf/libbpf.c pr_warning("failed to open %s: %s\n", obj->path, cp); cp 1600 tools/lib/bpf/libbpf.c char *cp = libbpf_strerror_r(-err, errmsg, cp 1604 tools/lib/bpf/libbpf.c name, obj->path, cp); cp 1955 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 1972 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 1974 tools/lib/bpf/libbpf.c __func__, cp, errno); cp 1996 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 2013 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 2015 tools/lib/bpf/libbpf.c __func__, cp, errno); cp 2113 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 2129 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 2131 tools/lib/bpf/libbpf.c map->name, cp); cp 2149 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 2198 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg)); cp 2200 tools/lib/bpf/libbpf.c map->name, cp, err); cp 2214 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(err, errmsg, sizeof(errmsg)); cp 2216 tools/lib/bpf/libbpf.c map->name, cp, err); cp 3368 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 3422 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 3423 tools/lib/bpf/libbpf.c pr_warning("load bpf program failed: %s\n", cp); cp 3743 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 3757 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 3758 tools/lib/bpf/libbpf.c pr_warning("failed to statfs %s: %s\n", dir, cp); cp 3774 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 3793 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 3794 tools/lib/bpf/libbpf.c pr_warning("failed to pin program: %s\n", cp); cp 3832 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 3839 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(-err, errmsg, sizeof(errmsg)); cp 3840 tools/lib/bpf/libbpf.c pr_warning("failed to mkdir %s: %s\n", path, cp); cp 3960 tools/lib/bpf/libbpf.c char *cp, errmsg[STRERR_BUFSIZE]; cp 3973 tools/lib/bpf/libbpf.c cp = libbpf_strerror_r(errno, errmsg, sizeof(errmsg)); cp 3974 tools/lib/bpf/libbpf.c pr_warning("failed to pin map: %s\n", cp); cp 32 tools/perf/arch/s390/util/header.c char *cp, *line = NULL, *line2; cp 64 tools/perf/arch/s390/util/header.c while ((cp = strtok_r(line2, "\n ", &line2))) { cp 66 tools/perf/arch/s390/util/header.c sizeof(manufacturer) - mfsize, "%s", cp); cp 73 tools/perf/arch/s390/util/header.c while ((cp = strtok_r(line2, "\n ", &line2))) { cp 75 tools/perf/arch/s390/util/header.c sizeof(type) - tpsize, "%s", cp); cp 82 tools/perf/arch/s390/util/header.c while ((cp = strtok_r(line2, "\n ", &line2))) { cp 84 tools/perf/arch/s390/util/header.c "%s%s", model[0] ? "," : "", cp); cp 108 tools/perf/arch/s390/util/header.c while ((cp = strtok_r(line2, "\n ", &line2))) { cp 109 tools/perf/arch/s390/util/header.c if (!strncmp(cp, SRVLVL_VERSION, cp 111 tools/perf/arch/s390/util/header.c char *sep = strchr(cp, '='); cp 116 tools/perf/arch/s390/util/header.c if (!strncmp(cp, SRVLVL_AUTHORIZATION, cp 118 tools/perf/arch/s390/util/header.c char *sep = strchr(cp, '='); cp 222 tools/perf/builtin-diff.c int *cp = (int *) opt->value; cp 229 tools/perf/builtin-diff.c *cp = COMPUTE_DELTA; cp 253 tools/perf/builtin-diff.c *cp = i; cp 14 tools/perf/util/call-path.c static void call_path__init(struct call_path *cp, struct call_path *parent, cp 17 tools/perf/util/call-path.c cp->parent = parent; cp 18 tools/perf/util/call-path.c cp->sym = sym; cp 19 tools/perf/util/call-path.c cp->ip = sym ? 0 : ip; cp 20 tools/perf/util/call-path.c cp->db_id = 0; cp 21 tools/perf/util/call-path.c cp->in_kernel = in_kernel; cp 22 tools/perf/util/call-path.c RB_CLEAR_NODE(&cp->rb_node); cp 23 tools/perf/util/call-path.c cp->children = RB_ROOT; cp 55 tools/perf/util/call-path.c struct call_path *cp; cp 70 tools/perf/util/call-path.c cp = &cpb->cp[n]; cp 72 tools/perf/util/call-path.c call_path__init(cp, parent, sym, ip, in_kernel); cp 74 tools/perf/util/call-path.c return cp; cp 83 tools/perf/util/call-path.c struct call_path *cp; cp 95 tools/perf/util/call-path.c cp = rb_entry(node_parent, struct call_path, rb_node); cp 97 tools/perf/util/call-path.c if (cp->sym == sym && cp->ip == ip) cp 98 tools/perf/util/call-path.c return cp; cp 100 tools/perf/util/call-path.c if (sym < cp->sym || (sym == cp->sym && ip < cp->ip)) cp 106 tools/perf/util/call-path.c cp = call_path__new(cpr, parent, sym, ip, in_kernel); cp 107 tools/perf/util/call-path.c if (!cp) cp 110 tools/perf/util/call-path.c rb_link_node(&cp->rb_node, node_parent, p); cp 111 tools/perf/util/call-path.c rb_insert_color(&cp->rb_node, &parent->children); cp 113 tools/perf/util/call-path.c return cp; cp 43 tools/perf/util/call-path.h struct call_path cp[CALL_PATH_BLOCK_SIZE]; cp 383 tools/perf/util/db-export.c struct call_path *cp = call_path_from_sample(dbe, al->machine, cp 386 tools/perf/util/db-export.c if (cp) { cp 387 tools/perf/util/db-export.c db_export__call_path(dbe, cp); cp 388 tools/perf/util/db-export.c es.call_path_id = cp->db_id; cp 479 tools/perf/util/db-export.c int db_export__call_path(struct db_export *dbe, struct call_path *cp) cp 483 tools/perf/util/db-export.c if (cp->db_id) cp 486 tools/perf/util/db-export.c if (cp->parent) { cp 487 tools/perf/util/db-export.c err = db_export__call_path(dbe, cp->parent); cp 492 tools/perf/util/db-export.c cp->db_id = ++dbe->call_path_last_db_id; cp 495 tools/perf/util/db-export.c return dbe->export_call_path(dbe, cp); cp 505 tools/perf/util/db-export.c err = db_export__call_path(dbe, cr->cp); cp 57 tools/perf/util/db-export.h int (*export_call_path)(struct db_export *dbe, struct call_path *cp); cp 104 tools/perf/util/db-export.h int db_export__call_path(struct db_export *dbe, struct call_path *cp); cp 1187 tools/perf/util/scripting-engines/trace-event-python.c static int python_export_call_path(struct db_export *dbe, struct call_path *cp) cp 1193 tools/perf/util/scripting-engines/trace-event-python.c parent_db_id = cp->parent ? cp->parent->db_id : 0; cp 1194 tools/perf/util/scripting-engines/trace-event-python.c sym_db_id = cp->sym ? *(u64 *)symbol__priv(cp->sym) : 0; cp 1198 tools/perf/util/scripting-engines/trace-event-python.c tuple_set_u64(t, 0, cp->db_id); cp 1201 tools/perf/util/scripting-engines/trace-event-python.c tuple_set_u64(t, 3, cp->ip); cp 1222 tools/perf/util/scripting-engines/trace-event-python.c tuple_set_u64(t, 3, cr->cp->db_id); cp 1228 tools/perf/util/scripting-engines/trace-event-python.c tuple_set_u64(t, 9, cr->cp->parent->db_id); cp 61 tools/perf/util/thread-stack.c struct call_path *cp; cp 272 tools/perf/util/thread-stack.c return ts->stack[ts->cnt - 1].cp->in_kernel; cp 289 tools/perf/util/thread-stack.c cr.cp = tse->cp; cp 530 tools/perf/util/thread-stack.c u64 timestamp, u64 ref, struct call_path *cp, cp 536 tools/perf/util/thread-stack.c if (!cp) cp 552 tools/perf/util/thread-stack.c tse->cp = cp; cp 573 tools/perf/util/thread-stack.c if (tse->cp->sym == sym) cp 612 tools/perf/util/thread-stack.c struct call_path *cp; cp 626 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, &cpr->call_path, sym, ip, cp 629 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, ip, sample->time, ref, cp, cp 660 tools/perf/util/thread-stack.c struct call_path *cp, *parent; cp 675 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, root, tsym, addr, ks); cp 676 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, 0, tm, ref, cp, true, cp 687 tools/perf/util/thread-stack.c parent = ts->stack[ts->cnt - 1].cp; cp 705 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, root, tsym, addr, ks); cp 707 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, addr, tm, ref, cp, cp 715 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, parent, tsym, addr, ks); cp 717 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, 0, tm, ref, cp, true, false); cp 729 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, parent, tsym, addr, ks); cp 731 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, addr, tm, ref, cp, true, false); cp 735 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, cp, fsym, ip, ks); cp 737 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, ip, tm, ref, cp, true, false); cp 770 tools/perf/util/thread-stack.c struct call_path *cp; cp 777 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp, NULL, 0, cp 782 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, ret_addr, sample->time, ref, cp, cp 804 tools/perf/util/thread-stack.c struct symbol *sym = tse->cp->sym; cp 806 tools/perf/util/thread-stack.c struct call_path *cp; cp 820 tools/perf/util/thread-stack.c sym = ts->stack[ts->cnt - 2].cp->sym; cp 839 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, ts->stack[ts->cnt - 2].cp, tsym, cp 841 tools/perf/util/thread-stack.c if (!cp) cp 845 tools/perf/util/thread-stack.c ts->stack[ts->cnt - 1].cp = cp; cp 900 tools/perf/util/thread-stack.c struct call_path *cp; cp 910 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp, cp 914 tools/perf/util/thread-stack.c cp, false, trace_end); cp 961 tools/perf/util/thread-stack.c struct call_path *cp; cp 969 tools/perf/util/thread-stack.c cp = call_path__findnew(cpr, ts->stack[ts->cnt - 1].cp, cp 972 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, 0, sample->time, ref, cp, false, cp 57 tools/perf/util/thread-stack.h struct call_path *cp; cp 123 tools/perf/util/time-utils.c const char *cp; cp 128 tools/perf/util/time-utils.c for (cp = ostr; *cp; cp++) cp 129 tools/perf/util/time-utils.c num += !!(*cp == ','); cp 69 tools/power/cpupower/utils/cpufreq-set.c int power = 0, match_count = 0, i, cp, pad; cp 98 tools/power/cpupower/utils/cpufreq-set.c for (cp = 0; isdigit(str[cp]); cp++) cp 101 tools/power/cpupower/utils/cpufreq-set.c if (str[cp] == '.') { cp 102 tools/power/cpupower/utils/cpufreq-set.c while (power > -1 && isdigit(str[cp+1])) cp 103 tools/power/cpupower/utils/cpufreq-set.c cp++, power--; cp 108 tools/power/cpupower/utils/cpufreq-set.c pad = 0, cp += power + 1; cp 110 tools/power/cpupower/utils/cpufreq-set.c if (cp <= 0 || cp + pad > NORM_FREQ_LEN - 1) cp 114 tools/power/cpupower/utils/cpufreq-set.c for (i = 0; i < cp; i++, str++) { cp 120 tools/power/cpupower/utils/cpufreq-set.c for (; i < cp + pad; i++) cp 267 tools/power/x86/turbostat/turbostat.c struct msr_counter *cp; cp 704 tools/power/x86/turbostat/turbostat.c for (mp = sys.cp; mp; mp = mp->next) { cp 834 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 1049 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 1288 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 1475 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) cp 1527 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 1641 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 1909 tools/power/x86/turbostat/turbostat.c for (i = 0, mp = sys.cp; mp; i++, mp = mp->next) { cp 5367 tools/power/x86/turbostat/turbostat.c msrp->next = sys.cp; cp 5368 tools/power/x86/turbostat/turbostat.c sys.cp = msrp; cp 293 tools/usb/usbip/libsrc/names.c char buf[512], *cp; cp 305 tools/usb/usbip/libsrc/names.c cp = strchr(buf, '\r'); cp 306 tools/usb/usbip/libsrc/names.c if (cp) cp 307 tools/usb/usbip/libsrc/names.c *cp = 0; cp 308 tools/usb/usbip/libsrc/names.c cp = strchr(buf, '\n'); cp 309 tools/usb/usbip/libsrc/names.c if (cp) cp 310 tools/usb/usbip/libsrc/names.c *cp = 0; cp 313 tools/usb/usbip/libsrc/names.c cp = buf; cp 339 tools/usb/usbip/libsrc/names.c cp = buf+2; cp 340 tools/usb/usbip/libsrc/names.c while (isspace(*cp)) cp 341 tools/usb/usbip/libsrc/names.c cp++; cp 342 tools/usb/usbip/libsrc/names.c if (!isxdigit(*cp)) { cp 346 tools/usb/usbip/libsrc/names.c u = strtoul(cp, &cp, 16); cp 347 tools/usb/usbip/libsrc/names.c while (isspace(*cp)) cp 348 tools/usb/usbip/libsrc/names.c cp++; cp 349 tools/usb/usbip/libsrc/names.c if (!*cp) { cp 353 tools/usb/usbip/libsrc/names.c if (new_class(cp, u)) cp 355 tools/usb/usbip/libsrc/names.c linectr, u, cp); cp 356 tools/usb/usbip/libsrc/names.c dbg("line %5u class %02x %s", linectr, u, cp); cp 370 tools/usb/usbip/libsrc/names.c if (isxdigit(*cp)) { cp 372 tools/usb/usbip/libsrc/names.c u = strtoul(cp, &cp, 16); cp 373 tools/usb/usbip/libsrc/names.c while (isspace(*cp)) cp 374 tools/usb/usbip/libsrc/names.c cp++; cp 375 tools/usb/usbip/libsrc/names.c if (!*cp) { cp 379 tools/usb/usbip/libsrc/names.c if (new_vendor(cp, u)) cp 381 tools/usb/usbip/libsrc/names.c linectr, u, cp); cp 382 tools/usb/usbip/libsrc/names.c dbg("line %5u vendor %04x %s", linectr, u, cp); cp 389 tools/usb/usbip/libsrc/names.c u = strtoul(buf+1, &cp, 16); cp 390 tools/usb/usbip/libsrc/names.c while (isspace(*cp)) cp 391 tools/usb/usbip/libsrc/names.c cp++; cp 392 tools/usb/usbip/libsrc/names.c if (!*cp) { cp 398 tools/usb/usbip/libsrc/names.c if (new_product(cp, lastvendor, u)) cp 400 tools/usb/usbip/libsrc/names.c linectr, lastvendor, u, cp); cp 402 tools/usb/usbip/libsrc/names.c lastvendor, u, cp); cp 406 tools/usb/usbip/libsrc/names.c if (new_subclass(cp, lastclass, u)) cp 408 tools/usb/usbip/libsrc/names.c linectr, lastclass, u, cp); cp 410 tools/usb/usbip/libsrc/names.c lastclass, u, cp); cp 428 tools/usb/usbip/libsrc/names.c u = strtoul(buf+2, &cp, 16); cp 429 tools/usb/usbip/libsrc/names.c while (isspace(*cp)) cp 430 tools/usb/usbip/libsrc/names.c cp++; cp 431 tools/usb/usbip/libsrc/names.c if (!*cp) { cp 437 tools/usb/usbip/libsrc/names.c if (new_protocol(cp, lastclass, lastsubclass, cp 441 tools/usb/usbip/libsrc/names.c u, cp); cp 443 tools/usb/usbip/libsrc/names.c linectr, lastclass, lastsubclass, u, cp);