diff --git a/repos/dde_linux/recipes/src/usb_net_drv/content.mk b/repos/dde_linux/recipes/src/usb_net_drv/content.mk new file mode 100644 index 0000000000..61ca75a5c1 --- /dev/null +++ b/repos/dde_linux/recipes/src/usb_net_drv/content.mk @@ -0,0 +1,11 @@ +MIRROR_FROM_REP_DIR := src/drivers/usb_net + +content: $(MIRROR_FROM_REP_DIR) +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) + +PORT_DIR := $(call port_dir,$(GENODE_DIR)/repos/dde_linux/ports/linux) + +content: LICENSE +LICENSE: + cp $(PORT_DIR)/src/linux/COPYING $@ diff --git a/repos/dde_linux/recipes/src/usb_net_drv/hash b/repos/dde_linux/recipes/src/usb_net_drv/hash new file mode 100644 index 0000000000..f443f363ae --- /dev/null +++ b/repos/dde_linux/recipes/src/usb_net_drv/hash @@ -0,0 +1 @@ +2023-07-11-p 9df48e239f9ca1d4233a198e4ec39a4ed571b366 diff --git a/repos/dde_linux/recipes/src/usb_net_drv/used_apis b/repos/dde_linux/recipes/src/usb_net_drv/used_apis new file mode 100644 index 0000000000..a39e56144e --- /dev/null +++ b/repos/dde_linux/recipes/src/usb_net_drv/used_apis @@ -0,0 +1,10 @@ +base +genode_c_api +jitterentropy +nic_session +os +report_session +terminal_session +uplink_session +usb_session +virt_linux diff --git a/repos/dde_linux/src/drivers/usb_net/README b/repos/dde_linux/src/drivers/usb_net/README new file mode 100644 index 0000000000..946421acef --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/README @@ -0,0 +1,70 @@ + USB NIC driver + + +Driver for network-interface cards and LTE modems with MBIM support connected via USB. + + +Current supported devices +========================= + +* NICs containing an AX88179A chip +* NICs that support the NCM profile (e.g., RTL8156) +* NICs that the ECM profile +* LTE modems that support the MBIM configuration + + +NIC configuration +================= + +Configuration snippet: + +! +! +! +! +! +! .... +! +! + +The driver connects as an Uplink client to Genode's network infrastructure. + +The 'mac' can be used to configure the hardware address on devices that support +setting it and for devices that do not offer a hardware address (a random +address will be used otherwise). + +The 'configuration' attribute allows for setting the desired configuration +profile of the USB device in case there is more than one profile. In case it is +omitted or 0, the driver will choose a profile (first non-vendor specific). + + +LTE modem configuration +======================== + +Currently there is support for MBIM (Mobile Broadband Interface Model) devices. + +Tested devices: +Huawai ME906s (P/V: 12d1:15c1) - "configuration=3" for 'usb_net_drv' +Fibocom L830-EB-00 (P/V: 2cb7:0210) - automatically detected + + +! +! +! +! +! +! +! +! +! .... +! +! + + +In case the driver finds a MBIM capable device it will announce a terminal +session which is used as the control channel (wireless communication device +class - CDC WDM). + +An example scenario can be found in Genode World +(_src/app/mbimcli_). Once a data connection is established via the Terminal +session, the Uplink session is used to transfer Ethernet frames. diff --git a/repos/dde_linux/src/drivers/usb_net/dep.list b/repos/dde_linux/src/drivers/usb_net/dep.list new file mode 100644 index 0000000000..5d4321e82d --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/dep.list @@ -0,0 +1,1299 @@ +arch/arm64/include/asm/alternative.h +arch/arm64/include/asm/alternative-macros.h +arch/arm64/include/asm/archrandom.h +arch/arm64/include/asm/arch_timer.h +arch/arm64/include/asm/asm-bug.h +arch/arm64/include/asm/asm-extable.h +arch/arm64/include/asm/asm-offsets.h +arch/arm64/include/asm/assembler.h +arch/arm64/include/asm/atomic.h +arch/arm64/include/asm/atomic_ll_sc.h +arch/arm64/include/asm/barrier.h +arch/arm64/include/asm/bitops.h +arch/arm64/include/asm/bitrev.h +arch/arm64/include/asm/boot.h +arch/arm64/include/asm/brk-imm.h +arch/arm64/include/asm/bug.h +arch/arm64/include/asm/cacheflush.h +arch/arm64/include/asm/cache.h +arch/arm64/include/asm/checksum.h +arch/arm64/include/asm/clocksource.h +arch/arm64/include/asm/cmpxchg.h +arch/arm64/include/asm/compat.h +arch/arm64/include/asm/compiler.h +arch/arm64/include/asm/cpufeature.h +arch/arm64/include/asm/cputype.h +arch/arm64/include/asm/debug-monitors.h +arch/arm64/include/asm/device.h +arch/arm64/include/asm/elf.h +arch/arm64/include/asm/esr.h +arch/arm64/include/asm/exec.h +arch/arm64/include/asm/extable.h +arch/arm64/include/asm/fpsimd.h +arch/arm64/include/asm/ftrace.h +arch/arm64/include/asm/gpr-num.h +arch/arm64/include/asm/hardirq.h +arch/arm64/include/asm/hw_breakpoint.h +arch/arm64/include/asm/hwcap.h +arch/arm64/include/asm/insn-def.h +arch/arm64/include/asm/insn.h +arch/arm64/include/asm/io.h +arch/arm64/include/asm/irq.h +arch/arm64/include/asm/irq_work.h +arch/arm64/include/asm/kasan.h +arch/arm64/include/asm/kernel-pgtable.h +arch/arm64/include/asm/kgdb.h +arch/arm64/include/asm/kprobes.h +arch/arm64/include/asm/kvm_arm.h +arch/arm64/include/asm/linkage.h +arch/arm64/include/asm/lse.h +arch/arm64/include/asm/mman.h +arch/arm64/include/asm/mmu_context.h +arch/arm64/include/asm/mmu.h +arch/arm64/include/asm/module.h +arch/arm64/include/asm/mte-def.h +arch/arm64/include/asm/mte.h +arch/arm64/include/asm/mte-kasan.h +arch/arm64/include/asm/page-def.h +arch/arm64/include/asm/pci.h +arch/arm64/include/asm/percpu.h +arch/arm64/include/asm/pgtable-hwdef.h +arch/arm64/include/asm/pgtable-prot.h +arch/arm64/include/asm/pgtable-types.h +arch/arm64/include/asm/pointer_auth.h +arch/arm64/include/asm/preempt.h +arch/arm64/include/asm/processor.h +arch/arm64/include/asm/proc-fns.h +arch/arm64/include/asm/ptrace.h +arch/arm64/include/asm/rwonce.h +arch/arm64/include/asm/sections.h +arch/arm64/include/asm/set_memory.h +arch/arm64/include/asm/shmparam.h +arch/arm64/include/asm/signal.h +arch/arm64/include/asm/smp.h +arch/arm64/include/asm/sparsemem.h +arch/arm64/include/asm/spectre.h +arch/arm64/include/asm/spinlock_types.h +arch/arm64/include/asm/stack_pointer.h +arch/arm64/include/asm/stat.h +arch/arm64/include/asm/string.h +arch/arm64/include/asm/syscall_wrapper.h +arch/arm64/include/asm/sysreg.h +arch/arm64/include/asm/thread_info.h +arch/arm64/include/asm/timex.h +arch/arm64/include/asm/tlbflush.h +arch/arm64/include/asm/topology.h +arch/arm64/include/asm/uaccess.h +arch/arm64/include/asm/unistd.h +arch/arm64/include/asm/vdso/clocksource.h +arch/arm64/include/asm/vdso/processor.h +arch/arm64/include/asm/virt.h +arch/arm64/include/asm/vmalloc.h +arch/arm64/include/asm/word-at-a-time.h +arch/arm64/include/uapi/asm/auxvec.h +arch/arm64/include/uapi/asm/bitsperlong.h +arch/arm64/include/uapi/asm/bpf_perf_event.h +arch/arm64/include/uapi/asm/byteorder.h +arch/arm64/include/uapi/asm/fcntl.h +arch/arm64/include/uapi/asm/hwcap.h +arch/arm64/include/uapi/asm/mman.h +arch/arm64/include/uapi/asm/param.h +arch/arm64/include/uapi/asm/perf_regs.h +arch/arm64/include/uapi/asm/posix_types.h +arch/arm64/include/uapi/asm/ptrace.h +arch/arm64/include/uapi/asm/sigcontext.h +arch/arm64/include/uapi/asm/signal.h +arch/arm64/include/uapi/asm/sve_context.h +arch/arm64/include/uapi/asm/unistd.h +arch/arm64/lib/memcmp.S +arch/arm64/lib/strchr.S +arch/arm64/lib/strcmp.S +arch/arm64/lib/strlen.S +arch/arm64/lib/strncmp.S +arch/arm64/lib/strnlen.S +arch/x86/include/asm/alternative.h +arch/x86/include/asm/apicdef.h +arch/x86/include/asm/arch_hweight.h +arch/x86/include/asm/archrandom.h +arch/x86/include/asm/asm.h +arch/x86/include/asm/atomic64_64.h +arch/x86/include/asm/atomic.h +arch/x86/include/asm/barrier.h +arch/x86/include/asm/bitops.h +arch/x86/include/asm/bug.h +arch/x86/include/asm/cacheflush.h +arch/x86/include/asm/cache.h +arch/x86/include/asm/checksum_32.h +arch/x86/include/asm/checksum_64.h +arch/x86/include/asm/checksum.h +arch/x86/include/asm/clocksource.h +arch/x86/include/asm/cmpxchg_32.h +arch/x86/include/asm/cmpxchg_64.h +arch/x86/include/asm/cmpxchg.h +arch/x86/include/asm/compat.h +arch/x86/include/asm/cpu_entry_area.h +arch/x86/include/asm/cpufeature.h +arch/x86/include/asm/cpufeatures.h +arch/x86/include/asm/cpu.h +arch/x86/include/asm/cpumask.h +arch/x86/include/asm/delay.h +arch/x86/include/asm/desc_defs.h +arch/x86/include/asm/desc.h +arch/x86/include/asm/device.h +arch/x86/include/asm/disabled-features.h +arch/x86/include/asm/div64.h +arch/x86/include/asm/elf.h +arch/x86/include/asm/emergency-restart.h +arch/x86/include/asm/exec.h +arch/x86/include/asm/extable_fixup_types.h +arch/x86/include/asm/extable.h +arch/x86/include/asm/fixmap.h +arch/x86/include/asm/fpu/api.h +arch/x86/include/asm/fpu/types.h +arch/x86/include/asm/fsgsbase.h +arch/x86/include/asm/ftrace.h +arch/x86/include/asm/hardirq.h +arch/x86/include/asm/hw_breakpoint.h +arch/x86/include/asm/hw_irq.h +arch/x86/include/asm/ibt.h +arch/x86/include/asm/intel_ds.h +arch/x86/include/asm/invpcid.h +arch/x86/include/asm/irq.h +arch/x86/include/asm/irq_stack.h +arch/x86/include/asm/irq_vectors.h +arch/x86/include/asm/irq_work.h +arch/x86/include/asm/ist.h +arch/x86/include/asm/kaslr.h +arch/x86/include/asm/kdebug.h +arch/x86/include/asm/kprobes.h +arch/x86/include/asm/kvm_para.h +arch/x86/include/asm/linkage.h +arch/x86/include/asm/local.h +arch/x86/include/asm/math_emu.h +arch/x86/include/asm/mem_encrypt.h +arch/x86/include/asm/memtype.h +arch/x86/include/asm/mmu_context.h +arch/x86/include/asm/mmu.h +arch/x86/include/asm/module.h +arch/x86/include/asm/msr.h +arch/x86/include/asm/msr-index.h +arch/x86/include/asm/nops.h +arch/x86/include/asm/orc_types.h +arch/x86/include/asm/page_32.h +arch/x86/include/asm/page_32_types.h +arch/x86/include/asm/page_64_types.h +arch/x86/include/asm/page_types.h +arch/x86/include/asm/paravirt.h +arch/x86/include/asm/pci.h +arch/x86/include/asm/percpu.h +arch/x86/include/asm/perf_event.h +arch/x86/include/asm/pgtable-2level_types.h +arch/x86/include/asm/pgtable_32_areas.h +arch/x86/include/asm/pgtable_32_types.h +arch/x86/include/asm/pgtable_64_types.h +arch/x86/include/asm/pgtable_areas.h +arch/x86/include/asm/pgtable_types.h +arch/x86/include/asm/posix_types.h +arch/x86/include/asm/preempt.h +arch/x86/include/asm/processor-flags.h +arch/x86/include/asm/processor.h +arch/x86/include/asm/proto.h +arch/x86/include/asm/pti.h +arch/x86/include/asm/ptrace.h +arch/x86/include/asm/required-features.h +arch/x86/include/asm/rmwcc.h +arch/x86/include/asm/segment.h +arch/x86/include/asm/set_memory.h +arch/x86/include/asm/shared/msr.h +arch/x86/include/asm/shared/tdx.h +arch/x86/include/asm/shmparam.h +arch/x86/include/asm/signal.h +arch/x86/include/asm/smap.h +arch/x86/include/asm/smp.h +arch/x86/include/asm/softirq_stack.h +arch/x86/include/asm/sparsemem.h +arch/x86/include/asm/spinlock_types.h +arch/x86/include/asm/stacktrace.h +arch/x86/include/asm/static_call.h +arch/x86/include/asm/string_64.h +arch/x86/include/asm/string.h +arch/x86/include/asm/syscall_wrapper.h +arch/x86/include/asm/tdx.h +arch/x86/include/asm/text-patching.h +arch/x86/include/asm/thread_info.h +arch/x86/include/asm/timex.h +arch/x86/include/asm/tlbbatch.h +arch/x86/include/asm/tlbflush.h +arch/x86/include/asm/topology.h +arch/x86/include/asm/trace_clock.h +arch/x86/include/asm/tsc.h +arch/x86/include/asm/uaccess.h +arch/x86/include/asm/unistd.h +arch/x86/include/asm/unwind_hints.h +arch/x86/include/asm/user_32.h +arch/x86/include/asm/user32.h +arch/x86/include/asm/user_64.h +arch/x86/include/asm/user.h +arch/x86/include/asm/vdso/clocksource.h +arch/x86/include/asm/vdso.h +arch/x86/include/asm/vdso/processor.h +arch/x86/include/asm/vmalloc.h +arch/x86/include/asm/vmxfeatures.h +arch/x86/include/asm/word-at-a-time.h +arch/x86/include/asm/x86_init.h +arch/x86/include/uapi/asm/auxvec.h +arch/x86/include/uapi/asm/bitsperlong.h +arch/x86/include/uapi/asm/bootparam.h +arch/x86/include/uapi/asm/byteorder.h +arch/x86/include/uapi/asm/hw_breakpoint.h +arch/x86/include/uapi/asm/ist.h +arch/x86/include/uapi/asm/kvm_para.h +arch/x86/include/uapi/asm/ldt.h +arch/x86/include/uapi/asm/mman.h +arch/x86/include/uapi/asm/msr.h +arch/x86/include/uapi/asm/perf_regs.h +arch/x86/include/uapi/asm/posix_types_32.h +arch/x86/include/uapi/asm/posix_types_64.h +arch/x86/include/uapi/asm/processor-flags.h +arch/x86/include/uapi/asm/ptrace-abi.h +arch/x86/include/uapi/asm/ptrace.h +arch/x86/include/uapi/asm/sembuf.h +arch/x86/include/uapi/asm/shmbuf.h +arch/x86/include/uapi/asm/sigcontext.h +arch/x86/include/uapi/asm/siginfo.h +arch/x86/include/uapi/asm/signal.h +arch/x86/include/uapi/asm/stat.h +arch/x86/include/uapi/asm/swab.h +arch/x86/include/uapi/asm/unistd.h +arch/x86/include/uapi/asm/vsyscall.h +drivers/base/base.h +drivers/base/physical_location.h +drivers/base/power/power.h +drivers/base/trace.h +drivers/usb/core/hub.h +drivers/usb/core/otg_productlist.h +drivers/usb/core/usb.h +include/acpi/acbuffer.h +include/acpi/acconfig.h +include/acpi/acexcep.h +include/acpi/acnames.h +include/acpi/acoutput.h +include/acpi/acpi.h +include/acpi/acpi_numa.h +include/acpi/acpiosxf.h +include/acpi/acpixf.h +include/acpi/acrestyp.h +include/acpi/actbl1.h +include/acpi/actbl2.h +include/acpi/actbl3.h +include/acpi/actbl.h +include/acpi/actypes.h +include/acpi/platform/acenvex.h +include/acpi/platform/acenv.h +include/acpi/platform/acgccex.h +include/acpi/platform/acgcc.h +include/acpi/platform/aclinuxex.h +include/acpi/platform/aclinux.h +include/asm-generic/access_ok.h +include/asm-generic/asm-prototypes.h +include/asm-generic/barrier.h +include/asm-generic/bitops/arch_hweight.h +include/asm-generic/bitops/atomic.h +include/asm-generic/bitops/builtin-__ffs.h +include/asm-generic/bitops/builtin-ffs.h +include/asm-generic/bitops/builtin-__fls.h +include/asm-generic/bitops/builtin-fls.h +include/asm-generic/bitops/const_hweight.h +include/asm-generic/bitops/ext2-atomic-setbit.h +include/asm-generic/bitops/ffz.h +include/asm-generic/bitops/fls64.h +include/asm-generic/bitops/generic-non-atomic.h +include/asm-generic/bitops/hweight.h +include/asm-generic/bitops/instrumented-atomic.h +include/asm-generic/bitops/instrumented-lock.h +include/asm-generic/bitops/instrumented-non-atomic.h +include/asm-generic/bitops/le.h +include/asm-generic/bitops/lock.h +include/asm-generic/bitops/non-atomic.h +include/asm-generic/bitops/non-instrumented-non-atomic.h +include/asm-generic/bitops/sched.h +include/asm-generic/bitsperlong.h +include/asm-generic/bug.h +include/asm-generic/cacheflush.h +include/asm-generic/checksum.h +include/asm-generic/compat.h +include/asm-generic/delay.h +include/asm-generic/div64.h +include/asm-generic/early_ioremap.h +include/asm-generic/emergency-restart.h +include/asm-generic/error-injection.h +include/asm-generic/export.h +include/asm-generic/fixmap.h +include/asm-generic/getorder.h +include/asm-generic/hardirq.h +include/asm-generic/hw_irq.h +include/asm-generic/int-ll64.h +include/asm-generic/ioctl.h +include/asm-generic/io.h +include/asm-generic/iomap.h +include/asm-generic/irq.h +include/asm-generic/irq_regs.h +include/asm-generic/kdebug.h +include/asm-generic/kmap_size.h +include/asm-generic/kprobes.h +include/asm-generic/kvm_para.h +include/asm-generic/local64.h +include/asm-generic/local.h +include/asm-generic/mm_hooks.h +include/asm-generic/mmiowb.h +include/asm-generic/mmu_context.h +include/asm-generic/module.h +include/asm-generic/param.h +include/asm-generic/pci.h +include/asm-generic/pci_iomap.h +include/asm-generic/percpu.h +include/asm-generic/pgtable-nop4d.h +include/asm-generic/pgtable-nopmd.h +include/asm-generic/pgtable-nopud.h +include/asm-generic/pgtable_uffd.h +include/asm-generic/qrwlock_types.h +include/asm-generic/qspinlock_types.h +include/asm-generic/resource.h +include/asm-generic/rwonce.h +include/asm-generic/sections.h +include/asm-generic/set_memory.h +include/asm-generic/shmparam.h +include/asm-generic/signal.h +include/asm-generic/softirq_stack.h +include/asm-generic/switch_to.h +include/asm-generic/timex.h +include/asm-generic/topology.h +include/asm-generic/trace_clock.h +include/asm-generic/unaligned.h +include/asm-generic/user.h +include/clocksource/arm_arch_timer.h +include/crypto/sha1.h +include/linux/acpi.h +include/linux/alarmtimer.h +include/linux/align.h +include/linux/apm_bios.h +include/linux/arch_topology.h +include/linux/arm-smccc.h +include/linux/assoc_array.h +include/linux/async.h +include/linux/atomic/atomic-arch-fallback.h +include/linux/atomic/atomic-instrumented.h +include/linux/atomic/atomic-long.h +include/linux/atomic.h +include/linux/audit_arch.h +include/linux/audit.h +include/linux/auxvec.h +include/linux/backing-dev-defs.h +include/linux/binfmts.h +include/linux/bio.h +include/linux/bitfield.h +include/linux/bitmap.h +include/linux/bitops.h +include/linux/bitrev.h +include/linux/bits.h +include/linux/bit_spinlock.h +include/linux/blkdev.h +include/linux/blk_types.h +include/linux/bottom_half.h +include/linux/bpf-cgroup-defs.h +include/linux/bpf-cgroup.h +include/linux/bpf.h +include/linux/bpfptr.h +include/linux/bpf_trace.h +include/linux/btf.h +include/linux/bug.h +include/linux/build_bug.h +include/linux/buildid.h +include/linux/bvec.h +include/linux/byteorder/generic.h +include/linux/byteorder/little_endian.h +include/linux/cacheflush.h +include/linux/cache.h +include/linux/capability.h +include/linux/cc_platform.h +include/linux/cdev.h +include/linux/cgroup_api.h +include/linux/cgroup-defs.h +include/linux/cgroup.h +include/linux/clk.h +include/linux/clk-provider.h +include/linux/clockchips.h +include/linux/clocksource.h +include/linux/clocksource_ids.h +include/linux/compat.h +include/linux/compiler_attributes.h +include/linux/compiler-gcc.h +include/linux/compiler.h +include/linux/compiler_types.h +include/linux/compiler-version.h +include/linux/completion.h +include/linux/const.h +include/linux/container_of.h +include/linux/context_tracking.h +include/linux/context_tracking_irq.h +include/linux/context_tracking_state.h +include/linux/cpufreq.h +include/linux/cpu.h +include/linux/cpuhotplug.h +include/linux/cpumask_api.h +include/linux/cpumask.h +include/linux/cpu_rmap.h +include/linux/cpuset.h +include/linux/crash_core.h +include/linux/crash_dump.h +include/linux/crc16.h +include/linux/crc32.h +include/linux/crc32poly.h +include/linux/cred.h +include/linux/ctype.h +include/linux/dcache.h +include/linux/debugfs.h +include/linux/debug_locks.h +include/linux/debugobjects.h +include/linux/delayed_call.h +include/linux/delay.h +include/linux/device/bus.h +include/linux/device/class.h +include/linux/device/driver.h +include/linux/device.h +include/linux/dev_printk.h +include/linux/dma-direction.h +include/linux/dmaengine.h +include/linux/dma-map-ops.h +include/linux/dma-mapping.h +include/linux/dmapool.h +include/linux/dqblk_qtree.h +include/linux/dqblk_v1.h +include/linux/dqblk_v2.h +include/linux/dynamic_queue_limits.h +include/linux/edd.h +include/linux/elfcore.h +include/linux/elf.h +include/linux/elf-randomize.h +include/linux/energy_model.h +include/linux/err.h +include/linux/errname.h +include/linux/errno.h +include/linux/error-injection.h +include/linux/errqueue.h +include/linux/errseq.h +include/linux/etherdevice.h +include/linux/ethtool.h +include/linux/ethtool_netlink.h +include/linux/eventfd.h +include/linux/export.h +include/linux/extcon.h +include/linux/fault-inject.h +include/linux/fault-inject-usercopy.h +include/linux/fcntl.h +include/linux/file.h +include/linux/filter.h +include/linux/find.h +include/linux/firmware.h +include/linux/flex_proportions.h +include/linux/freelist.h +include/linux/freezer.h +include/linux/fs_api.h +include/linux/fs.h +include/linux/fs_types.h +include/linux/ftrace.h +include/linux/ftrace_irq.h +include/linux/fwnode.h +include/linux/gfp.h +include/linux/gfp_types.h +include/linux/gpio/consumer.h +include/linux/hardirq.h +include/linux/hash.h +include/linux/hashtable_api.h +include/linux/hashtable.h +include/linux/highmem.h +include/linux/highmem-internal.h +include/linux/highuid.h +include/linux/hrtimer_api.h +include/linux/hrtimer_defs.h +include/linux/hrtimer.h +include/linux/huge_mm.h +include/linux/hugetlb.h +include/linux/hugetlb_inline.h +include/linux/icmpv6.h +include/linux/idr.h +include/linux/if_arp.h +include/linux/if_ether.h +include/linux/if_link.h +include/linux/if_macvlan.h +include/linux/if_tunnel.h +include/linux/if_vlan.h +include/linux/in6.h +include/linux/indirect_call_wrapper.h +include/linux/inetdevice.h +include/linux/inet.h +include/linux/in.h +include/linux/init.h +include/linux/init_task.h +include/linux/instruction_pointer.h +include/linux/instrumentation.h +include/linux/instrumented.h +include/linux/interrupt.h +include/linux/ioasid.h +include/linux/iocontext.h +include/linux/io.h +include/linux/iopoll.h +include/linux/ioport.h +include/linux/ioprio.h +include/linux/ipc.h +include/linux/ip.h +include/linux/ipv6.h +include/linux/ipv6_route.h +include/linux/irqchip.h +include/linux/irqdesc.h +include/linux/irqdomain.h +include/linux/irqflags.h +include/linux/irq.h +include/linux/irqhandler.h +include/linux/irqnr.h +include/linux/irqreturn.h +include/linux/irq_work.h +include/linux/jhash.h +include/linux/jiffies.h +include/linux/jump_label.h +include/linux/jump_label_ratelimit.h +include/linux/kallsyms.h +include/linux/kasan-checks.h +include/linux/kasan-enabled.h +include/linux/kasan.h +include/linux/kasan-tags.h +include/linux/kconfig.h +include/linux/kcov.h +include/linux/kcsan-checks.h +include/linux/kcsan.h +include/linux/kdebug.h +include/linux/kdev_t.h +include/linux/kernel.h +include/linux/kernel_read_file.h +include/linux/kernel_stat.h +include/linux/kernfs.h +include/linux/kern_levels.h +include/linux/kexec.h +include/linux/key.h +include/linux/kgdb.h +include/linux/klist.h +include/linux/kmemleak.h +include/linux/kmod.h +include/linux/kmsan-checks.h +include/linux/kmsan.h +include/linux/kmsan_types.h +include/linux/kobject_api.h +include/linux/kobject.h +include/linux/kobject_ns.h +include/linux/kprobes.h +include/linux/kref_api.h +include/linux/kref.h +include/linux/kstrtox.h +include/linux/kthread.h +include/linux/ktime_api.h +include/linux/ktime.h +include/linux/kvm_para.h +include/linux/latencytop.h +include/linux/limits.h +include/linux/linkage.h +include/linux/linkmode.h +include/linux/list_bl.h +include/linux/list.h +include/linux/list_lru.h +include/linux/list_nulls.h +include/linux/livepatch.h +include/linux/llist.h +include/linux/local_lock.h +include/linux/local_lock_internal.h +include/linux/lockdep_api.h +include/linux/lockdep.h +include/linux/lockdep_types.h +include/linux/lockref.h +include/linux/log2.h +include/linux/logic_pio.h +include/linux/maple_tree.h +include/linux/math64.h +include/linux/math.h +include/linux/mdio.h +include/linux/memcontrol.h +include/linux/mem_encrypt.h +include/linux/memory_hotplug.h +include/linux/mempolicy.h +include/linux/mempool.h +include/linux/memremap.h +include/linux/migrate_mode.h +include/linux/mii.h +include/linux/mii_timestamper.h +include/linux/minmax.h +include/linux/mman.h +include/linux/mmap_lock.h +include/linux/mmdebug.h +include/linux/mm.h +include/linux/mm_types.h +include/linux/mm_types_task.h +include/linux/mmu_context.h +include/linux/mmzone.h +include/linux/mnt_idmapping.h +include/linux/mod_devicetable.h +include/linux/module.h +include/linux/moduleparam.h +include/linux/mount.h +include/linux/mpls.h +include/linux/mutex_api.h +include/linux/mutex.h +include/linux/netdev_features.h +include/linux/netdevice.h +include/linux/netfilter_defs.h +include/linux/netfilter.h +include/linux/netfilter_ipv4.h +include/linux/netfilter_netdev.h +include/linux/netfilter/nf_conntrack_common.h +include/linux/netfilter/nf_conntrack_dccp.h +include/linux/netfilter/nf_conntrack_proto_gre.h +include/linux/netfilter/nf_conntrack_sctp.h +include/linux/netfilter/nf_conntrack_tcp.h +include/linux/netfilter/x_tables.h +include/linux/net.h +include/linux/netlink.h +include/linux/netpoll.h +include/linux/nfs_fs_i.h +include/linux/nls.h +include/linux/nmi.h +include/linux/node.h +include/linux/nodemask.h +include/linux/nospec.h +include/linux/notifier.h +include/linux/ns_common.h +include/linux/nsproxy.h +include/linux/numa.h +include/linux/nvmem-consumer.h +include/linux/nvmem-provider.h +include/linux/objtool.h +include/linux/of_address.h +include/linux/of_clk.h +include/linux/of_device.h +include/linux/of_fdt.h +include/linux/of_graph.h +include/linux/of.h +include/linux/of_irq.h +include/linux/of_net.h +include/linux/of_platform.h +include/linux/once.h +include/linux/once_lite.h +include/linux/osq_lock.h +include/linux/overflow.h +include/linux/pageblock-flags.h +include/linux/page_counter.h +include/linux/page_ext.h +include/linux/page-flags.h +include/linux/page-flags-layout.h +include/linux/pagemap.h +include/linux/page_ref.h +include/linux/panic.h +include/linux/path.h +include/linux/pci.h +include/linux/pci_ids.h +include/linux/percpu_counter.h +include/linux/percpu-defs.h +include/linux/percpu.h +include/linux/percpu-refcount.h +include/linux/percpu-rwsem.h +include/linux/perf_event.h +include/linux/perf_regs.h +include/linux/personality.h +include/linux/pfn.h +include/linux/phy.h +include/linux/phylink.h +include/linux/phy/phy-dp.h +include/linux/phy/phy.h +include/linux/phy/phy-lvds.h +include/linux/phy/phy-mipi-dphy.h +include/linux/pid.h +include/linux/pid_namespace.h +include/linux/pinctrl/devinfo.h +include/linux/pipe_fs_i.h +include/linux/pkeys.h +include/linux/platform_data/dsa.h +include/linux/platform_device.h +include/linux/plist.h +include/linux/pm.h +include/linux/pm_opp.h +include/linux/pm_qos.h +include/linux/pm_runtime.h +include/linux/pm_wakeup.h +include/linux/poison.h +include/linux/poll.h +include/linux/posix-timers.h +include/linux/pps_kernel.h +include/linux/prandom.h +include/linux/preempt.h +include/linux/prefetch.h +include/linux/printk.h +include/linux/processor.h +include/linux/proc_fs.h +include/linux/profile.h +include/linux/projid.h +include/linux/property.h +include/linux/psi.h +include/linux/psi_types.h +include/linux/ptp_clock_kernel.h +include/linux/ptrace_api.h +include/linux/ptrace.h +include/linux/ptr_ring.h +include/linux/pvclock_gtod.h +include/linux/quota.h +include/linux/radix-tree.h +include/linux/random.h +include/linux/range.h +include/linux/ratelimit.h +include/linux/ratelimit_types.h +include/linux/rbtree_augmented.h +include/linux/rbtree.h +include/linux/rbtree_latch.h +include/linux/rbtree_types.h +include/linux/rculist_bl.h +include/linux/rculist.h +include/linux/rculist_nulls.h +include/linux/rcu_node_tree.h +include/linux/rcupdate.h +include/linux/rcupdate_trace.h +include/linux/rcu_segcblist.h +include/linux/rcu_sync.h +include/linux/rcutree.h +include/linux/rcuwait.h +include/linux/reboot.h +include/linux/refcount.h +include/linux/ref_tracker.h +include/linux/regulator/consumer.h +include/linux/resource_ext.h +include/linux/resource.h +include/linux/restart_block.h +include/linux/rethook.h +include/linux/rhashtable.h +include/linux/rhashtable-types.h +include/linux/ring_buffer.h +include/linux/rmap.h +include/linux/rndis.h +include/linux/rtc.h +include/linux/rtmutex.h +include/linux/rtnetlink.h +include/linux/rv.h +include/linux/rwlock_api_smp.h +include/linux/rwlock.h +include/linux/rwlock_types.h +include/linux/rwsem.h +include/linux/sbitmap.h +include/linux/scatterlist.h +include/linux/sched/affinity.h +include/linux/sched/autogroup.h +include/linux/sched/clock.h +include/linux/sched_clock.h +include/linux/sched/coredump.h +include/linux/sched/cpufreq.h +include/linux/sched/cputime.h +include/linux/sched/deadline.h +include/linux/sched/debug.h +include/linux/sched.h +include/linux/sched/hotplug.h +include/linux/sched/idle.h +include/linux/sched/isolation.h +include/linux/sched/jobctl.h +include/linux/sched/loadavg.h +include/linux/sched/mm.h +include/linux/sched/nohz.h +include/linux/sched/numa_balancing.h +include/linux/sched/prio.h +include/linux/sched/rseq_api.h +include/linux/sched/rt.h +include/linux/sched/sd_flags.h +include/linux/sched/signal.h +include/linux/sched/smt.h +include/linux/sched/stat.h +include/linux/sched/sysctl.h +include/linux/sched/task_flags.h +include/linux/sched/task.h +include/linux/sched/task_stack.h +include/linux/sched/topology.h +include/linux/sched/types.h +include/linux/sched/user.h +include/linux/sched/wake_q.h +include/linux/screen_info.h +include/linux/sctp.h +include/linux/seccomp.h +include/linux/securebits.h +include/linux/security.h +include/linux/semaphore.h +include/linux/sem.h +include/linux/seq_buf.h +include/linux/seq_file.h +include/linux/seq_file_net.h +include/linux/seqlock.h +include/linux/set_memory.h +include/linux/shm.h +include/linux/shrinker.h +include/linux/signal.h +include/linux/signal_types.h +include/linux/siphash.h +include/linux/sizes.h +include/linux/skb_array.h +include/linux/skbuff.h +include/linux/slab.h +include/linux/smpboot.h +include/linux/smp.h +include/linux/smp_types.h +include/linux/socket.h +include/linux/sockptr.h +include/linux/softirq.h +include/linux/spinlock_api.h +include/linux/spinlock_api_smp.h +include/linux/spinlock.h +include/linux/spinlock_types.h +include/linux/spinlock_types_raw.h +include/linux/splice.h +include/linux/srcu.h +include/linux/srcutree.h +include/linux/stackdepot.h +include/linux/stacktrace.h +include/linux/stat.h +include/linux/static_call.h +include/linux/static_call_types.h +include/linux/static_key.h +include/linux/stdarg.h +include/linux/stddef.h +include/linux/stop_machine.h +include/linux/string.h +include/linux/stringhash.h +include/linux/string_helpers.h +include/linux/stringify.h +include/linux/suspend.h +include/linux/swab.h +include/linux/swait_api.h +include/linux/swait.h +include/linux/swap.h +include/linux/swapops.h +include/linux/swiotlb.h +include/linux/sync_core.h +include/linux/syscalls_api.h +include/linux/syscalls.h +include/linux/syscall_user_dispatch.h +include/linux/syscore_ops.h +include/linux/sysctl.h +include/linux/sysfs.h +include/linux/task_io_accounting.h +include/linux/tcp.h +include/linux/textsearch.h +include/linux/thread_info.h +include/linux/threads.h +include/linux/tick.h +include/linux/time32.h +include/linux/time64.h +include/linux/timecounter.h +include/linux/time.h +include/linux/timekeeper_internal.h +include/linux/timekeeping.h +include/linux/timer.h +include/linux/timerqueue.h +include/linux/timex.h +include/linux/topology.h +include/linux/trace_clock.h +include/linux/trace_events.h +include/linux/tracepoint-defs.h +include/linux/tracepoint.h +include/linux/trace_recursion.h +include/linux/trace_seq.h +include/linux/typecheck.h +include/linux/types.h +include/linux/u64_stats_sync_api.h +include/linux/u64_stats_sync.h +include/linux/uaccess.h +include/linux/udp.h +include/linux/uidgid.h +include/linux/uio.h +include/linux/umh.h +include/linux/unaligned/packed_struct.h +include/linux/uprobes.h +include/linux/usb/cdc.h +include/linux/usb/ch9.h +include/linux/usbdevice_fs.h +include/linux/usb.h +include/linux/usb/cdc_ncm.h +include/linux/usb/cdc-wdm.h +include/linux/usb/hcd.h +include/linux/usb/of.h +include/linux/usb/onboard_hub.h +include/linux/usb/otg.h +include/linux/usb/phy.h +include/linux/usb/quirks.h +include/linux/usb/rndis_host.h +include/linux/usb/usbnet.h +include/linux/userfaultfd_k.h +include/linux/user.h +include/linux/user_namespace.h +include/linux/utsname.h +include/linux/uuid.h +include/linux/verification.h +include/linux/vmalloc.h +include/linux/vm_event_item.h +include/linux/vmpressure.h +include/linux/vmstat.h +include/linux/vtime.h +include/linux/wait_api.h +include/linux/wait_bit.h +include/linux/wait.h +include/linux/win_minmax.h +include/linux/wireless.h +include/linux/workqueue_api.h +include/linux/workqueue.h +include/linux/writeback.h +include/linux/ww_mutex.h +include/linux/wwan.h +include/linux/xarray.h +include/net/act_api.h +include/net/addrconf.h +include/net/arp.h +include/net/busy_poll.h +include/net/checksum.h +include/net/devlink.h +include/net/dropreason.h +include/net/dsa.h +include/net/dsfield.h +include/net/dst_cache.h +include/net/dst.h +include/net/dst_metadata.h +include/net/dst_ops.h +include/net/fib_notifier.h +include/net/fib_rules.h +include/net/flow_dissector.h +include/net/flow.h +include/net/flow_offload.h +include/net/gen_stats.h +include/net/gre.h +include/net/gro_cells.h +include/net/gro.h +include/net/if_inet6.h +include/net/inet_connection_sock.h +include/net/inet_dscp.h +include/net/inet_ecn.h +include/net/inet_frag.h +include/net/inet_hashtables.h +include/net/inetpeer.h +include/net/inet_sock.h +include/net/inet_timewait_sock.h +include/net/ip6_checksum.h +include/net/ip6_fib.h +include/net/ip6_route.h +include/net/ip_fib.h +include/net/ip.h +include/net/ip_tunnels.h +include/net/ipv6.h +include/net/ipv6_stubs.h +include/net/iw_handler.h +include/net/l3mdev.h +include/net/lwtunnel.h +include/net/macsec.h +include/net/mctp.h +include/net/mpls.h +include/net/mptcp.h +include/net/ndisc.h +include/net/neighbour.h +include/net/net_debug.h +include/net/netfilter/ipv4/nf_conntrack_ipv4.h +include/net/netfilter/ipv6/nf_conntrack_ipv6.h +include/net/netfilter/nf_conntrack.h +include/net/netfilter/nf_conntrack_tuple.h +include/net/netlink.h +include/net/net_namespace.h +include/net/netns/bpf.h +include/net/netns/can.h +include/net/netns/core.h +include/net/netns/generic.h +include/net/netns/hash.h +include/net/netns/ieee802154_6lowpan.h +include/net/netns/ipv4.h +include/net/netns/ipv6.h +include/net/netns/mctp.h +include/net/netns/mib.h +include/net/netns/mpls.h +include/net/netns/netfilter.h +include/net/netns/nexthop.h +include/net/netns/nftables.h +include/net/netns/packet.h +include/net/netns/sctp.h +include/net/netns/smc.h +include/net/netns/unix.h +include/net/netns/xdp.h +include/net/netns/xfrm.h +include/net/netprio_cgroup.h +include/net/net_trackers.h +include/net/nexthop.h +include/net/page_pool.h +include/net/pkt_cls.h +include/net/pkt_sched.h +include/net/pptp.h +include/net/protocol.h +include/net/request_sock.h +include/net/route.h +include/net/rtnetlink.h +include/net/sch_generic.h +include/net/scm.h +include/net/selftests.h +include/net/snmp.h +include/net/sock.h +include/net/sock_reuseport.h +include/net/switchdev.h +include/net/tcp.h +include/net/tcp_states.h +include/net/timewait_sock.h +include/net/udp.h +include/net/udp_tunnel.h +include/net/xdp.h +include/net/xdp_priv.h +include/net/xdp_sock_drv.h +include/net/xdp_sock.h +include/net/xfrm.h +include/net/xsk_buff_pool.h +include/trace/define_trace.h +include/trace/events/irq.h +include/trace/events/lock.h +include/trace/events/napi.h +include/trace/events/net.h +include/trace/events/power.h +include/trace/events/qdisc.h +include/trace/events/sched.h +include/trace/events/skb.h +include/trace/events/timer.h +include/trace/events/tlb.h +include/trace/events/workqueue.h +include/trace/events/xdp.h +include/trace/syscall.h +include/uapi/asm-generic/bitsperlong.h +include/uapi/asm-generic/bpf_perf_event.h +include/uapi/asm-generic/errno-base.h +include/uapi/asm-generic/errno.h +include/uapi/asm-generic/fcntl.h +include/uapi/asm-generic/hugetlb_encode.h +include/uapi/asm-generic/int-ll64.h +include/uapi/asm-generic/ioctl.h +include/uapi/asm-generic/ipcbuf.h +include/uapi/asm-generic/kvm_para.h +include/uapi/asm-generic/mman-common.h +include/uapi/asm-generic/mman.h +include/uapi/asm-generic/param.h +include/uapi/asm-generic/poll.h +include/uapi/asm-generic/posix_types.h +include/uapi/asm-generic/resource.h +include/uapi/asm-generic/sembuf.h +include/uapi/asm-generic/shmbuf.h +include/uapi/asm-generic/siginfo.h +include/uapi/asm-generic/signal-defs.h +include/uapi/asm-generic/signal.h +include/uapi/asm-generic/socket.h +include/uapi/asm-generic/sockios.h +include/uapi/asm-generic/stat.h +include/uapi/asm-generic/swab.h +include/uapi/asm-generic/types.h +include/uapi/asm-generic/unistd.h +include/uapi/linux/aio_abi.h +include/uapi/linux/apm_bios.h +include/uapi/linux/audit.h +include/uapi/linux/auxvec.h +include/uapi/linux/binfmts.h +include/uapi/linux/blkzoned.h +include/uapi/linux/bpf_common.h +include/uapi/linux/bpf.h +include/uapi/linux/bpf_perf_event.h +include/uapi/linux/btf.h +include/uapi/linux/byteorder/little_endian.h +include/uapi/linux/capability.h +include/uapi/linux/cgroupstats.h +include/uapi/linux/const.h +include/uapi/linux/devlink.h +include/uapi/linux/dqblk_xfs.h +include/uapi/linux/edd.h +include/uapi/linux/elf-em.h +include/uapi/linux/elf.h +include/uapi/linux/errno.h +include/uapi/linux/errqueue.h +include/uapi/linux/ethtool.h +include/uapi/linux/ethtool_netlink.h +include/uapi/linux/eventpoll.h +include/uapi/linux/fcntl.h +include/uapi/linux/fib_rules.h +include/uapi/linux/filter.h +include/uapi/linux/fs.h +include/uapi/linux/gen_stats.h +include/uapi/linux/hdlc/ioctl.h +include/uapi/linux/icmpv6.h +include/uapi/linux/if_addr.h +include/uapi/linux/if_arp.h +include/uapi/linux/if_bonding.h +include/uapi/linux/if_ether.h +include/uapi/linux/if.h +include/uapi/linux/if_link.h +include/uapi/linux/if_macsec.h +include/uapi/linux/if_packet.h +include/uapi/linux/if_tunnel.h +include/uapi/linux/if_vlan.h +include/uapi/linux/if_xdp.h +include/uapi/linux/in6.h +include/uapi/linux/in.h +include/uapi/linux/in_route.h +include/uapi/linux/ioctl.h +include/uapi/linux/ioprio.h +include/uapi/linux/ipc.h +include/uapi/linux/ip.h +include/uapi/linux/ipsec.h +include/uapi/linux/ipv6.h +include/uapi/linux/ipv6_route.h +include/uapi/linux/irqnr.h +include/uapi/linux/kcov.h +include/uapi/linux/kdev_t.h +include/uapi/linux/kernel.h +include/uapi/linux/kexec.h +include/uapi/linux/kvm_para.h +include/uapi/linux/libc-compat.h +include/uapi/linux/limits.h +include/uapi/linux/lwtunnel.h +include/uapi/linux/magic.h +include/uapi/linux/mctp.h +include/uapi/linux/mdio.h +include/uapi/linux/membarrier.h +include/uapi/linux/mempolicy.h +include/uapi/linux/mii.h +include/uapi/linux/mman.h +include/uapi/linux/mpls.h +include/uapi/linux/neighbour.h +include/uapi/linux/netdevice.h +include/uapi/linux/netfilter.h +include/uapi/linux/netfilter_ipv4.h +include/uapi/linux/netfilter/nf_conntrack_common.h +include/uapi/linux/netfilter/nf_conntrack_sctp.h +include/uapi/linux/netfilter/nf_conntrack_tcp.h +include/uapi/linux/netfilter/nf_conntrack_tuple_common.h +include/uapi/linux/netfilter/nf_tables.h +include/uapi/linux/netfilter/x_tables.h +include/uapi/linux/net.h +include/uapi/linux/netlink.h +include/uapi/linux/net_namespace.h +include/uapi/linux/net_tstamp.h +include/uapi/linux/openat2.h +include/uapi/linux/param.h +include/uapi/linux/pci.h +include/uapi/linux/pci_regs.h +include/uapi/linux/perf_event.h +include/uapi/linux/personality.h +include/uapi/linux/pfkeyv2.h +include/uapi/linux/pkt_cls.h +include/uapi/linux/pkt_sched.h +include/uapi/linux/poll.h +include/uapi/linux/posix_types.h +include/uapi/linux/pps.h +include/uapi/linux/prctl.h +include/uapi/linux/ptp_clock.h +include/uapi/linux/ptrace.h +include/uapi/linux/quota.h +include/uapi/linux/random.h +include/uapi/linux/reboot.h +include/uapi/linux/resource.h +include/uapi/linux/route.h +include/uapi/linux/rseq.h +include/uapi/linux/rtc.h +include/uapi/linux/rtnetlink.h +include/uapi/linux/sched.h +include/uapi/linux/sched/types.h +include/uapi/linux/screen_info.h +include/uapi/linux/sctp.h +include/uapi/linux/seccomp.h +include/uapi/linux/securebits.h +include/uapi/linux/sem.h +include/uapi/linux/shm.h +include/uapi/linux/signal.h +include/uapi/linux/snmp.h +include/uapi/linux/socket.h +include/uapi/linux/sockios.h +include/uapi/linux/stat.h +include/uapi/linux/stddef.h +include/uapi/linux/string.h +include/uapi/linux/swab.h +include/uapi/linux/sysctl.h +include/uapi/linux/sysinfo.h +include/uapi/linux/taskstats.h +include/uapi/linux/tcp.h +include/uapi/linux/time.h +include/uapi/linux/time_types.h +include/uapi/linux/timex.h +include/uapi/linux/types.h +include/uapi/linux/udp.h +include/uapi/linux/uio.h +include/uapi/linux/unistd.h +include/uapi/linux/usb/audio.h +include/uapi/linux/usb/cdc.h +include/uapi/linux/usb/ch11.h +include/uapi/linux/usb/ch9.h +include/uapi/linux/usb/charger.h +include/uapi/linux/usbdevice_fs.h +include/uapi/linux/utsname.h +include/uapi/linux/uuid.h +include/uapi/linux/vmcore.h +include/uapi/linux/wait.h +include/uapi/linux/wireless.h +include/uapi/linux/xfrm.h +include/uapi/linux/usb/cdc-wdm.h +include/uapi/video/edid.h +include/vdso/bits.h +include/vdso/clocksource.h +include/vdso/const.h +include/vdso/jiffies.h +include/vdso/ktime.h +include/vdso/limits.h +include/vdso/math64.h +include/vdso/processor.h +include/vdso/time32.h +include/vdso/time64.h +include/vdso/time.h +include/video/edid.h +kernel/irq/debug.h +kernel/irq/internals.h +kernel/irq/settings.h +kernel/locking/lock_events.h +kernel/locking/lock_events_list.h +kernel/locking/mutex.h +kernel/locking/ww_mutex.h +kernel/sched/autogroup.h +kernel/sched/clock.c +kernel/sched/completion.c +kernel/sched/cpudeadline.h +kernel/sched/cpupri.c +kernel/sched/cpupri.h +kernel/sched/features.h +kernel/sched/isolation.c +kernel/sched/loadavg.c +kernel/sched/sched.h +kernel/sched/sched-pelt.h +kernel/sched/stats.h +kernel/sched/stop_task.c +kernel/sched/swait.c +kernel/sched/topology.c +kernel/sched/wait_bit.c +kernel/sched/wait.c +kernel/smpboot.h +kernel/time/ntp_internal.h +kernel/time/tick-internal.h +kernel/time/tick-sched.h +kernel/time/timekeeping.h +kernel/time/timekeeping_internal.h +kernel/workqueue_internal.h +lib/crc32defs.h +lib/kstrtox.h +mm/internal.h +mm/slab.h +mm/swap.h +net/core/dev.h +net/core/net-sysfs.h +net/core/sock_destructor.h +net/ethtool/common.h diff --git a/repos/dde_linux/src/drivers/usb_net/dummies.c b/repos/dde_linux/src/drivers/usb_net/dummies.c new file mode 100644 index 0000000000..66002bca60 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/dummies.c @@ -0,0 +1,418 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Sebastian Sumpf + * \date 2023-07-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include + + +DEFINE_STATIC_KEY_FALSE(force_irqthreads_key); +DEFINE_STATIC_KEY_FALSE(bpf_stats_enabled_key); +DEFINE_STATIC_KEY_FALSE(bpf_master_redirect_enabled_key); +DEFINE_STATIC_KEY_FALSE(memalloc_socks_key); + +unsigned long __FIXADDR_TOP = 0xfffff000; + +bool arm64_use_ng_mappings = false; + +const struct ipv6_stub *ipv6_stub; + + +#ifdef __i386__ +asmlinkage __wsum csum_partial(const void * buff,int len,__wsum sum) +#else +__wsum csum_partial(const void * buff,int len,__wsum sum) +#endif +{ + lx_emul_trace_and_stop(__func__); +} + + +#ifdef __arm__ +#include + +unsigned long arm_copy_to_user(void *to, const void *from, unsigned long n) +{ + lx_emul_trace_and_stop(__func__); +} + +asmlinkage void __div0(void); +asmlinkage void __div0(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void arch_teardown_dma_ops(struct device * dev) +{ + lx_emul_trace(__func__); +} + + +extern void arm_heavy_mb(void); +void arm_heavy_mb(void) +{ + // FIXME: on Cortex A9 we potentially need to flush L2-cache + lx_emul_trace(__func__); +} + +#else + +#include +void update_vsyscall(struct timekeeper * tk) +{ + lx_emul_trace(__func__); +} + +#endif + + + +#include +#include /* for DEFINE_STATIC_KEY_FALSE */ + +void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog) +{ + lx_emul_trace(__func__); +} + + +#include + +void synchronize_rcu_expedited(void) +{ + lx_emul_trace(__func__); +} + + +#include + +void synchronize_rcu(void) +{ + lx_emul_trace(__func__); +} + + +#include + +void __init net_ns_init(void) +{ + lx_emul_trace(__func__); +} + + +#include + +int kobject_uevent(struct kobject * kobj,enum kobject_action action) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +void __init usb_init_pool_max(void) +{ + lx_emul_trace(__func__); +} + + +extern int usb_major_init(void); +int usb_major_init(void) +{ + lx_emul_trace(__func__); + return 0; +} + + +extern int __init usb_devio_init(void); +int __init usb_devio_init(void) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +void usb_hcd_synchronize_unlinks(struct usb_device * udev) +{ + lx_emul_trace(__func__); +} + + +#include + +struct urb * usb_get_from_anchor(struct usb_anchor * anchor) +{ + lx_emul_trace(__func__); + return NULL; +} + + +extern char * usb_cache_string(struct usb_device * udev,int index); +char * usb_cache_string(struct usb_device * udev,int index) +{ + lx_emul_trace(__func__); + return NULL; +} + + +void usb_kill_urb(struct urb * urb) +{ + lx_emul_trace(__func__); +} + + +int usb_unlink_urb(struct urb * urb) +{ + lx_emul_trace(__func__); + return 0; +} + + +void usb_poison_urb(struct urb * urb) +{ + lx_emul_trace(__func__); +} + + +#include + +struct usb_hcd * usb_get_hcd(struct usb_hcd * hcd) +{ + lx_emul_trace(__func__); + return hcd; +} + + +#include + +void usb_put_hcd(struct usb_hcd * hcd) +{ + lx_emul_trace(__func__); +} + + +extern int __init netdev_kobject_init(void); +int __init netdev_kobject_init(void) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +void dev_add_offload(struct packet_offload * po) +{ + lx_emul_trace(__func__); +} + + +#include + +void register_syscore_ops(struct syscore_ops * ops) +{ + lx_emul_trace(__func__); +} + + +#include + +bool parse_option_str(const char * str,const char * option) +{ + lx_emul_trace(__func__); + return false; +} + + +#include + +int rtnl_lock_killable(void) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +void rtnl_lock(void) +{ + lx_emul_trace(__func__); +} + + +#include + +int rtnl_is_locked(void) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +struct sk_buff * rtmsg_ifinfo_build_skb(int type,struct net_device * dev,unsigned int change,u32 event,gfp_t flags,int * new_nsid,int new_ifindex) +{ + lx_emul_trace(__func__); + return NULL; +} + + +#include + +unsigned int full_name_hash(const void * salt,const char * name,unsigned int len) +{ + lx_emul_trace(__func__); + return 0; +} + + +#include + +void add_device_randomness(const void * buf,size_t len) +{ + lx_emul_trace(__func__); +} + + +#include + +void rtnl_unlock(void) +{ + lx_emul_trace(__func__); +} + + +#include + +void gnet_stats_basic_sync_init(struct gnet_stats_basic_sync * b) +{ + lx_emul_trace(__func__); +} + + +#include + +void gen_kill_estimator(struct net_rate_estimator __rcu ** rate_est) +{ + lx_emul_trace(__func__); +} + + +#include + +void do_softirq_own_stack(void) +{ + lx_emul_trace(__func__); +} + + +#include +#if defined(CONFIG_OF) && defined(CONFIG_NET) +int of_get_mac_address(struct device_node * np,u8 * addr) +{ + lx_emul_trace(__func__); + return -1; +} +#endif + + +extern void software_node_notify(struct device * dev); +void software_node_notify(struct device * dev) +{ + lx_emul_trace(__func__); +} + + +extern void software_node_notify_remove(struct device * dev); +void software_node_notify_remove(struct device * dev) +{ + lx_emul_trace(__func__); +} + + +extern int usb_create_sysfs_dev_files(struct usb_device * udev); +int usb_create_sysfs_dev_files(struct usb_device * udev) +{ + lx_emul_trace(__func__); + return 0; +} + + +extern void usb_remove_sysfs_dev_files(struct usb_device * udev); +void usb_remove_sysfs_dev_files(struct usb_device * udev) +{ + lx_emul_trace(__func__); +} + + +extern void usb_remove_sysfs_intf_files(struct usb_interface * intf); +void usb_remove_sysfs_intf_files(struct usb_interface * intf) +{ + lx_emul_trace(__func__); +} + + +extern void usb_create_sysfs_intf_files(struct usb_interface * intf); +void usb_create_sysfs_intf_files(struct usb_interface * intf) +{ + lx_emul_trace(__func__); +} + + +extern void usb_notify_add_device(struct usb_device * udev); +void usb_notify_add_device(struct usb_device * udev) +{ + lx_emul_trace(__func__); +} + + +extern void usb_notify_remove_device(struct usb_device * udev); +void usb_notify_remove_device(struct usb_device * udev) +{ + lx_emul_trace(__func__); +} + + +extern int usb_create_ep_devs(struct device * parent,struct usb_host_endpoint * endpoint,struct usb_device * udev); +int usb_create_ep_devs(struct device * parent,struct usb_host_endpoint * endpoint,struct usb_device * udev) +{ + lx_emul_trace(__func__); + return 0; +} + + +extern void usb_remove_ep_devs(struct usb_host_endpoint * endpoint); +void usb_remove_ep_devs(struct usb_host_endpoint * endpoint) +{ + lx_emul_trace(__func__); +} + + +extern void usb_disable_interface(struct usb_device * dev,struct usb_interface * intf,bool reset_hardware); +void usb_disable_interface(struct usb_device * dev,struct usb_interface * intf,bool reset_hardware) +{ + lx_emul_trace(__func__); +} + + +extern void netdev_unregister_kobject(struct net_device * ndev); +void netdev_unregister_kobject(struct net_device * ndev) +{ + lx_emul_trace(__func__); +} diff --git a/repos/dde_linux/src/drivers/usb_net/lx_emul.c b/repos/dde_linux/src/drivers/usb_net/lx_emul.c new file mode 100644 index 0000000000..9e0e35adad --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/lx_emul.c @@ -0,0 +1,513 @@ +/* + * \brief Implementation of driver specific Linux functions + * \author Sebastian Sumpf + * \date 2023-06-29 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include + + +pteval_t __default_kernel_pte_mask __read_mostly = ~0; + + +struct device_type usb_if_device_type = { + .name = "usb_interface" +}; + + +struct usb_driver usbfs_driver = { + .name = "usbfs" +}; + +const struct attribute_group *usb_device_groups[] = { }; + + +#include + +struct kmem_cache * kmem_cache_create_usercopy(const char * name, + unsigned int size, + unsigned int align, + slab_flags_t flags, + unsigned int useroffset, + unsigned int usersize, + void (* ctor)(void *)) +{ + return kmem_cache_create(name, size, align, flags, ctor); +} + + +#include + +struct net init_net; + + +#include + +int register_pernet_subsys(struct pernet_operations *ops) +{ + if (ops->init) + ops->init(&init_net); + + return 0; +} + + +int register_pernet_device(struct pernet_operations *ops) +{ + return register_pernet_subsys(ops); +} + + +#include + +/* + * taken from src/lib/wifi/lx_emul.c + */ +void kvfree_call_rcu(struct rcu_head * head, rcu_callback_t func) +{ + void *ptr = (void *) head - (unsigned long) func; + kvfree(ptr); +} + + +#include + +unsigned long get_zeroed_page(gfp_t gfp_mask) +{ + return (unsigned long)kzalloc(PAGE_SIZE, GFP_KERNEL); +} + + +void free_pages(unsigned long addr,unsigned int order) +{ + kfree((void *)addr); +} + + +#include + +void * page_frag_alloc_align(struct page_frag_cache * nc, unsigned int fragsz, + gfp_t gfp_mask, unsigned int align_mask) +{ + if (align_mask != ~0U) { + printk("page_frag_alloc_align: unsupported align_mask=%x\n", align_mask); + lx_emul_trace_and_stop(__func__); + } + return lx_emul_mem_alloc_aligned(fragsz, ARCH_KMALLOC_MINALIGN); +} + + +void page_frag_free(void * addr) +{ + lx_emul_mem_free(addr); +} + +#include + +#ifndef INLINE_COPY_TO_USER +unsigned long _copy_from_user(void * to,const void __user * from,unsigned long n) +{ + memcpy(to, from, n); + return 0; +} +#else +unsigned long __must_check __arch_copy_from_user(void *to, const void __user *from, unsigned long n); +unsigned long __must_check __arch_copy_from_user(void *to, const void __user *from, unsigned long n) +{ + memcpy(to, from, n); + return 0; +} + + +#endif + + +#ifndef INLINE_COPY_FROM_USER +unsigned long _copy_to_user(void __user * to,const void * from,unsigned long n) +{ + memcpy(to, from, n); + return 0; +} +#else +unsigned long __must_check __arch_copy_to_user(void __user *to, const void *from, unsigned long n); +unsigned long __must_check __arch_copy_to_user(void __user *to, const void *from, unsigned long n) +{ + memcpy(to, from, n); + return 0; +} +#endif + + +unsigned long arm_copy_from_user(void *to, const void *from, unsigned long n) +{ + memcpy(to, from, n); + return 0; +} + + + +/* + * custom MAC address + */ + +bool use_mac_address; +unsigned char mac_address[6]; + +int netdev_register_kobject(struct net_device * ndev) +{ + if (use_mac_address) eth_hw_addr_set(ndev, mac_address); + return 0; +} + + +/* + * core/message.c + */ +#include +#include +#include +#include + +int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr, + struct usb_interface *intf, + u8 *buffer, + int buflen) +{ + /* duplicates are ignored */ + struct usb_cdc_union_desc *union_header = NULL; + + /* duplicates are not tolerated */ + struct usb_cdc_header_desc *header = NULL; + struct usb_cdc_ether_desc *ether = NULL; + struct usb_cdc_mdlm_detail_desc *detail = NULL; + struct usb_cdc_mdlm_desc *desc = NULL; + + unsigned int elength; + int cnt = 0; + + memset(hdr, 0x00, sizeof(struct usb_cdc_parsed_header)); + hdr->phonet_magic_present = false; + while (buflen > 0) { + elength = buffer[0]; + if (!elength) { + dev_err(&intf->dev, "skipping garbage byte\n"); + elength = 1; + goto next_desc; + } + if ((buflen < elength) || (elength < 3)) { + dev_err(&intf->dev, "invalid descriptor buffer length\n"); + break; + } + if (buffer[1] != USB_DT_CS_INTERFACE) { + dev_err(&intf->dev, "skipping garbage\n"); + goto next_desc; + } + + switch (buffer[2]) { + case USB_CDC_UNION_TYPE: /* we've found it */ + if (elength < sizeof(struct usb_cdc_union_desc)) + goto next_desc; + if (union_header) { + dev_err(&intf->dev, "More than one union descriptor, skipping ...\n"); + goto next_desc; + } + union_header = (struct usb_cdc_union_desc *)buffer; + break; + case USB_CDC_COUNTRY_TYPE: + if (elength < sizeof(struct usb_cdc_country_functional_desc)) + goto next_desc; + hdr->usb_cdc_country_functional_desc = + (struct usb_cdc_country_functional_desc *)buffer; + break; + case USB_CDC_HEADER_TYPE: + if (elength != sizeof(struct usb_cdc_header_desc)) + goto next_desc; + if (header) + return -EINVAL; + header = (struct usb_cdc_header_desc *)buffer; + break; + case USB_CDC_ACM_TYPE: + if (elength < sizeof(struct usb_cdc_acm_descriptor)) + goto next_desc; + hdr->usb_cdc_acm_descriptor = + (struct usb_cdc_acm_descriptor *)buffer; + break; + case USB_CDC_ETHERNET_TYPE: + if (elength != sizeof(struct usb_cdc_ether_desc)) + goto next_desc; + if (ether) + return -EINVAL; + ether = (struct usb_cdc_ether_desc *)buffer; + break; + case USB_CDC_CALL_MANAGEMENT_TYPE: + if (elength < sizeof(struct usb_cdc_call_mgmt_descriptor)) + goto next_desc; + hdr->usb_cdc_call_mgmt_descriptor = + (struct usb_cdc_call_mgmt_descriptor *)buffer; + break; + case USB_CDC_DMM_TYPE: + if (elength < sizeof(struct usb_cdc_dmm_desc)) + goto next_desc; + hdr->usb_cdc_dmm_desc = + (struct usb_cdc_dmm_desc *)buffer; + break; + case USB_CDC_MDLM_TYPE: + if (elength < sizeof(struct usb_cdc_mdlm_desc)) + goto next_desc; + if (desc) + return -EINVAL; + desc = (struct usb_cdc_mdlm_desc *)buffer; + break; + case USB_CDC_MDLM_DETAIL_TYPE: + if (elength < sizeof(struct usb_cdc_mdlm_detail_desc)) + goto next_desc; + if (detail) + return -EINVAL; + detail = (struct usb_cdc_mdlm_detail_desc *)buffer; + break; + case USB_CDC_NCM_TYPE: + if (elength < sizeof(struct usb_cdc_ncm_desc)) + goto next_desc; + hdr->usb_cdc_ncm_desc = (struct usb_cdc_ncm_desc *)buffer; + break; + case USB_CDC_MBIM_TYPE: + if (elength < sizeof(struct usb_cdc_mbim_desc)) + goto next_desc; + + hdr->usb_cdc_mbim_desc = (struct usb_cdc_mbim_desc *)buffer; + break; + case USB_CDC_MBIM_EXTENDED_TYPE: + if (elength < sizeof(struct usb_cdc_mbim_extended_desc)) + break; + hdr->usb_cdc_mbim_extended_desc = + (struct usb_cdc_mbim_extended_desc *)buffer; + break; + case CDC_PHONET_MAGIC_NUMBER: + hdr->phonet_magic_present = true; + break; + default: + /* + * there are LOTS more CDC descriptors that + * could legitimately be found here. + */ + dev_dbg(&intf->dev, "Ignoring descriptor: type %02x, length %ud\n", + buffer[2], elength); + goto next_desc; + } + cnt++; +next_desc: + buflen -= elength; + buffer += elength; + } + hdr->usb_cdc_union_desc = union_header; + hdr->usb_cdc_header_desc = header; + hdr->usb_cdc_mdlm_detail_desc = detail; + hdr->usb_cdc_mdlm_desc = desc; + hdr->usb_cdc_ether_desc = ether; + return cnt; +} + + +/** + * usb_get_string - gets a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @langid: code for language chosen (from string descriptor zero) + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * + * Context: task context, might sleep. + * + * Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character, + * in little-endian byte order). + * The usb_string() function will often be a convenient way to turn + * these strings into kernel-printable form. + * + * Strings may be referenced in device, configuration, interface, or other + * descriptors, and could also be used in vendor-specific ways. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Return: The number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +static int usb_get_string(struct usb_device *dev, unsigned short langid, + unsigned char index, void *buf, int size) +{ + int i; + int result; + + if (size <= 0) /* No point in asking for no data */ + return -EINVAL; + + for (i = 0; i < 3; ++i) { + /* retry on length 0 or stall; some devices are flakey */ + result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + (USB_DT_STRING << 8) + index, langid, buf, size, + USB_CTRL_GET_TIMEOUT); + if (result == 0 || result == -EPIPE) + continue; + if (result > 1 && ((u8 *) buf)[1] != USB_DT_STRING) { + result = -ENODATA; + continue; + } + break; + } + return result; +} + +static void usb_try_string_workarounds(unsigned char *buf, int *length) +{ + int newlength, oldlength = *length; + + for (newlength = 2; newlength + 1 < oldlength; newlength += 2) + if (!isprint(buf[newlength]) || buf[newlength + 1]) + break; + + if (newlength > 2) { + buf[0] = newlength; + *length = newlength; + } +} + +static int usb_string_sub(struct usb_device *dev, unsigned int langid, + unsigned int index, unsigned char *buf) +{ + int rc; + + /* Try to read the string descriptor by asking for the maximum + * possible number of bytes */ + if (dev->quirks & USB_QUIRK_STRING_FETCH_255) + rc = -EIO; + else + rc = usb_get_string(dev, langid, index, buf, 255); + + /* If that failed try to read the descriptor length, then + * ask for just that many bytes */ + if (rc < 2) { + rc = usb_get_string(dev, langid, index, buf, 2); + if (rc == 2) + rc = usb_get_string(dev, langid, index, buf, buf[0]); + } + + if (rc >= 2) { + if (!buf[0] && !buf[1]) + usb_try_string_workarounds(buf, &rc); + + /* There might be extra junk at the end of the descriptor */ + if (buf[0] < rc) + rc = buf[0]; + + rc = rc - (rc & 1); /* force a multiple of two */ + } + + if (rc < 2) + rc = (rc < 0 ? rc : -EINVAL); + + return rc; +} + +static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf) +{ + int err; + + if (dev->have_langid) + return 0; + + if (dev->string_langid < 0) + return -EPIPE; + + err = usb_string_sub(dev, 0, 0, tbuf); + + /* If the string was reported but is malformed, default to english + * (0x0409) */ + if (err == -ENODATA || (err > 0 && err < 4)) { + dev->string_langid = 0x0409; + dev->have_langid = 1; + dev_err(&dev->dev, + "language id specifier not provided by device, defaulting to English\n"); + return 0; + } + + /* In case of all other errors, we assume the device is not able to + * deal with strings at all. Set string_langid to -1 in order to + * prevent any string to be retrieved from the device */ + if (err < 0) { + dev_info(&dev->dev, "string descriptor 0 read error: %d\n", + err); + dev->string_langid = -1; + return -EPIPE; + } + + /* always use the first langid listed */ + dev->string_langid = tbuf[2] | (tbuf[3] << 8); + dev->have_langid = 1; + dev_dbg(&dev->dev, "default language 0x%04x\n", + dev->string_langid); + return 0; +} + +/** + * usb_string - returns UTF-8 version of a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * + * Context: task context, might sleep. + * + * This converts the UTF-16LE encoded strings returned by devices, from + * usb_get_string_descriptor(), to null-terminated UTF-8 encoded ones + * that are more usable in most kernel contexts. Note that this function + * chooses strings in the first language supported by the device. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Return: length of the string (>= 0) or usb_control_msg status (< 0). + */ +int usb_string(struct usb_device *dev, int index, char *buf, size_t size) +{ + unsigned char *tbuf; + int err; + + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; + if (size <= 0 || !buf) + return -EINVAL; + buf[0] = 0; + if (index <= 0 || index >= 256) + return -EINVAL; + tbuf = kmalloc(256, GFP_NOIO); + if (!tbuf) + return -ENOMEM; + + err = usb_get_langid(dev, tbuf); + if (err < 0) + goto errout; + + err = usb_string_sub(dev, dev->string_langid, index, tbuf); + if (err < 0) + goto errout; + + size--; /* leave room for trailing NULL char in output buffer */ + err = utf16s_to_utf8s((wchar_t *) &tbuf[2], (err - 2) / 2, + UTF16_LITTLE_ENDIAN, buf, size); + buf[err] = 0; + + if (tbuf[1] != USB_DT_STRING) + dev_dbg(&dev->dev, + "wrong descriptor type %02x for string %d (\"%s\")\n", + tbuf[1], index, buf); + + errout: + kfree(tbuf); + return err; +} diff --git a/repos/dde_linux/src/drivers/usb_net/lx_emul.h b/repos/dde_linux/src/drivers/usb_net/lx_emul.h new file mode 100644 index 0000000000..dbce00db49 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/lx_emul.h @@ -0,0 +1,19 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Sebastian Sumpf + * \date 2023-07-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include +#include +#include +#include + +struct usb_hub; diff --git a/repos/dde_linux/src/drivers/usb_net/lx_user.c b/repos/dde_linux/src/drivers/usb_net/lx_user.c new file mode 100644 index 0000000000..c95ed3c1c5 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/lx_user.c @@ -0,0 +1,353 @@ +/* + * \brief Post kernel activity + * \author Christian Helmuth + * \author Sebastian Sumpf + * \date 2023-06-29 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +struct task_struct *lx_user_new_usb_task(int (*func)(void*), void *args) +{ + int pid = kernel_thread(func, args, CLONE_FS | CLONE_FILES); + return find_task_by_pid_ns(pid, NULL); +} + + +static struct genode_uplink *dev_genode_uplink(struct net_device *dev) +{ + return (struct genode_uplink *)dev->ifalias; +} + + +struct genode_uplink_rx_context +{ + struct net_device *dev; +}; + + +struct genode_uplink_tx_packet_context +{ + struct sk_buff *skb; +}; + + +static unsigned long uplink_tx_packet_content(struct genode_uplink_tx_packet_context *ctx, + char *dst, unsigned long dst_len) +{ + struct sk_buff * const skb = ctx->skb; + + skb_push(skb, ETH_HLEN); + + if (dst_len < skb->len) { + printk("uplink_tx_packet_content: packet exceeds uplink packet size\n"); + memset(dst, 0, dst_len); + return 0; + } + + skb_copy_from_linear_data(skb, dst, skb->len); + + /* clear unused part of the destination buffer */ + memset(dst + skb->len, 0, dst_len - skb->len); + + return skb->len; +} + + +static rx_handler_result_t handle_rx(struct sk_buff **pskb) +{ + struct sk_buff *skb = *pskb; + struct net_device *dev = skb->dev; + struct genode_uplink_tx_packet_context ctx = { .skb = skb }; + + /* if uplink still exists */ + if (dev->ifalias) { + bool progress = genode_uplink_tx_packet(dev_genode_uplink(dev), + uplink_tx_packet_content, + &ctx); + if (!progress) + printk("handle_rx: uplink saturated, dropping packet\n"); + } + + kfree_skb(skb); + return RX_HANDLER_CONSUMED; +} + + +/** + * Create Genode uplink for given net device + * + * The uplink is registered at the dev->ifalias pointer. + */ +static void handle_create_uplink(struct net_device *dev) +{ + struct genode_uplink_args args; + + if (dev_genode_uplink(dev)) + return; + + if (!netif_carrier_ok(dev)) + return; + + printk("create uplink for net device %s\n", &dev->name[0]); + + memset(&args, 0, sizeof(args)); + + if (dev->addr_len != sizeof(args.mac_address)) { + printk("error: net device has unexpected addr_len %u\n", dev->addr_len); + return; + } + + { + unsigned i; + for (i = 0; i < dev->addr_len; i++) + args.mac_address[i] = dev->dev_addr[i]; + } + + args.label = &dev->name[0]; + + dev->ifalias = (struct dev_ifalias *)genode_uplink_create(&args); +} + + +static void handle_destroy_uplink(struct net_device *dev) +{ + struct genode_uplink *uplink = dev_genode_uplink(dev); + + if (!uplink) + return; + + if (netif_carrier_ok(dev)) + return; + + printk("destroy uplink for net device %s\n", &dev->name[0]); + genode_uplink_destroy(uplink); + + dev->ifalias = NULL; +} + + +static genode_uplink_rx_result_t uplink_rx_one_packet(struct genode_uplink_rx_context *ctx, + char const *ptr, unsigned long len) +{ + struct sk_buff *skb = alloc_skb(len, GFP_KERNEL); + + if (!skb) { + printk("alloc_skb failed\n"); + return GENODE_UPLINK_RX_RETRY; + } + + skb_copy_to_linear_data(skb, ptr, len); + skb_put(skb, len); + skb->dev = ctx->dev; + + if (dev_queue_xmit(skb) < 0) { + printk("lx_user: failed to xmit packet\n"); + return GENODE_UPLINK_RX_REJECTED; + } + + return GENODE_UPLINK_RX_ACCEPTED; +} + + +static int user_task_function(void *arg) +{ + for (;;) { + + struct net_device *dev; + + for_each_netdev(&init_net, dev) { + struct genode_mac_address dev_addr; + + /* enable link sensing, repeated calls are handled by testing IFF_UP */ + dev_open(dev, 0); + + memcpy(dev_addr.addr, dev->dev_addr, sizeof(dev_addr)); + genode_mac_address_register(dev->name, dev_addr); + + /* install rx handler once */ + if (!netdev_is_rx_handler_busy(dev)) + netdev_rx_handler_register(dev, handle_rx, NULL); + + /* respond to cable plug/unplug */ + handle_create_uplink(dev); + handle_destroy_uplink(dev); + + /* transmit packets received from the uplink session */ + if (netif_carrier_ok(dev)) { + + struct genode_uplink_rx_context ctx = { .dev = dev }; + + while (genode_uplink_rx(dev_genode_uplink(dev), + uplink_rx_one_packet, + &ctx)); + } + }; + + /* block until lx_emul_task_unblock */ + lx_emul_task_schedule(true); + } + return 0; +} + + +struct task_struct *user_task_struct_ptr; /* used by 'Device' for lx_emul_task_unblock */ + +void lx_user_init(void) +{ + pid_t pid; + + lx_user_main_task(NULL); + + pid = kernel_thread(user_task_function, NULL, CLONE_FS | CLONE_FILES); + + user_task_struct_ptr = find_task_by_pid_ns(pid, NULL); + +} + + +#include + +/* + * Called whenever the link state changes + */ + +bool force_uplink_destroy = false; + +void rtmsg_ifinfo(int type, struct net_device * dev, unsigned int change, gfp_t flags) +{ + /* trigger handle_create_uplink / handle_destroy_uplink */ + if (user_task_struct_ptr) + lx_emul_task_unblock(user_task_struct_ptr); + + if (force_uplink_destroy) { + struct genode_uplink *uplink = dev_genode_uplink(dev); + printk("force destroy uplink for net device %s\n", &dev->name[0]); + genode_uplink_destroy(uplink); + } +} + + +/* + * Handle WDM device class for MBIM-modems + */ + +struct usb_class_driver *wdm_driver; +struct file wdm_file; + +enum { WDM_MINOR = 8 }; + +int usb_register_dev(struct usb_interface *intf, struct usb_class_driver *class_driver) +{ + if (strncmp(class_driver->name, "cdc-wdm", 7) == 0) { + wdm_driver = class_driver; + + intf->usb_dev = &intf->dev; + intf->minor = WDM_MINOR; + + lx_wdm_create_root(); + return 0; + } + + printk("%s:%d error: no device class for driver %s\n", __func__, __LINE__, + class_driver->name); + + return -1; +} + + +void usb_deregister_dev(struct usb_interface * intf,struct usb_class_driver * class_driver) +{ + lx_emul_trace(__func__); +} + + + +int lx_wdm_read(void *args) +{ + ssize_t length; + struct lx_wdm *wdm_data = (struct lx_wdm *)args; + + lx_emul_task_schedule(true); + + if (!wdm_driver) { + printk("%s:%d error: no WDM class driver\n", __func__, __LINE__); + return -1; + } + + while (wdm_data->active) { + length = wdm_driver->fops->read(&wdm_file, wdm_data->buffer, 0x1000, NULL); + if (length > 0) { + *wdm_data->data_avail = length; + lx_wdm_signal_data_avail(wdm_data->handle); + } + lx_emul_task_schedule(true); + } + + return 0; +} + + +int lx_wdm_write(void *args) +{ + ssize_t length; + struct lx_wdm *wdm_data = (struct lx_wdm *)args; + + lx_emul_task_schedule(true); + + if (!wdm_driver) { + printk("%s:%d error: no WDM class driver\n", __func__, __LINE__); + return -1; + } + + while (wdm_data->active) { + length = wdm_driver->fops->write(&wdm_file, wdm_data->buffer, + *wdm_data->data_avail, NULL); + if (length < 0) { + printk("WDM write error: %ld", (long)length); + } + + lx_wdm_schedule_read(wdm_data->handle); + lx_emul_task_schedule(true); + } + return 0; +} + + +int lx_wdm_device(void *args) +{ + int err = -1; + + /* minor number for inode is 1 (see: ubs_register_dev above) */ + struct inode inode; + inode.i_rdev = MKDEV(USB_DEVICE_MAJOR, WDM_MINOR); + + if (!wdm_driver) { + printk("%s:%d error: no WDM class driver\n", __func__, __LINE__); + return err; + } + + if ((err = wdm_driver->fops->open(&inode, &wdm_file))) { + printk("Could not open WDM device: %d", err); + return err; + } + + lx_emul_task_schedule(true); + //XXX: close + return 0; +} diff --git a/repos/dde_linux/src/drivers/usb_net/main.cc b/repos/dde_linux/src/drivers/usb_net/main.cc new file mode 100644 index 0000000000..9f23bab484 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/main.cc @@ -0,0 +1,234 @@ +/* + * \brief C++ initialization, session, and client handling + * \author Sebastian Sumpf + * \date 2023-07-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +/* C-interface */ +#include + +using namespace Genode; + +extern task_struct *user_task_struct_ptr; +extern bool force_uplink_destroy; +extern bool use_mac_address; +extern unsigned char mac_address[6]; + +struct Device +{ + Env &env; + + Attached_rom_dataspace config_rom { env, "config" }; + unsigned long usb_config { 0 }; + + /* + * Dedicated allocator per device to notice dangling + * allocations on device destruction. + */ + Allocator_avl alloc { &Lx_kit::env().heap }; + + task_struct *state_task { lx_user_new_usb_task(state_task_entry, this) }; + task_struct *urb_task { lx_user_new_usb_task(urb_task_entry, this) }; + + Signal_handler task_state_handler { env.ep(), *this, &Device::handle_task_state }; + Signal_handler urb_handler { env.ep(), *this, &Device::handle_urb }; + + genode_usb_client_handle_t usb_handle { + genode_usb_client_create(genode_env_ptr(env), + genode_allocator_ptr(Lx_kit::env().heap), + genode_range_allocator_ptr(alloc), + "", + genode_signal_handler_ptr(task_state_handler)) }; + + Signal_handler nic_handler { env.ep(), *this, &Device::handle_nic }; + Signal_handler config_handler { env.ep(), *this, &Device::handle_config }; + + bool registered { false }; + + void *lx_device_handle { nullptr }; + + Device(Env &env) + : + env(env) + { + genode_usb_client_sigh_ack_avail(usb_handle, + genode_signal_handler_ptr(urb_handler)); + + genode_mac_address_reporter_init(env, Lx_kit::env().heap); + + genode_uplink_init(genode_env_ptr(env), + genode_allocator_ptr(Lx_kit::env().heap), + genode_signal_handler_ptr(nic_handler)); + + config_rom.sigh(config_handler); + handle_config(); + } + + /* non-copyable */ + Device(const Device&) = delete; + Device & operator=(const Device&) = delete; + + void register_device() + { + registered = true; + lx_device_handle = lx_emul_usb_client_register_device(usb_handle, "usb_nic"); + if (!lx_device_handle) { + registered = false; + return; + } + + if (usb_config != 0) + lx_emul_usb_client_set_configuration(usb_handle, lx_device_handle, usb_config); + + } + + void unregister_device() + { + force_uplink_destroy = true; + lx_emul_usb_client_unregister_device(usb_handle, lx_device_handle); + registered = false; + force_uplink_destroy = false; + } + + void handle_task_state() + { + lx_emul_task_unblock(state_task); + Lx_kit::env().scheduler.execute(); + } + + void handle_urb() + { + lx_emul_task_unblock(urb_task); + Lx_kit::env().scheduler.execute(); + genode_uplink_notify_peers(); + } + + void handle_nic() + { + if (!user_task_struct_ptr) + return; + + lx_emul_task_unblock(user_task_struct_ptr); + Lx_kit::env().scheduler.execute(); + } + + void handle_config() + { + config_rom.update(); + genode_mac_address_reporter_config(config_rom.xml()); + + /* read USB configuration setting */ + unsigned long config = config_rom.xml().attribute_value("configuration", 0ul); + if (registered && config != 0 && config != usb_config) + lx_emul_usb_client_set_configuration(usb_handle, lx_device_handle, config); + + usb_config = config; + + /* retrieve possible MAC */ + Nic::Mac_address mac; + try { + Xml_node::Attribute mac_node = config_rom.xml().attribute("mac"); + mac_node.value(mac); + mac.copy(mac_address); + use_mac_address = true; + log("Trying to use configured mac: ", mac); + } catch (...) { + use_mac_address = false; + } + } + + + /********** + ** Task ** + **********/ + + static int state_task_entry(void *arg) + { + Device &device = *reinterpret_cast(arg); + + while (true) { + if (genode_usb_client_plugged(device.usb_handle) && !device.registered) + device.register_device(); + + if (!genode_usb_client_plugged(device.usb_handle) && device.registered) + device.unregister_device(); + lx_emul_task_schedule(true); + } + + return 0; + } + + static int urb_task_entry(void *arg) + { + Device &device = *reinterpret_cast(arg); + + while (true) { + if (device.registered) { + genode_usb_client_execute_completions(device.usb_handle); + } + + lx_emul_task_schedule(true); + } + + return 0; + } +}; + + +struct Main +{ + Env &env; + + Signal_handler
signal_handler { env.ep(), *this, &Main::handle_signal }; + + Main(Env &env) : env(env) { } + + void handle_signal() + { + Lx_kit::env().scheduler.execute(); + } +}; + + +void Component::construct(Env & env) +{ + static Main main { env }; + Lx_kit::initialize(env, main.signal_handler); + + env.exec_static_constructors(); + + lx_emul_start_kernel(nullptr); +} + + +/********** + ** Task ** + **********/ + +int lx_user_main_task(void *) +{ + /* one device only */ + static Device dev(Lx_kit::env().env); + + return 0; +} diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm/generated_dummies.c b/repos/dde_linux/src/drivers/usb_net/spec/arm/generated_dummies.c new file mode 100644 index 0000000000..24a8161654 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm/generated_dummies.c @@ -0,0 +1,1066 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Automatically generated file - do no edit + * \date 2023-08-18 + */ + +#include + + +#include + +struct page * __alloc_pages(gfp_t gfp,unsigned int order,int preferred_nid,nodemask_t * nodemask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * __clk_get_name(const struct clk * clk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct cpumask __cpu_active_mask; + + +#include + +int __devm_mdiobus_register(struct device * dev,struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __folio_put(struct folio * folio) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __ipv6_addr_type(const struct in6_addr * addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_domain * __irq_domain_add(struct fwnode_handle * fwnode,unsigned int size,irq_hw_number_t hwirq_max,int direct_max,const struct irq_domain_ops * ops,void * host_data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_desc * __irq_resolve_mapping(struct irq_domain * domain,irq_hw_number_t hwirq,unsigned int * irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __mdiobus_register(struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +unsigned long __per_cpu_offset[NR_CPUS] = {}; + + +#include + +int __printk_ratelimit(const char * func) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __put_task_struct(struct task_struct * tsk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __skb_get_hash(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * __vmalloc_node_range(unsigned long size,unsigned long align,unsigned long start,unsigned long end,gfp_t gfp_mask,pgprot_t prot,unsigned long vm_flags,int node,const void * caller) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int _printk_deferred(const char * fmt,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int add_uevent_var(struct kobj_uevent_env * env,const char * format,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +async_cookie_t async_schedule_node(async_func_t func,void * data,int node) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void async_synchronize_full(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void bpf_warn_invalid_xdp_action(struct net_device * dev,struct bpf_prog * prog,u32 act) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ct_irq_enter_irqson(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ct_irq_exit_irqson(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct mii_bus * devm_mdiobus_alloc_size(struct device * dev,int sizeof_priv) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u64 div64_u64(u64 dividend,u64 divisor) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u64 div64_u64_rem(u64 dividend,u64 divisor,u64 * remainder) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +s64 div_s64_rem(s64 dividend,s32 divisor,s32 * remainder) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool dma_default_coherent; + + +#include + +void do_trace_netlink_extack(const char * msg) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void dst_release(struct dst_entry * dst) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +asmlinkage __visible void dump_stack(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ethtool_convert_legacy_u32_to_link_mode(unsigned long * dst,u32 legacy_u32) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool ethtool_convert_link_mode_to_legacy_u32(u32 * legacy_u32,const unsigned long * src) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 ethtool_op_get_link(struct net_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int ethtool_op_get_ts_info(struct net_device * dev,struct ethtool_ts_info * info) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void finish_rcuwait(struct rcuwait * w) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int genphy_resume(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool gfp_pfmemalloc_allowed(gfp_t gfp_mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_complete_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_receive_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 guid_index[16] = {}; + + +#include + +void handle_fasteoi_irq(struct irq_desc * desc) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void in6_dev_finish_destroy(struct inet6_dev * idev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct user_namespace init_user_ns; + + +#include + +bool initcall_debug; + + +#include + +void __sched io_schedule(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void io_schedule_finish(int token) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int io_schedule_prepare(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +long __sched io_schedule_timeout(long timeout) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_can_set_affinity(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_domain_free_irqs_common(struct irq_domain * domain,unsigned int virq,unsigned int nr_irqs) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_domain_set_info(struct irq_domain * domain,unsigned int virq,irq_hw_number_t hwirq,const struct irq_chip * chip,void * chip_data,irq_flow_handler_t handler,void * handler_data,const char * handler_name) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_modify_status(unsigned int irq,unsigned long clr,unsigned long set) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_set_affinity(unsigned int irq,const struct cpumask * cpumask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_set_default_host(struct irq_domain * domain) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_desc * irq_to_desc(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_work_tick(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kmem_cache_alloc_bulk(struct kmem_cache * s,gfp_t flags,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void kmem_cache_free_bulk(struct kmem_cache * s,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * envp_ext[]) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct pernet_operations __net_initdata loopback_net_ops; + + +#include + +unsigned long lpj_fine; + + +#include + +struct mii_bus * mdiobus_alloc_size(size_t size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_free(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * mdiobus_get_phy(struct mii_bus * bus,int addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_unregister(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_disable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_enable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct Qdisc_ops mq_qdisc_ops; + + +#include + +void napi_gro_flush(struct napi_struct * napi,bool flush_old) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_ratelimit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest(struct net_device * ndev,struct ethtool_test * etest,u64 * buf) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_selftest_get_count(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest_get_strings(u8 * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int nla_put(struct sk_buff * skb,int attrtype,int attrlen,const void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +loff_t noop_llseek(struct file * file,loff_t offset,int whence) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void of_device_uevent(struct device * dev,struct kobj_uevent_env * env) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct property * of_find_property(const struct device_node * np,const char * name,int * lenp) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const struct fwnode_operations of_fwnode_ops; + + +#include + +const char * of_prop_next_string(struct property * prop,const char * cur) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int of_property_read_string(const struct device_node * np,const char * propname,const char ** out_string) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_attached_info(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * phy_connect(struct net_device * dev,const char * bus_id,void (* handler)(struct net_device *),phy_interface_t interface) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_disconnect(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_do_ioctl_running(struct net_device * dev,struct ifreq * ifr,int cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_get_link_ksettings(struct net_device * ndev,struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_nway_reset(struct net_device * ndev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_set_link_ksettings(struct net_device * ndev,const struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_print_status(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_start(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_stop(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_suspend(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_connect_phy(struct phylink * pl,struct phy_device * phy) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phylink * phylink_create(struct phylink_config * config,struct fwnode_handle * fwnode,phy_interface_t iface,const struct phylink_mac_ops * mac_ops) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_destroy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_disconnect_phy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_ethtool_get_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_ethtool_set_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_generic_validate(struct phylink_config * config,unsigned long * supported,struct phylink_link_state * state) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_resume(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_start(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_stop(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_suspend(struct phylink * pl,bool mac_wol) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void refcount_warn_saturate(refcount_t * r,enum refcount_saturation_type t) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void rtmsg_ifinfo_send(struct sk_buff * skb,struct net_device * dev,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sg_init_table(struct scatterlist * sgl,unsigned int nents) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sk_error_report(struct sock * sk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct sk_buff * skb_mac_gso_segment(struct sk_buff * skb,netdev_features_t features) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sock_edemux(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool static_key_initialized; + + +#include + +int sysctl_tstamp_allow_data; + + +#include + +struct sk_buff * tcp_get_timestamping_opt_stats(const struct sock * sk,const struct sk_buff * orig_skb,const struct sk_buff * ack_skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void tick_broadcast(const struct cpumask * mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_clear_halt(struct usb_device * dev,int pipe) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_devio_cleanup(void); +void usb_devio_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware); +void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_free_streams(struct usb_interface * interface,struct usb_host_endpoint ** eps,unsigned int num_eps,gfp_t mem_flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_get_device_descriptor(struct usb_device * dev,unsigned int size); +int usb_get_device_descriptor(struct usb_device * dev,unsigned int size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_get_status(struct usb_device * dev,int recip,int type,int target,void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_alloc_bandwidth(struct usb_device * udev,struct usb_host_config * new_config,struct usb_host_interface * cur_alt,struct usb_host_interface * new_alt) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_find_raw_port_number(struct usb_hcd * hcd,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_hub_create_port_device(struct usb_hub * hub,int port1); +int usb_hub_create_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_hub_remove_port_device(struct usb_hub * hub,int port1); +void usb_hub_remove_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_major_cleanup(void); +void usb_major_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct device_node * usb_of_get_device_node(struct usb_device * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_set_isoch_delay(struct usb_device * dev); +int usb_set_isoch_delay(struct usb_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * usb_speed_string(enum usb_device_speed speed) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void usb_unpoison_urb(struct urb * urb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 uuid_index[16] = {}; + + +#include + +void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 xdp_master_redirect(struct xdp_buff * xdp) +{ + lx_emul_trace_and_stop(__func__); +} + diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm/source.list b/repos/dde_linux/src/drivers/usb_net/spec/arm/source.list new file mode 100644 index 0000000000..8d91ca16a3 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm/source.list @@ -0,0 +1,87 @@ +arch/arm/lib/clearbit.S +arch/arm/lib/div64.S +arch/arm/lib/findbit.S +arch/arm/lib/setbit.S +arch/arm/lib/strchr.S +arch/arm/lib/testclearbit.S +arch/arm/lib/testsetbit.S +drivers/base/bus.c +drivers/base/core.c +drivers/base/class.c +drivers/base/devres.c +drivers/base/driver.c +drivers/base/dd.c +drivers/base/property.c +drivers/net/mii.c +drivers/net/usb/asix_common.c +drivers/net/usb/asix_devices.c +drivers/net/usb/asix.h +drivers/net/usb/ax88172a.c +drivers/net/usb/ax88179_178a.c +drivers/net/usb/cdc_ether.c +drivers/net/usb/cdc_mbim.c +drivers/net/usb/cdc_ncm.c +drivers/net/usb/usbnet.c +drivers/usb/class/cdc-wdm.c +drivers/usb/core/config.c +drivers/usb/core/driver.c +drivers/usb/core/generic.c +drivers/usb/core/hub.c +drivers/usb/core/quirks.c +drivers/usb/core/usb.c +fs/nls/nls_base.c +kernel/kthread.c +kernel/locking/mutex.c +kernel/locking/osq_lock.c +kernel/locking/rwsem.c +kernel/notifier.c +kernel/sched/build_utility.c +kernel/smpboot.c +kernel/softirq.c +kernel/time/clockevents.c +kernel/time/clocksource.c +kernel/time/hrtimer.c +kernel/time/jiffies.c +kernel/time/ntp.c +kernel/time/tick-broadcast.c +kernel/time/tick-broadcast-hrtimer.c +kernel/time/tick-common.c +kernel/time/tick-oneshot.c +kernel/time/tick-sched.c +kernel/time/time.c +kernel/time/timeconv.c +kernel/time/timecounter.c +kernel/time/timekeeping.c +kernel/time/timer.c +kernel/time/timer_list.c +kernel/workqueue.c +lib/bitmap.c +lib/crc16.c +lib/crc32.c +lib/ctype.c +lib/find_bit.c +lib/hexdump.c +lib/hweight.c +lib/idr.c +lib/kasprintf.c +lib/klist.c +lib/kobject.c +lib/kstrtox.c +lib/radix-tree.c +lib/rhashtable.c +lib/rbtree.c +lib/xarray.c +lib/siphash.c +lib/string.c +lib/string_helpers.c +lib/timerqueue.c +lib/vsprintf.c +mm/util.c +net/core/dev.c +net/core/dev_addr_lists.c +net/core/link_watch.c +net/core/skbuff.c +net/core/xdp.c +net/ethernet/eth.c +net/ethtool/common.c +net/sched/sch_generic.c diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm/target.mk b/repos/dde_linux/src/drivers/usb_net/spec/arm/target.mk new file mode 100644 index 0000000000..9428a3be70 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm/target.mk @@ -0,0 +1,3 @@ +REQUIRES := arm + +include $(PRG_DIR)/../../target.inc diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm_64/generated_dummies.c b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/generated_dummies.c new file mode 100644 index 0000000000..5cd9a6f964 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/generated_dummies.c @@ -0,0 +1,1047 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Automatically generated file - do no edit + * \date 2023-08-18 + */ + +#include + + +#include + +struct page * __alloc_pages(gfp_t gfp,unsigned int order,int preferred_nid,nodemask_t * nodemask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * __clk_get_name(const struct clk * clk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct cpumask __cpu_active_mask; + + +#include + +int __devm_mdiobus_register(struct device * dev,struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __folio_put(struct folio * folio) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __ipv6_addr_type(const struct in6_addr * addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_domain * __irq_domain_add(struct fwnode_handle * fwnode,unsigned int size,irq_hw_number_t hwirq_max,int direct_max,const struct irq_domain_ops * ops,void * host_data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_desc * __irq_resolve_mapping(struct irq_domain * domain,irq_hw_number_t hwirq,unsigned int * irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __mdiobus_register(struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +unsigned long __per_cpu_offset[NR_CPUS] = {}; + + +#include + +int __printk_ratelimit(const char * func) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __put_task_struct(struct task_struct * tsk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __skb_get_hash(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * __vmalloc_node_range(unsigned long size,unsigned long align,unsigned long start,unsigned long end,gfp_t gfp_mask,pgprot_t prot,unsigned long vm_flags,int node,const void * caller) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int _printk_deferred(const char * fmt,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int add_uevent_var(struct kobj_uevent_env * env,const char * format,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +async_cookie_t async_schedule_node(async_func_t func,void * data,int node) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void async_synchronize_full(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void bpf_warn_invalid_xdp_action(struct net_device * dev,struct bpf_prog * prog,u32 act) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ct_irq_enter_irqson(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ct_irq_exit_irqson(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct mii_bus * devm_mdiobus_alloc_size(struct device * dev,int sizeof_priv) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool dma_default_coherent; + + +#include + +void do_trace_netlink_extack(const char * msg) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void dst_release(struct dst_entry * dst) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +asmlinkage __visible void dump_stack(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ethtool_convert_legacy_u32_to_link_mode(unsigned long * dst,u32 legacy_u32) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool ethtool_convert_link_mode_to_legacy_u32(u32 * legacy_u32,const unsigned long * src) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 ethtool_op_get_link(struct net_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int ethtool_op_get_ts_info(struct net_device * dev,struct ethtool_ts_info * info) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void finish_rcuwait(struct rcuwait * w) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int genphy_resume(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool gfp_pfmemalloc_allowed(gfp_t gfp_mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_complete_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_receive_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 guid_index[16] = {}; + + +#include + +void handle_fasteoi_irq(struct irq_desc * desc) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void in6_dev_finish_destroy(struct inet6_dev * idev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct user_namespace init_user_ns; + + +#include + +bool initcall_debug; + + +#include + +void __sched io_schedule(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void io_schedule_finish(int token) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int io_schedule_prepare(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +long __sched io_schedule_timeout(long timeout) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct io_tlb_mem io_tlb_default_mem; + + +#include + +int irq_can_set_affinity(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_domain_free_irqs_common(struct irq_domain * domain,unsigned int virq,unsigned int nr_irqs) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_domain_set_info(struct irq_domain * domain,unsigned int virq,irq_hw_number_t hwirq,const struct irq_chip * chip,void * chip_data,irq_flow_handler_t handler,void * handler_data,const char * handler_name) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_modify_status(unsigned int irq,unsigned long clr,unsigned long set) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_set_affinity(unsigned int irq,const struct cpumask * cpumask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_set_default_host(struct irq_domain * domain) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct irq_desc * irq_to_desc(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_work_tick(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kmem_cache_alloc_bulk(struct kmem_cache * s,gfp_t flags,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void kmem_cache_free_bulk(struct kmem_cache * s,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * envp_ext[]) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct pernet_operations __net_initdata loopback_net_ops; + + +#include + +unsigned long lpj_fine; + + +#include + +struct mii_bus * mdiobus_alloc_size(size_t size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_free(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * mdiobus_get_phy(struct mii_bus * bus,int addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_unregister(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_disable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_enable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct Qdisc_ops mq_qdisc_ops; + + +#include + +void napi_gro_flush(struct napi_struct * napi,bool flush_old) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_ratelimit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest(struct net_device * ndev,struct ethtool_test * etest,u64 * buf) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_selftest_get_count(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest_get_strings(u8 * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int nla_put(struct sk_buff * skb,int attrtype,int attrlen,const void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +loff_t noop_llseek(struct file * file,loff_t offset,int whence) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void of_device_uevent(struct device * dev,struct kobj_uevent_env * env) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct property * of_find_property(const struct device_node * np,const char * name,int * lenp) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const struct fwnode_operations of_fwnode_ops; + + +#include + +const char * of_prop_next_string(struct property * prop,const char * cur) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int of_property_read_string(const struct device_node * np,const char * propname,const char ** out_string) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_attached_info(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * phy_connect(struct net_device * dev,const char * bus_id,void (* handler)(struct net_device *),phy_interface_t interface) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_disconnect(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_do_ioctl_running(struct net_device * dev,struct ifreq * ifr,int cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_get_link_ksettings(struct net_device * ndev,struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_nway_reset(struct net_device * ndev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_set_link_ksettings(struct net_device * ndev,const struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_print_status(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_start(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_stop(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_suspend(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_connect_phy(struct phylink * pl,struct phy_device * phy) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phylink * phylink_create(struct phylink_config * config,struct fwnode_handle * fwnode,phy_interface_t iface,const struct phylink_mac_ops * mac_ops) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_destroy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_disconnect_phy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_ethtool_get_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_ethtool_set_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_generic_validate(struct phylink_config * config,unsigned long * supported,struct phylink_link_state * state) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_resume(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_start(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_stop(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_suspend(struct phylink * pl,bool mac_wol) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void refcount_warn_saturate(refcount_t * r,enum refcount_saturation_type t) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void rtmsg_ifinfo_send(struct sk_buff * skb,struct net_device * dev,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sg_init_table(struct scatterlist * sgl,unsigned int nents) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sk_error_report(struct sock * sk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct sk_buff * skb_mac_gso_segment(struct sk_buff * skb,netdev_features_t features) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sock_edemux(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool static_key_initialized; + + +#include + +int sysctl_tstamp_allow_data; + + +#include + +struct sk_buff * tcp_get_timestamping_opt_stats(const struct sock * sk,const struct sk_buff * orig_skb,const struct sk_buff * ack_skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void tick_broadcast(const struct cpumask * mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_clear_halt(struct usb_device * dev,int pipe) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_devio_cleanup(void); +void usb_devio_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware); +void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_free_streams(struct usb_interface * interface,struct usb_host_endpoint ** eps,unsigned int num_eps,gfp_t mem_flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_get_device_descriptor(struct usb_device * dev,unsigned int size); +int usb_get_device_descriptor(struct usb_device * dev,unsigned int size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_get_status(struct usb_device * dev,int recip,int type,int target,void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_alloc_bandwidth(struct usb_device * udev,struct usb_host_config * new_config,struct usb_host_interface * cur_alt,struct usb_host_interface * new_alt) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_find_raw_port_number(struct usb_hcd * hcd,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_hub_create_port_device(struct usb_hub * hub,int port1); +int usb_hub_create_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_hub_remove_port_device(struct usb_hub * hub,int port1); +void usb_hub_remove_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_major_cleanup(void); +void usb_major_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct device_node * usb_of_get_device_node(struct usb_device * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_set_isoch_delay(struct usb_device * dev); +int usb_set_isoch_delay(struct usb_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * usb_speed_string(enum usb_device_speed speed) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void usb_unpoison_urb(struct urb * urb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 uuid_index[16] = {}; + + +#include + +void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 xdp_master_redirect(struct xdp_buff * xdp) +{ + lx_emul_trace_and_stop(__func__); +} + diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm_64/source.list b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/source.list new file mode 100644 index 0000000000..b59eedf3d7 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/source.list @@ -0,0 +1,86 @@ +arch/arm64/lib/memcmp.S +arch/arm64/lib/strchr.S +arch/arm64/lib/strcmp.S +arch/arm64/lib/strlen.S +arch/arm64/lib/strncmp.S +arch/arm64/lib/strnlen.S +drivers/base/bus.c +drivers/base/core.c +drivers/base/class.c +drivers/base/devres.c +drivers/base/driver.c +drivers/base/dd.c +drivers/base/property.c +drivers/net/mii.c +drivers/net/usb/asix_common.c +drivers/net/usb/asix_devices.c +drivers/net/usb/asix.h +drivers/net/usb/ax88172a.c +drivers/net/usb/ax88179_178a.c +drivers/net/usb/cdc_ether.c +drivers/net/usb/cdc_mbim.c +drivers/net/usb/cdc_ncm.c +drivers/net/usb/usbnet.c +drivers/usb/class/cdc-wdm.c +drivers/usb/core/config.c +drivers/usb/core/driver.c +drivers/usb/core/generic.c +drivers/usb/core/hub.c +drivers/usb/core/quirks.c +drivers/usb/core/usb.c +fs/nls/nls_base.c +kernel/kthread.c +kernel/locking/mutex.c +kernel/locking/osq_lock.c +kernel/locking/rwsem.c +kernel/notifier.c +kernel/sched/build_utility.c +kernel/smpboot.c +kernel/softirq.c +kernel/time/clockevents.c +kernel/time/clocksource.c +kernel/time/hrtimer.c +kernel/time/jiffies.c +kernel/time/ntp.c +kernel/time/tick-broadcast.c +kernel/time/tick-broadcast-hrtimer.c +kernel/time/tick-common.c +kernel/time/tick-oneshot.c +kernel/time/tick-sched.c +kernel/time/time.c +kernel/time/timeconv.c +kernel/time/timecounter.c +kernel/time/timekeeping.c +kernel/time/timer.c +kernel/time/timer_list.c +kernel/workqueue.c +lib/bitmap.c +lib/crc16.c +lib/crc32.c +lib/ctype.c +lib/find_bit.c +lib/hexdump.c +lib/hweight.c +lib/idr.c +lib/kasprintf.c +lib/klist.c +lib/kobject.c +lib/kstrtox.c +lib/radix-tree.c +lib/rhashtable.c +lib/rbtree.c +lib/xarray.c +lib/siphash.c +lib/string.c +lib/string_helpers.c +lib/timerqueue.c +lib/vsprintf.c +mm/util.c +net/core/dev.c +net/core/dev_addr_lists.c +net/core/link_watch.c +net/core/skbuff.c +net/core/xdp.c +net/ethernet/eth.c +net/ethtool/common.c +net/sched/sch_generic.c diff --git a/repos/dde_linux/src/drivers/usb_net/spec/arm_64/target.mk b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/target.mk new file mode 100644 index 0000000000..ef575f8cbd --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/arm_64/target.mk @@ -0,0 +1,5 @@ +REQUIRES := arm_64 + +SRC_C += lx_emul/shadow/arch/arm64/kernel/smp.c + +include $(PRG_DIR)/../../target.inc diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_32/generated_dummies.c b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/generated_dummies.c new file mode 100644 index 0000000000..f4d4e7e67a --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/generated_dummies.c @@ -0,0 +1,948 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Automatically generated file - do no edit + * \date 2023-08-18 + */ + +#include + + +#include + +struct page * __alloc_pages(gfp_t gfp,unsigned int order,int preferred_nid,nodemask_t * nodemask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct cpumask __cpu_active_mask; + + +#include + +int __devm_mdiobus_register(struct device * dev,struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __folio_put(struct folio * folio) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __ipv6_addr_type(const struct in6_addr * addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __mdiobus_register(struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __printk_ratelimit(const char * func) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __put_task_struct(struct task_struct * tsk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __skb_get_hash(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * __vmalloc_node_range(unsigned long size,unsigned long align,unsigned long start,unsigned long end,gfp_t gfp_mask,pgprot_t prot,unsigned long vm_flags,int node,const void * caller) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int _printk_deferred(const char * fmt,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void ack_bad_irq(unsigned int irq); +void ack_bad_irq(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int add_uevent_var(struct kobj_uevent_env * env,const char * format,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +async_cookie_t async_schedule_node(async_func_t func,void * data,int node) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void async_synchronize_full(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void bpf_warn_invalid_xdp_action(struct net_device * dev,struct bpf_prog * prog,u32 act) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u8 const byte_rev_table[256] = {}; + + +#include + +noinstr void ct_irq_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct mii_bus * devm_mdiobus_alloc_size(struct device * dev,int sizeof_priv) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u64 div64_u64(u64 dividend,u64 divisor) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u64 div64_u64_rem(u64 dividend,u64 divisor,u64 * remainder) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +s64 div_s64_rem(s64 dividend,s32 divisor,s32 * remainder) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void do_trace_netlink_extack(const char * msg) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void dst_release(struct dst_entry * dst) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +asmlinkage __visible void dump_stack(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ethtool_convert_legacy_u32_to_link_mode(unsigned long * dst,u32 legacy_u32) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool ethtool_convert_link_mode_to_legacy_u32(u32 * legacy_u32,const unsigned long * src) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 ethtool_op_get_link(struct net_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int ethtool_op_get_ts_info(struct net_device * dev,struct ethtool_ts_info * info) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void finish_rcuwait(struct rcuwait * w) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int genphy_resume(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool gfp_pfmemalloc_allowed(gfp_t gfp_mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_complete_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_receive_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 guid_index[16] = {}; + + +#include + +void * high_memory; + + +#include + +void in6_dev_finish_destroy(struct inet6_dev * idev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +unsigned long init_stack[THREAD_SIZE / sizeof(unsigned long)] = {}; + + +#include + +struct user_namespace init_user_ns; + + +#include + +bool initcall_debug; + + +#include + +void __sched io_schedule(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void io_schedule_finish(int token) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int io_schedule_prepare(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +long __sched io_schedule_timeout(long timeout) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_can_set_affinity(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_set_affinity(unsigned int irq,const struct cpumask * cpumask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_work_tick(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kmem_cache_alloc_bulk(struct kmem_cache * s,gfp_t flags,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void kmem_cache_free_bulk(struct kmem_cache * s,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * envp_ext[]) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct pernet_operations __net_initdata loopback_net_ops; + + +#include + +struct mii_bus * mdiobus_alloc_size(size_t size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_free(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * mdiobus_get_phy(struct mii_bus * bus,int addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_unregister(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_disable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_enable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct Qdisc_ops mq_qdisc_ops; + + +#include + +void napi_gro_flush(struct napi_struct * napi,bool flush_old) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_ratelimit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest(struct net_device * ndev,struct ethtool_test * etest,u64 * buf) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_selftest_get_count(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest_get_strings(u8 * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int nla_put(struct sk_buff * skb,int attrtype,int attrlen,const void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +loff_t noop_llseek(struct file * file,loff_t offset,int whence) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int param_set_copystring(const char * val,const struct kernel_param * kp) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_attached_info(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * phy_connect(struct net_device * dev,const char * bus_id,void (* handler)(struct net_device *),phy_interface_t interface) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_disconnect(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_do_ioctl_running(struct net_device * dev,struct ifreq * ifr,int cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_get_link_ksettings(struct net_device * ndev,struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_nway_reset(struct net_device * ndev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_set_link_ksettings(struct net_device * ndev,const struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_print_status(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_start(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_stop(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_suspend(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_connect_phy(struct phylink * pl,struct phy_device * phy) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phylink * phylink_create(struct phylink_config * config,struct fwnode_handle * fwnode,phy_interface_t iface,const struct phylink_mac_ops * mac_ops) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_destroy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_disconnect_phy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_ethtool_get_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_ethtool_set_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_generic_validate(struct phylink_config * config,unsigned long * supported,struct phylink_link_state * state) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_resume(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_start(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_stop(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_suspend(struct phylink * pl,bool mac_wol) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void refcount_warn_saturate(refcount_t * r,enum refcount_saturation_type t) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void rtmsg_ifinfo_send(struct sk_buff * skb,struct net_device * dev,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sg_init_table(struct scatterlist * sgl,unsigned int nents) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sk_error_report(struct sock * sk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct sk_buff * skb_mac_gso_segment(struct sk_buff * skb,netdev_features_t features) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int smp_call_function_single(int cpu,smp_call_func_t func,void * info,int wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sock_edemux(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool static_key_initialized; + + +#include + +int sysctl_tstamp_allow_data; + + +#include + +struct sk_buff * tcp_get_timestamping_opt_stats(const struct sock * sk,const struct sk_buff * orig_skb,const struct sk_buff * ack_skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_clear_halt(struct usb_device * dev,int pipe) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_devio_cleanup(void); +void usb_devio_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware); +void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_free_streams(struct usb_interface * interface,struct usb_host_endpoint ** eps,unsigned int num_eps,gfp_t mem_flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_get_device_descriptor(struct usb_device * dev,unsigned int size); +int usb_get_device_descriptor(struct usb_device * dev,unsigned int size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_get_status(struct usb_device * dev,int recip,int type,int target,void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_alloc_bandwidth(struct usb_device * udev,struct usb_host_config * new_config,struct usb_host_interface * cur_alt,struct usb_host_interface * new_alt) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_find_raw_port_number(struct usb_hcd * hcd,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_hub_create_port_device(struct usb_hub * hub,int port1); +int usb_hub_create_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_hub_remove_port_device(struct usb_hub * hub,int port1); +void usb_hub_remove_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_major_cleanup(void); +void usb_major_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_set_isoch_delay(struct usb_device * dev); +int usb_set_isoch_delay(struct usb_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * usb_speed_string(enum usb_device_speed speed) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void usb_unpoison_urb(struct urb * urb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 uuid_index[16] = {}; + + +#include + +void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 xdp_master_redirect(struct xdp_buff * xdp) +{ + lx_emul_trace_and_stop(__func__); +} + diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_32/source.list b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/source.list new file mode 100644 index 0000000000..017cb0ebc6 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/source.list @@ -0,0 +1,79 @@ +arch/x86/lib/hweight.S +drivers/base/bus.c +drivers/base/core.c +drivers/base/class.c +drivers/base/devres.c +drivers/base/driver.c +drivers/base/dd.c +drivers/base/property.c +drivers/net/mii.c +drivers/net/usb/asix_common.c +drivers/net/usb/asix_devices.c +drivers/net/usb/asix.h +drivers/net/usb/ax88172a.c +drivers/net/usb/ax88179_178a.c +drivers/net/usb/cdc_ether.c +drivers/net/usb/cdc_mbim.c +drivers/net/usb/cdc_ncm.c +drivers/net/usb/usbnet.c +drivers/usb/class/cdc-wdm.c +drivers/usb/core/config.c +drivers/usb/core/driver.c +drivers/usb/core/generic.c +drivers/usb/core/hub.c +drivers/usb/core/quirks.c +drivers/usb/core/usb.c +fs/nls/nls_base.c +kernel/kthread.c +kernel/locking/mutex.c +kernel/locking/osq_lock.c +kernel/locking/rwsem.c +kernel/notifier.c +kernel/sched/build_utility.c +kernel/smpboot.c +kernel/softirq.c +kernel/time/clockevents.c +kernel/time/clocksource.c +kernel/time/hrtimer.c +kernel/time/jiffies.c +kernel/time/ntp.c +kernel/time/tick-broadcast.c +kernel/time/tick-common.c +kernel/time/tick-oneshot.c +kernel/time/tick-sched.c +kernel/time/time.c +kernel/time/timeconv.c +kernel/time/timecounter.c +kernel/time/timekeeping.c +kernel/time/timer.c +kernel/time/timer_list.c +kernel/workqueue.c +lib/bitmap.c +lib/crc16.c +lib/crc32.c +lib/ctype.c +lib/find_bit.c +lib/hexdump.c +lib/idr.c +lib/kasprintf.c +lib/klist.c +lib/kobject.c +lib/kstrtox.c +lib/radix-tree.c +lib/rhashtable.c +lib/rbtree.c +lib/xarray.c +lib/siphash.c +lib/string.c +lib/string_helpers.c +lib/timerqueue.c +lib/vsprintf.c +mm/util.c +net/core/dev.c +net/core/dev_addr_lists.c +net/core/link_watch.c +net/core/skbuff.c +net/core/xdp.c +net/ethernet/eth.c +net/ethtool/common.c +net/sched/sch_generic.c diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_32/target.mk b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/target.mk new file mode 100644 index 0000000000..b58507b97e --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_32/target.mk @@ -0,0 +1,3 @@ +REQUIRES := x86_32 + +include $(PRG_DIR)/../../target.inc diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_64/generated_dummies.c b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/generated_dummies.c new file mode 100644 index 0000000000..f3d5356e0e --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/generated_dummies.c @@ -0,0 +1,921 @@ +/* + * \brief Dummy definitions of Linux Kernel functions + * \author Automatically generated file - do no edit + * \date 2023-07-17 + */ + +#include + + +#include + +struct page * __alloc_pages(gfp_t gfp,unsigned int order,int preferred_nid,nodemask_t * nodemask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct cpumask __cpu_active_mask; + + +#include + +int __devm_mdiobus_register(struct device * dev,struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __folio_put(struct folio * folio) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __ipv6_addr_type(const struct in6_addr * addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __mdiobus_register(struct mii_bus * bus,struct module * owner) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int __printk_ratelimit(const char * func) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __printk_safe_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __put_task_struct(struct task_struct * tsk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void __skb_get_hash(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * __vmalloc_node_range(unsigned long size,unsigned long align,unsigned long start,unsigned long end,gfp_t gfp_mask,pgprot_t prot,unsigned long vm_flags,int node,const void * caller) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int _printk_deferred(const char * fmt,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void ack_bad_irq(unsigned int irq); +void ack_bad_irq(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int add_uevent_var(struct kobj_uevent_env * env,const char * format,...) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +async_cookie_t async_schedule_node(async_func_t func,void * data,int node) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void async_synchronize_full(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void bpf_warn_invalid_xdp_action(struct net_device * dev,struct bpf_prog * prog,u32 act) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u8 const byte_rev_table[256] = {}; + + +#include + +noinstr void ct_irq_enter(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +noinstr void ct_irq_exit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct mii_bus * devm_mdiobus_alloc_size(struct device * dev,int sizeof_priv) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void do_trace_netlink_extack(const char * msg) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void dst_release(struct dst_entry * dst) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +asmlinkage __visible void dump_stack(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void ethtool_convert_legacy_u32_to_link_mode(unsigned long * dst,u32 legacy_u32) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool ethtool_convert_link_mode_to_legacy_u32(u32 * legacy_u32,const unsigned long * src) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 ethtool_op_get_link(struct net_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int ethtool_op_get_ts_info(struct net_device * dev,struct ethtool_ts_info * info) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void finish_rcuwait(struct rcuwait * w) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int genphy_resume(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool gfp_pfmemalloc_allowed(gfp_t gfp_mask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_complete_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct packet_offload * gro_find_receive_by_type(__be16 type) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 guid_index[16] = {}; + + +#include + +void in6_dev_finish_destroy(struct inet6_dev * idev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct user_namespace init_user_ns; + + +#include + +bool initcall_debug; + + +#include + +void __sched io_schedule(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void io_schedule_finish(int token) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int io_schedule_prepare(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +long __sched io_schedule_timeout(long timeout) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct io_tlb_mem io_tlb_default_mem; + + +#include + +int irq_can_set_affinity(unsigned int irq) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int irq_set_affinity(unsigned int irq,const struct cpumask * cpumask) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void irq_work_tick(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kmem_cache_alloc_bulk(struct kmem_cache * s,gfp_t flags,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void * kmem_cache_alloc_lru(struct kmem_cache * cachep,struct list_lru * lru,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void kmem_cache_free_bulk(struct kmem_cache * s,size_t nr,void ** p) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_synth_uevent(struct kobject * kobj,const char * buf,size_t count) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * envp_ext[]) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct pernet_operations __net_initdata loopback_net_ops; + + +#include + +struct mii_bus * mdiobus_alloc_size(size_t size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_free(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * mdiobus_get_phy(struct mii_bus * bus,int addr) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void mdiobus_unregister(struct mii_bus * bus) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_disable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void migrate_enable(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct Qdisc_ops mq_qdisc_ops; + + +#include + +void napi_gro_flush(struct napi_struct * napi,bool flush_old) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_ratelimit(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest(struct net_device * ndev,struct ethtool_test * etest,u64 * buf) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int net_selftest_get_count(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void net_selftest_get_strings(u8 * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int nla_put(struct sk_buff * skb,int attrtype,int attrlen,const void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +loff_t noop_llseek(struct file * file,loff_t offset,int whence) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int param_set_copystring(const char * val,const struct kernel_param * kp) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_attached_info(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phy_device * phy_connect(struct net_device * dev,const char * bus_id,void (* handler)(struct net_device *),phy_interface_t interface) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_disconnect(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_do_ioctl_running(struct net_device * dev,struct ifreq * ifr,int cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_get_link_ksettings(struct net_device * ndev,struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_nway_reset(struct net_device * ndev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_ethtool_set_link_ksettings(struct net_device * ndev,const struct ethtool_link_ksettings * cmd) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_print_status(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_start(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phy_stop(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phy_suspend(struct phy_device * phydev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_connect_phy(struct phylink * pl,struct phy_device * phy) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct phylink * phylink_create(struct phylink_config * config,struct fwnode_handle * fwnode,phy_interface_t iface,const struct phylink_mac_ops * mac_ops) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_destroy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_disconnect_phy(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_ethtool_get_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int phylink_ethtool_set_pauseparam(struct phylink * pl,struct ethtool_pauseparam * pause) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_generic_validate(struct phylink_config * config,unsigned long * supported,struct phylink_link_state * state) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_resume(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_start(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_stop(struct phylink * pl) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void phylink_suspend(struct phylink * pl,bool mac_wol) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void refcount_warn_saturate(refcount_t * r,enum refcount_saturation_type t) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void rtmsg_ifinfo_send(struct sk_buff * skb,struct net_device * dev,gfp_t flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sg_init_table(struct scatterlist * sgl,unsigned int nents) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sk_error_report(struct sock * sk) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +struct sk_buff * skb_mac_gso_segment(struct sk_buff * skb,netdev_features_t features) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int smp_call_function_single(int cpu,smp_call_func_t func,void * info,int wait) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void sock_edemux(struct sk_buff * skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +bool static_key_initialized; + + +#include + +int sysctl_tstamp_allow_data; + + +#include + +struct sk_buff * tcp_get_timestamping_opt_stats(const struct sock * sk,const struct sk_buff * orig_skb,const struct sk_buff * ack_skb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_clear_halt(struct usb_device * dev,int pipe) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +extern void usb_devio_cleanup(void); +void usb_devio_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware); +void usb_disable_endpoint(struct usb_device * dev,unsigned int epaddr,bool reset_hardware) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_free_streams(struct usb_interface * interface,struct usb_host_endpoint ** eps,unsigned int num_eps,gfp_t mem_flags) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_get_device_descriptor(struct usb_device * dev,unsigned int size); +int usb_get_device_descriptor(struct usb_device * dev,unsigned int size) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_get_status(struct usb_device * dev,int recip,int type,int target,void * data) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_alloc_bandwidth(struct usb_device * udev,struct usb_host_config * new_config,struct usb_host_interface * cur_alt,struct usb_host_interface * new_alt) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int usb_hcd_find_raw_port_number(struct usb_hcd * hcd,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_hub_create_port_device(struct usb_hub * hub,int port1); +int usb_hub_create_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_hub_remove_port_device(struct usb_hub * hub,int port1); +void usb_hub_remove_port_device(struct usb_hub * hub,int port1) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern void usb_major_cleanup(void); +void usb_major_cleanup(void) +{ + lx_emul_trace_and_stop(__func__); +} + + +extern int usb_set_isoch_delay(struct usb_device * dev); +int usb_set_isoch_delay(struct usb_device * dev) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const char * usb_speed_string(enum usb_device_speed speed) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +void usb_unpoison_urb(struct urb * urb) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +const u8 uuid_index[16] = {}; + + +#include + +void wake_q_add_safe(struct wake_q_head * head,struct task_struct * task) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +int xdp_do_generic_redirect(struct net_device * dev,struct sk_buff * skb,struct xdp_buff * xdp,struct bpf_prog * xdp_prog) +{ + lx_emul_trace_and_stop(__func__); +} + + +#include + +u32 xdp_master_redirect(struct xdp_buff * xdp) +{ + lx_emul_trace_and_stop(__func__); +} + diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_64/source.list b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/source.list new file mode 100644 index 0000000000..017cb0ebc6 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/source.list @@ -0,0 +1,79 @@ +arch/x86/lib/hweight.S +drivers/base/bus.c +drivers/base/core.c +drivers/base/class.c +drivers/base/devres.c +drivers/base/driver.c +drivers/base/dd.c +drivers/base/property.c +drivers/net/mii.c +drivers/net/usb/asix_common.c +drivers/net/usb/asix_devices.c +drivers/net/usb/asix.h +drivers/net/usb/ax88172a.c +drivers/net/usb/ax88179_178a.c +drivers/net/usb/cdc_ether.c +drivers/net/usb/cdc_mbim.c +drivers/net/usb/cdc_ncm.c +drivers/net/usb/usbnet.c +drivers/usb/class/cdc-wdm.c +drivers/usb/core/config.c +drivers/usb/core/driver.c +drivers/usb/core/generic.c +drivers/usb/core/hub.c +drivers/usb/core/quirks.c +drivers/usb/core/usb.c +fs/nls/nls_base.c +kernel/kthread.c +kernel/locking/mutex.c +kernel/locking/osq_lock.c +kernel/locking/rwsem.c +kernel/notifier.c +kernel/sched/build_utility.c +kernel/smpboot.c +kernel/softirq.c +kernel/time/clockevents.c +kernel/time/clocksource.c +kernel/time/hrtimer.c +kernel/time/jiffies.c +kernel/time/ntp.c +kernel/time/tick-broadcast.c +kernel/time/tick-common.c +kernel/time/tick-oneshot.c +kernel/time/tick-sched.c +kernel/time/time.c +kernel/time/timeconv.c +kernel/time/timecounter.c +kernel/time/timekeeping.c +kernel/time/timer.c +kernel/time/timer_list.c +kernel/workqueue.c +lib/bitmap.c +lib/crc16.c +lib/crc32.c +lib/ctype.c +lib/find_bit.c +lib/hexdump.c +lib/idr.c +lib/kasprintf.c +lib/klist.c +lib/kobject.c +lib/kstrtox.c +lib/radix-tree.c +lib/rhashtable.c +lib/rbtree.c +lib/xarray.c +lib/siphash.c +lib/string.c +lib/string_helpers.c +lib/timerqueue.c +lib/vsprintf.c +mm/util.c +net/core/dev.c +net/core/dev_addr_lists.c +net/core/link_watch.c +net/core/skbuff.c +net/core/xdp.c +net/ethernet/eth.c +net/ethtool/common.c +net/sched/sch_generic.c diff --git a/repos/dde_linux/src/drivers/usb_net/spec/x86_64/target.mk b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/target.mk new file mode 100644 index 0000000000..84bc74d54e --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/spec/x86_64/target.mk @@ -0,0 +1,3 @@ +REQUIRES := x86_64 + +include $(PRG_DIR)/../../target.inc diff --git a/repos/dde_linux/src/drivers/usb_net/target.inc b/repos/dde_linux/src/drivers/usb_net/target.inc new file mode 100644 index 0000000000..f90b95df23 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/target.inc @@ -0,0 +1,36 @@ +TARGET = usb_net_drv +LIBS = base jitterentropy virt_lx_emul + +INC_DIR = $(PRG_DIR)/../.. + +SRC_C += dummies.c \ + generated_dummies.c \ + lx_emul.c \ + lx_user.c + +SRC_C += lx_emul/virt/shadow/drivers/usb/core/message.c \ + lx_emul/virt/shadow/drivers/usb/core/urb.c \ + lx_emul/virt/usb_client.c + +SRC_CC = main.cc \ + wdm_terminal.cc + +SRC_CC += lx_emul/random.cc + +SRC_CC += genode_c_api/mac_address_reporter.cc \ + genode_c_api/usb_client.cc \ + genode_c_api/uplink.cc + + +vpath %.c $(PRG_DIR) +vpath %.c $(PRG_DIR)/../.. +vpath %.cc $(PRG_DIR)/../.. +vpath %.c $(REP_DIR)/src/lib + +C_API = $(dir $(call select_from_repositories,src/lib/genode_c_api)) + +vpath genode_c_api/mac_address_reporter.cc $(C_API) +vpath genode_c_api/uplink.cc $(C_API) +vpath genode_c_api/usb_client.cc $(C_API) + +# vim: set ft=make : diff --git a/repos/dde_linux/src/drivers/usb_net/usb_net.h b/repos/dde_linux/src/drivers/usb_net/usb_net.h new file mode 100644 index 0000000000..47390056e2 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/usb_net.h @@ -0,0 +1,45 @@ +/* + * \brief C/C++ interface for this driver + * \author Sebastian Sumpf + * \date 2023-07-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct task_struct; + +int lx_user_main_task(void *); +struct task_struct *lx_user_new_usb_task(int (*func)(void*), void *args); + +struct lx_wdm +{ + unsigned long *data_avail; + void *buffer; + void *handle; + unsigned active; +}; + +int lx_wdm_read(void *args); +int lx_wdm_write(void *args); +int lx_wdm_device(void *args); + +void lx_wdm_create_root(void); +void lx_wdm_schedule_read(void *handle); +void lx_wdm_signal_data_avail(void *handle); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + diff --git a/repos/dde_linux/src/drivers/usb_net/wdm_terminal.cc b/repos/dde_linux/src/drivers/usb_net/wdm_terminal.cc new file mode 100644 index 0000000000..011703dbe6 --- /dev/null +++ b/repos/dde_linux/src/drivers/usb_net/wdm_terminal.cc @@ -0,0 +1,214 @@ +/* + * \brief Service providing the 'Terminal_session' interface for cdc-wdm file + * \author Sebastian Sumpf + * \date 2023-08-16 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace Terminal { + class Session_component; + class Root; +} + + +class Terminal::Session_component : public Genode::Rpc_object +{ + using size_t = Genode::size_t; + + private: + + enum State { WRITE, READ }; + + Genode::Attached_ram_dataspace _io_buffer; + Genode::Signal_context_capability _read_avail_sigh { }; + + State _state { WRITE }; + size_t _data_avail { 0 }; + + struct lx_wdm _wdm_data { &_data_avail, buffer(), this, 1 }; + + task_struct *_write_task { lx_user_new_usb_task(lx_wdm_write, &_wdm_data) }; + task_struct *_read_task { lx_user_new_usb_task(lx_wdm_read, &_wdm_data) }; + task_struct *_device_task { lx_user_new_usb_task(lx_wdm_device, nullptr) }; + + /* non-copyable */ + Session_component(const Session_component&) = delete; + Session_component & operator=(const Session_component&) = delete; + + public: + + Session_component(Genode::Env &env, + Genode::size_t io_buffer_size) + : + _io_buffer(env.ram(), env.rm(), io_buffer_size) + { } + + void schedule_read() + { + lx_emul_task_unblock(_read_task); + } + + void schedule_write() + { + lx_emul_task_unblock(_write_task); + } + + /******************************** + ** Terminal session interface ** + ********************************/ + + Size size() override { return Size(0, 0); } + + bool avail() override + { + return _data_avail > 0; + } + + Genode::size_t _read(Genode::size_t dst_len) + { + if (_state != READ) return 0; + + size_t length = Genode::min(dst_len, _data_avail); + if (dst_len < _data_avail) + Genode::warning("dst_len < data_avail (", dst_len, " < ", _data_avail, ") not supported"); + + _data_avail -= length; + + if (_data_avail == 0) { + _state = WRITE; + schedule_read(); + } + + return length; + } + + Genode::size_t _write(Genode::size_t num_bytes) + { + if (_state == READ) return 0; + + _data_avail = num_bytes; + _state = WRITE; + + schedule_write(); + Lx_kit::env().scheduler.execute(); + + return 0; + } + + Genode::Dataspace_capability _dataspace() + { + return _io_buffer.cap(); + } + + void read_avail_sigh(Genode::Signal_context_capability sigh) override + { + _read_avail_sigh = sigh; + } + + void connected_sigh(Genode::Signal_context_capability sigh) override + { + Genode::Signal_transmitter(sigh).submit(); + } + + void size_changed_sigh(Genode::Signal_context_capability) override { } + + size_t read(void *, size_t) override { return 0; } + size_t write(void const *, size_t) override { return 0; } + + void *buffer() { return _io_buffer.local_addr(); } + + void signal_data_avail() + { + if (_read_avail_sigh.valid() == false) return; + _state = READ; + Genode::Signal_transmitter(_read_avail_sigh).submit(); + } +}; + + +class Terminal::Root : public Genode::Root_component +{ + private: + + Genode::Env &_env; + + task_struct *_create_task { lx_user_new_usb_task(_create_session, this) }; + + Genode::Constructible _session { }; + + static int _create_session(void *arg) + { + Root *root = static_cast(arg); + Genode::size_t const io_buffer_size = 4096ul; + + while (true) { + lx_emul_task_schedule(true); + if (!root->_session.constructed()) + root->_session.construct(root->_env, io_buffer_size); + } + } + + /* non-copyable */ + Root(const Root&) = delete; + Root & operator=(const Root&) = delete; + + protected: + + Session_component *_create_session(const char *) override + { + if (!_session.constructed()) { + lx_emul_task_unblock(_create_task); + Lx_kit::env().scheduler.execute(); + } + return &*_session; + } + + public: + + Root(Genode::Env &env, + Genode::Allocator &md_alloc) + : + Genode::Root_component(&env.ep().rpc_ep(), &md_alloc), + _env(env) + { + _env.parent().announce(_env.ep().manage(*this)); + } +}; + + +void lx_wdm_schedule_read(void *handle) +{ + using namespace Terminal; + Session_component *session = static_cast(handle); + session->schedule_read(); +} + + +void lx_wdm_signal_data_avail(void *handle) +{ + using namespace Terminal; + Session_component *session = static_cast(handle); + session->signal_data_avail(); +} + + +void lx_wdm_create_root(void) +{ + new (Lx_kit::env().heap) Terminal::Root(Lx_kit::env().env, Lx_kit::env().heap); +}