Symbol: ds
arch/mips/include/asm/pci/bridge.h
280
ds:2, /* Data size */
arch/mips/include/asm/xtalk/xwidget.h
241
unsigned ds:2;
arch/powerpc/sysdev/dcr.c
17
unsigned int ds;
arch/powerpc/sysdev/dcr.c
18
const u32 *dr = of_get_property(np, "dcr-reg", &ds);
arch/powerpc/sysdev/dcr.c
20
if (dr == NULL || ds & 1 || index >= (ds / 8))
arch/powerpc/sysdev/dcr.c
29
unsigned int ds;
arch/powerpc/sysdev/dcr.c
30
const u32 *dr = of_get_property(np, "dcr-reg", &ds);
arch/powerpc/sysdev/dcr.c
32
if (dr == NULL || ds & 1 || index >= (ds / 8))
arch/s390/crypto/hmac_s390.c
170
unsigned int ds = crypto_shash_digestsize(tfm);
arch/s390/crypto/hmac_s390.c
176
return hash_key(key, keylen, tfm_ctx->key, ds);
arch/s390/crypto/hmac_s390.c
253
unsigned int ds = crypto_shash_digestsize(desc->tfm);
arch/s390/crypto/hmac_s390.c
264
memcpy(out, ctx->param, ds);
arch/s390/crypto/hmac_s390.c
291
unsigned int ds = bs / 2;
arch/s390/crypto/hmac_s390.c
302
memcpy(p.u8, ctx->param, ds);
arch/s390/crypto/hmac_s390.c
303
p.u8 += ds;
arch/s390/crypto/hmac_s390.c
306
if (ds == SHA512_DIGEST_SIZE)
arch/s390/crypto/hmac_s390.c
315
unsigned int ds = bs / 2;
arch/s390/crypto/hmac_s390.c
324
memcpy(ctx->param, p.u8, ds);
arch/s390/crypto/hmac_s390.c
325
p.u8 += ds;
arch/s390/crypto/hmac_s390.c
328
if (ds == SHA512_DIGEST_SIZE)
arch/s390/crypto/phmac_s390.c
527
unsigned int ds = crypto_ahash_digestsize(tfm);
arch/s390/crypto/phmac_s390.c
559
memcpy(req->result, ctx->param, ds);
arch/s390/crypto/phmac_s390.c
752
unsigned int ds = crypto_ahash_digestsize(tfm);
arch/s390/crypto/phmac_s390.c
771
rc = make_clrkey_token(key, keylen, ds, tmpkey);
arch/s390/crypto/phmac_s390.c
789
switch (ds) {
arch/s390/include/asm/nmi.h
59
u64 ds : 1; /* 19 storage degradation */
arch/s390/kernel/nmi.c
468
if (mci.ds && mci.fa)
arch/x86/boot/boot.h
229
u16 es, ds;
arch/x86/boot/edd.c
51
buf_base = (ds() << 4) + (u32)&_end;
arch/x86/boot/main.c
51
cmdline_seg = ds();
arch/x86/boot/pm.c
124
(u32)&boot_params + (ds() << 4));
arch/x86/boot/pm.c
86
gdt.ptr = (u32)&boot_gdt + (ds() << 4);
arch/x86/boot/regs.c
23
reg->ds = ds();
arch/x86/boot/regs.c
24
reg->es = ds();
arch/x86/boot/video-vesa.c
264
ireg.es = ds();
arch/x86/coco/sev/core.c
817
vmsa->ds.limit = AP_INIT_DS_LIMIT;
arch/x86/coco/sev/core.c
818
vmsa->ds.attrib = INIT_DS_ATTRIBS;
arch/x86/coco/sev/core.c
819
vmsa->es = vmsa->ds;
arch/x86/coco/sev/core.c
820
vmsa->fs = vmsa->ds;
arch/x86/coco/sev/core.c
821
vmsa->gs = vmsa->ds;
arch/x86/coco/sev/core.c
822
vmsa->ss = vmsa->ds;
arch/x86/events/intel/bts.c
148
struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
arch/x86/events/intel/bts.c
169
ds->bts_buffer_base = (u64)(long)page_address(page) + phys->displacement;
arch/x86/events/intel/bts.c
170
ds->bts_index = ds->bts_buffer_base + index;
arch/x86/events/intel/bts.c
171
ds->bts_absolute_maximum = ds->bts_buffer_base + end;
arch/x86/events/intel/bts.c
172
ds->bts_interrupt_threshold = !bb->snapshot
arch/x86/events/intel/bts.c
173
? ds->bts_buffer_base + thresh
arch/x86/events/intel/bts.c
174
: ds->bts_absolute_maximum + BTS_RECORD_SIZE;
arch/x86/events/intel/bts.c
187
struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
arch/x86/events/intel/bts.c
189
unsigned long index = ds->bts_index - ds->bts_buffer_base, old, head;
arch/x86/events/intel/bts.c
201
if (ds->bts_index >= ds->bts_absolute_maximum)
arch/x86/events/intel/bts.c
274
bts->ds_back.bts_buffer_base = cpuc->ds->bts_buffer_base;
arch/x86/events/intel/bts.c
275
bts->ds_back.bts_absolute_maximum = cpuc->ds->bts_absolute_maximum;
arch/x86/events/intel/bts.c
276
bts->ds_back.bts_interrupt_threshold = cpuc->ds->bts_interrupt_threshold;
arch/x86/events/intel/bts.c
333
cpuc->ds->bts_index = bts->ds_back.bts_buffer_base;
arch/x86/events/intel/bts.c
334
cpuc->ds->bts_buffer_base = bts->ds_back.bts_buffer_base;
arch/x86/events/intel/bts.c
335
cpuc->ds->bts_absolute_maximum = bts->ds_back.bts_absolute_maximum;
arch/x86/events/intel/bts.c
336
cpuc->ds->bts_interrupt_threshold = bts->ds_back.bts_interrupt_threshold;
arch/x86/events/intel/bts.c
463
struct debug_store *ds = this_cpu_ptr(&cpu_hw_events)->ds;
arch/x86/events/intel/bts.c
479
if (ds && (ds->bts_index >= ds->bts_interrupt_threshold))
arch/x86/events/intel/core.c
3419
struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds);
arch/x86/events/intel/core.c
3443
if (ds)
arch/x86/events/intel/core.c
3444
ds->bts_index = ds->bts_buffer_base;
arch/x86/events/intel/core.c
5042
.host = (unsigned long)cpuc->ds,
arch/x86/events/intel/ds.c
1143
if (!cpuc->ds)
arch/x86/events/intel/ds.c
1158
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
1178
base = (struct bts_record *)(unsigned long)ds->bts_buffer_base;
arch/x86/events/intel/ds.c
1179
top = (struct bts_record *)(unsigned long)ds->bts_index;
arch/x86/events/intel/ds.c
1186
ds->bts_index = ds->bts_buffer_base;
arch/x86/events/intel/ds.c
1602
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
1616
threshold = ds->pebs_absolute_maximum -
arch/x86/events/intel/ds.c
1619
threshold = ds->pebs_buffer_base + cpuc->pebs_record_size;
arch/x86/events/intel/ds.c
1622
ds->pebs_interrupt_threshold = threshold;
arch/x86/events/intel/ds.c
1845
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
1846
u64 value = ds->pebs_event_reset[hwc->idx];
arch/x86/events/intel/ds.c
1862
value = ds->pebs_event_reset[MAX_PEBS_EVENTS_FMT4 + idx];
arch/x86/events/intel/ds.c
1864
value = ds->pebs_event_reset[MAX_PEBS_EVENTS + idx];
arch/x86/events/intel/ds.c
1890
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
1931
ds->pebs_event_reset[idx] =
arch/x86/events/intel/ds.c
1934
ds->pebs_event_reset[idx] = 0;
arch/x86/events/intel/ds.c
2955
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
2963
at = (struct pebs_record_core *)(unsigned long)ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
2964
top = (struct pebs_record_core *)(unsigned long)ds->pebs_index;
arch/x86/events/intel/ds.c
2969
ds->pebs_index = ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
3013
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
3025
base = (struct pebs_record_nhm *)(unsigned long)ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
3026
top = (struct pebs_record_nhm *)(unsigned long)ds->pebs_index;
arch/x86/events/intel/ds.c
3028
ds->pebs_index = ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
3182
struct debug_store *ds = cpuc->ds;
arch/x86/events/intel/ds.c
3192
base = (struct pebs_basic *)(unsigned long)ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
3193
top = (struct pebs_basic *)(unsigned long)ds->pebs_index;
arch/x86/events/intel/ds.c
3195
ds->pebs_index = ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
3447
struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds);
arch/x86/events/intel/ds.c
3452
wrmsrq(MSR_IA32_DS_AREA, (unsigned long)ds);
arch/x86/events/intel/ds.c
778
struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
arch/x86/events/intel/ds.c
780
if (!ds)
arch/x86/events/intel/ds.c
784
(u32)((u64)(unsigned long)ds),
arch/x86/events/intel/ds.c
785
(u32)((u64)(unsigned long)ds >> 32));
arch/x86/events/intel/ds.c
790
if (!per_cpu(cpu_hw_events, cpu).ds)
arch/x86/events/intel/ds.c
850
struct debug_store *ds = hwev->ds;
arch/x86/events/intel/ds.c
882
ds->pebs_buffer_base = (unsigned long) cea;
arch/x86/events/intel/ds.c
884
ds->pebs_index = ds->pebs_buffer_base;
arch/x86/events/intel/ds.c
886
ds->pebs_absolute_maximum = ds->pebs_buffer_base + max;
arch/x86/events/intel/ds.c
914
struct debug_store *ds = hwev->ds;
arch/x86/events/intel/ds.c
929
ds->bts_buffer_base = (unsigned long) cea;
arch/x86/events/intel/ds.c
931
ds->bts_index = ds->bts_buffer_base;
arch/x86/events/intel/ds.c
933
ds->bts_absolute_maximum = ds->bts_buffer_base +
arch/x86/events/intel/ds.c
935
ds->bts_interrupt_threshold = ds->bts_absolute_maximum -
arch/x86/events/intel/ds.c
957
struct debug_store *ds = &get_cpu_entry_area(cpu)->cpu_debug_store;
arch/x86/events/intel/ds.c
959
memset(ds, 0, sizeof(*ds));
arch/x86/events/intel/ds.c
960
per_cpu(cpu_hw_events, cpu).ds = ds;
arch/x86/events/intel/ds.c
966
per_cpu(cpu_hw_events, cpu).ds = NULL;
arch/x86/events/perf_event.h
296
struct debug_store *ds;
arch/x86/hyperv/hv_crash.c
162
asm volatile("movw %0, %%ds" : : "m"(hv_crash_ctxt.ds));
arch/x86/hyperv/hv_crash.c
212
asm volatile("movw %%ds, %0" : "=m"(ctxt->ds));
arch/x86/hyperv/hv_crash.c
66
u16 ds;
arch/x86/hyperv/ivm.c
328
savesegment(ds, vmsa->ds.selector);
arch/x86/hyperv/ivm.c
329
hv_populate_vmcb_seg(vmsa->ds, vmsa->gdtr.base);
arch/x86/include/asm/elf.h
126
pr_reg[7] = regs->ds; \
arch/x86/include/asm/elf.h
154
struct pt_regs *regs, const u16 ds)
arch/x86/include/asm/elf.h
163
t->ds = t->es = ds;
arch/x86/include/asm/kexec.h
112
asm volatile("mov %%ds,%k0" : "=a"(newregs->ds));
arch/x86/include/asm/nospec-branch.h
598
static const u16 ds = __KERNEL_DS;
arch/x86/include/asm/nospec-branch.h
609
asm volatile("verw %[ds]" : : [ds] "m" (ds) : "cc");
arch/x86/include/asm/processor.h
299
unsigned short ds, __dsh;
arch/x86/include/asm/processor.h
459
unsigned short ds;
arch/x86/include/asm/ptrace.h
34
unsigned short ds;
arch/x86/include/asm/ptrace.h
340
offset == offsetof(struct pt_regs, ds) ||
arch/x86/include/asm/segment.h
316
#define __loadsegment_ds(value) __loadsegment_simple(ds, (value))
arch/x86/include/asm/suspend_64.h
33
u16 ds, es, fs, gs;
arch/x86/include/asm/svm.h
324
struct vmcb_seg ds;
arch/x86/include/asm/svm.h
376
struct vmcb_seg ds;
arch/x86/include/asm/user32.h
38
unsigned short ds, __ds, es, __es;
arch/x86/include/asm/user_32.h
86
unsigned long ds;
arch/x86/include/asm/user_64.h
93
unsigned long ds;
arch/x86/include/asm/vm86.h
26
unsigned short ds, __dsh;
arch/x86/include/asm/xen/interface_32.h
67
uint16_t ds, _pad3;
arch/x86/include/asm/xen/interface_64.h
125
uint16_t ds, _pad4[3];
arch/x86/include/uapi/asm/kvm.h
152
struct kvm_segment cs, ds, es, fs, gs, ss;
arch/x86/include/uapi/asm/kvm.h
163
struct kvm_segment cs, ds, es, fs, gs, ss;
arch/x86/include/uapi/asm/sigcontext.h
206
__u16 ds, __dsh;
arch/x86/include/uapi/asm/sigcontext.h
304
__u16 ds, __dsh;
arch/x86/include/uapi/asm/vm86.h
88
unsigned short ds, __dsh;
arch/x86/kernel/asm-offsets.c
69
OFFSET(IA32_SIGCONTEXT_ds, sigcontext_32, ds);
arch/x86/kernel/asm-offsets_32.c
22
OFFSET(PT_DS, pt_regs, ds);
arch/x86/kernel/doublefault_32.c
63
regs.ds = TSS(ds);
arch/x86/kernel/doublefault_32.c
99
.ds = __USER_DS,
arch/x86/kernel/fpu/regset.c
352
savesegment(ds, env->fos);
arch/x86/kernel/fpu/regset.c
354
env->fos = tsk->thread.ds;
arch/x86/kernel/kgdb.c
61
{ "ds", 4, offsetof(struct pt_regs, ds) },
arch/x86/kernel/ldt.c
125
savesegment(ds, sel);
arch/x86/kernel/ldt.c
127
loadsegment(ds, sel);
arch/x86/kernel/perf_regs.c
34
PT_REGS_OFFSET(PERF_REG_X86_DS, ds),
arch/x86/kernel/process.c
201
savesegment(ds, p->thread.ds);
arch/x86/kernel/process_32.c
116
regs->ds = __USER_DS;
arch/x86/kernel/process_32.c
75
log_lvl, (u16)regs->ds, (u16)regs->es, (u16)regs->fs, gs, regs->ss, regs->flags);
arch/x86/kernel/process_64.c
107
asm("movl %%ds,%0" : "=r" (ds));
arch/x86/kernel/process_64.c
124
log_lvl, regs->cs, ds, es, cr0);
arch/x86/kernel/process_64.c
546
loadsegment(ds, _ds);
arch/x86/kernel/process_64.c
659
savesegment(ds, prev->ds);
arch/x86/kernel/process_64.c
660
if (unlikely(next->ds | prev->ds))
arch/x86/kernel/process_64.c
661
loadsegment(ds, next->ds);
arch/x86/kernel/process_64.c
76
unsigned int ds, es;
arch/x86/kernel/ptrace.c
104
REG_OFFSET_NAME(ds),
arch/x86/kernel/ptrace.c
270
case offsetof(struct user_regs_struct, ds):
arch/x86/kernel/ptrace.c
275
return task->thread.ds;
arch/x86/kernel/ptrace.c
315
case offsetof(struct user_regs_struct,ds):
arch/x86/kernel/ptrace.c
316
task->thread.ds = value;
arch/x86/kernel/ptrace.c
379
case offsetof(struct user_regs_struct, ds):
arch/x86/kernel/ptrace.c
411
case offsetof(struct user_regs_struct, ds):
arch/x86/kernel/ptrace.c
881
SEG32(ds);
arch/x86/kernel/ptrace.c
977
SEG32(ds);
arch/x86/kernel/signal_32.c
143
regs->ds = fixup_rpl(sc.ds);
arch/x86/kernel/signal_32.c
218
unsafe_put_user(get_user_seg(ds), (unsigned int __user *)&sc->ds, Efault);
arch/x86/kernel/signal_32.c
223
unsafe_put_user(regs->ds, (unsigned int __user *)&sc->ds, Efault);
arch/x86/kernel/signal_32.c
314
loadsegment(ds, __USER_DS);
arch/x86/kernel/signal_32.c
317
regs->ds = __USER_DS;
arch/x86/kernel/signal_32.c
396
loadsegment(ds, __USER_DS);
arch/x86/kernel/signal_32.c
399
regs->ds = __USER_DS;
arch/x86/kernel/signal_32.c
79
savesegment(ds, cur);
arch/x86/kernel/signal_32.c
80
if (fixup_rpl(sc->ds) != cur)
arch/x86/kernel/signal_32.c
81
loadsegment(ds, fixup_rpl(sc->ds));
arch/x86/kernel/signal_64.c
351
loadsegment(ds, __USER_DS);
arch/x86/kernel/tls.c
157
savesegment(ds, sel);
arch/x86/kernel/tls.c
159
loadsegment(ds, sel);
arch/x86/kernel/vm86_32.c
132
unsafe_put_user(regs->ds, &user->regs.ds, Efault_end);
arch/x86/kernel/vm86_32.c
269
vm86regs.ds = v.regs.ds;
arch/x86/kvm/emulate.c
2637
tss->ds = get_segment_selector(ctxt, VCPU_SREG_DS);
arch/x86/kvm/emulate.c
2666
set_segment_selector(ctxt, tss->ds, VCPU_SREG_DS);
arch/x86/kvm/emulate.c
2690
ret = __load_segment_descriptor(ctxt, tss->ds, VCPU_SREG_DS, cpl,
arch/x86/kvm/emulate.c
2750
tss->ds = get_segment_selector(ctxt, VCPU_SREG_DS);
arch/x86/kvm/emulate.c
2785
set_segment_selector(ctxt, tss->ds, VCPU_SREG_DS);
arch/x86/kvm/emulate.c
2822
ret = __load_segment_descriptor(ctxt, tss->ds, VCPU_SREG_DS, cpl,
arch/x86/kvm/smm.c
216
enter_smm_save_seg_32(vcpu, &smram->ds, &smram->ds_sel, VCPU_SREG_DS);
arch/x86/kvm/smm.c
267
enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS);
arch/x86/kvm/smm.c
281
struct kvm_segment cs, ds;
arch/x86/kvm/smm.c
338
ds.selector = 0;
arch/x86/kvm/smm.c
339
ds.base = 0;
arch/x86/kvm/smm.c
34
CHECK_SMRAM32_OFFSET(ds, 0xFF2C);
arch/x86/kvm/smm.c
341
cs.limit = ds.limit = 0xffffffff;
arch/x86/kvm/smm.c
342
cs.type = ds.type = 0x3;
arch/x86/kvm/smm.c
343
cs.dpl = ds.dpl = 0;
arch/x86/kvm/smm.c
344
cs.db = ds.db = 0;
arch/x86/kvm/smm.c
345
cs.s = ds.s = 1;
arch/x86/kvm/smm.c
346
cs.l = ds.l = 0;
arch/x86/kvm/smm.c
347
cs.g = ds.g = 1;
arch/x86/kvm/smm.c
348
cs.avl = ds.avl = 0;
arch/x86/kvm/smm.c
349
cs.present = ds.present = 1;
arch/x86/kvm/smm.c
350
cs.unusable = ds.unusable = 0;
arch/x86/kvm/smm.c
351
cs.padding = ds.padding = 0;
arch/x86/kvm/smm.c
354
kvm_set_segment(vcpu, &ds, VCPU_SREG_DS);
arch/x86/kvm/smm.c
355
kvm_set_segment(vcpu, &ds, VCPU_SREG_ES);
arch/x86/kvm/smm.c
356
kvm_set_segment(vcpu, &ds, VCPU_SREG_FS);
arch/x86/kvm/smm.c
357
kvm_set_segment(vcpu, &ds, VCPU_SREG_GS);
arch/x86/kvm/smm.c
358
kvm_set_segment(vcpu, &ds, VCPU_SREG_SS);
arch/x86/kvm/smm.c
497
rsm_load_seg_32(vcpu, &smstate->ds, smstate->ds_sel, VCPU_SREG_DS);
arch/x86/kvm/smm.c
558
rsm_load_seg_64(vcpu, &smstate->ds, VCPU_SREG_DS);
arch/x86/kvm/smm.c
64
CHECK_SMRAM64_OFFSET(ds, 0xFE30);
arch/x86/kvm/smm.h
38
struct kvm_smm_seg_state_32 ds;
arch/x86/kvm/smm.h
83
struct kvm_smm_seg_state_64 ds;
arch/x86/kvm/svm/nested.c
1092
to_save->ds = from_save->ds;
arch/x86/kvm/svm/nested.c
1161
vmcb12->save.ds = vmcb02->save.ds;
arch/x86/kvm/svm/nested.c
672
vmcb02->save.ds = vmcb12->save.ds;
arch/x86/kvm/svm/svm.c
1144
init_seg(&save->ds);
arch/x86/kvm/svm/svm.c
1558
case VCPU_SREG_DS: return &save->ds;
arch/x86/kvm/svm/svm.c
3395
save->ds.selector, save->ds.attrib,
arch/x86/kvm/svm/svm.c
3396
save->ds.limit, save->ds.base);
arch/x86/kvm/tss.h
27
u32 ds;
arch/x86/kvm/tss.h
56
u16 ds;
arch/x86/kvm/vmx/vmx.c
1393
savesegment(ds, host_state->ds_sel);
arch/x86/kvm/vmx/vmx.c
1448
loadsegment(ds, host_state->ds_sel);
arch/x86/kvm/vmx/vmx.c
7722
loadsegment(ds, __USER_DS);
arch/x86/kvm/x86.c
12140
kvm_get_segment(vcpu, &sregs->ds, VCPU_SREG_DS);
arch/x86/kvm/x86.c
12403
kvm_set_segment(vcpu, &sregs->ds, VCPU_SREG_DS);
arch/x86/lib/insn-eval.c
356
savesegment(ds, sel);
arch/x86/lib/insn-eval.c
380
return vm86regs->ds;
arch/x86/lib/insn-eval.c
399
return (unsigned short)(regs->ds & 0xffff);
arch/x86/lib/insn-eval.c
433
offsetof(struct pt_regs, ds),
arch/x86/math-emu/fpu_system.h
81
#define FPU_DS (*(unsigned short *) &(FPU_info->regs->ds))
arch/x86/math-emu/get_address.c
47
offsetof(struct kernel_vm86_regs, ds),
arch/x86/math-emu/get_address.c
52
offsetof(struct kernel_vm86_regs, ds)
arch/x86/math-emu/get_address.c
60
offsetof(struct pt_regs, ds),
arch/x86/math-emu/get_address.c
63
offsetof(struct pt_regs, ds), /* dummy, not saved on stack */
arch/x86/math-emu/get_address.c
65
offsetof(struct pt_regs, ds)
arch/x86/platform/efi/efi_64.c
473
savesegment(ds, __ds); \
arch/x86/platform/efi/efi_64.c
477
loadsegment(ds, __KERNEL_DS); \
arch/x86/platform/efi/efi_64.c
482
loadsegment(ds, __ds); \
arch/x86/power/cpu.c
111
savesegment(ds, ctxt->ds);
arch/x86/power/cpu.c
227
loadsegment(ds, __USER_DS);
arch/x86/power/cpu.c
261
loadsegment(ds, ctxt->es);
arch/x86/um/signal.c
125
PUTREG(DS, ds);
arch/x86/um/signal.c
53
GETREG(DS, ds);
arch/x86/xen/smp_pv.c
249
ctxt->user_regs.ds = __USER_DS;
crypto/algif_hash.c
185
unsigned ds = crypto_ahash_digestsize(crypto_ahash_reqtfm(&ctx->req));
crypto/algif_hash.c
189
if (len > ds)
crypto/algif_hash.c
190
len = ds;
crypto/algif_hash.c
191
else if (len < ds)
crypto/algif_hash.c
34
unsigned ds;
crypto/algif_hash.c
39
ds = crypto_ahash_digestsize(crypto_ahash_reqtfm(&ctx->req));
crypto/algif_hash.c
41
ctx->result = sock_kmalloc(sk, ds, GFP_KERNEL);
crypto/algif_hash.c
45
memset(ctx->result, 0, ds);
crypto/algif_hash.c
52
unsigned ds;
crypto/algif_hash.c
57
ds = crypto_ahash_digestsize(crypto_ahash_reqtfm(&ctx->req));
crypto/algif_hash.c
59
sock_kzfree_s(sk, ctx->result, ds);
crypto/deflate.c
119
struct deflate_stream *ds;
crypto/deflate.c
123
ds = s->ctx;
crypto/deflate.c
125
err = zlib_deflateInit2(&ds->stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
crypto/deflate.c
133
err = deflate_compress_one(req, ds);
crypto/deflate.c
142
struct deflate_stream *ds)
crypto/deflate.c
144
struct z_stream_s *stream = &ds->stream;
crypto/deflate.c
203
struct deflate_stream *ds;
crypto/deflate.c
207
ds = s->ctx;
crypto/deflate.c
209
err = zlib_inflateInit2(&ds->stream, -DEFLATE_DEF_WINBITS);
crypto/deflate.c
215
err = deflate_decompress_one(req, ds);
crypto/deflate.c
63
struct deflate_stream *ds)
crypto/deflate.c
65
struct z_stream_s *stream = &ds->stream;
crypto/hmac.c
135
int ds = crypto_shash_digestsize(parent);
crypto/hmac.c
143
crypto_shash_finup(desc, out, ds, out);
crypto/hmac.c
190
int ds;
crypto/hmac.c
211
ds = salg->digestsize;
crypto/hmac.c
213
if (ds > alg->cra_blocksize ||
crypto/hmac.c
226
inst->alg.digestsize = ds;
crypto/hmac.c
256
int ds = crypto_ahash_digestsize(parent);
crypto/hmac.c
275
keylen = ds;
crypto/hmac.c
359
int ds = crypto_ahash_digestsize(tfm);
crypto/hmac.c
365
ahash_request_set_virt(req, preq->result, preq->result, ds);
crypto/hmac.c
39
int ds = crypto_shash_digestsize(parent);
crypto/hmac.c
455
int ds, ss, err;
crypto/hmac.c
475
ds = halg->digestsize;
crypto/hmac.c
477
if (ds > alg->cra_blocksize || ss < alg->cra_blocksize)
crypto/hmac.c
494
inst->alg.halg.digestsize = ds;
crypto/hmac.c
60
keylen = ds;
crypto/kdf_sp800108.c
81
unsigned int ds = crypto_shash_digestsize(kmd);
crypto/kdf_sp800108.c
88
if (ds > keylen)
drivers/acpi/dock.c
118
struct dock_station *ds;
drivers/acpi/dock.c
120
list_for_each_entry(ds, &dock_stations, sibling)
drivers/acpi/dock.c
121
if (ds->handle == handle)
drivers/acpi/dock.c
122
return ds;
drivers/acpi/dock.c
136
find_dock_dependent_device(struct dock_station *ds, struct acpi_device *adev)
drivers/acpi/dock.c
140
list_for_each_entry(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
150
struct dock_station *ds = find_dock_station(dshandle);
drivers/acpi/dock.c
152
if (ds && !find_dock_dependent_device(ds, adev))
drivers/acpi/dock.c
153
add_dock_dependent_device(ds, adev);
drivers/acpi/dock.c
193
static int dock_present(struct dock_station *ds)
drivers/acpi/dock.c
198
if (ds) {
drivers/acpi/dock.c
199
status = acpi_evaluate_integer(ds->handle, "_STA", NULL, &sta);
drivers/acpi/dock.c
210
static void hot_remove_dock_devices(struct dock_station *ds)
drivers/acpi/dock.c
219
list_for_each_entry_reverse(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
223
list_for_each_entry_reverse(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
237
static void hotplug_dock_devices(struct dock_station *ds, u32 event)
drivers/acpi/dock.c
242
list_for_each_entry(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
246
list_for_each_entry(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
255
list_for_each_entry(dd, &ds->dependent_devices, list) {
drivers/acpi/dock.c
267
static void dock_event(struct dock_station *ds, u32 event, int num)
drivers/acpi/dock.c
269
struct device *dev = &ds->dock_device->dev;
drivers/acpi/dock.c
286
list_for_each_entry(dd, &ds->dependent_devices, list)
drivers/acpi/dock.c
300
static void handle_dock(struct dock_station *ds, int dock)
drivers/acpi/dock.c
307
acpi_handle_info(ds->handle, "%s\n", dock ? "docking" : "undocking");
drivers/acpi/dock.c
314
status = acpi_evaluate_integer(ds->handle, "_DCK", &arg_list, &value);
drivers/acpi/dock.c
316
acpi_handle_err(ds->handle, "Failed to execute _DCK (0x%x)\n",
drivers/acpi/dock.c
320
static inline void dock(struct dock_station *ds)
drivers/acpi/dock.c
322
handle_dock(ds, 1);
drivers/acpi/dock.c
325
static inline void undock(struct dock_station *ds)
drivers/acpi/dock.c
327
handle_dock(ds, 0);
drivers/acpi/dock.c
330
static inline void begin_dock(struct dock_station *ds)
drivers/acpi/dock.c
332
ds->flags |= DOCK_DOCKING;
drivers/acpi/dock.c
335
static inline void complete_dock(struct dock_station *ds)
drivers/acpi/dock.c
337
ds->flags &= ~(DOCK_DOCKING);
drivers/acpi/dock.c
338
ds->last_dock_time = jiffies;
drivers/acpi/dock.c
341
static inline void begin_undock(struct dock_station *ds)
drivers/acpi/dock.c
343
ds->flags |= DOCK_UNDOCKING;
drivers/acpi/dock.c
346
static inline void complete_undock(struct dock_station *ds)
drivers/acpi/dock.c
348
ds->flags &= ~(DOCK_UNDOCKING);
drivers/acpi/dock.c
359
static int dock_in_progress(struct dock_station *ds)
drivers/acpi/dock.c
361
if ((ds->flags & DOCK_DOCKING) ||
drivers/acpi/dock.c
362
time_before(jiffies, (ds->last_dock_time + HZ)))
drivers/acpi/dock.c
375
static int handle_eject_request(struct dock_station *ds, u32 event)
drivers/acpi/dock.c
377
if (dock_in_progress(ds))
drivers/acpi/dock.c
387
dock_event(ds, event, UNDOCK_EVENT);
drivers/acpi/dock.c
389
hot_remove_dock_devices(ds);
drivers/acpi/dock.c
390
undock(ds);
drivers/acpi/dock.c
391
acpi_evaluate_lck(ds->handle, 0);
drivers/acpi/dock.c
392
acpi_evaluate_ej0(ds->handle);
drivers/acpi/dock.c
393
if (dock_present(ds)) {
drivers/acpi/dock.c
394
acpi_handle_err(ds->handle, "Unable to undock!\n");
drivers/acpi/dock.c
397
complete_undock(ds);
drivers/acpi/dock.c
413
struct dock_station *ds = find_dock_station(handle);
drivers/acpi/dock.c
416
if (!ds)
drivers/acpi/dock.c
424
if ((ds->flags & DOCK_IS_DOCK) && event == ACPI_NOTIFY_DEVICE_CHECK)
drivers/acpi/dock.c
439
if (!dock_in_progress(ds) && !acpi_device_enumerated(adev)) {
drivers/acpi/dock.c
440
begin_dock(ds);
drivers/acpi/dock.c
441
dock(ds);
drivers/acpi/dock.c
442
if (!dock_present(ds)) {
drivers/acpi/dock.c
444
complete_dock(ds);
drivers/acpi/dock.c
447
hotplug_dock_devices(ds, event);
drivers/acpi/dock.c
448
complete_dock(ds);
drivers/acpi/dock.c
449
dock_event(ds, event, DOCK_EVENT);
drivers/acpi/dock.c
450
acpi_evaluate_lck(ds->handle, 1);
drivers/acpi/dock.c
454
if (dock_present(ds) || dock_in_progress(ds))
drivers/acpi/dock.c
462
begin_undock(ds);
drivers/acpi/dock.c
463
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
drivers/acpi/dock.c
465
handle_eject_request(ds, event);
drivers/acpi/dock.c
467
dock_event(ds, event, UNDOCK_EVENT);
drivers/acpi/dock.c
577
struct dock_station *dock_station, ds = { NULL, };
drivers/acpi/dock.c
587
pdevinfo.data = &ds;
drivers/acpi/dock.c
588
pdevinfo.size_data = sizeof(ds);
drivers/acpi/dock.c
71
static int add_dock_dependent_device(struct dock_station *ds,
drivers/acpi/dock.c
82
list_add_tail(&dd->list, &ds->dependent_devices);
drivers/block/drbd/drbd_main.c
2893
static void drbd_free_one_sock(struct drbd_socket *ds)
drivers/block/drbd/drbd_main.c
2896
mutex_lock(&ds->mutex);
drivers/block/drbd/drbd_main.c
2897
s = ds->socket;
drivers/block/drbd/drbd_main.c
2898
ds->socket = NULL;
drivers/block/drbd/drbd_main.c
2899
mutex_unlock(&ds->mutex);
drivers/block/drbd/drbd_receiver.c
1667
unsigned int data_size = pi->size, ds;
drivers/block/drbd/drbd_receiver.c
1688
ds = data_size;
drivers/block/drbd/drbd_receiver.c
1692
ds = be32_to_cpu(trim->size);
drivers/block/drbd/drbd_receiver.c
1696
ds = be32_to_cpu(zeroes->size);
drivers/block/drbd/drbd_receiver.c
1699
if (!expect(peer_device, IS_ALIGNED(ds, 512)))
drivers/block/drbd/drbd_receiver.c
1702
if (!expect(peer_device, ds <= (DRBD_MAX_BBIO_SECTORS << 9)))
drivers/block/drbd/drbd_receiver.c
1704
} else if (!expect(peer_device, ds <= DRBD_MAX_BIO_SIZE))
drivers/block/drbd/drbd_receiver.c
1709
if (sector + (ds>>9) > capacity) {
drivers/block/drbd/drbd_receiver.c
1713
(unsigned long long)sector, ds);
drivers/block/drbd/drbd_receiver.c
1720
peer_req = drbd_alloc_peer_req(peer_device, id, sector, ds, data_size, GFP_NOIO);
drivers/block/drbd/drbd_receiver.c
1735
ds = data_size;
drivers/block/drbd/drbd_receiver.c
1738
unsigned len = min_t(int, ds, PAGE_SIZE);
drivers/block/drbd/drbd_receiver.c
1750
ds -= len;
drivers/clk/rockchip/clk.h
1182
#define COMPOSITE_HALFDIV(_id, cname, pnames, f, mo, ms, mw, mf, ds, dw,\
drivers/clk/rockchip/clk.h
1195
.div_shift = ds, \
drivers/clk/rockchip/clk.h
1204
ds, dw, df) \
drivers/clk/rockchip/clk.h
1216
.div_shift = ds, \
drivers/clk/rockchip/clk.h
1222
#define COMPOSITE_NOMUX_HALFDIV(_id, cname, pname, f, mo, ds, dw, df, \
drivers/clk/rockchip/clk.h
1232
.div_shift = ds, \
drivers/clk/rockchip/clk.h
796
#define COMPOSITE(_id, cname, pnames, f, mo, ms, mw, mf, ds, dw,\
drivers/clk/rockchip/clk.h
809
.div_shift = ds, \
drivers/clk/rockchip/clk.h
818
mf, do, ds, dw, df, go, gs, gf) \
drivers/clk/rockchip/clk.h
831
.div_shift = ds, \
drivers/clk/rockchip/clk.h
839
#define COMPOSITE_NOMUX(_id, cname, pname, f, mo, ds, dw, df, \
drivers/clk/rockchip/clk.h
849
.div_shift = ds, \
drivers/clk/rockchip/clk.h
857
#define COMPOSITE_NOMUX_DIVTBL(_id, cname, pname, f, mo, ds, dw,\
drivers/clk/rockchip/clk.h
867
.div_shift = ds, \
drivers/clk/rockchip/clk.h
895
ds, dw, df) \
drivers/clk/rockchip/clk.h
907
.div_shift = ds, \
drivers/clk/rockchip/clk.h
914
mw, mf, ds, dw, df, dt) \
drivers/clk/rockchip/clk.h
926
.div_shift = ds, \
drivers/clk/rockchip/clk.h
985
ds, dw, df) \
drivers/clk/rockchip/clk.h
996
.div_shift = ds, \
drivers/cpuidle/cpuidle-psci.c
101
if (ret == -1 && ds->state)
drivers/cpuidle/cpuidle-psci.c
102
pm_genpd_inc_rejected(ds->pd, ds->state_idx);
drivers/cpuidle/cpuidle-psci.c
52
struct psci_cpuidle_domain_state *ds = this_cpu_ptr(&psci_domain_state);
drivers/cpuidle/cpuidle-psci.c
54
ds->pd = pd;
drivers/cpuidle/cpuidle-psci.c
55
ds->state_idx = state_idx;
drivers/cpuidle/cpuidle-psci.c
56
ds->state = state;
drivers/cpuidle/cpuidle-psci.c
71
struct psci_cpuidle_domain_state *ds;
drivers/cpuidle/cpuidle-psci.c
85
ds = this_cpu_ptr(&psci_domain_state);
drivers/cpuidle/cpuidle-psci.c
86
if (ds->state)
drivers/cpuidle/cpuidle-psci.c
87
state = ds->state;
drivers/crypto/atmel-sha.c
1752
size_t ds = crypto_ahash_digestsize(tfm);
drivers/crypto/atmel-sha.c
1754
size_t i, num_words = ds / sizeof(u32);
drivers/crypto/atmel-sha.c
1759
memset((u8 *)hmac->ipad + ds, 0, bs - ds);
drivers/crypto/atmel-sha.c
1893
size_t ds = crypto_ahash_digestsize(tfm);
drivers/crypto/atmel-sha.c
1900
num_words = ds / sizeof(u32);
drivers/crypto/atmel-sha.c
1913
atmel_sha_write(dd, SHA_MSR, bs + ds);
drivers/crypto/atmel-sha.c
1914
atmel_sha_write(dd, SHA_BCR, ds);
drivers/crypto/atmel-sha.c
1917
sg_init_one(&dd->tmp, digest, ds);
drivers/crypto/atmel-sha.c
1918
return atmel_sha_cpu_start(dd, &dd->tmp, ds, false, true,
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
753
int ds = crypto_shash_digestsize(ctx->hashalg);
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
765
authkeylen = ds;
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
894
int ds;
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
907
ds = crypto_shash_digestsize(ctx->hashalg);
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
909
ds = SHA512_DIGEST_SIZE;
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
911
memcpy(fctx->hmac.e.ipad, ctx->ipad, ds);
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
913
memcpy(fctx->hmac.e.opad, ctx->opad, ds);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
842
int ds = crypto_shash_digestsize(ctx->hashalg);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
855
authkeylen = ds;
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
977
int ds;
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
993
ds = crypto_shash_digestsize(ctx->hashalg);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
995
ds = SHA512_DIGEST_SIZE;
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
997
memcpy(fctx->hmac.e.ipad, ctx->ipad, ds);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
999
memcpy(fctx->hmac.e.opad, ctx->opad, ds);
drivers/crypto/omap-sham.c
1106
int ds = crypto_shash_digestsize(bctx->shash);
drivers/crypto/omap-sham.c
1113
crypto_shash_finup(shash, req->result, ds, req->result);
drivers/crypto/omap-sham.c
1290
int ds = crypto_shash_digestsize(bctx->shash);
drivers/crypto/omap-sham.c
1302
keylen = ds;
drivers/dma/imx-sdma.c
367
u32 ds;
drivers/dma/k3dma.c
279
struct k3_dma_desc_sw *ds =
drivers/dma/k3dma.c
285
list_del(&ds->vd.node);
drivers/dma/k3dma.c
287
c->phy->ds_run = ds;
drivers/dma/k3dma.c
290
k3_dma_set_desc(c->phy, &ds->desc_hw[0]);
drivers/dma/k3dma.c
402
struct k3_dma_desc_sw *ds = p->ds_run;
drivers/dma/k3dma.c
407
index = ((clli - ds->desc_hw_lli) /
drivers/dma/k3dma.c
409
for (; index < ds->desc_num; index++) {
drivers/dma/k3dma.c
410
bytes += ds->desc_hw[index].count;
drivers/dma/k3dma.c
412
if (!ds->desc_hw[index].lli)
drivers/dma/k3dma.c
446
static void k3_dma_fill_desc(struct k3_dma_desc_sw *ds, dma_addr_t dst,
drivers/dma/k3dma.c
449
if (num != ds->desc_num - 1)
drivers/dma/k3dma.c
450
ds->desc_hw[num].lli = ds->desc_hw_lli + (num + 1) *
drivers/dma/k3dma.c
453
ds->desc_hw[num].lli |= CX_LLI_CHAIN_EN;
drivers/dma/k3dma.c
454
ds->desc_hw[num].count = len;
drivers/dma/k3dma.c
455
ds->desc_hw[num].saddr = src;
drivers/dma/k3dma.c
456
ds->desc_hw[num].daddr = dst;
drivers/dma/k3dma.c
457
ds->desc_hw[num].config = ccfg;
drivers/dma/k3dma.c
464
struct k3_dma_desc_sw *ds;
drivers/dma/k3dma.c
474
ds = kzalloc_obj(*ds, GFP_NOWAIT);
drivers/dma/k3dma.c
475
if (!ds)
drivers/dma/k3dma.c
478
ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli);
drivers/dma/k3dma.c
479
if (!ds->desc_hw) {
drivers/dma/k3dma.c
481
kfree(ds);
drivers/dma/k3dma.c
484
ds->desc_num = num;
drivers/dma/k3dma.c
485
return ds;
drivers/dma/k3dma.c
493
struct k3_dma_desc_sw *ds;
drivers/dma/k3dma.c
502
ds = k3_dma_alloc_desc_resource(num, chan);
drivers/dma/k3dma.c
503
if (!ds)
drivers/dma/k3dma.c
507
ds->size = len;
drivers/dma/k3dma.c
519
k3_dma_fill_desc(ds, dst, src, copy, num++, c->ccfg);
drivers/dma/k3dma.c
526
ds->desc_hw[num-1].lli = 0; /* end of link */
drivers/dma/k3dma.c
527
return vchan_tx_prep(&c->vc, &ds->vd, flags);
drivers/dma/k3dma.c
535
struct k3_dma_desc_sw *ds;
drivers/dma/k3dma.c
547
ds = k3_dma_alloc_desc_resource(num, chan);
drivers/dma/k3dma.c
548
if (!ds)
drivers/dma/k3dma.c
569
k3_dma_fill_desc(ds, dst, src, len, num++, c->ccfg);
drivers/dma/k3dma.c
576
ds->desc_hw[num-1].lli = 0; /* end of link */
drivers/dma/k3dma.c
577
ds->size = total;
drivers/dma/k3dma.c
578
return vchan_tx_prep(&c->vc, &ds->vd, flags);
drivers/dma/k3dma.c
588
struct k3_dma_desc_sw *ds;
drivers/dma/k3dma.c
603
ds = k3_dma_alloc_desc_resource(num, chan);
drivers/dma/k3dma.c
604
if (!ds)
drivers/dma/k3dma.c
635
k3_dma_fill_desc(ds, dst, src, len, num++, c->ccfg | en_tc2);
drivers/dma/k3dma.c
642
ds->desc_hw[num - 1].lli |= ds->desc_hw_lli;
drivers/dma/k3dma.c
644
ds->size = total;
drivers/dma/k3dma.c
646
return vchan_tx_prep(&c->vc, &ds->vd, flags);
drivers/dma/k3dma.c
706
struct k3_dma_desc_sw *ds =
drivers/dma/k3dma.c
710
dma_pool_free(d->pool, ds->desc_hw, ds->desc_hw_lli);
drivers/dma/k3dma.c
711
kfree(ds);
drivers/dma/lgm/lgm-dma.c
1028
c->ds = NULL;
drivers/dma/lgm/lgm-dma.c
1033
c->ds = to_lgm_dma_desc(vdesc);
drivers/dma/lgm/lgm-dma.c
1034
ldma_chan_desc_hw_cfg(c, c->ds->desc_phys, c->ds->desc_cnt);
drivers/dma/lgm/lgm-dma.c
1052
if (c->ds)
drivers/dma/lgm/lgm-dma.c
1053
dma_free_desc_resource(&c->ds->vdesc);
drivers/dma/lgm/lgm-dma.c
1165
struct dw2_desc_sw *ds;
drivers/dma/lgm/lgm-dma.c
1177
ds = dma_alloc_desc_resource(num, c);
drivers/dma/lgm/lgm-dma.c
1178
if (!ds)
drivers/dma/lgm/lgm-dma.c
1181
c->ds = ds;
drivers/dma/lgm/lgm-dma.c
1193
hw_ds = &ds->desc_hw[num];
drivers/dma/lgm/lgm-dma.c
1248
ds->size = total;
drivers/dma/lgm/lgm-dma.c
1251
return vchan_tx_prep(&c->vchan, &ds->vdesc, DMA_CTRL_ACK);
drivers/dma/lgm/lgm-dma.c
1309
struct dma_async_tx_descriptor *tx = &c->ds->vdesc.tx;
drivers/dma/lgm/lgm-dma.c
1331
c->ds = NULL;
drivers/dma/lgm/lgm-dma.c
218
struct dw2_desc_sw *ds;
drivers/dma/lgm/lgm-dma.c
664
struct dw2_desc_sw *ds;
drivers/dma/lgm/lgm-dma.c
684
ds = kzalloc_obj(*ds, GFP_NOWAIT);
drivers/dma/lgm/lgm-dma.c
685
if (!ds)
drivers/dma/lgm/lgm-dma.c
688
tx = &ds->vdesc.tx;
drivers/dma/lgm/lgm-dma.c
967
struct dw2_desc_sw *ds = to_lgm_dma_desc(vdesc);
drivers/dma/lgm/lgm-dma.c
968
struct ldma_chan *c = ds->chan;
drivers/dma/lgm/lgm-dma.c
970
dma_pool_free(c->desc_pool, ds->desc_hw, ds->desc_phys);
drivers/dma/lgm/lgm-dma.c
971
kfree(ds);
drivers/dma/lgm/lgm-dma.c
978
struct dw2_desc_sw *ds;
drivers/dma/lgm/lgm-dma.c
985
ds = kzalloc_obj(*ds, GFP_NOWAIT);
drivers/dma/lgm/lgm-dma.c
986
if (!ds)
drivers/dma/lgm/lgm-dma.c
989
ds->chan = c;
drivers/dma/lgm/lgm-dma.c
990
ds->desc_hw = dma_pool_zalloc(c->desc_pool, GFP_ATOMIC,
drivers/dma/lgm/lgm-dma.c
991
&ds->desc_phys);
drivers/dma/lgm/lgm-dma.c
992
if (!ds->desc_hw) {
drivers/dma/lgm/lgm-dma.c
994
kfree(ds);
drivers/dma/lgm/lgm-dma.c
997
ds->desc_cnt = num;
drivers/dma/lgm/lgm-dma.c
999
return ds;
drivers/dma/sh/rz-dmac.c
608
static u8 rz_dmac_ds_to_val_mapping(enum dma_slave_buswidth ds)
drivers/dma/sh/rz-dmac.c
623
if (ds_lut[i] == ds)
drivers/dma/txx9dmac.c
1006
if (ds)
drivers/dma/txx9dmac.c
1010
if (!ds ||
drivers/dma/txx9dmac.c
1011
(ds->tx_reg && ds->rx_reg) || (!ds->tx_reg && !ds->rx_reg))
drivers/dma/txx9dmac.c
1014
TXX9_DMA_CCR_XFSZ(__ffs(ds->reg_width));
drivers/dma/txx9dmac.c
333
struct txx9dmac_slave *ds = dc->chan.private;
drivers/dma/txx9dmac.c
350
if (ds) {
drivers/dma/txx9dmac.c
351
if (ds->tx_reg) {
drivers/dma/txx9dmac.c
352
sai = ds->reg_width;
drivers/dma/txx9dmac.c
356
dai = ds->reg_width;
drivers/dma/txx9dmac.c
371
if (ds) {
drivers/dma/txx9dmac.c
372
if (ds->tx_reg) {
drivers/dma/txx9dmac.c
373
sai = ds->reg_width;
drivers/dma/txx9dmac.c
377
dai = ds->reg_width;
drivers/dma/txx9dmac.c
809
struct txx9dmac_slave *ds = chan->private;
drivers/dma/txx9dmac.c
817
BUG_ON(!ds || !ds->reg_width);
drivers/dma/txx9dmac.c
818
if (ds->tx_reg)
drivers/dma/txx9dmac.c
843
desc->hwdesc.DAR = ds->tx_reg;
drivers/dma/txx9dmac.c
845
desc->hwdesc.SAR = ds->rx_reg;
drivers/dma/txx9dmac.c
852
desc->hwdesc32.DAR = ds->tx_reg;
drivers/dma/txx9dmac.c
854
desc->hwdesc32.SAR = ds->rx_reg;
drivers/dma/txx9dmac.c
860
sai = ds->reg_width;
drivers/dma/txx9dmac.c
864
dai = ds->reg_width;
drivers/dma/txx9dmac.c
987
struct txx9dmac_slave *ds = chan->private;
drivers/fsi/fsi-master-ast-cf.c
215
uint8_t ds, opcode;
drivers/fsi/fsi-master-ast-cf.c
257
ds = size > 1 ? 1 : 0;
drivers/fsi/fsi-master-ast-cf.c
266
msg_push_bits(cmd, ds, 1);
drivers/fsi/fsi-master-gpio.c
240
uint8_t ds, opcode;
drivers/fsi/fsi-master-gpio.c
282
ds = size > 1 ? 1 : 0;
drivers/fsi/fsi-master-gpio.c
291
msg_push_bits(cmd, ds, 1);
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
441
#define amdgpu_ring_emit_gds_switch(r, v, db, ds, wb, ws, ab, as) (r)->funcs->emit_gds_switch((r), (v), (db), (ds), (wb), (ws), (ab), (as))
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1390
cpu_to_le16((uint16_t)(bp_params->ds.ds_frac_size));
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1404
((bp_params->ds.feedback_amount <<
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1407
((bp_params->ds.nfrac_amount <<
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1460
cpu_to_le16((uint16_t)(bp_params->ds.ds_frac_size));
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1473
((bp_params->ds.feedback_amount <<
drivers/gpu/drm/amd/display/dc/bios/command_table.c
1476
((bp_params->ds.nfrac_amount <<
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
732
bp_params.ds.feedback_amount =
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
734
bp_params.ds.nfrac_amount =
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
736
bp_params.ds.ds_frac_size = d_s_data.ds_frac_size;
drivers/gpu/drm/amd/display/include/bios_parser_types.h
309
} ds;
drivers/gpu/drm/nouveau/include/nvif/cl9097.h
32
__u32 ds[4];
drivers/gpu/drm/nouveau/include/nvif/cl9097.h
42
__u32 ds;
drivers/gpu/drm/nouveau/include/nvif/push.h
136
#define PUSH_1(X,f,ds,n,o,p,s,mA,dA) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
137
PUSH_##o##_HDR((p), s, mA, (ds)+(n)); \
drivers/gpu/drm/nouveau/include/nvif/push.h
138
PUSH_##f(X, (p), X##mA, 1, o, (dA), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
140
#define PUSH_2(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
142
PUSH_1(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
143
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
145
#define PUSH_3(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
147
PUSH_2(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
148
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
150
#define PUSH_4(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
152
PUSH_3(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
153
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
155
#define PUSH_5(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
157
PUSH_4(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
158
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
160
#define PUSH_6(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
162
PUSH_5(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
163
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
165
#define PUSH_7(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
167
PUSH_6(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
168
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
170
#define PUSH_8(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
172
PUSH_7(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
173
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
175
#define PUSH_9(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
177
PUSH_8(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
178
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
180
#define PUSH_10(X,f,ds,n,o,p,s,mB,dB,mA,dA,a...) do { \
drivers/gpu/drm/nouveau/include/nvif/push.h
182
PUSH_9(X, DATA_, 1, (ds) + (n), o, (p), s, X##mA, (dA), ##a); \
drivers/gpu/drm/nouveau/include/nvif/push.h
183
PUSH_##f(X, (p), X##mB, 0, o, (dB), ds, ""); \
drivers/gpu/drm/nouveau/include/nvif/push.h
252
#define PUSH_1P(X,o,p,s,mA,dp,ds) \
drivers/gpu/drm/nouveau/include/nvif/push.h
253
PUSH_1(X, DATAp, ds, 0, o, (p), s, X##mA, (dp))
drivers/gpu/drm/nouveau/include/nvif/push.h
254
#define PUSH_2P(X,o,p,s,mA,dA,mB,dp,ds) \
drivers/gpu/drm/nouveau/include/nvif/push.h
255
PUSH_2(X, DATAp, ds, 0, o, (p), s, X##mB, (dp), \
drivers/gpu/drm/nouveau/include/nvif/push.h
257
#define PUSH_3P(X,o,p,s,mA,dA,mB,dB,mC,dp,ds) \
drivers/gpu/drm/nouveau/include/nvif/push.h
258
PUSH_3(X, DATAp, ds, 0, o, (p), s, X##mC, (dp), \
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
104
nvkm_wr32(device, 0x405818, gr->zbc_depth[zbc].ds);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
112
const u32 ds, const u32 l2)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
121
if (gr->zbc_depth[i].ds != ds)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
137
gr->zbc_depth[zbc].ds = ds;
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
191
args->v0.ds,
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
2170
gf100_gr_init_num_tpc_per_gpc(struct gf100_gr *gr, bool pd, bool ds)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
2181
if (ds)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
219
args->v0.ds,
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
53
nvkm_wr32(device, 0x405804, gr->zbc_color[zbc].ds[0]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
54
nvkm_wr32(device, 0x405808, gr->zbc_color[zbc].ds[1]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
55
nvkm_wr32(device, 0x40580c, gr->zbc_color[zbc].ds[2]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
56
nvkm_wr32(device, 0x405810, gr->zbc_color[zbc].ds[3]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
65
const u32 ds[4], const u32 l2[4])
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
74
if (memcmp(gr->zbc_color[i].ds, ds, sizeof(
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
75
gr->zbc_color[i].ds)))
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
91
memcpy(gr->zbc_color[zbc].ds, ds, sizeof(gr->zbc_color[zbc].ds));
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
145
const u32 ds, const u32 l2);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
49
u32 ds[4];
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
55
u32 ds;
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
61
u32 ds;
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
40
nvkm_wr32(device, 0x418010 + zoff, gr->zbc_color[zbc].ds[0]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
41
nvkm_wr32(device, 0x41804c + zoff, gr->zbc_color[zbc].ds[1]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
42
nvkm_wr32(device, 0x418088 + zoff, gr->zbc_color[zbc].ds[2]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
43
nvkm_wr32(device, 0x4180c4 + zoff, gr->zbc_color[zbc].ds[3]);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c
59
nvkm_wr32(device, 0x418110 + zoff, gr->zbc_depth[zbc].ds);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c
37
nvkm_wr32(device, 0x41815c + zoff, gr->zbc_stencil[zbc].ds);
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c
45
const u32 ds, const u32 l2)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c
54
if (gr->zbc_stencil[i].ds != ds)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c
70
gr->zbc_stencil[zbc].ds = ds;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr5.c
38
int WL, CL, WR, at[2], dt, ds;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr5.c
64
ds = ram->next->bios.timing_20_2f_03;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr5.c
84
ram->mr[1] |= (ds & 0x03) << 0;
drivers/gpu/drm/omapdrm/dss/dispc.c
2104
const int ds = DIV_ROUND_UP(height, out_height);
drivers/gpu/drm/omapdrm/dss/dispc.c
2135
val, max(0, ds - 2) * width);
drivers/gpu/drm/omapdrm/dss/dispc.c
2136
if (val < max(0, ds - 2) * width)
drivers/gpu/drm/omapdrm/dss/dispc.c
2146
val, max(0, ds - 1) * width);
drivers/gpu/drm/omapdrm/dss/dispc.c
2147
if (val < max(0, ds - 1) * width)
drivers/hid/hid-playstation.c
1014
static int dualsense_get_calibration_data(struct dualsense *ds)
drivers/hid/hid-playstation.c
1016
struct hid_device *hdev = ds->base.hdev;
drivers/hid/hid-playstation.c
1034
ret = ps_get_report(ds->base.hdev, DS_FEATURE_REPORT_CALIBRATION, buf,
drivers/hid/hid-playstation.c
1037
hid_err(ds->base.hdev, "Failed to retrieve DualSense calibration info: %d\n", ret);
drivers/hid/hid-playstation.c
1064
ds->gyro_calib_data[0].abs_code = ABS_RX;
drivers/hid/hid-playstation.c
1065
ds->gyro_calib_data[0].bias = 0;
drivers/hid/hid-playstation.c
1066
ds->gyro_calib_data[0].sens_numer = speed_2x * DS_GYRO_RES_PER_DEG_S;
drivers/hid/hid-playstation.c
1067
ds->gyro_calib_data[0].sens_denom = abs(gyro_pitch_plus - gyro_pitch_bias) +
drivers/hid/hid-playstation.c
1070
ds->gyro_calib_data[1].abs_code = ABS_RY;
drivers/hid/hid-playstation.c
1071
ds->gyro_calib_data[1].bias = 0;
drivers/hid/hid-playstation.c
1072
ds->gyro_calib_data[1].sens_numer = speed_2x * DS_GYRO_RES_PER_DEG_S;
drivers/hid/hid-playstation.c
1073
ds->gyro_calib_data[1].sens_denom = abs(gyro_yaw_plus - gyro_yaw_bias) +
drivers/hid/hid-playstation.c
1076
ds->gyro_calib_data[2].abs_code = ABS_RZ;
drivers/hid/hid-playstation.c
1077
ds->gyro_calib_data[2].bias = 0;
drivers/hid/hid-playstation.c
1078
ds->gyro_calib_data[2].sens_numer = speed_2x * DS_GYRO_RES_PER_DEG_S;
drivers/hid/hid-playstation.c
1079
ds->gyro_calib_data[2].sens_denom = abs(gyro_roll_plus - gyro_roll_bias) +
drivers/hid/hid-playstation.c
1087
for (i = 0; i < ARRAY_SIZE(ds->gyro_calib_data); i++) {
drivers/hid/hid-playstation.c
1088
if (ds->gyro_calib_data[i].sens_denom == 0) {
drivers/hid/hid-playstation.c
1091
ds->gyro_calib_data[i].abs_code);
drivers/hid/hid-playstation.c
1092
ds->gyro_calib_data[i].bias = 0;
drivers/hid/hid-playstation.c
1093
ds->gyro_calib_data[i].sens_numer = DS_GYRO_RANGE;
drivers/hid/hid-playstation.c
1094
ds->gyro_calib_data[i].sens_denom = S16_MAX;
drivers/hid/hid-playstation.c
1103
ds->accel_calib_data[0].abs_code = ABS_X;
drivers/hid/hid-playstation.c
1104
ds->accel_calib_data[0].bias = acc_x_plus - range_2g / 2;
drivers/hid/hid-playstation.c
1105
ds->accel_calib_data[0].sens_numer = 2 * DS_ACC_RES_PER_G;
drivers/hid/hid-playstation.c
1106
ds->accel_calib_data[0].sens_denom = range_2g;
drivers/hid/hid-playstation.c
1109
ds->accel_calib_data[1].abs_code = ABS_Y;
drivers/hid/hid-playstation.c
1110
ds->accel_calib_data[1].bias = acc_y_plus - range_2g / 2;
drivers/hid/hid-playstation.c
1111
ds->accel_calib_data[1].sens_numer = 2 * DS_ACC_RES_PER_G;
drivers/hid/hid-playstation.c
1112
ds->accel_calib_data[1].sens_denom = range_2g;
drivers/hid/hid-playstation.c
1115
ds->accel_calib_data[2].abs_code = ABS_Z;
drivers/hid/hid-playstation.c
1116
ds->accel_calib_data[2].bias = acc_z_plus - range_2g / 2;
drivers/hid/hid-playstation.c
1117
ds->accel_calib_data[2].sens_numer = 2 * DS_ACC_RES_PER_G;
drivers/hid/hid-playstation.c
1118
ds->accel_calib_data[2].sens_denom = range_2g;
drivers/hid/hid-playstation.c
1125
for (i = 0; i < ARRAY_SIZE(ds->accel_calib_data); i++) {
drivers/hid/hid-playstation.c
1126
if (ds->accel_calib_data[i].sens_denom == 0) {
drivers/hid/hid-playstation.c
1129
ds->accel_calib_data[i].abs_code);
drivers/hid/hid-playstation.c
1130
ds->accel_calib_data[i].bias = 0;
drivers/hid/hid-playstation.c
1131
ds->accel_calib_data[i].sens_numer = DS_ACC_RANGE;
drivers/hid/hid-playstation.c
1132
ds->accel_calib_data[i].sens_denom = S16_MAX;
drivers/hid/hid-playstation.c
1141
static int dualsense_get_firmware_info(struct dualsense *ds)
drivers/hid/hid-playstation.c
1150
ret = ps_get_report(ds->base.hdev, DS_FEATURE_REPORT_FIRMWARE_INFO, buf,
drivers/hid/hid-playstation.c
1153
hid_err(ds->base.hdev, "Failed to retrieve DualSense firmware info: %d\n", ret);
drivers/hid/hid-playstation.c
1157
ds->base.hw_version = get_unaligned_le32(&buf[24]);
drivers/hid/hid-playstation.c
1158
ds->base.fw_version = get_unaligned_le32(&buf[28]);
drivers/hid/hid-playstation.c
1167
ds->update_version = get_unaligned_le16(&buf[44]);
drivers/hid/hid-playstation.c
1174
static int dualsense_get_mac_address(struct dualsense *ds)
drivers/hid/hid-playstation.c
1183
ret = ps_get_report(ds->base.hdev, DS_FEATURE_REPORT_PAIRING_INFO, buf,
drivers/hid/hid-playstation.c
1186
hid_err(ds->base.hdev, "Failed to retrieve DualSense pairing info: %d\n", ret);
drivers/hid/hid-playstation.c
1190
memcpy(ds->base.mac_address, &buf[1], sizeof(ds->base.mac_address));
drivers/hid/hid-playstation.c
1201
struct dualsense *ds = container_of(mc_cdev, struct dualsense, lightbar);
drivers/hid/hid-playstation.c
1209
dualsense_set_lightbar(ds, red, green, blue);
drivers/hid/hid-playstation.c
1216
struct dualsense *ds = hid_get_drvdata(hdev);
drivers/hid/hid-playstation.c
1218
return !!(ds->player_leds_state & BIT(led - ds->player_leds));
drivers/hid/hid-playstation.c
1224
struct dualsense *ds = hid_get_drvdata(hdev);
drivers/hid/hid-playstation.c
1227
scoped_guard(spinlock_irqsave, &ds->base.lock) {
drivers/hid/hid-playstation.c
1228
led_index = led - ds->player_leds;
drivers/hid/hid-playstation.c
1230
ds->player_leds_state &= ~BIT(led_index);
drivers/hid/hid-playstation.c
1232
ds->player_leds_state |= BIT(led_index);
drivers/hid/hid-playstation.c
1234
ds->update_player_leds = true;
drivers/hid/hid-playstation.c
1237
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1242
static void dualsense_init_output_report(struct dualsense *ds,
drivers/hid/hid-playstation.c
1245
struct hid_device *hdev = ds->base.hdev;
drivers/hid/hid-playstation.c
1258
bt->seq_tag = FIELD_PREP(DS_OUTPUT_SEQ_NO, ds->output_seq) |
drivers/hid/hid-playstation.c
1260
if (++ds->output_seq == 16)
drivers/hid/hid-playstation.c
1261
ds->output_seq = 0;
drivers/hid/hid-playstation.c
1282
static inline void dualsense_schedule_work(struct dualsense *ds)
drivers/hid/hid-playstation.c
1285
scoped_guard(spinlock_irqsave, &ds->base.lock)
drivers/hid/hid-playstation.c
1286
if (ds->output_worker_initialized)
drivers/hid/hid-playstation.c
1287
schedule_work(&ds->output_worker);
drivers/hid/hid-playstation.c
1294
static void dualsense_send_output_report(struct dualsense *ds,
drivers/hid/hid-playstation.c
1297
struct hid_device *hdev = ds->base.hdev;
drivers/hid/hid-playstation.c
1315
struct dualsense *ds = container_of(work, struct dualsense, output_worker);
drivers/hid/hid-playstation.c
1319
dualsense_init_output_report(ds, &report, ds->output_report_dmabuf);
drivers/hid/hid-playstation.c
1322
scoped_guard(spinlock_irqsave, &ds->base.lock) {
drivers/hid/hid-playstation.c
1323
if (ds->update_rumble) {
drivers/hid/hid-playstation.c
1326
if (ds->use_vibration_v2)
drivers/hid/hid-playstation.c
1330
common->motor_left = ds->motor_left;
drivers/hid/hid-playstation.c
1331
common->motor_right = ds->motor_right;
drivers/hid/hid-playstation.c
1332
ds->update_rumble = false;
drivers/hid/hid-playstation.c
1335
if (ds->update_lightbar) {
drivers/hid/hid-playstation.c
1337
common->lightbar_red = ds->lightbar_red;
drivers/hid/hid-playstation.c
1338
common->lightbar_green = ds->lightbar_green;
drivers/hid/hid-playstation.c
1339
common->lightbar_blue = ds->lightbar_blue;
drivers/hid/hid-playstation.c
1341
ds->update_lightbar = false;
drivers/hid/hid-playstation.c
1344
if (ds->update_player_leds) {
drivers/hid/hid-playstation.c
1347
common->player_leds = ds->player_leds_state;
drivers/hid/hid-playstation.c
1349
ds->update_player_leds = false;
drivers/hid/hid-playstation.c
1352
if (ds->plugged_state != ds->prev_plugged_state) {
drivers/hid/hid-playstation.c
1353
u8 val = ds->plugged_state & DS_STATUS1_HP_DETECT;
drivers/hid/hid-playstation.c
1355
if (val != (ds->prev_plugged_state & DS_STATUS1_HP_DETECT)) {
drivers/hid/hid-playstation.c
1392
input_report_switch(ds->jack, SW_HEADPHONE_INSERT, val);
drivers/hid/hid-playstation.c
1395
val = ds->plugged_state & DS_STATUS1_MIC_DETECT;
drivers/hid/hid-playstation.c
1396
if (val != (ds->prev_plugged_state & DS_STATUS1_MIC_DETECT))
drivers/hid/hid-playstation.c
1397
input_report_switch(ds->jack, SW_MICROPHONE_INSERT, val);
drivers/hid/hid-playstation.c
1399
input_sync(ds->jack);
drivers/hid/hid-playstation.c
1400
ds->prev_plugged_state = ds->plugged_state;
drivers/hid/hid-playstation.c
1403
if (ds->update_mic_mute) {
drivers/hid/hid-playstation.c
1405
common->mute_button_led = ds->mic_muted;
drivers/hid/hid-playstation.c
1407
if (ds->mic_muted) {
drivers/hid/hid-playstation.c
1420
ds->update_mic_mute = false;
drivers/hid/hid-playstation.c
1424
dualsense_send_output_report(ds, &report);
drivers/hid/hid-playstation.c
1431
struct dualsense *ds = container_of(ps_dev, struct dualsense, base);
drivers/hid/hid-playstation.c
1463
input_report_abs(ds->gamepad, ABS_X, ds_report->x);
drivers/hid/hid-playstation.c
1464
input_report_abs(ds->gamepad, ABS_Y, ds_report->y);
drivers/hid/hid-playstation.c
1465
input_report_abs(ds->gamepad, ABS_RX, ds_report->rx);
drivers/hid/hid-playstation.c
1466
input_report_abs(ds->gamepad, ABS_RY, ds_report->ry);
drivers/hid/hid-playstation.c
1467
input_report_abs(ds->gamepad, ABS_Z, ds_report->z);
drivers/hid/hid-playstation.c
1468
input_report_abs(ds->gamepad, ABS_RZ, ds_report->rz);
drivers/hid/hid-playstation.c
1473
input_report_abs(ds->gamepad, ABS_HAT0X, ps_gamepad_hat_mapping[value].x);
drivers/hid/hid-playstation.c
1474
input_report_abs(ds->gamepad, ABS_HAT0Y, ps_gamepad_hat_mapping[value].y);
drivers/hid/hid-playstation.c
1476
input_report_key(ds->gamepad, BTN_WEST, ds_report->buttons[0] & DS_BUTTONS0_SQUARE);
drivers/hid/hid-playstation.c
1477
input_report_key(ds->gamepad, BTN_SOUTH, ds_report->buttons[0] & DS_BUTTONS0_CROSS);
drivers/hid/hid-playstation.c
1478
input_report_key(ds->gamepad, BTN_EAST, ds_report->buttons[0] & DS_BUTTONS0_CIRCLE);
drivers/hid/hid-playstation.c
1479
input_report_key(ds->gamepad, BTN_NORTH, ds_report->buttons[0] & DS_BUTTONS0_TRIANGLE);
drivers/hid/hid-playstation.c
1480
input_report_key(ds->gamepad, BTN_TL, ds_report->buttons[1] & DS_BUTTONS1_L1);
drivers/hid/hid-playstation.c
1481
input_report_key(ds->gamepad, BTN_TR, ds_report->buttons[1] & DS_BUTTONS1_R1);
drivers/hid/hid-playstation.c
1482
input_report_key(ds->gamepad, BTN_TL2, ds_report->buttons[1] & DS_BUTTONS1_L2);
drivers/hid/hid-playstation.c
1483
input_report_key(ds->gamepad, BTN_TR2, ds_report->buttons[1] & DS_BUTTONS1_R2);
drivers/hid/hid-playstation.c
1484
input_report_key(ds->gamepad, BTN_SELECT, ds_report->buttons[1] & DS_BUTTONS1_CREATE);
drivers/hid/hid-playstation.c
1485
input_report_key(ds->gamepad, BTN_START, ds_report->buttons[1] & DS_BUTTONS1_OPTIONS);
drivers/hid/hid-playstation.c
1486
input_report_key(ds->gamepad, BTN_THUMBL, ds_report->buttons[1] & DS_BUTTONS1_L3);
drivers/hid/hid-playstation.c
1487
input_report_key(ds->gamepad, BTN_THUMBR, ds_report->buttons[1] & DS_BUTTONS1_R3);
drivers/hid/hid-playstation.c
1488
input_report_key(ds->gamepad, BTN_MODE, ds_report->buttons[2] & DS_BUTTONS2_PS_HOME);
drivers/hid/hid-playstation.c
1489
input_sync(ds->gamepad);
drivers/hid/hid-playstation.c
1497
if (btn_mic_state && !ds->last_btn_mic_state) {
drivers/hid/hid-playstation.c
1499
ds->update_mic_mute = true;
drivers/hid/hid-playstation.c
1500
ds->mic_muted = !ds->mic_muted; /* toggle */
drivers/hid/hid-playstation.c
1504
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1506
ds->last_btn_mic_state = btn_mic_state;
drivers/hid/hid-playstation.c
1515
if (!ds->prev_plugged_state_valid) {
drivers/hid/hid-playstation.c
1518
ds->plugged_state = (~value) & DS_STATUS1_JACK_DETECT;
drivers/hid/hid-playstation.c
1519
ds->prev_plugged_state_valid = true;
drivers/hid/hid-playstation.c
1523
if (value != ds->plugged_state) {
drivers/hid/hid-playstation.c
1525
ds->prev_plugged_state = ds->plugged_state;
drivers/hid/hid-playstation.c
1526
ds->plugged_state = value;
drivers/hid/hid-playstation.c
1530
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1537
int calib_data = mult_frac(ds->gyro_calib_data[i].sens_numer,
drivers/hid/hid-playstation.c
1538
raw_data, ds->gyro_calib_data[i].sens_denom);
drivers/hid/hid-playstation.c
1540
input_report_abs(ds->sensors, ds->gyro_calib_data[i].abs_code, calib_data);
drivers/hid/hid-playstation.c
1546
int calib_data = mult_frac(ds->accel_calib_data[i].sens_numer,
drivers/hid/hid-playstation.c
1547
raw_data - ds->accel_calib_data[i].bias,
drivers/hid/hid-playstation.c
1548
ds->accel_calib_data[i].sens_denom);
drivers/hid/hid-playstation.c
1550
input_report_abs(ds->sensors, ds->accel_calib_data[i].abs_code, calib_data);
drivers/hid/hid-playstation.c
1555
if (!ds->sensor_timestamp_initialized) {
drivers/hid/hid-playstation.c
1556
ds->sensor_timestamp_us = DIV_ROUND_CLOSEST(sensor_timestamp, 3);
drivers/hid/hid-playstation.c
1557
ds->sensor_timestamp_initialized = true;
drivers/hid/hid-playstation.c
1561
if (ds->prev_sensor_timestamp > sensor_timestamp)
drivers/hid/hid-playstation.c
1562
delta = (U32_MAX - ds->prev_sensor_timestamp + sensor_timestamp + 1);
drivers/hid/hid-playstation.c
1564
delta = sensor_timestamp - ds->prev_sensor_timestamp;
drivers/hid/hid-playstation.c
1565
ds->sensor_timestamp_us += DIV_ROUND_CLOSEST(delta, 3);
drivers/hid/hid-playstation.c
1567
ds->prev_sensor_timestamp = sensor_timestamp;
drivers/hid/hid-playstation.c
1568
input_event(ds->sensors, EV_MSC, MSC_TIMESTAMP, ds->sensor_timestamp_us);
drivers/hid/hid-playstation.c
1569
input_sync(ds->sensors);
drivers/hid/hid-playstation.c
1575
input_mt_slot(ds->touchpad, i);
drivers/hid/hid-playstation.c
1576
input_mt_report_slot_state(ds->touchpad, MT_TOOL_FINGER, active);
drivers/hid/hid-playstation.c
1579
input_report_abs(ds->touchpad, ABS_MT_POSITION_X,
drivers/hid/hid-playstation.c
1581
input_report_abs(ds->touchpad, ABS_MT_POSITION_Y,
drivers/hid/hid-playstation.c
1585
input_mt_sync_frame(ds->touchpad);
drivers/hid/hid-playstation.c
1586
input_report_key(ds->touchpad, BTN_LEFT, ds_report->buttons[2] & DS_BUTTONS2_TOUCHPAD);
drivers/hid/hid-playstation.c
1587
input_sync(ds->touchpad);
drivers/hid/hid-playstation.c
1631
struct dualsense *ds = hid_get_drvdata(hdev);
drivers/hid/hid-playstation.c
1636
scoped_guard(spinlock_irqsave, &ds->base.lock) {
drivers/hid/hid-playstation.c
1637
ds->update_rumble = true;
drivers/hid/hid-playstation.c
1638
ds->motor_left = effect->u.rumble.strong_magnitude / 256;
drivers/hid/hid-playstation.c
1639
ds->motor_right = effect->u.rumble.weak_magnitude / 256;
drivers/hid/hid-playstation.c
1642
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1648
struct dualsense *ds = container_of(ps_dev, struct dualsense, base);
drivers/hid/hid-playstation.c
1650
scoped_guard(spinlock_irqsave, &ds->base.lock)
drivers/hid/hid-playstation.c
1651
ds->output_worker_initialized = false;
drivers/hid/hid-playstation.c
1653
cancel_work_sync(&ds->output_worker);
drivers/hid/hid-playstation.c
1656
static int dualsense_reset_leds(struct dualsense *ds)
drivers/hid/hid-playstation.c
1665
dualsense_init_output_report(ds, &report, buf);
drivers/hid/hid-playstation.c
1675
dualsense_send_output_report(ds, &report);
drivers/hid/hid-playstation.c
1681
static void dualsense_set_lightbar(struct dualsense *ds, u8 red, u8 green, u8 blue)
drivers/hid/hid-playstation.c
1683
scoped_guard(spinlock_irqsave, &ds->base.lock) {
drivers/hid/hid-playstation.c
1684
ds->update_lightbar = true;
drivers/hid/hid-playstation.c
1685
ds->lightbar_red = red;
drivers/hid/hid-playstation.c
1686
ds->lightbar_green = green;
drivers/hid/hid-playstation.c
1687
ds->lightbar_blue = blue;
drivers/hid/hid-playstation.c
1690
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1693
static void dualsense_set_player_leds(struct dualsense *ds)
drivers/hid/hid-playstation.c
1709
u8 player_id = ds->base.player_id % ARRAY_SIZE(player_ids);
drivers/hid/hid-playstation.c
1711
ds->update_player_leds = true;
drivers/hid/hid-playstation.c
1712
ds->player_leds_state = player_ids[player_id];
drivers/hid/hid-playstation.c
1713
dualsense_schedule_work(ds);
drivers/hid/hid-playstation.c
1718
struct dualsense *ds;
drivers/hid/hid-playstation.c
1736
ds = devm_kzalloc(&hdev->dev, sizeof(*ds), GFP_KERNEL);
drivers/hid/hid-playstation.c
1737
if (!ds)
drivers/hid/hid-playstation.c
1746
ps_dev = &ds->base;
drivers/hid/hid-playstation.c
1753
INIT_WORK(&ds->output_worker, dualsense_output_worker);
drivers/hid/hid-playstation.c
1754
ds->output_worker_initialized = true;
drivers/hid/hid-playstation.c
1755
hid_set_drvdata(hdev, ds);
drivers/hid/hid-playstation.c
1758
ds->output_report_dmabuf = devm_kzalloc(&hdev->dev, max_output_report_size, GFP_KERNEL);
drivers/hid/hid-playstation.c
1759
if (!ds->output_report_dmabuf)
drivers/hid/hid-playstation.c
1762
ret = dualsense_get_mac_address(ds);
drivers/hid/hid-playstation.c
1767
snprintf(hdev->uniq, sizeof(hdev->uniq), "%pMR", ds->base.mac_address);
drivers/hid/hid-playstation.c
1769
ret = dualsense_get_firmware_info(ds);
drivers/hid/hid-playstation.c
1785
ds->use_vibration_v2 = ds->update_version >= DS_FEATURE_VERSION(2, 21);
drivers/hid/hid-playstation.c
1787
ds->use_vibration_v2 = true;
drivers/hid/hid-playstation.c
1794
ret = dualsense_get_calibration_data(ds);
drivers/hid/hid-playstation.c
1800
ds->gamepad = ps_gamepad_create(hdev, dualsense_play_effect);
drivers/hid/hid-playstation.c
1801
if (IS_ERR(ds->gamepad)) {
drivers/hid/hid-playstation.c
1802
ret = PTR_ERR(ds->gamepad);
drivers/hid/hid-playstation.c
1806
ps_dev->input_dev_name = dev_name(&ds->gamepad->dev);
drivers/hid/hid-playstation.c
1808
ds->sensors = ps_sensors_create(hdev, DS_ACC_RANGE, DS_ACC_RES_PER_G,
drivers/hid/hid-playstation.c
1810
if (IS_ERR(ds->sensors)) {
drivers/hid/hid-playstation.c
1811
ret = PTR_ERR(ds->sensors);
drivers/hid/hid-playstation.c
1815
ds->touchpad = ps_touchpad_create(hdev, DS_TOUCHPAD_WIDTH, DS_TOUCHPAD_HEIGHT, 2);
drivers/hid/hid-playstation.c
1816
if (IS_ERR(ds->touchpad)) {
drivers/hid/hid-playstation.c
1817
ret = PTR_ERR(ds->touchpad);
drivers/hid/hid-playstation.c
1823
ds->jack = ps_headset_jack_create(hdev);
drivers/hid/hid-playstation.c
1824
if (IS_ERR(ds->jack)) {
drivers/hid/hid-playstation.c
1825
ret = PTR_ERR(ds->jack);
drivers/hid/hid-playstation.c
1839
ret = dualsense_reset_leds(ds);
drivers/hid/hid-playstation.c
1843
ret = ps_lightbar_register(ps_dev, &ds->lightbar, dualsense_lightbar_set_brightness);
drivers/hid/hid-playstation.c
1848
dualsense_set_lightbar(ds, 0, 0, 128); /* blue */
drivers/hid/hid-playstation.c
1853
ret = ps_led_register(ps_dev, &ds->player_leds[i], led_info);
drivers/hid/hid-playstation.c
1865
dualsense_set_player_leds(ds);
drivers/hid/hid-playstation.c
1872
ds->base.hw_version, ds->base.fw_version);
drivers/hid/hid-playstation.c
1874
return &ds->base;
drivers/hid/hid-playstation.c
576
static inline void dualsense_schedule_work(struct dualsense *ds);
drivers/hid/hid-playstation.c
578
static void dualsense_set_lightbar(struct dualsense *ds, u8 red, u8 green, u8 blue);
drivers/i2c/busses/i2c-octeon-core.c
833
unsigned int thp, mdiv_min, mdiv = 2, ndiv = 0, ds = 10;
drivers/i2c/busses/i2c-octeon-core.c
842
ds = 15;
drivers/i2c/busses/i2c-octeon-core.c
858
tclk = i2c->twsi_freq * (mdiv_idx + 1) * ds;
drivers/i2c/busses/i2c-octeon-core.c
876
foscl = foscl / (mdiv_idx + 1) / ds;
drivers/infiniband/hw/mlx5/odp.c
1245
unsigned ds, opcode;
drivers/infiniband/hw/mlx5/odp.c
1248
ds = be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_DS_MASK;
drivers/infiniband/hw/mlx5/odp.c
1249
if (ds * MLX5_WQE_DS_UNITS > wqe_length) {
drivers/infiniband/hw/mlx5/odp.c
1251
ds, wqe_length);
drivers/infiniband/hw/mlx5/odp.c
1255
if (ds == 0) {
drivers/infiniband/hw/mlx5/odp.c
1261
*wqe_end = *wqe + ds * MLX5_WQE_DS_UNITS;
drivers/infiniband/hw/mlx5/qp.c
153
int ds;
drivers/infiniband/hw/mlx5/qp.c
160
ds = be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_DS_MASK;
drivers/infiniband/hw/mlx5/qp.c
161
wqe_length = ds * MLX5_WQE_DS_UNITS;
drivers/infiniband/hw/mlx5/qp.c
192
int ds;
drivers/infiniband/hw/mlx5/qp.c
207
ds = be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_DS_MASK;
drivers/infiniband/hw/mlx5/qp.c
208
wqe_length = ds * MLX5_WQE_DS_UNITS;
drivers/infiniband/hw/mthca/mthca_srq.c
211
int ds;
drivers/infiniband/hw/mthca/mthca_srq.c
228
ds = max(64UL,
drivers/infiniband/hw/mthca/mthca_srq.c
232
if (!mthca_is_memfree(dev) && (ds > dev->limits.max_desc_sz))
drivers/infiniband/hw/mthca/mthca_srq.c
235
srq->wqe_shift = ilog2(ds);
drivers/irqchip/irq-gic-v3.c
170
bool ds;
drivers/irqchip/irq-gic-v3.c
174
ds = gic_dist_security_disabled();
drivers/irqchip/irq-gic-v3.c
175
if ((gic_data.flags & FLAGS_WORKAROUND_INSECURE) && !ds) {
drivers/irqchip/irq-gic-v3.c
183
ds = gic_dist_security_disabled();
drivers/irqchip/irq-gic-v3.c
184
if (ds)
drivers/irqchip/irq-gic-v3.c
192
cpus_have_security_disabled = ds;
drivers/md/dm-bio-prison-v1.c
287
struct dm_deferred_set *ds;
drivers/md/dm-bio-prison-v1.c
302
struct dm_deferred_set *ds;
drivers/md/dm-bio-prison-v1.c
304
ds = kmalloc_obj(*ds);
drivers/md/dm-bio-prison-v1.c
305
if (!ds)
drivers/md/dm-bio-prison-v1.c
308
spin_lock_init(&ds->lock);
drivers/md/dm-bio-prison-v1.c
309
ds->current_entry = 0;
drivers/md/dm-bio-prison-v1.c
310
ds->sweeper = 0;
drivers/md/dm-bio-prison-v1.c
312
ds->entries[i].ds = ds;
drivers/md/dm-bio-prison-v1.c
313
ds->entries[i].count = 0;
drivers/md/dm-bio-prison-v1.c
314
INIT_LIST_HEAD(&ds->entries[i].work_items);
drivers/md/dm-bio-prison-v1.c
317
return ds;
drivers/md/dm-bio-prison-v1.c
321
void dm_deferred_set_destroy(struct dm_deferred_set *ds)
drivers/md/dm-bio-prison-v1.c
323
kfree(ds);
drivers/md/dm-bio-prison-v1.c
327
struct dm_deferred_entry *dm_deferred_entry_inc(struct dm_deferred_set *ds)
drivers/md/dm-bio-prison-v1.c
332
spin_lock_irqsave(&ds->lock, flags);
drivers/md/dm-bio-prison-v1.c
333
entry = ds->entries + ds->current_entry;
drivers/md/dm-bio-prison-v1.c
335
spin_unlock_irqrestore(&ds->lock, flags);
drivers/md/dm-bio-prison-v1.c
346
static void __sweep(struct dm_deferred_set *ds, struct list_head *head)
drivers/md/dm-bio-prison-v1.c
348
while ((ds->sweeper != ds->current_entry) &&
drivers/md/dm-bio-prison-v1.c
349
!ds->entries[ds->sweeper].count) {
drivers/md/dm-bio-prison-v1.c
350
list_splice_init(&ds->entries[ds->sweeper].work_items, head);
drivers/md/dm-bio-prison-v1.c
351
ds->sweeper = ds_next(ds->sweeper);
drivers/md/dm-bio-prison-v1.c
354
if ((ds->sweeper == ds->current_entry) && !ds->entries[ds->sweeper].count)
drivers/md/dm-bio-prison-v1.c
355
list_splice_init(&ds->entries[ds->sweeper].work_items, head);
drivers/md/dm-bio-prison-v1.c
362
spin_lock_irqsave(&entry->ds->lock, flags);
drivers/md/dm-bio-prison-v1.c
365
__sweep(entry->ds, head);
drivers/md/dm-bio-prison-v1.c
366
spin_unlock_irqrestore(&entry->ds->lock, flags);
drivers/md/dm-bio-prison-v1.c
373
int dm_deferred_set_add_work(struct dm_deferred_set *ds, struct list_head *work)
drivers/md/dm-bio-prison-v1.c
378
spin_lock_irq(&ds->lock);
drivers/md/dm-bio-prison-v1.c
379
if ((ds->sweeper == ds->current_entry) &&
drivers/md/dm-bio-prison-v1.c
380
!ds->entries[ds->current_entry].count)
drivers/md/dm-bio-prison-v1.c
383
list_add(work, &ds->entries[ds->current_entry].work_items);
drivers/md/dm-bio-prison-v1.c
384
next_entry = ds_next(ds->current_entry);
drivers/md/dm-bio-prison-v1.c
385
if (!ds->entries[next_entry].count)
drivers/md/dm-bio-prison-v1.c
386
ds->current_entry = next_entry;
drivers/md/dm-bio-prison-v1.c
388
spin_unlock_irq(&ds->lock);
drivers/md/dm-bio-prison-v1.h
122
void dm_deferred_set_destroy(struct dm_deferred_set *ds);
drivers/md/dm-bio-prison-v1.h
124
struct dm_deferred_entry *dm_deferred_entry_inc(struct dm_deferred_set *ds);
drivers/md/dm-bio-prison-v1.h
126
int dm_deferred_set_add_work(struct dm_deferred_set *ds, struct list_head *work);
drivers/md/dm-raid.c
1610
sector_t ds = ~0;
drivers/md/dm-raid.c
1615
ds = min(ds, bdev_nr_sectors(rdev->bdev));
drivers/md/dm-raid.c
1616
if (ds < rs->md.dev_sectors) {
drivers/media/platform/arm/mali-c55/mali-c55-core.c
510
struct mali_c55_cap_dev *ds = &mali_c55->cap_devs[MALI_C55_CAP_DEV_DS];
drivers/media/platform/arm/mali-c55/mali-c55-core.c
516
vb2_start_streaming_called(&ds->queue)) &&
drivers/message/fusion/mptbase.c
7240
char *ds = NULL;
drivers/message/fusion/mptbase.c
7251
ds = "None";
drivers/message/fusion/mptbase.c
7254
ds = "Log Data";
drivers/message/fusion/mptbase.c
7257
ds = "State Change";
drivers/message/fusion/mptbase.c
7260
ds = "Unit Attention";
drivers/message/fusion/mptbase.c
7263
ds = "IOC Bus Reset";
drivers/message/fusion/mptbase.c
7266
ds = "External Bus Reset";
drivers/message/fusion/mptbase.c
7269
ds = "Bus Rescan Event";
drivers/message/fusion/mptbase.c
7273
ds = "Link Status(FAILURE) Change";
drivers/message/fusion/mptbase.c
7275
ds = "Link Status(ACTIVE) Change";
drivers/message/fusion/mptbase.c
7279
ds = "Loop State(LIP) Change";
drivers/message/fusion/mptbase.c
7281
ds = "Loop State(LPE) Change";
drivers/message/fusion/mptbase.c
7283
ds = "Loop State(LPB) Change";
drivers/message/fusion/mptbase.c
7286
ds = "Logout";
drivers/message/fusion/mptbase.c
7290
ds = "Events ON";
drivers/message/fusion/mptbase.c
7292
ds = "Events OFF";
drivers/message/fusion/mptbase.c
7299
ds = "Integrated Raid: Volume Created";
drivers/message/fusion/mptbase.c
7302
ds = "Integrated Raid: Volume Deleted";
drivers/message/fusion/mptbase.c
7305
ds = "Integrated Raid: Volume Settings Changed";
drivers/message/fusion/mptbase.c
7308
ds = "Integrated Raid: Volume Status Changed";
drivers/message/fusion/mptbase.c
7311
ds = "Integrated Raid: Volume Physdisk Changed";
drivers/message/fusion/mptbase.c
7314
ds = "Integrated Raid: Physdisk Created";
drivers/message/fusion/mptbase.c
7317
ds = "Integrated Raid: Physdisk Deleted";
drivers/message/fusion/mptbase.c
7320
ds = "Integrated Raid: Physdisk Settings Changed";
drivers/message/fusion/mptbase.c
7323
ds = "Integrated Raid: Physdisk Status Changed";
drivers/message/fusion/mptbase.c
7326
ds = "Integrated Raid: Domain Validation Needed";
drivers/message/fusion/mptbase.c
7329
ds = "Integrated Raid; Smart Data";
drivers/message/fusion/mptbase.c
7332
ds = "Integrated Raid: Replace Action Started";
drivers/message/fusion/mptbase.c
7335
ds = "Integrated Raid";
drivers/message/fusion/mptbase.c
7341
ds = "SCSI Device Status Change";
drivers/message/fusion/mptbase.c
7408
ds = "Bus Timer Expired";
drivers/message/fusion/mptbase.c
7422
ds = "SAS SES Event";
drivers/message/fusion/mptbase.c
7425
ds = "Persistent Table Full";
drivers/message/fusion/mptbase.c
7477
ds = "SAS Discovery Error";
drivers/message/fusion/mptbase.c
7549
ds = "IR2";
drivers/message/fusion/mptbase.c
7557
ds = "SAS Discovery: Start";
drivers/message/fusion/mptbase.c
7559
ds = "SAS Discovery: Stop";
drivers/message/fusion/mptbase.c
7563
ds = "SAS Log Entry Added";
drivers/message/fusion/mptbase.c
7585
ds = "SAS Initiator Status Change: Added";
drivers/message/fusion/mptbase.c
7588
ds = "SAS Initiator Status Change: Deleted";
drivers/message/fusion/mptbase.c
7591
ds = "SAS Initiator Status Change";
drivers/message/fusion/mptbase.c
7647
ds = "Expander Status Change: Added";
drivers/message/fusion/mptbase.c
7650
ds = "Expander Status Change: Deleted";
drivers/message/fusion/mptbase.c
7653
ds = "Expander Status Change";
drivers/message/fusion/mptbase.c
7663
ds = "Unknown";
drivers/message/fusion/mptbase.c
7666
if (ds)
drivers/message/fusion/mptbase.c
7667
strscpy(evStr, ds, EVENT_DESCR_STR_SZ);
drivers/message/fusion/mptsas.c
1448
char *ds = NULL;
drivers/message/fusion/mptsas.c
1477
ds = "ssp";
drivers/message/fusion/mptsas.c
1480
ds = "stp";
drivers/message/fusion/mptsas.c
1483
ds = "sata";
drivers/message/fusion/mptsas.c
1486
" phy %d, sas_addr 0x%llx\n", ioc->name, ds,
drivers/message/fusion/mptsas.c
1526
char *ds = NULL;
drivers/message/fusion/mptsas.c
1555
ds = "initiator";
drivers/message/fusion/mptsas.c
1558
ds = "ssp";
drivers/message/fusion/mptsas.c
1561
ds = "stp";
drivers/message/fusion/mptsas.c
1564
ds = "sata";
drivers/message/fusion/mptsas.c
1568
"sas_addr 0x%llx\n", ioc->name, ds, phy_info->attached.channel,
drivers/mtd/nand/raw/diskonchip.c
139
uint16_t ds[4], s[5], tmp, errval[8], syn[4];
drivers/mtd/nand/raw/diskonchip.c
144
ds[0] = ((ecc[4] & 0xff) >> 0) | ((ecc[5] & 0x03) << 8);
drivers/mtd/nand/raw/diskonchip.c
145
ds[1] = ((ecc[5] & 0xfc) >> 2) | ((ecc[2] & 0x0f) << 6);
drivers/mtd/nand/raw/diskonchip.c
146
ds[2] = ((ecc[2] & 0xf0) >> 4) | ((ecc[3] & 0x3f) << 4);
drivers/mtd/nand/raw/diskonchip.c
147
ds[3] = ((ecc[3] & 0xc0) >> 6) | ((ecc[0] & 0xff) << 2);
drivers/mtd/nand/raw/diskonchip.c
152
s[i] = ds[0];
drivers/mtd/nand/raw/diskonchip.c
159
if (ds[j] == 0)
drivers/mtd/nand/raw/diskonchip.c
161
tmp = cd->index_of[ds[j]];
drivers/mtd/nand/raw/marvell_nand.c
271
#define MARVELL_LAYOUT(ws, dc, ds, nc, fcc, db, sb, eb, ldb, lsb, leb) \
drivers/mtd/nand/raw/marvell_nand.c
275
.strength = ds, \
drivers/net/can/usb/gs_usb.c
1115
struct gs_device_state ds;
drivers/net/can/usb/gs_usb.c
1121
&ds, sizeof(ds),
drivers/net/can/usb/gs_usb.c
1127
if (le32_to_cpu(ds.state) >= CAN_STATE_MAX)
drivers/net/can/usb/gs_usb.c
1130
*state = le32_to_cpu(ds.state);
drivers/net/can/usb/gs_usb.c
1131
bec->txerr = le32_to_cpu(ds.txerr);
drivers/net/can/usb/gs_usb.c
1132
bec->rxerr = le32_to_cpu(ds.rxerr);
drivers/net/dsa/b53/b53_common.c
1043
static int b53_phy_read16(struct dsa_switch *ds, int addr, int reg)
drivers/net/dsa/b53/b53_common.c
1045
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
1058
static int b53_phy_write16(struct dsa_switch *ds, int addr, int reg, u16 val)
drivers/net/dsa/b53/b53_common.c
1060
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
1084
b53_configure_vlan(priv->ds);
drivers/net/dsa/b53/b53_common.c
1128
static struct phy_device *b53_get_phy_device(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
1138
return mdiobus_get_phy(ds->user_mii_bus, port);
drivers/net/dsa/b53/b53_common.c
1141
void b53_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/b53/b53_common.c
1144
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1154
phydev = b53_get_phy_device(ds, port);
drivers/net/dsa/b53/b53_common.c
1163
void b53_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
drivers/net/dsa/b53/b53_common.c
1165
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1196
void b53_get_ethtool_phy_stats(struct dsa_switch *ds, int port, uint64_t *data)
drivers/net/dsa/b53/b53_common.c
1200
phydev = b53_get_phy_device(ds, port);
drivers/net/dsa/b53/b53_common.c
1208
int b53_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/b53/b53_common.c
1210
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1216
phydev = b53_get_phy_device(ds, port);
drivers/net/dsa/b53/b53_common.c
1247
int b53_setup_devlink_resources(struct dsa_switch *ds)
drivers/net/dsa/b53/b53_common.c
1250
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1257
err = dsa_devlink_resource_register(ds, "VLAN", dev->num_vlans,
drivers/net/dsa/b53/b53_common.c
1264
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/b53/b53_common.c
1270
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/b53/b53_common.c
1275
static int b53_setup(struct dsa_switch *ds)
drivers/net/dsa/b53/b53_common.c
1277
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1286
ds->untag_bridge_pvid = dev->tag_protocol == DSA_TAG_PROTO_NONE;
drivers/net/dsa/b53/b53_common.c
1291
ds->untag_vlan_aware_bridge_pvid = true;
drivers/net/dsa/b53/b53_common.c
1295
ds->ageing_time_min = 1 * 500;
drivers/net/dsa/b53/b53_common.c
1296
ds->ageing_time_max = AGE_TIME_MAX * 500;
drivers/net/dsa/b53/b53_common.c
1299
ds->ageing_time_min = 1 * 1000;
drivers/net/dsa/b53/b53_common.c
1300
ds->ageing_time_max = AGE_TIME_MAX * 1000;
drivers/net/dsa/b53/b53_common.c
1305
dev_err(ds->dev, "failed to reset switch\n");
drivers/net/dsa/b53/b53_common.c
1314
if (!b53_vlan_port_needs_forced_tagged(ds, port))
drivers/net/dsa/b53/b53_common.c
1322
dev_err(ds->dev, "failed to apply configuration\n");
drivers/net/dsa/b53/b53_common.c
1330
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/b53/b53_common.c
1333
b53_disable_port(ds, port);
drivers/net/dsa/b53/b53_common.c
1336
return b53_setup_devlink_resources(ds);
drivers/net/dsa/b53/b53_common.c
1339
static void b53_teardown(struct dsa_switch *ds)
drivers/net/dsa/b53/b53_common.c
1341
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/b53/b53_common.c
1436
static void b53_adjust_63xx_rgmii(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1439
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1452
dev_dbg(ds->dev, "Configured port %d for %s\n", port,
drivers/net/dsa/b53/b53_common.c
1456
static void b53_adjust_531x5_rgmii(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1459
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1497
dev_info(ds->dev, "Configured port %d for %s\n", port,
drivers/net/dsa/b53/b53_common.c
1501
static void b53_adjust_5325_mii(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
1503
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1517
dev_err(ds->dev,
drivers/net/dsa/b53/b53_common.c
1524
void b53_port_event(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
1526
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1532
dsa_port_phylink_mac_change(ds, port, link);
drivers/net/dsa/b53/b53_common.c
1536
static void b53_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1539
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1583
struct b53_device *dev = dp->ds->priv;
drivers/net/dsa/b53/b53_common.c
1597
struct dsa_switch *ds = dp->ds;
drivers/net/dsa/b53/b53_common.c
1598
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1602
b53_adjust_63xx_rgmii(ds, port, interface);
drivers/net/dsa/b53/b53_common.c
1606
b53_adjust_531x5_rgmii(ds, port, interface);
drivers/net/dsa/b53/b53_common.c
1610
b53_adjust_5325_mii(ds, port);
drivers/net/dsa/b53/b53_common.c
1619
struct b53_device *dev = dp->ds->priv;
drivers/net/dsa/b53/b53_common.c
1646
struct dsa_switch *ds = dp->ds;
drivers/net/dsa/b53/b53_common.c
1647
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1653
p->eee_enabled = b53_eee_init(ds, port, phydev);
drivers/net/dsa/b53/b53_common.c
1666
if (is5301x(dev) && dsa_is_cpu_port(ds, port))
drivers/net/dsa/b53/b53_common.c
1680
int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
drivers/net/dsa/b53/b53_common.c
1683
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1694
static int b53_vlan_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1697
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1715
int b53_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1719
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1726
err = b53_vlan_prepare(ds, port, vlan);
drivers/net/dsa/b53/b53_common.c
1744
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/b53/b53_common.c
1748
if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
drivers/net/dsa/b53/b53_common.c
1759
if (!dsa_is_cpu_port(ds, port) && new_pvid != old_pvid) {
drivers/net/dsa/b53/b53_common.c
1769
int b53_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
1772
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
1790
if (untagged && !b53_vlan_port_needs_forced_tagged(ds, port))
drivers/net/dsa/b53/b53_common.c
2028
int b53_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2032
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
2043
int b53_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2047
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
2181
int b53_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2185
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
2225
int b53_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2229
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
2246
int b53_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2250
struct b53_device *priv = ds->priv;
drivers/net/dsa/b53/b53_common.c
2257
dev_err(ds->dev, "failed to delete MDB entry\n");
drivers/net/dsa/b53/b53_common.c
2263
int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
drivers/net/dsa/b53/b53_common.c
2266
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2268
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
drivers/net/dsa/b53/b53_common.c
2303
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/b53/b53_common.c
2330
void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
drivers/net/dsa/b53/b53_common.c
2332
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2334
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
drivers/net/dsa/b53/b53_common.c
2342
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/b53/b53_common.c
2381
void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/b53/b53_common.c
2383
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2404
dev_err(ds->dev, "invalid STP state: %d\n", state);
drivers/net/dsa/b53/b53_common.c
2415
void b53_br_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
2417
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2420
dev_err(ds->dev, "fast ageing failed\n");
drivers/net/dsa/b53/b53_common.c
2424
int b53_br_flags_pre(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2428
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2441
int b53_br_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2446
b53_port_set_ucast_flood(ds->priv, port,
drivers/net/dsa/b53/b53_common.c
2449
b53_port_set_mcast_flood(ds->priv, port,
drivers/net/dsa/b53/b53_common.c
2452
b53_port_set_learning(ds->priv, port,
drivers/net/dsa/b53/b53_common.c
2455
b53_port_set_isolated(ds->priv, port,
drivers/net/dsa/b53/b53_common.c
2462
static bool b53_possible_cpu_port(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
2477
static bool b53_can_enable_brcm_tags(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2480
bool ret = b53_possible_cpu_port(ds, port);
drivers/net/dsa/b53/b53_common.c
2483
dev_warn(ds->dev, "Port %d is not Broadcom tag capable\n",
drivers/net/dsa/b53/b53_common.c
2491
dev_warn(ds->dev,
drivers/net/dsa/b53/b53_common.c
2503
enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2506
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2508
if (!b53_can_enable_brcm_tags(ds, port, mprot)) {
drivers/net/dsa/b53/b53_common.c
2536
int b53_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2540
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2562
void b53_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_common.c
2565
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2603
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
drivers/net/dsa/b53/b53_common.c
2607
if (!b53_support_eee(ds, port))
drivers/net/dsa/b53/b53_common.c
2614
b53_eee_enable_set(ds, port, true);
drivers/net/dsa/b53/b53_common.c
2620
bool b53_support_eee(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
2622
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2628
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
drivers/net/dsa/b53/b53_common.c
2630
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2634
b53_eee_enable_set(ds, port, e->eee_enabled);
drivers/net/dsa/b53/b53_common.c
2640
static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu)
drivers/net/dsa/b53/b53_common.c
2642
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2649
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/b53/b53_common.c
2658
static int b53_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
2660
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
2668
int b53_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/b53/b53_common.c
2670
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
288
dev_dbg(dev->ds->dev, "VID: %d, members: 0x%04x, untag: 0x%04x\n",
drivers/net/dsa/b53/b53_common.c
3152
dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS);
drivers/net/dsa/b53/b53_common.c
3157
if (!(dev->ds->phys_mii_mask & BIT(i)) &&
drivers/net/dsa/b53/b53_common.c
3158
!b53_possible_cpu_port(dev->ds, i))
drivers/net/dsa/b53/b53_common.c
3159
dev->ds->phys_mii_mask |= BIT(i);
drivers/net/dsa/b53/b53_common.c
3190
struct dsa_switch *ds;
drivers/net/dsa/b53/b53_common.c
3193
ds = devm_kzalloc(base, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/b53/b53_common.c
3194
if (!ds)
drivers/net/dsa/b53/b53_common.c
3197
ds->dev = base;
drivers/net/dsa/b53/b53_common.c
3203
ds->priv = dev;
drivers/net/dsa/b53/b53_common.c
3206
dev->ds = ds;
drivers/net/dsa/b53/b53_common.c
3209
ds->ops = &b53_switch_ops;
drivers/net/dsa/b53/b53_common.c
3210
ds->phylink_mac_ops = &b53_phylink_mac_ops;
drivers/net/dsa/b53/b53_common.c
3218
ds->vlan_filtering_is_global = true;
drivers/net/dsa/b53/b53_common.c
3257
val = b53_phy_read16(dev->ds, 0, MII_PHYSID1);
drivers/net/dsa/b53/b53_common.c
3259
val = b53_phy_read16(dev->ds, 0, MII_PHYSID2);
drivers/net/dsa/b53/b53_common.c
3330
return dsa_register_switch(dev->ds);
drivers/net/dsa/b53/b53_common.c
540
void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port)
drivers/net/dsa/b53/b53_common.c
542
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
654
static void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
drivers/net/dsa/b53/b53_common.c
656
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
667
int b53_setup_port(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
669
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
680
if (dsa_is_user_port(ds, port))
drivers/net/dsa/b53/b53_common.c
689
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/b53/b53_common.c
700
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
drivers/net/dsa/b53/b53_common.c
702
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
707
if (!dsa_is_user_port(ds, port))
drivers/net/dsa/b53/b53_common.c
710
cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
drivers/net/dsa/b53/b53_common.c
733
b53_imp_vlan_setup(ds, cpu_port);
drivers/net/dsa/b53/b53_common.c
737
b53_eee_enable_set(ds, port, true);
drivers/net/dsa/b53/b53_common.c
743
void b53_disable_port(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
745
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
761
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
763
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
852
b53_brcm_hdr_setup(dev->ds, port);
drivers/net/dsa/b53/b53_common.c
878
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
880
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
882
return dev->tag_protocol == DSA_TAG_PROTO_NONE && dsa_is_cpu_port(ds, port);
drivers/net/dsa/b53/b53_common.c
885
static bool b53_vlan_port_may_join_untagged(struct dsa_switch *ds, int port)
drivers/net/dsa/b53/b53_common.c
887
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
893
dp = dsa_to_port(ds, port);
drivers/net/dsa/b53/b53_common.c
901
int b53_configure_vlan(struct dsa_switch *ds)
drivers/net/dsa/b53/b53_common.c
903
struct b53_device *dev = ds->priv;
drivers/net/dsa/b53/b53_common.c
929
if (!b53_vlan_port_may_join_untagged(ds, i))
drivers/net/dsa/b53/b53_common.c
933
if (!b53_vlan_port_needs_forced_tagged(ds, i))
drivers/net/dsa/b53/b53_common.c
955
if (!dsa_is_cpu_port(ds, i))
drivers/net/dsa/b53/b53_priv.h
133
struct dsa_switch *ds;
drivers/net/dsa/b53/b53_priv.h
289
dsa_unregister_switch(dev->ds);
drivers/net/dsa/b53/b53_priv.h
294
dsa_switch_shutdown(dev->ds);
drivers/net/dsa/b53/b53_priv.h
491
void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port);
drivers/net/dsa/b53/b53_priv.h
492
int b53_configure_vlan(struct dsa_switch *ds);
drivers/net/dsa/b53/b53_priv.h
493
void b53_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/b53/b53_priv.h
495
void b53_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data);
drivers/net/dsa/b53/b53_priv.h
496
int b53_get_sset_count(struct dsa_switch *ds, int port, int sset);
drivers/net/dsa/b53/b53_priv.h
497
void b53_get_ethtool_phy_stats(struct dsa_switch *ds, int port, uint64_t *data);
drivers/net/dsa/b53/b53_priv.h
498
int b53_set_ageing_time(struct dsa_switch *ds, unsigned int msecs);
drivers/net/dsa/b53/b53_priv.h
499
int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
drivers/net/dsa/b53/b53_priv.h
501
void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge);
drivers/net/dsa/b53/b53_priv.h
502
void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state);
drivers/net/dsa/b53/b53_priv.h
503
void b53_br_fast_age(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
504
int b53_br_flags_pre(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
507
int b53_br_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
510
int b53_setup_devlink_resources(struct dsa_switch *ds);
drivers/net/dsa/b53/b53_priv.h
511
void b53_port_event(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
512
int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
drivers/net/dsa/b53/b53_priv.h
514
int b53_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
517
int b53_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
519
int b53_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
522
int b53_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
525
int b53_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
527
int b53_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
530
int b53_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
533
int b53_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
536
enum dsa_tag_protocol b53_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
538
void b53_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/b53/b53_priv.h
540
int b53_setup_port(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
541
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
drivers/net/dsa/b53/b53_priv.h
542
void b53_disable_port(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
543
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
544
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
drivers/net/dsa/b53/b53_priv.h
545
bool b53_support_eee(struct dsa_switch *ds, int port);
drivers/net/dsa/b53/b53_priv.h
546
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
drivers/net/dsa/b53/b53_srab.c
377
b53_port_event(dev->ds, port->num);
drivers/net/dsa/bcm_sf2.c
1004
static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
1007
struct net_device *p = dsa_port_to_conduit(dsa_to_port(ds, port));
drivers/net/dsa/bcm_sf2.c
1008
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1028
static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
1031
struct net_device *p = dsa_port_to_conduit(dsa_to_port(ds, port));
drivers/net/dsa/bcm_sf2.c
1032
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1033
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
drivers/net/dsa/bcm_sf2.c
1058
static int bcm_sf2_sw_setup(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
1060
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1066
if (dsa_is_user_port(ds, port))
drivers/net/dsa/bcm_sf2.c
1067
bcm_sf2_port_setup(ds, port, NULL);
drivers/net/dsa/bcm_sf2.c
1068
else if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/bcm_sf2.c
1069
bcm_sf2_imp_setup(ds, port);
drivers/net/dsa/bcm_sf2.c
1071
bcm_sf2_port_disable(ds, port);
drivers/net/dsa/bcm_sf2.c
1074
b53_configure_vlan(ds);
drivers/net/dsa/bcm_sf2.c
1075
bcm_sf2_enable_acb(ds);
drivers/net/dsa/bcm_sf2.c
1077
return b53_setup_devlink_resources(ds);
drivers/net/dsa/bcm_sf2.c
1080
static void bcm_sf2_sw_teardown(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
1082
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/bcm_sf2.c
116
static unsigned int bcm_sf2_num_active_ports(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
118
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1184
static void bcm_sf2_sw_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
1187
int cnt = b53_get_sset_count(ds, port, stringset);
drivers/net/dsa/bcm_sf2.c
1189
b53_get_strings(ds, port, stringset, data);
drivers/net/dsa/bcm_sf2.c
1191
bcm_sf2_cfp_get_strings(ds, port, stringset, &data);
drivers/net/dsa/bcm_sf2.c
1194
static void bcm_sf2_sw_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
1197
int cnt = b53_get_sset_count(ds, port, ETH_SS_STATS);
drivers/net/dsa/bcm_sf2.c
1199
b53_get_ethtool_stats(ds, port, data);
drivers/net/dsa/bcm_sf2.c
1200
bcm_sf2_cfp_get_ethtool_stats(ds, port, data + cnt);
drivers/net/dsa/bcm_sf2.c
1203
static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
1206
int cnt = b53_get_sset_count(ds, port, sset);
drivers/net/dsa/bcm_sf2.c
121
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/bcm_sf2.c
1211
cnt += bcm_sf2_cfp_get_sset_count(ds, port, sset);
drivers/net/dsa/bcm_sf2.c
122
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/bcm_sf2.c
131
static void bcm_sf2_recalc_clock(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
133
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1376
struct dsa_switch *ds;
drivers/net/dsa/bcm_sf2.c
1425
ds = dev->ds;
drivers/net/dsa/bcm_sf2.c
1426
ds->ops = &bcm_sf2_ops;
drivers/net/dsa/bcm_sf2.c
1427
ds->phylink_mac_ops = &bcm_sf2_phylink_mac_ops;
drivers/net/dsa/bcm_sf2.c
1430
ds->num_tx_queues = SF2_NUM_EGRESS_QUEUES;
drivers/net/dsa/bcm_sf2.c
144
ports_active = bcm_sf2_num_active_ports(ds);
drivers/net/dsa/bcm_sf2.c
1491
bcm_sf2_gphy_enable_set(priv->dev->ds, true);
drivers/net/dsa/bcm_sf2.c
1493
ret = bcm_sf2_mdio_register(ds);
drivers/net/dsa/bcm_sf2.c
1499
bcm_sf2_gphy_enable_set(priv->dev->ds, false);
drivers/net/dsa/bcm_sf2.c
1511
"switch_0", ds);
drivers/net/dsa/bcm_sf2.c
1518
"switch_1", ds);
drivers/net/dsa/bcm_sf2.c
158
static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/bcm_sf2.c
1580
dsa_unregister_switch(priv->dev->ds);
drivers/net/dsa/bcm_sf2.c
1581
bcm_sf2_cfp_exit(priv->dev->ds);
drivers/net/dsa/bcm_sf2.c
160
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
1603
bcm_sf2_gphy_enable_set(priv->dev->ds, true);
drivers/net/dsa/bcm_sf2.c
1605
dsa_switch_shutdown(priv->dev->ds);
drivers/net/dsa/bcm_sf2.c
1615
return dsa_switch_suspend(priv->dev->ds);
drivers/net/dsa/bcm_sf2.c
1622
return dsa_switch_resume(priv->dev->ds);
drivers/net/dsa/bcm_sf2.c
185
b53_brcm_hdr_setup(ds, port);
drivers/net/dsa/bcm_sf2.c
202
static void bcm_sf2_gphy_enable_set(struct dsa_switch *ds, bool enable)
drivers/net/dsa/bcm_sf2.c
204
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
280
static int bcm_sf2_port_setup(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
283
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
287
if (!dsa_is_user_port(ds, port))
drivers/net/dsa/bcm_sf2.c
292
bcm_sf2_recalc_clock(ds);
drivers/net/dsa/bcm_sf2.c
301
b53_brcm_hdr_setup(ds, port);
drivers/net/dsa/bcm_sf2.c
313
bcm_sf2_gphy_enable_set(ds, true);
drivers/net/dsa/bcm_sf2.c
346
return b53_enable_port(ds, port, phy);
drivers/net/dsa/bcm_sf2.c
349
static void bcm_sf2_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/bcm_sf2.c
351
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
366
bcm_sf2_gphy_enable_set(ds, false);
drivers/net/dsa/bcm_sf2.c
368
b53_disable_port(ds, port);
drivers/net/dsa/bcm_sf2.c
377
bcm_sf2_recalc_clock(ds);
drivers/net/dsa/bcm_sf2.c
442
struct dsa_switch *ds = dev_id;
drivers/net/dsa/bcm_sf2.c
443
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
454
struct dsa_switch *ds = dev_id;
drivers/net/dsa/bcm_sf2.c
455
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
463
dsa_port_phylink_mac_change(ds, 7, true);
drivers/net/dsa/bcm_sf2.c
467
dsa_port_phylink_mac_change(ds, 7, false);
drivers/net/dsa/bcm_sf2.c
510
struct device *dev = priv->dev->ds->dev;
drivers/net/dsa/bcm_sf2.c
557
struct device *dev = priv->dev->ds->dev;
drivers/net/dsa/bcm_sf2.c
607
static int bcm_sf2_mdio_register(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
609
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
652
ds->phys_mii_mask = priv->indir_phy_mask;
drivers/net/dsa/bcm_sf2.c
653
ds->user_mii_bus = priv->user_mii_bus;
drivers/net/dsa/bcm_sf2.c
654
priv->user_mii_bus->parent = ds->dev->parent;
drivers/net/dsa/bcm_sf2.c
708
static u32 bcm_sf2_sw_get_phy_flags(struct dsa_switch *ds, int port)
drivers/net/dsa/bcm_sf2.c
710
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
724
static void bcm_sf2_sw_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
728
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
755
priv = bcm_sf2_to_priv(dp->ds);
drivers/net/dsa/bcm_sf2.c
794
static void bcm_sf2_sw_mac_link_set(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
797
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
826
priv = bcm_sf2_to_priv(dp->ds);
drivers/net/dsa/bcm_sf2.c
835
bcm_sf2_sw_mac_link_set(dp->ds, port, interface, false);
drivers/net/dsa/bcm_sf2.c
852
bcm_sf2_sw_mac_link_set(dp->ds, port, interface, true);
drivers/net/dsa/bcm_sf2.c
854
priv = bcm_sf2_to_priv(dp->ds);
drivers/net/dsa/bcm_sf2.c
902
p->eee_enabled = b53_eee_init(dp->ds, port, phydev);
drivers/net/dsa/bcm_sf2.c
906
static void bcm_sf2_sw_fixed_state(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.c
909
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
929
netif_carrier_off(dsa_to_port(ds, port)->user);
drivers/net/dsa/bcm_sf2.c
936
static void bcm_sf2_enable_acb(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
938
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
950
static int bcm_sf2_sw_suspend(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
952
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
961
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/bcm_sf2.c
962
if (dsa_is_user_port(ds, port) || dsa_is_cpu_port(ds, port))
drivers/net/dsa/bcm_sf2.c
963
bcm_sf2_port_disable(ds, port);
drivers/net/dsa/bcm_sf2.c
972
static int bcm_sf2_sw_resume(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.c
974
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2.c
990
ret = bcm_sf2_cfp_resume(ds);
drivers/net/dsa/bcm_sf2.c
997
bcm_sf2_gphy_enable_set(ds, true);
drivers/net/dsa/bcm_sf2.c
999
ds->ops->setup(ds);
drivers/net/dsa/bcm_sf2.h
121
static inline struct bcm_sf2_priv *bcm_sf2_to_priv(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2.h
123
struct b53_device *dev = ds->priv;
drivers/net/dsa/bcm_sf2.h
224
int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.h
226
int bcm_sf2_set_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.h
229
void bcm_sf2_cfp_exit(struct dsa_switch *ds);
drivers/net/dsa/bcm_sf2.h
230
int bcm_sf2_cfp_resume(struct dsa_switch *ds);
drivers/net/dsa/bcm_sf2.h
231
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/bcm_sf2.h
233
void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2.h
235
int bcm_sf2_cfp_get_sset_count(struct dsa_switch *ds, int port, int sset);
drivers/net/dsa/bcm_sf2_cfp.c
1102
int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2_cfp.c
1105
struct net_device *p = dsa_port_to_conduit(dsa_to_port(ds, port));
drivers/net/dsa/bcm_sf2_cfp.c
1106
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1145
int bcm_sf2_set_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2_cfp.c
1148
struct net_device *p = dsa_port_to_conduit(dsa_to_port(ds, port));
drivers/net/dsa/bcm_sf2_cfp.c
1149
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1156
ret = bcm_sf2_cfp_rule_set(ds, port, &nfc->fs);
drivers/net/dsa/bcm_sf2_cfp.c
1212
void bcm_sf2_cfp_exit(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2_cfp.c
1214
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1224
int bcm_sf2_cfp_resume(struct dsa_switch *ds)
drivers/net/dsa/bcm_sf2_cfp.c
1226
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1246
dev_err(ds->dev, "failed to remove rule\n");
drivers/net/dsa/bcm_sf2_cfp.c
1250
ret = bcm_sf2_cfp_rule_insert(ds, rule->port, &rule->fs);
drivers/net/dsa/bcm_sf2_cfp.c
1252
dev_err(ds->dev, "failed to restore rule\n");
drivers/net/dsa/bcm_sf2_cfp.c
1282
void bcm_sf2_cfp_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/bcm_sf2_cfp.c
1285
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1297
void bcm_sf2_cfp_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2_cfp.c
1300
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
1329
int bcm_sf2_cfp_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/bcm_sf2_cfp.c
1331
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
846
static int bcm_sf2_cfp_rule_insert(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2_cfp.c
849
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
850
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
drivers/net/dsa/bcm_sf2_cfp.c
870
!(dsa_is_user_port(ds, port_num) ||
drivers/net/dsa/bcm_sf2_cfp.c
871
dsa_is_cpu_port(ds, port_num)) ||
drivers/net/dsa/bcm_sf2_cfp.c
894
ret = ds->ops->port_vlan_add(ds, port_num, &vlan, NULL);
drivers/net/dsa/bcm_sf2_cfp.c
926
static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
drivers/net/dsa/bcm_sf2_cfp.c
929
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
drivers/net/dsa/bcm_sf2_cfp.c
942
!(ds->ops->port_vlan_add || ds->ops->port_vlan_del))
drivers/net/dsa/bcm_sf2_cfp.c
957
ret = bcm_sf2_cfp_rule_insert(ds, port, fs);
drivers/net/dsa/dsa_loop.c
100
static int dsa_loop_setup(struct dsa_switch *ds)
drivers/net/dsa/dsa_loop.c
102
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
105
for (i = 0; i < ds->num_ports; i++)
drivers/net/dsa/dsa_loop.c
109
dev_dbg(ds->dev, "%s\n", __func__);
drivers/net/dsa/dsa_loop.c
111
return dsa_loop_setup_devlink_resources(ds);
drivers/net/dsa/dsa_loop.c
114
static void dsa_loop_teardown(struct dsa_switch *ds)
drivers/net/dsa/dsa_loop.c
116
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/dsa_loop.c
119
static int dsa_loop_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/dsa_loop.c
127
static void dsa_loop_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
130
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
140
static void dsa_loop_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
143
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
150
static int dsa_loop_phy_read(struct dsa_switch *ds, int port, int regnum)
drivers/net/dsa/dsa_loop.c
152
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
165
static int dsa_loop_phy_write(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
168
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
181
static int dsa_loop_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
186
dev_dbg(ds->dev, "%s: port: %d, bridge: %s\n",
drivers/net/dsa/dsa_loop.c
192
static void dsa_loop_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
195
dev_dbg(ds->dev, "%s: port: %d, bridge: %s\n",
drivers/net/dsa/dsa_loop.c
199
static void dsa_loop_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
202
dev_dbg(ds->dev, "%s: port: %d, state: %d\n",
drivers/net/dsa/dsa_loop.c
206
static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
210
dev_dbg(ds->dev, "%s: port: %d, vlan_filtering: %d\n",
drivers/net/dsa/dsa_loop.c
216
static int dsa_loop_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
222
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
240
dev_dbg(ds->dev, "%s: port: %d vlan: %d, %stagged, pvid: %d\n",
drivers/net/dsa/dsa_loop.c
249
static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
253
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
270
dev_dbg(ds->dev, "%s: port: %d vlan: %d, %stagged, pvid: %d\n",
drivers/net/dsa/dsa_loop.c
277
static int dsa_loop_port_change_mtu(struct dsa_switch *ds, int port,
drivers/net/dsa/dsa_loop.c
280
struct dsa_loop_priv *priv = ds->priv;
drivers/net/dsa/dsa_loop.c
287
static int dsa_loop_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/dsa_loop.c
325
struct dsa_switch *ds;
drivers/net/dsa/dsa_loop.c
331
ds = devm_kzalloc(&mdiodev->dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/dsa_loop.c
332
if (!ds)
drivers/net/dsa/dsa_loop.c
335
ds->dev = &mdiodev->dev;
drivers/net/dsa/dsa_loop.c
336
ds->num_ports = DSA_LOOP_NUM_PORTS;
drivers/net/dsa/dsa_loop.c
348
ds->dev = &mdiodev->dev;
drivers/net/dsa/dsa_loop.c
349
ds->ops = &dsa_loop_driver;
drivers/net/dsa/dsa_loop.c
350
ds->priv = ps;
drivers/net/dsa/dsa_loop.c
353
dev_set_drvdata(&mdiodev->dev, ds);
drivers/net/dsa/dsa_loop.c
355
ret = dsa_register_switch(ds);
drivers/net/dsa/dsa_loop.c
365
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/dsa_loop.c
368
if (!ds)
drivers/net/dsa/dsa_loop.c
371
ps = ds->priv;
drivers/net/dsa/dsa_loop.c
373
dsa_unregister_switch(ds);
drivers/net/dsa/dsa_loop.c
379
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/dsa_loop.c
381
if (!ds)
drivers/net/dsa/dsa_loop.c
384
dsa_switch_shutdown(ds);
drivers/net/dsa/dsa_loop.c
63
static int dsa_loop_setup_devlink_resources(struct dsa_switch *ds)
drivers/net/dsa/dsa_loop.c
66
struct dsa_loop_priv *ps = ds->priv;
drivers/net/dsa/dsa_loop.c
73
err = dsa_devlink_resource_register(ds, "VTU", ARRAY_SIZE(ps->vlans),
drivers/net/dsa/dsa_loop.c
80
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/dsa_loop.c
87
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/dsa_loop.c
91
static enum dsa_tag_protocol dsa_loop_get_protocol(struct dsa_switch *ds,
drivers/net/dsa/dsa_loop.c
95
dev_dbg(ds->dev, "%s: port: %d\n", __func__, port);
drivers/net/dsa/hirschmann/hellcreek.c
1169
static int hellcreek_devlink_info_get(struct dsa_switch *ds,
drivers/net/dsa/hirschmann/hellcreek.c
1173
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1210
static int hellcreek_setup_devlink_resources(struct dsa_switch *ds)
drivers/net/dsa/hirschmann/hellcreek.c
1214
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1226
err = dsa_devlink_resource_register(ds, "VLAN", VLAN_N_VID,
drivers/net/dsa/hirschmann/hellcreek.c
1233
err = dsa_devlink_resource_register(ds, "FDB", hellcreek->fdb_entries,
drivers/net/dsa/hirschmann/hellcreek.c
1240
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/hirschmann/hellcreek.c
1245
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/hirschmann/hellcreek.c
1253
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1264
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/hirschmann/hellcreek.c
1265
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1291
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/hirschmann/hellcreek.c
1293
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1335
static int hellcreek_setup_devlink_regions(struct dsa_switch *ds)
drivers/net/dsa/hirschmann/hellcreek.c
1337
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1347
region = dsa_devlink_region_create(ds, ops, 1, size);
drivers/net/dsa/hirschmann/hellcreek.c
1357
region = dsa_devlink_region_create(ds, ops, 1, size);
drivers/net/dsa/hirschmann/hellcreek.c
1373
static void hellcreek_teardown_devlink_regions(struct dsa_switch *ds)
drivers/net/dsa/hirschmann/hellcreek.c
1375
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1381
static int hellcreek_setup(struct dsa_switch *ds)
drivers/net/dsa/hirschmann/hellcreek.c
1383
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1411
for (i = 0; i < ds->num_ports; ++i) {
drivers/net/dsa/hirschmann/hellcreek.c
1412
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/hirschmann/hellcreek.c
1415
hellcreek_setup_vlan_membership(ds, i, true);
drivers/net/dsa/hirschmann/hellcreek.c
1424
ds->vlan_filtering_is_global = true;
drivers/net/dsa/hirschmann/hellcreek.c
1425
ds->needs_standalone_vlan_filtering = true;
drivers/net/dsa/hirschmann/hellcreek.c
1436
ret = hellcreek_setup_devlink_resources(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1443
ret = hellcreek_setup_devlink_regions(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1453
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1458
static void hellcreek_teardown(struct dsa_switch *ds)
drivers/net/dsa/hirschmann/hellcreek.c
1460
hellcreek_teardown_devlink_regions(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1461
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/hirschmann/hellcreek.c
1464
static void hellcreek_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
1467
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1490
hellcreek_port_prechangeupper(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
1493
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1517
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/hirschmann/hellcreek.c
1738
static int hellcreek_port_set_schedule(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
1741
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1798
static int hellcreek_port_del_schedule(struct dsa_switch *ds, int port)
drivers/net/dsa/hirschmann/hellcreek.c
1800
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1872
static int hellcreek_port_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
1875
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
1888
return hellcreek_port_set_schedule(ds, port, taprio);
drivers/net/dsa/hirschmann/hellcreek.c
1890
return hellcreek_port_del_schedule(ds, port);
drivers/net/dsa/hirschmann/hellcreek.c
2021
hellcreek->ds = devm_kzalloc(dev, sizeof(*hellcreek->ds), GFP_KERNEL);
drivers/net/dsa/hirschmann/hellcreek.c
2022
if (!hellcreek->ds)
drivers/net/dsa/hirschmann/hellcreek.c
2025
hellcreek->ds->dev = dev;
drivers/net/dsa/hirschmann/hellcreek.c
2026
hellcreek->ds->priv = hellcreek;
drivers/net/dsa/hirschmann/hellcreek.c
2027
hellcreek->ds->ops = &hellcreek_ds_ops;
drivers/net/dsa/hirschmann/hellcreek.c
2028
hellcreek->ds->num_ports = hellcreek->pdata->num_ports;
drivers/net/dsa/hirschmann/hellcreek.c
2029
hellcreek->ds->num_tx_queues = HELLCREEK_NUM_EGRESS_QUEUES;
drivers/net/dsa/hirschmann/hellcreek.c
2031
ret = dsa_register_switch(hellcreek->ds);
drivers/net/dsa/hirschmann/hellcreek.c
2056
dsa_unregister_switch(hellcreek->ds);
drivers/net/dsa/hirschmann/hellcreek.c
2070
dsa_unregister_switch(hellcreek->ds);
drivers/net/dsa/hirschmann/hellcreek.c
2080
dsa_switch_shutdown(hellcreek->ds);
drivers/net/dsa/hirschmann/hellcreek.c
240
static enum dsa_tag_protocol hellcreek_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/hirschmann/hellcreek.c
247
static int hellcreek_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
250
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
271
static void hellcreek_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/hirschmann/hellcreek.c
273
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
292
static void hellcreek_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
301
static int hellcreek_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/hirschmann/hellcreek.c
309
static void hellcreek_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
312
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
348
static int hellcreek_vlan_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
352
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
364
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/hirschmann/hellcreek.c
455
static int hellcreek_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
461
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
464
err = hellcreek_vlan_prepare(ds, port, vlan, extack);
drivers/net/dsa/hirschmann/hellcreek.c
477
static int hellcreek_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
480
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
489
static void hellcreek_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
492
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
584
static void hellcreek_setup_vlan_membership(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
588
int upstream = dsa_upstream_port(ds, port);
drivers/net/dsa/hirschmann/hellcreek.c
589
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
654
static int hellcreek_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
664
static int hellcreek_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
668
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
681
static int hellcreek_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
686
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
691
if (!ds->vlan_filtering)
drivers/net/dsa/hirschmann/hellcreek.c
695
hellcreek_setup_vlan_membership(ds, port, false);
drivers/net/dsa/hirschmann/hellcreek.c
700
static void hellcreek_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
703
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
711
hellcreek_setup_vlan_membership(ds, port, true);
drivers/net/dsa/hirschmann/hellcreek.c
835
static int hellcreek_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
840
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
881
static int hellcreek_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
886
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
922
static int hellcreek_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
925
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.c
969
static int hellcreek_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek.c
973
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek.h
280
struct dsa_switch *ds;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
112
int hellcreek_port_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
116
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
132
int hellcreek_port_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
135
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
18
int hellcreek_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
21
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
339
struct dsa_switch *ds = hellcreek->ds;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
342
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
345
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
359
void hellcreek_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
362
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
402
bool hellcreek_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
405
struct hellcreek *hellcreek = ds->priv;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
444
struct dsa_switch *ds = hellcreek->ds;
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
448
for (i = 0; i < ds->num_ports; ++i) {
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
449
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
40
int hellcreek_port_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
43
int hellcreek_port_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
46
bool hellcreek_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
48
void hellcreek_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
51
int hellcreek_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/ks8995.c
189
struct dsa_switch *ds;
drivers/net/dsa/ks8995.c
460
struct ks8995_switch *ks = dp->ds->priv;
drivers/net/dsa/ks8995.c
513
struct ks8995_switch *ks = dp->ds->priv;
drivers/net/dsa/ks8995.c
531
dsa_tag_protocol ks8995_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/ks8995.c
539
static int ks8995_setup(struct dsa_switch *ds)
drivers/net/dsa/ks8995.c
544
static int ks8995_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/ks8995.c
547
struct ks8995_switch *ks = ds->priv;
drivers/net/dsa/ks8995.c
554
static void ks8995_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/ks8995.c
556
struct ks8995_switch *ks = ds->priv;
drivers/net/dsa/ks8995.c
561
static int ks8995_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/ks8995.c
572
static int ks8995_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/ks8995.c
576
struct ks8995_switch *ks = ds->priv;
drivers/net/dsa/ks8995.c
602
static void ks8995_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/ks8995.c
604
struct ks8995_switch *ks = ds->priv;
drivers/net/dsa/ks8995.c
672
static int ks8995_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/ks8995.c
674
struct ks8995_switch *ks = ds->priv;
drivers/net/dsa/ks8995.c
727
static int ks8995_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/ks8995.c
814
ks->ds = devm_kzalloc(&spi->dev, sizeof(*ks->ds), GFP_KERNEL);
drivers/net/dsa/ks8995.c
815
if (!ks->ds)
drivers/net/dsa/ks8995.c
818
ks->ds->dev = &spi->dev;
drivers/net/dsa/ks8995.c
819
ks->ds->num_ports = KS8995_NUM_PORTS;
drivers/net/dsa/ks8995.c
820
ks->ds->ops = &ks8995_ds_ops;
drivers/net/dsa/ks8995.c
821
ks->ds->phylink_mac_ops = &ks8995_phylink_mac_ops;
drivers/net/dsa/ks8995.c
822
ks->ds->priv = ks;
drivers/net/dsa/ks8995.c
824
err = dsa_register_switch(ks->ds);
drivers/net/dsa/ks8995.c
836
dsa_unregister_switch(ks->ds);
drivers/net/dsa/lan9303-core.c
1036
static void lan9303_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1049
static void lan9303_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1052
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1071
static int lan9303_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/lan9303-core.c
1079
static int lan9303_phy_read(struct dsa_switch *ds, int port, int regnum)
drivers/net/dsa/lan9303-core.c
1081
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1092
static int lan9303_phy_write(struct dsa_switch *ds, int port, int regnum,
drivers/net/dsa/lan9303-core.c
1095
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1106
static int lan9303_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1109
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/lan9303-core.c
1110
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1120
static void lan9303_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/lan9303-core.c
1122
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/lan9303-core.c
1123
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1131
lan9303_phy_write(ds, port, MII_BMCR, BMCR_PDOWN);
drivers/net/dsa/lan9303-core.c
1134
static int lan9303_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1139
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1142
if (dsa_port_bridge_same(dsa_to_port(ds, 1), dsa_to_port(ds, 2))) {
drivers/net/dsa/lan9303-core.c
1150
static void lan9303_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1153
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1162
static void lan9303_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1166
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1202
static void lan9303_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/lan9303-core.c
1204
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1213
static int lan9303_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1217
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1224
static int lan9303_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1228
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1236
static int lan9303_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1239
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1250
static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1253
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1267
static int lan9303_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1271
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1274
err = lan9303_port_mdb_prepare(ds, port, mdb);
drivers/net/dsa/lan9303-core.c
1283
static int lan9303_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1287
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1298
static void lan9303_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lan9303-core.c
1301
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
1344
struct lan9303 *chip = dp->ds->priv;
drivers/net/dsa/lan9303-core.c
1345
struct dsa_switch *ds = dp->ds;
drivers/net/dsa/lan9303-core.c
1358
ctl = lan9303_phy_read(ds, port, MII_BMCR);
drivers/net/dsa/lan9303-core.c
1364
lan9303_phy_write(ds, port, MII_BMCR, ctl);
drivers/net/dsa/lan9303-core.c
1406
chip->ds = devm_kzalloc(chip->dev, sizeof(*chip->ds), GFP_KERNEL);
drivers/net/dsa/lan9303-core.c
1407
if (!chip->ds)
drivers/net/dsa/lan9303-core.c
1410
chip->ds->dev = chip->dev;
drivers/net/dsa/lan9303-core.c
1411
chip->ds->num_ports = LAN9303_NUM_PORTS;
drivers/net/dsa/lan9303-core.c
1412
chip->ds->priv = chip;
drivers/net/dsa/lan9303-core.c
1413
chip->ds->ops = &lan9303_switch_ops;
drivers/net/dsa/lan9303-core.c
1414
chip->ds->phylink_mac_ops = &lan9303_phylink_mac_ops;
drivers/net/dsa/lan9303-core.c
1415
chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1, 0);
drivers/net/dsa/lan9303-core.c
1417
return dsa_register_switch(chip->ds);
drivers/net/dsa/lan9303-core.c
1498
dsa_unregister_switch(chip->ds);
drivers/net/dsa/lan9303-core.c
1509
dsa_switch_shutdown(chip->ds);
drivers/net/dsa/lan9303-core.c
937
static enum dsa_tag_protocol lan9303_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/lan9303-core.c
944
static int lan9303_setup(struct dsa_switch *ds)
drivers/net/dsa/lan9303-core.c
946
struct lan9303 *chip = ds->priv;
drivers/net/dsa/lan9303-core.c
951
if (!dsa_is_cpu_port(ds, 0)) {
drivers/net/dsa/lantiq/lantiq_gswip.c
32
static void gswip_xrx200_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip.c
383
priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
drivers/net/dsa/lantiq/lantiq_gswip.c
384
if (!priv->ds)
drivers/net/dsa/lantiq/lantiq_gswip.c
441
dsa_unregister_switch(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip.c
454
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip.c
63
static void gswip_xrx300_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip.h
264
void (*phylink_get_caps)(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip.h
268
int (*port_setup)(struct dsa_switch *ds, int port);
drivers/net/dsa/lantiq/lantiq_gswip.h
290
struct dsa_switch *ds;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1027
static int gswip_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1031
struct net_device *bridge = dsa_port_bridge_dev_get(dsa_to_port(ds, port));
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1032
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1040
err = gswip_port_vlan_prepare(ds, port, vlan, extack);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1049
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1056
static int gswip_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1059
struct net_device *bridge = dsa_port_bridge_dev_get(dsa_to_port(ds, port));
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1060
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1070
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1076
static void gswip_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1078
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1114
static void gswip_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1116
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1146
static int gswip_port_fdb(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1150
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1192
static int gswip_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1199
return gswip_port_fdb(ds, port, db.bridge.dev, addr, vid, true);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1202
static int gswip_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1209
return gswip_port_fdb(ds, port, db.bridge.dev, addr, vid, false);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1212
static int gswip_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1215
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1260
static int gswip_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1266
static int gswip_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1268
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1273
if (dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1292
static void gswip_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1295
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1297
priv->hw_info->phylink_get_caps(ds, port, config);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1410
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1443
dev_err(dp->ds->dev,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1461
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1478
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1491
static void gswip_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1530
static void gswip_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1533
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1551
static int gswip_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1559
static int gswip_set_mac_eee(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1571
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1581
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1592
static bool gswip_support_eee(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1594
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1606
struct gswip_priv *priv = dp->ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1654
static int gswip_validate_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1656
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1660
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1662
return dev_err_probe(ds->dev, -EINVAL,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1669
return dev_err_probe(ds->dev, -EINVAL, "no CPU port defined\n");
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1672
return dev_err_probe(ds->dev, -EINVAL,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1684
priv->ds = devm_kzalloc(priv->dev, sizeof(*priv->ds), GFP_KERNEL);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1685
if (!priv->ds)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1688
priv->ds->dev = priv->dev;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1689
priv->ds->num_ports = priv->hw_info->max_ports;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1690
priv->ds->ops = &gswip_switch_ops;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1691
priv->ds->phylink_mac_ops = &gswip_phylink_mac_ops;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1692
priv->ds->priv = priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1704
err = dsa_register_switch(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1708
err = gswip_validate_cpu_port(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
1718
dsa_unregister_switch(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
367
vlan_mapping.val[1] = BIT(port) | dsa_cpu_ports(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
390
static int gswip_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
394
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
406
static int gswip_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
410
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
419
static int gswip_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
421
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
425
err = priv->hw_info->port_setup(ds, port);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
430
if (!dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
439
static int gswip_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
442
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
444
if (!dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
467
static void gswip_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
469
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
518
struct dsa_port *dp = dsa_to_port(priv->ds, port);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
565
static int gswip_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
569
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
643
static int gswip_setup(struct dsa_switch *ds)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
645
unsigned int cpu_ports = dsa_cpu_ports(ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
646
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
656
gswip_port_disable(ds, i);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
657
gswip_port_vlan_filtering(ds, i, false, NULL);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
708
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
737
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
742
static void gswip_teardown(struct dsa_switch *ds)
drivers/net/dsa/lantiq/lantiq_gswip_common.c
744
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
749
static enum dsa_tag_protocol gswip_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
753
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
823
unsigned int cpu_ports = dsa_cpu_ports(priv->ds);
drivers/net/dsa/lantiq/lantiq_gswip_common.c
933
if (!(vlan_mapping.val[1] & ~dsa_cpu_ports(priv->ds))) {
drivers/net/dsa/lantiq/lantiq_gswip_common.c
947
static int gswip_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
953
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
968
static void gswip_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
972
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
981
static int gswip_port_vlan_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/lantiq_gswip_common.c
985
struct net_device *bridge = dsa_port_bridge_dev_get(dsa_to_port(ds, port));
drivers/net/dsa/lantiq/lantiq_gswip_common.c
986
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/lantiq_gswip_common.c
992
if (!dsa_is_cpu_port(ds, port) && !bridge)
drivers/net/dsa/lantiq/mxl-gsw1xx.c
241
sgmii_port = dsa_to_port(priv->gswip.ds, GSW1XX_SGMII_PORT);
drivers/net/dsa/lantiq/mxl-gsw1xx.c
530
static void gsw1xx_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/mxl-gsw1xx.c
533
struct gswip_priv *priv = ds->priv;
drivers/net/dsa/lantiq/mxl-gsw1xx.c
566
static void gsw150_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/lantiq/mxl-gsw1xx.c
595
struct gswip_priv *gswip_priv = dp->ds->priv;
drivers/net/dsa/lantiq/mxl-gsw1xx.c
626
static int gsw1xx_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/lantiq/mxl-gsw1xx.c
628
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/lantiq/mxl-gsw1xx.c
636
gswip_priv = ds->priv;
drivers/net/dsa/lantiq/mxl-gsw1xx.c
797
dsa_unregister_switch(priv->ds);
drivers/net/dsa/lantiq/mxl-gsw1xx.c
811
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/microchip/ksz8.c
1660
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz8.c
1683
member = dsa_user_ports(ds);
drivers/net/dsa/microchip/ksz8.c
1685
member = BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/microchip/ksz8.c
1699
struct dsa_port *cpu_dp = dsa_to_port(dev->ds, dev->cpu_port);
drivers/net/dsa/microchip/ksz8.c
1712
void ksz8_config_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz8.c
1714
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz8.c
1733
ksz_port_stp_state_set(ds, i, BR_STATE_DISABLED);
drivers/net/dsa/microchip/ksz8.c
1892
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz8.c
1904
static int ksz8_handle_global_errata(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz8.c
1906
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz8.c
193
if (!dsa_is_cpu_port(dev->ds, port))
drivers/net/dsa/microchip/ksz8.c
1935
int ksz8_setup(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz8.c
1937
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz8.c
1941
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/microchip/ksz8.c
1946
ds->untag_bridge_pvid = true;
drivers/net/dsa/microchip/ksz8.c
1951
ds->vlan_filtering_is_global = true;
drivers/net/dsa/microchip/ksz8.c
1993
return ksz8_handle_global_errata(ds);
drivers/net/dsa/microchip/ksz8.c
272
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz8.c
275
dsa_switch_for_each_port(dp, ds) {
drivers/net/dsa/microchip/ksz8.h
15
int ksz8_setup(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz8.h
51
void ksz8_config_cpu_port(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz8863_smi.c
194
dsa_switch_shutdown(dev->ds);
drivers/net/dsa/microchip/ksz9477.c
1244
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz9477.c
1275
member = dsa_user_ports(ds);
drivers/net/dsa/microchip/ksz9477.c
1277
member = BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/microchip/ksz9477.c
1296
void ksz9477_config_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz9477.c
1298
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz9477.c
1303
if (dsa_is_cpu_port(ds, i) &&
drivers/net/dsa/microchip/ksz9477.c
1350
ksz_port_stp_state_set(ds, i, BR_STATE_DISABLED);
drivers/net/dsa/microchip/ksz9477.c
1353
if (dsa_is_unused_port(ds, i) && dev->info->internal_phy[i])
drivers/net/dsa/microchip/ksz9477.c
1461
int ksz9477_setup(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz9477.c
1463
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz9477.c
1467
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/microchip/ksz9477.c
1538
void ksz9477_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr)
drivers/net/dsa/microchip/ksz9477.c
1540
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz9477.c
1550
dsa_hsr_foreach_port(hsr_dp, ds, hsr)
drivers/net/dsa/microchip/ksz9477.c
1553
hsr_ports |= BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/microchip/ksz9477.c
1554
dsa_hsr_foreach_port(hsr_dp, ds, hsr)
drivers/net/dsa/microchip/ksz9477.c
1573
user = dsa_to_port(ds, port)->user;
drivers/net/dsa/microchip/ksz9477.c
1577
void ksz9477_hsr_leave(struct dsa_switch *ds, int port, struct net_device *hsr)
drivers/net/dsa/microchip/ksz9477.c
1579
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz9477.c
1585
ksz9477_cfg_port_member(dev, port, BIT(dsa_upstream_port(ds, port)));
drivers/net/dsa/microchip/ksz9477.c
50
if (!dsa_is_cpu_port(dev->ds, port))
drivers/net/dsa/microchip/ksz9477.h
14
int ksz9477_setup(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz9477.h
54
void ksz9477_config_cpu_port(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz9477.h
61
void ksz9477_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr);
drivers/net/dsa/microchip/ksz9477.h
62
void ksz9477_hsr_leave(struct dsa_switch *ds, int port, struct net_device *hsr);
drivers/net/dsa/microchip/ksz9477.h
66
int ksz9477_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz9477.h
68
int ksz9477_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz9477_tc_flower.c
215
int ksz9477_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz9477_tc_flower.c
220
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz9477_tc_flower.c
269
int ksz9477_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz9477_tc_flower.c
273
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2196
static void ksz_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
2199
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2224
if (ds->ops->support_eee && ds->ops->support_eee(ds, port)) {
drivers/net/dsa/microchip/ksz_common.c
2342
static void ksz_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
2345
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2355
static void ksz_get_pause_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
2358
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2368
static void ksz_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
2371
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2407
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz_common.c
2412
if (!dsa_is_user_port(ds, port))
drivers/net/dsa/microchip/ksz_common.c
2415
dp = dsa_to_port(ds, port);
drivers/net/dsa/microchip/ksz_common.c
2416
cpu_port = BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/microchip/ksz_common.c
2418
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/microchip/ksz_common.c
2419
const struct dsa_port *other_dp = dsa_to_port(ds, i);
drivers/net/dsa/microchip/ksz_common.c
2423
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/microchip/ksz_common.c
2445
for (j = 0; j < ds->num_ports; j++) {
drivers/net/dsa/microchip/ksz_common.c
2453
if (!dsa_is_user_port(ds, j))
drivers/net/dsa/microchip/ksz_common.c
2459
third_dp = dsa_to_port(ds, j);
drivers/net/dsa/microchip/ksz_common.c
2563
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz_common.c
2566
dsa_switch_for_each_user_port(dp, ds) {
drivers/net/dsa/microchip/ksz_common.c
2587
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz_common.c
2593
if (BIT(phy) & ds->phys_mii_mask) {
drivers/net/dsa/microchip/ksz_common.c
2606
ds->user_mii_bus->irq[phy] = irq;
drivers/net/dsa/microchip/ksz_common.c
2612
if (BIT(phy) & ds->phys_mii_mask)
drivers/net/dsa/microchip/ksz_common.c
2613
irq_dispose_mapping(ds->user_mii_bus->irq[phy]);
drivers/net/dsa/microchip/ksz_common.c
2627
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz_common.c
2631
if (BIT(phy) & ds->phys_mii_mask)
drivers/net/dsa/microchip/ksz_common.c
2632
irq_dispose_mapping(ds->user_mii_bus->irq[phy]);
drivers/net/dsa/microchip/ksz_common.c
2658
dsa_switch_for_each_user_port(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_common.c
2721
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/ksz_common.c
2747
bus = devm_mdiobus_alloc(ds->dev);
drivers/net/dsa/microchip/ksz_common.c
2774
ds->index);
drivers/net/dsa/microchip/ksz_common.c
2779
if (ds->dst->index != 0) {
drivers/net/dsa/microchip/ksz_common.c
2780
snprintf(bus->id, MII_BUS_ID_SIZE, "SMI-%d-%d", ds->dst->index, ds->index);
drivers/net/dsa/microchip/ksz_common.c
2782
snprintf(bus->id, MII_BUS_ID_SIZE, "SMI-%d", ds->index);
drivers/net/dsa/microchip/ksz_common.c
2790
ds->phys_mii_mask = bus->phy_mask;
drivers/net/dsa/microchip/ksz_common.c
2791
bus->parent = ds->dev;
drivers/net/dsa/microchip/ksz_common.c
2793
ds->user_mii_bus = bus;
drivers/net/dsa/microchip/ksz_common.c
2801
ret = devm_of_mdiobus_register(ds->dev, bus, mdio_np);
drivers/net/dsa/microchip/ksz_common.c
2803
dev_err(ds->dev, "unable to register MDIO bus %s\n",
drivers/net/dsa/microchip/ksz_common.c
2976
static int ksz_setup(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_common.c
2978
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
2994
dev_err(ds->dev, "failed to reset switch\n");
drivers/net/dsa/microchip/ksz_common.c
3018
dev->dev_ops->config_cpu_port(ds);
drivers/net/dsa/microchip/ksz_common.c
3022
ds->num_tx_queues = dev->info->num_tx_queues;
drivers/net/dsa/microchip/ksz_common.c
3029
ds->configure_vlan_while_not_filtering = false;
drivers/net/dsa/microchip/ksz_common.c
3030
ds->dscp_prio_mapping_is_global = true;
drivers/net/dsa/microchip/ksz_common.c
3033
ret = dev->dev_ops->setup(ds);
drivers/net/dsa/microchip/ksz_common.c
3051
dsa_switch_for_each_user_port(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_common.c
3057
ret = ksz_ptp_irq_setup(ds, dp->index);
drivers/net/dsa/microchip/ksz_common.c
3065
ret = ksz_ptp_clock_register(ds);
drivers/net/dsa/microchip/ksz_common.c
3091
ksz_ptp_clock_unregister(ds);
drivers/net/dsa/microchip/ksz_common.c
3094
dsa_switch_for_each_user_port_continue_reverse(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_common.c
3096
ksz_ptp_irq_free(ds, dp->index);
drivers/net/dsa/microchip/ksz_common.c
3106
static void ksz_teardown(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_common.c
3108
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3112
ksz_ptp_clock_unregister(ds);
drivers/net/dsa/microchip/ksz_common.c
3115
dsa_switch_for_each_user_port(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_common.c
3117
ksz_ptp_irq_free(ds, dp->index);
drivers/net/dsa/microchip/ksz_common.c
3126
dev->dev_ops->teardown(ds);
drivers/net/dsa/microchip/ksz_common.c
3162
if (dsa_is_unused_port(dev->ds, i))
drivers/net/dsa/microchip/ksz_common.c
3173
const struct dsa_port *dp = dsa_to_port(dev->ds, i);
drivers/net/dsa/microchip/ksz_common.c
3206
static int ksz_phy_read16(struct dsa_switch *ds, int addr, int reg)
drivers/net/dsa/microchip/ksz_common.c
3208
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3219
static int ksz_phy_write16(struct dsa_switch *ds, int addr, int reg, u16 val)
drivers/net/dsa/microchip/ksz_common.c
3221
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3231
static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3233
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3254
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3263
static int ksz_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/microchip/ksz_common.c
3265
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3273
static void ksz_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3276
const struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/microchip/ksz_common.c
3277
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3291
static int ksz_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3303
static void ksz_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3311
static void ksz_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3313
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3318
static int ksz_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/microchip/ksz_common.c
3320
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3328
static int ksz_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3332
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3340
static int ksz_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3344
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3352
static int ksz_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3355
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3363
static int ksz_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3367
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3375
static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3379
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3410
static int ksz_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3412
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3415
if (!dsa_is_user_port(ds, port))
drivers/net/dsa/microchip/ksz_common.c
3434
void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/microchip/ksz_common.c
3436
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3469
dev_err(ds->dev, "invalid STP state: %d\n", state);
drivers/net/dsa/microchip/ksz_common.c
3480
static void ksz_port_teardown(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3482
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3494
if (dsa_is_user_port(ds, port))
drivers/net/dsa/microchip/ksz_common.c
3499
static int ksz_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3509
static int ksz_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3513
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3524
ksz_port_stp_state_set(ds, port, p->stp_state);
drivers/net/dsa/microchip/ksz_common.c
3530
static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/microchip/ksz_common.c
3534
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3561
static int ksz_connect_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/microchip/ksz_common.c
3572
tagger_data = ksz_tagger_data(ds);
drivers/net/dsa/microchip/ksz_common.c
3580
static int ksz_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3583
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3591
static int ksz_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3595
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3603
static int ksz_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3606
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3614
static int ksz_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3618
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3626
static void ksz_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3629
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3635
static int ksz_change_mtu(struct dsa_switch *ds, int port, int mtu)
drivers/net/dsa/microchip/ksz_common.c
3637
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3645
static int ksz_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3647
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3693
static bool ksz_support_eee(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
3695
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3736
static int ksz_set_mac_eee(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
3739
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3843
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3853
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz_common.c
3976
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4092
static int ksz_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4095
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4107
return ksz9477_cls_flower_add(ds, port, cls, ingress);
drivers/net/dsa/microchip/ksz_common.c
4113
static int ksz_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4116
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4128
return ksz9477_cls_flower_del(ds, port, cls, ingress);
drivers/net/dsa/microchip/ksz_common.c
4177
static int ksz_setup_tc_cbs(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4180
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4479
static int ksz_tc_setup_qdisc_ets(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4482
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
449
struct ksz_device *dev = dp->ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4517
static int ksz_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4522
return ksz_setup_tc_cbs(ds, port, type_data);
drivers/net/dsa/microchip/ksz_common.c
4524
return ksz_tc_setup_qdisc_ets(ds, port, type_data);
drivers/net/dsa/microchip/ksz_common.c
4577
static void ksz_get_wol(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4580
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4597
if (ksz_is_port_mac_global_usable(dev->ds, port))
drivers/net/dsa/microchip/ksz_common.c
4625
static int ksz_set_wol(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4629
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4670
ret = ksz_switch_macaddr_get(dev->ds, port, NULL);
drivers/net/dsa/microchip/ksz_common.c
4674
ksz_switch_macaddr_put(dev->ds);
drivers/net/dsa/microchip/ksz_common.c
4681
ksz_switch_macaddr_put(dev->ds);
drivers/net/dsa/microchip/ksz_common.c
4716
dsa_switch_for_each_user_port(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_common.c
4740
static int ksz_port_set_mac_address(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4743
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/microchip/ksz_common.c
4747
dev_err(ds->dev,
drivers/net/dsa/microchip/ksz_common.c
4758
ksz_get_wol(ds, dp->index, &wol);
drivers/net/dsa/microchip/ksz_common.c
4760
dev_err(ds->dev,
drivers/net/dsa/microchip/ksz_common.c
4781
bool ksz_is_port_mac_global_usable(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_common.c
4783
struct net_device *user = dsa_to_port(ds, port)->user;
drivers/net/dsa/microchip/ksz_common.c
4786
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4812
int ksz_switch_macaddr_get(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4815
struct net_device *user = dsa_to_port(ds, port)->user;
drivers/net/dsa/microchip/ksz_common.c
4818
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4872
void ksz_switch_macaddr_put(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_common.c
4875
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4893
static int ksz_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr,
drivers/net/dsa/microchip/ksz_common.c
4896
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4931
ret = ksz_switch_macaddr_get(ds, port, extack);
drivers/net/dsa/microchip/ksz_common.c
4935
ksz9477_hsr_join(ds, port, hsr);
drivers/net/dsa/microchip/ksz_common.c
4942
static int ksz_hsr_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.c
4945
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4949
ksz9477_hsr_leave(ds, port, hsr);
drivers/net/dsa/microchip/ksz_common.c
4954
ksz_switch_macaddr_put(ds);
drivers/net/dsa/microchip/ksz_common.c
4959
static int ksz_suspend(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_common.c
4961
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
4967
static int ksz_resume(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_common.c
4969
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_common.c
5039
struct dsa_switch *ds;
drivers/net/dsa/microchip/ksz_common.c
5042
ds = devm_kzalloc(base, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/microchip/ksz_common.c
5043
if (!ds)
drivers/net/dsa/microchip/ksz_common.c
5046
ds->dev = base;
drivers/net/dsa/microchip/ksz_common.c
5047
ds->num_ports = DSA_MAX_PORTS;
drivers/net/dsa/microchip/ksz_common.c
5048
ds->ops = &ksz_switch_ops;
drivers/net/dsa/microchip/ksz_common.c
5054
ds->priv = swdev;
drivers/net/dsa/microchip/ksz_common.c
5057
swdev->ds = ds;
drivers/net/dsa/microchip/ksz_common.c
5083
dsa_switch_shutdown(dev->ds);
drivers/net/dsa/microchip/ksz_common.c
5480
dev->ds->num_ports = dev->info->port_cnt;
drivers/net/dsa/microchip/ksz_common.c
5483
dev->ds->phylink_mac_ops = dev->info->phylink_mac_ops;
drivers/net/dsa/microchip/ksz_common.c
5531
ret = dsa_register_switch(dev->ds);
drivers/net/dsa/microchip/ksz_common.c
5556
dsa_unregister_switch(dev->ds);
drivers/net/dsa/microchip/ksz_common.c
5569
return dsa_switch_suspend(priv->ds);
drivers/net/dsa/microchip/ksz_common.c
5577
return dsa_switch_resume(priv->ds);
drivers/net/dsa/microchip/ksz_common.h
162
struct dsa_switch *ds;
drivers/net/dsa/microchip/ksz_common.h
359
int (*setup)(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_common.h
360
void (*teardown)(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_common.h
452
void (*config_cpu_port)(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_common.h
468
bool ksz_is_port_mac_global_usable(struct dsa_switch *ds, int port);
drivers/net/dsa/microchip/ksz_common.h
471
void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state);
drivers/net/dsa/microchip/ksz_common.h
475
int ksz_switch_macaddr_get(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_common.h
477
void ksz_switch_macaddr_put(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_dcb.c
182
int ksz_port_get_default_prio(struct dsa_switch *ds, int port)
drivers/net/dsa/microchip/ksz_dcb.c
184
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
209
int ksz_port_set_default_prio(struct dsa_switch *ds, int port, u8 prio)
drivers/net/dsa/microchip/ksz_dcb.c
211
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
236
int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp)
drivers/net/dsa/microchip/ksz_dcb.c
238
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
361
int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
drivers/net/dsa/microchip/ksz_dcb.c
363
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
381
int ksz_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
drivers/net/dsa/microchip/ksz_dcb.c
383
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
386
if (ksz_port_get_dscp_prio(ds, port, dscp) != prio)
drivers/net/dsa/microchip/ksz_dcb.c
498
int ksz_port_set_apptrust(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_dcb.c
502
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
541
int ksz_port_get_apptrust(struct dsa_switch *ds, int port, u8 *sel, int *nsel)
drivers/net/dsa/microchip/ksz_dcb.c
544
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_dcb.c
592
ret = ksz_port_set_default_prio(dev->ds, port, ipm);
drivers/net/dsa/microchip/ksz_dcb.c
596
return ksz_port_set_apptrust(dev->ds, port, ksz_default_apptrust,
drivers/net/dsa/microchip/ksz_dcb.h
11
int ksz_port_get_default_prio(struct dsa_switch *ds, int port);
drivers/net/dsa/microchip/ksz_dcb.h
12
int ksz_port_set_default_prio(struct dsa_switch *ds, int port, u8 prio);
drivers/net/dsa/microchip/ksz_dcb.h
13
int ksz_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp);
drivers/net/dsa/microchip/ksz_dcb.h
14
int ksz_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio);
drivers/net/dsa/microchip/ksz_dcb.h
15
int ksz_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio);
drivers/net/dsa/microchip/ksz_dcb.h
16
int ksz_port_set_apptrust(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_dcb.h
19
int ksz_port_get_apptrust(struct dsa_switch *ds, int port, u8 *sel, int *nsel);
drivers/net/dsa/microchip/ksz_ptp.c
1132
int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)
drivers/net/dsa/microchip/ksz_ptp.c
1134
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
1189
void ksz_ptp_irq_free(struct dsa_switch *ds, u8 p)
drivers/net/dsa/microchip/ksz_ptp.c
1191
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
264
struct ksz_tagger_data *tagger_data = ksz_tagger_data(dev->ds);
drivers/net/dsa/microchip/ksz_ptp.c
271
dsa_switch_for_each_user_port(dp, dev->ds) {
drivers/net/dsa/microchip/ksz_ptp.c
285
tagger_data->hwtstamp_set_state(dev->ds, tag_en);
drivers/net/dsa/microchip/ksz_ptp.c
294
int ksz_get_ts_info(struct dsa_switch *ds, int port, struct kernel_ethtool_ts_info *ts)
drivers/net/dsa/microchip/ksz_ptp.c
296
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
323
int ksz_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_ptp.c
326
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
408
int ksz_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_ptp.c
412
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
454
bool ksz_port_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb,
drivers/net/dsa/microchip/ksz_ptp.c
458
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
496
void ksz_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
drivers/net/dsa/microchip/ksz_ptp.c
498
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
569
struct dsa_switch *ds = xmit_work->dp->ds;
drivers/net/dsa/microchip/ksz_ptp.c
570
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
904
int ksz_ptp_clock_register(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_ptp.c
906
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.c
959
void ksz_ptp_clock_unregister(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_ptp.c
961
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/ksz_ptp.h
36
int ksz_ptp_clock_register(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_ptp.h
38
void ksz_ptp_clock_unregister(struct dsa_switch *ds);
drivers/net/dsa/microchip/ksz_ptp.h
40
int ksz_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_ptp.h
42
int ksz_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_ptp.h
44
int ksz_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/microchip/ksz_ptp.h
47
void ksz_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/microchip/ksz_ptp.h
49
bool ksz_port_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb,
drivers/net/dsa/microchip/ksz_ptp.h
51
int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p);
drivers/net/dsa/microchip/ksz_ptp.h
52
void ksz_ptp_irq_free(struct dsa_switch *ds, u8 p);
drivers/net/dsa/microchip/ksz_ptp.h
61
static inline int ksz_ptp_clock_register(struct dsa_switch *ds)
drivers/net/dsa/microchip/ksz_ptp.h
66
static inline void ksz_ptp_clock_unregister(struct dsa_switch *ds) { }
drivers/net/dsa/microchip/ksz_ptp.h
68
static inline int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)
drivers/net/dsa/microchip/ksz_ptp.h
73
static inline void ksz_ptp_irq_free(struct dsa_switch *ds, u8 p) {}
drivers/net/dsa/microchip/lan937x.h
10
int lan937x_setup(struct dsa_switch *ds);
drivers/net/dsa/microchip/lan937x.h
11
void lan937x_teardown(struct dsa_switch *ds);
drivers/net/dsa/microchip/lan937x.h
13
void lan937x_config_cpu_port(struct dsa_switch *ds);
drivers/net/dsa/microchip/lan937x_main.c
380
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/lan937x_main.c
405
member = dsa_user_ports(ds);
drivers/net/dsa/microchip/lan937x_main.c
407
member = BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/microchip/lan937x_main.c
412
void lan937x_config_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/microchip/lan937x_main.c
414
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/lan937x_main.c
417
dsa_switch_for_each_cpu_port(dp, ds) {
drivers/net/dsa/microchip/lan937x_main.c
426
dsa_switch_for_each_user_port(dp, ds) {
drivers/net/dsa/microchip/lan937x_main.c
427
ksz_port_stp_state_set(ds, dp->index, BR_STATE_DISABLED);
drivers/net/dsa/microchip/lan937x_main.c
433
struct dsa_switch *ds = dev->ds;
drivers/net/dsa/microchip/lan937x_main.c
438
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/microchip/lan937x_main.c
448
dev_err(ds->dev, "failed to enable jumbo\n");
drivers/net/dsa/microchip/lan937x_main.c
455
dev_err(ds->dev, "failed to update mtu for port %d\n", port);
drivers/net/dsa/microchip/lan937x_main.c
619
int lan937x_setup(struct dsa_switch *ds)
drivers/net/dsa/microchip/lan937x_main.c
621
struct ksz_device *dev = ds->priv;
drivers/net/dsa/microchip/lan937x_main.c
627
ds->vlan_filtering_is_global = true;
drivers/net/dsa/microchip/lan937x_main.c
659
void lan937x_teardown(struct dsa_switch *ds)
drivers/net/dsa/mt7530-mdio.c
211
return dsa_register_switch(priv->ds);
drivers/net/dsa/mt7530-mdio.c
246
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/mt7530-mmio.c
64
return dsa_register_switch(priv->ds);
drivers/net/dsa/mt7530-mmio.c
82
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/mt7530.c
1018
static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)
drivers/net/dsa/mt7530.c
1020
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1056
if (!dsa_is_dsa_port(priv->ds, 5) &&
drivers/net/dsa/mt7530.c
1072
dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
drivers/net/dsa/mt7530.c
1284
mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
drivers/net/dsa/mt7530.c
1286
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1308
PCR_MATRIX(dsa_user_ports(priv->ds)));
drivers/net/dsa/mt7530.c
1316
mt7530_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1319
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mt7530.c
1320
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1351
mt7530_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/mt7530.c
1353
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1377
mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/mt7530.c
1379
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1387
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/mt7530.c
1417
mt7530_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/mt7530.c
1423
mt7530_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/mt7530.c
1425
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1455
struct dsa_port *dp = dsa_to_port(priv->ds, port), *other_dp;
drivers/net/dsa/mt7530.c
1462
dsa_switch_for_each_user_port(other_dp, priv->ds) {
drivers/net/dsa/mt7530.c
1501
mt7530_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1513
mt7530_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1517
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1536
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mt7530.c
1550
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1554
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1570
mt7530_port_set_vlan_unaware(struct dsa_switch *ds, int port)
drivers/net/dsa/mt7530.c
1572
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1579
if (dsa_port_bridge_dev_get(dsa_to_port(ds, port)))
drivers/net/dsa/mt7530.c
1593
for (i = 0; i < priv->ds->num_ports; i++) {
drivers/net/dsa/mt7530.c
1594
if (dsa_is_user_port(ds, i) &&
drivers/net/dsa/mt7530.c
1595
dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
drivers/net/dsa/mt7530.c
1605
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mt7530.c
1609
PCR_MATRIX(dsa_user_ports(priv->ds)));
drivers/net/dsa/mt7530.c
1616
mt7530_port_set_vlan_aware(struct dsa_switch *ds, int port)
drivers/net/dsa/mt7530.c
1618
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1623
if (dsa_is_user_port(ds, port)) {
drivers/net/dsa/mt7530.c
1656
mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1659
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1676
mt7530_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1680
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1693
mt7530_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1697
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1710
mt7530_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1713
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1745
mt7530_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1749
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1772
mt7530_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1776
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1827
mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
drivers/net/dsa/mt7530.c
1830
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mt7530.c
1839
mt7530_port_set_vlan_aware(ds, port);
drivers/net/dsa/mt7530.c
1840
mt7530_port_set_vlan_aware(ds, cpu_dp->index);
drivers/net/dsa/mt7530.c
1842
mt7530_port_set_vlan_unaware(ds, port);
drivers/net/dsa/mt7530.c
1852
struct dsa_port *dp = dsa_to_port(priv->ds, entry->port);
drivers/net/dsa/mt7530.c
1946
mt7530_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1953
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
1968
if (dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
drivers/net/dsa/mt7530.c
1977
if (dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
drivers/net/dsa/mt7530.c
1991
mt7530_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
1995
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2010
if (dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
drivers/net/dsa/mt7530.c
2024
static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2028
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2062
static void mt753x_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2065
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2086
mtk_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2202
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/mt7530.c
2206
if (BIT(p) & ds->phys_mii_mask) {
drivers/net/dsa/mt7530.c
2210
ds->user_mii_bus->irq[p] = irq;
drivers/net/dsa/mt7530.c
2291
if (BIT(p) & priv->ds->phys_mii_mask) {
drivers/net/dsa/mt7530.c
2304
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/mt7530.c
2322
ds->user_mii_bus = bus;
drivers/net/dsa/mt7530.c
2332
bus->phy_mask = ~ds->phys_mii_mask;
drivers/net/dsa/mt7530.c
2350
mt7530_setup(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
2352
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2366
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/mt7530.c
2375
dev_err(ds->dev, "parent OF node of DSA conduit not found");
drivers/net/dsa/mt7530.c
2379
ds->assisted_learning_on_cpu_port = true;
drivers/net/dsa/mt7530.c
2380
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/mt7530.c
2461
mt7530_mib_reset(ds);
drivers/net/dsa/mt7530.c
2463
for (i = 0; i < priv->ds->num_ports; i++) {
drivers/net/dsa/mt7530.c
2479
if (dsa_is_cpu_port(ds, i)) {
drivers/net/dsa/mt7530.c
2480
mt753x_cpu_port_enable(ds, i);
drivers/net/dsa/mt7530.c
2482
mt7530_port_disable(ds, i);
drivers/net/dsa/mt7530.c
2502
if (dsa_is_unused_port(ds, 5)) {
drivers/net/dsa/mt7530.c
2528
id = of_mdio_parse_addr(ds->dev, phy_node);
drivers/net/dsa/mt7530.c
2542
mt7530_setup_port5(ds, interface);
drivers/net/dsa/mt7530.c
2563
mt7531_setup_common(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
2565
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2568
ds->assisted_learning_on_cpu_port = true;
drivers/net/dsa/mt7530.c
2569
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/mt7530.c
2574
mt7530_mib_reset(ds);
drivers/net/dsa/mt7530.c
2580
for (i = 0; i < priv->ds->num_ports; i++) {
drivers/net/dsa/mt7530.c
2598
if (dsa_is_cpu_port(ds, i)) {
drivers/net/dsa/mt7530.c
2599
mt753x_cpu_port_enable(ds, i);
drivers/net/dsa/mt7530.c
2601
mt7530_port_disable(ds, i);
drivers/net/dsa/mt7530.c
2631
mt7531_setup(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
2633
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2675
for (i = 0; i < priv->ds->num_ports; i++)
drivers/net/dsa/mt7530.c
2719
ret = mt7531_setup_common(ds);
drivers/net/dsa/mt7530.c
2726
static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2757
static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2760
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2795
static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2817
static void en7581_mac_port_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
2840
mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
drivers/net/dsa/mt7530.c
2843
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2846
mt7530_setup_port5(priv->ds, interface);
drivers/net/dsa/mt7530.c
2848
mt7530_setup_port6(priv->ds, interface);
drivers/net/dsa/mt7530.c
2892
mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
drivers/net/dsa/mt7530.c
2895
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
2900
dp = dsa_to_port(ds, port);
drivers/net/dsa/mt7530.c
2911
struct mt7530_priv *priv = dp->ds->priv;
drivers/net/dsa/mt7530.c
2930
struct dsa_switch *ds = dp->ds;
drivers/net/dsa/mt7530.c
2934
priv = ds->priv;
drivers/net/dsa/mt7530.c
2937
priv->info->mac_port_config(ds, port, mode, state->interface);
drivers/net/dsa/mt7530.c
2940
if (port == 5 && dsa_is_user_port(ds, 5))
drivers/net/dsa/mt7530.c
2949
struct mt7530_priv *priv = dp->ds->priv;
drivers/net/dsa/mt7530.c
2962
struct mt7530_priv *priv = dp->ds->priv;
drivers/net/dsa/mt7530.c
2991
struct mt7530_priv *priv = dp->ds->priv;
drivers/net/dsa/mt7530.c
3001
struct mt7530_priv *priv = dp->ds->priv;
drivers/net/dsa/mt7530.c
3024
static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
3027
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
3040
priv->info->mac_port_get_caps(ds, port, config);
drivers/net/dsa/mt7530.c
3110
mt753x_setup(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
3112
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
3113
int ret = priv->info->sw_setup(ds);
drivers/net/dsa/mt7530.c
3128
for (i = 0; i < priv->ds->num_ports; i++) {
drivers/net/dsa/mt7530.c
3143
static int mt753x_set_mac_eee(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
3153
mt753x_conduit_state_change(struct dsa_switch *ds,
drivers/net/dsa/mt7530.c
3158
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
3184
static int mt753x_tc_setup_qdisc_tbf(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
3188
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
3220
static int mt753x_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
3225
return mt753x_tc_setup_qdisc_tbf(ds, port, type_data);
drivers/net/dsa/mt7530.c
3231
static int mt7988_setup(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
3233
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
3254
return mt7531_setup_common(ds);
drivers/net/dsa/mt7530.c
3378
priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
drivers/net/dsa/mt7530.c
3379
if (!priv->ds)
drivers/net/dsa/mt7530.c
3382
priv->ds->dev = dev;
drivers/net/dsa/mt7530.c
3383
priv->ds->num_ports = MT7530_NUM_PORTS;
drivers/net/dsa/mt7530.c
3394
priv->ds->priv = priv;
drivers/net/dsa/mt7530.c
3395
priv->ds->ops = &mt7530_switch_ops;
drivers/net/dsa/mt7530.c
3396
priv->ds->phylink_mac_ops = &mt753x_phylink_mac_ops;
drivers/net/dsa/mt7530.c
3410
dsa_unregister_switch(priv->ds);
drivers/net/dsa/mt7530.c
361
mt753x_preferred_default_local_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
363
struct dsa_port *cpu_dp = dsa_to_port(ds, 6);
drivers/net/dsa/mt7530.c
373
mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)
drivers/net/dsa/mt7530.c
375
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
514
mt7530_mib_reset(struct dsa_switch *ds)
drivers/net/dsa/mt7530.c
516
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
748
mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/mt7530.c
776
mt7530_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
779
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
792
mt7530_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/mt7530.c
800
static void mt7530_get_eth_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
803
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
865
static void mt7530_get_rmon_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
869
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
909
static void mt7530_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
912
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
954
static void mt7530_get_eth_ctrl_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.c
957
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.c
967
mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/mt7530.c
969
struct mt7530_priv *priv = ds->priv;
drivers/net/dsa/mt7530.h
841
int (*sw_setup)(struct dsa_switch *ds);
drivers/net/dsa/mt7530.h
849
void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.h
851
void (*mac_port_config)(struct dsa_switch *ds, int port,
drivers/net/dsa/mt7530.h
881
struct dsa_switch *ds;
drivers/net/dsa/mv88e6060.c
121
if (dsa_is_unused_port(priv->ds, p))
drivers/net/dsa/mv88e6060.c
130
dsa_is_cpu_port(priv->ds, p) ?
drivers/net/dsa/mv88e6060.c
145
(dsa_is_cpu_port(priv->ds, p) ?
drivers/net/dsa/mv88e6060.c
146
dsa_user_ports(priv->ds) :
drivers/net/dsa/mv88e6060.c
147
BIT(dsa_to_port(priv->ds, p)->cpu_dp->index)));
drivers/net/dsa/mv88e6060.c
187
static int mv88e6060_setup(struct dsa_switch *ds)
drivers/net/dsa/mv88e6060.c
189
struct mv88e6060_priv *priv = ds->priv;
drivers/net/dsa/mv88e6060.c
193
priv->ds = ds;
drivers/net/dsa/mv88e6060.c
225
static int mv88e6060_phy_read(struct dsa_switch *ds, int port, int regnum)
drivers/net/dsa/mv88e6060.c
227
struct mv88e6060_priv *priv = ds->priv;
drivers/net/dsa/mv88e6060.c
238
mv88e6060_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val)
drivers/net/dsa/mv88e6060.c
240
struct mv88e6060_priv *priv = ds->priv;
drivers/net/dsa/mv88e6060.c
250
static void mv88e6060_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6060.c
254
struct mv88e6060_priv *priv = ds->priv;
drivers/net/dsa/mv88e6060.c
260
dev_err(ds->dev,
drivers/net/dsa/mv88e6060.c
271
dev_warn(ds->dev, "port %d: SNI mode not supported\n", port);
drivers/net/dsa/mv88e6060.c
308
struct dsa_switch *ds;
drivers/net/dsa/mv88e6060.c
324
ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/mv88e6060.c
325
if (!ds)
drivers/net/dsa/mv88e6060.c
328
ds->dev = dev;
drivers/net/dsa/mv88e6060.c
329
ds->num_ports = MV88E6060_PORTS;
drivers/net/dsa/mv88e6060.c
330
ds->priv = priv;
drivers/net/dsa/mv88e6060.c
331
ds->dev = dev;
drivers/net/dsa/mv88e6060.c
332
ds->ops = &mv88e6060_switch_ops;
drivers/net/dsa/mv88e6060.c
334
dev_set_drvdata(dev, ds);
drivers/net/dsa/mv88e6060.c
336
return dsa_register_switch(ds);
drivers/net/dsa/mv88e6060.c
341
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mv88e6060.c
343
if (!ds)
drivers/net/dsa/mv88e6060.c
346
dsa_unregister_switch(ds);
drivers/net/dsa/mv88e6060.c
351
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mv88e6060.c
353
if (!ds)
drivers/net/dsa/mv88e6060.c
356
dsa_switch_shutdown(ds);
drivers/net/dsa/mv88e6060.c
45
static enum dsa_tag_protocol mv88e6060_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/mv88e6060.h
116
struct dsa_switch *ds;
drivers/net/dsa/mv88e6xxx/chip.c
1205
static void mv88e6xxx_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1208
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1257
static int mv88e6xxx_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/mv88e6xxx/chip.c
1259
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1384
static void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1387
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1397
static void mv88e6xxx_get_eth_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1400
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1435
static void mv88e6xxx_get_rmon_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1448
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1476
static int mv88e6xxx_get_regs_len(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
1478
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1488
static void mv88e6xxx_get_regs(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1491
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1516
static int mv88e6xxx_set_mac_eee(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1526
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/chip.c
1527
struct dsa_switch_tree *dst = ds->dst;
drivers/net/dsa/mv88e6xxx/chip.c
1535
if (dp->ds->index == dev && dp->index == port) {
drivers/net/dsa/mv88e6xxx/chip.c
1574
return BIT(dsa_switch_upstream_port(ds));
drivers/net/dsa/mv88e6xxx/chip.c
1580
dsa_switch_for_each_port(other_dp, ds)
drivers/net/dsa/mv88e6xxx/chip.c
1591
u16 output_ports = mv88e6xxx_port_vlan(chip, chip->ds->index, port);
drivers/net/dsa/mv88e6xxx/chip.c
1599
static void mv88e6xxx_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
1602
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1610
dev_err(ds->dev, "p%d: failed to update state\n", port);
drivers/net/dsa/mv88e6xxx/chip.c
1634
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/chip.c
1643
port = dsa_routing_port(ds, target);
drivers/net/dsa/mv88e6xxx/chip.c
1644
if (port == ds->num_ports)
drivers/net/dsa/mv88e6xxx/chip.c
1659
err = mv88e6xxx_g1_set_device_number(chip, chip->ds->index);
drivers/net/dsa/mv88e6xxx/chip.c
1756
struct dsa_switch_tree *dst = chip->ds->dst;
drivers/net/dsa/mv88e6xxx/chip.c
1757
struct dsa_switch *ds;
drivers/net/dsa/mv88e6xxx/chip.c
1765
if (dev != chip->ds->index) {
drivers/net/dsa/mv88e6xxx/chip.c
1768
ds = dsa_switch_find(dst->index, dev);
drivers/net/dsa/mv88e6xxx/chip.c
1769
dp = ds ? dsa_to_port(ds, port) : NULL;
drivers/net/dsa/mv88e6xxx/chip.c
1815
if (dsa_to_port(chip->ds, port)->lag)
drivers/net/dsa/mv88e6xxx/chip.c
1825
static void mv88e6xxx_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
1827
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
1835
dev_err(chip->ds->dev, "p%d: failed to flush ATU: %d\n",
drivers/net/dsa/mv88e6xxx/chip.c
2046
mst->stu.state[i] = dsa_is_user_port(chip->ds, i) ?
drivers/net/dsa/mv88e6xxx/chip.c
2063
static int mv88e6xxx_port_mst_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2066
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
2067
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2108
static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2111
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
drivers/net/dsa/mv88e6xxx/chip.c
2112
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2127
dsa_switch_for_each_user_port(other_dp, ds) {
drivers/net/dsa/mv88e6xxx/chip.c
2141
dev_err(ds->dev, "p%d: hw VLAN %d already used by port %d in %s\n",
drivers/net/dsa/mv88e6xxx/chip.c
2151
struct dsa_port *dp = dsa_to_port(chip->ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
2174
static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2178
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2203
mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2206
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2216
err = mv88e6xxx_port_check_hw_vlan(ds, port, vlan->vid);
drivers/net/dsa/mv88e6xxx/chip.c
2436
static int mv88e6xxx_get_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2440
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2483
static int mv88e6xxx_set_rxnfc(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2487
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2533
struct dsa_port *dp = dsa_to_port(chip->ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
2536
if (dsa_is_unused_port(chip->ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
2655
static int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2659
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2670
err = mv88e6xxx_port_vlan_prepare(ds, port, vlan);
drivers/net/dsa/mv88e6xxx/chip.c
2674
if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
2684
warn = !dsa_is_cpu_port(ds, port) && !dsa_is_dsa_port(ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
2690
dev_err(ds->dev, "p%d: failed to add VLAN %d%c\n", port,
drivers/net/dsa/mv88e6xxx/chip.c
2765
static int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2768
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2807
static int mv88e6xxx_port_vlan_fast_age(struct dsa_switch *ds, int port, u16 vid)
drivers/net/dsa/mv88e6xxx/chip.c
2809
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2827
static int mv88e6xxx_vlan_msti_set(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
2831
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2873
static int mv88e6xxx_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2877
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2895
static int mv88e6xxx_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2899
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2983
static int mv88e6xxx_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
2986
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
2999
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/chip.c
3000
struct dsa_switch_tree *dst = ds->dst;
drivers/net/dsa/mv88e6xxx/chip.c
3006
if (dp->ds == ds) {
drivers/net/dsa/mv88e6xxx/chip.c
3017
err = mv88e6xxx_pvt_map(chip, dp->ds->index,
drivers/net/dsa/mv88e6xxx/chip.c
3032
static int mv88e6xxx_map_virtual_bridge_to_pvt(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
3035
u8 dev = bridge_num + ds->dst->last_switch;
drivers/net/dsa/mv88e6xxx/chip.c
3036
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3041
static int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
3046
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3064
err = mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num);
drivers/net/dsa/mv88e6xxx/chip.c
3077
static void mv88e6xxx_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
3080
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3086
mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num))
drivers/net/dsa/mv88e6xxx/chip.c
3087
dev_err(ds->dev, "failed to remap cross-chip Port VLAN\n");
drivers/net/dsa/mv88e6xxx/chip.c
3091
dev_err(ds->dev, "failed to remap in-chip Port VLAN\n");
drivers/net/dsa/mv88e6xxx/chip.c
3095
dev_err(ds->dev,
drivers/net/dsa/mv88e6xxx/chip.c
3101
dev_err(ds->dev,
drivers/net/dsa/mv88e6xxx/chip.c
3108
static int mv88e6xxx_crosschip_bridge_join(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
3113
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3116
if (tree_index != ds->dst->index)
drivers/net/dsa/mv88e6xxx/chip.c
3121
err = err ? : mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num);
drivers/net/dsa/mv88e6xxx/chip.c
3127
static void mv88e6xxx_crosschip_bridge_leave(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
3131
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3133
if (tree_index != ds->dst->index)
drivers/net/dsa/mv88e6xxx/chip.c
3138
mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num))
drivers/net/dsa/mv88e6xxx/chip.c
3139
dev_err(ds->dev, "failed to remap cross-chip Port VLAN\n");
drivers/net/dsa/mv88e6xxx/chip.c
3265
if (dsa_is_dsa_port(chip->ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3268
if (dsa_is_user_port(chip->ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3283
bool message = dsa_is_dsa_port(chip->ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
3329
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/chip.c
3333
upstream_port = dsa_upstream_port(ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
3369
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/chip.c
3429
if (dsa_is_user_port(ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3451
err = mv88e6xxx_port_set_map_da(chip, port, !dsa_is_user_port(ds, port));
drivers/net/dsa/mv88e6xxx/chip.c
3466
if (dsa_is_downstream_port(ds, port) &&
drivers/net/dsa/mv88e6xxx/chip.c
3481
dsa_is_user_port(ds, port) ?
drivers/net/dsa/mv88e6xxx/chip.c
3530
if (dsa_is_user_port(ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3600
static int mv88e6xxx_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
3602
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3611
static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/mv88e6xxx/chip.c
3613
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3627
if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3634
dsa_is_cpu_port(ds, port))
drivers/net/dsa/mv88e6xxx/chip.c
3641
static int mv88e6xxx_set_ageing_time(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
3644
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3941
static void mv88e6xxx_teardown(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/chip.c
3943
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3945
mv88e6xxx_teardown_devlink_params(ds);
drivers/net/dsa/mv88e6xxx/chip.c
3946
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/mv88e6xxx/chip.c
3947
mv88e6xxx_teardown_devlink_regions_global(ds);
drivers/net/dsa/mv88e6xxx/chip.c
3953
static int mv88e6xxx_setup(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/chip.c
3955
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
3964
chip->ds = ds;
drivers/net/dsa/mv88e6xxx/chip.c
3965
ds->user_mii_bus = mv88e6xxx_default_mdio_bus(chip);
drivers/net/dsa/mv88e6xxx/chip.c
3973
ds->max_num_bridges = MV88E6XXX_MAX_PVT_SWITCHES -
drivers/net/dsa/mv88e6xxx/chip.c
3974
ds->dst->last_switch - 1;
drivers/net/dsa/mv88e6xxx/chip.c
4008
if (dsa_is_unused_port(ds, i))
drivers/net/dsa/mv88e6xxx/chip.c
4097
err = mv88e6xxx_setup_devlink_resources(ds);
drivers/net/dsa/mv88e6xxx/chip.c
4101
err = mv88e6xxx_setup_devlink_params(ds);
drivers/net/dsa/mv88e6xxx/chip.c
4105
err = mv88e6xxx_setup_devlink_regions_global(ds);
drivers/net/dsa/mv88e6xxx/chip.c
4112
mv88e6xxx_teardown_devlink_params(ds);
drivers/net/dsa/mv88e6xxx/chip.c
4114
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/mv88e6xxx/chip.c
4123
static int mv88e6xxx_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
4125
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
4135
return mv88e6xxx_setup_devlink_regions_port(ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
4138
static void mv88e6xxx_port_teardown(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
4140
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
4142
mv88e6xxx_teardown_devlink_regions_port(ds, port);
drivers/net/dsa/mv88e6xxx/chip.c
4149
static int mv88e6xxx_get_eeprom_len(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/chip.c
4151
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
4156
static int mv88e6xxx_get_eeprom(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
4159
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
4177
static int mv88e6xxx_set_eeprom(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
4180
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6596
static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
6600
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6605
static int mv88e6xxx_change_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
6608
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6635
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/mv88e6xxx/chip.c
6650
dsa_switch_for_each_cpu_port_continue_reverse(cpu_dp, ds)
drivers/net/dsa/mv88e6xxx/chip.c
6657
static int mv88e6xxx_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6661
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6679
static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6683
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6693
static int mv88e6xxx_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6701
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6733
static void mv88e6xxx_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6739
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6745
dev_err(ds->dev, "p%d: failed to disable mirroring\n", port);
drivers/net/dsa/mv88e6xxx/chip.c
6755
dsa_upstream_port(ds, port)))
drivers/net/dsa/mv88e6xxx/chip.c
6756
dev_err(ds->dev, "failed to set egress port\n");
drivers/net/dsa/mv88e6xxx/chip.c
6762
static int mv88e6xxx_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6766
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6784
static int mv88e6xxx_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
6788
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6847
static bool mv88e6xxx_lag_can_offload(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
6852
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6864
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/mv88e6xxx/chip.c
6890
static int mv88e6xxx_lag_sync_map(struct dsa_switch *ds, struct dsa_lag lag)
drivers/net/dsa/mv88e6xxx/chip.c
6892
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6904
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/mv88e6xxx/chip.c
6905
map |= BIT(dsa_towards_port(ds, dp->ds->index, dp->index));
drivers/net/dsa/mv88e6xxx/chip.c
6945
static int mv88e6xxx_lag_sync_masks(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/chip.c
6947
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
6959
dsa_switch_for_each_port(dp, ds) {
drivers/net/dsa/mv88e6xxx/chip.c
6972
dsa_lags_foreach_id(id, ds->dst) {
drivers/net/dsa/mv88e6xxx/chip.c
6973
lag = dsa_lag_by_id(ds->dst, id);
drivers/net/dsa/mv88e6xxx/chip.c
6978
dsa_lag_foreach_port(dp, ds->dst, lag) {
drivers/net/dsa/mv88e6xxx/chip.c
6987
dsa_lag_foreach_port(dp, ds->dst, lag) {
drivers/net/dsa/mv88e6xxx/chip.c
6991
if (dp->ds == ds)
drivers/net/dsa/mv88e6xxx/chip.c
7008
static int mv88e6xxx_lag_sync_masks_map(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/chip.c
7013
err = mv88e6xxx_lag_sync_masks(ds);
drivers/net/dsa/mv88e6xxx/chip.c
7016
err = mv88e6xxx_lag_sync_map(ds, lag);
drivers/net/dsa/mv88e6xxx/chip.c
7021
static int mv88e6xxx_port_lag_change(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/chip.c
7023
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7027
err = mv88e6xxx_lag_sync_masks(ds);
drivers/net/dsa/mv88e6xxx/chip.c
7032
static int mv88e6xxx_port_lag_join(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
7037
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7040
if (!mv88e6xxx_lag_can_offload(ds, lag, info, extack))
drivers/net/dsa/mv88e6xxx/chip.c
7052
err = mv88e6xxx_lag_sync_masks_map(ds, lag);
drivers/net/dsa/mv88e6xxx/chip.c
7066
static int mv88e6xxx_port_lag_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
7069
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7073
err_sync = mv88e6xxx_lag_sync_masks_map(ds, lag);
drivers/net/dsa/mv88e6xxx/chip.c
7079
static int mv88e6xxx_crosschip_lag_change(struct dsa_switch *ds, int sw_index,
drivers/net/dsa/mv88e6xxx/chip.c
7082
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7086
err = mv88e6xxx_lag_sync_masks(ds);
drivers/net/dsa/mv88e6xxx/chip.c
7091
static int mv88e6xxx_crosschip_lag_join(struct dsa_switch *ds, int sw_index,
drivers/net/dsa/mv88e6xxx/chip.c
7096
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7099
if (!mv88e6xxx_lag_can_offload(ds, lag, info, extack))
drivers/net/dsa/mv88e6xxx/chip.c
7104
err = mv88e6xxx_lag_sync_masks_map(ds, lag);
drivers/net/dsa/mv88e6xxx/chip.c
7115
static int mv88e6xxx_crosschip_lag_leave(struct dsa_switch *ds, int sw_index,
drivers/net/dsa/mv88e6xxx/chip.c
7118
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7122
err_sync = mv88e6xxx_lag_sync_masks_map(ds, lag);
drivers/net/dsa/mv88e6xxx/chip.c
7202
struct dsa_switch *ds;
drivers/net/dsa/mv88e6xxx/chip.c
7204
ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/mv88e6xxx/chip.c
7205
if (!ds)
drivers/net/dsa/mv88e6xxx/chip.c
7208
ds->dev = dev;
drivers/net/dsa/mv88e6xxx/chip.c
7209
ds->num_ports = mv88e6xxx_num_ports(chip);
drivers/net/dsa/mv88e6xxx/chip.c
7210
ds->priv = chip;
drivers/net/dsa/mv88e6xxx/chip.c
7211
ds->dev = dev;
drivers/net/dsa/mv88e6xxx/chip.c
7212
ds->ops = &mv88e6xxx_switch_ops;
drivers/net/dsa/mv88e6xxx/chip.c
7213
ds->phylink_mac_ops = &mv88e6xxx_phylink_mac_ops;
drivers/net/dsa/mv88e6xxx/chip.c
7214
ds->ageing_time_min = chip->info->age_time_coeff;
drivers/net/dsa/mv88e6xxx/chip.c
7215
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
drivers/net/dsa/mv88e6xxx/chip.c
7221
ds->num_lag_ids = mv88e6xxx_has_lag(chip) ? 16 : 0;
drivers/net/dsa/mv88e6xxx/chip.c
7223
dev_set_drvdata(dev, ds);
drivers/net/dsa/mv88e6xxx/chip.c
7225
return dsa_register_switch(ds);
drivers/net/dsa/mv88e6xxx/chip.c
7230
dsa_unregister_switch(chip->ds);
drivers/net/dsa/mv88e6xxx/chip.c
7415
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mv88e6xxx/chip.c
7418
if (!ds)
drivers/net/dsa/mv88e6xxx/chip.c
7421
chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
7441
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mv88e6xxx/chip.c
7443
if (!ds)
drivers/net/dsa/mv88e6xxx/chip.c
7446
dsa_switch_shutdown(ds);
drivers/net/dsa/mv88e6xxx/chip.c
847
static void mv88e6xxx_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/chip.c
850
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
870
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
884
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
909
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
933
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
963
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.c
995
struct mv88e6xxx_chip *chip = dp->ds->priv;
drivers/net/dsa/mv88e6xxx/chip.h
349
struct dsa_switch *ds;
drivers/net/dsa/mv88e6xxx/devlink.c
176
int mv88e6xxx_setup_devlink_resources(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/devlink.c
179
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
187
err = dsa_devlink_resource_register(ds, "ATU",
drivers/net/dsa/mv88e6xxx/devlink.c
200
err = dsa_devlink_resource_register(ds, "ATU_bin_0",
drivers/net/dsa/mv88e6xxx/devlink.c
208
err = dsa_devlink_resource_register(ds, "ATU_bin_1",
drivers/net/dsa/mv88e6xxx/devlink.c
216
err = dsa_devlink_resource_register(ds, "ATU_bin_2",
drivers/net/dsa/mv88e6xxx/devlink.c
224
err = dsa_devlink_resource_register(ds, "ATU_bin_3",
drivers/net/dsa/mv88e6xxx/devlink.c
232
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
237
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
242
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
247
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
252
dsa_devlink_resource_occ_get_register(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
260
dsa_devlink_resources_unregister(ds);
drivers/net/dsa/mv88e6xxx/devlink.c
270
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/mv88e6xxx/devlink.c
271
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
31
int mv88e6xxx_devlink_param_get(struct dsa_switch *ds, u32 id,
drivers/net/dsa/mv88e6xxx/devlink.c
34
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
376
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/mv88e6xxx/devlink.c
378
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
437
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/mv88e6xxx/devlink.c
438
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
519
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/mv88e6xxx/devlink.c
520
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
53
int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,
drivers/net/dsa/mv88e6xxx/devlink.c
56
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
575
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/mv88e6xxx/devlink.c
576
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
613
struct dsa_switch *ds = dsa_devlink_port_to_ds(devlink_port);
drivers/net/dsa/mv88e6xxx/devlink.c
615
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
725
void mv88e6xxx_teardown_devlink_regions_global(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/devlink.c
727
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
735
void mv88e6xxx_teardown_devlink_regions_port(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/devlink.c
737
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
742
int mv88e6xxx_setup_devlink_regions_port(struct dsa_switch *ds, int port)
drivers/net/dsa/mv88e6xxx/devlink.c
744
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
747
region = dsa_devlink_port_region_create(ds,
drivers/net/dsa/mv88e6xxx/devlink.c
759
int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/devlink.c
762
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
791
region = dsa_devlink_region_create(ds, ops, 1, size);
drivers/net/dsa/mv88e6xxx/devlink.c
805
int mv88e6xxx_devlink_info_get(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/devlink.c
809
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/devlink.c
81
int mv88e6xxx_setup_devlink_params(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/devlink.c
83
return dsa_devlink_params_register(ds, mv88e6xxx_devlink_params,
drivers/net/dsa/mv88e6xxx/devlink.c
87
void mv88e6xxx_teardown_devlink_params(struct dsa_switch *ds)
drivers/net/dsa/mv88e6xxx/devlink.c
89
dsa_devlink_params_unregister(ds, mv88e6xxx_devlink_params,
drivers/net/dsa/mv88e6xxx/devlink.h
10
int mv88e6xxx_setup_devlink_resources(struct dsa_switch *ds);
drivers/net/dsa/mv88e6xxx/devlink.h
11
int mv88e6xxx_devlink_param_get(struct dsa_switch *ds, u32 id,
drivers/net/dsa/mv88e6xxx/devlink.h
13
int mv88e6xxx_devlink_param_set(struct dsa_switch *ds, u32 id,
drivers/net/dsa/mv88e6xxx/devlink.h
15
int mv88e6xxx_setup_devlink_regions_global(struct dsa_switch *ds);
drivers/net/dsa/mv88e6xxx/devlink.h
16
void mv88e6xxx_teardown_devlink_regions_global(struct dsa_switch *ds);
drivers/net/dsa/mv88e6xxx/devlink.h
17
int mv88e6xxx_setup_devlink_regions_port(struct dsa_switch *ds, int port);
drivers/net/dsa/mv88e6xxx/devlink.h
18
void mv88e6xxx_teardown_devlink_regions_port(struct dsa_switch *ds, int port);
drivers/net/dsa/mv88e6xxx/devlink.h
20
int mv88e6xxx_devlink_info_get(struct dsa_switch *ds,
drivers/net/dsa/mv88e6xxx/devlink.h
8
int mv88e6xxx_setup_devlink_params(struct dsa_switch *ds);
drivers/net/dsa/mv88e6xxx/devlink.h
9
void mv88e6xxx_teardown_devlink_params(struct dsa_switch *ds);
drivers/net/dsa/mv88e6xxx/hwtstamp.c
171
int mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
175
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/hwtstamp.c
192
int mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
195
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/hwtstamp.c
327
bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
334
chip = ds->priv;
drivers/net/dsa/mv88e6xxx/hwtstamp.c
445
struct dsa_switch *ds = chip->ds;
drivers/net/dsa/mv88e6xxx/hwtstamp.c
449
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/mv88e6xxx/hwtstamp.c
450
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/mv88e6xxx/hwtstamp.c
463
void mv88e6xxx_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
466
struct mv88e6xxx_chip *chip = ds->priv;
drivers/net/dsa/mv88e6xxx/hwtstamp.c
66
int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.c
72
chip = ds->priv;
drivers/net/dsa/mv88e6xxx/hwtstamp.h
113
int mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
116
int mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
119
bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
121
void mv88e6xxx_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
124
int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
138
mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
146
mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
152
static inline bool mv88e6xxx_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
159
static inline void mv88e6xxx_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/hwtstamp.h
164
static inline int mv88e6xxx_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/mv88e6xxx/leds.c
721
dp = dsa_to_port(p->chip->ds, p->port);
drivers/net/dsa/mv88e6xxx/port.c
1426
if (dsa_is_unused_port(chip->ds, port))
drivers/net/dsa/mv88e6xxx/ptp.c
532
dsa_switch_for_each_user_port(dp, chip->ds) {
drivers/net/dsa/mv88e6xxx/ptp.c
533
upstream = dsa_upstream_port(chip->ds, dp->index);
drivers/net/dsa/mv88e6xxx/switchdev.c
70
dp = dsa_to_port(chip->ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
100
static int mxl862xx_wait_ready(struct dsa_switch *ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
104
struct mxl862xx_priv *priv = ds->priv;
drivers/net/dsa/mxl862xx/mxl862xx.c
124
dev_info(ds->dev, "switch ready after %ums, firmware %u.%u.%u (build %u)\n",
drivers/net/dsa/mxl862xx/mxl862xx.c
135
dev_err(ds->dev, "switch not responding after reset\n");
drivers/net/dsa/mxl862xx/mxl862xx.c
139
static int mxl862xx_setup_mdio(struct dsa_switch *ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
141
struct mxl862xx_priv *priv = ds->priv;
drivers/net/dsa/mxl862xx/mxl862xx.c
142
struct device *dev = ds->dev;
drivers/net/dsa/mxl862xx/mxl862xx.c
159
bus->phy_mask = ~ds->phys_mii_mask;
drivers/net/dsa/mxl862xx/mxl862xx.c
171
static int mxl862xx_setup(struct dsa_switch *ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
173
struct mxl862xx_priv *priv = ds->priv;
drivers/net/dsa/mxl862xx/mxl862xx.c
180
ret = mxl862xx_wait_ready(ds);
drivers/net/dsa/mxl862xx/mxl862xx.c
184
return mxl862xx_setup_mdio(ds);
drivers/net/dsa/mxl862xx/mxl862xx.c
187
static int mxl862xx_port_state(struct dsa_switch *ds, int port, bool enable)
drivers/net/dsa/mxl862xx/mxl862xx.c
201
ret = MXL862XX_API_WRITE(ds->priv, MXL862XX_COMMON_REGISTERMOD, sdma);
drivers/net/dsa/mxl862xx/mxl862xx.c
205
return MXL862XX_API_WRITE(ds->priv, MXL862XX_COMMON_REGISTERMOD, fdma);
drivers/net/dsa/mxl862xx/mxl862xx.c
208
static int mxl862xx_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/mxl862xx/mxl862xx.c
211
return mxl862xx_port_state(ds, port, true);
drivers/net/dsa/mxl862xx/mxl862xx.c
214
static void mxl862xx_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/mxl862xx/mxl862xx.c
216
if (mxl862xx_port_state(ds, port, false))
drivers/net/dsa/mxl862xx/mxl862xx.c
217
dev_err(ds->dev, "failed to disable port %d\n", port);
drivers/net/dsa/mxl862xx/mxl862xx.c
220
static void mxl862xx_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/mxl862xx/mxl862xx.c
227
if (MXL862XX_API_WRITE(ds->priv, MXL862XX_MAC_TABLECLEARCOND, param))
drivers/net/dsa/mxl862xx/mxl862xx.c
228
dev_err(ds->dev, "failed to clear fdb on port %d\n", port);
drivers/net/dsa/mxl862xx/mxl862xx.c
231
static int mxl862xx_configure_ctp_port(struct dsa_switch *ds, int port,
drivers/net/dsa/mxl862xx/mxl862xx.c
242
return MXL862XX_API_WRITE(ds->priv, MXL862XX_CTP_PORTASSIGNMENTSET,
drivers/net/dsa/mxl862xx/mxl862xx.c
246
static int mxl862xx_configure_sp_tag_proto(struct dsa_switch *ds, int port,
drivers/net/dsa/mxl862xx/mxl862xx.c
258
return MXL862XX_API_WRITE(ds->priv, MXL862XX_SS_SPTAG_SET, tag);
drivers/net/dsa/mxl862xx/mxl862xx.c
261
static int mxl862xx_setup_cpu_bridge(struct dsa_switch *ds, int port)
drivers/net/dsa/mxl862xx/mxl862xx.c
264
struct mxl862xx_priv *priv = ds->priv;
drivers/net/dsa/mxl862xx/mxl862xx.c
279
dsa_switch_for_each_user_port(dp, ds) {
drivers/net/dsa/mxl862xx/mxl862xx.c
291
static int mxl862xx_add_single_port_bridge(struct dsa_switch *ds, int port)
drivers/net/dsa/mxl862xx/mxl862xx.c
294
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
298
ret = MXL862XX_API_READ(ds->priv, MXL862XX_BRIDGE_ALLOC, br_alloc);
drivers/net/dsa/mxl862xx/mxl862xx.c
300
dev_err(ds->dev, "failed to allocate a bridge for port %d\n", port);
drivers/net/dsa/mxl862xx/mxl862xx.c
318
return MXL862XX_API_WRITE(ds->priv, MXL862XX_BRIDGEPORT_CONFIGSET, br_port_cfg);
drivers/net/dsa/mxl862xx/mxl862xx.c
321
static int mxl862xx_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/mxl862xx/mxl862xx.c
323
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
328
ret = mxl862xx_port_state(ds, port, false);
drivers/net/dsa/mxl862xx/mxl862xx.c
332
mxl862xx_port_fast_age(ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
340
ret = mxl862xx_configure_sp_tag_proto(ds, port, is_cpu_port);
drivers/net/dsa/mxl862xx/mxl862xx.c
345
ret = mxl862xx_configure_ctp_port(ds, port, port,
drivers/net/dsa/mxl862xx/mxl862xx.c
352
return mxl862xx_setup_cpu_bridge(ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
355
return mxl862xx_add_single_port_bridge(ds, port);
drivers/net/dsa/mxl862xx/mxl862xx.c
358
static void mxl862xx_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/mxl862xx/mxl862xx.c
39
static enum dsa_tag_protocol mxl862xx_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/mxl862xx/mxl862xx.c
409
struct dsa_switch *ds;
drivers/net/dsa/mxl862xx/mxl862xx.c
417
ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/mxl862xx/mxl862xx.c
418
if (!ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
421
priv->ds = ds;
drivers/net/dsa/mxl862xx/mxl862xx.c
422
ds->dev = dev;
drivers/net/dsa/mxl862xx/mxl862xx.c
423
ds->priv = priv;
drivers/net/dsa/mxl862xx/mxl862xx.c
424
ds->ops = &mxl862xx_switch_ops;
drivers/net/dsa/mxl862xx/mxl862xx.c
425
ds->phylink_mac_ops = &mxl862xx_phylink_mac_ops;
drivers/net/dsa/mxl862xx/mxl862xx.c
426
ds->num_ports = MXL862XX_MAX_PORTS;
drivers/net/dsa/mxl862xx/mxl862xx.c
428
dev_set_drvdata(dev, ds);
drivers/net/dsa/mxl862xx/mxl862xx.c
430
return dsa_register_switch(ds);
drivers/net/dsa/mxl862xx/mxl862xx.c
435
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mxl862xx/mxl862xx.c
437
if (!ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
440
dsa_unregister_switch(ds);
drivers/net/dsa/mxl862xx/mxl862xx.c
445
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
drivers/net/dsa/mxl862xx/mxl862xx.c
447
if (!ds)
drivers/net/dsa/mxl862xx/mxl862xx.c
450
dsa_switch_shutdown(ds);
drivers/net/dsa/mxl862xx/mxl862xx.h
12
struct dsa_switch *ds;
drivers/net/dsa/ocelot/felix.c
1001
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
101
static int felix_tag_8021q_vlan_add_rx(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1011
static int felix_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1015
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1021
static void felix_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1024
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1029
static int felix_lag_join(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1034
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1042
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/ocelot/felix.c
1045
return felix_port_change_conduit(ds, port, lag.dev, extack);
drivers/net/dsa/ocelot/felix.c
1048
static int felix_lag_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1051
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1056
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/ocelot/felix.c
1059
return felix_port_change_conduit(ds, port, lag.dev, NULL);
drivers/net/dsa/ocelot/felix.c
106
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1062
static int felix_lag_change(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
1064
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
1065
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1072
static int felix_vlan_prepare(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1076
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1096
static int felix_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
drivers/net/dsa/ocelot/felix.c
1099
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1111
err = felix_update_tag_8021q_rx_rules(ds, port, enabled);
drivers/net/dsa/ocelot/felix.c
1119
static int felix_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1123
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1127
err = felix_vlan_prepare(ds, port, vlan, extack);
drivers/net/dsa/ocelot/felix.c
1136
static int felix_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1139
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1144
static void felix_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1147
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1165
struct ocelot *ocelot = dp->ds->priv;
drivers/net/dsa/ocelot/felix.c
1180
struct ocelot *ocelot = dp->ds->priv;
drivers/net/dsa/ocelot/felix.c
1198
struct ocelot *ocelot = dp->ds->priv;
drivers/net/dsa/ocelot/felix.c
1216
struct ocelot *ocelot = dp->ds->priv;
drivers/net/dsa/ocelot/felix.c
1230
static int felix_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1233
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
1234
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1243
if (felix_cpu_port_for_conduit(ds, conduit) != ocelot->npi) {
drivers/net/dsa/ocelot/felix.c
1244
dev_err(ds->dev, "Multiple conduits are not allowed\n");
drivers/net/dsa/ocelot/felix.c
1252
return dsa_port_simple_hsr_join(ds, port, dp->hsr_dev, NULL);
drivers/net/dsa/ocelot/felix.c
1255
static void felix_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
1257
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
1258
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1267
dsa_port_simple_hsr_leave(ds, port, dp->hsr_dev);
drivers/net/dsa/ocelot/felix.c
1291
static void felix_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1294
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1299
static void felix_get_pause_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1302
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1307
static void felix_get_rmon_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1311
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1316
static void felix_get_eth_ctrl_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1319
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1324
static void felix_get_eth_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1327
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1332
static void felix_get_eth_phy_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1335
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1340
static void felix_get_ts_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1343
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1348
static void felix_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1351
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1356
static void felix_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)
drivers/net/dsa/ocelot/felix.c
1358
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1363
static int felix_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/ocelot/felix.c
1365
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1370
static int felix_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1373
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
149
static int felix_tag_8021q_vlan_del_rx(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
154
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1540
ocelot->devlink = felix->ds->devlink;
drivers/net/dsa/ocelot/felix.c
1645
struct dsa_switch *ds = xmit_work->dp->ds;
drivers/net/dsa/ocelot/felix.c
1648
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1678
static int felix_connect_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
1685
tagger_data = ocelot_8021q_tagger_data(ds);
drivers/net/dsa/ocelot/felix.c
1696
static int felix_setup(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
1698
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1703
err = felix_init_structs(felix, ds->num_ports);
drivers/net/dsa/ocelot/felix.c
171
static int felix_tag_8021q_vlan_add_tx(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1723
dsa_switch_for_each_available_port(dp, ds) {
drivers/net/dsa/ocelot/felix.c
175
unsigned long cpu_ports = dsa_cpu_ports(ds);
drivers/net/dsa/ocelot/felix.c
1752
felix_change_tag_protocol(ds, felix->tag_proto);
drivers/net/dsa/ocelot/felix.c
1754
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/ocelot/felix.c
1755
ds->assisted_learning_on_cpu_port = true;
drivers/net/dsa/ocelot/felix.c
1756
ds->fdb_isolation = true;
drivers/net/dsa/ocelot/felix.c
1757
ds->max_num_bridges = ds->num_ports;
drivers/net/dsa/ocelot/felix.c
176
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1762
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
1775
static void felix_teardown(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
1777
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1783
felix->tag_proto_ops->teardown(ds);
drivers/net/dsa/ocelot/felix.c
1786
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
1797
static int felix_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1800
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1807
static int felix_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1811
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1822
return felix_update_trapping_destinations(ds, using_tag_8021q);
drivers/net/dsa/ocelot/felix.c
1879
static bool felix_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1884
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1926
static void felix_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1929
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1936
dev_err_ratelimited(ds->dev,
drivers/net/dsa/ocelot/felix.c
1946
static int felix_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/ocelot/felix.c
1948
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1963
static int felix_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
1965
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1970
static int felix_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1973
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1984
return felix_update_trapping_destinations(ds, using_tag_8021q);
drivers/net/dsa/ocelot/felix.c
1987
static int felix_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1990
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
1995
static int felix_cls_flower_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
1998
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2003
static int felix_port_policer_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2006
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2015
static void felix_port_policer_del(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
2017
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2022
static int felix_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2026
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2032
static void felix_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2035
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2040
static int felix_port_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2044
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2048
return felix->info->port_setup_tc(ds, port, type, type_data);
drivers/net/dsa/ocelot/felix.c
2053
static int felix_sb_pool_get(struct dsa_switch *ds, unsigned int sb_index,
drivers/net/dsa/ocelot/felix.c
2057
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2062
static int felix_sb_pool_set(struct dsa_switch *ds, unsigned int sb_index,
drivers/net/dsa/ocelot/felix.c
2067
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2073
static int felix_sb_port_pool_get(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2077
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2083
static int felix_sb_port_pool_set(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2087
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2093
static int felix_sb_tc_pool_bind_get(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2098
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2105
static int felix_sb_tc_pool_bind_set(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2111
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2118
static int felix_sb_occ_snapshot(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
2121
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2126
static int felix_sb_occ_max_clear(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
2129
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2134
static int felix_sb_occ_port_pool_get(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2138
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2144
static int felix_sb_occ_tc_port_bind_get(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2149
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2155
static int felix_mrp_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2158
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2163
static int felix_mrp_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2166
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2172
felix_mrp_add_ring_role(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2175
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2181
felix_mrp_del_ring_role(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2184
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2189
static int felix_port_get_default_prio(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
2191
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2196
static int felix_port_set_default_prio(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2199
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2204
static int felix_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp)
drivers/net/dsa/ocelot/felix.c
2206
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2211
static int felix_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp,
drivers/net/dsa/ocelot/felix.c
2214
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2219
static int felix_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp,
drivers/net/dsa/ocelot/felix.c
2222
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2227
static int felix_get_mm(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2230
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2235
static int felix_set_mm(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2239
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2244
static void felix_get_mm_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2247
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2258
static int felix_port_hsr_join(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2262
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2268
err = dsa_port_simple_hsr_validate(ds, port, hsr, extack);
drivers/net/dsa/ocelot/felix.c
2277
if (!(dsa_to_port(ds, port)->user->flags & IFF_UP))
drivers/net/dsa/ocelot/felix.c
2280
return dsa_port_simple_hsr_join(ds, port, hsr, extack);
drivers/net/dsa/ocelot/felix.c
2283
static int felix_port_hsr_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
2286
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2292
if (!(dsa_to_port(ds, port)->user->flags & IFF_UP))
drivers/net/dsa/ocelot/felix.c
2295
return dsa_port_simple_hsr_leave(ds, port, hsr);
drivers/net/dsa/ocelot/felix.c
238
static int felix_tag_8021q_vlan_del_tx(struct dsa_switch *ds, int port, u16 vid)
drivers/net/dsa/ocelot/felix.c
2395
struct dsa_switch *ds;
drivers/net/dsa/ocelot/felix.c
2404
ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/ocelot/felix.c
2405
if (!ds)
drivers/net/dsa/ocelot/felix.c
2418
felix->ds = ds;
drivers/net/dsa/ocelot/felix.c
2421
ds->dev = dev;
drivers/net/dsa/ocelot/felix.c
2422
ds->num_ports = info->num_ports;
drivers/net/dsa/ocelot/felix.c
2423
ds->num_tx_queues = OCELOT_NUM_TC;
drivers/net/dsa/ocelot/felix.c
2424
ds->ops = &felix_switch_ops;
drivers/net/dsa/ocelot/felix.c
2425
ds->phylink_mac_ops = &felix_phylink_mac_ops;
drivers/net/dsa/ocelot/felix.c
2426
ds->priv = ocelot;
drivers/net/dsa/ocelot/felix.c
2428
err = dsa_register_switch(ds);
drivers/net/dsa/ocelot/felix.c
243
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
2439
struct dsa_switch *ds = felix->ds;
drivers/net/dsa/ocelot/felix.c
2441
if (!dsa_is_user_port(ds, port))
drivers/net/dsa/ocelot/felix.c
2444
return dsa_to_port(ds, port)->user;
drivers/net/dsa/ocelot/felix.c
269
static int felix_tag_8021q_vlan_add(struct dsa_switch *ds, int port, u16 vid,
drivers/net/dsa/ocelot/felix.c
272
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
283
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/ocelot/felix.c
284
err = felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp->index, vid,
drivers/net/dsa/ocelot/felix.c
290
err = felix_tag_8021q_vlan_add_tx(ds, port, vid);
drivers/net/dsa/ocelot/felix.c
297
dsa_switch_for_each_cpu_port(cpu_dp, ds)
drivers/net/dsa/ocelot/felix.c
298
felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp->index, vid);
drivers/net/dsa/ocelot/felix.c
303
static int felix_tag_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid)
drivers/net/dsa/ocelot/felix.c
305
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
312
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/ocelot/felix.c
313
err = felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp->index, vid);
drivers/net/dsa/ocelot/felix.c
318
err = felix_tag_8021q_vlan_del_tx(ds, port, vid);
drivers/net/dsa/ocelot/felix.c
325
dsa_switch_for_each_cpu_port(cpu_dp, ds)
drivers/net/dsa/ocelot/felix.c
326
felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp->index, vid,
drivers/net/dsa/ocelot/felix.c
332
static int felix_update_tag_8021q_rx_rules(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
337
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
344
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/ocelot/felix.c
361
static int felix_trap_get_cpu_port(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
371
dp = dsa_to_port(ds, first_port);
drivers/net/dsa/ocelot/felix.c
380
static int felix_update_trapping_destinations(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
383
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
412
port_mask = BIT(felix_trap_get_cpu_port(ds, trap));
drivers/net/dsa/ocelot/felix.c
45
static int felix_cpu_port_for_conduit(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
48
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
483
static int felix_tag_npi_setup(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
486
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
488
dsa_switch_for_each_user_port(dp, ds) {
drivers/net/dsa/ocelot/felix.c
490
dev_err(ds->dev, "Multiple NPI ports not supported\n");
drivers/net/dsa/ocelot/felix.c
505
static void felix_tag_npi_teardown(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
507
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
512
static unsigned long felix_tag_npi_get_host_fwd_mask(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
514
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
519
static int felix_tag_npi_change_conduit(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
523
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
drivers/net/dsa/ocelot/felix.c
524
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
536
dsa_switch_for_each_user_port(other_dp, ds) {
drivers/net/dsa/ocelot/felix.c
548
felix_npi_port_init(ocelot, felix_cpu_port_for_conduit(ds, conduit));
drivers/net/dsa/ocelot/felix.c
567
static int felix_tag_8021q_setup(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
569
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
573
err = dsa_tag_8021q_register(ds, htons(ETH_P_8021AD));
drivers/net/dsa/ocelot/felix.c
577
dsa_switch_for_each_cpu_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
580
dsa_switch_for_each_user_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
584
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
618
ds->untag_vlan_aware_bridge_pvid = true;
drivers/net/dsa/ocelot/felix.c
623
static void felix_tag_8021q_teardown(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
625
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
628
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
637
dsa_switch_for_each_user_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
640
dsa_switch_for_each_cpu_port(dp, ds)
drivers/net/dsa/ocelot/felix.c
643
dsa_tag_8021q_unregister(ds);
drivers/net/dsa/ocelot/felix.c
645
ds->untag_vlan_aware_bridge_pvid = false;
drivers/net/dsa/ocelot/felix.c
648
static unsigned long felix_tag_8021q_get_host_fwd_mask(struct dsa_switch *ds)
drivers/net/dsa/ocelot/felix.c
650
return dsa_cpu_ports(ds);
drivers/net/dsa/ocelot/felix.c
653
static int felix_tag_8021q_change_conduit(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
657
int cpu = felix_cpu_port_for_conduit(ds, conduit);
drivers/net/dsa/ocelot/felix.c
658
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
663
return felix_update_trapping_destinations(ds, true);
drivers/net/dsa/ocelot/felix.c
673
static void felix_set_host_flood(struct dsa_switch *ds, unsigned long mask,
drivers/net/dsa/ocelot/felix.c
676
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
692
felix_migrate_host_flood(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
696
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
701
mask = old_proto_ops->get_host_fwd_mask(ds);
drivers/net/dsa/ocelot/felix.c
702
felix_set_host_flood(ds, mask, false, false, false);
drivers/net/dsa/ocelot/felix.c
705
mask = proto_ops->get_host_fwd_mask(ds);
drivers/net/dsa/ocelot/felix.c
706
felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask,
drivers/net/dsa/ocelot/felix.c
710
static int felix_migrate_mdbs(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
714
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
720
from = old_proto_ops->get_host_fwd_mask(ds);
drivers/net/dsa/ocelot/felix.c
721
to = proto_ops->get_host_fwd_mask(ds);
drivers/net/dsa/ocelot/felix.c
732
felix_tag_proto_setup_shared(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
739
err = felix_migrate_mdbs(ds, proto_ops, old_proto_ops);
drivers/net/dsa/ocelot/felix.c
743
felix_update_trapping_destinations(ds, using_tag_8021q);
drivers/net/dsa/ocelot/felix.c
745
felix_migrate_host_flood(ds, proto_ops, old_proto_ops);
drivers/net/dsa/ocelot/felix.c
754
static int felix_change_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
758
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
779
err = proto_ops->setup(ds);
drivers/net/dsa/ocelot/felix.c
783
err = felix_tag_proto_setup_shared(ds, proto_ops, old_proto_ops);
drivers/net/dsa/ocelot/felix.c
788
old_proto_ops->teardown(ds);
drivers/net/dsa/ocelot/felix.c
796
proto_ops->teardown(ds);
drivers/net/dsa/ocelot/felix.c
801
static enum dsa_tag_protocol felix_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
805
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
811
static void felix_port_set_host_flood(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
814
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
828
mask = felix->tag_proto_ops->get_host_fwd_mask(ds);
drivers/net/dsa/ocelot/felix.c
829
felix_set_host_flood(ds, mask, !!felix->host_flood_uc_mask,
drivers/net/dsa/ocelot/felix.c
833
static int felix_port_change_conduit(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
837
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
840
return felix->tag_proto_ops->change_conduit(ds, port, conduit, extack);
drivers/net/dsa/ocelot/felix.c
843
static int felix_set_ageing_time(struct dsa_switch *ds,
drivers/net/dsa/ocelot/felix.c
846
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
853
static void felix_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/ocelot/felix.c
855
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
860
dev_err(ds->dev, "Flushing MAC table on port %d returned %pe\n",
drivers/net/dsa/ocelot/felix.c
864
static int felix_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
867
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
872
static int felix_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
877
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
878
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
884
dsa_fdb_present_in_other_db(ds, port, addr, vid, db))
drivers/net/dsa/ocelot/felix.c
893
static int felix_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
898
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/ocelot/felix.c
899
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
905
dsa_fdb_present_in_other_db(ds, port, addr, vid, db))
drivers/net/dsa/ocelot/felix.c
914
static int felix_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag lag,
drivers/net/dsa/ocelot/felix.c
919
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
927
static int felix_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag lag,
drivers/net/dsa/ocelot/felix.c
932
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
940
static int felix_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
945
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
950
if (dsa_is_cpu_port(ds, port) && !bridge_dev &&
drivers/net/dsa/ocelot/felix.c
951
dsa_mdb_present_in_other_db(ds, port, mdb, db))
drivers/net/dsa/ocelot/felix.c
960
static int felix_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
965
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
970
if (dsa_is_cpu_port(ds, port) && !bridge_dev &&
drivers/net/dsa/ocelot/felix.c
971
dsa_mdb_present_in_other_db(ds, port, mdb, db))
drivers/net/dsa/ocelot/felix.c
980
static void felix_bridge_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
983
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
988
static int felix_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.c
992
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix.c
997
static int felix_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.h
58
int (*port_setup_tc)(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.h
78
int (*setup)(struct dsa_switch *ds);
drivers/net/dsa/ocelot/felix.h
79
void (*teardown)(struct dsa_switch *ds);
drivers/net/dsa/ocelot/felix.h
80
unsigned long (*get_host_fwd_mask)(struct dsa_switch *ds);
drivers/net/dsa/ocelot/felix.h
81
int (*change_conduit)(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix.h
88
struct dsa_switch *ds;
drivers/net/dsa/ocelot/felix_vsc9959.c
1027
if (dsa_is_unused_port(felix->ds, port))
drivers/net/dsa/ocelot/felix_vsc9959.c
1594
static int vsc9959_qos_port_cbs_set(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix_vsc9959.c
1597
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix_vsc9959.c
1601
if (cbs_qopt->queue >= ds->num_tx_queues)
drivers/net/dsa/ocelot/felix_vsc9959.c
1674
static int vsc9959_port_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/ocelot/felix_vsc9959.c
1678
struct ocelot *ocelot = ds->priv;
drivers/net/dsa/ocelot/felix_vsc9959.c
1688
return vsc9959_qos_port_cbs_set(ds, port, type_data);
drivers/net/dsa/ocelot/felix_vsc9959.c
2546
struct dsa_switch *ds = felix->ds;
drivers/net/dsa/ocelot/felix_vsc9959.c
2562
if (dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/ocelot/felix_vsc9959.c
2567
mask = dsa_user_ports(ds);
drivers/net/dsa/ocelot/felix_vsc9959.c
2721
dsa_unregister_switch(felix->ds);
drivers/net/dsa/ocelot/felix_vsc9959.c
2733
dsa_switch_shutdown(felix->ds);
drivers/net/dsa/ocelot/ocelot_ext.c
78
dsa_unregister_switch(felix->ds);
drivers/net/dsa/ocelot/ocelot_ext.c
88
dsa_switch_shutdown(felix->ds);
drivers/net/dsa/ocelot/seville_vsc9953.c
1004
dsa_switch_shutdown(felix->ds);
drivers/net/dsa/ocelot/seville_vsc9953.c
918
if (dsa_is_unused_port(felix->ds, port))
drivers/net/dsa/ocelot/seville_vsc9953.c
994
dsa_unregister_switch(felix->ds);
drivers/net/dsa/qca/ar9331.c
1034
struct dsa_switch *ds;
drivers/net/dsa/qca/ar9331.c
1062
ds = &priv->ds;
drivers/net/dsa/qca/ar9331.c
1063
ds->dev = &mdiodev->dev;
drivers/net/dsa/qca/ar9331.c
1064
ds->num_ports = AR9331_SW_PORTS;
drivers/net/dsa/qca/ar9331.c
1065
ds->priv = priv;
drivers/net/dsa/qca/ar9331.c
1067
ds->ops = &priv->ops;
drivers/net/dsa/qca/ar9331.c
1068
ds->phylink_mac_ops = &ar9331_phylink_mac_ops;
drivers/net/dsa/qca/ar9331.c
1079
ret = dsa_register_switch(ds);
drivers/net/dsa/qca/ar9331.c
1106
dsa_unregister_switch(&priv->ds);
drivers/net/dsa/qca/ar9331.c
1118
dsa_switch_shutdown(&priv->ds);
drivers/net/dsa/qca/ar9331.c
240
struct dsa_switch ds;
drivers/net/dsa/qca/ar9331.c
392
static int ar9331_sw_setup_port(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/ar9331.c
394
struct ar9331_sw_priv *priv = ds->priv;
drivers/net/dsa/qca/ar9331.c
403
if (dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/qca/ar9331.c
407
port_mask = dsa_user_ports(ds);
drivers/net/dsa/qca/ar9331.c
412
} else if (dsa_is_user_port(ds, port)) {
drivers/net/dsa/qca/ar9331.c
415
port_mask = BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/qca/ar9331.c
440
static int ar9331_sw_setup(struct dsa_switch *ds)
drivers/net/dsa/qca/ar9331.c
442
struct ar9331_sw_priv *priv = ds->priv;
drivers/net/dsa/qca/ar9331.c
471
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/qca/ar9331.c
472
ret = ar9331_sw_setup_port(ds, i);
drivers/net/dsa/qca/ar9331.c
477
ds->configure_vlan_while_not_filtering = false;
drivers/net/dsa/qca/ar9331.c
485
static void ar9331_sw_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/ar9331.c
487
struct ar9331_sw_priv *priv = ds->priv;
drivers/net/dsa/qca/ar9331.c
496
static enum dsa_tag_protocol ar9331_sw_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/qca/ar9331.c
503
static void ar9331_sw_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/ar9331.c
531
struct ar9331_sw_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/ar9331.c
547
struct ar9331_sw_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/ar9331.c
568
struct ar9331_sw_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/ar9331.c
668
static void ar9331_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/ar9331.c
671
struct ar9331_sw_priv *priv = ds->priv;
drivers/net/dsa/qca/ar9331.c
679
static void ar9331_get_pause_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/ar9331.c
682
struct ar9331_sw_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1017
if (!dsa_is_user_port(priv->ds, reg))
drivers/net/dsa/qca/qca8k-8xxx.c
1090
static int qca8k_find_cpu_port(struct dsa_switch *ds)
drivers/net/dsa/qca/qca8k-8xxx.c
1092
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1095
if (dsa_is_cpu_port(ds, 0))
drivers/net/dsa/qca/qca8k-8xxx.c
1100
if (dsa_is_cpu_port(ds, 6))
drivers/net/dsa/qca/qca8k-8xxx.c
1161
dp = dsa_to_port(priv->ds, port);
drivers/net/dsa/qca/qca8k-8xxx.c
1290
struct qca8k_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1320
struct dsa_switch *ds = dp->ds;
drivers/net/dsa/qca/qca8k-8xxx.c
1326
priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1360
dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port);
drivers/net/dsa/qca/qca8k-8xxx.c
1365
dev_err(ds->dev, "%s: in-band negotiation unsupported\n",
drivers/net/dsa/qca/qca8k-8xxx.c
1394
dev_err(ds->dev, "xMII mode %s not supported for port %d\n",
drivers/net/dsa/qca/qca8k-8xxx.c
1400
static void qca8k_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-8xxx.c
1440
struct qca8k_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1452
struct qca8k_priv *priv = dp->ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1579
if (dsa_is_cpu_port(priv->ds, port)) {
drivers/net/dsa/qca/qca8k-8xxx.c
163
static void qca8k_rw_reg_ack_handler(struct dsa_switch *ds, struct sk_buff *skb)
drivers/net/dsa/qca/qca8k-8xxx.c
1644
static void qca8k_mib_autocast_handler(struct dsa_switch *ds, struct sk_buff *skb)
drivers/net/dsa/qca/qca8k-8xxx.c
1647
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
166
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1691
qca8k_get_ethtool_stats_eth(struct dsa_switch *ds, int port, u64 *data)
drivers/net/dsa/qca/qca8k-8xxx.c
1693
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/qca/qca8k-8xxx.c
1695
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1729
static u32 qca8k_get_phy_flags(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/qca8k-8xxx.c
1731
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1746
qca8k_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-8xxx.c
1753
qca8k_conduit_change(struct dsa_switch *ds, const struct net_device *conduit,
drivers/net/dsa/qca/qca8k-8xxx.c
1757
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1772
static int qca8k_connect_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/qca/qca8k-8xxx.c
1779
tagger_data = ds->tagger_data;
drivers/net/dsa/qca/qca8k-8xxx.c
1833
qca8k_setup(struct dsa_switch *ds)
drivers/net/dsa/qca/qca8k-8xxx.c
1835
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-8xxx.c
1840
cpu_port = qca8k_find_cpu_port(ds);
drivers/net/dsa/qca/qca8k-8xxx.c
1892
dsa_switch_for_each_port(dp, ds) {
drivers/net/dsa/qca/qca8k-8xxx.c
1901
dsa_switch_for_each_user_port(dp, ds)
drivers/net/dsa/qca/qca8k-8xxx.c
1905
dsa_switch_for_each_cpu_port(dp, ds) {
drivers/net/dsa/qca/qca8k-8xxx.c
1929
QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds));
drivers/net/dsa/qca/qca8k-8xxx.c
1936
dsa_switch_for_each_user_port(dp, ds) {
drivers/net/dsa/qca/qca8k-8xxx.c
1973
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/qca/qca8k-8xxx.c
1995
ds->ageing_time_min = 7000;
drivers/net/dsa/qca/qca8k-8xxx.c
1996
ds->ageing_time_max = 458745000;
drivers/net/dsa/qca/qca8k-8xxx.c
1999
ds->num_lag_ids = QCA8K_NUM_LAGS;
drivers/net/dsa/qca/qca8k-8xxx.c
2093
priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds), GFP_KERNEL);
drivers/net/dsa/qca/qca8k-8xxx.c
2094
if (!priv->ds)
drivers/net/dsa/qca/qca8k-8xxx.c
2103
priv->ds->dev = &mdiodev->dev;
drivers/net/dsa/qca/qca8k-8xxx.c
2104
priv->ds->num_ports = QCA8K_NUM_PORTS;
drivers/net/dsa/qca/qca8k-8xxx.c
2105
priv->ds->priv = priv;
drivers/net/dsa/qca/qca8k-8xxx.c
2106
priv->ds->ops = &qca8k_switch_ops;
drivers/net/dsa/qca/qca8k-8xxx.c
2107
priv->ds->phylink_mac_ops = &qca8k_phylink_mac_ops;
drivers/net/dsa/qca/qca8k-8xxx.c
2111
return dsa_register_switch(priv->ds);
drivers/net/dsa/qca/qca8k-8xxx.c
2126
dsa_unregister_switch(priv->ds);
drivers/net/dsa/qca/qca8k-8xxx.c
2136
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/qca/qca8k-8xxx.c
2164
return dsa_switch_suspend(priv->ds);
drivers/net/dsa/qca/qca8k-8xxx.c
2173
return dsa_switch_resume(priv->ds);
drivers/net/dsa/qca/qca8k-8xxx.c
949
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/qca/qca8k-8xxx.c
950
struct device *dev = ds->dev;
drivers/net/dsa/qca/qca8k-8xxx.c
968
ds->dst->index, ds->index);
drivers/net/dsa/qca/qca8k-8xxx.c
980
ds->user_mii_bus = bus;
drivers/net/dsa/qca/qca8k-8xxx.c
981
bus->phy_mask = ~ds->phys_mii_mask;
drivers/net/dsa/qca/qca8k-common.c
1011
int qca8k_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
1017
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
1041
int qca8k_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
1044
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
1054
static bool qca8k_lag_can_offload(struct dsa_switch *ds,
drivers/net/dsa/qca/qca8k-common.c
1065
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/qca/qca8k-common.c
1091
static int qca8k_lag_setup_hash(struct dsa_switch *ds,
drivers/net/dsa/qca/qca8k-common.c
1096
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
1115
dsa_lags_foreach_id(i, ds->dst)
drivers/net/dsa/qca/qca8k-common.c
1116
if (i != lag.id && dsa_lag_by_id(ds->dst, i)) {
drivers/net/dsa/qca/qca8k-common.c
1139
static int qca8k_lag_refresh_portmap(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
1142
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
1208
int qca8k_port_lag_join(struct dsa_switch *ds, int port, struct dsa_lag lag,
drivers/net/dsa/qca/qca8k-common.c
1214
if (!qca8k_lag_can_offload(ds, lag, info, extack))
drivers/net/dsa/qca/qca8k-common.c
1217
ret = qca8k_lag_setup_hash(ds, lag, info);
drivers/net/dsa/qca/qca8k-common.c
1221
return qca8k_lag_refresh_portmap(ds, port, lag, false);
drivers/net/dsa/qca/qca8k-common.c
1224
int qca8k_port_lag_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
1227
return qca8k_lag_refresh_portmap(ds, port, lag, true);
drivers/net/dsa/qca/qca8k-common.c
480
void qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/qca/qca8k-common.c
483
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
493
void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
496
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
503
priv->info->ops->autocast_mib(ds, port, data) > 0)
drivers/net/dsa/qca/qca8k-common.c
526
int qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/qca/qca8k-common.c
528
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
536
int qca8k_set_mac_eee(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
540
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
560
static int qca8k_port_configure_learning(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
563
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
575
void qca8k_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/qca/qca8k-common.c
577
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/qca/qca8k-common.c
578
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
607
qca8k_port_configure_learning(ds, port, learning);
drivers/net/dsa/qca/qca8k-common.c
615
struct dsa_port *dp = dsa_to_port(priv->ds, port), *other_dp;
drivers/net/dsa/qca/qca8k-common.c
622
if (dsa_is_cpu_port(priv->ds, i))
drivers/net/dsa/qca/qca8k-common.c
625
other_dp = dsa_to_port(priv->ds, i);
drivers/net/dsa/qca/qca8k-common.c
656
int qca8k_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
666
int qca8k_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
670
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
674
ret = qca8k_port_configure_learning(ds, port,
drivers/net/dsa/qca/qca8k-common.c
681
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/qca/qca8k-common.c
697
int qca8k_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
702
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
707
void qca8k_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
710
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
720
void qca8k_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/qca8k-common.c
722
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
729
int qca8k_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/qca/qca8k-common.c
731
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
749
int qca8k_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
752
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
757
if (dsa_is_user_port(ds, port))
drivers/net/dsa/qca/qca8k-common.c
763
void qca8k_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/qca8k-common.c
765
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
771
int qca8k_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/qca/qca8k-common.c
773
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
782
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/qca/qca8k-common.c
809
int qca8k_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/qca/qca8k-common.c
825
int qca8k_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
829
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
835
int qca8k_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
839
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
848
int qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
851
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
871
int qca8k_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
875
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
886
int qca8k_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
890
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
900
int qca8k_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
904
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
955
void qca8k_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
958
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-common.c
991
int qca8k_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k-common.c
995
struct qca8k_priv *priv = ds->priv;
drivers/net/dsa/qca/qca8k-leds.c
356
dp = dsa_to_port(priv->ds, qca8k_phy_to_port(led->port_num));
drivers/net/dsa/qca/qca8k.h
378
int (*autocast_mib)(struct dsa_switch *ds, int port, u64 *data);
drivers/net/dsa/qca/qca8k.h
459
struct dsa_switch *ds;
drivers/net/dsa/qca/qca8k.h
516
void qca8k_get_strings(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data);
drivers/net/dsa/qca/qca8k.h
517
void qca8k_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
519
int qca8k_get_sset_count(struct dsa_switch *ds, int port, int sset);
drivers/net/dsa/qca/qca8k.h
522
int qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *eee);
drivers/net/dsa/qca/qca8k.h
525
void qca8k_port_stp_state_set(struct dsa_switch *ds, int port, u8 state);
drivers/net/dsa/qca/qca8k.h
526
int qca8k_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
529
int qca8k_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
532
int qca8k_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
536
void qca8k_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
540
int qca8k_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
542
void qca8k_port_disable(struct dsa_switch *ds, int port);
drivers/net/dsa/qca/qca8k.h
545
int qca8k_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu);
drivers/net/dsa/qca/qca8k.h
546
int qca8k_port_max_mtu(struct dsa_switch *ds, int port);
drivers/net/dsa/qca/qca8k.h
549
void qca8k_port_fast_age(struct dsa_switch *ds, int port);
drivers/net/dsa/qca/qca8k.h
550
int qca8k_set_ageing_time(struct dsa_switch *ds, unsigned int msecs);
drivers/net/dsa/qca/qca8k.h
555
int qca8k_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
558
int qca8k_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
561
int qca8k_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
565
int qca8k_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
568
int qca8k_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
573
int qca8k_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
576
void qca8k_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
580
int qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
drivers/net/dsa/qca/qca8k.h
582
int qca8k_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
585
int qca8k_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/qca/qca8k.h
589
int qca8k_port_lag_join(struct dsa_switch *ds, int port, struct dsa_lag lag,
drivers/net/dsa/qca/qca8k.h
592
int qca8k_port_lag_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/realtek.h
134
int rtl8366_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/realtek.h
137
int rtl8366_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/realtek.h
139
void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/realtek/realtek.h
141
int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset);
drivers/net/dsa/realtek/realtek.h
142
void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data);
drivers/net/dsa/realtek/realtek.h
64
struct dsa_switch ds;
drivers/net/dsa/realtek/rtl8365mb.c
1021
static void rtl8365mb_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1025
rtl8365mb_get_port_extint(ds->priv, port);
drivers/net/dsa/realtek/rtl8365mb.c
1056
struct realtek_priv *priv = dp->ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1086
struct realtek_priv *priv = dp->ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1116
struct realtek_priv *priv = dp->ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1139
static int rtl8365mb_port_change_mtu(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1142
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1149
if (!dsa_is_cpu_port(ds, port))
drivers/net/dsa/realtek/rtl8365mb.c
1163
static int rtl8365mb_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/realtek/rtl8365mb.c
1168
static void rtl8365mb_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1171
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1271
static void rtl8365mb_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)
drivers/net/dsa/realtek/rtl8365mb.c
1273
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1296
static void rtl8365mb_get_strings(struct dsa_switch *ds, int port, u32 stringset, u8 *data)
drivers/net/dsa/realtek/rtl8365mb.c
1309
static int rtl8365mb_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/realtek/rtl8365mb.c
1317
static void rtl8365mb_get_phy_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1320
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1333
static void rtl8365mb_get_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1356
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1418
static void rtl8365mb_get_ctrl_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1421
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1524
static void rtl8365mb_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
1527
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1542
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl8365mb.c
1553
if (dsa_is_unused_port(ds, i))
drivers/net/dsa/realtek/rtl8365mb.c
1569
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl8365mb.c
1575
if (dsa_is_unused_port(ds, i))
drivers/net/dsa/realtek/rtl8365mb.c
1864
static int rtl8365mb_change_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/realtek/rtl8365mb.c
1867
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1941
static int rtl8365mb_setup(struct dsa_switch *ds)
drivers/net/dsa/realtek/rtl8365mb.c
1943
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
1974
dsa_switch_for_each_cpu_port(cpu_dp, ds) {
drivers/net/dsa/realtek/rtl8365mb.c
1989
if (dsa_is_unused_port(ds, i))
drivers/net/dsa/realtek/rtl8365mb.c
2006
rtl8365mb_port_stp_state_set(ds, i, BR_STATE_DISABLED);
drivers/net/dsa/realtek/rtl8365mb.c
2013
ret = rtl8365mb_port_change_mtu(ds, cpu->trap_port, ETH_DATA_LEN);
drivers/net/dsa/realtek/rtl8365mb.c
2017
ret = rtl83xx_setup_user_mdio(ds);
drivers/net/dsa/realtek/rtl8365mb.c
2035
static void rtl8365mb_teardown(struct dsa_switch *ds)
drivers/net/dsa/realtek/rtl8365mb.c
2037
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
852
rtl8365mb_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8365mb.c
855
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8365mb.c
873
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl8365mb.c
884
dp = dsa_to_port(ds, port);
drivers/net/dsa/realtek/rtl8366-core.c
295
int rtl8366_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366-core.c
301
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366-core.c
350
int rtl8366_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366-core.c
353
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366-core.c
394
void rtl8366_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/realtek/rtl8366-core.c
397
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366-core.c
408
int rtl8366_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/realtek/rtl8366-core.c
410
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366-core.c
422
void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
drivers/net/dsa/realtek/rtl8366-core.c
424
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb-leds.c
133
dp->ds->index, dp->index, led_group);
drivers/net/dsa/realtek/rtl8366rb-leds.c
149
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl8366rb-leds.c
154
dsa_switch_for_each_port(dp, ds) {
drivers/net/dsa/realtek/rtl8366rb.c
1015
ret = rtl83xx_setup_user_mdio(ds);
drivers/net/dsa/realtek/rtl8366rb.c
1024
static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/realtek/rtl8366rb.c
1032
static void rtl8366rb_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1036
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1070
struct realtek_priv *priv = dp->ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1141
struct realtek_priv *priv = dp->ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1160
rtl8366rb_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1163
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1176
rtl8366rb_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/realtek/rtl8366rb.c
1178
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1189
rtl8366rb_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1194
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1204
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/realtek/rtl8366rb.c
1223
rtl8366rb_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1226
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1236
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/realtek/rtl8366rb.c
1267
static int rtl8366rb_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1271
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1299
rtl8366rb_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1311
rtl8366rb_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/realtek/rtl8366rb.c
1315
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1330
rtl8366rb_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/realtek/rtl8366rb.c
1332
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1364
rtl8366rb_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/realtek/rtl8366rb.c
1366
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1376
static int rtl8366rb_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/realtek/rtl8366rb.c
1378
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
1423
static int rtl8366rb_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/realtek/rtl8366rb.c
1594
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl8366rb.c
1619
if (dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
drivers/net/dsa/realtek/rtl8366rb.c
795
static int rtl8366rb_setup(struct dsa_switch *ds)
drivers/net/dsa/realtek/rtl8366rb.c
797
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl8366rb.c
880
RTL8366RB_PORT_ISO_PORTS(dsa_user_ports(ds)) |
drivers/net/dsa/realtek/rtl83xx.c
225
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl83xx.c
234
ds->priv = priv;
drivers/net/dsa/realtek/rtl83xx.c
235
ds->dev = priv->dev;
drivers/net/dsa/realtek/rtl83xx.c
236
ds->ops = priv->variant->ds_ops;
drivers/net/dsa/realtek/rtl83xx.c
237
ds->phylink_mac_ops = priv->variant->phylink_mac_ops;
drivers/net/dsa/realtek/rtl83xx.c
238
ds->num_ports = priv->num_ports;
drivers/net/dsa/realtek/rtl83xx.c
240
ret = dsa_register_switch(ds);
drivers/net/dsa/realtek/rtl83xx.c
261
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl83xx.c
263
dsa_unregister_switch(ds);
drivers/net/dsa/realtek/rtl83xx.c
280
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/realtek/rtl83xx.c
282
dsa_switch_shutdown(ds);
drivers/net/dsa/realtek/rtl83xx.c
72
int rtl83xx_setup_user_mdio(struct dsa_switch *ds)
drivers/net/dsa/realtek/rtl83xx.c
74
struct realtek_priv *priv = ds->priv;
drivers/net/dsa/realtek/rtl83xx.h
13
int rtl83xx_setup_user_mdio(struct dsa_switch *ds);
drivers/net/dsa/rzn1_a5psw.c
1211
struct dsa_switch *ds;
drivers/net/dsa/rzn1_a5psw.c
1256
ds = &a5psw->ds;
drivers/net/dsa/rzn1_a5psw.c
1257
ds->dev = dev;
drivers/net/dsa/rzn1_a5psw.c
1258
ds->num_ports = A5PSW_PORTS_NUM;
drivers/net/dsa/rzn1_a5psw.c
1259
ds->ops = &a5psw_switch_ops;
drivers/net/dsa/rzn1_a5psw.c
1260
ds->phylink_mac_ops = &a5psw_phylink_mac_ops;
drivers/net/dsa/rzn1_a5psw.c
1261
ds->priv = a5psw;
drivers/net/dsa/rzn1_a5psw.c
1263
ret = dsa_register_switch(ds);
drivers/net/dsa/rzn1_a5psw.c
1284
dsa_unregister_switch(&a5psw->ds);
drivers/net/dsa/rzn1_a5psw.c
1295
dsa_switch_shutdown(&a5psw->ds);
drivers/net/dsa/rzn1_a5psw.c
187
static void a5psw_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/rzn1_a5psw.c
189
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
195
static int a5psw_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
198
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
206
static int a5psw_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/rzn1_a5psw.c
208
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
216
static int a5psw_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/rzn1_a5psw.c
221
static void a5psw_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
228
if (dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/rzn1_a5psw.c
246
struct a5psw *a5psw = dp->ds->priv;
drivers/net/dsa/rzn1_a5psw.c
265
struct a5psw *a5psw = dp->ds->priv;
drivers/net/dsa/rzn1_a5psw.c
284
struct a5psw *a5psw = dp->ds->priv;
drivers/net/dsa/rzn1_a5psw.c
300
static int a5psw_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/rzn1_a5psw.c
302
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
358
static int a5psw_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
363
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
380
static void a5psw_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
383
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
394
static int a5psw_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
406
a5psw_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
410
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
447
static void a5psw_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/rzn1_a5psw.c
450
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/rzn1_a5psw.c
451
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
472
dev_err(ds->dev, "invalid STP state: %d\n", state);
drivers/net/dsa/rzn1_a5psw.c
481
static void a5psw_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/rzn1_a5psw.c
483
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
507
static int a5psw_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
511
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
558
static int a5psw_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
562
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
617
static int a5psw_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
620
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
653
static int a5psw_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
660
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
739
static int a5psw_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
745
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
770
static int a5psw_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
773
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
798
static void a5psw_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/rzn1_a5psw.c
810
static void a5psw_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
813
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
820
static int a5psw_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/rzn1_a5psw.c
828
static void a5psw_get_eth_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
831
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
867
static void a5psw_get_rmon_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
871
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
890
static void a5psw_get_eth_ctrl_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/rzn1_a5psw.c
893
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
923
static int a5psw_setup(struct dsa_switch *ds)
drivers/net/dsa/rzn1_a5psw.c
925
struct a5psw *a5psw = ds->priv;
drivers/net/dsa/rzn1_a5psw.c
931
dsa_switch_for_each_cpu_port(dp, ds) {
drivers/net/dsa/rzn1_a5psw.c
95
static enum dsa_tag_protocol a5psw_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/rzn1_a5psw.c
975
dsa_switch_for_each_port(dp, ds) {
drivers/net/dsa/rzn1_a5psw.h
257
struct dsa_switch ds;
drivers/net/dsa/sja1105/sja1105.h
142
int (*reset_cmd)(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
145
int (*fdb_add_cmd)(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
147
int (*fdb_del_cmd)(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
151
bool (*rxtstamp)(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/sja1105/sja1105.h
152
void (*txtstamp)(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/sja1105/sja1105.h
261
struct dsa_switch *ds;
drivers/net/dsa/sja1105/sja1105.h
305
int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
drivers/net/dsa/sja1105/sja1105.h
310
int sja1105_mdiobus_register(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
311
void sja1105_mdiobus_unregister(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
320
int sja1105_devlink_setup(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
321
void sja1105_devlink_teardown(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
322
int sja1105_devlink_info_get(struct dsa_switch *ds,
drivers/net/dsa/sja1105/sja1105.h
374
void sja1105_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data);
drivers/net/dsa/sja1105/sja1105.h
375
void sja1105_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
377
int sja1105_get_sset_count(struct dsa_switch *ds, int port, int sset);
drivers/net/dsa/sja1105/sja1105.h
405
int sja1105et_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
407
int sja1105et_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
409
int sja1105pqrs_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
411
int sja1105pqrs_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
415
int sja1105_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
417
int sja1105_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
419
int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105.h
421
void sja1105_flower_setup(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105.h
422
void sja1105_flower_teardown(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_clocking.c
117
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
275
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
589
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
692
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
738
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
769
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_clocking.c
812
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_clocking.c
815
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_devlink.c
108
static void sja1105_teardown_devlink_regions(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_devlink.c
111
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_devlink.c
119
int sja1105_devlink_info_get(struct dsa_switch *ds,
drivers/net/dsa/sja1105/sja1105_devlink.c
123
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_devlink.c
130
int sja1105_devlink_setup(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_devlink.c
132
return sja1105_setup_devlink_regions(ds);
drivers/net/dsa/sja1105/sja1105_devlink.c
135
void sja1105_devlink_teardown(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_devlink.c
137
sja1105_teardown_devlink_regions(ds);
drivers/net/dsa/sja1105/sja1105_devlink.c
41
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
drivers/net/dsa/sja1105/sja1105_devlink.c
42
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_devlink.c
77
static int sja1105_setup_devlink_regions(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_devlink.c
80
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_devlink.c
93
region = dsa_devlink_region_create(ds, ops, 1, size);
drivers/net/dsa/sja1105/sja1105_ethtool.c
561
void sja1105_get_ethtool_stats(struct dsa_switch *ds, int port, u64 *data)
drivers/net/dsa/sja1105/sja1105_ethtool.c
563
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ethtool.c
579
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_ethtool.c
587
void sja1105_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ethtool.c
590
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ethtool.c
610
int sja1105_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/sja1105/sja1105_ethtool.c
612
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
346
int sja1105_cls_flower_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_flower.c
351
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
379
int cpu = dsa_upstream_port(ds, port);
drivers/net/dsa/sja1105/sja1105_flower.c
38
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_flower.c
462
int sja1105_cls_flower_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_flower.c
465
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
479
int bcast = (ds->num_ports * SJA1105_NUM_TC) + port;
drivers/net/dsa/sja1105/sja1105_flower.c
502
int sja1105_cls_flower_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_flower.c
505
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
523
void sja1105_flower_setup(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_flower.c
525
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
530
for (port = 0; port < ds->num_ports; port++)
drivers/net/dsa/sja1105/sja1105_flower.c
534
void sja1105_flower_teardown(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_flower.c
536
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_flower.c
63
if (policing[(ds->num_ports * SJA1105_NUM_TC) + port].sharindx != port) {
drivers/net/dsa/sja1105/sja1105_flower.c
76
int bcast = (ds->num_ports * SJA1105_NUM_TC) + p;
drivers/net/dsa/sja1105/sja1105_main.c
1010
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
1032
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
1033
int mcast = (ds->num_ports * (SJA1105_NUM_TC + 1)) + port;
drivers/net/dsa/sja1105/sja1105_main.c
1034
int bcast = (ds->num_ports * SJA1105_NUM_TC) + port;
drivers/net/dsa/sja1105/sja1105_main.c
1046
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
1049
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
118
static int sja1105_commit_pvid(struct dsa_switch *ds, int port)
drivers/net/dsa/sja1105/sja1105_main.c
120
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
122
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1263
struct device *dev = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_main.c
1299
dev_err(priv->ds->dev, "Invalid speed %iMbps\n", speed_mbps);
drivers/net/dsa/sja1105/sja1105_main.c
1334
struct sja1105_private *priv = dp->ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1351
sja1105_inhibit_tx(dp->ds->priv, BIT(dp->index), true);
drivers/net/dsa/sja1105/sja1105_main.c
1362
struct sja1105_private *priv = dp->ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1369
static void sja1105_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1372
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1526
int sja1105et_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
153
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
1530
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1531
struct device *dev = ds->dev;
drivers/net/dsa/sja1105/sja1105_main.c
156
return sja1105_drop_untagged(ds, port, drop_untagged);
drivers/net/dsa/sja1105/sja1105_main.c
1611
int sja1105et_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1615
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1646
int sja1105pqrs_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1650
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1691
dev_err(ds->dev, "FDB is full, cannot add entry.\n");
drivers/net/dsa/sja1105/sja1105_main.c
1721
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
1737
int sja1105pqrs_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1741
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1774
static int sja1105_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1778
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1795
rc = priv->info->fdb_add_cmd(ds, port, addr, vid);
drivers/net/dsa/sja1105/sja1105_main.c
1801
static int __sja1105_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1805
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1820
return priv->info->fdb_del_cmd(ds, port, addr, vid);
drivers/net/dsa/sja1105/sja1105_main.c
1823
static int sja1105_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1827
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1831
rc = __sja1105_fdb_del(ds, port, addr, vid, db);
drivers/net/dsa/sja1105/sja1105_main.c
1837
static int sja1105_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1840
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1841
struct device *dev = ds->dev;
drivers/net/dsa/sja1105/sja1105_main.c
1886
static void sja1105_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/sja1105/sja1105_main.c
1888
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
1889
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
1912
dev_err(ds->dev, "Failed to read FDB: %pe\n",
drivers/net/dsa/sja1105/sja1105_main.c
1926
rc = __sja1105_fdb_del(ds, port, macaddr, l2_lookup.vlanid, db);
drivers/net/dsa/sja1105/sja1105_main.c
1928
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
1938
static int sja1105_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1942
return sja1105_fdb_add(ds, port, mdb->addr, mdb->vid, db);
drivers/net/dsa/sja1105/sja1105_main.c
1945
static int sja1105_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
1949
return sja1105_fdb_del(ds, port, mdb->addr, mdb->vid, db);
drivers/net/dsa/sja1105/sja1105_main.c
1961
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
1966
for (from = 0; from < ds->num_ports; from++) {
drivers/net/dsa/sja1105/sja1105_main.c
1969
for (to = 0; to < priv->ds->num_ports; to++) {
drivers/net/dsa/sja1105/sja1105_main.c
1996
static int sja1105_bridge_member(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2000
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2005
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/sja1105/sja1105_main.c
2009
if (!dsa_is_user_port(ds, i))
drivers/net/dsa/sja1105/sja1105_main.c
201
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
2022
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/sja1105/sja1105_main.c
2038
rc = sja1105_commit_pvid(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2045
static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2048
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2049
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2078
dev_err(ds->dev, "invalid STP state: %d\n", state);
drivers/net/dsa/sja1105/sja1105_main.c
2086
static int sja1105_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2093
rc = sja1105_bridge_member(ds, port, bridge, true);
drivers/net/dsa/sja1105/sja1105_main.c
2097
rc = dsa_tag_8021q_bridge_join(ds, port, bridge, tx_fwd_offload,
drivers/net/dsa/sja1105/sja1105_main.c
2100
sja1105_bridge_member(ds, port, bridge, false);
drivers/net/dsa/sja1105/sja1105_main.c
2107
static void sja1105_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2110
dsa_tag_8021q_bridge_leave(ds, port, bridge);
drivers/net/dsa/sja1105/sja1105_main.c
2111
sja1105_bridge_member(ds, port, bridge, false);
drivers/net/dsa/sja1105/sja1105_main.c
2169
static int sja1105_setup_tc_cbs(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2172
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
222
list_for_each_entry(dp, &ds->dst->ports, list) {
drivers/net/dsa/sja1105/sja1105_main.c
223
if (dp->ds != ds)
drivers/net/dsa/sja1105/sja1105_main.c
2264
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
2280
dsa_switch_for_each_available_port(dp, ds) {
drivers/net/dsa/sja1105/sja1105_main.c
2294
rc = __sja1105_ptp_gettimex(ds, &now, &ptp_sts_before);
drivers/net/dsa/sja1105/sja1105_main.c
2307
rc = __sja1105_ptp_settime(ds, 0, &ptp_sts_after);
drivers/net/dsa/sja1105/sja1105_main.c
2324
__sja1105_ptp_adjtime(ds, now);
drivers/net/dsa/sja1105/sja1105_main.c
2328
dev_info(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
2345
dsa_switch_for_each_available_port(dp, ds)
drivers/net/dsa/sja1105/sja1105_main.c
2356
sja1105_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2359
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2368
int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled,
drivers/net/dsa/sja1105/sja1105_main.c
2372
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2403
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
2404
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
2407
rc = sja1105_commit_pvid(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2499
static int sja1105_bridge_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2503
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2516
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
252
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
2526
return sja1105_commit_pvid(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2529
static int sja1105_bridge_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2532
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2542
return sja1105_commit_pvid(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2545
static int sja1105_dsa_8021q_vlan_add(struct dsa_switch *ds, int port, u16 vid,
drivers/net/dsa/sja1105/sja1105_main.c
2548
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2555
if (dsa_is_user_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
2565
return sja1105_commit_pvid(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
2568
static int sja1105_dsa_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid)
drivers/net/dsa/sja1105/sja1105_main.c
2570
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2575
static int sja1105_prechangeupper(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2580
struct dsa_switch_tree *dst = ds->dst;
drivers/net/dsa/sja1105/sja1105_main.c
2603
static int sja1105_mgmt_xmit(struct dsa_switch *ds, int port, int slot,
drivers/net/dsa/sja1105/sja1105_main.c
2607
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2628
dsa_enqueue_skb(skb, dsa_to_port(ds, port)->user);
drivers/net/dsa/sja1105/sja1105_main.c
2635
dev_err_ratelimited(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
2655
dev_err_ratelimited(priv->ds->dev, "xmit timed out\n");
drivers/net/dsa/sja1105/sja1105_main.c
2672
struct dsa_switch *ds = xmit_work->dp->ds;
drivers/net/dsa/sja1105/sja1105_main.c
2673
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2680
sja1105_mgmt_xmit(ds, port, 0, skb, !!clone);
drivers/net/dsa/sja1105/sja1105_main.c
2684
sja1105_ptp_txtstamp_skb(ds, port, clone);
drivers/net/dsa/sja1105/sja1105_main.c
2691
static int sja1105_connect_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/sja1105/sja1105_main.c
2694
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2700
tagger_data = sja1105_tagger_data(ds);
drivers/net/dsa/sja1105/sja1105_main.c
2710
static int sja1105_set_ageing_time(struct dsa_switch *ds,
drivers/net/dsa/sja1105/sja1105_main.c
2714
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2731
static int sja1105_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/sja1105/sja1105_main.c
2734
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2738
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
274
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/sja1105/sja1105_main.c
2751
static int sja1105_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/sja1105/sja1105_main.c
2756
static int sja1105_port_setup_tc(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2762
return sja1105_setup_tc_taprio(ds, port, type_data);
drivers/net/dsa/sja1105/sja1105_main.c
2764
return sja1105_setup_tc_cbs(ds, port, type_data);
drivers/net/dsa/sja1105/sja1105_main.c
277
if (dsa_is_unused_port(priv->ds, i))
drivers/net/dsa/sja1105/sja1105_main.c
2781
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
2792
already_enabled = (general_params->mirr_port != ds->num_ports);
drivers/net/dsa/sja1105/sja1105_main.c
2794
dev_err(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
2806
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
2814
new_mirr_port = ds->num_ports;
drivers/net/dsa/sja1105/sja1105_main.c
2834
static int sja1105_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2838
return sja1105_mirror_apply(ds->priv, port, mirror->to_local_port,
drivers/net/dsa/sja1105/sja1105_main.c
2842
static void sja1105_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2845
sja1105_mirror_apply(ds->priv, port, mirror->to_local_port,
drivers/net/dsa/sja1105/sja1105_main.c
2849
static int sja1105_port_policer_add(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2853
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2868
static void sja1105_port_policer_del(struct dsa_switch *ds, int port)
drivers/net/dsa/sja1105/sja1105_main.c
2871
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2953
static int sja1105_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2957
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
2978
static int sja1105_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_main.c
2982
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
3025
static int sja1105_setup(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_main.c
3027
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
3033
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
3043
dev_err(ds->dev, "Failed to load static config: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_main.c
3051
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
3058
sja1105_tas_setup(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3059
sja1105_flower_setup(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3061
rc = sja1105_ptp_clock_register(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3063
dev_err(ds->dev, "Failed to register PTP clock: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_main.c
3067
rc = sja1105_mdiobus_register(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3069
dev_err(ds->dev, "Failed to register MDIO bus: %pe\n",
drivers/net/dsa/sja1105/sja1105_main.c
3074
rc = sja1105_devlink_setup(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3079
rc = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q));
drivers/net/dsa/sja1105/sja1105_main.c
3092
ds->vlan_filtering_is_global = true;
drivers/net/dsa/sja1105/sja1105_main.c
3093
ds->fdb_isolation = true;
drivers/net/dsa/sja1105/sja1105_main.c
3094
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
drivers/net/dsa/sja1105/sja1105_main.c
3097
ds->num_tx_queues = SJA1105_NUM_TC;
drivers/net/dsa/sja1105/sja1105_main.c
3099
ds->mtu_enforcement_ingress = true;
drivers/net/dsa/sja1105/sja1105_main.c
3100
ds->assisted_learning_on_cpu_port = true;
drivers/net/dsa/sja1105/sja1105_main.c
3105
sja1105_devlink_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3107
sja1105_mdiobus_unregister(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3109
sja1105_ptp_clock_unregister(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3111
sja1105_flower_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3112
sja1105_tas_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3119
static void sja1105_teardown(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_main.c
3121
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_main.c
3124
dsa_tag_8021q_unregister(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3127
sja1105_devlink_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3128
sja1105_mdiobus_unregister(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3129
sja1105_ptp_clock_unregister(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3130
sja1105_flower_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3131
sja1105_tas_teardown(ds);
drivers/net/dsa/sja1105/sja1105_main.c
3241
struct dsa_switch *ds;
drivers/net/dsa/sja1105/sja1105_main.c
3309
ds = devm_kzalloc(dev, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/sja1105/sja1105_main.c
3310
if (!ds)
drivers/net/dsa/sja1105/sja1105_main.c
3313
ds->dev = dev;
drivers/net/dsa/sja1105/sja1105_main.c
3314
ds->num_ports = priv->info->num_ports;
drivers/net/dsa/sja1105/sja1105_main.c
3315
ds->ops = &sja1105_switch_ops;
drivers/net/dsa/sja1105/sja1105_main.c
3316
ds->phylink_mac_ops = &sja1105_phylink_mac_ops;
drivers/net/dsa/sja1105/sja1105_main.c
3317
ds->priv = priv;
drivers/net/dsa/sja1105/sja1105_main.c
3318
priv->ds = ds;
drivers/net/dsa/sja1105/sja1105_main.c
3328
dev_err(ds->dev, "Failed to parse DT: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_main.c
3340
return dsa_register_switch(priv->ds);
drivers/net/dsa/sja1105/sja1105_main.c
3350
dsa_unregister_switch(priv->ds);
drivers/net/dsa/sja1105/sja1105_main.c
3360
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/sja1105/sja1105_main.c
378
for (port = 0; port < priv->ds->num_ports; port++)
drivers/net/dsa/sja1105/sja1105_main.c
379
if (!dsa_is_unused_port(priv->ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
415
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
420
for (port = 0; port < ds->num_ports; port++)
drivers/net/dsa/sja1105/sja1105_main.c
421
if (!dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
426
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
427
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
473
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
490
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
491
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
498
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)) {
drivers/net/dsa/sja1105/sja1105_main.c
511
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
538
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
539
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
549
for (from = 0; from < ds->num_ports; from++) {
drivers/net/dsa/sja1105/sja1105_main.c
550
if (!dsa_is_user_port(ds, from))
drivers/net/dsa/sja1105/sja1105_main.c
553
for (to = 0; to < ds->num_ports; to++) {
drivers/net/dsa/sja1105/sja1105_main.c
554
if (!dsa_is_cpu_port(ds, to) &&
drivers/net/dsa/sja1105/sja1105_main.c
555
!dsa_is_dsa_port(ds, to))
drivers/net/dsa/sja1105/sja1105_main.c
569
for (from = 0; from < ds->num_ports; from++) {
drivers/net/dsa/sja1105/sja1105_main.c
570
if (!dsa_is_cpu_port(ds, from) && !dsa_is_dsa_port(ds, from))
drivers/net/dsa/sja1105/sja1105_main.c
573
for (to = 0; to < ds->num_ports; to++) {
drivers/net/dsa/sja1105/sja1105_main.c
574
if (dsa_is_unused_port(ds, to))
drivers/net/dsa/sja1105/sja1105_main.c
595
dst = ds->dst;
drivers/net/dsa/sja1105/sja1105_main.c
598
if (dl->dp->ds != ds || dl->link_dp->cpu_dp == dl->dp->cpu_dp)
drivers/net/dsa/sja1105/sja1105_main.c
602
to = dsa_upstream_port(ds, from);
drivers/net/dsa/sja1105/sja1105_main.c
604
dev_warn(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
617
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
618
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
629
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
630
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
633
l2fwd[ds->num_ports + tc].vlan_pmap[port] = tc;
drivers/net/dsa/sja1105/sja1105_main.c
636
l2fwd[ds->num_ports + tc].type_egrpcp2outputq = true;
drivers/net/dsa/sja1105/sja1105_main.c
645
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
670
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
671
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_main.c
794
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_main.c
801
general_params->host_port = ds->num_ports;
drivers/net/dsa/sja1105/sja1105_main.c
814
general_params->casc_port = ds->num_ports;
drivers/net/dsa/sja1105/sja1105_main.c
816
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_main.c
817
bool is_upstream = dsa_is_upstream_port(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
818
bool is_dsa_link = dsa_is_dsa_port(ds, port);
drivers/net/dsa/sja1105/sja1105_main.c
824
if (general_params->host_port == ds->num_ports) {
drivers/net/dsa/sja1105/sja1105_main.c
827
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
838
} else if (general_params->casc_port == ds->num_ports) {
drivers/net/dsa/sja1105/sja1105_main.c
841
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_main.c
849
if (general_params->host_port == ds->num_ports) {
drivers/net/dsa/sja1105/sja1105_main.c
850
dev_err(ds->dev, "No host port configured\n");
drivers/net/dsa/sja1105/sja1105_main.c
862
.switchid = priv->ds->index,
drivers/net/dsa/sja1105/sja1105_main.c
87
static int sja1105_drop_untagged(struct dsa_switch *ds, int port, bool drop)
drivers/net/dsa/sja1105/sja1105_main.c
876
.mirr_port = priv->ds->num_ports,
drivers/net/dsa/sja1105/sja1105_main.c
89
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_mdio.c
281
dev_name(priv->ds->dev));
drivers/net/dsa/sja1105/sja1105_mdio.c
284
bus->parent = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_mdio.c
335
dev_name(priv->ds->dev));
drivers/net/dsa/sja1105/sja1105_mdio.c
340
bus->parent = priv->ds->dev;
drivers/net/dsa/sja1105/sja1105_mdio.c
371
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_mdio.c
385
dev_name(ds->dev));
drivers/net/dsa/sja1105/sja1105_mdio.c
388
bus->parent = ds->dev;
drivers/net/dsa/sja1105/sja1105_mdio.c
402
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_mdio.c
405
if (dsa_is_unused_port(ds, port))
drivers/net/dsa/sja1105/sja1105_mdio.c
426
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_mdio.c
441
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_mdio.c
447
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_mdio.c
459
int sja1105_mdiobus_register(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_mdio.c
461
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_mdio.c
463
struct device_node *switch_node = ds->dev->of_node;
drivers/net/dsa/sja1105/sja1105_mdio.c
500
void sja1105_mdiobus_unregister(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_mdio.c
502
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
102
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
117
int sja1105_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.c
120
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
172
int sja1105_ptp_commit(struct dsa_switch *ds, struct sja1105_ptp_cmd *cmd,
drivers/net/dsa/sja1105/sja1105_ptp.c
175
const struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
206
static u64 sja1105_tstamp_reconstruct(struct dsa_switch *ds, u64 now,
drivers/net/dsa/sja1105/sja1105_ptp.c
209
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
251
static int sja1105_ptpegr_ts_poll(struct dsa_switch *ds, int port, u64 *ts)
drivers/net/dsa/sja1105/sja1105_ptp.c
253
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
327
dev_err_ratelimited(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_ptp.c
344
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_ptp.c
356
dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_ptp.c
364
ts = sja1105_tstamp_reconstruct(ds, ticks, ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
379
bool sja1105_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
drivers/net/dsa/sja1105/sja1105_ptp.c
381
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
395
bool sja1110_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
drivers/net/dsa/sja1105/sja1105_ptp.c
409
bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.c
412
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
414
return priv->info->rxtstamp(ds, port, skb);
drivers/net/dsa/sja1105/sja1105_ptp.c
417
void sja1110_process_meta_tstamp(struct dsa_switch *ds, int port, u8 ts_id,
drivers/net/dsa/sja1105/sja1105_ptp.c
420
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
454
void sja1110_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
drivers/net/dsa/sja1105/sja1105_ptp.c
457
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
480
void sja1105_port_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb)
drivers/net/dsa/sja1105/sja1105_ptp.c
482
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
495
priv->info->txtstamp(ds, port, skb);
drivers/net/dsa/sja1105/sja1105_ptp.c
498
static int sja1105_ptp_reset(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_ptp.c
500
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
509
dev_dbg(ds->dev, "Resetting PTP clock\n");
drivers/net/dsa/sja1105/sja1105_ptp.c
510
rc = sja1105_ptp_commit(ds, &cmd, SPI_WRITE);
drivers/net/dsa/sja1105/sja1105_ptp.c
512
sja1105_tas_clockstep(priv->ds);
drivers/net/dsa/sja1105/sja1105_ptp.c
520
int __sja1105_ptp_gettimex(struct dsa_switch *ds, u64 *ns,
drivers/net/dsa/sja1105/sja1105_ptp.c
523
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
529
dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_ptp.c
549
rc = __sja1105_ptp_gettimex(priv->ds, &now, ptp_sts);
drivers/net/dsa/sja1105/sja1105_ptp.c
568
return sja1105_ptp_commit(priv->ds, &ptp_data->cmd, SPI_WRITE);
drivers/net/dsa/sja1105/sja1105_ptp.c
572
int __sja1105_ptp_settime(struct dsa_switch *ds, u64 ns,
drivers/net/dsa/sja1105/sja1105_ptp.c
575
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
581
dev_err(priv->ds->dev, "Failed to put PTPCLK in set mode\n");
drivers/net/dsa/sja1105/sja1105_ptp.c
587
sja1105_tas_clockstep(priv->ds);
drivers/net/dsa/sja1105/sja1105_ptp.c
602
rc = __sja1105_ptp_settime(priv->ds, ns, NULL);
drivers/net/dsa/sja1105/sja1105_ptp.c
61
int sja1105_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.c
631
sja1105_tas_adjfreq(priv->ds);
drivers/net/dsa/sja1105/sja1105_ptp.c
639
int __sja1105_ptp_adjtime(struct dsa_switch *ds, s64 delta)
drivers/net/dsa/sja1105/sja1105_ptp.c
641
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
647
dev_err(priv->ds->dev, "Failed to put PTPCLK in add mode\n");
drivers/net/dsa/sja1105/sja1105_ptp.c
65
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
653
sja1105_tas_clockstep(priv->ds);
drivers/net/dsa/sja1105/sja1105_ptp.c
666
rc = __sja1105_ptp_adjtime(priv->ds, delta);
drivers/net/dsa/sja1105/sja1105_ptp.c
771
rc = __sja1105_ptp_gettimex(priv->ds, &now, NULL);
drivers/net/dsa/sja1105/sja1105_ptp.c
795
rc = sja1105_ptp_commit(priv->ds, &cmd, SPI_WRITE);
drivers/net/dsa/sja1105/sja1105_ptp.c
878
int sja1105_ptp_clock_register(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_ptp.c
880
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
908
ptp_data->clock = ptp_clock_register(&ptp_data->caps, ds->dev);
drivers/net/dsa/sja1105/sja1105_ptp.c
917
return sja1105_ptp_reset(ds);
drivers/net/dsa/sja1105/sja1105_ptp.c
920
void sja1105_ptp_clock_unregister(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_ptp.c
922
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
936
void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.c
939
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_ptp.c
949
rc = sja1105_ptpegr_ts_poll(ds, port, &ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
951
dev_err(ds->dev, "timed out polling for tstamp\n");
drivers/net/dsa/sja1105/sja1105_ptp.c
958
dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc);
drivers/net/dsa/sja1105/sja1105_ptp.c
963
ts = sja1105_tstamp_reconstruct(ds, ticks, ts);
drivers/net/dsa/sja1105/sja1105_ptp.c
99
int sja1105_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
103
int sja1105_get_ts_info(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
106
void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int slot,
drivers/net/dsa/sja1105/sja1105_ptp.h
109
bool sja1105_port_rxtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
112
void sja1105_port_txtstamp(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
115
int sja1105_hwtstamp_get(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
118
int sja1105_hwtstamp_set(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_ptp.h
122
int __sja1105_ptp_gettimex(struct dsa_switch *ds, u64 *ns,
drivers/net/dsa/sja1105/sja1105_ptp.h
125
int __sja1105_ptp_settime(struct dsa_switch *ds, u64 ns,
drivers/net/dsa/sja1105/sja1105_ptp.h
128
int __sja1105_ptp_adjtime(struct dsa_switch *ds, s64 delta);
drivers/net/dsa/sja1105/sja1105_ptp.h
130
int sja1105_ptp_commit(struct dsa_switch *ds, struct sja1105_ptp_cmd *cmd,
drivers/net/dsa/sja1105/sja1105_ptp.h
133
bool sja1105_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/sja1105/sja1105_ptp.h
134
bool sja1110_rxtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/sja1105/sja1105_ptp.h
135
void sja1110_txtstamp(struct dsa_switch *ds, int port, struct sk_buff *skb);
drivers/net/dsa/sja1105/sja1105_ptp.h
137
void sja1110_process_meta_tstamp(struct dsa_switch *ds, int port, u8 ts_id,
drivers/net/dsa/sja1105/sja1105_ptp.h
152
static inline int sja1105_ptp_clock_register(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_ptp.h
157
static inline void sja1105_ptp_clock_unregister(struct dsa_switch *ds) { }
drivers/net/dsa/sja1105/sja1105_ptp.h
159
static inline void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int slot,
drivers/net/dsa/sja1105/sja1105_ptp.h
164
static inline int __sja1105_ptp_gettimex(struct dsa_switch *ds, u64 *ns,
drivers/net/dsa/sja1105/sja1105_ptp.h
170
static inline int __sja1105_ptp_settime(struct dsa_switch *ds, u64 ns,
drivers/net/dsa/sja1105/sja1105_ptp.h
176
static inline int __sja1105_ptp_adjtime(struct dsa_switch *ds, s64 delta)
drivers/net/dsa/sja1105/sja1105_ptp.h
181
static inline int sja1105_ptp_commit(struct dsa_switch *ds,
drivers/net/dsa/sja1105/sja1105_ptp.h
93
int sja1105_ptp_clock_register(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_ptp.h
95
void sja1105_ptp_clock_unregister(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_spi.c
176
static int sja1105et_reset_cmd(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_spi.c
178
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_spi.c
186
static int sja1105pqrs_reset_cmd(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_spi.c
188
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_spi.c
196
static int sja1110_reset_cmd(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_spi.c
198
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_spi.c
320
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_spi.c
341
rc = sja1105_inhibit_tx(priv, GENMASK_ULL(ds->num_ports - 1, 0), true);
drivers/net/dsa/sja1105/sja1105_spi.c
354
rc = priv->info->reset_cmd(priv->ds);
drivers/net/dsa/sja1105/sja1105_tas.c
167
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
21
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
211
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_tas.c
273
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_tas.c
30
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_tas.c
448
dev_warn(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_tas.c
472
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
496
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_tas.c
509
int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_tas.c
512
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_tas.c
555
dev_err(priv->ds->dev,
drivers/net/dsa/sja1105/sja1105_tas.c
562
for (other_port = 0; other_port < ds->num_ports; other_port++) {
drivers/net/dsa/sja1105/sja1105_tas.c
571
dev_err(ds->dev, "Conflict with tc-gate schedule\n");
drivers/net/dsa/sja1105/sja1105_tas.c
587
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
591
rc = sja1105_ptp_commit(ds, &cmd, SPI_READ);
drivers/net/dsa/sja1105/sja1105_tas.c
634
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
637
dev_dbg(ds->dev, "Starting the TAS\n");
drivers/net/dsa/sja1105/sja1105_tas.c
641
dev_err(ds->dev, "TAS already started\n");
drivers/net/dsa/sja1105/sja1105_tas.c
648
rc = sja1105_ptp_commit(ds, cmd, SPI_WRITE);
drivers/net/dsa/sja1105/sja1105_tas.c
661
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
664
dev_dbg(ds->dev, "Stopping the TAS\n");
drivers/net/dsa/sja1105/sja1105_tas.c
667
dev_err(ds->dev, "TAS already disabled\n");
drivers/net/dsa/sja1105/sja1105_tas.c
674
rc = sja1105_ptp_commit(ds, cmd, SPI_WRITE);
drivers/net/dsa/sja1105/sja1105_tas.c
730
struct dsa_switch *ds = priv->ds;
drivers/net/dsa/sja1105/sja1105_tas.c
747
rc = __sja1105_ptp_gettimex(ds, &now, NULL);
drivers/net/dsa/sja1105/sja1105_tas.c
77
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_tas.c
778
dev_dbg(ds->dev, "OPER base time %ptSp (now %ptSp)\n",
drivers/net/dsa/sja1105/sja1105_tas.c
793
rc = __sja1105_ptp_gettimex(ds, &now, NULL);
drivers/net/dsa/sja1105/sja1105_tas.c
800
dev_dbg(ds->dev, "time to start: [%ptSp]", &diff);
drivers/net/dsa/sja1105/sja1105_tas.c
811
dev_err(ds->dev,
drivers/net/dsa/sja1105/sja1105_tas.c
828
dev_err(ds->dev, "TAS surprisingly stopped\n");
drivers/net/dsa/sja1105/sja1105_tas.c
834
dev_err(ds->dev, "TAS in an invalid state (incorrect use of API)!\n");
drivers/net/dsa/sja1105/sja1105_tas.c
838
dev_err(ds->dev, "An operation returned %d\n", rc);
drivers/net/dsa/sja1105/sja1105_tas.c
843
void sja1105_tas_clockstep(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_tas.c
845
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_tas.c
855
void sja1105_tas_adjfreq(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_tas.c
857
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_tas.c
86
dev_dbg(ds->dev, "earliest base time %lld ns\n", earliest_base_time);
drivers/net/dsa/sja1105/sja1105_tas.c
87
dev_dbg(ds->dev, "latest base time %lld ns\n", latest_base_time);
drivers/net/dsa/sja1105/sja1105_tas.c
871
void sja1105_tas_setup(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_tas.c
873
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_tas.c
88
dev_dbg(ds->dev, "longest cycle time %lld ns\n", max_cycle_time);
drivers/net/dsa/sja1105/sja1105_tas.c
883
void sja1105_tas_teardown(struct dsa_switch *ds)
drivers/net/dsa/sja1105/sja1105_tas.c
885
struct sja1105_private *priv = ds->priv;
drivers/net/dsa/sja1105/sja1105_tas.c
891
for (port = 0; port < ds->num_ports; port++) {
drivers/net/dsa/sja1105/sja1105_tas.h
53
int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_tas.h
56
void sja1105_tas_setup(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_tas.h
58
void sja1105_tas_teardown(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_tas.h
60
void sja1105_tas_clockstep(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_tas.h
62
void sja1105_tas_adjfreq(struct dsa_switch *ds);
drivers/net/dsa/sja1105/sja1105_tas.h
76
static inline int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_tas.h
82
static inline void sja1105_tas_setup(struct dsa_switch *ds) { }
drivers/net/dsa/sja1105/sja1105_tas.h
84
static inline void sja1105_tas_teardown(struct dsa_switch *ds) { }
drivers/net/dsa/sja1105/sja1105_tas.h
86
static inline void sja1105_tas_clockstep(struct dsa_switch *ds) { }
drivers/net/dsa/sja1105/sja1105_tas.h
88
static inline void sja1105_tas_adjfreq(struct dsa_switch *ds) { }
drivers/net/dsa/sja1105/sja1105_tas.h
91
sja1105_gating_check_conflicts(struct dsa_switch *ds, int port,
drivers/net/dsa/sja1105/sja1105_vl.c
117
dev_dbg(priv->ds->dev, "max_cycle_time %lld its_base_time %lld\n",
drivers/net/dsa/sja1105/sja1105_vl.c
411
struct dsa_port *dp = dsa_to_port(priv->ds, port);
drivers/net/dsa/sja1105/sja1105_vl.c
512
struct dsa_port *dp = dsa_to_port(priv->ds, port);
drivers/net/dsa/sja1105/sja1105_vl.c
588
struct dsa_port *dp = dsa_to_port(priv->ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1070
struct vsc73xx *vsc = dp->ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1094
struct vsc73xx *vsc = dp->ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1113
struct vsc73xx *vsc = dp->ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1288
struct dsa_port *dp = dsa_to_port(vsc->ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1336
struct dsa_port *dp = dsa_to_port(vsc->ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1404
struct dsa_port *dp = dsa_to_port(vsc->ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1430
static int vsc73xx_port_enable(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1433
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1441
static void vsc73xx_port_disable(struct dsa_switch *ds, int port)
drivers/net/dsa/vitesse-vsc73xx-core.c
1443
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1478
static void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/vitesse-vsc73xx-core.c
1482
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1528
static int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/vitesse-vsc73xx-core.c
1537
static void vsc73xx_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1540
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1566
static int vsc73xx_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/vitesse-vsc73xx-core.c
1568
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1579
static int vsc73xx_get_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/vitesse-vsc73xx-core.c
1610
vsc73xx_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1613
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1628
static int vsc73xx_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1634
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1638
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1715
static int vsc73xx_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1720
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1739
commit_to_hardware = !vsc73xx_tag_8021q_active(dsa_to_port(ds, port));
drivers/net/dsa/vitesse-vsc73xx-core.c
1747
static int vsc73xx_tag_8021q_vlan_add(struct dsa_switch *ds, int port, u16 vid,
drivers/net/dsa/vitesse-vsc73xx-core.c
1752
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1763
commit_to_hardware = vsc73xx_tag_8021q_active(dsa_to_port(ds, port));
drivers/net/dsa/vitesse-vsc73xx-core.c
1773
static int vsc73xx_tag_8021q_vlan_del(struct dsa_switch *ds, int port, u16 vid)
drivers/net/dsa/vitesse-vsc73xx-core.c
1776
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1782
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1799
static int vsc73xx_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1809
static int vsc73xx_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1815
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1824
static void vsc73xx_refresh_fwd_map(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/vitesse-vsc73xx-core.c
1826
struct dsa_port *other_dp, *dp = dsa_to_port(ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1827
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1838
dsa_switch_for_each_available_port(other_dp, ds) {
drivers/net/dsa/vitesse-vsc73xx-core.c
1857
dsa_switch_for_each_user_port(other_dp, ds) {
drivers/net/dsa/vitesse-vsc73xx-core.c
1881
static void vsc73xx_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
1884
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/vitesse-vsc73xx-core.c
1885
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
1903
vsc73xx_refresh_fwd_map(ds, port, state);
drivers/net/dsa/vitesse-vsc73xx-core.c
2137
static int vsc73xx_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
2140
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
2158
static int vsc73xx_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/vitesse-vsc73xx-core.c
2161
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
2179
static int vsc73xx_port_fdb_dump(struct dsa_switch *ds,
drivers/net/dsa/vitesse-vsc73xx-core.c
2183
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
2375
vsc->ds = devm_kzalloc(dev, sizeof(*vsc->ds), GFP_KERNEL);
drivers/net/dsa/vitesse-vsc73xx-core.c
2376
if (!vsc->ds)
drivers/net/dsa/vitesse-vsc73xx-core.c
2379
vsc->ds->dev = dev;
drivers/net/dsa/vitesse-vsc73xx-core.c
2380
vsc->ds->num_ports = VSC73XX_MAX_NUM_PORTS;
drivers/net/dsa/vitesse-vsc73xx-core.c
2381
vsc->ds->priv = vsc;
drivers/net/dsa/vitesse-vsc73xx-core.c
2383
vsc->ds->ops = &vsc73xx_ds_ops;
drivers/net/dsa/vitesse-vsc73xx-core.c
2384
vsc->ds->phylink_mac_ops = &vsc73xx_phylink_mac_ops;
drivers/net/dsa/vitesse-vsc73xx-core.c
2385
ret = dsa_register_switch(vsc->ds);
drivers/net/dsa/vitesse-vsc73xx-core.c
2393
dsa_unregister_switch(vsc->ds);
drivers/net/dsa/vitesse-vsc73xx-core.c
2403
dsa_unregister_switch(vsc->ds);
drivers/net/dsa/vitesse-vsc73xx-core.c
2410
dsa_switch_shutdown(vsc->ds);
drivers/net/dsa/vitesse-vsc73xx-core.c
621
static int vsc73xx_phy_read(struct dsa_switch *ds, int phy, int regnum)
drivers/net/dsa/vitesse-vsc73xx-core.c
623
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
662
static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,
drivers/net/dsa/vitesse-vsc73xx-core.c
665
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
686
static enum dsa_tag_protocol vsc73xx_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/vitesse-vsc73xx-core.c
786
static int vsc73xx_configure_rgmii_port_delay(struct dsa_switch *ds)
drivers/net/dsa/vitesse-vsc73xx-core.c
791
struct dsa_port *dp = dsa_to_port(ds, CPU_PORT);
drivers/net/dsa/vitesse-vsc73xx-core.c
793
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
847
static int vsc73xx_setup(struct dsa_switch *ds)
drivers/net/dsa/vitesse-vsc73xx-core.c
849
struct vsc73xx *vsc = ds->priv;
drivers/net/dsa/vitesse-vsc73xx-core.c
854
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
drivers/net/dsa/vitesse-vsc73xx-core.c
855
ds->fdb_isolation = true;
drivers/net/dsa/vitesse-vsc73xx-core.c
910
ret = vsc73xx_configure_rgmii_port_delay(ds);
drivers/net/dsa/vitesse-vsc73xx-core.c
945
ret = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q));
drivers/net/dsa/vitesse-vsc73xx-core.c
951
static void vsc73xx_teardown(struct dsa_switch *ds)
drivers/net/dsa/vitesse-vsc73xx-core.c
954
dsa_tag_8021q_unregister(ds);
drivers/net/dsa/vitesse-vsc73xx.h
53
struct dsa_switch *ds;
drivers/net/dsa/xrs700x/xrs700x.c
153
for (i = 0; i < priv->ds->num_ports; i++)
drivers/net/dsa/xrs700x/xrs700x.c
159
static void xrs700x_get_ethtool_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
162
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
172
static void xrs700x_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
175
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
190
priv->ds->num_ports,
drivers/net/dsa/xrs700x/xrs700x.c
196
priv->ds->num_ports,
drivers/net/dsa/xrs700x/xrs700x.c
202
priv->ds->num_ports,
drivers/net/dsa/xrs700x/xrs700x.c
208
priv->ds->num_ports,
drivers/net/dsa/xrs700x/xrs700x.c
226
static enum dsa_tag_protocol xrs700x_get_tag_protocol(struct dsa_switch *ds,
drivers/net/dsa/xrs700x/xrs700x.c
233
static int xrs700x_reset(struct dsa_switch *ds)
drivers/net/dsa/xrs700x/xrs700x.c
235
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
255
static void xrs700x_port_stp_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
258
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
277
dev_err(ds->dev, "invalid STP state: %d\n", state);
drivers/net/dsa/xrs700x/xrs700x.c
297
static int xrs700x_port_add_bpdu_ipf(struct dsa_switch *ds, int port)
drivers/net/dsa/xrs700x/xrs700x.c
299
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
319
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
320
if (dsa_is_cpu_port(ds, i))
drivers/net/dsa/xrs700x/xrs700x.c
340
static int xrs700x_port_add_hsrsup_ipf(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
343
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
363
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
364
if (dsa_is_cpu_port(ds, i))
drivers/net/dsa/xrs700x/xrs700x.c
383
static int xrs700x_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/xrs700x/xrs700x.c
385
bool cpu_port = dsa_is_cpu_port(ds, port);
drivers/net/dsa/xrs700x/xrs700x.c
386
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
390
xrs700x_port_stp_state_set(ds, port, BR_STATE_DISABLED);
drivers/net/dsa/xrs700x/xrs700x.c
393
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
394
if (!dsa_is_cpu_port(ds, i))
drivers/net/dsa/xrs700x/xrs700x.c
409
ret = xrs700x_port_add_bpdu_ipf(ds, port);
drivers/net/dsa/xrs700x/xrs700x.c
417
static int xrs700x_setup(struct dsa_switch *ds)
drivers/net/dsa/xrs700x/xrs700x.c
419
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
422
ret = xrs700x_reset(ds);
drivers/net/dsa/xrs700x/xrs700x.c
426
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
427
ret = xrs700x_port_setup(ds, i);
drivers/net/dsa/xrs700x/xrs700x.c
437
static void xrs700x_teardown(struct dsa_switch *ds)
drivers/net/dsa/xrs700x/xrs700x.c
439
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
444
static void xrs700x_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
462
dev_err(ds->dev, "Unsupported port: %i\n", port);
drivers/net/dsa/xrs700x/xrs700x.c
484
struct xrs700x *priv = dp->ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
508
static int xrs700x_bridge_common(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
512
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
515
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
516
if (dsa_is_cpu_port(ds, i))
drivers/net/dsa/xrs700x/xrs700x.c
521
if (dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/xrs700x/xrs700x.c
527
for (i = 0; i < ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
528
if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
drivers/net/dsa/xrs700x/xrs700x.c
547
static int xrs700x_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
551
return xrs700x_bridge_common(ds, port, bridge, true);
drivers/net/dsa/xrs700x/xrs700x.c
554
static void xrs700x_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
557
xrs700x_bridge_common(ds, port, bridge, false);
drivers/net/dsa/xrs700x/xrs700x.c
560
static int xrs700x_hsr_join(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
566
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
593
ret = hsr_get_port_type(hsr, dsa_to_port(ds, port)->user, &type);
drivers/net/dsa/xrs700x/xrs700x.c
603
dsa_hsr_foreach_port(dp, ds, hsr) {
drivers/net/dsa/xrs700x/xrs700x.c
628
val = GENMASK(ds->num_ports - 1, 0);
drivers/net/dsa/xrs700x/xrs700x.c
634
val &= ~BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/xrs700x/xrs700x.c
647
ret = xrs700x_port_add_hsrsup_ipf(ds, partner->index, fwd ? port : -1);
drivers/net/dsa/xrs700x/xrs700x.c
651
ret = xrs700x_port_add_hsrsup_ipf(ds, port, fwd ? partner->index : -1);
drivers/net/dsa/xrs700x/xrs700x.c
662
user = dsa_to_port(ds, hsr_pair[i])->user;
drivers/net/dsa/xrs700x/xrs700x.c
669
static int xrs700x_hsr_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
673
struct xrs700x *priv = ds->priv;
drivers/net/dsa/xrs700x/xrs700x.c
678
dsa_hsr_foreach_port(dp, ds, hsr) {
drivers/net/dsa/xrs700x/xrs700x.c
696
val = GENMASK(ds->num_ports - 1, 0);
drivers/net/dsa/xrs700x/xrs700x.c
697
val &= ~BIT(dsa_upstream_port(ds, port));
drivers/net/dsa/xrs700x/xrs700x.c
716
user = dsa_to_port(ds, hsr_pair[i])->user;
drivers/net/dsa/xrs700x/xrs700x.c
763
priv->ds->num_ports = info->num_ports;
drivers/net/dsa/xrs700x/xrs700x.c
776
struct dsa_switch *ds;
drivers/net/dsa/xrs700x/xrs700x.c
779
ds = devm_kzalloc(base, sizeof(*ds), GFP_KERNEL);
drivers/net/dsa/xrs700x/xrs700x.c
780
if (!ds)
drivers/net/dsa/xrs700x/xrs700x.c
783
ds->dev = base;
drivers/net/dsa/xrs700x/xrs700x.c
791
ds->ops = &xrs700x_ops;
drivers/net/dsa/xrs700x/xrs700x.c
792
ds->phylink_mac_ops = &xrs700x_phylink_mac_ops;
drivers/net/dsa/xrs700x/xrs700x.c
793
ds->priv = priv;
drivers/net/dsa/xrs700x/xrs700x.c
796
priv->ds = ds;
drivers/net/dsa/xrs700x/xrs700x.c
831
priv->ports = devm_kcalloc(priv->dev, priv->ds->num_ports,
drivers/net/dsa/xrs700x/xrs700x.c
836
for (i = 0; i < priv->ds->num_ports; i++) {
drivers/net/dsa/xrs700x/xrs700x.c
842
return dsa_register_switch(priv->ds);
drivers/net/dsa/xrs700x/xrs700x.c
848
dsa_unregister_switch(priv->ds);
drivers/net/dsa/xrs700x/xrs700x.c
854
dsa_switch_shutdown(priv->ds);
drivers/net/dsa/xrs700x/xrs700x.c
86
static void xrs700x_get_strings(struct dsa_switch *ds, int port,
drivers/net/dsa/xrs700x/xrs700x.c
98
static int xrs700x_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/xrs700x/xrs700x.h
28
struct dsa_switch *ds;
drivers/net/dsa/yt921x.c
1000
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1011
yt921x_dsa_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
drivers/net/dsa/yt921x.c
1017
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1018
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/yt921x.c
1035
static int yt921x_dsa_port_max_mtu(struct dsa_switch *ds, int port)
drivers/net/dsa/yt921x.c
1093
yt921x_dsa_port_mirror_del(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1096
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1110
yt921x_dsa_port_mirror_add(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1114
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1181
yt921x_dsa_port_lag_leave(struct dsa_switch *ds, int port, struct dsa_lag lag)
drivers/net/dsa/yt921x.c
1183
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1192
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/yt921x.c
1203
yt921x_dsa_port_lag_check(struct dsa_switch *ds, struct dsa_lag lag,
drivers/net/dsa/yt921x.c
1214
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/yt921x.c
1242
yt921x_dsa_port_lag_join(struct dsa_switch *ds, int port, struct dsa_lag lag,
drivers/net/dsa/yt921x.c
1246
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1253
res = yt921x_dsa_port_lag_check(ds, lag, info, extack);
drivers/net/dsa/yt921x.c
1285
dsa_lags_foreach_id(i, ds->dst)
drivers/net/dsa/yt921x.c
1286
if (i != lag.id && dsa_lag_by_id(ds->dst, i)) {
drivers/net/dsa/yt921x.c
1298
dsa_lag_foreach_port(dp, ds->dst, &lag)
drivers/net/dsa/yt921x.c
1666
yt921x_dsa_port_fdb_dump(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1669
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1682
static void yt921x_dsa_port_fast_age(struct dsa_switch *ds, int port)
drivers/net/dsa/yt921x.c
1684
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1698
yt921x_dsa_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)
drivers/net/dsa/yt921x.c
1700
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1715
yt921x_dsa_port_fdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1718
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1729
yt921x_dsa_port_fdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1732
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1743
yt921x_dsa_port_mdb_del(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1747
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1760
yt921x_dsa_port_mdb_add(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1764
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1806
struct dsa_port *dp = dsa_to_port(&priv->ds, port);
drivers/net/dsa/yt921x.c
185
#define to_yt921x_priv(_ds) container_of_const(_ds, struct yt921x_priv, ds)
drivers/net/dsa/yt921x.c
186
#define to_device(priv) ((priv)->ds.dev)
drivers/net/dsa/yt921x.c
1879
struct dsa_port *dp = dsa_to_port(&priv->ds, port);
drivers/net/dsa/yt921x.c
1905
struct dsa_port *dp = dsa_to_port(&priv->ds, port);
drivers/net/dsa/yt921x.c
1927
yt921x_dsa_port_vlan_filtering(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1931
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1934
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
1945
yt921x_dsa_port_vlan_del(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1948
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1953
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
1958
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/yt921x.c
1978
yt921x_dsa_port_vlan_add(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
1982
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
1990
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
1995
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/yt921x.c
2158
dsa_bridge_ports(struct dsa_switch *ds, const struct net_device *bdev)
drivers/net/dsa/yt921x.c
2163
dsa_switch_for_each_user_port(dp, ds)
drivers/net/dsa/yt921x.c
2205
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/yt921x.c
2206
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/yt921x.c
2213
ports_mask = dsa_bridge_ports(ds, bdev);
drivers/net/dsa/yt921x.c
2225
yt921x_dsa_port_pre_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2236
yt921x_dsa_port_bridge_flags(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2240
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2243
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
2254
yt921x_dsa_port_bridge_leave(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2257
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2261
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
2274
yt921x_dsa_port_bridge_join(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2278
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2282
if (dsa_is_cpu_port(ds, port))
drivers/net/dsa/yt921x.c
2285
ports_mask = dsa_bridge_ports(ds, bridge.dev);
drivers/net/dsa/yt921x.c
2296
yt921x_dsa_port_mst_state_set(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2299
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2330
yt921x_dsa_vlan_msti_set(struct dsa_switch *ds, struct dsa_bridge bridge,
drivers/net/dsa/yt921x.c
2333
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2355
yt921x_dsa_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
drivers/net/dsa/yt921x.c
2357
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2358
struct dsa_port *dp = dsa_to_port(ds, port);
drivers/net/dsa/yt921x.c
2407
yt921x_dsa_port_get_default_prio(struct dsa_switch *ds, int port)
drivers/net/dsa/yt921x.c
2409
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2424
yt921x_dsa_port_set_default_prio(struct dsa_switch *ds, int port, u8 prio)
drivers/net/dsa/yt921x.c
2426
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2449
yt921x_dsa_port_get_apptrust(struct dsa_switch *ds, int port, u8 *sel,
drivers/net/dsa/yt921x.c
2452
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2483
yt921x_dsa_port_set_apptrust(struct dsa_switch *ds, int port, const u8 *sel,
drivers/net/dsa/yt921x.c
2486
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2728
struct yt921x_priv *priv = to_yt921x_priv(dp->ds);
drivers/net/dsa/yt921x.c
2740
dev_err(dp->ds->dev, "Failed to %s port %d: %i\n", "bring down",
drivers/net/dsa/yt921x.c
2751
struct yt921x_priv *priv = to_yt921x_priv(dp->ds);
drivers/net/dsa/yt921x.c
2761
dev_err(dp->ds->dev, "Failed to %s port %d: %i\n", "bring up",
drivers/net/dsa/yt921x.c
2772
struct yt921x_priv *priv = to_yt921x_priv(dp->ds);
drivers/net/dsa/yt921x.c
2781
dev_err(dp->ds->dev, "Failed to %s port %d: %i\n", "config",
drivers/net/dsa/yt921x.c
2786
yt921x_dsa_phylink_get_caps(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2789
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2838
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/yt921x.c
2853
if (dsa_is_cpu_port(ds, port)) {
drivers/net/dsa/yt921x.c
2878
yt921x_dsa_get_tag_protocol(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
2884
static int yt921x_dsa_port_setup(struct dsa_switch *ds, int port)
drivers/net/dsa/yt921x.c
2886
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2898
yt921x_dsa_port_get_dscp_prio(struct dsa_switch *ds, int port, u8 dscp)
drivers/net/dsa/yt921x.c
2900
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2915
yt921x_dsa_port_del_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
drivers/net/dsa/yt921x.c
2917
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
2940
yt921x_dsa_port_add_dscp_prio(struct dsa_switch *ds, int port, u8 dscp, u8 prio)
drivers/net/dsa/yt921x.c
2942
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
3097
struct dsa_switch *ds = &priv->ds;
drivers/net/dsa/yt921x.c
3105
priv->cpu_ports_mask = dsa_cpu_ports(ds);
drivers/net/dsa/yt921x.c
3243
static int yt921x_dsa_setup(struct dsa_switch *ds)
drivers/net/dsa/yt921x.c
3245
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
3372
dsa_switch_shutdown(&priv->ds);
drivers/net/dsa/yt921x.c
3388
dsa_unregister_switch(&priv->ds);
drivers/net/dsa/yt921x.c
3398
struct dsa_switch *ds;
drivers/net/dsa/yt921x.c
3424
ds = &priv->ds;
drivers/net/dsa/yt921x.c
3425
ds->dev = dev;
drivers/net/dsa/yt921x.c
3426
ds->assisted_learning_on_cpu_port = true;
drivers/net/dsa/yt921x.c
3427
ds->dscp_prio_mapping_is_global = true;
drivers/net/dsa/yt921x.c
3428
ds->priv = priv;
drivers/net/dsa/yt921x.c
3429
ds->ops = &yt921x_dsa_switch_ops;
drivers/net/dsa/yt921x.c
3430
ds->ageing_time_min = 1 * 5000;
drivers/net/dsa/yt921x.c
3431
ds->ageing_time_max = U16_MAX * 5000;
drivers/net/dsa/yt921x.c
3432
ds->phylink_mac_ops = &yt921x_phylink_mac_ops;
drivers/net/dsa/yt921x.c
3433
ds->num_lag_ids = YT921X_LAG_NUM;
drivers/net/dsa/yt921x.c
3434
ds->num_ports = YT921X_PORT_NUM;
drivers/net/dsa/yt921x.c
3438
return dsa_register_switch(ds);
drivers/net/dsa/yt921x.c
749
yt921x_dsa_get_strings(struct dsa_switch *ds, int port, u32 stringset,
drivers/net/dsa/yt921x.c
764
yt921x_dsa_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
drivers/net/dsa/yt921x.c
766
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
787
static int yt921x_dsa_get_sset_count(struct dsa_switch *ds, int port, int sset)
drivers/net/dsa/yt921x.c
805
yt921x_dsa_get_eth_mac_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
808
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
841
yt921x_dsa_get_eth_ctrl_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
844
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
869
yt921x_dsa_get_rmon_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
873
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
906
yt921x_dsa_get_stats64(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
909
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
942
yt921x_dsa_get_pause_stats(struct dsa_switch *ds, int port,
drivers/net/dsa/yt921x.c
945
struct yt921x_priv *priv = to_yt921x_priv(ds);
drivers/net/dsa/yt921x.c
998
yt921x_dsa_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e)
drivers/net/dsa/yt921x.h
602
struct dsa_switch ds;
drivers/net/ethernet/broadcom/bcmsysport.c
2313
if (dp->ds->index)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1680
static u32 ice_ptp_calc_deskew_eth56g(struct ice_hw *hw, u8 port, u32 ds,
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1686
if (!ds)
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1700
ds = 0x633; /* 3.1 */
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1702
ds = 0x31b; /* 1.552 */
drivers/net/ethernet/intel/ice/ice_ptp_hw.c
1707
return mul_u32_u32_fx_q9(deskew_i | deskew_f, ds);
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1267
s64 ds;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1316
ds = ent->ts2 - ent->ts1;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1320
stats->sum += ds;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1326
mlx5_command_str(ent->op), ds);
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1740
s64 ds;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1796
ds = ent->ts2 - ent->ts1;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
1800
stats->sum += ds;
drivers/net/ethernet/mscc/ocelot_vcap.c
491
struct ocelot_vcap_u8 proto, ds;
drivers/net/ethernet/mscc/ocelot_vcap.c
500
ds = ipv4->ds;
drivers/net/ethernet/mscc/ocelot_vcap.c
521
ds = ipv6->ds;
drivers/net/ethernet/mscc/ocelot_vcap.c
557
ds.value, ds.mask);
drivers/net/ethernet/renesas/ravb.h
875
__le16 ds; /* Descriptor size */
drivers/net/fddi/skfp/hwmtm.c
349
struct s_smt_fp_txd volatile *ds ;
drivers/net/fddi/skfp/hwmtm.c
356
ds = (struct s_smt_fp_txd volatile *) ((char *)smc->os.hwm.descr_p +
drivers/net/fddi/skfp/hwmtm.c
360
(void)init_descr_ring(smc,(union s_fp_descr volatile *)ds,
drivers/net/fddi/skfp/hwmtm.c
362
phys = le32_to_cpu(ds->txd_ntdadr) ;
drivers/net/fddi/skfp/hwmtm.c
363
ds++ ;
drivers/net/fddi/skfp/hwmtm.c
364
queue->tx_curr_put = queue->tx_curr_get = ds ;
drivers/net/fddi/skfp/hwmtm.c
365
ds-- ;
drivers/net/fddi/skfp/hwmtm.c
370
ds = (struct s_smt_fp_txd volatile *) ((char *)ds +
drivers/net/fddi/skfp/hwmtm.c
374
(void)init_descr_ring(smc,(union s_fp_descr volatile *)ds,
drivers/net/fddi/skfp/hwmtm.c
376
phys = le32_to_cpu(ds->txd_ntdadr) ;
drivers/net/fddi/skfp/hwmtm.c
377
ds++ ;
drivers/net/fddi/skfp/hwmtm.c
378
queue->tx_curr_put = queue->tx_curr_get = ds ;
drivers/net/fddi/skfp/hwmtm.c
386
struct s_smt_fp_rxd volatile *ds ;
drivers/net/fddi/skfp/hwmtm.c
393
ds = (struct s_smt_fp_rxd volatile *) smc->os.hwm.descr_p ;
drivers/net/fddi/skfp/hwmtm.c
396
(void)init_descr_ring(smc,(union s_fp_descr volatile *)ds,
drivers/net/fddi/skfp/hwmtm.c
398
phys = le32_to_cpu(ds->rxd_nrdadr) ;
drivers/net/fddi/skfp/hwmtm.c
399
ds++ ;
drivers/net/fddi/skfp/hwmtm.c
400
queue->rx_curr_put = queue->rx_curr_get = ds ;
drivers/net/phy/marvell10g.c
348
static int mv3310_get_downshift(struct phy_device *phydev, u8 *ds)
drivers/net/phy/marvell10g.c
362
*ds = 1 + FIELD_GET(MV_PCS_DSC1_10GBT, (u16)val);
drivers/net/phy/marvell10g.c
364
*ds = DOWNSHIFT_DEV_DISABLE;
drivers/net/phy/marvell10g.c
369
static int mv3310_set_downshift(struct phy_device *phydev, u8 ds)
drivers/net/phy/marvell10g.c
378
if (ds == DOWNSHIFT_DEV_DISABLE)
drivers/net/phy/marvell10g.c
389
if (ds == DOWNSHIFT_DEV_DEFAULT_COUNT)
drivers/net/phy/marvell10g.c
390
ds = 2;
drivers/net/phy/marvell10g.c
392
if (ds > 8)
drivers/net/phy/marvell10g.c
395
ds -= 1;
drivers/net/phy/marvell10g.c
396
val = FIELD_PREP(MV_PCS_DSC2_2P5G, ds);
drivers/net/phy/marvell10g.c
397
val |= FIELD_PREP(MV_PCS_DSC2_5G, ds);
drivers/net/phy/marvell10g.c
404
val |= FIELD_PREP(MV_PCS_DSC1_10GBT, ds);
drivers/net/phy/marvell10g.c
405
val |= FIELD_PREP(MV_PCS_DSC1_1GBR, ds);
drivers/net/phy/marvell10g.c
406
val |= FIELD_PREP(MV_PCS_DSC1_100BTX, ds);
drivers/net/phy/motorcomm.c
1001
int ret, ds;
drivers/net/phy/motorcomm.c
1005
ds = yt8531_get_ds_map(phydev, val);
drivers/net/phy/motorcomm.c
1006
if (ds < 0)
drivers/net/phy/motorcomm.c
1007
return dev_err_probe(&phydev->mdio.dev, ds,
drivers/net/phy/motorcomm.c
1010
ds = YT8531_RGMII_RX_DS_DEFAULT;
drivers/net/phy/motorcomm.c
1016
FIELD_PREP(YT8531_RGMII_RXC_DS_MASK, ds));
drivers/net/phy/motorcomm.c
1022
ds = yt8531_get_ds_map(phydev, val);
drivers/net/phy/motorcomm.c
1023
if (ds < 0)
drivers/net/phy/motorcomm.c
1024
return dev_err_probe(&phydev->mdio.dev, ds,
drivers/net/phy/motorcomm.c
1027
ds = YT8531_RGMII_RX_DS_DEFAULT;
drivers/net/phy/motorcomm.c
1030
ds_field_hi = FIELD_GET(BIT(2), ds);
drivers/net/phy/motorcomm.c
1033
ds_field_low = FIELD_GET(GENMASK(1, 0), ds);
drivers/net/phy/motorcomm.c
950
u32 ds;
drivers/net/phy/motorcomm.c
955
{.vol = YT8531_LDO_VOL_1V8, .ds = 0, .cur = 1200},
drivers/net/phy/motorcomm.c
956
{.vol = YT8531_LDO_VOL_1V8, .ds = 1, .cur = 2100},
drivers/net/phy/motorcomm.c
957
{.vol = YT8531_LDO_VOL_1V8, .ds = 2, .cur = 2700},
drivers/net/phy/motorcomm.c
958
{.vol = YT8531_LDO_VOL_1V8, .ds = 3, .cur = 2910},
drivers/net/phy/motorcomm.c
959
{.vol = YT8531_LDO_VOL_1V8, .ds = 4, .cur = 3110},
drivers/net/phy/motorcomm.c
960
{.vol = YT8531_LDO_VOL_1V8, .ds = 5, .cur = 3600},
drivers/net/phy/motorcomm.c
961
{.vol = YT8531_LDO_VOL_1V8, .ds = 6, .cur = 3970},
drivers/net/phy/motorcomm.c
962
{.vol = YT8531_LDO_VOL_1V8, .ds = 7, .cur = 4350},
drivers/net/phy/motorcomm.c
963
{.vol = YT8531_LDO_VOL_3V3, .ds = 0, .cur = 3070},
drivers/net/phy/motorcomm.c
964
{.vol = YT8531_LDO_VOL_3V3, .ds = 1, .cur = 4080},
drivers/net/phy/motorcomm.c
965
{.vol = YT8531_LDO_VOL_3V3, .ds = 2, .cur = 4370},
drivers/net/phy/motorcomm.c
966
{.vol = YT8531_LDO_VOL_3V3, .ds = 3, .cur = 4680},
drivers/net/phy/motorcomm.c
967
{.vol = YT8531_LDO_VOL_3V3, .ds = 4, .cur = 5020},
drivers/net/phy/motorcomm.c
968
{.vol = YT8531_LDO_VOL_3V3, .ds = 5, .cur = 5450},
drivers/net/phy/motorcomm.c
969
{.vol = YT8531_LDO_VOL_3V3, .ds = 6, .cur = 5740},
drivers/net/phy/motorcomm.c
970
{.vol = YT8531_LDO_VOL_3V3, .ds = 7, .cur = 6140},
drivers/net/phy/motorcomm.c
991
return yt8531_ldo_vol[i].ds;
drivers/net/wireguard/queueing.h
64
u8 ds;
drivers/net/wireguard/receive.c
389
INET_ECN_decapsulate(skb, PACKET_CB(skb)->ds, ip_hdr(skb)->tos);
drivers/net/wireguard/receive.c
393
INET_ECN_decapsulate(skb, PACKET_CB(skb)->ds, ipv6_get_dsfield(ipv6_hdr(skb)));
drivers/net/wireguard/receive.c
575
PACKET_CB(skb)->ds = ip_tunnel_get_dsfield(ip_hdr(skb), skb);
drivers/net/wireguard/send.c
252
PACKET_CB(skb)->ds) && !is_keepalive))
drivers/net/wireguard/send.c
378
PACKET_CB(skb)->ds = ip_tunnel_ecn_encap(0, ip_hdr(skb), skb);
drivers/net/wireguard/socket.c
152
udp_tunnel6_xmit_skb(dst, sock, skb, skb->dev, &fl.saddr, &fl.daddr, ds,
drivers/net/wireguard/socket.c
168
int wg_socket_send_skb_to_peer(struct wg_peer *peer, struct sk_buff *skb, u8 ds)
drivers/net/wireguard/socket.c
175
ret = send4(peer->device, skb, &peer->endpoint, ds,
drivers/net/wireguard/socket.c
178
ret = send6(peer->device, skb, &peer->endpoint, ds,
drivers/net/wireguard/socket.c
190
size_t len, u8 ds)
drivers/net/wireguard/socket.c
200
return wg_socket_send_skb_to_peer(peer, skb, ds);
drivers/net/wireguard/socket.c
21
struct endpoint *endpoint, u8 ds, struct dst_cache *cache)
drivers/net/wireguard/socket.c
85
udp_tunnel_xmit_skb(rt, sock, skb, fl.saddr, fl.daddr, ds,
drivers/net/wireguard/socket.c
98
struct endpoint *endpoint, u8 ds, struct dst_cache *cache)
drivers/net/wireguard/socket.h
18
size_t len, u8 ds);
drivers/net/wireguard/socket.h
20
u8 ds);
drivers/net/wireless/ath/ath5k/base.c
1592
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/base.c
1604
ds = bf->desc;
drivers/net/wireless/ath/ath5k/base.c
1610
ret = ah->ah_proc_rx_desc(ah, ds, &rs);
drivers/net/wireless/ath/ath5k/base.c
1781
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/base.c
1792
ds = bf->desc;
drivers/net/wireless/ath/ath5k/base.c
1794
ret = ah->ah_proc_tx_desc(ah, ds, &ts);
drivers/net/wireless/ath/ath5k/base.c
1858
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/base.c
1877
ds = bf->desc;
drivers/net/wireless/ath/ath5k/base.c
1882
ds->ds_link = bf->daddr; /* self-linked */
drivers/net/wireless/ath/ath5k/base.c
1885
ds->ds_link = 0;
drivers/net/wireless/ath/ath5k/base.c
1912
ds->ds_data = bf->skbaddr;
drivers/net/wireless/ath/ath5k/base.c
1913
ret = ah->ah_setup_tx_desc(ah, ds, skb->len,
drivers/net/wireless/ath/ath5k/base.c
631
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/base.c
656
ds = bf->desc;
drivers/net/wireless/ath/ath5k/base.c
657
ds->ds_link = bf->daddr; /* link to self */
drivers/net/wireless/ath/ath5k/base.c
658
ds->ds_data = bf->skbaddr;
drivers/net/wireless/ath/ath5k/base.c
659
ret = ath5k_hw_setup_rx_desc(ah, ds, ah->common.rx_bufsize, 0);
drivers/net/wireless/ath/ath5k/base.c
667
ah->rxlink = &ds->ds_link;
drivers/net/wireless/ath/ath5k/base.c
772
struct ath5k_desc *ds = bf->desc;
drivers/net/wireless/ath/ath5k/base.c
841
ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
drivers/net/wireless/ath/ath5k/base.c
866
ath5k_hw_setup_mrr_tx_desc(ah, ds,
drivers/net/wireless/ath/ath5k/base.c
872
ds->ds_link = 0;
drivers/net/wireless/ath/ath5k/base.c
873
ds->ds_data = bf->skbaddr;
drivers/net/wireless/ath/ath5k/base.c
883
txq->link = &ds->ds_link;
drivers/net/wireless/ath/ath5k/base.c
900
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/base.c
917
ds = ah->desc;
drivers/net/wireless/ath/ath5k/base.c
920
ds, ah->desc_len, (unsigned long long)ah->desc_daddr);
drivers/net/wireless/ath/ath5k/base.c
932
for (i = 0; i < ATH_RXBUF; i++, bf++, ds++, da += sizeof(*ds)) {
drivers/net/wireless/ath/ath5k/base.c
933
bf->desc = ds;
drivers/net/wireless/ath/ath5k/base.c
940
for (i = 0; i < ATH_TXBUF; i++, bf++, ds++, da += sizeof(*ds)) {
drivers/net/wireless/ath/ath5k/base.c
941
bf->desc = ds;
drivers/net/wireless/ath/ath5k/base.c
948
for (i = 0; i < ATH_BCBUF; i++, bf++, ds++, da += sizeof(*ds)) {
drivers/net/wireless/ath/ath5k/base.c
949
bf->desc = ds;
drivers/net/wireless/ath/ath5k/debug.c
1049
struct ath5k_desc *ds = bf->desc;
drivers/net/wireless/ath/ath5k/debug.c
1050
struct ath5k_hw_all_rx_desc *rd = &ds->ud.ds_rx;
drivers/net/wireless/ath/ath5k/debug.c
1053
ds, (unsigned long long)bf->daddr,
drivers/net/wireless/ath/ath5k/debug.c
1054
ds->ds_link, ds->ds_data,
drivers/net/wireless/ath/ath5k/debug.c
1063
struct ath5k_desc *ds;
drivers/net/wireless/ath/ath5k/debug.c
1076
ds = bf->desc;
drivers/net/wireless/ath/ath5k/debug.c
1077
status = ah->ah_proc_rx_desc(ah, ds, &rs);
drivers/net/wireless/ath/ath5k/debug.c
1087
struct ath5k_desc *ds = bf->desc;
drivers/net/wireless/ath/ath5k/debug.c
1088
struct ath5k_hw_5212_tx_desc *td = &ds->ud.ds_tx5212;
drivers/net/wireless/ath/ath5k/debug.c
1098
"%08x %c\n", ds, (unsigned long long)bf->daddr, ds->ds_link,
drivers/net/wireless/ath/ath5k/debug.c
1099
ds->ds_data, td->tx_ctl.tx_control_0, td->tx_ctl.tx_control_1,
drivers/net/wireless/ath/ath9k/ar9002_mac.c
212
ar9002_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
drivers/net/wireless/ath/ath9k/ar9002_mac.c
214
struct ar5416_desc *ads = AR5416DESC(ds);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
27
static void ar9002_hw_set_desc_link(void *ds, u32 ds_link)
drivers/net/wireless/ath/ath9k/ar9002_mac.c
29
((struct ath_desc*) ds)->ds_link = ds_link;
drivers/net/wireless/ath/ath9k/ar9002_mac.c
316
static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/ar9002_mac.c
319
struct ar5416_desc *ads = AR5416DESC(ds);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
388
static int ar9002_hw_get_duration(struct ath_hw *ah, const void *ds, int index)
drivers/net/wireless/ath/ath9k/ar9002_mac.c
390
struct ar5416_desc *ads = AR5416DESC(ds);
drivers/net/wireless/ath/ath9k/ar9002_mac.c
406
void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
drivers/net/wireless/ath/ath9k/ar9002_mac.c
409
struct ar5416_desc *ads = AR5416DESC(ds);
drivers/net/wireless/ath/ath9k/ar9003_mac.c
174
static void ar9003_hw_set_desc_link(void *ds, u32 ds_link)
drivers/net/wireless/ath/ath9k/ar9003_mac.c
176
struct ar9003_txc *ads = ds;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
27
ar9003_set_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_info *i)
drivers/net/wireless/ath/ath9k/ar9003_mac.c
29
struct ar9003_txc *ads = ds;
drivers/net/wireless/ath/ath9k/ar9003_mac.c
355
static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/ar9003_mac.c
435
static int ar9003_hw_get_duration(struct ath_hw *ah, const void *ds, int index)
drivers/net/wireless/ath/ath9k/ar9003_mac.c
437
const struct ar9003_txc *adc = ds;
drivers/net/wireless/ath/ath9k/hw-ops.h
38
static inline void ath9k_hw_set_desc_link(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/hw-ops.h
41
ath9k_hw_ops(ah)->set_desc_link(ds, link);
drivers/net/wireless/ath/ath9k/hw-ops.h
57
static inline void ath9k_hw_set_txdesc(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/hw-ops.h
60
return ath9k_hw_ops(ah)->set_txdesc(ah, ds, i);
drivers/net/wireless/ath/ath9k/hw-ops.h
63
static inline int ath9k_hw_txprocdesc(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/hw-ops.h
66
return ath9k_hw_ops(ah)->proc_txdesc(ah, ds, ts);
drivers/net/wireless/ath/ath9k/hw-ops.h
69
static inline int ath9k_hw_get_duration(struct ath_hw *ah, const void *ds,
drivers/net/wireless/ath/ath9k/hw-ops.h
72
return ath9k_hw_ops(ah)->get_duration(ah, ds, index);
drivers/net/wireless/ath/ath9k/hw.h
727
void (*set_desc_link)(void *ds, u32 link);
drivers/net/wireless/ath/ath9k/hw.h
732
void (*set_txdesc)(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/hw.h
734
int (*proc_txdesc)(struct ath_hw *ah, void *ds,
drivers/net/wireless/ath/ath9k/hw.h
736
int (*get_duration)(struct ath_hw *ah, const void *ds, int index);
drivers/net/wireless/ath/ath9k/init.c
287
u8 *ds;
drivers/net/wireless/ath/ath9k/init.c
333
ds = dd->dd_desc;
drivers/net/wireless/ath/ath9k/init.c
335
name, ds, (u32) dd->dd_desc_len,
drivers/net/wireless/ath/ath9k/init.c
347
for (i = 0; i < nbuf; i++, bf++, ds += (desc_len * ndesc)) {
drivers/net/wireless/ath/ath9k/init.c
348
bf->bf_desc = ds;
drivers/net/wireless/ath/ath9k/init.c
349
bf->bf_daddr = DS2PHYS(dd, ds);
drivers/net/wireless/ath/ath9k/init.c
363
ds += (desc_len * ndesc);
drivers/net/wireless/ath/ath9k/init.c
364
bf->bf_desc = ds;
drivers/net/wireless/ath/ath9k/init.c
365
bf->bf_daddr = DS2PHYS(dd, ds);
drivers/net/wireless/ath/ath9k/init.c
378
for (i = 0; i < nbuf; i++, bf++, ds += (desc_len * ndesc)) {
drivers/net/wireless/ath/ath9k/init.c
379
bf->bf_desc = ds;
drivers/net/wireless/ath/ath9k/init.c
380
bf->bf_daddr = DS2PHYS(dd, ds);
drivers/net/wireless/ath/ath9k/init.c
394
ds += (desc_len * ndesc);
drivers/net/wireless/ath/ath9k/init.c
395
bf->bf_desc = ds;
drivers/net/wireless/ath/ath9k/init.c
396
bf->bf_daddr = DS2PHYS(dd, ds);
drivers/net/wireless/ath/ath9k/mac.c
524
int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
drivers/net/wireless/ath/ath9k/mac.c
528
struct ar5416_desc *adsp = AR5416DESC(ds);
drivers/net/wireless/ath/ath9k/mac.h
735
int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
drivers/net/wireless/ath/ath9k/mac.h
737
void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
drivers/net/wireless/ath/ath9k/recv.c
42
struct ath_desc *ds;
drivers/net/wireless/ath/ath9k/recv.c
45
ds = bf->bf_desc;
drivers/net/wireless/ath/ath9k/recv.c
46
ds->ds_link = 0; /* link to null */
drivers/net/wireless/ath/ath9k/recv.c
47
ds->ds_data = bf->bf_buf_addr;
drivers/net/wireless/ath/ath9k/recv.c
52
ds->ds_vdata = skb->data;
drivers/net/wireless/ath/ath9k/recv.c
59
ath9k_hw_setuprxdesc(ah, ds,
drivers/net/wireless/ath/ath9k/recv.c
68
sc->rx.rxlink = &ds->ds_link;
drivers/net/wireless/ath/ath9k/recv.c
700
struct ath_desc *ds;
drivers/net/wireless/ath/ath9k/recv.c
713
ds = bf->bf_desc;
drivers/net/wireless/ath/ath9k/recv.c
726
ret = ath9k_hw_rxprocdesc(ah, ds, rs);
drivers/net/wireless/ath/ath9k/recv.c
760
ret = ath9k_hw_rxprocdesc(ah, ds, rs);
drivers/net/wireless/ath/ath9k/xmit.c
2628
struct ath_desc *ds;
drivers/net/wireless/ath/ath9k/xmit.c
2667
ds = lastbf->bf_desc;
drivers/net/wireless/ath/ath9k/xmit.c
2670
status = ath9k_hw_txprocdesc(ah, ds, &ts);
drivers/net/wireless/marvell/libertas/cfg.c
1822
cmd.bss.ds.header.id = WLAN_EID_DS_PARAMS;
drivers/net/wireless/marvell/libertas/cfg.c
1823
cmd.bss.ds.header.len = 1;
drivers/net/wireless/marvell/libertas/cfg.c
1824
cmd.bss.ds.channel = params->chandef.chan->hw_value;
drivers/net/wireless/marvell/libertas/cfg.c
1936
cmd.ds.header.id = WLAN_EID_DS_PARAMS;
drivers/net/wireless/marvell/libertas/cfg.c
1937
cmd.ds.header.len = 1;
drivers/net/wireless/marvell/libertas/cfg.c
1938
cmd.ds.channel = params->chandef.chan->hw_value;
drivers/net/wireless/marvell/libertas/cfg.c
373
struct mrvl_ie_ds_param_set *ds = (void *) tlv;
drivers/net/wireless/marvell/libertas/cfg.c
380
ds->header.type = cpu_to_le16(TLV_TYPE_PHY_DS);
drivers/net/wireless/marvell/libertas/cfg.c
381
ds->header.len = cpu_to_le16(sizeof(*ds)-sizeof(ds->header));
drivers/net/wireless/marvell/libertas/cfg.c
382
ds->channel = channel;
drivers/net/wireless/marvell/libertas/cfg.c
383
return sizeof(*ds);
drivers/net/wireless/marvell/libertas/host.h
754
struct ieee_ie_ds_param_set ds;
drivers/net/wireless/marvell/libertas/host.h
777
struct ieee_ie_ds_param_set ds;
drivers/net/wireless/marvell/libertas/types.h
55
struct ieee_ie_ds_param_set ds;
drivers/nvme/host/core.c
2378
ns->head->lba_shift = id->lbaf[lbaf].ds;
drivers/nvme/target/admin-cmd.c
879
id->lbaf[0].ds = req->ns->blksize_shift;
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
1485
u32 ds = 0;
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
1493
ds = val ? DSHI(flg) : DSLO(flg);
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
1495
"pin %d strength %d = %d\n", pin, val, ds);
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
1496
return ds;
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
1905
u32 ds = 0;
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
1912
ds = val ? DSHI(flg) : DSLO(flg);
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
1913
dev_dbg(bank->chip.gc.parent, "pin %d strength %d = %d\n", pin, val, ds);
drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
1915
return ds;
drivers/pinctrl/pinctrl-th1520.c
566
u16 ds;
drivers/pinctrl/pinctrl-th1520.c
568
for (ds = 0; ds < TH1520_PADCFG_DS; ds++) {
drivers/pinctrl/pinctrl-th1520.c
569
if (arg <= th1520_drive_strength_in_ma[ds])
drivers/pinctrl/pinctrl-th1520.c
570
return ds;
drivers/pinctrl/renesas/pinctrl-rzg2l.c
1050
u16 ds)
drivers/pinctrl/renesas/pinctrl-rzg2l.c
1073
if (array[iolh_idx + i] == ds)
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
196
static u32 starfive_drive_strength_to_max_mA(u16 ds)
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
198
return 7 * ds + 14;
drivers/s390/scsi/zfcp_fc.c
1015
return &adapter->gs->ds;
drivers/s390/scsi/zfcp_fc.c
1126
zfcp_fc_wka_port_init(&wka_ports->ds, FC_FID_DIR_SERV, adapter);
drivers/s390/scsi/zfcp_fc.c
237
zfcp_fc_wka_port_force_offline(&gs->ds);
drivers/s390/scsi/zfcp_fc.c
405
ret = zfcp_fsf_send_ct(&adapter->gs->ds, &fc_req->ct_els,
drivers/s390/scsi/zfcp_fc.c
432
ret = zfcp_fc_wka_port_get(&adapter->gs->ds);
drivers/s390/scsi/zfcp_fc.c
438
zfcp_fc_wka_port_put(&adapter->gs->ds);
drivers/s390/scsi/zfcp_fc.c
712
ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct_els, NULL,
drivers/s390/scsi/zfcp_fc.c
826
if (zfcp_fc_wka_port_get(&adapter->gs->ds))
drivers/s390/scsi/zfcp_fc.c
846
zfcp_fc_wka_port_put(&adapter->gs->ds);
drivers/s390/scsi/zfcp_fc.c
871
ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct_els, NULL,
drivers/s390/scsi/zfcp_fc.c
930
ret = zfcp_fsf_send_ct(&adapter->gs->ds, ct_els, NULL,
drivers/s390/scsi/zfcp_fc.c
962
ret = zfcp_fc_wka_port_get(&adapter->gs->ds);
drivers/s390/scsi/zfcp_fc.c
974
zfcp_fc_wka_port_put(&adapter->gs->ds);
drivers/s390/scsi/zfcp_fc.h
219
struct zfcp_fc_wka_port ds;
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2582
char *ds = "";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2629
ds = "SSP";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2634
ds = "SATA";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2636
ds = "STP";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2674
raid_device->num_pds, ds);
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2723
ds = "NVMe";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2726
ds, handle, (unsigned long long)pcie_device->wwid,
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2731
ds,
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2737
"connector name( %s)\n", ds,
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2776
ds = "SES";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2778
ds = "SSP";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2782
ds = "STP";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2785
ds = "SATA";
drivers/scsi/mpt3sas/mpt3sas_scsih.c
2790
ds, handle, (unsigned long long)sas_device->sas_address,
drivers/scsi/qlogicpti.c
901
struct dataseg *ds;
drivers/scsi/qlogicpti.c
914
ds = cmd->dataseg;
drivers/scsi/qlogicpti.c
922
ds[i].d_base = sg_dma_address(s);
drivers/scsi/qlogicpti.c
923
ds[i].d_count = sg_dma_len(s);
drivers/scsi/qlogicpti.c
941
ds = cont->dataseg;
drivers/scsi/qlogicpti.c
946
ds[i].d_base = sg_dma_address(s);
drivers/scsi/qlogicpti.c
947
ds[i].d_count = sg_dma_len(s);
drivers/sh/maple/maple.c
409
struct maple_device_specify *ds;
drivers/sh/maple/maple.c
412
ds = portptr;
drivers/sh/maple/maple.c
414
if (mdev->port == ds->port && mdev->unit == ds->unit)
drivers/sh/maple/maple.c
496
struct maple_device_specify ds;
drivers/sh/maple/maple.c
498
ds.port = mdev->port;
drivers/sh/maple/maple.c
500
ds.unit = k + 1;
drivers/sh/maple/maple.c
502
bus_for_each_dev(&maple_bus_type, NULL, &ds,
drivers/staging/media/atomisp/pci/ia_css_acc_types.h
225
u8 ds;
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1066
if (!(candidate->enable.ds & 2) && enable_yuv_ds) {
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1068
__LINE__, ((candidate->enable.ds & 2) != 0), enable_yuv_ds);
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1071
if ((candidate->enable.ds & 2) && !enable_yuv_ds) {
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1073
__LINE__, ((candidate->enable.ds & 2) != 0), enable_yuv_ds);
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1078
candidate->enable.ds && need_ds)
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1111
if (!candidate->enable.ds && need_ds && !(xcandidate->num_output_pins > 1)) {
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
1113
__LINE__, candidate->enable.ds, (int)need_ds);
drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c
63
bool binary_supports_yuv_ds = info->enable.ds & 2;
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
1216
bi->enable.ds ? "ds," : "",
drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
387
ia_css_debug_dtrace(2, "enable ds = %d\n", info->sp.enable.ds);
drivers/staging/media/atomisp/pci/sh_css_params.c
3966
if (info->enable.uds && !info->enable.ds) {
drivers/staging/media/atomisp/pci/sh_css_params.c
4008
} else if (info->enable.ds) {
drivers/staging/media/atomisp/pci/sh_css_params.c
4023
if (info->enable.ds & 1)
drivers/staging/media/ipu3/ipu3-abi.h
1700
u8 ds;
drivers/usb/core/devio.c
2167
struct usbdevfs_disconnectsignal32 ds;
drivers/usb/core/devio.c
2169
if (copy_from_user(&ds, arg, sizeof(ds)))
drivers/usb/core/devio.c
2171
ps->discsignr = ds.signr;
drivers/usb/core/devio.c
2172
ps->disccontext.sival_int = ds.context;
drivers/usb/core/devio.c
2286
struct usbdevfs_disconnectsignal ds;
drivers/usb/core/devio.c
2288
if (copy_from_user(&ds, arg, sizeof(ds)))
drivers/usb/core/devio.c
2290
ps->discsignr = ds.signr;
drivers/usb/core/devio.c
2291
ps->disccontext.sival_ptr = ds.context;
drivers/usb/gadget/function/f_fs.c
2530
struct usb_interface_descriptor *ds = (void *)_ds;
drivers/usb/gadget/function/f_fs.c
2532
if (length != sizeof *ds)
drivers/usb/gadget/function/f_fs.c
2535
__entity(INTERFACE, ds->bInterfaceNumber);
drivers/usb/gadget/function/f_fs.c
2536
if (ds->iInterface)
drivers/usb/gadget/function/f_fs.c
2537
__entity(STRING, ds->iInterface);
drivers/usb/gadget/function/f_fs.c
2538
*current_class = ds->bInterfaceClass;
drivers/usb/gadget/function/f_fs.c
2539
*current_subclass = ds->bInterfaceSubClass;
drivers/usb/gadget/function/f_fs.c
2544
struct usb_endpoint_descriptor *ds = (void *)_ds;
drivers/usb/gadget/function/f_fs.c
2549
__entity(ENDPOINT, ds->bEndpointAddress);
drivers/usb/gadget/function/f_fs.c
2582
struct usb_interface_assoc_descriptor *ds = (void *)_ds;
drivers/usb/gadget/function/f_fs.c
2584
if (length != sizeof *ds)
drivers/usb/gadget/function/f_fs.c
2586
if (ds->iFunction)
drivers/usb/gadget/function/f_fs.c
2587
__entity(STRING, ds->iFunction);
drivers/usb/gadget/function/f_fs.c
3262
struct usb_endpoint_descriptor *ds = (void *)desc;
drivers/usb/gadget/function/f_fs.c
3292
idx = ffs_ep_addr2idx(func->ffs, ds->bEndpointAddress) - 1;
drivers/usb/gadget/function/f_fs.c
3301
usb_endpoint_num(ds));
drivers/usb/gadget/function/f_fs.c
3304
ffs_ep->descs[ep_desc_id] = ds;
drivers/usb/gadget/function/f_fs.c
3306
ffs_dump_mem(": Original ep desc", ds, ds->bLength);
drivers/usb/gadget/function/f_fs.c
3308
ds->bEndpointAddress = ffs_ep->descs[0]->bEndpointAddress;
drivers/usb/gadget/function/f_fs.c
3309
if (!ds->wMaxPacketSize)
drivers/usb/gadget/function/f_fs.c
3310
ds->wMaxPacketSize = ffs_ep->descs[0]->wMaxPacketSize;
drivers/usb/gadget/function/f_fs.c
3321
bEndpointAddress = ds->bEndpointAddress;
drivers/usb/gadget/function/f_fs.c
3326
wMaxPacketSize = ds->wMaxPacketSize;
drivers/usb/gadget/function/f_fs.c
3328
ep = usb_ep_autoconfig(func->gadget, ds);
drivers/usb/gadget/function/f_fs.c
3339
func->eps_revmap[ds->bEndpointAddress &
drivers/usb/gadget/function/f_fs.c
3346
ds->bEndpointAddress = bEndpointAddress;
drivers/usb/gadget/function/f_fs.c
3351
ds->wMaxPacketSize = wMaxPacketSize;
drivers/usb/gadget/function/f_fs.c
3353
ffs_dump_mem(": Rewritten ep desc", ds, ds->bLength);
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
2098
const int ds = DIV_ROUND_UP(height, out_height);
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
2127
val, max(0, ds - 2) * width);
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
2128
if (val < max(0, ds - 2) * width)
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
2138
val, max(0, ds - 1) * width);
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
2139
if (val < max(0, ds - 1) * width)
fs/9p/fid.c
151
struct dentry *ds;
fs/9p/fid.c
153
for (ds = dentry; !IS_ROOT(ds); ds = ds->d_parent)
fs/9p/fid.c
160
for (ds = dentry, i = (n-1); i >= 0; i--, ds = ds->d_parent)
fs/9p/fid.c
161
wnames[i] = ds->d_name.name;
fs/9p/fid.c
172
struct dentry *ds;
fs/9p/fid.c
189
ds = dentry->d_parent;
fs/9p/fid.c
190
fid = v9fs_fid_find(ds, uid, any);
fs/affs/affs.h
141
extern void affs_secs_to_datestamp(time64_t secs, struct affs_date *ds);
fs/affs/amigaffs.c
372
affs_secs_to_datestamp(time64_t secs, struct affs_date *ds)
fs/affs/amigaffs.c
385
ds->days = cpu_to_be32(days);
fs/affs/amigaffs.c
386
ds->mins = cpu_to_be32(minute);
fs/affs/amigaffs.c
387
ds->ticks = cpu_to_be32(rem * 50);
fs/befs/befs.h
72
befs_data_stream ds;
fs/befs/btree.c
134
befs_bt_read_super(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
142
bh = befs_read_datastream(sb, ds, 0, NULL);
fs/befs/btree.c
191
befs_bt_read_node(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
201
node->bh = befs_read_datastream(sb, ds, node_off, &off);
fs/befs/btree.c
245
befs_btree_find(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
255
if (befs_bt_read_super(sb, ds, &bt_super) != BEFS_OK) {
fs/befs/btree.c
272
if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
fs/befs/btree.c
283
if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
fs/befs/btree.c
410
befs_btree_read(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
427
if (befs_bt_read_super(sb, ds, &bt_super) != BEFS_OK) {
fs/befs/btree.c
444
res = befs_btree_seekleaf(sb, ds, &bt_super, this_node, &node_off);
fs/befs/btree.c
476
if (befs_bt_read_node(sb, ds, this_node, node_off) != BEFS_OK) {
fs/befs/btree.c
541
befs_btree_seekleaf(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
549
if (befs_bt_read_node(sb, ds, this_node, *node_off) != BEFS_OK) {
fs/befs/btree.c
573
if (befs_bt_read_node(sb, ds, this_node, *node_off) != BEFS_OK) {
fs/befs/btree.c
91
static int befs_btree_seekleaf(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
96
static int befs_bt_read_super(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.c
99
static int befs_bt_read_node(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.h
10
int befs_btree_read(struct super_block *sb, const befs_data_stream *ds,
fs/befs/btree.h
7
int befs_btree_find(struct super_block *sb, const befs_data_stream *ds,
fs/befs/datastream.c
130
befs_read_lsymlink(struct super_block *sb, const befs_data_stream *ds,
fs/befs/datastream.c
140
bh = befs_read_datastream(sb, ds, bytes_read, NULL);
fs/befs/datastream.c
172
befs_count_blocks(struct super_block *sb, const befs_data_stream *ds)
fs/befs/datastream.c
181
datablocks = ds->size >> befs_sb->block_shift;
fs/befs/datastream.c
182
if (ds->size & (befs_sb->block_size - 1))
fs/befs/datastream.c
188
if (ds->size > ds->max_direct_range)
fs/befs/datastream.c
189
metablocks += ds->indirect.len;
fs/befs/datastream.c
200
if (ds->size > ds->max_indirect_range && ds->max_indirect_range != 0) {
fs/befs/datastream.c
206
ds->max_double_indirect_range - ds->max_indirect_range;
fs/befs/datastream.c
211
metablocks += ds->double_indirect.len;
fs/befs/datastream.c
49
befs_read_datastream(struct super_block *sb, const befs_data_stream *ds,
fs/befs/datastream.c
61
if (befs_fblock2brun(sb, ds, block, &run) != BEFS_OK) {
fs/befs/datastream.h
18
const befs_data_stream *ds);
fs/befs/datastream.h
8
const befs_data_stream *ds,
fs/befs/linuxvfs.c
138
befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
fs/befs/linuxvfs.c
152
res = befs_fblock2brun(sb, ds, block, &run);
fs/befs/linuxvfs.c
177
const befs_data_stream *ds = &BEFS_I(dir)->i_data.ds;
fs/befs/linuxvfs.c
195
ret = befs_btree_find(sb, ds, utfname, &offset);
fs/befs/linuxvfs.c
199
ret = befs_btree_find(sb, ds, name, &offset);
fs/befs/linuxvfs.c
221
const befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
fs/befs/linuxvfs.c
231
result = befs_btree_read(sb, ds, ctx->pos, BEFS_NAME_LEN + 1,
fs/befs/linuxvfs.c
384
befs_ino->i_data.ds =
fs/befs/linuxvfs.c
387
num_blks = befs_count_blocks(sb, &befs_ino->i_data.ds);
fs/befs/linuxvfs.c
390
inode->i_size = befs_ino->i_data.ds.size;
fs/befs/linuxvfs.c
476
befs_data_stream *data = &befs_ino->i_data.ds;
fs/fat/dir.c
297
struct msdos_dir_slot *ds;
fs/fat/dir.c
308
ds = (struct msdos_dir_slot *)*de;
fs/fat/dir.c
309
id = ds->id;
fs/fat/dir.c
316
alias_checksum = ds->alias_checksum;
fs/fat/dir.c
324
fat16_towchar(*unicode + offset, ds->name0_4, 5);
fs/fat/dir.c
325
fat16_towchar(*unicode + offset + 5, ds->name5_10, 6);
fs/fat/dir.c
326
fat16_towchar(*unicode + offset + 11, ds->name11_12, 2);
fs/fat/dir.c
328
if (ds->id & 0x40)
fs/fat/dir.c
334
ds = (struct msdos_dir_slot *)*de;
fs/fat/dir.c
335
if (ds->attr != ATTR_EXT)
fs/fat/dir.c
337
if ((ds->id & ~0x40) != slot)
fs/fat/dir.c
339
if (ds->alias_checksum != alias_checksum)
fs/nfs/direct.c
180
cinfo->ds = &dreq->ds_cinfo;
fs/nfs/filelayout/filelayout.c
1000
ds_clnt = nfs4_find_or_create_ds_client(ds->ds_clp, data->inode);
fs/nfs/filelayout/filelayout.c
1005
data->inode->i_ino, how, refcount_read(&ds->ds_clp->cl_count));
fs/nfs/filelayout/filelayout.c
1007
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/filelayout/filelayout.c
1008
data->ds_clp = ds->ds_clp;
fs/nfs/filelayout/filelayout.c
453
struct nfs4_pnfs_ds *ds;
fs/nfs/filelayout/filelayout.c
466
ds = nfs4_fl_prepare_ds(lseg, idx);
fs/nfs/filelayout/filelayout.c
467
if (!ds)
fs/nfs/filelayout/filelayout.c
470
ds_clnt = nfs4_find_or_create_ds_client(ds->ds_clp, hdr->inode);
fs/nfs/filelayout/filelayout.c
475
ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count));
fs/nfs/filelayout/filelayout.c
478
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/filelayout/filelayout.c
479
hdr->ds_clp = ds->ds_clp;
fs/nfs/filelayout/filelayout.c
500
struct nfs4_pnfs_ds *ds;
fs/nfs/filelayout/filelayout.c
509
ds = nfs4_fl_prepare_ds(lseg, idx);
fs/nfs/filelayout/filelayout.c
510
if (!ds)
fs/nfs/filelayout/filelayout.c
513
ds_clnt = nfs4_find_or_create_ds_client(ds->ds_clp, hdr->inode);
fs/nfs/filelayout/filelayout.c
519
offset, ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count));
fs/nfs/filelayout/filelayout.c
522
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/filelayout/filelayout.c
523
hdr->ds_clp = ds->ds_clp;
fs/nfs/filelayout/filelayout.c
990
struct nfs4_pnfs_ds *ds;
fs/nfs/filelayout/filelayout.c
996
ds = nfs4_fl_prepare_ds(lseg, idx);
fs/nfs/filelayout/filelayout.c
997
if (!ds)
fs/nfs/filelayout/filelayoutdev.c
265
struct nfs4_pnfs_ds *ds = dsaddr->ds_list[ds_idx];
fs/nfs/filelayout/filelayoutdev.c
267
struct nfs4_pnfs_ds *ret = ds;
fs/nfs/filelayout/filelayoutdev.c
271
if (ds == NULL) {
fs/nfs/filelayout/filelayoutdev.c
278
if (ds->ds_clp)
fs/nfs/filelayout/filelayoutdev.c
281
status = nfs4_pnfs_ds_connect(s, ds, devid, dataserver_timeo,
fs/nfs/filelayout/filelayoutdev.c
48
struct nfs4_pnfs_ds *ds;
fs/nfs/filelayout/filelayoutdev.c
54
ds = dsaddr->ds_list[i];
fs/nfs/filelayout/filelayoutdev.c
55
if (ds != NULL)
fs/nfs/filelayout/filelayoutdev.c
56
nfs4_pnfs_ds_put(ds);
fs/nfs/flexfilelayout/flexfilelayout.c
1029
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
1051
ds = ff_layout_get_ds_for_read(pgio, &ds_idx,
fs/nfs/flexfilelayout/flexfilelayout.c
1053
if (IS_ERR(ds)) {
fs/nfs/flexfilelayout/flexfilelayout.c
1100
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
1130
ds = nfs4_ff_layout_prepare_ds(pgio->pg_lseg, mirror,
fs/nfs/flexfilelayout/flexfilelayout.c
1132
if (IS_ERR(ds)) {
fs/nfs/flexfilelayout/flexfilelayout.c
1263
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
1265
ds = ff_layout_choose_any_ds_for_read(hdr->lseg, idx, &new_idx,
fs/nfs/flexfilelayout/flexfilelayout.c
1267
if (IS_ERR(ds))
fs/nfs/flexfilelayout/flexfilelayout.c
2127
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2148
ds = nfs4_ff_layout_prepare_ds(lseg, mirror, dss_id, false);
fs/nfs/flexfilelayout/flexfilelayout.c
2149
if (IS_ERR(ds)) {
fs/nfs/flexfilelayout/flexfilelayout.c
2150
ds_fatal_error = nfs_error_is_fatal(PTR_ERR(ds));
fs/nfs/flexfilelayout/flexfilelayout.c
2154
ds_clnt = nfs4_ff_find_or_create_ds_client(mirror, ds->ds_clp,
fs/nfs/flexfilelayout/flexfilelayout.c
2166
ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count), vers);
fs/nfs/flexfilelayout/flexfilelayout.c
2169
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/flexfilelayout/flexfilelayout.c
2170
hdr->ds_clp = ds->ds_clp;
fs/nfs/flexfilelayout/flexfilelayout.c
2185
localio = ff_local_open_fh(lseg, idx, dss_id, ds->ds_clp, ds_cred, fh,
fs/nfs/flexfilelayout/flexfilelayout.c
2193
nfs_initiate_pgio(ds_clnt, hdr, ds_cred, ds->ds_clp->rpc_ops,
fs/nfs/flexfilelayout/flexfilelayout.c
2214
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2231
ds = nfs4_ff_layout_prepare_ds(lseg, mirror, dss_id, true);
fs/nfs/flexfilelayout/flexfilelayout.c
2232
if (IS_ERR(ds)) {
fs/nfs/flexfilelayout/flexfilelayout.c
2233
ds_fatal_error = nfs_error_is_fatal(PTR_ERR(ds));
fs/nfs/flexfilelayout/flexfilelayout.c
2237
ds_clnt = nfs4_ff_find_or_create_ds_client(mirror, ds->ds_clp,
fs/nfs/flexfilelayout/flexfilelayout.c
2250
offset, ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count),
fs/nfs/flexfilelayout/flexfilelayout.c
2254
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/flexfilelayout/flexfilelayout.c
2255
hdr->ds_clp = ds->ds_clp;
fs/nfs/flexfilelayout/flexfilelayout.c
2270
localio = ff_local_open_fh(lseg, idx, dss_id, ds->ds_clp, ds_cred, fh,
fs/nfs/flexfilelayout/flexfilelayout.c
2278
nfs_initiate_pgio(ds_clnt, hdr, ds_cred, ds->ds_clp->rpc_ops,
fs/nfs/flexfilelayout/flexfilelayout.c
2308
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2324
ds = nfs4_ff_layout_prepare_ds(lseg, mirror, dss_id, true);
fs/nfs/flexfilelayout/flexfilelayout.c
2325
if (IS_ERR(ds))
fs/nfs/flexfilelayout/flexfilelayout.c
2328
ds_clnt = nfs4_ff_find_or_create_ds_client(mirror, ds->ds_clp,
fs/nfs/flexfilelayout/flexfilelayout.c
2340
data->inode->i_ino, how, refcount_read(&ds->ds_clp->cl_count),
fs/nfs/flexfilelayout/flexfilelayout.c
2344
refcount_inc(&ds->ds_clp->cl_count);
fs/nfs/flexfilelayout/flexfilelayout.c
2345
data->ds_clp = ds->ds_clp;
fs/nfs/flexfilelayout/flexfilelayout.c
2351
localio = ff_local_open_fh(lseg, idx, dss_id, ds->ds_clp, ds_cred, fh,
fs/nfs/flexfilelayout/flexfilelayout.c
2358
ret = nfs_initiate_commit(ds_clnt, data, ds->ds_clp->rpc_ops,
fs/nfs/flexfilelayout/flexfilelayout.c
2412
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2423
ds = mirror->dss[dss_id].mirror_ds->ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2424
if (!ds)
fs/nfs/flexfilelayout/flexfilelayout.c
2426
ds_clp = ds->ds_clp;
fs/nfs/flexfilelayout/flexfilelayout.c
2826
struct nfs4_pnfs_ds *ds = dss_info->mirror_ds->ds;
fs/nfs/flexfilelayout/flexfilelayout.c
2830
da = list_first_entry(&ds->ds_addrs, struct nfs4_pnfs_ds_addr, da_node);
fs/nfs/flexfilelayout/flexfilelayout.c
2832
__func__, ds->ds_remotestr, da->da_remotestr);
fs/nfs/flexfilelayout/flexfilelayout.c
879
struct nfs4_pnfs_ds *ds = ERR_PTR(-EAGAIN);
fs/nfs/flexfilelayout/flexfilelayout.c
889
ds = nfs4_ff_layout_prepare_ds(lseg, mirror, *dss_id, false);
fs/nfs/flexfilelayout/flexfilelayout.c
890
if (IS_ERR(ds))
fs/nfs/flexfilelayout/flexfilelayout.c
896
ds = ERR_PTR(-EINVAL);
fs/nfs/flexfilelayout/flexfilelayout.c
904
return ds;
fs/nfs/flexfilelayout/flexfilelayout.c
930
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
932
ds = ff_layout_choose_valid_ds_for_read(lseg, start_idx, best_idx,
fs/nfs/flexfilelayout/flexfilelayout.c
934
if (!IS_ERR(ds))
fs/nfs/flexfilelayout/flexfilelayout.c
935
return ds;
fs/nfs/flexfilelayout/flexfilelayout.c
947
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayout.c
949
ds = ff_layout_choose_best_ds_for_read(lseg, pgio->pg_mirror_idx,
fs/nfs/flexfilelayout/flexfilelayout.c
951
if (!IS_ERR(ds) || !pgio->pg_mirror_idx)
fs/nfs/flexfilelayout/flexfilelayout.c
952
return ds;
fs/nfs/flexfilelayout/flexfilelayout.h
43
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
151
new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
152
if (!new_ds->ds)
fs/nfs/flexfilelayout/flexfilelayoutdev.c
35
nfs4_pnfs_ds_put(mirror_ds->ds);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
376
struct nfs4_pnfs_ds *ds;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
385
ds = mirror->dss[dss_id].mirror_ds->ds;
fs/nfs/flexfilelayout/flexfilelayoutdev.c
386
if (READ_ONCE(ds->ds_clp))
fs/nfs/flexfilelayout/flexfilelayoutdev.c
394
status = nfs4_pnfs_ds_connect(s, ds, &mirror->dss[dss_id].mirror_ds->id_node,
fs/nfs/flexfilelayout/flexfilelayoutdev.c
406
nfs_local_probe_async(ds->ds_clp);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
408
nfs_block_size(rpc_max_payload(ds->ds_clp->cl_rpcclient),
fs/nfs/flexfilelayout/flexfilelayoutdev.c
424
ds = ERR_PTR(status);
fs/nfs/flexfilelayout/flexfilelayoutdev.c
426
return ds;
fs/nfs/pnfs.h
417
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
fs/nfs/pnfs.h
422
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
fs/nfs/pnfs.h
481
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs.h
530
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs.h
541
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs.h
553
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs.h
563
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs_nfs.c
1005
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
fs/nfs/pnfs_nfs.c
1012
err = nfs4_wait_ds_connect(ds);
fs/nfs/pnfs_nfs.c
1013
if (err || ds->ds_clp)
fs/nfs/pnfs_nfs.c
1019
} while (test_and_set_bit(NFS4DS_CONNECTING, &ds->ds_state) != 0);
fs/nfs/pnfs_nfs.c
1021
if (ds->ds_clp)
fs/nfs/pnfs_nfs.c
1026
err = _nfs4_pnfs_v3_ds_connect(mds_srv, ds, timeo, retrans);
fs/nfs/pnfs_nfs.c
1029
err = _nfs4_pnfs_v4_ds_connect(mds_srv, ds, timeo, retrans,
fs/nfs/pnfs_nfs.c
1038
nfs4_clear_ds_conn_bit(ds);
fs/nfs/pnfs_nfs.c
1045
if (!ds->ds_clp || !nfs_client_init_is_complete(ds->ds_clp)) {
fs/nfs/pnfs_nfs.c
1046
WARN_ON_ONCE(ds->ds_clp ||
fs/nfs/pnfs_nfs.c
1050
err = nfs_client_init_status(ds->ds_clp);
fs/nfs/pnfs_nfs.c
1053
trace_pnfs_ds_connect(ds->ds_remotestr, err);
fs/nfs/pnfs_nfs.c
1184
array = pnfs_lookup_commit_array(cinfo->ds, lseg);
fs/nfs/pnfs_nfs.c
1198
cinfo->ds->nwritten++;
fs/nfs/pnfs_nfs.c
254
cinfo->ds->nwritten -= ret;
fs/nfs/pnfs_nfs.c
255
cinfo->ds->ncommitting += ret;
fs/nfs/pnfs_nfs.c
281
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs_nfs.c
334
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs_nfs.c
365
cinfo->ds->ncommitting--;
fs/nfs/pnfs_nfs.c
467
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
fs/nfs/pnfs_nfs.c
520
print_ds(struct nfs4_pnfs_ds *ds)
fs/nfs/pnfs_nfs.c
522
if (ds == NULL) {
fs/nfs/pnfs_nfs.c
530
ds->ds_remotestr,
fs/nfs/pnfs_nfs.c
531
refcount_read(&ds->ds_count), ds->ds_clp,
fs/nfs/pnfs_nfs.c
532
ds->ds_clp ? ds->ds_clp->cl_exchange_flags : 0);
fs/nfs/pnfs_nfs.c
611
struct nfs4_pnfs_ds *ds;
fs/nfs/pnfs_nfs.c
613
list_for_each_entry(ds, &nn->nfs4_data_server_cache, ds_node)
fs/nfs/pnfs_nfs.c
614
if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
fs/nfs/pnfs_nfs.c
615
return ds;
fs/nfs/pnfs_nfs.c
634
static void destroy_ds(struct nfs4_pnfs_ds *ds)
fs/nfs/pnfs_nfs.c
640
print_ds(ds);
fs/nfs/pnfs_nfs.c
642
nfs_put_client(ds->ds_clp);
fs/nfs/pnfs_nfs.c
644
while (!list_empty(&ds->ds_addrs)) {
fs/nfs/pnfs_nfs.c
645
da = list_first_entry(&ds->ds_addrs,
fs/nfs/pnfs_nfs.c
652
kfree(ds->ds_remotestr);
fs/nfs/pnfs_nfs.c
653
kfree(ds);
fs/nfs/pnfs_nfs.c
656
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds)
fs/nfs/pnfs_nfs.c
658
struct nfs_net *nn = net_generic(ds->ds_net, nfs_net_id);
fs/nfs/pnfs_nfs.c
660
if (refcount_dec_and_lock(&ds->ds_count, &nn->nfs4_data_server_lock)) {
fs/nfs/pnfs_nfs.c
661
list_del_init(&ds->ds_node);
fs/nfs/pnfs_nfs.c
663
destroy_ds(ds);
fs/nfs/pnfs_nfs.c
725
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
fs/nfs/pnfs_nfs.c
733
ds = kzalloc_obj(*ds, gfp_flags);
fs/nfs/pnfs_nfs.c
734
if (!ds)
fs/nfs/pnfs_nfs.c
743
INIT_LIST_HEAD(&ds->ds_addrs);
fs/nfs/pnfs_nfs.c
744
list_splice_init(dsaddrs, &ds->ds_addrs);
fs/nfs/pnfs_nfs.c
745
ds->ds_remotestr = remotestr;
fs/nfs/pnfs_nfs.c
746
refcount_set(&ds->ds_count, 1);
fs/nfs/pnfs_nfs.c
747
INIT_LIST_HEAD(&ds->ds_node);
fs/nfs/pnfs_nfs.c
748
ds->ds_net = net;
fs/nfs/pnfs_nfs.c
749
ds->ds_clp = NULL;
fs/nfs/pnfs_nfs.c
750
list_add(&ds->ds_node, &nn->nfs4_data_server_cache);
fs/nfs/pnfs_nfs.c
752
ds->ds_remotestr);
fs/nfs/pnfs_nfs.c
755
kfree(ds);
fs/nfs/pnfs_nfs.c
760
ds = tmp_ds;
fs/nfs/pnfs_nfs.c
764
return ds;
fs/nfs/pnfs_nfs.c
768
static int nfs4_wait_ds_connect(struct nfs4_pnfs_ds *ds)
fs/nfs/pnfs_nfs.c
771
return wait_on_bit(&ds->ds_state, NFS4DS_CONNECTING, TASK_KILLABLE);
fs/nfs/pnfs_nfs.c
774
static void nfs4_clear_ds_conn_bit(struct nfs4_pnfs_ds *ds)
fs/nfs/pnfs_nfs.c
777
clear_and_wake_up_bit(NFS4DS_CONNECTING, &ds->ds_state);
fs/nfs/pnfs_nfs.c
807
struct nfs4_pnfs_ds *ds,
fs/nfs/pnfs_nfs.c
819
dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr);
fs/nfs/pnfs_nfs.c
824
list_for_each_entry(da, &ds->ds_addrs, da_node) {
fs/nfs/pnfs_nfs.c
826
__func__, ds->ds_remotestr, da->da_remotestr);
fs/nfs/pnfs_nfs.c
87
cinfo->ds->nwritten--;
fs/nfs/pnfs_nfs.c
874
WRITE_ONCE(ds->ds_clp, clp);
fs/nfs/pnfs_nfs.c
875
dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr);
fs/nfs/pnfs_nfs.c
881
struct nfs4_pnfs_ds *ds,
fs/nfs/pnfs_nfs.c
893
dprintk("--> %s DS %s\n", __func__, ds->ds_remotestr);
fs/nfs/pnfs_nfs.c
895
list_for_each_entry(da, &ds->ds_addrs, da_node) {
fs/nfs/pnfs_nfs.c
899
__func__, ds->ds_remotestr, da->da_remotestr);
fs/nfs/pnfs_nfs.c
994
WRITE_ONCE(ds->ds_clp, clp);
fs/nfs/pnfs_nfs.c
995
dprintk("%s [new] addr: %s\n", __func__, ds->ds_remotestr);
fs/nfs/write.c
841
cinfo->ds = pnfs_get_ds_info(inode);
fs/nfsd/nfs4state.c
3010
struct nfs4_delegation *ds;
fs/nfsd/nfs4state.c
3014
ds = delegstateid(st);
fs/nfsd/nfs4state.c
3021
seq_printf(s, "access: %s", nfs4_show_deleg_type(ds->dl_type));
fs/xfs/scrub/attr.c
296
struct xchk_da_btree *ds,
fs/xfs/scrub/attr.c
306
struct xfs_mount *mp = ds->state->mp;
fs/xfs/scrub/attr.c
307
struct xchk_xattr_buf *ab = ds->sc->buf;
fs/xfs/scrub/attr.c
315
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
319
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
325
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
336
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
342
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
345
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
348
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
350
if (!xchk_xattr_set_map(ds->sc, ab->usedmap, nameidx, namesize))
fs/xfs/scrub/attr.c
351
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
352
if (!(ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT))
fs/xfs/scrub/attr.c
359
struct xchk_da_btree *ds,
fs/xfs/scrub/attr.c
363
struct xfs_mount *mp = ds->state->mp;
fs/xfs/scrub/attr.c
364
struct xfs_da_state_blk *blk = &ds->state->path.blk[level];
fs/xfs/scrub/attr.c
366
xfs_dablk_t *last_checked = ds->private;
fs/xfs/scrub/attr.c
370
struct xchk_xattr_buf *ab = ds->sc->buf;
fs/xfs/scrub/attr.c
386
if (xfs_has_crc(ds->sc->mp)) {
fs/xfs/scrub/attr.c
391
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
394
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
408
xchk_da_set_preen(ds, level);
fs/xfs/scrub/attr.c
410
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
413
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
415
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
417
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
418
if (!xchk_xattr_set_map(ds->sc, ab->usedmap, 0, hdrsize))
fs/xfs/scrub/attr.c
419
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
421
xchk_da_set_preen(ds, level);
fs/xfs/scrub/attr.c
423
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/attr.c
428
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
430
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/attr.c
437
if (!xchk_xattr_set_map(ds->sc, ab->usedmap, off,
fs/xfs/scrub/attr.c
439
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
444
xchk_xattr_entry(ds, level, buf_end, leaf, &leafhdr,
fs/xfs/scrub/attr.c
447
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/attr.c
453
if (!xchk_xattr_set_map(ds->sc, ab->freemap,
fs/xfs/scrub/attr.c
456
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
465
xchk_da_set_preen(ds, level);
fs/xfs/scrub/attr.c
467
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/attr.c
474
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
477
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
486
struct xchk_da_btree *ds,
fs/xfs/scrub/attr.c
489
struct xfs_mount *mp = ds->state->mp;
fs/xfs/scrub/attr.c
490
struct xfs_da_state_blk *blk = &ds->state->path.blk[level];
fs/xfs/scrub/attr.c
506
error = xchk_xattr_block(ds, level);
fs/xfs/scrub/attr.c
509
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/attr.c
513
error = xchk_da_btree_hash(ds, level, &ent->hashval);
fs/xfs/scrub/attr.c
522
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
529
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
533
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
541
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
552
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
556
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/attr.c
564
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
101
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
104
struct xfs_da_state_blk *blk = &ds->state->path.blk[level];
fs/xfs/scrub/dabtree.c
109
xfs_da3_node_hdr_from_disk(ds->sc->mp, &hdr, blk->bp->b_addr);
fs/xfs/scrub/dabtree.c
116
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
126
if (hash < ds->hashes[level])
fs/xfs/scrub/dabtree.c
127
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
128
ds->hashes[level] = hash;
fs/xfs/scrub/dabtree.c
134
entry = xchk_da_btree_node_entry(ds, level - 1);
fs/xfs/scrub/dabtree.c
137
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
148
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
152
if (blkno < ds->lowest || (ds->highest != 0 && blkno >= ds->highest)) {
fs/xfs/scrub/dabtree.c
153
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
236
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
241
struct xfs_da_state_path *path = &ds->state->path;
fs/xfs/scrub/dabtree.c
242
struct xfs_da_state_path *altpath = &ds->state->altpath;
fs/xfs/scrub/dabtree.c
247
memcpy(altpath, path, sizeof(ds->state->altpath));
fs/xfs/scrub/dabtree.c
254
error = xfs_da3_path_shift(ds->state, altpath, direction,
fs/xfs/scrub/dabtree.c
257
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
263
error = xfs_da3_path_shift(ds->state, altpath, direction, false,
fs/xfs/scrub/dabtree.c
265
if (!xchk_da_process_error(ds, level, &error))
fs/xfs/scrub/dabtree.c
268
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
272
xchk_buffer_recheck(ds->sc, altpath->blk[level].bp);
fs/xfs/scrub/dabtree.c
276
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
286
xfs_trans_brelse(ds->dargs.trans, altpath->blk[plevel].bp);
fs/xfs/scrub/dabtree.c
296
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
31
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
310
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
318
error = xchk_da_btree_block_check_sibling(ds, level, 0, back);
fs/xfs/scrub/dabtree.c
321
error = xchk_da_btree_block_check_sibling(ds, level, 1, forw);
fs/xfs/scrub/dabtree.c
324
memset(&ds->state->altpath, 0, sizeof(ds->state->altpath));
fs/xfs/scrub/dabtree.c
331
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
339
struct xfs_da_args *dargs = &ds->dargs;
fs/xfs/scrub/dabtree.c
340
struct xfs_inode *ip = ds->dargs.dp;
fs/xfs/scrub/dabtree.c
347
blk = &ds->state->path.blk[level];
fs/xfs/scrub/dabtree.c
348
ds->state->path.active = level + 1;
fs/xfs/scrub/dabtree.c
35
struct xfs_scrub *sc = ds->sc;
fs/xfs/scrub/dabtree.c
358
if (!xchk_da_btree_ptr_ok(ds, level, blkno))
fs/xfs/scrub/dabtree.c
365
if (!xchk_da_process_error(ds, level, &error))
fs/xfs/scrub/dabtree.c
368
xchk_buffer_recheck(ds->sc, blk->bp);
fs/xfs/scrub/dabtree.c
375
if (ds->dargs.whichfork == XFS_DATA_FORK && level == 0 &&
fs/xfs/scrub/dabtree.c
381
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
387
pmaxrecs = &ds->maxrecs[level];
fs/xfs/scrub/dabtree.c
390
if (xfs_has_crc(ds->sc->mp) && hdr3->hdr.pad)
fs/xfs/scrub/dabtree.c
391
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
397
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
401
error = xchk_da_btree_block_check_siblings(ds, level, &hdr3->hdr);
fs/xfs/scrub/dabtree.c
413
if (ds->tree_level != 0)
fs/xfs/scrub/dabtree.c
414
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
422
if (ds->tree_level != 0)
fs/xfs/scrub/dabtree.c
423
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
431
if (ds->tree_level != 0)
fs/xfs/scrub/dabtree.c
432
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
446
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
449
ds->tree_level = nodehdr.level;
fs/xfs/scrub/dabtree.c
451
if (ds->tree_level != nodehdr.level) {
fs/xfs/scrub/dabtree.c
452
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
460
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
466
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
477
key = xchk_da_btree_node_entry(ds, level - 1);
fs/xfs/scrub/dabtree.c
479
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dabtree.c
502
struct xchk_da_btree *ds;
fs/xfs/scrub/dabtree.c
515
ds = kzalloc_obj(struct xchk_da_btree, XCHK_GFP_FLAGS);
fs/xfs/scrub/dabtree.c
516
if (!ds)
fs/xfs/scrub/dabtree.c
518
ds->dargs.dp = sc->ip;
fs/xfs/scrub/dabtree.c
519
ds->dargs.whichfork = whichfork;
fs/xfs/scrub/dabtree.c
520
ds->dargs.trans = sc->tp;
fs/xfs/scrub/dabtree.c
521
ds->dargs.op_flags = XFS_DA_OP_OKNOENT;
fs/xfs/scrub/dabtree.c
522
ds->dargs.owner = sc->ip->i_ino;
fs/xfs/scrub/dabtree.c
523
ds->state = xfs_da_state_alloc(&ds->dargs);
fs/xfs/scrub/dabtree.c
524
ds->sc = sc;
fs/xfs/scrub/dabtree.c
525
ds->private = private;
fs/xfs/scrub/dabtree.c
527
ds->dargs.geo = mp->m_attr_geo;
fs/xfs/scrub/dabtree.c
528
ds->lowest = 0;
fs/xfs/scrub/dabtree.c
529
ds->highest = 0;
fs/xfs/scrub/dabtree.c
531
ds->dargs.geo = mp->m_dir_geo;
fs/xfs/scrub/dabtree.c
532
ds->lowest = ds->dargs.geo->leafblk;
fs/xfs/scrub/dabtree.c
533
ds->highest = ds->dargs.geo->freeblk;
fs/xfs/scrub/dabtree.c
535
blkno = ds->lowest;
fs/xfs/scrub/dabtree.c
539
blks = ds->state->path.blk;
fs/xfs/scrub/dabtree.c
540
error = xchk_da_btree_block(ds, level, blkno);
fs/xfs/scrub/dabtree.c
55
trace_xchk_file_op_error(sc, ds->dargs.whichfork,
fs/xfs/scrub/dabtree.c
556
if (blks[level].index >= ds->maxrecs[level]) {
fs/xfs/scrub/dabtree.c
559
ds->tree_level++;
fs/xfs/scrub/dabtree.c
56
xfs_dir2_da_to_db(ds->dargs.geo,
fs/xfs/scrub/dabtree.c
565
error = scrub_fn(ds, level);
fs/xfs/scrub/dabtree.c
57
ds->state->path.blk[level].blkno),
fs/xfs/scrub/dabtree.c
578
if (blks[level].index >= ds->maxrecs[level]) {
fs/xfs/scrub/dabtree.c
581
ds->tree_level++;
fs/xfs/scrub/dabtree.c
587
key = xchk_da_btree_node_entry(ds, level);
fs/xfs/scrub/dabtree.c
588
error = xchk_da_btree_hash(ds, level, &key->hashval);
fs/xfs/scrub/dabtree.c
597
xchk_da_set_corrupt(ds, level - 1);
fs/xfs/scrub/dabtree.c
600
ds->tree_level--;
fs/xfs/scrub/dabtree.c
601
error = xchk_da_btree_block(ds, level, blkno);
fs/xfs/scrub/dabtree.c
620
xfs_da_state_free(ds->state);
fs/xfs/scrub/dabtree.c
621
kfree(ds);
fs/xfs/scrub/dabtree.c
70
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
73
struct xfs_scrub *sc = ds->sc;
fs/xfs/scrub/dabtree.c
77
trace_xchk_fblock_error(sc, ds->dargs.whichfork,
fs/xfs/scrub/dabtree.c
78
xfs_dir2_da_to_db(ds->dargs.geo,
fs/xfs/scrub/dabtree.c
79
ds->state->path.blk[level].blkno),
fs/xfs/scrub/dabtree.c
86
struct xchk_da_btree *ds,
fs/xfs/scrub/dabtree.c
89
struct xfs_scrub *sc = ds->sc;
fs/xfs/scrub/dabtree.c
92
trace_xchk_fblock_preen(sc, ds->dargs.whichfork,
fs/xfs/scrub/dabtree.c
93
xfs_dir2_da_to_db(ds->dargs.geo,
fs/xfs/scrub/dabtree.c
94
ds->state->path.blk[level].blkno),
fs/xfs/scrub/dabtree.h
31
typedef int (*xchk_da_btree_rec_fn)(struct xchk_da_btree *ds, int level);
fs/xfs/scrub/dabtree.h
34
bool xchk_da_process_error(struct xchk_da_btree *ds, int level, int *error);
fs/xfs/scrub/dabtree.h
37
void xchk_da_set_corrupt(struct xchk_da_btree *ds, int level);
fs/xfs/scrub/dabtree.h
38
void xchk_da_set_preen(struct xchk_da_btree *ds, int level);
fs/xfs/scrub/dabtree.h
40
void xchk_da_set_preen(struct xchk_da_btree *ds, int level);
fs/xfs/scrub/dabtree.h
42
int xchk_da_btree_hash(struct xchk_da_btree *ds, int level, __be32 *hashp);
fs/xfs/scrub/dir.c
317
struct xchk_da_btree *ds,
fs/xfs/scrub/dir.c
321
struct xfs_da_state_blk *blk = &ds->state->path.blk[level];
fs/xfs/scrub/dir.c
322
struct xfs_mount *mp = ds->state->mp;
fs/xfs/scrub/dir.c
323
struct xfs_inode *dp = ds->dargs.dp;
fs/xfs/scrub/dir.c
348
error = xchk_da_btree_hash(ds, level, &ent->hashval);
fs/xfs/scrub/dir.c
363
xchk_da_set_corrupt(ds, level);
fs/xfs/scrub/dir.c
366
error = xfs_dir3_data_read(ds->dargs.trans, dp, ds->dargs.owner,
fs/xfs/scrub/dir.c
368
if (!xchk_fblock_process_error(ds->sc, XFS_DATA_FORK, rec_bno,
fs/xfs/scrub/dir.c
372
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
375
xchk_buffer_recheck(ds->sc, bp);
fs/xfs/scrub/dir.c
377
if (ds->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
fs/xfs/scrub/dir.c
386
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
394
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
412
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
414
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
423
xchk_fblock_set_corrupt(ds->sc, XFS_DATA_FORK, rec_bno);
fs/xfs/scrub/dir.c
426
xfs_trans_brelse(ds->dargs.trans, bp);
include/hyperv/hvgdk_mini.h
862
struct hv_x64_segment_register ds;
include/hyperv/hvhdk.h
101
struct hv_x64_segment_register ds;
include/linux/dsa/8021q.h
16
int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto);
include/linux/dsa/8021q.h
18
void dsa_tag_8021q_unregister(struct dsa_switch *ds);
include/linux/dsa/8021q.h
20
int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port,
include/linux/dsa/8021q.h
24
void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port,
include/linux/dsa/ksz_common.h
34
void (*hwtstamp_set_state)(struct dsa_switch *ds, bool on);
include/linux/dsa/ksz_common.h
48
ksz_tagger_data(struct dsa_switch *ds)
include/linux/dsa/ksz_common.h
50
return ds->tagger_data;
include/linux/dsa/lan9303.h
27
struct dsa_switch *ds;
include/linux/dsa/ocelot.h
180
ocelot_8021q_tagger_data(struct dsa_switch *ds)
include/linux/dsa/ocelot.h
182
BUG_ON(ds->dst->tag_ops->proto != DSA_TAG_PROTO_OCELOT_8021Q);
include/linux/dsa/ocelot.h
184
return ds->tagger_data;
include/linux/dsa/sja1105.h
52
void (*meta_tstamp_handler)(struct dsa_switch *ds, int port, u8 ts_id,
include/linux/dsa/sja1105.h
67
sja1105_tagger_data(struct dsa_switch *ds)
include/linux/dsa/sja1105.h
69
BUG_ON(ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1105 &&
include/linux/dsa/sja1105.h
70
ds->dst->tag_ops->proto != DSA_TAG_PROTO_SJA1110);
include/linux/dsa/sja1105.h
72
return ds->tagger_data;
include/linux/dsa/tag_qca.h
81
void (*rw_reg_ack_handler)(struct dsa_switch *ds,
include/linux/dsa/tag_qca.h
83
void (*mib_autocast_handler)(struct dsa_switch *ds,
include/linux/nfs_xdr.h
1705
struct pnfs_ds_commit_info *ds;
include/linux/nvme.h
430
__u8 ds;
include/net/dsa.h
1001
int (*get_eeprom_len)(struct dsa_switch *ds);
include/net/dsa.h
1002
int (*get_eeprom)(struct dsa_switch *ds,
include/net/dsa.h
1004
int (*set_eeprom)(struct dsa_switch *ds,
include/net/dsa.h
1010
int (*get_regs_len)(struct dsa_switch *ds, int port);
include/net/dsa.h
1011
void (*get_regs)(struct dsa_switch *ds, int port,
include/net/dsa.h
1017
int (*port_prechangeupper)(struct dsa_switch *ds, int port,
include/net/dsa.h
1023
int (*set_ageing_time)(struct dsa_switch *ds, unsigned int msecs);
include/net/dsa.h
1024
int (*port_bridge_join)(struct dsa_switch *ds, int port,
include/net/dsa.h
1028
void (*port_bridge_leave)(struct dsa_switch *ds, int port,
include/net/dsa.h
1030
void (*port_stp_state_set)(struct dsa_switch *ds, int port,
include/net/dsa.h
1032
int (*port_mst_state_set)(struct dsa_switch *ds, int port,
include/net/dsa.h
1034
void (*port_fast_age)(struct dsa_switch *ds, int port);
include/net/dsa.h
1035
int (*port_vlan_fast_age)(struct dsa_switch *ds, int port, u16 vid);
include/net/dsa.h
1036
int (*port_pre_bridge_flags)(struct dsa_switch *ds, int port,
include/net/dsa.h
1039
int (*port_bridge_flags)(struct dsa_switch *ds, int port,
include/net/dsa.h
1042
void (*port_set_host_flood)(struct dsa_switch *ds, int port,
include/net/dsa.h
1048
int (*port_vlan_filtering)(struct dsa_switch *ds, int port,
include/net/dsa.h
105
int (*connect)(struct dsa_switch *ds);
include/net/dsa.h
1051
int (*port_vlan_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1054
int (*port_vlan_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1056
int (*vlan_msti_set)(struct dsa_switch *ds, struct dsa_bridge bridge,
include/net/dsa.h
106
void (*disconnect)(struct dsa_switch *ds);
include/net/dsa.h
1062
int (*port_fdb_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1065
int (*port_fdb_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1068
int (*port_fdb_dump)(struct dsa_switch *ds, int port,
include/net/dsa.h
1070
int (*lag_fdb_add)(struct dsa_switch *ds, struct dsa_lag lag,
include/net/dsa.h
1073
int (*lag_fdb_del)(struct dsa_switch *ds, struct dsa_lag lag,
include/net/dsa.h
1080
int (*port_mdb_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1083
int (*port_mdb_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1089
int (*get_rxnfc)(struct dsa_switch *ds, int port,
include/net/dsa.h
1091
int (*set_rxnfc)(struct dsa_switch *ds, int port,
include/net/dsa.h
1097
int (*cls_flower_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1099
int (*cls_flower_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1101
int (*cls_flower_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
1103
int (*port_mirror_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1106
void (*port_mirror_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1108
int (*port_policer_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1110
void (*port_policer_del)(struct dsa_switch *ds, int port);
include/net/dsa.h
1111
int (*port_setup_tc)(struct dsa_switch *ds, int port,
include/net/dsa.h
1117
int (*crosschip_bridge_join)(struct dsa_switch *ds, int tree_index,
include/net/dsa.h
1121
void (*crosschip_bridge_leave)(struct dsa_switch *ds, int tree_index,
include/net/dsa.h
1124
int (*crosschip_lag_change)(struct dsa_switch *ds, int sw_index,
include/net/dsa.h
1126
int (*crosschip_lag_join)(struct dsa_switch *ds, int sw_index,
include/net/dsa.h
1130
int (*crosschip_lag_leave)(struct dsa_switch *ds, int sw_index,
include/net/dsa.h
1136
int (*port_hwtstamp_get)(struct dsa_switch *ds, int port,
include/net/dsa.h
1138
int (*port_hwtstamp_set)(struct dsa_switch *ds, int port,
include/net/dsa.h
1141
void (*port_txtstamp)(struct dsa_switch *ds, int port,
include/net/dsa.h
1143
bool (*port_rxtstamp)(struct dsa_switch *ds, int port,
include/net/dsa.h
1147
int (*devlink_param_get)(struct dsa_switch *ds, u32 id,
include/net/dsa.h
1149
int (*devlink_param_set)(struct dsa_switch *ds, u32 id,
include/net/dsa.h
1151
int (*devlink_info_get)(struct dsa_switch *ds,
include/net/dsa.h
1154
int (*devlink_sb_pool_get)(struct dsa_switch *ds,
include/net/dsa.h
1157
int (*devlink_sb_pool_set)(struct dsa_switch *ds, unsigned int sb_index,
include/net/dsa.h
1161
int (*devlink_sb_port_pool_get)(struct dsa_switch *ds, int port,
include/net/dsa.h
1164
int (*devlink_sb_port_pool_set)(struct dsa_switch *ds, int port,
include/net/dsa.h
1168
int (*devlink_sb_tc_pool_bind_get)(struct dsa_switch *ds, int port,
include/net/dsa.h
1172
int (*devlink_sb_tc_pool_bind_set)(struct dsa_switch *ds, int port,
include/net/dsa.h
1177
int (*devlink_sb_occ_snapshot)(struct dsa_switch *ds,
include/net/dsa.h
1179
int (*devlink_sb_occ_max_clear)(struct dsa_switch *ds,
include/net/dsa.h
1181
int (*devlink_sb_occ_port_pool_get)(struct dsa_switch *ds, int port,
include/net/dsa.h
1184
int (*devlink_sb_occ_tc_port_bind_get)(struct dsa_switch *ds, int port,
include/net/dsa.h
1195
int (*port_change_mtu)(struct dsa_switch *ds, int port,
include/net/dsa.h
1197
int (*port_max_mtu)(struct dsa_switch *ds, int port);
include/net/dsa.h
1202
int (*port_lag_change)(struct dsa_switch *ds, int port);
include/net/dsa.h
1203
int (*port_lag_join)(struct dsa_switch *ds, int port,
include/net/dsa.h
1207
int (*port_lag_leave)(struct dsa_switch *ds, int port,
include/net/dsa.h
1213
int (*port_hsr_join)(struct dsa_switch *ds, int port,
include/net/dsa.h
1216
int (*port_hsr_leave)(struct dsa_switch *ds, int port,
include/net/dsa.h
1222
int (*port_mrp_add)(struct dsa_switch *ds, int port,
include/net/dsa.h
1224
int (*port_mrp_del)(struct dsa_switch *ds, int port,
include/net/dsa.h
1226
int (*port_mrp_add_ring_role)(struct dsa_switch *ds, int port,
include/net/dsa.h
1228
int (*port_mrp_del_ring_role)(struct dsa_switch *ds, int port,
include/net/dsa.h
1234
int (*tag_8021q_vlan_add)(struct dsa_switch *ds, int port, u16 vid,
include/net/dsa.h
1236
int (*tag_8021q_vlan_del)(struct dsa_switch *ds, int port, u16 vid);
include/net/dsa.h
1241
void (*conduit_state_change)(struct dsa_switch *ds,
include/net/dsa.h
1256
int dsa_devlink_params_register(struct dsa_switch *ds,
include/net/dsa.h
1259
void dsa_devlink_params_unregister(struct dsa_switch *ds,
include/net/dsa.h
1262
int dsa_devlink_resource_register(struct dsa_switch *ds,
include/net/dsa.h
1269
void dsa_devlink_resources_unregister(struct dsa_switch *ds);
include/net/dsa.h
1271
void dsa_devlink_resource_occ_get_register(struct dsa_switch *ds,
include/net/dsa.h
1275
void dsa_devlink_resource_occ_get_unregister(struct dsa_switch *ds,
include/net/dsa.h
1278
dsa_devlink_region_create(struct dsa_switch *ds,
include/net/dsa.h
1282
dsa_devlink_port_region_create(struct dsa_switch *ds,
include/net/dsa.h
1291
struct dsa_switch *ds;
include/net/dsa.h
1298
return dl_priv->ds;
include/net/dsa.h
1307
return dl_priv->ds;
include/net/dsa.h
1315
bool dsa_fdb_present_in_other_db(struct dsa_switch *ds, int port,
include/net/dsa.h
1318
bool dsa_mdb_present_in_other_db(struct dsa_switch *ds, int port,
include/net/dsa.h
1322
int dsa_port_simple_hsr_validate(struct dsa_switch *ds, int port,
include/net/dsa.h
1325
int dsa_port_simple_hsr_join(struct dsa_switch *ds, int port,
include/net/dsa.h
1328
int dsa_port_simple_hsr_leave(struct dsa_switch *ds, int port,
include/net/dsa.h
1366
void dsa_unregister_switch(struct dsa_switch *ds);
include/net/dsa.h
1367
int dsa_register_switch(struct dsa_switch *ds);
include/net/dsa.h
1368
void dsa_switch_shutdown(struct dsa_switch *ds);
include/net/dsa.h
1372
int dsa_switch_suspend(struct dsa_switch *ds);
include/net/dsa.h
1373
int dsa_switch_resume(struct dsa_switch *ds);
include/net/dsa.h
1375
static inline int dsa_switch_suspend(struct dsa_switch *ds)
include/net/dsa.h
1379
static inline int dsa_switch_resume(struct dsa_switch *ds)
include/net/dsa.h
1395
void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up);
include/net/dsa.h
1396
bool dsa_supports_eee(struct dsa_switch *ds, int port);
include/net/dsa.h
185
if ((_dp)->ds == (_ds) && (_dp)->hsr_dev == (_hsr))
include/net/dsa.h
257
struct dsa_switch *ds;
include/net/dsa.h
513
static inline struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p)
include/net/dsa.h
515
struct dsa_switch_tree *dst = ds->dst;
include/net/dsa.h
519
if (dp->ds == ds && dp->index == p)
include/net/dsa.h
551
static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p)
include/net/dsa.h
553
return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED;
include/net/dsa.h
556
static inline bool dsa_is_cpu_port(struct dsa_switch *ds, int p)
include/net/dsa.h
558
return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_CPU;
include/net/dsa.h
561
static inline bool dsa_is_dsa_port(struct dsa_switch *ds, int p)
include/net/dsa.h
563
return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_DSA;
include/net/dsa.h
566
static inline bool dsa_is_user_port(struct dsa_switch *ds, int p)
include/net/dsa.h
568
return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_USER;
include/net/dsa.h
585
if ((_dp)->ds == (_ds))
include/net/dsa.h
589
if ((_dp)->ds == (_ds))
include/net/dsa.h
593
if ((_dp)->ds == (_ds))
include/net/dsa.h
615
static inline u32 dsa_user_ports(struct dsa_switch *ds)
include/net/dsa.h
620
dsa_switch_for_each_user_port(dp, ds)
include/net/dsa.h
626
static inline u32 dsa_cpu_ports(struct dsa_switch *ds)
include/net/dsa.h
631
dsa_switch_for_each_cpu_port(cpu_dp, ds)
include/net/dsa.h
638
static inline unsigned int dsa_routing_port(struct dsa_switch *ds, int device)
include/net/dsa.h
640
struct dsa_switch_tree *dst = ds->dst;
include/net/dsa.h
644
if (dl->dp->ds == ds && dl->link_dp->ds->index == device)
include/net/dsa.h
647
return ds->num_ports;
include/net/dsa.h
651
static inline unsigned int dsa_towards_port(struct dsa_switch *ds, int device,
include/net/dsa.h
654
if (device == ds->index)
include/net/dsa.h
657
return dsa_routing_port(ds, device);
include/net/dsa.h
661
static inline unsigned int dsa_upstream_port(struct dsa_switch *ds, int port)
include/net/dsa.h
663
const struct dsa_port *dp = dsa_to_port(ds, port);
include/net/dsa.h
669
return dsa_towards_port(ds, cpu_dp->ds->index, cpu_dp->index);
include/net/dsa.h
673
static inline bool dsa_is_upstream_port(struct dsa_switch *ds, int port)
include/net/dsa.h
675
if (dsa_is_unused_port(ds, port))
include/net/dsa.h
678
return port == dsa_upstream_port(ds, port);
include/net/dsa.h
682
static inline bool dsa_is_downstream_port(struct dsa_switch *ds, int port)
include/net/dsa.h
684
return dsa_is_dsa_port(ds, port) && !dsa_is_upstream_port(ds, port);
include/net/dsa.h
688
static inline unsigned int dsa_switch_upstream_port(struct dsa_switch *ds)
include/net/dsa.h
692
dsa_switch_for_each_available_port(dp, ds) {
include/net/dsa.h
693
return dsa_upstream_port(ds, dp->index);
include/net/dsa.h
696
return ds->num_ports;
include/net/dsa.h
718
const struct dsa_switch *ds = dp->ds;
include/net/dsa.h
720
if (ds->vlan_filtering_is_global)
include/net/dsa.h
721
return ds->vlan_filtering;
include/net/dsa.h
837
return a->ds->dst == b->ds->dst;
include/net/dsa.h
850
enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
include/net/dsa.h
853
int (*change_tag_protocol)(struct dsa_switch *ds,
include/net/dsa.h
860
int (*connect_tag_protocol)(struct dsa_switch *ds,
include/net/dsa.h
863
int (*port_change_conduit)(struct dsa_switch *ds, int port,
include/net/dsa.h
868
int (*setup)(struct dsa_switch *ds);
include/net/dsa.h
869
void (*teardown)(struct dsa_switch *ds);
include/net/dsa.h
874
int (*port_setup)(struct dsa_switch *ds, int port);
include/net/dsa.h
875
void (*port_teardown)(struct dsa_switch *ds, int port);
include/net/dsa.h
877
u32 (*get_phy_flags)(struct dsa_switch *ds, int port);
include/net/dsa.h
882
int (*phy_read)(struct dsa_switch *ds, int port, int regnum);
include/net/dsa.h
883
int (*phy_write)(struct dsa_switch *ds, int port,
include/net/dsa.h
889
void (*phylink_get_caps)(struct dsa_switch *ds, int port,
include/net/dsa.h
891
void (*phylink_fixed_state)(struct dsa_switch *ds, int port,
include/net/dsa.h
896
void (*get_strings)(struct dsa_switch *ds, int port,
include/net/dsa.h
898
void (*get_ethtool_stats)(struct dsa_switch *ds,
include/net/dsa.h
900
int (*get_sset_count)(struct dsa_switch *ds, int port, int sset);
include/net/dsa.h
901
void (*get_ethtool_phy_stats)(struct dsa_switch *ds,
include/net/dsa.h
903
void (*get_eth_phy_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
905
void (*get_eth_mac_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
907
void (*get_eth_ctrl_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
909
void (*get_rmon_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
912
void (*get_ts_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
914
void (*get_stats64)(struct dsa_switch *ds, int port,
include/net/dsa.h
916
void (*get_pause_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
918
void (*self_test)(struct dsa_switch *ds, int port,
include/net/dsa.h
924
void (*get_wol)(struct dsa_switch *ds, int port,
include/net/dsa.h
926
int (*set_wol)(struct dsa_switch *ds, int port,
include/net/dsa.h
932
int (*get_ts_info)(struct dsa_switch *ds, int port,
include/net/dsa.h
938
int (*get_mm)(struct dsa_switch *ds, int port,
include/net/dsa.h
940
int (*set_mm)(struct dsa_switch *ds, int port,
include/net/dsa.h
943
void (*get_mm_stats)(struct dsa_switch *ds, int port,
include/net/dsa.h
949
int (*port_get_default_prio)(struct dsa_switch *ds, int port);
include/net/dsa.h
950
int (*port_set_default_prio)(struct dsa_switch *ds, int port,
include/net/dsa.h
952
int (*port_get_dscp_prio)(struct dsa_switch *ds, int port, u8 dscp);
include/net/dsa.h
953
int (*port_add_dscp_prio)(struct dsa_switch *ds, int port, u8 dscp,
include/net/dsa.h
955
int (*port_del_dscp_prio)(struct dsa_switch *ds, int port, u8 dscp,
include/net/dsa.h
957
int (*port_set_apptrust)(struct dsa_switch *ds, int port,
include/net/dsa.h
959
int (*port_get_apptrust)(struct dsa_switch *ds, int port, u8 *sel,
include/net/dsa.h
965
int (*suspend)(struct dsa_switch *ds);
include/net/dsa.h
966
int (*resume)(struct dsa_switch *ds);
include/net/dsa.h
971
int (*port_enable)(struct dsa_switch *ds, int port,
include/net/dsa.h
973
void (*port_disable)(struct dsa_switch *ds, int port);
include/net/dsa.h
982
int (*port_set_mac_address)(struct dsa_switch *ds, int port,
include/net/dsa.h
991
struct dsa_port *(*preferred_default_local_cpu_port)(struct dsa_switch *ds);
include/net/dsa.h
996
bool (*support_eee)(struct dsa_switch *ds, int port);
include/net/dsa.h
997
int (*set_mac_eee)(struct dsa_switch *ds, int port,
include/soc/fsl/qman.h
459
static inline void qm_fqd_set_stashing(struct qm_fqd *fqd, u8 as, u8 ds, u8 cs)
include/soc/fsl/qman.h
464
((ds & QM_FQD_XS_MASK) << QM_FQD_DS_OFF) |
include/soc/mscc/ocelot_vcap.h
550
struct ocelot_vcap_u8 ds;
include/soc/mscc/ocelot_vcap.h
573
struct ocelot_vcap_u8 ds;
include/uapi/video/uvesafb.h
21
__u16 ds;
lib/zstd/common/cpu.h
149
D(ds, 21)
net/dsa/conduit.c
102
if (ds->ops->get_ethtool_stats)
net/dsa/conduit.c
103
ds->ops->get_ethtool_stats(ds, port, data + start);
net/dsa/conduit.c
128
count = dsa_conduit_append_port_stats(dp->ds, dp->index,
net/dsa/conduit.c
143
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
161
if (ds->ops->get_ethtool_phy_stats)
net/dsa/conduit.c
162
ds->ops->get_ethtool_phy_stats(ds, port, data + count);
net/dsa/conduit.c
165
static void dsa_conduit_append_port_sset_count(struct dsa_switch *ds, int port,
net/dsa/conduit.c
168
if (ds->ops->get_sset_count)
net/dsa/conduit.c
169
*count += ds->ops->get_sset_count(ds, port, sset);
net/dsa/conduit.c
194
dsa_conduit_append_port_sset_count(dp->ds, dp->index, sset,
net/dsa/conduit.c
201
static ssize_t dsa_conduit_append_port_strings(struct dsa_switch *ds, int port,
net/dsa/conduit.c
209
if (!ds->ops->get_strings)
net/dsa/conduit.c
212
snprintf(pfx, sizeof(pfx), "s%.2d_p%.2d", ds->index, port);
net/dsa/conduit.c
220
ds->ops->get_strings(ds, port, stringset, ndata);
net/dsa/conduit.c
221
count = ds->ops->get_sset_count(ds, port, stringset);
net/dsa/conduit.c
24
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
262
count = dsa_conduit_append_port_strings(dp->ds, dp->index,
net/dsa/conduit.c
280
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
284
dst = ds->dst;
net/dsa/conduit.c
300
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
306
ops = devm_kzalloc(ds->dev, sizeof(*ops), GFP_KERNEL);
net/dsa/conduit.c
395
err = dsa_tree_change_tag_proto(cpu_dp->ds->dst, new_tag_ops,
net/dsa/conduit.c
41
if (ds->ops->get_regs_len) {
net/dsa/conduit.c
42
len = ds->ops->get_regs_len(ds, port);
net/dsa/conduit.c
436
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
444
consumer_link = device_link_add(ds->dev, dev->dev.parent,
net/dsa/conduit.c
449
dev_name(ds->dev));
net/dsa/conduit.c
56
struct dsa_switch *ds = cpu_dp->ds;
net/dsa/conduit.c
81
if (ds->ops->get_regs_len && ds->ops->get_regs) {
net/dsa/conduit.c
82
len = ds->ops->get_regs_len(ds, port);
net/dsa/conduit.c
86
ds->ops->get_regs(ds, port, cpu_regs, data);
net/dsa/conduit.c
90
static ssize_t dsa_conduit_append_port_stats(struct dsa_switch *ds, int port,
net/dsa/conduit.c
95
if (!ds->ops->get_sset_count)
net/dsa/conduit.c
98
count = ds->ops->get_sset_count(ds, port, ETH_SS_STATS);
net/dsa/devlink.c
103
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
106
if (!ds->ops->devlink_sb_tc_pool_bind_set)
net/dsa/devlink.c
109
return ds->ops->devlink_sb_tc_pool_bind_set(ds, port, sb_index,
net/dsa/devlink.c
118
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
120
if (!ds->ops->devlink_sb_occ_snapshot)
net/dsa/devlink.c
123
return ds->ops->devlink_sb_occ_snapshot(ds, sb_index);
net/dsa/devlink.c
129
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
131
if (!ds->ops->devlink_sb_occ_max_clear)
net/dsa/devlink.c
134
return ds->ops->devlink_sb_occ_max_clear(ds, sb_index);
net/dsa/devlink.c
142
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
145
if (!ds->ops->devlink_sb_occ_port_pool_get)
net/dsa/devlink.c
148
return ds->ops->devlink_sb_occ_port_pool_get(ds, port, sb_index,
net/dsa/devlink.c
15
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
158
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
161
if (!ds->ops->devlink_sb_occ_tc_port_bind_get)
net/dsa/devlink.c
164
return ds->ops->devlink_sb_occ_tc_port_bind_get(ds, port,
net/dsa/devlink.c
17
if (ds->ops->devlink_info_get)
net/dsa/devlink.c
18
return ds->ops->devlink_info_get(ds, req, extack);
net/dsa/devlink.c
188
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
190
if (!ds->ops->devlink_param_get)
net/dsa/devlink.c
193
return ds->ops->devlink_param_get(ds, id, ctx);
net/dsa/devlink.c
201
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
203
if (!ds->ops->devlink_param_set)
net/dsa/devlink.c
206
return ds->ops->devlink_param_set(ds, id, ctx);
net/dsa/devlink.c
210
int dsa_devlink_params_register(struct dsa_switch *ds,
net/dsa/devlink.c
214
return devlink_params_register(ds->devlink, params, params_count);
net/dsa/devlink.c
218
void dsa_devlink_params_unregister(struct dsa_switch *ds,
net/dsa/devlink.c
222
devlink_params_unregister(ds->devlink, params, params_count);
net/dsa/devlink.c
226
int dsa_devlink_resource_register(struct dsa_switch *ds,
net/dsa/devlink.c
235
devl_lock(ds->devlink);
net/dsa/devlink.c
236
ret = devl_resource_register(ds->devlink, resource_name, resource_size,
net/dsa/devlink.c
239
devl_unlock(ds->devlink);
net/dsa/devlink.c
245
void dsa_devlink_resources_unregister(struct dsa_switch *ds)
net/dsa/devlink.c
247
devlink_resources_unregister(ds->devlink);
net/dsa/devlink.c
251
void dsa_devlink_resource_occ_get_register(struct dsa_switch *ds,
net/dsa/devlink.c
256
devl_lock(ds->devlink);
net/dsa/devlink.c
257
devl_resource_occ_get_register(ds->devlink, resource_id, occ_get,
net/dsa/devlink.c
259
devl_unlock(ds->devlink);
net/dsa/devlink.c
263
void dsa_devlink_resource_occ_get_unregister(struct dsa_switch *ds,
net/dsa/devlink.c
266
devl_lock(ds->devlink);
net/dsa/devlink.c
267
devl_resource_occ_get_unregister(ds->devlink, resource_id);
net/dsa/devlink.c
268
devl_unlock(ds->devlink);
net/dsa/devlink.c
27
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
273
dsa_devlink_region_create(struct dsa_switch *ds,
net/dsa/devlink.c
277
return devlink_region_create(ds->devlink, ops, region_max_snapshots,
net/dsa/devlink.c
283
dsa_devlink_port_region_create(struct dsa_switch *ds,
net/dsa/devlink.c
288
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/devlink.c
29
if (!ds->ops->devlink_sb_pool_get)
net/dsa/devlink.c
305
struct dsa_switch_tree *dst = dp->ds->dst;
net/dsa/devlink.c
307
struct devlink *dl = dp->ds->devlink;
net/dsa/devlink.c
308
struct dsa_switch *ds = dp->ds;
net/dsa/devlink.c
316
if (ds->ops->port_setup) {
net/dsa/devlink.c
317
err = ds->ops->port_setup(ds, dp->index);
net/dsa/devlink.c
32
return ds->ops->devlink_sb_pool_get(ds, sb_index, pool_index,
net/dsa/devlink.c
347
if (ds->ops->port_teardown)
net/dsa/devlink.c
348
ds->ops->port_teardown(ds, dp->index);
net/dsa/devlink.c
358
struct dsa_switch *ds = dp->ds;
net/dsa/devlink.c
362
if (ds->ops->port_teardown)
net/dsa/devlink.c
363
ds->ops->port_teardown(ds, dp->index);
net/dsa/devlink.c
368
void dsa_switch_devlink_register(struct dsa_switch *ds)
net/dsa/devlink.c
370
devlink_register(ds->devlink);
net/dsa/devlink.c
373
void dsa_switch_devlink_unregister(struct dsa_switch *ds)
net/dsa/devlink.c
375
devlink_unregister(ds->devlink);
net/dsa/devlink.c
378
int dsa_switch_devlink_alloc(struct dsa_switch *ds)
net/dsa/devlink.c
386
dl = devlink_alloc(&dsa_devlink_ops, sizeof(*dl_priv), ds->dev);
net/dsa/devlink.c
390
ds->devlink = dl;
net/dsa/devlink.c
392
dl_priv = devlink_priv(ds->devlink);
net/dsa/devlink.c
393
dl_priv->ds = ds;
net/dsa/devlink.c
398
void dsa_switch_devlink_free(struct dsa_switch *ds)
net/dsa/devlink.c
400
devlink_free(ds->devlink);
net/dsa/devlink.c
401
ds->devlink = NULL;
net/dsa/devlink.c
41
struct dsa_switch *ds = dsa_devlink_to_ds(dl);
net/dsa/devlink.c
43
if (!ds->ops->devlink_sb_pool_set)
net/dsa/devlink.c
46
return ds->ops->devlink_sb_pool_set(ds, sb_index, pool_index, size,
net/dsa/devlink.c
54
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
57
if (!ds->ops->devlink_sb_port_pool_get)
net/dsa/devlink.c
60
return ds->ops->devlink_sb_port_pool_get(ds, port, sb_index,
net/dsa/devlink.c
69
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
72
if (!ds->ops->devlink_sb_port_pool_set)
net/dsa/devlink.c
75
return ds->ops->devlink_sb_port_pool_set(ds, port, sb_index,
net/dsa/devlink.c
85
struct dsa_switch *ds = dsa_devlink_port_to_ds(dlp);
net/dsa/devlink.c
88
if (!ds->ops->devlink_sb_tc_pool_bind_get)
net/dsa/devlink.c
91
return ds->ops->devlink_sb_tc_pool_bind_get(ds, port, sb_index,
net/dsa/devlink.h
11
void dsa_switch_devlink_register(struct dsa_switch *ds);
net/dsa/devlink.h
12
void dsa_switch_devlink_unregister(struct dsa_switch *ds);
net/dsa/devlink.h
13
int dsa_switch_devlink_alloc(struct dsa_switch *ds);
net/dsa/devlink.h
14
void dsa_switch_devlink_free(struct dsa_switch *ds);
net/dsa/dsa.c
1086
static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index)
net/dsa/dsa.c
1088
struct dsa_switch_tree *dst = ds->dst;
net/dsa/dsa.c
1091
dsa_switch_for_each_port(dp, ds)
net/dsa/dsa.c
1099
dp->ds = ds;
net/dsa/dsa.c
1132
struct dsa_switch *mds, *ds = dp->ds;
net/dsa/dsa.c
1142
mds = mdp->ds;
net/dsa/dsa.c
1151
return ds->ops->get_tag_protocol(ds, dp->index, tag_protocol);
net/dsa/dsa.c
1158
struct dsa_switch *ds = dp->ds;
net/dsa/dsa.c
1159
struct dsa_switch_tree *dst = ds->dst;
net/dsa/dsa.c
1166
dev_err(ds->dev,
net/dsa/dsa.c
1176
if (!ds->ops->change_tag_protocol) {
net/dsa/dsa.c
1177
dev_err(ds->dev, "Tag protocol cannot be modified\n");
net/dsa/dsa.c
1183
dev_warn(ds->dev,
net/dsa/dsa.c
1197
dev_warn(ds->dev, "No tagger for this switch\n");
net/dsa/dsa.c
1203
dev_err(ds->dev,
net/dsa/dsa.c
1277
static int dsa_switch_parse_ports_of(struct dsa_switch *ds,
net/dsa/dsa.c
1290
dev_err(ds->dev, "no ports child node found\n");
net/dsa/dsa.c
1302
if (reg >= ds->num_ports) {
net/dsa/dsa.c
1303
dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n",
net/dsa/dsa.c
1304
port, reg, ds->num_ports);
net/dsa/dsa.c
1310
dp = dsa_to_port(ds, reg);
net/dsa/dsa.c
1324
static int dsa_switch_parse_member_of(struct dsa_switch *ds,
net/dsa/dsa.c
1335
ds->index = m[1];
net/dsa/dsa.c
1337
ds->dst = dsa_tree_touch(m[0]);
net/dsa/dsa.c
1338
if (!ds->dst)
net/dsa/dsa.c
1341
if (dsa_switch_find(ds->dst->index, ds->index)) {
net/dsa/dsa.c
1342
dev_err(ds->dev,
net/dsa/dsa.c
1344
ds->index, ds->dst->index);
net/dsa/dsa.c
1348
if (ds->dst->last_switch < ds->index)
net/dsa/dsa.c
1349
ds->dst->last_switch = ds->index;
net/dsa/dsa.c
1354
static int dsa_switch_touch_ports(struct dsa_switch *ds)
net/dsa/dsa.c
1359
for (port = 0; port < ds->num_ports; port++) {
net/dsa/dsa.c
1360
dp = dsa_port_touch(ds, port);
net/dsa/dsa.c
1368
static int dsa_switch_parse_of(struct dsa_switch *ds, struct device_node *dn)
net/dsa/dsa.c
1372
err = dsa_switch_parse_member_of(ds, dn);
net/dsa/dsa.c
1376
err = dsa_switch_touch_ports(ds);
net/dsa/dsa.c
1380
return dsa_switch_parse_ports_of(ds, dn);
net/dsa/dsa.c
1433
static int dsa_switch_parse_ports(struct dsa_switch *ds,
net/dsa/dsa.c
1446
dp = dsa_to_port(ds, i);
net/dsa/dsa.c
1464
static int dsa_switch_parse(struct dsa_switch *ds, struct dsa_chip_data *cd)
net/dsa/dsa.c
1468
ds->cd = cd;
net/dsa/dsa.c
1473
ds->index = 0;
net/dsa/dsa.c
1474
ds->dst = dsa_tree_touch(0);
net/dsa/dsa.c
1475
if (!ds->dst)
net/dsa/dsa.c
1478
err = dsa_switch_touch_ports(ds);
net/dsa/dsa.c
1482
return dsa_switch_parse_ports(ds, cd);
net/dsa/dsa.c
1485
static void dsa_switch_release_ports(struct dsa_switch *ds)
net/dsa/dsa.c
1491
dsa_switch_for_each_port_safe(dp, next, ds) {
net/dsa/dsa.c
1501
dev_info(ds->dev,
net/dsa/dsa.c
1509
dev_info(ds->dev,
net/dsa/dsa.c
1521
dev_info(ds->dev,
net/dsa/dsa.c
1533
static int dsa_switch_probe(struct dsa_switch *ds)
net/dsa/dsa.c
1540
if (!ds->dev)
net/dsa/dsa.c
1543
pdata = ds->dev->platform_data;
net/dsa/dsa.c
1544
np = ds->dev->of_node;
net/dsa/dsa.c
1546
if (!ds->num_ports)
net/dsa/dsa.c
1550
err = dsa_switch_parse_of(ds, np);
net/dsa/dsa.c
1552
dsa_switch_release_ports(ds);
net/dsa/dsa.c
1554
err = dsa_switch_parse(ds, pdata);
net/dsa/dsa.c
1556
dsa_switch_release_ports(ds);
net/dsa/dsa.c
1564
dst = ds->dst;
net/dsa/dsa.c
1568
dsa_switch_release_ports(ds);
net/dsa/dsa.c
1575
int dsa_register_switch(struct dsa_switch *ds)
net/dsa/dsa.c
1580
err = dsa_switch_probe(ds);
net/dsa/dsa.c
1581
dsa_tree_put(ds->dst);
net/dsa/dsa.c
1588
static void dsa_switch_remove(struct dsa_switch *ds)
net/dsa/dsa.c
1590
struct dsa_switch_tree *dst = ds->dst;
net/dsa/dsa.c
1593
dsa_switch_release_ports(ds);
net/dsa/dsa.c
1597
void dsa_unregister_switch(struct dsa_switch *ds)
net/dsa/dsa.c
1600
dsa_switch_remove(ds);
net/dsa/dsa.c
1610
void dsa_switch_shutdown(struct dsa_switch *ds)
net/dsa/dsa.c
1618
if (!ds->setup)
net/dsa/dsa.c
1623
dsa_switch_for_each_cpu_port(dp, ds)
net/dsa/dsa.c
1628
dsa_switch_for_each_user_port(dp, ds) {
net/dsa/dsa.c
1639
dsa_switch_for_each_cpu_port(dp, ds) {
net/dsa/dsa.c
1656
int dsa_switch_suspend(struct dsa_switch *ds)
net/dsa/dsa.c
1662
dsa_switch_for_each_port(dp, ds) {
net/dsa/dsa.c
1671
if (ds->ops->suspend)
net/dsa/dsa.c
1672
ret = ds->ops->suspend(ds);
net/dsa/dsa.c
1678
int dsa_switch_resume(struct dsa_switch *ds)
net/dsa/dsa.c
1683
if (ds->ops->resume)
net/dsa/dsa.c
1684
ret = ds->ops->resume(ds);
net/dsa/dsa.c
1690
dsa_switch_for_each_port(dp, ds) {
net/dsa/dsa.c
1731
bool dsa_fdb_present_in_other_db(struct dsa_switch *ds, int port,
net/dsa/dsa.c
1735
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/dsa.c
1752
bool dsa_mdb_present_in_other_db(struct dsa_switch *ds, int port,
net/dsa/dsa.c
1756
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/dsa.c
1776
int dsa_port_simple_hsr_validate(struct dsa_switch *ds, int port,
net/dsa/dsa.c
1783
err = hsr_get_port_type(hsr, dsa_to_port(ds, port)->user, &type);
net/dsa/dsa.c
1797
int dsa_port_simple_hsr_join(struct dsa_switch *ds, int port,
net/dsa/dsa.c
1801
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
net/dsa/dsa.c
1804
err = dsa_port_simple_hsr_validate(ds, port, hsr, extack);
net/dsa/dsa.c
1808
dsa_hsr_foreach_port(other_dp, ds, hsr) {
net/dsa/dsa.c
1820
int dsa_port_simple_hsr_leave(struct dsa_switch *ds, int port,
net/dsa/dsa.c
1823
struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
net/dsa/dsa.c
1825
dsa_hsr_foreach_port(other_dp, ds, hsr) {
net/dsa/dsa.c
190
if (dp->ds->index != sw_index)
net/dsa/dsa.c
193
return dp->ds;
net/dsa/dsa.c
291
struct dsa_switch *ds = dp->ds;
net/dsa/dsa.c
295
dst = ds->dst;
net/dsa/dsa.c
316
struct dsa_switch *ds = dp->ds;
net/dsa/dsa.c
317
struct dsa_switch_tree *dst = ds->dst;
net/dsa/dsa.c
401
dsa_switch_preferred_default_local_cpu_port(struct dsa_switch *ds)
net/dsa/dsa.c
405
if (!ds->ops->preferred_default_local_cpu_port)
net/dsa/dsa.c
408
cpu_dp = ds->ops->preferred_default_local_cpu_port(ds);
net/dsa/dsa.c
412
if (WARN_ON(!dsa_port_is_cpu(cpu_dp) || cpu_dp->ds != ds))
net/dsa/dsa.c
431
preferred_cpu_dp = dsa_switch_preferred_default_local_cpu_port(cpu_dp->ds);
net/dsa/dsa.c
436
dsa_switch_for_each_port(dp, cpu_dp->ds) {
net/dsa/dsa.c
461
struct dsa_switch *ds = dp->ds;
net/dsa/dsa.c
483
dev_warn(ds->dev,
net/dsa/dsa.c
501
dev_warn(ds->dev,
net/dsa/dsa.c
569
static int dsa_switch_setup_tag_protocol(struct dsa_switch *ds)
net/dsa/dsa.c
571
const struct dsa_device_ops *tag_ops = ds->dst->tag_ops;
net/dsa/dsa.c
572
struct dsa_switch_tree *dst = ds->dst;
net/dsa/dsa.c
579
err = ds->ops->change_tag_protocol(ds, tag_ops->proto);
net/dsa/dsa.c
582
dev_err(ds->dev, "Unable to use tag protocol \"%s\": %pe\n",
net/dsa/dsa.c
589
err = tag_ops->connect(ds);
net/dsa/dsa.c
594
if (ds->ops->connect_tag_protocol) {
net/dsa/dsa.c
595
err = ds->ops->connect_tag_protocol(ds, tag_ops->proto);
net/dsa/dsa.c
597
dev_err(ds->dev,
net/dsa/dsa.c
608
tag_ops->disconnect(ds);
net/dsa/dsa.c
613
static void dsa_switch_teardown_tag_protocol(struct dsa_switch *ds)
net/dsa/dsa.c
615
const struct dsa_device_ops *tag_ops = ds->dst->tag_ops;
net/dsa/dsa.c
618
tag_ops->disconnect(ds);
net/dsa/dsa.c
621
static int dsa_switch_setup(struct dsa_switch *ds)
net/dsa/dsa.c
625
if (ds->setup)
net/dsa/dsa.c
633
ds->phys_mii_mask |= dsa_user_ports(ds);
net/dsa/dsa.c
635
err = dsa_switch_devlink_alloc(ds);
net/dsa/dsa.c
639
err = dsa_switch_register_notifier(ds);
net/dsa/dsa.c
643
ds->configure_vlan_while_not_filtering = true;
net/dsa/dsa.c
645
err = ds->ops->setup(ds);
net/dsa/dsa.c
649
err = dsa_switch_setup_tag_protocol(ds);
net/dsa/dsa.c
653
if (!ds->user_mii_bus && ds->ops->phy_read) {
net/dsa/dsa.c
654
ds->user_mii_bus = mdiobus_alloc();
net/dsa/dsa.c
655
if (!ds->user_mii_bus) {
net/dsa/dsa.c
660
dsa_user_mii_bus_init(ds);
net/dsa/dsa.c
662
err = mdiobus_register(ds->user_mii_bus);
net/dsa/dsa.c
667
dsa_switch_devlink_register(ds);
net/dsa/dsa.c
669
ds->setup = true;
net/dsa/dsa.c
673
if (ds->user_mii_bus && ds->ops->phy_read)
net/dsa/dsa.c
674
mdiobus_free(ds->user_mii_bus);
net/dsa/dsa.c
676
if (ds->ops->teardown)
net/dsa/dsa.c
677
ds->ops->teardown(ds);
net/dsa/dsa.c
679
dsa_switch_unregister_notifier(ds);
net/dsa/dsa.c
681
dsa_switch_devlink_free(ds);
net/dsa/dsa.c
685
static void dsa_switch_teardown(struct dsa_switch *ds)
net/dsa/dsa.c
687
if (!ds->setup)
net/dsa/dsa.c
690
dsa_switch_devlink_unregister(ds);
net/dsa/dsa.c
692
if (ds->user_mii_bus && ds->ops->phy_read) {
net/dsa/dsa.c
693
mdiobus_unregister(ds->user_mii_bus);
net/dsa/dsa.c
694
mdiobus_free(ds->user_mii_bus);
net/dsa/dsa.c
695
ds->user_mii_bus = NULL;
net/dsa/dsa.c
698
dsa_switch_teardown_tag_protocol(ds);
net/dsa/dsa.c
700
if (ds->ops->teardown)
net/dsa/dsa.c
701
ds->ops->teardown(ds);
net/dsa/dsa.c
703
dsa_switch_unregister_notifier(ds);
net/dsa/dsa.c
705
dsa_switch_devlink_free(ds);
net/dsa/dsa.c
707
ds->setup = false;
net/dsa/dsa.c
734
dsa_switch_teardown(dp->ds);
net/dsa/dsa.c
776
err = dsa_switch_setup(dp->ds);
net/dsa/dsa.c
840
if (dp->ds->num_lag_ids > len)
net/dsa/dsa.c
841
len = dp->ds->num_lag_ids;
net/dsa/port.c
1012
if (!dp->ds->fdb_isolation)
net/dsa/port.c
1053
if (!dp->ds->fdb_isolation)
net/dsa/port.c
107
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
110
if (!ds->ops->port_bridge_flags || !ds->ops->port_pre_bridge_flags)
net/dsa/port.c
1104
if (!dp->ds->fdb_isolation)
net/dsa/port.c
1129
if (!dp->ds->fdb_isolation)
net/dsa/port.c
113
err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL);
net/dsa/port.c
1148
if (!dp->ds->fdb_isolation)
net/dsa/port.c
1156
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1159
if (!ds->ops->port_fdb_dump)
net/dsa/port.c
1162
return ds->ops->port_fdb_dump(ds, port, cb, data);
net/dsa/port.c
1177
if (!dp->ds->fdb_isolation)
net/dsa/port.c
1195
if (!dp->ds->fdb_isolation)
net/dsa/port.c
120
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
123
if (!ds->ops->port_hwtstamp_get || !ds->ops->port_hwtstamp_set)
net/dsa/port.c
1235
if (!dp->ds->fdb_isolation)
net/dsa/port.c
127
err = ds->ops->port_hwtstamp_get(ds, dp->index, &config);
net/dsa/port.c
1279
if (!dp->ds->fdb_isolation)
net/dsa/port.c
133
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1356
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1358
if (!ds->ops->port_mrp_add)
net/dsa/port.c
136
if (!ds->ops->port_stp_state_set)
net/dsa/port.c
1361
return ds->ops->port_mrp_add(ds, dp->index, mrp);
net/dsa/port.c
1367
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1369
if (!ds->ops->port_mrp_del)
net/dsa/port.c
1372
return ds->ops->port_mrp_del(ds, dp->index, mrp);
net/dsa/port.c
1378
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1380
if (!ds->ops->port_mrp_add_ring_role)
net/dsa/port.c
1383
return ds->ops->port_mrp_add_ring_role(ds, dp->index, mrp);
net/dsa/port.c
1389
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
139
ds->ops->port_stp_state_set(ds, port, state);
net/dsa/port.c
1391
if (!ds->ops->port_mrp_del_ring_role)
net/dsa/port.c
1394
return ds->ops->port_mrp_del_ring_role(ds, dp->index, mrp);
net/dsa/port.c
1402
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1405
err = ds->ops->port_change_conduit(ds, port, conduit, extack);
net/dsa/port.c
1407
dev_err(ds->dev, "port %d failed to assign conduit %s: %pe\n",
net/dsa/port.c
1433
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1537
dev_err(ds->dev,
net/dsa/port.c
1548
dev_err(ds->dev,
net/dsa/port.c
1558
dev_err(ds->dev,
net/dsa/port.c
1584
bool dsa_supports_eee(struct dsa_switch *ds, int port)
net/dsa/port.c
1620
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1629
if (ds->ops->phylink_get_caps) {
net/dsa/port.c
1630
ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
net/dsa/port.c
1644
if (ds->phylink_mac_ops)
net/dsa/port.c
1645
mac_ops = ds->phylink_mac_ops;
net/dsa/port.c
1667
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
167
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1671
dp->pl_config.dev = ds->dev;
net/dsa/port.c
172
dev_err(ds->dev, "port %d failed to set STP state %u: %pe\n",
net/dsa/port.c
181
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1810
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1818
dev_err(ds->dev,
net/dsa/port.c
1837
dev_err(ds->dev,
net/dsa/port.c
1844
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1846
if (ds->phylink_mac_ops && ds->phylink_mac_ops->mac_link_down)
net/dsa/port.c
1847
ds->phylink_mac_ops->mac_link_down(&dp->pl_config, MLO_AN_FIXED,
net/dsa/port.c
185
if (!ds->ops->port_mst_state_set)
net/dsa/port.c
1853
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1861
!of_device_compatible_match(ds->dev->of_node,
net/dsa/port.c
1866
dev_warn(ds->dev,
net/dsa/port.c
1892
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1895
if (!ds->ops->port_hsr_join)
net/dsa/port.c
1900
err = ds->ops->port_hsr_join(ds, dp->index, hsr, extack);
net/dsa/port.c
1909
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
1917
if (ds->ops->port_hsr_leave) {
net/dsa/port.c
1918
err = ds->ops->port_hsr_leave(ds, dp->index, hsr);
net/dsa/port.c
1920
dev_err(dp->ds->dev,
net/dsa/port.c
193
err = ds->ops->port_mst_state_set(ds, dp->index, state);
net/dsa/port.c
1952
dev_err(dp->ds->dev,
net/dsa/port.c
215
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
219
if (ds->ops->port_enable) {
net/dsa/port.c
220
err = ds->ops->port_enable(ds, port, phy);
net/dsa/port.c
247
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
256
if (ds->ops->port_disable)
net/dsa/port.c
257
ds->ops->port_disable(ds, port);
net/dsa/port.c
272
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
277
if (ds->needs_standalone_vlan_filtering &&
net/dsa/port.c
281
} else if (!ds->needs_standalone_vlan_filtering &&
net/dsa/port.c
295
if (change_vlan_filtering && ds->vlan_filtering_is_global) {
net/dsa/port.c
296
dsa_switch_for_each_port(other_dp, ds) {
net/dsa/port.c
311
dev_err(ds->dev, "port %d: %s\n", dp->index,
net/dsa/port.c
315
dev_err(ds->dev,
net/dsa/port.c
35
return dsa_tree_notify(dp->ds->dst, e, v);
net/dsa/port.c
360
dev_err(dp->ds->dev,
net/dsa/port.c
424
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
427
bridge = dsa_tree_bridge_find(ds->dst, br);
net/dsa/port.c
442
bridge->num = dsa_bridge_num_get(br, ds->max_num_bridges);
net/dsa/port.c
443
if (ds->max_num_bridges && !bridge->num) {
net/dsa/port.c
473
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
475
return ds->ops->vlan_msti_set &&
net/dsa/port.c
476
ds->ops->port_mst_state_set &&
net/dsa/port.c
477
ds->ops->port_vlan_fast_age &&
net/dsa/port.c
57
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
574
dev_err(dp->ds->dev,
net/dsa/port.c
59
if (!ds->ops->port_fast_age)
net/dsa/port.c
610
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
613
lag = dsa_tree_lag_find(ds->dst, lag_dev);
net/dsa/port.c
62
ds->ops->port_fast_age(ds, dp->index);
net/dsa/port.c
628
dsa_lag_map(ds->dst, lag);
net/dsa/port.c
645
dsa_lag_unmap(dp->ds->dst, lag);
net/dsa/port.c
70
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
719
dev_err(dp->ds->dev,
net/dsa/port.c
729
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
73
if (!ds->ops->port_vlan_fast_age)
net/dsa/port.c
76
err = ds->ops->port_vlan_fast_age(ds, dp->index, vid);
net/dsa/port.c
765
if (!ds->vlan_filtering_is_global)
net/dsa/port.c
773
dsa_switch_for_each_port(other_dp, ds) {
net/dsa/port.c
795
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
799
if (!ds->ops->port_vlan_filtering)
net/dsa/port.c
815
err = ds->ops->port_vlan_filtering(ds, dp->index, vlan_filtering,
net/dsa/port.c
820
if (ds->vlan_filtering_is_global) {
net/dsa/port.c
823
ds->vlan_filtering = vlan_filtering;
net/dsa/port.c
825
dsa_switch_for_each_user_port(other_dp, ds) {
net/dsa/port.c
851
ds->ops->port_vlan_filtering(ds, dp->index, old_vlan_filtering, NULL);
net/dsa/port.c
853
if (ds->vlan_filtering_is_global)
net/dsa/port.c
854
ds->vlan_filtering = old_vlan_filtering;
net/dsa/port.c
867
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
872
return !ds->configure_vlan_while_not_filtering && !br_vlan_enabled(br);
net/dsa/port.c
908
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
910
if (!ds->ops->port_pre_bridge_flags)
net/dsa/port.c
913
return ds->ops->port_pre_bridge_flags(ds, dp->index, flags, extack);
net/dsa/port.c
920
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
923
if (!ds->ops->port_bridge_flags)
net/dsa/port.c
926
err = ds->ops->port_bridge_flags(ds, dp->index, flags, extack);
net/dsa/port.c
949
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
951
if (ds->ops->port_set_host_flood)
net/dsa/port.c
952
ds->ops->port_set_host_flood(ds, dp->index, uc, mc);
net/dsa/port.c
958
struct dsa_switch *ds = dp->ds;
net/dsa/port.c
960
if (!ds->ops->vlan_msti_set)
net/dsa/port.c
963
return ds->ops->vlan_msti_set(ds, *dp->bridge, msti);
net/dsa/port.c
993
if (!dp->ds->fdb_isolation)
net/dsa/switch.c
100
err = ds->ops->crosschip_bridge_join(ds,
net/dsa/switch.c
1000
err = dsa_switch_host_fdb_del(ds, info);
net/dsa/switch.c
1003
err = dsa_switch_lag_fdb_add(ds, info);
net/dsa/switch.c
1006
err = dsa_switch_lag_fdb_del(ds, info);
net/dsa/switch.c
1009
err = dsa_switch_lag_change(ds, info);
net/dsa/switch.c
101
info->dp->ds->dst->index,
net/dsa/switch.c
1012
err = dsa_switch_lag_join(ds, info);
net/dsa/switch.c
1015
err = dsa_switch_lag_leave(ds, info);
net/dsa/switch.c
1018
err = dsa_switch_mdb_add(ds, info);
net/dsa/switch.c
102
info->dp->ds->index,
net/dsa/switch.c
1021
err = dsa_switch_mdb_del(ds, info);
net/dsa/switch.c
1024
err = dsa_switch_host_mdb_add(ds, info);
net/dsa/switch.c
1027
err = dsa_switch_host_mdb_del(ds, info);
net/dsa/switch.c
1030
err = dsa_switch_vlan_add(ds, info);
net/dsa/switch.c
1033
err = dsa_switch_vlan_del(ds, info);
net/dsa/switch.c
1036
err = dsa_switch_host_vlan_add(ds, info);
net/dsa/switch.c
1039
err = dsa_switch_host_vlan_del(ds, info);
net/dsa/switch.c
1042
err = dsa_switch_mtu(ds, info);
net/dsa/switch.c
1045
err = dsa_switch_change_tag_proto(ds, info);
net/dsa/switch.c
1048
err = dsa_switch_connect_tag_proto(ds, info);
net/dsa/switch.c
1051
err = dsa_switch_disconnect_tag_proto(ds, info);
net/dsa/switch.c
1054
err = dsa_switch_tag_8021q_vlan_add(ds, info);
net/dsa/switch.c
1057
err = dsa_switch_tag_8021q_vlan_del(ds, info);
net/dsa/switch.c
1060
err = dsa_switch_conduit_state_change(ds, info);
net/dsa/switch.c
1068
dev_dbg(ds->dev, "breaking chain for DSA event %lu (%d)\n",
net/dsa/switch.c
1120
int dsa_switch_register_notifier(struct dsa_switch *ds)
net/dsa/switch.c
1122
ds->nb.notifier_call = dsa_switch_event;
net/dsa/switch.c
1124
return raw_notifier_chain_register(&ds->dst->nh, &ds->nb);
net/dsa/switch.c
1127
void dsa_switch_unregister_notifier(struct dsa_switch *ds)
net/dsa/switch.c
113
static int dsa_switch_bridge_leave(struct dsa_switch *ds,
net/dsa/switch.c
1131
err = raw_notifier_chain_unregister(&ds->dst->nh, &ds->nb);
net/dsa/switch.c
1133
dev_err(ds->dev, "failed to unregister notifier (%d)\n", err);
net/dsa/switch.c
116
if (info->dp->ds == ds && ds->ops->port_bridge_leave)
net/dsa/switch.c
117
ds->ops->port_bridge_leave(ds, info->dp->index, info->bridge);
net/dsa/switch.c
119
if (info->dp->ds != ds && ds->ops->crosschip_bridge_leave)
net/dsa/switch.c
120
ds->ops->crosschip_bridge_leave(ds, info->dp->ds->dst->index,
net/dsa/switch.c
121
info->dp->ds->index,
net/dsa/switch.c
137
if (dsa_switch_is_upstream_of(dp->ds, targeted_dp->ds))
net/dsa/switch.c
138
return dp->index == dsa_towards_port(dp->ds, cpu_dp->ds->index,
net/dsa/switch.c
162
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
169
err = ds->ops->port_mdb_add(ds, port, mdb, db);
net/dsa/switch.c
191
err = ds->ops->port_mdb_add(ds, port, mdb, db);
net/dsa/switch.c
214
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
221
err = ds->ops->port_mdb_del(ds, port, mdb, db);
net/dsa/switch.c
23
static unsigned int dsa_switch_fastest_ageing_time(struct dsa_switch *ds,
net/dsa/switch.c
242
err = ds->ops->port_mdb_del(ds, port, mdb, db);
net/dsa/switch.c
261
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
268
err = ds->ops->port_fdb_add(ds, port, addr, vid, db);
net/dsa/switch.c
28
dsa_switch_for_each_port(dp, ds)
net/dsa/switch.c
289
err = ds->ops->port_fdb_add(ds, port, addr, vid, db);
net/dsa/switch.c
311
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
318
err = ds->ops->port_fdb_del(ds, port, addr, vid, db);
net/dsa/switch.c
338
err = ds->ops->port_fdb_del(ds, port, addr, vid, db);
net/dsa/switch.c
35
static int dsa_switch_ageing_time(struct dsa_switch *ds,
net/dsa/switch.c
354
static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag,
net/dsa/switch.c
377
err = ds->ops->lag_fdb_add(ds, *lag, addr, vid, db);
net/dsa/switch.c
396
static int dsa_switch_do_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag *lag,
net/dsa/switch.c
40
if (ds->ageing_time_min && ageing_time < ds->ageing_time_min)
net/dsa/switch.c
418
err = ds->ops->lag_fdb_del(ds, *lag, addr, vid, db);
net/dsa/switch.c
43
if (ds->ageing_time_max && ageing_time > ds->ageing_time_max)
net/dsa/switch.c
434
static int dsa_switch_host_fdb_add(struct dsa_switch *ds,
net/dsa/switch.c
440
if (!ds->ops->port_fdb_add)
net/dsa/switch.c
443
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
446
err = dsa_switch_do_lag_fdb_add(ds, dp->lag,
net/dsa/switch.c
462
static int dsa_switch_host_fdb_del(struct dsa_switch *ds,
net/dsa/switch.c
468
if (!ds->ops->port_fdb_del)
net/dsa/switch.c
47
ageing_time = dsa_switch_fastest_ageing_time(ds, ageing_time);
net/dsa/switch.c
471
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
474
err = dsa_switch_do_lag_fdb_del(ds, dp->lag,
net/dsa/switch.c
49
if (ds->ops->set_ageing_time)
net/dsa/switch.c
490
static int dsa_switch_fdb_add(struct dsa_switch *ds,
net/dsa/switch.c
493
int port = dsa_towards_port(ds, info->dp->ds->index, info->dp->index);
net/dsa/switch.c
494
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/switch.c
496
if (!ds->ops->port_fdb_add)
net/dsa/switch.c
50
return ds->ops->set_ageing_time(ds, ageing_time);
net/dsa/switch.c
502
static int dsa_switch_fdb_del(struct dsa_switch *ds,
net/dsa/switch.c
505
int port = dsa_towards_port(ds, info->dp->ds->index, info->dp->index);
net/dsa/switch.c
506
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/switch.c
508
if (!ds->ops->port_fdb_del)
net/dsa/switch.c
514
static int dsa_switch_lag_fdb_add(struct dsa_switch *ds,
net/dsa/switch.c
519
if (!ds->ops->lag_fdb_add)
net/dsa/switch.c
523
dsa_switch_for_each_port(dp, ds)
net/dsa/switch.c
525
return dsa_switch_do_lag_fdb_add(ds, info->lag,
net/dsa/switch.c
532
static int dsa_switch_lag_fdb_del(struct dsa_switch *ds,
net/dsa/switch.c
537
if (!ds->ops->lag_fdb_del)
net/dsa/switch.c
541
dsa_switch_for_each_port(dp, ds)
net/dsa/switch.c
543
return dsa_switch_do_lag_fdb_del(ds, info->lag,
net/dsa/switch.c
550
static int dsa_switch_lag_change(struct dsa_switch *ds,
net/dsa/switch.c
553
if (info->dp->ds == ds && ds->ops->port_lag_change)
net/dsa/switch.c
554
return ds->ops->port_lag_change(ds, info->dp->index);
net/dsa/switch.c
556
if (info->dp->ds != ds && ds->ops->crosschip_lag_change)
net/dsa/switch.c
557
return ds->ops->crosschip_lag_change(ds, info->dp->ds->index,
net/dsa/switch.c
563
static int dsa_switch_lag_join(struct dsa_switch *ds,
net/dsa/switch.c
566
if (info->dp->ds == ds && ds->ops->port_lag_join)
net/dsa/switch.c
567
return ds->ops->port_lag_join(ds, info->dp->index, info->lag,
net/dsa/switch.c
570
if (info->dp->ds != ds && ds->ops->crosschip_lag_join)
net/dsa/switch.c
571
return ds->ops->crosschip_lag_join(ds, info->dp->ds->index,
net/dsa/switch.c
578
static int dsa_switch_lag_leave(struct dsa_switch *ds,
net/dsa/switch.c
581
if (info->dp->ds == ds && ds->ops->port_lag_leave)
net/dsa/switch.c
582
return ds->ops->port_lag_leave(ds, info->dp->index, info->lag);
net/dsa/switch.c
584
if (info->dp->ds != ds && ds->ops->crosschip_lag_leave)
net/dsa/switch.c
585
return ds->ops->crosschip_lag_leave(ds, info->dp->ds->index,
net/dsa/switch.c
591
static int dsa_switch_mdb_add(struct dsa_switch *ds,
net/dsa/switch.c
594
int port = dsa_towards_port(ds, info->dp->ds->index, info->dp->index);
net/dsa/switch.c
595
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/switch.c
597
if (!ds->ops->port_mdb_add)
net/dsa/switch.c
603
static int dsa_switch_mdb_del(struct dsa_switch *ds,
net/dsa/switch.c
606
int port = dsa_towards_port(ds, info->dp->ds->index, info->dp->index);
net/dsa/switch.c
607
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/switch.c
609
if (!ds->ops->port_mdb_del)
net/dsa/switch.c
61
static int dsa_switch_mtu(struct dsa_switch *ds,
net/dsa/switch.c
615
static int dsa_switch_host_mdb_add(struct dsa_switch *ds,
net/dsa/switch.c
621
if (!ds->ops->port_mdb_add)
net/dsa/switch.c
624
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
635
static int dsa_switch_host_mdb_del(struct dsa_switch *ds,
net/dsa/switch.c
641
if (!ds->ops->port_mdb_del)
net/dsa/switch.c
644
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
67
if (!ds->ops->port_change_mtu)
net/dsa/switch.c
670
if (dsa_switch_is_upstream_of(dp->ds, targeted_dp->ds))
net/dsa/switch.c
692
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
699
err = ds->ops->port_vlan_add(ds, port, vlan, extack);
net/dsa/switch.c
70
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
72
ret = ds->ops->port_change_mtu(ds, dp->index,
net/dsa/switch.c
728
err = ds->ops->port_vlan_add(ds, port, vlan, extack);
net/dsa/switch.c
748
struct dsa_switch *ds = dp->ds;
net/dsa/switch.c
755
err = ds->ops->port_vlan_del(ds, port, vlan);
net/dsa/switch.c
775
err = ds->ops->port_vlan_del(ds, port, vlan);
net/dsa/switch.c
791
static int dsa_switch_vlan_add(struct dsa_switch *ds,
net/dsa/switch.c
797
if (!ds->ops->port_vlan_add)
net/dsa/switch.c
800
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
812
static int dsa_switch_vlan_del(struct dsa_switch *ds,
net/dsa/switch.c
818
if (!ds->ops->port_vlan_del)
net/dsa/switch.c
82
static int dsa_switch_bridge_join(struct dsa_switch *ds,
net/dsa/switch.c
821
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
832
static int dsa_switch_host_vlan_add(struct dsa_switch *ds,
net/dsa/switch.c
838
if (!ds->ops->port_vlan_add)
net/dsa/switch.c
841
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
853
static int dsa_switch_host_vlan_del(struct dsa_switch *ds,
net/dsa/switch.c
859
if (!ds->ops->port_vlan_del)
net/dsa/switch.c
862
dsa_switch_for_each_port(dp, ds) {
net/dsa/switch.c
87
if (info->dp->ds == ds) {
net/dsa/switch.c
873
static int dsa_switch_change_tag_proto(struct dsa_switch *ds,
net/dsa/switch.c
88
if (!ds->ops->port_bridge_join)
net/dsa/switch.c
880
if (!ds->ops->change_tag_protocol)
net/dsa/switch.c
885
err = ds->ops->change_tag_protocol(ds, tag_ops->proto);
net/dsa/switch.c
889
dsa_switch_for_each_cpu_port(cpu_dp, ds)
net/dsa/switch.c
896
dsa_switch_for_each_user_port(dp, ds) {
net/dsa/switch.c
91
err = ds->ops->port_bridge_join(ds, info->dp->index,
net/dsa/switch.c
918
dsa_switch_connect_tag_proto(struct dsa_switch *ds,
net/dsa/switch.c
926
err = tag_ops->connect(ds);
net/dsa/switch.c
931
if (!ds->ops->connect_tag_protocol)
net/dsa/switch.c
935
err = ds->ops->connect_tag_protocol(ds, tag_ops->proto);
net/dsa/switch.c
939
tag_ops->disconnect(ds);
net/dsa/switch.c
947
dsa_switch_disconnect_tag_proto(struct dsa_switch *ds,
net/dsa/switch.c
953
if (tag_ops->disconnect && ds->tagger_data)
net/dsa/switch.c
954
tag_ops->disconnect(ds);
net/dsa/switch.c
963
dsa_switch_conduit_state_change(struct dsa_switch *ds,
net/dsa/switch.c
966
if (!ds->ops->conduit_state_change)
net/dsa/switch.c
969
ds->ops->conduit_state_change(ds, info->conduit, info->operational);
net/dsa/switch.c
977
struct dsa_switch *ds = container_of(nb, struct dsa_switch, nb);
net/dsa/switch.c
982
err = dsa_switch_ageing_time(ds, info);
net/dsa/switch.c
985
err = dsa_switch_bridge_join(ds, info);
net/dsa/switch.c
988
err = dsa_switch_bridge_leave(ds, info);
net/dsa/switch.c
99
if (info->dp->ds != ds && ds->ops->crosschip_bridge_join) {
net/dsa/switch.c
991
err = dsa_switch_fdb_add(ds, info);
net/dsa/switch.c
994
err = dsa_switch_fdb_del(ds, info);
net/dsa/switch.c
997
err = dsa_switch_host_fdb_add(ds, info);
net/dsa/switch.h
120
int dsa_switch_register_notifier(struct dsa_switch *ds);
net/dsa/switch.h
121
void dsa_switch_unregister_notifier(struct dsa_switch *ds);
net/dsa/tag.c
108
if (unlikely(cpu_dp->ds->untag_bridge_pvid ||
net/dsa/tag.c
109
cpu_dp->ds->untag_vlan_aware_bridge_pvid)) {
net/dsa/tag.c
33
struct dsa_switch *ds = p->dp->ds;
net/dsa/tag.c
36
if (!ds->ops->port_rxtstamp)
net/dsa/tag.c
51
return ds->ops->port_rxtstamp(ds, p->dp->index, skb, type);
net/dsa/tag.h
177
if (dp->ds->untag_vlan_aware_bridge_pvid)
net/dsa/tag.h
180
if (dp->ds->untag_bridge_pvid)
net/dsa/tag.h
333
dsa_hsr_foreach_port(other_dp, dp->ds, hsr_dev)
net/dsa/tag.h
40
if (dp->ds->index == device && dp->index == port &&
net/dsa/tag_8021q.c
145
struct dsa_8021q_context *ctx = dp->ds->tag_8021q_ctx;
net/dsa/tag_8021q.c
146
struct dsa_switch *ds = dp->ds;
net/dsa/tag_8021q.c
153
return ds->ops->tag_8021q_vlan_add(ds, port, vid, flags);
net/dsa/tag_8021q.c
165
err = ds->ops->tag_8021q_vlan_add(ds, port, vid, flags);
net/dsa/tag_8021q.c
181
struct dsa_8021q_context *ctx = dp->ds->tag_8021q_ctx;
net/dsa/tag_8021q.c
182
struct dsa_switch *ds = dp->ds;
net/dsa/tag_8021q.c
189
return ds->ops->tag_8021q_vlan_del(ds, port, vid);
net/dsa/tag_8021q.c
198
err = ds->ops->tag_8021q_vlan_del(ds, port, vid);
net/dsa/tag_8021q.c
217
int dsa_switch_tag_8021q_vlan_add(struct dsa_switch *ds,
net/dsa/tag_8021q.c
228
if (!ds->ops->tag_8021q_vlan_add || !ds->tag_8021q_ctx)
net/dsa/tag_8021q.c
231
dsa_switch_for_each_port(dp, ds) {
net/dsa/tag_8021q.c
249
int dsa_switch_tag_8021q_vlan_del(struct dsa_switch *ds,
net/dsa/tag_8021q.c
255
if (!ds->ops->tag_8021q_vlan_del || !ds->tag_8021q_ctx)
net/dsa/tag_8021q.c
258
dsa_switch_for_each_port(dp, ds) {
net/dsa/tag_8021q.c
288
int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, int port,
net/dsa/tag_8021q.c
292
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/tag_8021q.c
314
void dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, int port,
net/dsa/tag_8021q.c
317
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/tag_8021q.c
329
dev_err(ds->dev,
net/dsa/tag_8021q.c
339
static int dsa_tag_8021q_port_setup(struct dsa_switch *ds, int port)
net/dsa/tag_8021q.c
341
struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
net/dsa/tag_8021q.c
342
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/tag_8021q.c
357
dev_err(ds->dev,
net/dsa/tag_8021q.c
369
static void dsa_tag_8021q_port_teardown(struct dsa_switch *ds, int port)
net/dsa/tag_8021q.c
371
struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
net/dsa/tag_8021q.c
372
struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/tag_8021q.c
389
static int dsa_tag_8021q_setup(struct dsa_switch *ds)
net/dsa/tag_8021q.c
395
for (port = 0; port < ds->num_ports; port++) {
net/dsa/tag_8021q.c
396
err = dsa_tag_8021q_port_setup(ds, port);
net/dsa/tag_8021q.c
398
dev_err(ds->dev,
net/dsa/tag_8021q.c
408
static void dsa_tag_8021q_teardown(struct dsa_switch *ds)
net/dsa/tag_8021q.c
414
for (port = 0; port < ds->num_ports; port++)
net/dsa/tag_8021q.c
415
dsa_tag_8021q_port_teardown(ds, port);
net/dsa/tag_8021q.c
418
int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto)
net/dsa/tag_8021q.c
428
ctx->ds = ds;
net/dsa/tag_8021q.c
432
ds->tag_8021q_ctx = ctx;
net/dsa/tag_8021q.c
434
err = dsa_tag_8021q_setup(ds);
net/dsa/tag_8021q.c
446
void dsa_tag_8021q_unregister(struct dsa_switch *ds)
net/dsa/tag_8021q.c
448
struct dsa_8021q_context *ctx = ds->tag_8021q_ctx;
net/dsa/tag_8021q.c
451
dsa_tag_8021q_teardown(ds);
net/dsa/tag_8021q.c
458
ds->tag_8021q_ctx = NULL;
net/dsa/tag_8021q.c
74
struct dsa_switch *ds;
net/dsa/tag_8021q.c
94
return DSA_8021Q_RSV | DSA_8021Q_SWITCH_ID(dp->ds->index) |
net/dsa/tag_8021q.h
23
int dsa_switch_tag_8021q_vlan_add(struct dsa_switch *ds,
net/dsa/tag_8021q.h
25
int dsa_switch_tag_8021q_vlan_del(struct dsa_switch *ds,
net/dsa/tag_dsa.c
140
struct dsa_switch_tree *dst = dp->ds->dst;
net/dsa/tag_dsa.c
152
tag_dev = dp->ds->index;
net/dsa/tag_ksz.c
212
priv = ksz_tagger_private(dp->ds);
net/dsa/tag_ksz.c
245
struct ksz_tagger_data *tagger_data = ksz_tagger_data(dp->ds);
net/dsa/tag_ksz.c
246
struct ksz_tagger_private *priv = ksz_tagger_private(dp->ds);
net/dsa/tag_ksz.c
34
ksz_tagger_private(struct dsa_switch *ds)
net/dsa/tag_ksz.c
36
return ds->tagger_data;
net/dsa/tag_ksz.c
39
static void ksz_hwtstamp_set_state(struct dsa_switch *ds, bool on)
net/dsa/tag_ksz.c
41
struct ksz_tagger_private *priv = ksz_tagger_private(ds);
net/dsa/tag_ksz.c
49
static void ksz_disconnect(struct dsa_switch *ds)
net/dsa/tag_ksz.c
51
struct ksz_tagger_private *priv = ds->tagger_data;
net/dsa/tag_ksz.c
55
ds->tagger_data = NULL;
net/dsa/tag_ksz.c
58
static int ksz_connect(struct dsa_switch *ds)
net/dsa/tag_ksz.c
70
ds->dst->index, ds->index);
net/dsa/tag_ksz.c
81
ds->tagger_data = priv;
net/dsa/tag_lan9303.c
52
struct lan9303 *chip = dp->ds->priv;
net/dsa/tag_ocelot.c
15
struct dsa_switch *ds = dp->ds;
net/dsa/tag_ocelot.c
34
ocelot_ifh_set_src(injection, ds->num_ports);
net/dsa/tag_ocelot_8021q.c
101
ds->tagger_data = NULL;
net/dsa/tag_ocelot_8021q.c
104
static int ocelot_connect(struct dsa_switch *ds)
net/dsa/tag_ocelot_8021q.c
120
ds->tagger_data = priv;
net/dsa/tag_ocelot_8021q.c
27
struct ocelot_8021q_tagger_private *priv = dp->ds->tagger_data;
net/dsa/tag_ocelot_8021q.c
95
static void ocelot_disconnect(struct dsa_switch *ds)
net/dsa/tag_ocelot_8021q.c
97
struct ocelot_8021q_tagger_private *priv = ds->tagger_data;
net/dsa/tag_qca.c
104
static void qca_tag_disconnect(struct dsa_switch *ds)
net/dsa/tag_qca.c
106
kfree(ds->tagger_data);
net/dsa/tag_qca.c
107
ds->tagger_data = NULL;
net/dsa/tag_qca.c
39
struct dsa_switch *ds = dp->ds;
net/dsa/tag_qca.c
47
tagger_data = ds->tagger_data;
net/dsa/tag_qca.c
66
tagger_data->rw_reg_ack_handler(ds, skb);
net/dsa/tag_qca.c
73
tagger_data->mib_autocast_handler(ds, skb);
net/dsa/tag_qca.c
91
static int qca_tag_connect(struct dsa_switch *ds)
net/dsa/tag_qca.c
99
ds->tagger_data = tagger_data;
net/dsa/tag_sja1105.c
143
struct sja1105_tagger_data *tagger_data = sja1105_tagger_data(dp->ds);
net/dsa/tag_sja1105.c
144
struct sja1105_tagger_private *priv = sja1105_tagger_private(dp->ds);
net/dsa/tag_sja1105.c
176
struct dsa_switch *ds = dp->ds;
net/dsa/tag_sja1105.c
190
dsa_switch_for_each_port(other_dp, ds) {
net/dsa/tag_sja1105.c
334
SJA1110_TX_TRAILER_SWITCHID(dp->ds->index) |
net/dsa/tag_sja1105.c
388
struct dsa_switch *ds = dp->ds;
net/dsa/tag_sja1105.c
390
priv = sja1105_tagger_private(ds);
net/dsa/tag_sja1105.c
397
dev_err_ratelimited(ds->dev,
net/dsa/tag_sja1105.c
422
struct dsa_switch *ds = dp->ds;
net/dsa/tag_sja1105.c
425
priv = sja1105_tagger_private(ds);
net/dsa/tag_sja1105.c
436
dev_err_ratelimited(ds->dev,
net/dsa/tag_sja1105.c
443
dev_err_ratelimited(ds->dev,
net/dsa/tag_sja1105.c
534
struct dsa_switch *ds;
net/dsa/tag_sja1105.c
538
ds = dsa_switch_find(cpu_dp->dst->index, switch_id);
net/dsa/tag_sja1105.c
539
if (!ds) {
net/dsa/tag_sja1105.c
545
tagger_data = sja1105_tagger_data(ds);
net/dsa/tag_sja1105.c
558
tagger_data->meta_tstamp_handler(ds, source_port, ts_id, dir,
net/dsa/tag_sja1105.c
689
static void sja1105_disconnect(struct dsa_switch *ds)
net/dsa/tag_sja1105.c
691
struct sja1105_tagger_private *priv = ds->tagger_data;
net/dsa/tag_sja1105.c
695
ds->tagger_data = NULL;
net/dsa/tag_sja1105.c
698
static int sja1105_connect(struct dsa_switch *ds)
net/dsa/tag_sja1105.c
711
ds->dst->index, ds->index);
net/dsa/tag_sja1105.c
719
ds->tagger_data = priv;
net/dsa/tag_sja1105.c
72
sja1105_tagger_private(struct dsa_switch *ds)
net/dsa/tag_sja1105.c
74
return ds->tagger_data;
net/dsa/trace.h
151
__string(dev, dev_name(dp->ds->dev))
net/dsa/trace.h
32
__string(dev, dev_name(dp->ds->dev))
net/dsa/trace.h
331
__string(dev, dev_name(dp->ds->dev))
net/dsa/trace.h
376
__string(dev, dev_name(dp->ds->dev))
net/dsa/trace.h
422
__string(dev, dev_name(dp->ds->dev))
net/dsa/trace.h
91
__string(dev, dev_name(dp->ds->dev))
net/dsa/user.c
1005
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1007
if (ds->ops->get_eeprom)
net/dsa/user.c
1008
return ds->ops->get_eeprom(ds, eeprom, data);
net/dsa/user.c
1017
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1019
if (ds->ops->set_eeprom)
net/dsa/user.c
1020
return ds->ops->set_eeprom(ds, eeprom, data);
net/dsa/user.c
1029
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1036
if (ds->ops->get_strings)
net/dsa/user.c
1037
ds->ops->get_strings(ds, dp->index, stringset, data);
net/dsa/user.c
1049
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1070
if (ds->ops->get_ethtool_stats)
net/dsa/user.c
1071
ds->ops->get_ethtool_stats(ds, dp->index, data + 4);
net/dsa/user.c
1077
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
108
dev_err(ds->dev,
net/dsa/user.c
1082
if (ds->ops->get_sset_count) {
net/dsa/user.c
1083
count = ds->ops->get_sset_count(ds, dp->index, sset);
net/dsa/user.c
1100
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1102
if (ds->ops->get_eth_phy_stats)
net/dsa/user.c
1103
ds->ops->get_eth_phy_stats(ds, dp->index, phy_stats);
net/dsa/user.c
1110
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1112
if (ds->ops->get_eth_mac_stats)
net/dsa/user.c
1113
ds->ops->get_eth_mac_stats(ds, dp->index, mac_stats);
net/dsa/user.c
1121
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1123
if (ds->ops->get_eth_ctrl_stats)
net/dsa/user.c
1124
ds->ops->get_eth_ctrl_stats(ds, dp->index, ctrl_stats);
net/dsa/user.c
1133
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1135
if (ds->ops->get_rmon_stats)
net/dsa/user.c
1136
ds->ops->get_rmon_stats(ds, dp->index, rmon_stats, ranges);
net/dsa/user.c
1143
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1145
if (ds->ops->get_ts_stats)
net/dsa/user.c
1146
ds->ops->get_ts_stats(ds, dp->index, ts_stats);
net/dsa/user.c
1153
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1155
if (ds->ops->self_test) {
net/dsa/user.c
1156
ds->ops->self_test(ds, dp->index, etest, buf);
net/dsa/user.c
1167
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1169
if (!ds->ops->get_mm)
net/dsa/user.c
1172
return ds->ops->get_mm(ds, dp->index, state);
net/dsa/user.c
1179
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1181
if (!ds->ops->set_mm)
net/dsa/user.c
1184
return ds->ops->set_mm(ds, dp->index, cfg, extack);
net/dsa/user.c
1191
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1193
if (ds->ops->get_mm_stats)
net/dsa/user.c
1194
ds->ops->get_mm_stats(ds, dp->index, stats);
net/dsa/user.c
120
dev_err(ds->dev,
net/dsa/user.c
1200
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1204
if (ds->ops->get_wol)
net/dsa/user.c
1205
ds->ops->get_wol(ds, dp->index, w);
net/dsa/user.c
1211
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1216
if (ds->ops->set_wol)
net/dsa/user.c
1217
ret = ds->ops->set_wol(ds, dp->index, w);
net/dsa/user.c
1225
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1229
if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
net/dsa/user.c
1235
if (!phylink_mac_implements_lpi(ds->phylink_mac_ops)) {
net/dsa/user.c
1240
if (!ds->ops->set_mac_eee)
net/dsa/user.c
1243
ret = ds->ops->set_mac_eee(ds, dp->index, e);
net/dsa/user.c
1246
} else if (ds->ops->set_mac_eee) {
net/dsa/user.c
1247
ret = ds->ops->set_mac_eee(ds, dp->index, e);
net/dsa/user.c
1258
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1261
if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
net/dsa/user.c
1291
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1293
if (ds->ops->get_pause_stats)
net/dsa/user.c
1294
ds->ops->get_pause_stats(ds, dp->index, pause_stats);
net/dsa/user.c
132
dev_err(ds->dev,
net/dsa/user.c
1377
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1388
if (!ds->ops->port_mirror_add) {
net/dsa/user.c
1427
if (dp->ds != to_dp->ds) {
net/dsa/user.c
1443
err = ds->ops->port_mirror_add(ds, dp->index, mirror, ingress, extack);
net/dsa/user.c
1464
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1468
if (!ds->ops->port_policer_add) {
net/dsa/user.c
1502
err = ds->ops->port_policer_add(ds, dp->index, policer);
net/dsa/user.c
1548
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1558
if (ds->ops->port_mirror_del)
net/dsa/user.c
1559
ds->ops->port_mirror_del(ds, dp->index,
net/dsa/user.c
1563
if (ds->ops->port_policer_del)
net/dsa/user.c
1564
ds->ops->port_policer_del(ds, dp->index);
net/dsa/user.c
1596
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1599
if (!ds->ops->cls_flower_add)
net/dsa/user.c
1602
return ds->ops->cls_flower_add(ds, port, cls, ingress);
net/dsa/user.c
1610
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1613
if (!ds->ops->cls_flower_del)
net/dsa/user.c
1616
return ds->ops->cls_flower_del(ds, port, cls, ingress);
net/dsa/user.c
1624
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1627
if (!ds->ops->cls_flower_stats)
net/dsa/user.c
1630
return ds->ops->cls_flower_stats(ds, port, cls, ingress);
net/dsa/user.c
1721
static int dsa_user_setup_ft_block(struct dsa_switch *ds, int port,
net/dsa/user.c
1724
struct net_device *conduit = dsa_port_to_conduit(dsa_to_port(ds, port));
net/dsa/user.c
1736
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1742
return dsa_user_setup_ft_block(ds, dp->index, type_data);
net/dsa/user.c
1747
if (!ds->ops->port_setup_tc)
net/dsa/user.c
1750
return ds->ops->port_setup_tc(ds, dp->index, type, type_data);
net/dsa/user.c
1757
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1759
if (!ds->ops->get_rxnfc)
net/dsa/user.c
1762
return ds->ops->get_rxnfc(ds, dp->index, nfc, rule_locs);
net/dsa/user.c
1769
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1771
if (!ds->ops->set_rxnfc)
net/dsa/user.c
1774
return ds->ops->set_rxnfc(ds, dp->index, nfc);
net/dsa/user.c
1781
struct dsa_switch *ds = p->dp->ds;
net/dsa/user.c
1783
if (!ds->ops->get_ts_info)
net/dsa/user.c
1786
return ds->ops->get_ts_info(ds, p->dp->index, ts);
net/dsa/user.c
1800
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1822
if (!dsa_switch_supports_uc_filtering(ds) &&
net/dsa/user.c
1823
!dsa_switch_supports_mc_filtering(ds))
net/dsa/user.c
1837
if (dsa_switch_supports_mc_filtering(ds)) {
net/dsa/user.c
1844
if (dsa_switch_supports_uc_filtering(ds)) {
net/dsa/user.c
1873
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
1886
if (!dsa_switch_supports_uc_filtering(ds) &&
net/dsa/user.c
1887
!dsa_switch_supports_mc_filtering(ds))
net/dsa/user.c
1901
if (dsa_switch_supports_mc_filtering(ds)) {
net/dsa/user.c
1908
if (dsa_switch_supports_uc_filtering(ds)) {
net/dsa/user.c
2043
if (!dp->ds->mtu_enforcement_ingress)
net/dsa/user.c
2065
if (!other_dp->ds->mtu_enforcement_ingress)
net/dsa/user.c
209
if (!dsa_switch_supports_uc_filtering(dp->ds))
net/dsa/user.c
2107
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2117
if (!ds->ops->port_change_mtu)
net/dsa/user.c
2120
dsa_tree_for_each_user_port(other_dp, ds->dst) {
net/dsa/user.c
2168
err = ds->ops->port_change_mtu(ds, dp->index, new_mtu);
net/dsa/user.c
2192
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2195
if (!ds->ops->port_set_apptrust)
net/dsa/user.c
2198
return ds->ops->port_set_apptrust(ds, port, sel, nsel);
net/dsa/user.c
2205
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2208
if (!ds->ops->port_get_apptrust)
net/dsa/user.c
2211
return ds->ops->port_get_apptrust(ds, port, sel, nsel);
net/dsa/user.c
2218
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2222
if (!ds->ops->port_set_default_prio)
net/dsa/user.c
2232
err = ds->ops->port_set_default_prio(ds, port, new_prio);
net/dsa/user.c
2249
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2258
dsa_switch_for_each_user_port(other_dp, ds) {
net/dsa/user.c
2279
dsa_switch_for_each_user_port_continue_reverse(other_dp, ds) {
net/dsa/user.c
229
if (!dsa_switch_supports_uc_filtering(dp->ds))
net/dsa/user.c
2297
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2302
if (!ds->ops->port_add_dscp_prio)
net/dsa/user.c
2318
err = ds->ops->port_add_dscp_prio(ds, port, dscp, new_prio);
net/dsa/user.c
2324
if (!ds->dscp_prio_mapping_is_global)
net/dsa/user.c
2329
if (ds->ops->port_del_dscp_prio)
net/dsa/user.c
2330
ds->ops->port_del_dscp_prio(ds, port, dscp, new_prio);
net/dsa/user.c
2361
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2365
if (!ds->ops->port_set_default_prio)
net/dsa/user.c
2375
err = ds->ops->port_set_default_prio(ds, port, new_prio);
net/dsa/user.c
2388
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2392
if (!ds->ops->port_del_dscp_prio)
net/dsa/user.c
2399
err = ds->ops->port_del_dscp_prio(ds, port, dscp, app->priority);
net/dsa/user.c
2405
if (!ds->dscp_prio_mapping_is_global)
net/dsa/user.c
2410
if (ds->ops->port_add_dscp_prio)
net/dsa/user.c
2411
ds->ops->port_add_dscp_prio(ds, port, dscp,
net/dsa/user.c
2445
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2449
if (ds->ops->port_get_default_prio) {
net/dsa/user.c
2450
int prio = ds->ops->port_get_default_prio(ds, port);
net/dsa/user.c
2465
if (ds->ops->port_get_dscp_prio) {
net/dsa/user.c
2475
prio = ds->ops->port_get_dscp_prio(ds, port, protocol);
net/dsa/user.c
249
if (!dsa_switch_supports_mc_filtering(dp->ds))
net/dsa/user.c
2538
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2540
if (ds->ops->get_stats64)
net/dsa/user.c
2541
ds->ops->get_stats64(ds, dp->index, s);
net/dsa/user.c
2566
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2568
if (!ds->ops->port_hwtstamp_get)
net/dsa/user.c
2571
return ds->ops->port_hwtstamp_get(ds, dp->index, cfg);
net/dsa/user.c
2579
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2581
if (!ds->ops->port_hwtstamp_set)
net/dsa/user.c
2584
return ds->ops->port_hwtstamp_set(ds, dp->index, cfg, extack);
net/dsa/user.c
2616
void dsa_port_phylink_mac_change(struct dsa_switch *ds, int port, bool up)
net/dsa/user.c
2618
const struct dsa_port *dp = dsa_to_port(ds, port);
net/dsa/user.c
2629
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2634
ds->ops->phylink_fixed_state(ds, dp->index, state);
net/dsa/user.c
2642
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2644
user_dev->phydev = mdiobus_get_phy(ds->user_mii_bus, addr);
net/dsa/user.c
2659
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2670
if (ds->ops->phylink_fixed_state) {
net/dsa/user.c
2679
if (ds->ops->get_phy_flags)
net/dsa/user.c
2680
phy_flags = ds->ops->get_phy_flags(ds, dp->index);
net/dsa/user.c
2683
if (ret == -ENODEV && ds->user_mii_bus) {
net/dsa/user.c
269
if (!dsa_switch_supports_mc_filtering(dp->ds))
net/dsa/user.c
2704
const struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2721
if (ds->needs_standalone_vlan_filtering)
net/dsa/user.c
2762
struct dsa_switch *ds = port->ds;
net/dsa/user.c
2769
if (!ds->num_tx_queues)
net/dsa/user.c
2770
ds->num_tx_queues = 1;
net/dsa/user.c
2782
ds->num_tx_queues, 1);
net/dsa/user.c
279
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2796
if (dsa_switch_supports_uc_filtering(ds))
net/dsa/user.c
2799
if (ds->ops->port_max_mtu)
net/dsa/user.c
2800
user_dev->max_mtu = ds->ops->port_max_mtu(ds, port->index);
net/dsa/user.c
2803
SET_NETDEV_DEV(user_dev, port->ds->dev);
net/dsa/user.c
2826
ret, ds->dst->index, ds->index, port->index);
net/dsa/user.c
2834
dev_warn(ds->dev, "nonfatal error %d setting MTU to %d on port %d\n",
net/dsa/user.c
2903
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
2911
if (!ds->ops->port_change_conduit) {
net/dsa/user.c
292
if (dsa_switch_supports_uc_filtering(ds) ||
net/dsa/user.c
293
dsa_switch_supports_mc_filtering(ds))
net/dsa/user.c
300
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
313
if (dsa_switch_supports_uc_filtering(ds) ||
net/dsa/user.c
314
dsa_switch_supports_mc_filtering(ds))
net/dsa/user.c
3185
struct dsa_switch *ds;
net/dsa/user.c
3193
ds = dp->ds;
net/dsa/user.c
3195
if (ds->ops->port_prechangeupper) {
net/dsa/user.c
3196
err = ds->ops->port_prechangeupper(ds, dp->index, info);
net/dsa/user.c
321
struct dsa_switch *ds = bus->priv;
net/dsa/user.c
323
if (ds->phys_mii_mask & (1 << addr))
net/dsa/user.c
324
return ds->ops->phy_read(ds, addr, reg);
net/dsa/user.c
331
struct dsa_switch *ds = bus->priv;
net/dsa/user.c
333
if (ds->phys_mii_mask & (1 << addr))
net/dsa/user.c
334
return ds->ops->phy_write(ds, addr, reg, val);
net/dsa/user.c
339
void dsa_user_mii_bus_init(struct dsa_switch *ds)
net/dsa/user.c
341
ds->user_mii_bus->priv = (void *)ds;
net/dsa/user.c
342
ds->user_mii_bus->name = "dsa user smi";
net/dsa/user.c
343
ds->user_mii_bus->read = dsa_user_phy_read;
net/dsa/user.c
344
ds->user_mii_bus->write = dsa_user_phy_write;
net/dsa/user.c
345
snprintf(ds->user_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d.%d",
net/dsa/user.c
346
ds->dst->index, ds->index);
net/dsa/user.c
347
ds->user_mii_bus->parent = ds->dev;
net/dsa/user.c
348
ds->user_mii_bus->phy_mask = ~ds->phys_mii_mask;
net/dsa/user.c
3561
struct dsa_switch_tree *dst = cpu_dp->ds->dst;
net/dsa/user.c
3592
dst = cpu_dp->ds->dst;
net/dsa/user.c
362
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
3636
struct dsa_switch *ds;
net/dsa/user.c
3641
ds = dp->ds;
net/dsa/user.c
365
if (dsa_switch_supports_uc_filtering(ds)) {
net/dsa/user.c
3652
dev_err(ds->dev,
net/dsa/user.c
3668
dev_err(ds->dev,
net/dsa/user.c
3683
struct dsa_switch_tree *dst = dp->ds->dst;
net/dsa/user.c
3703
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
3719
if (!ds->assisted_learning_on_cpu_port)
net/dsa/user.c
3734
if (!ds->ops->lag_fdb_add || !ds->ops->lag_fdb_del)
net/dsa/user.c
3737
if (!ds->ops->port_fdb_add || !ds->ops->port_fdb_del)
net/dsa/user.c
380
if (dsa_switch_supports_uc_filtering(ds))
net/dsa/user.c
390
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
395
if (dsa_switch_supports_uc_filtering(ds))
net/dsa/user.c
451
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
460
if (dsa_switch_supports_uc_filtering(ds) &&
net/dsa/user.c
461
dsa_switch_supports_mc_filtering(ds))
net/dsa/user.c
474
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
481
if (ds->ops->port_set_mac_address) {
net/dsa/user.c
482
err = ds->ops->port_set_mac_address(ds, dp->index,
net/dsa/user.c
68
static bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds)
net/dsa/user.c
70
return ds->ops->port_fdb_add && ds->ops->port_fdb_del &&
net/dsa/user.c
71
ds->fdb_isolation && !ds->vlan_filtering_is_global &&
net/dsa/user.c
72
!ds->needs_standalone_vlan_filtering;
net/dsa/user.c
75
static bool dsa_switch_supports_mc_filtering(struct dsa_switch *ds)
net/dsa/user.c
77
return ds->ops->port_mdb_add && ds->ops->port_mdb_del &&
net/dsa/user.c
78
ds->fdb_isolation && !ds->vlan_filtering_is_global &&
net/dsa/user.c
79
!ds->needs_standalone_vlan_filtering;
net/dsa/user.c
884
struct dsa_switch *ds = p->dp->ds;
net/dsa/user.c
889
if (!ds->ops->port_txtstamp)
net/dsa/user.c
892
ds->ops->port_txtstamp(ds, p->dp->index, skb);
net/dsa/user.c
90
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
962
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
964
if (ds->ops->get_regs_len)
net/dsa/user.c
965
return ds->ops->get_regs_len(ds, dp->index);
net/dsa/user.c
974
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
976
if (ds->ops->get_regs)
net/dsa/user.c
977
ds->ops->get_regs(ds, dp->index, regs, _p);
net/dsa/user.c
98
dev_err(ds->dev,
net/dsa/user.c
990
struct dsa_switch *ds = dp->ds;
net/dsa/user.c
992
if (ds->cd && ds->cd->eeprom_len)
net/dsa/user.c
993
return ds->cd->eeprom_len;
net/dsa/user.c
995
if (ds->ops->get_eeprom_len)
net/dsa/user.c
996
return ds->ops->get_eeprom_len(ds);
net/dsa/user.h
38
void dsa_user_mii_bus_init(struct dsa_switch *ds);
net/netfilter/ipvs/ip_vs_mh.c
125
struct ip_vs_mh_dest_setup *ds;
net/netfilter/ipvs/ip_vs_mh.c
138
ds = &s->dest_setup[0];
net/netfilter/ipvs/ip_vs_mh.c
142
ds->offset = ip_vs_mh_hashkey(svc->af, &dest->addr,
net/netfilter/ipvs/ip_vs_mh.c
145
ds->skip = ip_vs_mh_hashkey(svc->af, &dest->addr,
net/netfilter/ipvs/ip_vs_mh.c
148
ds->perm = ds->offset;
net/netfilter/ipvs/ip_vs_mh.c
151
ds->turns = ((lw / s->gcd) >> s->rshift) ? : (lw != 0);
net/netfilter/ipvs/ip_vs_mh.c
152
ds++;
net/netfilter/ipvs/ip_vs_mh.c
164
struct ip_vs_mh_dest_setup *ds;
net/netfilter/ipvs/ip_vs_mh.c
187
ds = &s->dest_setup[0];
net/netfilter/ipvs/ip_vs_mh.c
190
if (ds->turns < 1) {
net/netfilter/ipvs/ip_vs_mh.c
192
ds++;
net/netfilter/ipvs/ip_vs_mh.c
196
c = ds->perm;
net/netfilter/ipvs/ip_vs_mh.c
199
ds->perm += ds->skip;
net/netfilter/ipvs/ip_vs_mh.c
200
if (ds->perm >= IP_VS_MH_TAB_SIZE)
net/netfilter/ipvs/ip_vs_mh.c
201
ds->perm -= IP_VS_MH_TAB_SIZE;
net/netfilter/ipvs/ip_vs_mh.c
202
c = ds->perm;
net/netfilter/ipvs/ip_vs_mh.c
219
if (++dt_count >= ds->turns) {
net/netfilter/ipvs/ip_vs_mh.c
222
ds++;
scripts/kconfig/confdata.c
792
struct symbol *ds;
scripts/kconfig/confdata.c
794
ds = sym_choice_default(choice);
scripts/kconfig/confdata.c
795
if (sym == ds && sym_get_tristate_value(sym) == yes)
scripts/kconfig/symbol.c
511
struct symbol *ds = prop_get_symbol(prop);
scripts/kconfig/symbol.c
512
if (ds) {
scripts/kconfig/symbol.c
514
sym_calc_value(ds);
scripts/kconfig/symbol.c
515
newval.val = ds->curr.val;
scripts/kconfig/symbol.c
529
struct symbol *ds = prop_get_symbol(prop);
scripts/kconfig/symbol.c
530
if (ds && (ds->flags & SYMBOL_TRANS) && sym_has_value(ds)) {
scripts/kconfig/symbol.c
815
struct symbol *ds;
scripts/kconfig/symbol.c
838
ds = prop_get_symbol(prop);
scripts/kconfig/symbol.c
839
if (ds != NULL) {
scripts/kconfig/symbol.c
840
sym_calc_value(ds);
scripts/kconfig/symbol.c
841
str = (const char *)ds->curr.val;
sound/pci/asihpi/asihpi.c
568
struct snd_card_asihpi_pcm *ds = runtime->private_data;
sound/pci/asihpi/asihpi.c
577
ds->drained_count = 0;
sound/pci/asihpi/asihpi.c
585
unsigned int preload = ds->period_bytes * 1;
sound/pci/asihpi/asihpi.c
588
ds->h_stream,
sound/pci/asihpi/asihpi.c
591
&ds->format));
sound/pci/asihpi/asihpi.c
592
ds->pcm_buf_host_rw_ofs = preload;
sound/pci/asihpi/asihpi.c
599
ds->h_stream);
sound/pci/asihpi/asihpi.c
730
struct snd_card_asihpi_pcm *ds = s->runtime->private_data;
sound/pci/asihpi/asihpi.c
741
ds->h_stream, &state,
sound/pci/asihpi/asihpi.c
752
pcm_buf_dma_ofs = ds->pcm_buf_host_rw_ofs - bytes_avail;
sound/pci/asihpi/asihpi.c
755
hpi_handle_error(hpi_stream_start(ds->h_stream));
sound/pci/asihpi/asihpi.c
758
ds->drained_count = 0;
sound/pci/asihpi/asihpi.c
763
ds->drained_count++;
sound/pci/asihpi/asihpi.c
764
if (ds->drained_count > 20) {
sound/pci/asihpi/asihpi.c
769
ds->drained_count = 0;
sound/pci/asihpi/asihpi.c
772
pcm_buf_dma_ofs = bytes_avail + ds->pcm_buf_host_rw_ofs;
sound/pci/asihpi/asihpi.c
777
newdata = (pcm_buf_dma_ofs - ds->pcm_buf_elapsed_dma_ofs) % ds->buffer_bytes;
sound/pci/asihpi/asihpi.c
783
(pcm_buf_dma_ofs - ds->pcm_buf_elapsed_dma_ofs) % ds->buffer_bytes,
sound/pci/asihpi/asihpi.c
790
ds->pcm_buf_elapsed_dma_ofs,
sound/pci/asihpi/asihpi.c
791
ds->pcm_buf_host_rw_ofs,
sound/pci/asihpi/asihpi.c
822
struct snd_card_asihpi_pcm *ds = s->runtime->private_data;
sound/pci/asihpi/asihpi.c
829
ds->pcm_buf_dma_ofs = pcm_buf_dma_ofs;
sound/pci/asihpi/asihpi.c
833
((on_card_bytes <= ds->period_bytes) ||
sound/pci/asihpi/asihpi.c
838
unsigned int buf_ofs = ds->pcm_buf_host_rw_ofs % ds->buffer_bytes;
sound/pci/asihpi/asihpi.c
846
xfer1 = min(xfercount, ds->buffer_bytes - buf_ofs);
sound/pci/asihpi/asihpi.c
855
ds->h_stream, pd, xfer1,
sound/pci/asihpi/asihpi.c
856
&ds->format));
sound/pci/asihpi/asihpi.c
866
ds->h_stream, pd,
sound/pci/asihpi/asihpi.c
868
&ds->format));
sound/pci/asihpi/asihpi.c
875
ds->h_stream,
sound/pci/asihpi/asihpi.c
883
ds->h_stream,
sound/pci/asihpi/asihpi.c
888
ds->pcm_buf_host_rw_ofs += xfercount;
sound/pci/asihpi/asihpi.c
889
ds->pcm_buf_elapsed_dma_ofs += xfercount;
sound/pci/rme32.c
476
int ds;
sound/pci/rme32.c
478
ds = rme32->wcreg & RME32_WCR_DS_BM;
sound/pci/rme32.c
519
if ((!ds && rme32->wcreg & RME32_WCR_DS_BM) ||
sound/pci/rme32.c
520
(ds && !(rme32->wcreg & RME32_WCR_DS_BM)))
sound/pci/rme96.c
678
int ds;
sound/pci/rme96.c
680
ds = rme96->wcreg & RME96_WCR_DS;
sound/pci/rme96.c
715
if ((!ds && rme96->wcreg & RME96_WCR_DS) ||
sound/pci/rme96.c
716
(ds && !(rme96->wcreg & RME96_WCR_DS)))
sound/pci/rme9652/hdspm.c
3316
static int hdspm_set_ds_wire(struct hdspm * hdspm, int ds)
sound/pci/rme9652/hdspm.c
3318
if (ds)
sound/pci/rme9652/hdspm.c
6135
levels->speed = ds;
sound/soc/atmel/mchp-pdmc.c
896
int ds;
sound/soc/atmel/mchp-pdmc.c
900
&ds);
sound/soc/atmel/mchp-pdmc.c
907
if (ds >= MCHP_PDMC_DS_NO) {
sound/soc/atmel/mchp-pdmc.c
910
ds);
sound/soc/atmel/mchp-pdmc.c
929
if (mic_ch[ds][edge]) {
sound/soc/atmel/mchp-pdmc.c
932
ds, edge);
sound/soc/atmel/mchp-pdmc.c
935
mic_ch[ds][edge] = true;
sound/soc/atmel/mchp-pdmc.c
936
dd->channel_mic_map[i].ds_pos = ds;
sound/soc/meson/axg-pdm.c
151
unsigned int os = filters->hcic.ds;
sound/soc/meson/axg-pdm.c
160
os *= filters->lpf[i].ds;
sound/soc/meson/axg-pdm.c
303
val |= PDM_HCIC_CTRL1_DSR(hcic->ds);
sound/soc/meson/axg-pdm.c
323
val |= PDM_LPF_DSR(lpf->ds);
sound/soc/meson/axg-pdm.c
545
.ds = 8,
sound/soc/meson/axg-pdm.c
553
.ds = 2,
sound/soc/meson/axg-pdm.c
559
.ds = 2,
sound/soc/meson/axg-pdm.c
565
.ds = 2,
sound/soc/meson/axg-pdm.c
62
unsigned int ds;
sound/soc/meson/axg-pdm.c
72
unsigned int ds;
tools/arch/x86/include/uapi/asm/kvm.h
152
struct kvm_segment cs, ds, es, fs, gs, ss;
tools/arch/x86/include/uapi/asm/kvm.h
163
struct kvm_segment cs, ds, es, fs, gs, ss;
tools/net/ynl/lib/ynl.c
1009
struct ynl_dump_state *ds = (void *)data;
tools/net/ynl/lib/ynl.c
1014
ret = ynl_check_alien(ds->yarg.ys, nlh, ds->rsp_cmd);
tools/net/ynl/lib/ynl.c
1018
obj = calloc(1, ds->alloc_sz);
tools/net/ynl/lib/ynl.c
1022
if (!ds->first)
tools/net/ynl/lib/ynl.c
1023
ds->first = obj;
tools/net/ynl/lib/ynl.c
1024
if (ds->last)
tools/net/ynl/lib/ynl.c
1025
ds->last->next = obj;
tools/net/ynl/lib/ynl.c
1026
ds->last = obj;
tools/net/ynl/lib/ynl.c
1028
yarg = ds->yarg;
tools/net/ynl/lib/ynl.c
1031
return ds->cb(nlh, &yarg);
tools/net/ynl/lib/ynl.c
1034
static void *ynl_dump_end(struct ynl_dump_state *ds)
tools/net/ynl/lib/ynl.c
1036
if (!ds->first)
tools/net/ynl/lib/ynl.c
1039
ds->last->next = YNL_LIST_END;
tools/net/ynl/lib/ynl.c
1040
return ds->first;
tools/perf/builtin-sched.c
4175
struct perf_record_schedstat_domain *ds;
tools/perf/builtin-sched.c
4197
tdptr->domain_data = zalloc(sizeof(*ds));
tools/perf/builtin-sched.c
4201
memcpy(tdptr->domain_data, dptr->domain_data, sizeof(*ds));
tools/perf/util/event.c
603
struct perf_record_schedstat_domain *ds = &event->schedstat_domain;
tools/perf/util/event.c
604
__u16 version = ds->version;
tools/perf/util/event.c
605
size_t size = fprintf(fp, "\ndomain%u ", ds->domain);
tools/perf/util/event.c
608
size += fprintf(fp, "%" PRIu64 " ", (uint64_t)ds->_ver._name)
tools/perf/util/synthetic-events.c
2594
struct perf_record_schedstat_domain *ds;
tools/perf/util/synthetic-events.c
2615
size = sizeof(*ds);
tools/perf/util/synthetic-events.c
2619
ds = &event->schedstat_domain;
tools/perf/util/synthetic-events.c
2620
ds->header.type = PERF_RECORD_SCHEDSTAT_DOMAIN;
tools/perf/util/synthetic-events.c
2621
ds->header.size = size;
tools/perf/util/synthetic-events.c
2622
ds->version = version;
tools/perf/util/synthetic-events.c
2623
ds->timestamp = timestamp;
tools/perf/util/synthetic-events.c
2624
ds->domain = d_num;
tools/perf/util/synthetic-events.c
2632
ds->_ver._name = _tmp; \
tools/perf/util/synthetic-events.c
2644
ds->cpu = cpu;
tools/testing/selftests/ipc/msgque.c
132
struct msqid_ds ds;
tools/testing/selftests/ipc/msgque.c
137
ret = msgctl(kern_id, MSG_STAT, &ds);
tools/testing/selftests/ipc/msgque.c
150
msgque->messages = malloc(sizeof(struct msg1) * ds.msg_qnum);
tools/testing/selftests/ipc/msgque.c
156
msgque->qnum = ds.msg_qnum;
tools/testing/selftests/ipc/msgque.c
157
msgque->mode = ds.msg_perm.mode;
tools/testing/selftests/ipc/msgque.c
158
msgque->qbytes = ds.msg_qbytes;
tools/testing/selftests/kvm/include/x86/processor.h
517
uint16_t ds;
tools/testing/selftests/kvm/include/x86/processor.h
520
: /* output */ [ds]"=rm"(ds));
tools/testing/selftests/kvm/include/x86/processor.h
521
return ds;
tools/testing/selftests/kvm/include/x86/svm.h
192
struct vmcb_seg ds;
tools/testing/selftests/kvm/lib/x86/processor.c
119
segment_dump(stream, &sregs->ds, indent + 2);
tools/testing/selftests/kvm/lib/x86/processor.c
669
kvm_seg_set_kernel_data_64bit(&sregs.ds);
tools/testing/selftests/kvm/lib/x86/svm.c
105
vmcb_set_seg(&save->ds, get_ds(), 0, -1U, data_seg_attr);
tools/testing/selftests/x86/entry_from_vm86.c
247
v86.regs.ds = load_addr / 16;